1$(document).ready(function () { 2 /*//pimpage radio //on stop ça, trop de sideffect partout 3 $("input:radio").not(".radio_ignored").wrap("<label class='container_rd'></label>"); 4 $("input:radio").not(".radio_ignored").after("<span class='checkmark_rd'></span>"); 5 6 //pimpage checkbox 7 $("input:checkbox").not(".checkbox_ignored").wrap("<label class='container_chkbox'></label>"); 8 $("input:checkbox").not(".checkbox_ignored").after( "<span class='checkmark'></span>" ); 9 */ 10 11 //validate required checkbox 12 if ($(".required_checkbox")[0]) { 13 $(".required_checkbox_submit").click(function () { 14 checked = $("input.required_checkbox:checkbox:checked").length; 15 16 if (!checked) { 17 alert("Case à cocher obligatoire."); 18 return false; 19 } 20 }); 21 } 22 23 /*-------------TABLE RESPONSIVE ---------*/ 24 // Setup responsive table 25 var header = Array(); 26 //first get the data from the headings 27 $(".responsive_style_table thead th").each(function (i, v) { 28 header[i] = $(this).text(); 29 }); 30 //now loop through table rows and apply headings to the td in each row 31 $(".responsive_style_table tbody tr").each(function (i, v) { 32 var myRow = $(this); 33 34 myRow.find("td").each(function (j) { 35 $(this).attr("data-thead", header[j]); 36 }); 37 }); 38 39 //----------------------------------------------------------------------------------------------- 40 41 //Augmenter/diminuer la taille du texte accueil 42 var fontsize = 100; 43 44 $("#TextTransform #BigText").click(function () { 45 fontsize = fontsize + 15; 46 47 $(".container_content").css("font-size", fontsize + "%", "!important"); 48 $(".container_content p").css("font-size", fontsize + "%", "!important"); 49 $(".container_content a").css("font-size", fontsize + "%", "!important"); 50 $(".container_content h1").css("font-size", fontsize + "%", "!important"); 51 $(".container_content h2").css("font-size", fontsize + "%", "!important"); 52 $(".container_content h3").css("font-size", fontsize + "%", "!important"); 53 $(".container_content h4").css("font-size", fontsize + "%", "!important"); 54 $(".container_content h5").css("font-size", fontsize + "%", "!important"); 55 $(".container_content h6").css("font-size", fontsize + "%", "!important"); 56 57 $("#accueil").css("font-size", fontsize + "%", "!important"); 58 $("#accueil p").css("font-size", fontsize + "%", "!important"); 59 $("#accueil a").css("font-size", fontsize + "%", "!important"); 60 $("#accueil h1").css("font-size", fontsize + "%", "!important"); 61 $("#accueil h2").css("font-size", fontsize + "%", "!important"); 62 $("#accueil h3").css("font-size", fontsize + "%", "!important"); 63 $("#accueil h4").css("font-size", fontsize + "%", "!important"); 64 $("#accueil h5").css("font-size", fontsize + "%", "!important"); 65 $("#accueil h6").css("font-size", fontsize + "%", "!important"); 66 }); 67 68 $("#TextTransform #SmallText").click(function () { 69 fontsize = fontsize - 15; 70 $(".container_content").css("font-size", fontsize + "%", "!important"); 71 $(".container_content p").css("font-size", fontsize + "%", "!important"); 72 $(".container_content a").css("font-size", fontsize + "%", "!important"); 73 $(".container_content h1").css("font-size", fontsize + "%", "!important"); 74 $(".container_content h2").css("font-size", fontsize + "%", "!important"); 75 $(".container_content h3").css("font-size", fontsize + "%", "!important"); 76 $(".container_content h4").css("font-size", fontsize + "%", "!important"); 77 $(".container_content h5").css("font-size", fontsize + "%", "!important"); 78 $(".container_content h6").css("font-size", fontsize + "%", "!important"); 79 80 $("#accueil").css("font-size", fontsize + "%", "!important"); 81 $("#accueil p").css("font-size", fontsize + "%", "!important"); 82 $("#accueil a").css("font-size", fontsize + "%", "!important"); 83 $("#accueil h1").css("font-size", fontsize + "%", "!important"); 84 $("#accueil h2").css("font-size", fontsize + "%", "!important"); 85 $("#accueil h3").css("font-size", fontsize + "%", "!important"); 86 $("#accueil h4").css("font-size", fontsize + "%", "!important"); 87 $("#accueil h5").css("font-size", fontsize + "%", "!important"); 88 $("#accueil h6").css("font-size", fontsize + "%", "!important"); 89 }); 90 91 if (typeof $.fn.prettyPhoto === "function" ) { 92 $("a[rel^='prettyPhoto']").prettyPhoto({ 93 animationSpeed: 'normal', 94 opacity: 0.80, 95 deeplinking: false, 96 allow_resize: true, /* Resize the photos bigger than viewport. true/false */ 97 default_width: 500, 98 default_height: 344, 99 showTitle: true, 100 social_tools: '' 101 }); 102 } 103 $(".photo_product_slider").owlCarousel({ 104 autoPlay: 5000, 105 stopOnHover: true, 106 navigation: false, 107 pagination: true, 108 paginationSpeed: 1000, 109 goToFirstSpeed: 2000,
110 singleItem: true, 111 autoHeight: true, 112 transitionStyle: "fade", 113 navigationText: ["", ""], 114 }); 115 116 $("ul.dropdown-menu [data-toggle=dropdown]").on("click", function (event) { 117 event.preventDefault(); 118 event.stopPropagation(); 119 $(this).parent().siblings().removeClass("open"); 120 $(this).parent().toggleClass("open"); 121 }); 122 $("#mobile_spc_menu_btn").click(function (e) { 123 $(this).toggleClass("Active"); 124 $("#menu_spc").slideToggle("fast"); 125 e.preventDefault(); 126 }); 127 128 /* ================ Show Login box. ================ */ 129 $(".login-btn").prepend('<b class="tri hidden"></b>'); 130 $(".login-btn").click(function (e) { 131 e.preventDefault(); 132 /*VG-066092-0*/ 133 $(window).scrollTop(0); 134 $(this).toggleClass("active_hd"); 135 $(".login-box").slideToggle(); 136 $(".login-btn").find(".tri").toggleClass("visible"); 137 $(".close-login").click(function (e) { 138 e.preventDefault(); 139 $(".login-btn").toggleClass("active_hd"); 140 $(".login-box").slideUp(); 141 $(".login-btn").find(".tri").removeClass("visible"); 142 }); 143 }); 144 145 /* ================ Back to top button. ================ */ 146 var winScroll = $(window).scrollTop(); 147 if (winScroll > 1) { 148 $("#to-top").css({ bottom: "10px" }); 149 } else { 150 $("#to-top").css({ bottom: "-100px" }); 151 } 152 $(window).on("scroll", function () { 153 winScroll = $(window).scrollTop(); 154 155 // PARALLAX background Animation. 156 var y = parseInt($(".parallax").css("background-position-y")); 157 var newY = -(winScroll * 0.05) + "px"; 158 $(".parallax").css("background-position-y", newY); 159 160 // Show Hide back to top button. 161 if (winScroll > 1) { 162 $("#to-top").css({ opacity: 1, bottom: "10px" }); 163 } else { 164 $("#to-top").css({ opacity: 0, bottom: "-100px" }); 165 } 166 }); 167 168 $("#to-top").click(function () { 169 $("html, body").animate({ scrollTop: "0px" }, 800); 170 return false; 171 }); 172 173 /* ================ Show Hide Search box. ================ */ 174 /* 175 $('.top-search a').click(function(){ 176 if($(this).parent().find('.search-box').is(':visible')){ 177 $('.search-box').fadeOut(300); 178 $(this).parent().removeClass('selected'); 179 return false; 180 }else{ 181 $('.search-box').fadeIn(300); 182 $(this).parent().addClass('selected'); 183 return false; 184 } 185 }); 186 $(document).mouseup(function(e){ 187 if($('.search-box').is(':visible')){ 188 var targ = $(".search-box"); 189 if (!targ.is(e.target) && targ.has(e.target).length === 0){ 190 $('.search-box').fadeOut(300); 191 $('.top-search').removeClass('selected'); 192 } 193 } 194 }); 195 */ 196 197 /*$( function() { 198 $( ".accordion" ).accordion({ 199 heightStyle: "content", 200 collapsible: true, 201 active: false 202 }); 203 } );*/ 204 205 /* ================ Album Photos ================ */ 206 $(".filter-button").click(function () { 207 var value = $(this).attr("data-filter"); 208 209 if (value == "all") { 210 //$('.filter').removeClass('hidden'); 211 $(".filter").show("1000"); 212 } else { 213 // $('.filter[filter-item="'+value+'"]').removeClass('hidden'); 214 // $(".filter").not('.filter[filter-item="'+value+'"]').addClass('hidden'); 215 $(".filter") 216 .not("." + value) 217 .hide("3000"); 218 $(".filter") 219 .filter("." + value) 220 .show("3000"); 221 } 222 }); 223 224 if ($(".filter-button").removeClass("active")) { 225 $(this).removeClass("active"); 226 } 227 $(this).addClass("active"); 228 229 //video embed full width 230 $(".video_full_width").each(function () { 231 $(this).removeAttr("style"); 232 $(this).wrap("<div class='fullwidth_video_container'></div>"); 233 }); 234 235 $(".lara_log_taxo").click(function () { 236 var id = $(this).attr("data_interet"); 237 $.ajax({ 238 type: "POST", 239 url: "/gi2-modules/standard/formation/client/framework/ajax_interet.php", 240 data: { id: id }, 241 success: function (response) { 242 //alert(response); 243 }, 244 }); 245 }); 246 247 $(".formation_favoris").click(function () { 248 var id = $(this).attr("data-id"); 249 var item = $(this); 250 $.ajax({ 251 type: "POST", 252 url: "/gi2-modules/standard/formation/client/framework/ajax_favoris.php", 253 data: { id: id }, 254 success: function (response) { 255 if (response == 1) { 256 $(item).removeClass("far"); 257 $(item).addClass("fas"); // alert('1'); 258 } else { 259 $(item).removeClass("fas"); 260 $(item).addClass("far"); // alert('0'); 261 } 262 }, 263 }); 264 }); 265 266 $('a[data-target="#membershipDesc"]').click(function (e) { 267 console.log("module.js"); 268 $("#main_nav").css("z-index", "0"); 269 }); 270}); 271 272//--------------------------------------------------------------------------------------------------------------------------- 273function go_to_page3(page_num) { 274 var mode = ""; 275 if (document.getElementById("spc_mod") != null) { 276 mode = document.getElementById("spc_mod").value; 277 } 278 var show_per_page = parseInt($("#show_per_page").val(), 0); 279 start_from = page_num * show_per_page;
280 end_on = start_from + show_per_page; 281 if (mode == "table") { 282 $("#list_item") 283 .children("tbody") 284 .children(".oneItem_wrapper") 285 .css("display", "none") 286 .slice(start_from, end_on) 287 .css("display", "table-row"); 288 } else { 289 $("#list_item").children(".oneItem_wrapper").css("display", "none"); 290 $("#list_item") 291 .children(".oneItem_wrapper") 292 .slice(start_from, end_on) 293 .css("display", "block"); 294 $("#list_item") 295 .children(".oneItem_wrapper") 296 .slice(start_from, end_on) 297 .addClass("d-block"); 298 $("#list_item") 299 .children(".oneItem_wrapper") 300 .removeClass("d-block") 301 .slice(start_from, end_on) 302 .removeClass("d-none"); 303 } 304 $(".page[longdesc=" + page_num + "]") 305 .addClass("active") 306 .siblings(".active") 307 .removeClass("active"); 308 $("#current_page").val(page_num); 309 310 $("a.page").css("display", "none"); 311 $("a.page").removeClass("prev_nav"); 312 $("a.active").css("display", "inline-block"); 313 314 $("a.active").prev().css("display", "inline-block"); 315 $("a.active").prev().prev().css("display", "inline-block"); 316 317 $("a.active").next().css("display", "inline-block"); 318 $("a.active").next().next().css("display", "inline-block"); 319 320 $("a.prev").next().css("display", "inline-block"); 321 $("a.prev").next().next().css("display", "inline-block"); 322 323 $("a.next").prev().css("display", "inline-block"); 324 $("a.next").prev().prev().css("display", "inline-block"); 325 326 if (page_num >= 5) { 327 $("a.active").prev().prev().addClass("prev_nav"); 328 } 329 $("html,body").animate( 330 { 331 scrollTop: $("#main_wrapper_interne").offset().top, 332 }, 333 "fast" 334 ); 335} 336 337function previous3() { 338 new_page = parseInt($("#current_page").val(), 0) - 1; 339 //if there is an item before the current active link run the function 340 if ($(".active").prev(".page").length == true) { 341 go_to_page3(new_page); 342 } 343} 344 345function next3() { 346 new_page = parseInt($("#current_page").val(), 0) + 1; 347 //if there is an item after the current active link run the function 348 349 go_to_page3(new_page); 350} 351function go_to_page(page_num) { 352 var show_per_page = parseInt($("#show_per_page").val(), 0); 353 start_from = page_num * show_per_page; 354 end_on = start_from + show_per_page; 355 $("#wrapper_list_paginate") 356 .children() 357 .css("display", "none") 358 .slice(start_from, end_on) 359 .css("display", "block"); 360 $(".page[longdesc=" + page_num + "]") 361 .addClass("active") 362 .siblings(".active") 363 .removeClass("active"); 364 $("#current_page").val(page_num); 365} 366 367function previous() { 368 new_page = parseInt($("#current_page").val(), 0) - 1; 369 //if there is an item before the current active link run the function 370 if ($(".active").prev(".page").length == true) { 371 go_to_page(new_page); 372 } 373} 374 375function next() { 376 new_page = parseInt($("#current_page").val(), 0) + 1; 377 //if there is an item after the current active link run the function 378 if ($(".active").next(".page").length == true) { 379 go_to_page(new_page); 380 } 381} 382$(document).ready(function () { 383 if (document.getElementById("show_per_page")) 384 var c = document.getElementById("show_per_page").value; 385 386 function change_per_page(show_per_page) { 387 var mode = ""; 388 if (document.getElementById("spc_mod") != null) { 389 mode = document.getElementById("spc_mod").value; 390 } 391 var current_page = document.getElementById("current_page").value; 392 if (mode == "table") { 393 number_of_items = $("#list_item") 394 .children("tbody") 395 .children(".oneItem_wrapper").length; 396 } else { 397 var number_of_items = $("#list_item").children(".oneItem_wrapper").length; 398 } 399 400 var number_of_pages = Math.ceil(number_of_items / show_per_page); 401 402 $("#current_page").val(current_page); 403 $("#show_per_page").val(show_per_page); 404 405 var navigation_html = '<a class="prev" onclick="previous3()">Précédent</a>'; 406 var current_link = 0; 407 while (number_of_pages > current_link) { 408 navigation_html += 409 '<a class="page" onclick="go_to_page3(' + 410 current_link + 411 ')" longdesc="' + 412 current_link + 413 '">' + 414 (current_link + 1) + 415 "</a>"; 416 current_link++; 417 } 418 navigation_html += '<a class="next" onclick="next3()">Suivant</a>'; 419 420 $(".controls_pagination").html(navigation_html); 421 $(".controls_pagination .page:first").addClass("active"); 422 if (mode == "table") { 423 $("#list_item") 424 .children("tbody") 425 .children(".oneItem_wrapper") 426 .css("display", "table-row"); 427 $("#list_item") 428 .children("tbody") 429 .children(".oneItem_wrapper") 430 .slice(0, show_per_page) 431 .css("display", "block"); 432 } else { 433 $("#list_item").children().removeClass("d-block"); // d-flex 434 $("#list_item").children().addClass("d-none"); 435 436 $("#list_item").children().slice(0, show_per_page).removeClass("d-none"); 437 $("#list_item") 438 .children(".oneItem_wrapper") 439 .slice(0, show_per_page) 440 .addClass("d-block"); // d-flex 441 } 442 443 $("a.next").prev().css("display", "inline-block"); 444 $("a.next").prev().prev().css("display", "inline-block"); 445 } 446 447 $("#showPerPage").on("change", function () { 448 change_per_page(this.value); 449 }); 450}); 451 452function input_numeric_only(evt, allow_negatif) { 453 var theEvent = evt || window.event; 454 455 // Handle paste 456 if (theEvent.type === "paste") { 457 key = event.clipboardData.getData("text/plain"); 458 } else { 459 // Handle key press 460 var key = theEvent.keyCode || theEvent.which;
461 key = String.fromCharCode(key); 462 } 463 if (allow_negatif == "1") { 464 var regex = /[0-9]|\.|\-/; 465 } else { 466 var regex = /[0-9]|\./; 467 } 468 if (!regex.test(key)) { 469 theEvent.returnValue = false; 470 if (theEvent.preventDefault) theEvent.preventDefault(); 471 } 472} 473 474function changeBgNews(color, id) { 475 var element = document.getElementById(id); 476 element.style.background = "" + color + ""; 477} 478 479//modal img 480$(function () { 481 $(".image_fullsize").on("click", function () { 482 if ($(this).attr("src")) { 483 var src = $(this).attr("src"); 484 } else { 485 var src = $(this).find("img").attr("src"); 486 } 487 488 $(".imagepreview").attr("src", src); 489 var desc = $(this).attr("alt"); 490 if (!desc) { 491 desc = $(this).attr("title"); 492 } 493 $("#text_img_fullsize").html(desc); 494 $("#imagemodal").modal("show"); 495 }); 496}); 497 498function isValidDate(dateString) { 499 var regEx = /^\d{4}-\d{2}-\d{2}$/; 500 if (!dateString.match(regEx)) return false; // Invalid format 501 var d = new Date(dateString); 502 var dNum = d.getTime(); 503 if (!dNum && dNum !== 0) return false; // NaN value, Invalid date 504 return d.toISOString().slice(0, 10) === dateString; 505} 506 507function check_double_submit(id, form, txt) { 508 btn_sbm = document.getElementById(id); 509 btn_sbm.disabled = true; 510 btn_sbm.value = txt; 511 // btn_sbm.style.display ='none'; 512 return true; 513} 514 515function home_event_tab(evt, tabName) { 516 var i, tabcontent, tablinks; 517 518 // Get all elements with class="tabcontent" and hide them 519 tabcontent = document.getElementsByClassName("home_event_tabcontent"); 520 for (i = 0; i < tabcontent.length; i++) { 521 tabcontent[i].style.display = "none"; 522 } 523 524 // Get all elements with class="tablinks" and remove the class "active" 525 tablinks = document.getElementsByClassName("tablinks"); 526 for (i = 0; i < tablinks.length; i++) { 527 tablinks[i].className = tablinks[i].className.replace(" active", ""); 528 } 529 530 // Show the current tab, and add an "active" class to the button that opened the tab 531 document.getElementById(tabName).style.display = "block"; 532 evt.currentTarget.className += " active"; 533} 534 535function cart_login() { 536 $(".login-box").slideToggle(); 537 $("html, body").animate({ scrollTop: 0 }, "slow"); 538} 539 540function show_password(id_input_pass) { 541 var x = document.getElementById(id_input_pass); 542 if (x.type === "password") { 543 x.type = "text"; 544 } else { 545 x.type = "password"; 546 } 547} 548 549jQuery(function ($) { 550 //$("#date").mask("99/99/9999"); 551 $(".mask_phone_full").inputmask("999 999-9999 #9999"); 552 $(".mask_phone").inputmask("999 999-9999"); 553 $(".mask_postcode").inputmask("a9a 9a9"); 554 555 //$(".mask_courriel").mask("999-99-9999"); 556}); 557//---------------------------------------------------------------------------------------------------------------------------
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.