1//Fonction Ajourd'hui 2function findToday() { 3 var today = new Date(); 4 var dd = today.getDate(); 5 var mm = today.getMonth()+1; 6 var yyyy = today.getFullYear(); 7 8 //Test si le jour et mois sont plus petits que 10 et ajout un 0 devant 9 if(dd<10) {dd = '0' + dd} 10 if(mm<10) {mm = '0' + mm} 11 12 //Formatage de la date 13 var today = dd + '.' + mm + '.' + yyyy; 14 15 return today; 16} 17 18//Fonction ce weekend 19function findWeekend() { 20 var curr = new Date; 21 var first = curr.getDate() - curr.getDay(); 22 23 //Récupère le 1er jour de la semaine (Lundi) 24 var first = first + 1; 25 26 //Récupère le 6ème jour de la semaine (Samedi) 27 var last = first + 5; 28 29 var date = new Date(curr.setDate(last)); 30 var dd = date.getDate(); 31 var mm = date.getMonth()+1; 32 var yyyy = date.getFullYear(); 33 34 //Test si le jour et mois sont plus petits que 10 et ajout un 0 devant 35 if(dd<10) {dd = '0' + dd} 36 if(mm<10) {mm = '0' + mm} 37 38 //Formatage de la date 39 var saturday = dd + '.' + mm + '.' + yyyy; 40 var sunday = (dd + 1) + '.' + mm + '.' + yyyy; 41 42 return {saturday : saturday, sunday : sunday}; 43} 44var findWeekend = findWeekend(); 45 46//Fonction 7 prochains jours 47function findSevenNextDays() { 48 var date = new Date(); 49 50 //Récupère le 7ème jour depuis ajourd'hui 51 date.setDate(date.getDate() + 6); 52 53 var dd = date.getDate(); 54 var mm = date.getMonth()+1; 55 var yyyy = date.getFullYear(); 56 57 //Test si le jour et mois sont plus petits que 10 et ajout un 0 devant 58 if(dd<10) {dd = '0' + dd } 59 if(mm<10) {mm = '0' + mm } 60 61 //Formatage de la date 62 var date = dd + '.' + mm + '.' + yyyy; 63 64 return date; 65} 66 67//Fonction ce mois 68function findMonth() { 69 var date = new Date(); 70 71 //Récupère le dernier jour du mois 72 var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0); 73 var mm = date.getMonth()+1; 74 75 //Test si le mois est plus petits que 10 et ajout un 0 devant 76 if(mm<10) {mm = '0' + mm } 77 78 var yyyy = date.getFullYear(); 79 80 //Formatage de la date 81 var endDate = ("0" + (lastDay.getDate())).slice(-2) + '.' + mm + '.' + yyyy; 82 83 return endDate 84} 85 86//Fonction 3 prochains mois 87function findThreeNextMonth() { 88 var date = new Date(); 89 var dd = date.getDate(); 90 91 //Récupère le 3ème mois depuis aujourd'hui 92 var mm = date.getMonth() + 3; 93 94 //Test si le jour et mois sont plus petits que 10 et ajout un 0 devant 95 if(dd<10) {dd = '0' + dd} 96 if(mm<10) {mm = '0' + mm} 97 98 var yyyy = date.getFullYear(); 99 100 //Formatage de la date 101 var date = dd + '.' + mm + '.' + yyyy; 102 103 return date; 104} 105 106//Ajout des fonctions aux liens des boutons 107/*$(document).ready(function(){ 108 109 //Récupère l'url de la page et vérifie si elle contient un .html ou pas 110 if(window.location.href.indexOf('.html') > -1) { 111 var pageNameURL = window.location.href.split('.html')[0]; 112 } else { 113 var pageNameURL = window.location.href.split('/')[3]; 114 } 115 116 //Lien tous 117 $('#all').attr('href', pageNameURL); 118 119 //Lien ce weekend 120 $('#weekend').attr('href', pageNameURL + "/" + findWeekend.saturday + '/' + findWeekend.sunday + '?no_cache=1'); 121 122 //Lien 7 prochains 123 $('#seven-days').attr('href', pageNameURL + "/" + findToday() + '/' + findSevenNextDays() + '?no_cache=1'); 124 125 //Lien ce mois 126 $('#month').attr('href', pageNameURL + "/" + findToday() + '/' + findMonth() + '?no_cache=1'); 127 128 //Lien 3 prochains mois 129 $('#three-months').attr('href', pageNameURL + "/" + findToday() + '/' + findThreeNextMonth() + '?no_cache=1'); 130 131 132 if(window.location.href.match(/\d/)) { 133 $('html, body').animate({ 134 scrollTop: $('.period-menu').offset().top - 300 135 }, 1000); 136 } 137 138});*/ 139 140 141//Filtrage des boutons en ajax 142$(document).ajaxStart(function() { 143 $(document.body).css({'cursor' : 'wait'}); 144}).ajaxStop(function() { 145 $(document.body).css({'cursor' : 'default'}); 146}); 147 148$(document).delegate("#all","click",function(e) { 149 $(this).addClass('active'); 150 $(this).parent('li').siblings('li').children('a').removeClass('active'); 151 var url = currentURL; 152 153 $.ajax({ 154 url: url, 155 // cache: false, 156 type: "GET", 157 dataType: "html", 158 success: function (res) { 159 160 $(".event-list-view").replaceWith($(res).find(".event-list-view")); 161 jQuery.ias().reinitialize(); 162 } 163 }); 164 return false;
165}); 166 167$(document).delegate("#seven-days","click",function(e) { 168 $(this).addClass('active'); 169 $(this).parent('li').siblings('li').children('a').removeClass('active'); 170 var dateRestriction = findToday(); 171 var dateRestrictionHigh = findSevenNextDays(); 172 173 var url = currentURL+"?tx_news_pi1[overwriteDemand][timeRestriction]=" + dateRestriction + "&tx_news_pi1[overwriteDemand][timeRestrictionHigh]=" + dateRestrictionHigh + "&no_cache=1"; 174 175 $.ajax({ 176 url: url, 177 // cache: false, 178 type: "GET", 179 dataType: "html", 180 success: function (res) { 181 $(".event-list-view").replaceWith($(res).find(".event-list-view")); 182 jQuery.ias().reinitialize(); 183 } 184 }); 185 return false; 186}); 187 188$(document).delegate("#month","click",function(e) { 189 $(this).addClass('active'); 190 $(this).parent('li').siblings('li').children('a').removeClass('active'); 191 var dateRestriction = findToday(); 192 var dateRestrictionHigh = findMonth(); 193 var url = currentURL+"?tx_news_pi1[overwriteDemand][timeRestriction]=" + dateRestriction + "&tx_news_pi1[overwriteDemand][timeRestrictionHigh]=" + dateRestrictionHigh + "&no_cache=1"; 194 $.ajax({ 195 url: url, 196 // cache: false, 197 type: "GET", 198 dataType: "html", 199 success: function (res) { 200 $(".event-list-view").replaceWith($(res).find(".event-list-view")); 201 202 jQuery.ias().reinitialize(); 203 } 204 }); 205 return false; 206}); 207 208$(document).delegate("#three-months","click",function(e) { 209 $(this).addClass('active'); 210 $(this).parent('li').siblings('li').children('a').removeClass('active'); 211 var dateRestriction = findToday(); 212 var dateRestrictionHigh = findThreeNextMonth(); 213 var url = currentURL+"?tx_news_pi1[overwriteDemand][timeRestriction]=" + dateRestriction + "&tx_news_pi1[overwriteDemand][timeRestrictionHigh]=" + dateRestrictionHigh + "&no_cache=1"; 214 $.ajax({ 215 url: url, 216 // cache: false, 217 type: "GET", 218 dataType: "html", 219 success: function (res) { 220 $(".event-list-view").replaceWith($(res).find(".event-list-view")); 221 jQuery.ias().reinitialize(); 222 } 223 }); 224 return false; 225}); 226 227
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.