1if(typeof STQ === 'undefined') var STQ = {}; 2 3/** 4 * Gestion du bandeau d'alertes 5 */ 6STQ.messageHeader = (function(){ 7 8 /** 9 * fait apparaitre la div des messages si il y a des messages actifs 10 */ 11 function show(){ 12 13 STQ.eaProxy.getEventData('stq', STQ.language, function(data){ 14 if(data.length != 0) { 15 16 //remove old block just in case the method is called by js elsewhere 17 $('.general-alert').remove(); 18 19 //get the html of the alert div and transform it into an object 20 var $js_template_alert_box = $($('#general-message-block-templates').html()); 21 22 var communications = []; 23 $.each(data, function (key, alert) { 24 //get the html and create an object. 25 var $js_alert_body_template = $($('#general-message-body-templates').html()); 26 27 var date = STQ.dateFormatter.getFormattedTextualDate(alert.communication[0].date_diffusion, false); 28 var text = alert.communication[0].message_court; 29 30 var line = $js_alert_body_template.clone().html(date + ' - ' + text); 31 communications.push($('<div>').append(line).html()); 32 }); 33 if(communications.length > 0){ 34 $js_template_alert_box.find('.page').html(communications.join('<hr>')); 35 36 // Prepare for animation 37 $js_template_alert_box.hide(); 38 39 $('#general-message-block-templates').before($js_template_alert_box); 40 41 // Sleek entry. 42 $js_template_alert_box.slideDown(); 43 } 44 } 45 }); 46 } 47 48 return { 49 show : show 50 }; 51 52})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.