1/** 2 * 3 * @author 4 * 5 * @project cheznoo.net 6 * 7 * @date Friday, 29 August 2014 8 * 9 */ 10 11function readLastCommuniques() { 12 var url = WEBSITE_URL + 'communiques/xhr-read-last-communiques'; 13 $.get(url, {_: new Date().getTime()}, function(o) { 14 if (o.success == 1) { 15 var lastCommuniques = o.data.lastCommuniques; 16 if (typeof lastCommuniques[0] !== 'undefined' 17 && lastCommuniques[0] !== null) { 18 populateLastCommuniques(lastCommuniques); 19 } 20 } 21 }); 22 return false; 23} 24 25 26function populatePubs() { 27 var url = WEBSITE_URL + 'publiweb/pub.php?page_id=073e0bb4a596cf4a175df4511de042ee&encart_id=d35c1854b5a04c16ef26829ab8139c2e'; 28 $.get(url, {_: new Date().getTime()}, function(o) { 29 30 var populatepub = o.data; 31 $('#pub').html(populatepub); 32 33 }); 34 35 36 } 37 38 39 40function populateLastCommuniques(lastCommuniques) { 41 var now = new Date(); 42 var today = new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours()-36); 43 44 var html = ''; 45 var i = 0; 46 var length = lastCommuniques.length 47 for (i; i < length; i++) { 48 var lastCommunique = lastCommuniques[i]; 49 50 var specificDate = new Date(lastCommunique.date*1000); 51 var spdate = new Date(specificDate.getFullYear(), specificDate.getMonth(), specificDate.getDate(), specificDate.getHours()); 52 53 if (today.getTime() < spdate.getTime()) 54 { 55 html += '' + '<a href="' + WEBSITE_URL + 'communiques/read/' 56 + lastCommunique.id + '" class="list-group-item newCommuniques">'; 57 58 } else { html += '' + '<a href="' + WEBSITE_URL + 'communiques/read/' 59 + lastCommunique.id + '" class="list-group-item">'; 60 61 } 62// 63// if (lastCommunique.name.length > 30) { 64// html += '' + lastCommunique.name.substr(0, 30) + '...'; 65// } else { 66 html += '' + lastCommunique.name; 67// } 68 69 html += '' + '</a>'; 70 71 72 73 74 75 76 } 77 $('#lastCommuniquesListGroup').html(html); 78 return false; 79} 80 81$(function() { 82 83 readLastCommuniques(); 84 populatePubs(); 85 $('#lastCommuniques #textPageHomeLastCommuniquesCommuniques').replaceWith( 86 text['page']['home']['lastCommuniques']['communiques']); 87 $('#lastCommuniques #textPageHomeLastCommuniquesMoreCommuniques') 88 .replaceWith(text['page']['home']['lastCommuniques']['moreCommuniques']); 89 return false; 90});
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.