1 ///// detection du positionnement du menu quand on scrolle 2 topDetect = function ($) { 3 4 var $window = $(window); 5 var blocMenu = $('header#principal').offset(); 6 var PosMenu = blocMenu.top; 7 var headerH = $('header#principal').height(); 8 var menuH = $('.menu').height(); 9 var hauteur = headerH - menuH; 10 11 $window.scroll(function () { 12 if (($(window).scrollTop()) >= PosMenu + hauteur) { 13 $('#principal').addClass('auTop'); 14 } else { 15 if ($('#principal').hasClass('auTop')) { 16 $('#principal').removeClass('auTop'); 17 } 18 } 19 }); 20 }; 21 22 23 ///// detection si le bloc est à gauche de la page 24 25 leftDetect = function ($) { 26 var blocSousMenu = $('.sousMenu').offset(); 27 28 if (typeof blocSousMenu !== 'undefined') { 29 var posBlocSousMenu = blocSousMenu.left; 30 var i = 0; 31 var sousMenuLiH = $('.sousMenu li').height(); 32 var h = 0; 33 34 $('.sousMenu li').each(function () { 35 var blocLi = $(this).offset(); 36 var posBlocLi = blocLi.left; 37 if (posBlocSousMenu === posBlocLi) { 38 $(this).addClass('left'); 39 i++; 40 if (i > 1) { 41 var h = sousMenuLiH * i - sousMenuLiH; 42 $('div.sousMenuContainer').prepend('<span class="ligne" style="top:' + h + 'px"></span>'); 43 } 44 } 45 }); 46 } 47 }; 48 49 ///// detection de la selection du bloc precedent le bloc image pour appliquer le hover des mosaiques 50 51 blocDetect = function ($) { 52 $('article.item').mouseenter(function () { 53 $(this).next('article.item.image').addClass('over'); 54 }); 55 $('article.item').mouseleave(function () { 56 $(this).next('article.item.image').removeClass('over'); 57 }); 58 $('article.item.image').mouseenter(function () { 59 $(this).prev('article.item').addClass('over'); 60 $(this).addClass('over'); 61 }); 62 $('article.item.image').mouseleave(function () { 63 $(this).prev('article.item').removeClass('over'); 64 $(this).removeClass('over'); 65 }); 66 }; 67 68 69 Drupal.behaviors.mainjs = { 70 attach: function (context, settings) { 71 72 (function ($) { 73 74 75 function $_GET(param) { 76 var vars = {}; 77 window.location.href.replace(location.hash, '').replace( 78 /[?&]+([^=&]+)=?([^&]*)?/gi, // regexp 79 function (m, key, value) { // callback 80 vars[key] = value !== undefined ? value : ''; 81 } 82 ); 83 84 if (param) { 85 return vars[param] ? vars[param] : null; 86 } 87 return vars; 88 } 89 90 91 topDetect($); 92 leftDetect($); 93 blocDetect($); 94 95 96 var clipboard = new ClipboardJS('.copy'); 97 98 99 clipboard.on('success', function (e) { 100 console.info('Action:', e.action); 101 console.info('Text:', e.text); 102 console.info('Trigger:', e.trigger); 103 104 e.clearSelection(); 105 $('body').after('<p class="notification"><span>Lien copié dans votre presse papier</span><p>'); 106 107 setTimeout(function () { 108 $(".notification").fadeOut(function () { 109 $(".notification").remove(); 110 }); 111 }, 2000); 112 113 }); 114 115 116 viewterm = $('.view-term-de-taxonomie div[vocabulary]'); 117 118 119 if (viewterm.attr('vocabulary')) { 120 classname = ""; 121 vocabulary = viewterm.attr('vocabulary'); 122 title = $.trim(viewterm.text()); 123 124 125 if (vocabulary == 'experimenter') { 126 classname = "experimentez"; 127 } else { 128 classname = vocabulary; 129 } 130 131 if (vocabulary == 'arcadez') { 132 systempath = 'Arcadez-vous' 133 } else { 134 systempath = vocabulary; 135 } 136 137 138 // add class menu 139 $('.sousMenu li a').each(function () { 140 if (title == $.trim($(this).text())) { 141 $(this).addClass('ici'); 142 return false; 143 } 144 }); 145 146 147 $('.list-item').addClass(classname); 148 149 if (systempath) { 150 $('.menu a[data-drupal-link-system-path=' + systempath + ']').addClass('is-active'); 151 } 152 } 153 154 // cas fiche 155 156 hreftag = $.trim($('.fiche .tag a').attr('href')); 157 158 if (hreftag) { 159 160 // add class menu 161 $('.sousMenu li a').each(function () { 162 if (hreftag == $.trim($(this).attr('href'))) { 163 $(this).addClass('ici'); 164 return false;
165 } 166 }); 167 168 systempath = $('.sousMenu').attr('data-drupal-link-system-path'); 169 170 if (systempath) { 171 $('.menu a[data-drupal-link-system-path=' + systempath + ']').addClass('is-active'); 172 } 173 174 175 } 176 177 178 $('.diaporama-fiche').slick({ 179 dots: false, 180 infinite: true, 181 speed: 500, 182 cssEase: 'linear', 183 arrows: true, 184 fade: true, 185 appendArrows: $(".navSlider div"), 186 prevArrow: '<span class="icon icon-fleche-p"></span>', 187 nextArrow: '<span class="icon icon-fleche-n"></span>' 188 }); 189 190 191 $('.home .diaporama').slick({ 192 dots: false, 193 infinite: true, 194 speed: 500, 195 cssEase: 'linear', 196 arrows: true, 197 fade: true, 198 appendArrows: $(".navSlider div"), 199 prevArrow: '<span class="icon icon-fleche-p"></span>', 200 nextArrow: '<span class="icon icon-fleche-n"></span>' 201 }); 202 203 204 $('article.onglet-item header', context).once('mainjs').on('click', function () { 205 206 if ($(this).hasClass('focus')) { 207 $(this).removeClass('focus'); 208 $(this).next('.content').removeClass('slide'); 209 } else { 210 $(this).addClass('focus'); 211 $(this).next('.content').addClass('slide'); 212 } 213 }); 214 215 216 if (!$('body').hasClass('user-logged-in')) { 217 ///// over du blackout -- test 2 218 $('.logo a span').mouseenter(function () { 219 if (!$('body').hasClass('home')) { 220 $('body').addClass('blackout'); 221 } 222 }); 223 224 $('.logo a span').mouseleave(function () { 225 $('body').removeClass('blackout'); 226 }); 227 228 } 229 230 /// menu mobile 231 232 $('.hamburger', context).once('mainjs').on('click', function () { 233 234 if ($(this).hasClass('is-active')) { 235 $(this).removeClass('is-active'); 236 $('#principal .menu').removeClass('open'); 237 $('body').removeClass('menuopen'); 238 $(".search-form").removeClass("active"); 239 } else { 240 $(this).addClass('is-active'); 241 $('#principal .menu').addClass('open'); 242 $('body').addClass('menuopen'); 243 } 244 }); 245 // menu select 246 247 path = $('.sousMenu.ici'); 248 linkpath = path.attr("data-drupal-link-system-path"); 249 if (linkpath) { 250 251 if (linkpath == 'Arcadez-vous') { 252 systempath = "informer"; 253 } else { 254 systempath = linkpath; 255 } 256 257 $('.menu a[data-drupal-link-system-path=' + systempath + ']').addClass('is-active'); 258 259 title = $.trim($('h1.titre').text()); 260 261 $('.sousMenu li a').each(function () { 262 if (title == $.trim($(this).text())) { 263 $(this).addClass('ici'); 264 return false; 265 } 266 }); 267 268 269 } 270 271 272 $_GET = $_GET(); 273 274 275 if ($_GET['onglet'] != null) { 276 277 $('.menu a[data-drupal-link-system-path=accompagne]').addClass('is-active'); 278 279 $id = $("#onglet-" + $_GET['onglet']) 280 281 if ($id.length == 1) { 282 articleTop = $id.offset().top; 283 header = $id.find('header'); 284 285 header.addClass('focus'); 286 header.next('.content').addClass('slide'); 287 288 289 $('html, body').animate({ 290 scrollTop: articleTop - 80 291 }, 'slow'); 292 return false; 293 294 } else { 295 296 // si onglet absent 297 $('body').after('<p class="notification"><span>Ce contenu n\'est plus disponible sur notre site.</span><p>'); 298 299 setTimeout(function () { 300 $(".notification").fadeOut(function () { 301 $(".notification").remove(); 302 }); 303 }, 5000); 304 305 } 306 307 308 } 309 310 311 $(document).ready(function () { 312 313 314 var currentURL = window.location.href; 315 316 if (currentURL === "https://www.arsud-regionsud.com/louer/espaces-de-creation") { 317 $(".menu-5 a").removeClass("is-active"); 318 $(".menu-6 a").addClass("is-active"); 319 } 320 321 322 323
324 $(".node-offres-d-emploi-form .field--name-field-renseignements-complementa .description").remove().appendTo($(".node-offres-d-emploi-form .field--name-field-renseignements-complementa .form-item label")); 325 326 $(".node-offres-d-emploi-form .description").css({ 327 "margin-bottom": "7.5px", 328 "font-weight": "normal" 329 }) 330 331 $("body.page-node-type-offres-d-emploi:not(.user-logged-in) a[href='#edit-revision-information']").closest(".js-form-item").remove(); 332 $("body.page-node-type-offres-d-emploi:not(.user-logged-in) #edit-moderation-state-0-state").closest(".js-form-item").remove(); 333 334 $(".filter-help").parent(".js-filter-wrapper").remove(); 335 336 337 338 339 if (!$(".search-opener").length) { 340 $(".menu > .pratique").append('<a href="#" class="search-opener"><span class="icon icon-loupe"><span class="path1"></span><span class="path2"></span><span class="path3"></span></span></a>'); 341 } 342 343 $(".search-opener").click(function () { 344 $(".search-form").toggleClass("active"); 345 return false; 346 }); 347 $(".search-form .form-search").attr("placeholder", "Rechercher une offre d'emploi, une formation..."); 348 if ($("body").hasClass("path-search")) { 349 $(".search-form").addClass("active"); 350 } 351 }); 352 353 354 })(jQuery); 355 } 356 }
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.