PageSourceSearch

https://www.ulaval.ca/themes/ulaval_templates/assets/ulaval/js/custom-select-search.js?tlgvw3

js ulaval.ca collected 2026-09-24 08:25:55 UTC 3,131 bytes, 1 lines download raw bytes

1!function(e,t,s){t.behaviors.customSelectSearch={attach:function(t,c){s("customSelectSearch",".native-select--has-search",t).forEach(function(t){const s=e(t).parent(".custom-select"),c=s.children(".custom-select-header"),o=s.children(".custom-select-content"),n=o.children(".custom-select-options"),a=n.children("li"),i=e("<div />",{class:"custom-select-search-box",html:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve"><path d="M29.811,31.546l-8.939-8.219c-2.193,1.746-4.965,2.801-7.981,2.801c-7.078,0-12.836-5.76-12.836-12.838  S5.812,0.454,12.89,0.454c7.079,0,12.837,5.758,12.837,12.836c0,2.925-0.994,5.617-2.646,7.778l8.867,8.151L29.811,31.546  L29.811,31.546z M12.89,3.611c-5.336,0-9.679,4.343-9.679,9.679c0,5.337,4.343,9.68,9.679,9.68c5.336,0,9.68-4.343,9.68-9.679  S18.227,3.611,12.89,3.611z"/></svg>'});i.prependTo(o);const l=e("<input />",{"aria-hidden":"true",class:"custom-select-search-input",placeholder:"Filtrer parmi les termes",type:"text"});l.appendTo(i);const r=e("<p />",{class:"custom-select-search-output hidden",html:"Aucune correspondance trouvée"});function u(t){t.stopPropagation(),e(".custom-select-search-input").val(""),e(".custom-select-options").removeClass("hidden"),e(".custom-select-options").children("li").removeClass("hidden"),e(".custom-select-search-output").addClass("hidden"),e(".custom-select-header").not(this).parent(".custom-select.active").each(function(){e(this).find(".custom-select-search-box .custom-select-search-input").attr("aria-hidden","true")}),e(this).siblings(".custom-select-content").find(".custom-select-search-box .custom-select-search-input").attr("aria-hidden",e(this).parent(".custom-select").hasClass("active")?"false":"true"),e(this).parent(".custom-select").hasClass("active")?l.trigger("focus"):c.trigger("focus")}function d(){o.hide(),e(".custom-select-search-input").val(""),e(".custom-select-search-input").attr("aria-hidden","true"),e(".custom-select-options").removeClass("hidden"),e(".custom-select-options").children("li").removeClass("hidden"),e(".custom-select-search-output").addClass("hidden")}r.appendTo(o),c.on("click",u),c.on("keydown",function(t){"Enter"===t.key||" "===t.key||"Spacebar"===t.key?(t.preventDefault(),u.call(this,t)):"Escape"!==t.key&&"Esc"!==t.key||e(this).parent(".custom-select").hasClass("active")&&u.call(this,t)}),l.on("click",function(e){e.stopPropagation()}),l.on("keyup",function(t){if(t.stopPropagation(),"Escape"===t.key||"Esc"===t.key)c.trigger("focus"),c.trigger("click");else{const t=e(this).val().toLowerCase().normalize("NFD").replace(/([\u0300-\u036f]|[^0-9a-zA-Z])/g,"");a.each(function(s,c){-1==e(c).text().toLowerCase().normalize("NFD").replace(/([\u0300-\u036f]|[^0-9a-zA-Z])/g,"").indexOf(t)?e(c).addClass("hidden"):e(c).removeClass("hidden")}),0==a.not(".hidden").length?(n.addClass("hidden"),r.removeClass("hidden")):(n.removeClass("hidden"),r.addClass("hidden"))}}),a.on("click",d),e(document).on("click",d)})}}}(jQuery,Drupal,once,window);

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.