1$(document).ready(function () { 2 3 // extract 4 $(".extract").each(function () { 5 $(this).addClass("compressed"); 6 }); 7 8 $(".extract.compressed .expand").click(function () { 9 var text = $(this).parent(); 10 $(text).removeClass('compressed'); 11 12 }) 13 14 // $('.modal').modal(); 15 $('.sidenav').sidenav(); 16 $('.tabs').tabs(); 17 $('.collapsible').collapsible(); 18 19 // MODALE 20 21 $('.modale_open').on('click', function () { 22 var target = '#' + $(this).data('dest'); 23 $(target).css({'display': 'block'}); 24 $('body').addClass('blocked'); 25 var URL = $(this).data('redirect'); 26 $('input[name="url_redirect"]').attr('value', URL); 27 }); 28 29 $('.modale_close').on('click', function () { 30 var target = '#' + $(this).data('dest'); 31 $(target).css({'display': 'none'}); 32 $('body').removeClass('blocked'); 33 }); 34 35 // LIGHTCASE 36 37 $('.lightcase').lightcase({ 38 slideshow: true, 39 video: { 40 width: 900, 41 height: 600, 42 poster: '', 43 preload: 'auto', 44 ontrols: true, 45 autobuffer: true, 46 autoplay: true, 47 loop: false 48 } 49 }); 50 51 // ANCRE 52 $(document).on('click', 'a[href^="#"]', function (event) { 53 if (!$(this).parent().hasClass('tab')) { 54 event.preventDefault(); 55 var navHeight = $("header").height() + 20; 56 $('html, body').animate({ 57 // scrollTop: $(attr(this, 'href')).offset().top - navHeight 58 scrollTop: $($(this).attr('href')).offset().top - navHeight 59 }, 800); 60 } 61 }); 62 63 // DATA HREF 64 $('*[data-href]').click(function () { 65 var lien = $(this).data('href'); 66 var target = $(this).attr('target'); 67 if (target != "_blank") { 68 history.pushState("", ""); 69 window.location.replace(lien); 70 } else { 71 window.open(lien, target); 72 } 73 }); 74 75 // BOUTON TOP 76 if ($("#to_top_btn").length) { 77 78 var prevScrollpos = window.pageYOffset; 79 window.onscroll = function () { 80 var currentScrollPos = window.pageYOffset; 81 if (prevScrollpos > currentScrollPos) { 82 // $("#hamburger-button").removeClass('active'); 83 } else { 84 // $("#hamburger-button").addClass('active'); 85 // $('.toggle-button').removeClass("button-open"); 86 } 87 prevScrollpos = currentScrollPos; 88 scrollFunction(); 89 } 90 91 var mybutton = document.getElementById("to_top_btn"); 92 93 function scrollFunction() { 94 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 95 // mybutton.style.display = "block"; 96 mybutton.classList.remove("hidden"); 97 mybutton.classList.add("show"); 98 } else { 99 // mybutton.style.display = "none"; 100 mybutton.classList.remove("show"); 101 mybutton.classList.add("hidden"); 102 } 103 } 104 105 $('#to_top_btn').click(function () { 106 $("html, body").animate({scrollTop: 0}, 500); 107 return false; 108 }); 109 } 110 111 // SELECT2 112 113 $("select.select2").select2({ 114 dropdownAutoWidth: true, 115 width: '100%', 116 minimumResultsForSearch: Infinity, 117 escapeMarkup: function (es) { 118 return es; 119 } 120 }); 121 122 $("select.filtre_select2").select2({ 123 dropdownAutoWidth: true, 124 width: '100%', 125 minimumResultsForSearch: Infinity, 126 escapeMarkup: function (es) { 127 return es; 128 } 129 }); 130 131 $(".filtres").on('change', function (e) { 132 this.form.submit(); 133 }); 134 135 $(".checkbox_wrapper input[type=checkbox]").on("click", function () { 136 $(this).val('Y'); 137 this.form.submit(); 138 }); 139 140 // STICK ON SCROLL FORM 141 $("#side_form").stickOnScroll({ 142 topOffset: $("#menu_nav").outerHeight(), 143 setParentOnStick: true, 144 setWidthOnStick: true, 145 footerElement: $("footer"), 146 bottomOffset: 30 147 }); 148 149 // Menu mobile 150 var mobileButton = $('.mobile-button') 151 var menuWrap = $('.menu-wrap'); 152 var sidebarArrow = $('.sidebar-menu-arrow'); 153 var sideLink = $('.sideLink'); 154 mobileButton.on('click', function () { 155 $(this).toggleClass('button-open'); 156 menuWrap.toggleClass('menu-show'); 157 console.log('ouvert-fermé'); 158 }); 159 sideLink.on('click', function () { 160 $(this).toggleClass('button-open'); 161 menuWrap.toggleClass('menu-show'); 162 $('#hamburger-button').removeClass("button-open"); 163 }); 164 sidebarArrow.click(function () { 165 $(this).next().slideToggle(300); 166 }); 167 168}); 169 170$(window).on('load', function () { 171 AOS.refresh(); 172}); 173 174$(window).on('scroll', function () { 175 AOS.init(); 176}); 177 178$(function () { 179 AOS.init(); 180}); 181 182if ($("#js_on").length) { 183 var date = new Date(); 184 document.getElementById("js_on").value = date.getFullYear(); 185} 186 187function setText(element){ 188 var permalink = $(element).attr('value'); 189 var link = window.open(permalink, '_self'); 190 link.location; 191} 192 193var inputs = document.querySelectorAll('.inputfile'); 194Array.prototype.forEach.call(inputs, function (input) { 195 var label = input.nextElementSibling, 196 labelVal = label.innerHTML; 197 198 input.addEventListener('change', function (e) { 199 var fileName = ''; 200 if (this.files && this.files.length > 1) 201 fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length); 202 else 203 fileName = e.target.value.split('\'').pop(); 204 205 if (fileName) 206 label.querySelector('span').innerHTML = fileName; 207 else 208 label.innerHTML = labelVal; 209 }); 210}); 211 212if($('.politique-de-confidentialite').length == 0) { 213 214 // AJOUT TARGET _BLANK LIENS EXTERNES 215 window.addEventListener("DOMContentLoaded", e => { 216 document.querySelectorAll('a[href]').forEach(a => { 217 if (location.hostname == new URL(a.href).hostname) 218 return; 219 220 a.target = "_blank"; 221 a.rel = "noreferrer nofollow noopener"; 222 }); 223 }); 224 225}
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.