1$(document).ready(function(){ 2 3 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 4 /* SCROLL SOUS-MENU */ 5 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 6 7 8 9 var customScroll = function(){ 10 if($(window).width() > 1024){ 11 $(".siteMenu-interne > ul > li > ul, .siteMenu .ccm-block-edit > ul > li > ul, .siteColLeft, .siteColRight").mCustomScrollbar({ 12 alwaysShowScrollbar : 1, 13 scrollInertia : 0.9 14 }); 15 }else{ 16 $(".siteMenu-interne > ul > li > ul, .siteMenu .ccm-block-edit > ul > li > ul, .siteColLeft, .siteColRight").mCustomScrollbar("destroy"); 17 } 18 } 19 $(window).resize(function(){ 20 customScroll(); 21 }).resize(); 22 23 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 24 /* FANCYBOX */ 25 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 26 27 $(".fancy, [data-fancybox]").fancybox({ 28 closeClickOutside : true, 29 touch : true, 30 loop : true, 31 gutter : 30 32 }); 33 34 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 35 /* REGENERER CAPTCHA */ 36 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 37 38 $('body').on('click', '.nouveauCaptcha', function(event){ 39 $.getJSON(baseHref+"frontoffice/controlleurs/regenererCaptcha.php?captcha="+$(this).attr("data-captcha")).complete(function(data) { 40 41 if (data.responseText!=0){ 42 $(".captcha-wrap span").html(data.responseText); 43 } 44 }); 45 return false; 46 }); 47 48 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 49 /* INFOS BULLE */ 50 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 51 52 $("body").on({ 53 mouseenter: function() { 54 $(this).powerTip({manual : true, placement: 'nw', smartPlacement: true}); 55 $.powerTip.show(this); 56 }, mouseleave: function() { 57 $.powerTip.hide(this); 58 $.powerTip.destroy(this); 59 } 60 },".conseil, .toolTip"); 61 62 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 63 /* ONGLETS */ 64 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 65 66 var openTab = null; 67 68 $('[data-tab]').on('click', function(event){ 69 70 // On recupere le nom de celui qu'on veut ouvrir. 71 openTab = $(this).attr('data-tab'); 72 73 // On ferme les anciens onglets 74 $(this).closest('.tabs').children('li').removeClass('active'); 75 $(this).closest('.tabs').parent().children('[data-tab-content]').removeClass('ouvert'); 76 77 // On ouvre celui qui convient 78 $(this).parent('li').addClass('active'); 79 $(this).closest('.tabs').parent().children('[data-tab-content="'+ openTab +'"]').addClass('ouvert'); 80 81 return false; 82 }); 83 84 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 85 /* OUVRIR UNE POPUP */ 86 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 87 88 var openpopup = null; 89 90 $('[data-open-popup]').on('click', function(event){ 91 92 // On recupere le nom de celle qu'on veut ouvrir. 93 openpopup = $(this).attr('data-open-popup'); 94 95 // On ferme les anciennes popups 96 $('.pop').removeClass('ouvert'); 97 // On ouvre celle qui convient 98 $('.pop[data-popup="'+ openpopup +'"]').addClass('ouvert'); 99 }); 100 101 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 102 /* FERMER UNE POPUP */ 103 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 104 105 $('.pop-close').on('click', function(event){ 106 $('.pop').removeClass('ouvert'); 107 }); 108 // Avec la touche echap 109 $(window).bind('keydown', function(event) { 110 if(event.keyCode == 27) { 111 $('.ouvert .pop-close').trigger('click'); 112 } 113 }); 114 115 116 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 117 /* POUR LES LIENS DE PARTAGE */ 118 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 119 open_popup = function(url){ 120 121 mywidth = 500; 122 myheight = 350; 123 myleft = (screen.width - mywidth) / 2; 124 mytop = (screen.height - myheight) / 2; 125 window.open( url, 'nouvo', 'width='+mywidth+',height='+myheight+',scrollbars=1,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left='+myleft+',top='+mytop); 126 } 127 128 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 129 /* LINE BREAKS FLEX BOXES */ 130 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 131 $('.line-break').after('<break></break>'); 132 133 134 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 135 /* MENU MOBILE */ 136 /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/ 137 138 var animEnCours = false;
139 140 resetMenu = function(){ 141 $('.siteMenu-trigger').removeClass("active"); 142 $(".siteMenu-interne > ul").removeAttr("style") 143 $(".siteMenu-interne > ul > li").css("left","0"); 144 $(".siteMenu-retour").remove(); 145 146 if($(window).width() <= 1024){ 147 $(".siteMenu-interne > ul > li ul").css("display","none"); 148 }else{ 149 $(".siteMenu-interne > ul > li ul").removeAttr("style"); 150 } 151 } 152 153 154 //OUVERTURE MENU 155 $('.siteMenu-trigger').on('click', function(){ 156 if($(this).hasClass("active")){ 157 $(this).removeClass('active'); 158 //On reset le sous menu 159 setTimeout(function(){ 160 $(".siteMenu-interne, .siteMenu-annexes").removeAttr("style"); 161 $(".siteMenu-interne > ul > li").css("left","0"); 162 $(".siteMenu-retour").parent("li").remove(); 163 }, 100); 164 }else{ 165 $(this).addClass('active'); 166 } 167 }); 168 169 //NAVIGATION DANS LE MENU MOBILE 170 $(".siteMenu-interne > ul li a, .siteMenu-annexes > ul li a").on('click', function(){ 171 172 if($(window).width() <= 1024){ 173 if($(this).parent('li').children('ul').length > 0 && !animEnCours){ 174 animEnCours = true; 175 $(this).parent('li').children('ul').prepend('<li class="siteMenu-retour"><a href="#" title="Retour au menu précédent">Retour</a></li>'); 176 $(this).parent('li').children('ul').css("display","block"); 177 $(".siteMenu-interne, .siteMenu-annexes").stop(true,true).animate({"left":"-=100%"},400,function(){ 178 animEnCours = false; 179 }); 180 return false; 181 }else{ 182 return true; 183 } 184 } 185 }); 186 187 //CLICK FLECHE RETOUR 188 $(".siteMenu ul li").on("click", ".siteMenu-retour", function(){ 189 var retour = $(this); 190 if(!animEnCours){ 191 animEnCours = true; 192 $(".siteMenu-interne, .siteMenu-annexes").stop(true,true).animate({"left":"+=100%"},400, function(){ 193 retour.parent("ul").css("display","none"); 194 retour.remove(); 195 animEnCours = false; 196 }); 197 } 198 return false; 199 }); 200 201 /* 202 * RESIZE MENUS 203 */ 204 $(window).resize(function(){ 205 resetMenu(); 206 }); 207 208 209 // On met la classe parentLink sur les li qui contiennent des sous-ul 210 // (pour afficher la petite fleche) 211 $(".siteMenu li ul").each(function(){ 212 $(this).parent('li').addClass('parentLink'); 213 }); 214 215}); 216
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.