PageSourceSearch

https://www.norquest.ca/Scripts/NorquestCollege/_ViewComponents/programcoursesearch.min.js?v=20261001063704

js norquest.ca collected 2026-10-01 12:37:28 UTC 16,291 bytes, 1 lines download raw bytes

1var ppnum=1,cpnum=1,pagingGroupSize=5;function sanitizeParam(e){return"string"!=typeof e?"":e.replace(/[^\w\s\-.,]/gi,"").trim()}function SetupProgramSearch(e,t){var a;return $(e).length&&(Vue.component("search-result-item",{template:"#search_result_item",props:{item:Object}}),a=new Vue({el:e,data:{results:[],isChangingPage:!1,isLoading:!1,isLastPage:!1,totalnumresults:Number,totalpages:Number,pgnum:Number,totalpagegroups:Number,programsearchactionurl:String},methods:{getParams(){var e=sanitizeParam(getParameterByName("cat")),t=getParameterByName("pcat"),a=getParameterByName("pdel"),o=getParameterByName("pout"),r=getParameterByName("ploc"),s=getParameterByName("pk"),n=getParameterByName("stu"),i=getParameterByName("os"),c=getParameterByName("oa"),l=getParameterByName("ztc");let p={pagenum:this.pgnum,CAT:sanitizeParam(e),PCAT:sanitizeParam(t),PDEL:sanitizeParam(a),POUT:sanitizeParam(o),PLOC:sanitizeParam(r),PK:sanitizeParam(s),STU:sanitizeParam(n),OS:sanitizeParam(i),OA:sanitizeParam(c),ZTC:sanitizeParam(l)};return p},resetFilters(){ResetProgramFilters(),this.doSearch(!1,!0,!1)},isInCurrentPageGroup(e){var t=1*e/pagingGroupSize;t=Math.ceil(t);var a=1*this.pgnum/pagingGroupSize;return t==(a=Math.ceil(a))},incrementPageGroup(){var e=0,t=1*this.pgnum/pagingGroupSize;t=Math.ceil(t),++t<this.totalpagegroups?e=t*pagingGroupSize-(pagingGroupSize-1):t>=this.totalpagegroups&&(e=this.totalpages),ppnum=e,this.pgnum=e,this.doSearch(!0,!0,!0)},decrementPageGroup(){var e=0,t=1*this.pgnum/pagingGroupSize;t=Math.ceil(t),--t<2?e=1:t<this.totalpagegroups&&(e=t*pagingGroupSize-(pagingGroupSize-1)),ppnum=e,this.pgnum=e,this.doSearch(!0,!0,!0)},changePage(e){ppnum=e,this.pgnum=e,this.doSearch(!0,!0,!0)},doSearch(e,t,a){t&&$("html, body").animate({scrollTop:$("#programcoursesearchcrolltoelem").offset().top-90},100),e||(ppnum=1,this.pgnum=ppnum),a&&BuildSearchURLQueryString(),this.isChangingPage=e,this.isLoading=!0;let o=this.getParams(),r=this.programsearchactionurl;axios.get(r,{params:o}).then(e=>{void 0===e.data.Results?this.results=[]:this.results=e.data.Results,this.totalpages=e.data.TotalPages,ppnum=e.data.CurrentPageNum,this.pgnum=ppnum,this.totalnumresults=e.data.TotalResults,this.isLastPage=this.pgnum==this.totalpages;var t=1,a=1*this.totalpages/pagingGroupSize;this.totalpages>pagingGroupSize&&(t=Math.ceil(a)),this.totalpagegroups=t,$("#litProgramCount").html("&nbsp;("+this.totalnumresults+")")}).catch(e=>Promise.reject(e)).finally(()=>{this.isLoading=!1})}},mounted(){PrePopulateProgramFiltersByQS(),$(".js-catP-multiple").select2({placeholder:"Area of study",theme:"norQuest"}),$(".js-delP-multiple").select2({placeholder:"Delivery method",theme:"norQuest"}),$(".js-outP-multiple").select2({placeholder:"Credential",theme:"norQuest"})},created(){var e=getParameterByName("pp"),a=RegExp("^\\d+$").test(e);ppnum=a?e:1,this.pgnum=ppnum,this.totalpagegroups=1,this.programsearchactionurl=t,this.doSearch(a,!1,!1)}})),a}function PrePopulateProgramFiltersByQS(){var e=getParameterByName("pcat"),t=getParameterByName("pdel"),a=getParameterByName("pout"),o=getParameterByName("ploc"),r=getParameterByName("pk"),s=getParameterByName("stu"),n=getParameterByName("os"),i=getParameterByName("oa"),c=getParameterByName("ztc");$("#keyword_programs").val(r),o&&(o.includes("Edmonton")&&$("#location_programs_Edmonton").prop("checked",!0),o.includes("Wetaskiwin")&&$("#location_programs_Wetaskiwin").prop("checked",!0),o.includes("Online")&&$("#location_programs_Online").prop("checked",!0)),t&&t.split(",").forEach(function(e){$('#del_programs option[value="'+e+'"]').prop("selected",!0)}),e&&e.split(",").forEach(function(e){$('#cat_programs option[value="'+e+'"]').prop("selected",!0)}),a&&a.split(",").forEach(function(e){$('#outcome_programs option[value="'+e+'"]').prop("selected",!0)}),"I"==s&&$("#international").prop("checked",!0),"Y"==n&&$("#openStudies").prop("checked",!0),"Y"==i&&$("openAdmissions").prop("checked",!0),"Y"==c&&$("zerotextbookcost").prop("checked",!0)}function ResetProgramFilters(){$("#keyword_programs").val(""),$("#location_programs_Edmonton").prop("checked",!1),$("#location_programs_Wetaskiwin").prop("checked",!1),$("#location_programs_Online").prop("checked",!1),$("#del_programs").val(""),$("#select2-del_programs-container").html(""),$("textarea",$("#select2-del_programs-container").closest(".select2-container")).attr("placeholder","Delivery method").css("width","100%"),$("#cat_programs").val(""),$("#select2-cat_programs-container").html(""),$("textarea",$("#select2-cat_programs-container").closest(".select2-container")).attr("placeholder","Area of study").css("width","100%"),$("#outcome_programs").val(""),$("#select2-outcome_programs-container").html(""),$("textarea",$("#select2-outcome_programs-container").closest(".select2-container")).attr("placeholder","Credential").css("width","100%"),$("#international").prop("checked",!1),$("#openStudies").prop("checked",!1),$("openAdmissions").prop("checked",!1),$("zerotextbookcost").prop("checked",!1),ppnum=1,BuildSearchURLQueryString()}function SetupCourseSearch(e,t){var a;return $(e).length&&(Vue.component("search-result-item",{template:"#search_result_item",props:{item:Object}}),a=new Vue({el:e,data:{results:[],isChangingPage:!1,isLoading:!1,isLastPage:!1,totalnumresults:Number,totalpages:Number,pgnum:Number,totalpagegroups:Number,coursesearchactionurl:String},methods:{getParams(){var e=getParameterByName("ccat"),t=getParameterByName("cdel"),a=getParameterByName("cout"),o=getParameterByName("cloc"),r=getParameterByName("ck");let s={pagenum:cpnum,CCAT:e,CDEL:t,COUT:a,CLOC:o,CK:r};return s},resetFilters(){ResetCourseFilters(),this.doSearch(!1,!0,!1)},isInCurrentPageGroup(e){var t=1*e/pagingGroupSize;t=Math.ceil(t);var a=1*this.pgnum/pagingGroupSize;return t==(a=Math.ceil(a))},incrementPageGroup(){var e=0,t=1*this.pgnum/pagingGroupSize;t=Math.ceil(t),++t<this.totalpagegroups?e=t*pagingGroupSize-(pagingGroupSize-1):t>=this.totalpagegroups&&(e=this.totalpages),cpnum=e,this.pgnum=e,this.doSearch(!0,!0,!0)},decrementPageGroup(){var e=0,t=1*this.pgnum/pagingGroupSize;t=Math.ceil(t),--t<2?e=1:t<this.totalpagegroups&&(e=t*pagingGroupSize-(pagingGroupSize-1)),cpnum=e,this.pgnum=e,this.doSearch(!0,!0,!0)},changePage(e){cpnum=e,this.pgnum=cpnum,this.doSearch(!0,!0,!0)},doSearch(e,t,a){t&&$("html, body").animate({scrollTop:$("#programcoursesearchcrolltoelem").offset().top-90},100),e||(cpnum=1,this.pgnum=cpnum),a&&BuildSearchURLQueryString(),this.isChangingPage=e,this.isLoading=!0;let o=this.getParams(),r=this.coursesearchactionurl;axios.get(r,{params:o}).then(e=>{void 0===e.data.Results?this.results=[]:this.results=e.data.Results,this.totalpages=e.data.TotalPages,cpnum=e.data.CurrentPageNum,this.pgnum=cpnum,this.totalnumresults=e.data.TotalResults,this.isLastPage=this.pgnum==this.totalpages;var t=1,a=1*this.totalpages/pagingGroupSize;this.totalpages>pagingGroupSize&&(t=Math.ceil(a)),this.totalpagegroups=t,$("#litCourseCount").html("&nbsp;("+this.totalnumresults+")")}
1).catch(e=>Promise.reject(e)).finally(()=>{this.isLoading=!1})}},mounted(){PrePopulateCourseFiltersByQS(),$(".js-catC-multiple").select2({placeholder:"Area of study",theme:"norQuest"}),$(".js-delC-multiple").select2({placeholder:"Delivery method",theme:"norQuest"}),$(".js-outC-multiple").select2({placeholder:"Credential",theme:"norQuest"})},created(){var e=getParameterByName("cp"),a=RegExp("^\\d+$").test(e);cpnum=a?e:1,this.pgnum=cpnum,this.totalpagegroups=1,this.coursesearchactionurl=t,this.doSearch(a,!1,!1)}})),a}function PrePopulateCourseFiltersByQS(){var e=getParameterByName("ccat"),t=getParameterByName("cdel"),a=getParameterByName("cout"),o=getParameterByName("cloc"),r=getParameterByName("ck");$("#keyword_courses").val(r),o&&(o.includes("Edmonton")&&$("#location_courses_Edmonton").prop("checked",!0),o.includes("Wetaskiwin")&&$("#location_courses_Wetaskiwin").prop("checked",!0),o.includes("Online")&&$("#location_courses_Online").prop("checked",!0)),t&&t.split(",").forEach(function(e){$('#del_courses option[value="'+e+'"]').prop("selected",!0)}),e&&e.split(",").forEach(function(e){$('#cat_courses option[value="'+e+'"]').prop("selected",!0)}),a&&a.split(",").forEach(function(e){$('#outcome_courses option[value="'+e+'"]').prop("selected",!0)})}function ResetCourseFilters(){$("#keyword_courses").val(""),$("#location_courses_Edmonton").prop("checked",!1),$("#location_courses_Wetaskiwin").prop("checked",!1),$("#location_courses_Online").prop("checked",!1),$("#del_courses").val(""),$("#select2-del_courses-container").html(""),$("textarea",$("#select2-del_courses-container").closest(".select2-container")).attr("placeholder","Delivery method").css("width","100%"),$("#cat_courses").val(""),$("#select2-cat_courses-container").html(""),$("textarea",$("#select2-cat_courses-container").closest(".select2-container")).attr("placeholder","Area of study").css("width","100%"),$("#outcome_courses").val(""),$("#select2-outcome_courses-container").html(""),$("textarea",$("#select2-outcome_courses-container").closest(".select2-container")).attr("placeholder","Credential").css("width","100%"),cpnum=1,BuildSearchURLQueryString()}function BuildSearchURLQueryString(){var e=window.location.protocol+"//"+window.location.host+window.location.pathname,t=$("#keyword_programs").val(),a=$("#del_programs").val(),o=$("#cat_programs").val(),r="";$("#location_programs_Edmonton").is(":checked")&&(r+="Edmonton,"),$("#location_programs_Wetaskiwin").is(":checked")&&(r+="Wetaskiwin,"),$("#location_programs_Online").is(":checked")&&(r+="Online"),","==r.substr(r.length-1)&&(r=r.slice(0,-1));var s=$("#outcome_programs").val(),n="O";$("#international").is(":checked")&&(n="I");var i="N";$("#openStudies").is(":checked")&&(i="Y");var c="N";$("#openAdmissions").is(":checked")&&(c="Y");var l="N";$("#zerotextbookcost").is(":checked")&&(l="Y"),e+="?pcat="+o+"&pdel="+a+"&pout="+s+"&ploc="+r+"&pk="+t+"&stu="+n+"&os="+i+"&oa="+c+"&ztc="+l+"&pp="+ppnum;var p=$("#keyword_courses").val(),u=$("#del_courses").val(),m=$("#cat_courses").val(),g="";$("#location_courses_Edmonton").is(":checked")&&(g+="Edmonton,"),$("#location_courses_Wetaskiwin").is(":checked")&&(g+="Wetaskiwin,"),$("#location_courses_Online").is(":checked")&&(g+="Online"),","==g.substr(g.length-1)&&(g=g.slice(0,-1));var d=$("#outcome_courses").val();
1e+="&ccat="+m+"&cdel="+u+"&cout="+d+"&cloc="+g+"&ck="+p+"&cp="+cpnum,window.history.pushState({path:e},"",e)}function getParameterByName(e,t=window.location.href){var a=RegExp("[?&]"+(e=e.replace(/[\[\]]/g,"\\$&"))+"(=([^&#]*)|&|#|$)").exec(t);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}var keyword_programs=getParameterByName("pk");document.getElementById("keyword_programs").value=keyword_programs;var keyword_courses=getParameterByName("ck");document.getElementById("keyword_courses").value=keyword_courses;var location_programs=getParameterByName("ploc");location_programs&&(location_programs.includes("Edmonton")&&(document.getElementById("location_programs_Edmonton").checked=!0),location_programs.includes("Wetaskiwin")&&(document.getElementById("location_programs_Wetaskiwin").checked=!0),location_programs.includes("Online")&&(document.getElementById("location_programs_Online").checked=!0));var location_courses=getParameterByName("cloc");location_courses&&(location_courses.includes("Edmonton")&&(document.getElementById("location_courses_Edmonton").checked=!0),location_courses.includes("Wetaskiwin")&&(document.getElementById("location_courses_Wetaskiwin").checked=!0),location_courses.includes("Online")&&(document.getElementById("location_courses_Online").checked=!0));var student=getParameterByName("stu");"I"==student&&(document.getElementById("international").checked=!0);var openStudies=getParameterByName("os");"Y"==openStudies&&(document.getElementById("openStudies").checked=!0);var openAdmissions=getParameterByName("oa");"Y"==openAdmissions&&(document.getElementById("openAdmissions").checked=!0);var zerotextboxcost=getParameterByName("ztc");"Y"==zerotextboxcost&&(document.getElementById("zerotextbookcost").checked=!0),$("#international").change(function(){ddlFunction()}),$("#openStudies").change(function(){ddlFunction()}),$("#openAdmissions").change(function(){ddlFunction()}),$("#zerotextbookcost").change(function(){ddlFunction()}),$(document).ready(function(){});var input=document.getElementById("keyword_programs");input.addEventListener("keydown",function(e){"Enter"===e.key&&(e.preventDefault(),ddlFunction())});var input=document.getElementById("keyword_courses");
1function ddlFunction(){var e=$("#p_lt_zoneContainer_pageplaceholder_p_lt_zone_main_contents_main_contents_ucEditableText_widget1_ctl00_cat_programs").val(),t=$("#p_lt_zoneContainer_pageplaceholder_p_lt_zone_main_contents_main_contents_ucEditableText_widget1_ctl00_cat_courses").val(),a=$("#p_lt_zoneContainer_pageplaceholder_p_lt_zone_main_contents_main_contents_ucEditableText_widget1_ctl00_del_programs").val(),o=$("#p_lt_zoneContainer_pageplaceholder_p_lt_zone_main_contents_main_contents_ucEditableText_widget1_ctl00_del_courses").val(),r="";$("#location_programs_Edmonton").is(":checked")&&(r+="Edmonton,"),$("#location_programs_Wetaskiwin").is(":checked")&&(r+="Wetaskiwin,"),$("#location_programs_Online").is(":checked")&&(r+="Online"),","==r.substr(r.length-1)&&(r=r.slice(0,-1));var s="";$("#location_courses_Edmonton").is(":checked")&&(s+="Edmonton,"),$("#location_courses_Wetaskiwin").is(":checked")&&(s+="Wetaskiwin,"),$("#location_courses_Online").is(":checked")&&(s+="Online"),","==s.substr(s.length-1)&&(s=s.slice(0,-1));var n=$("#p_lt_zoneContainer_pageplaceholder_p_lt_zone_main_contents_main_contents_ucEditableText_widget1_ctl00_outcome_programs").val(),i=$("#p_lt_zoneContainer_pageplaceholder_p_lt_zone_main_contents_main_contents_ucEditableText_widget1_ctl00_outcome_courses").val(),c="O";$("#international").is(":checked")&&(c="I");var l="N";$("#openStudies").is(":checked")&&(l="Y");var p="N";$("#openAdmissions").is(":checked")&&(p="Y"),$("#zerotextbookcost").is(":checked")&&(strZeroTextbookCost="Y");var u=document.getElementById("keyword_programs").value,m=document.getElementById("keyword_courses").value;strEnd="",url=window.location.href,console.log(url),url.includes("#courses")&&(strEnd="#courses",url=url.replace("#courses","")),url.includes("#programs")&&(url=url.replace("#programs","")),url.includes("?")&&(url=url.substring(0,url.indexOf("?"))),window.location.href=url+"?pcat="+e+"&ccat="+t+"&pdel="+a+"&cdel="+o+"&pout="+n+"&cout="+i+"&stu="+c+"&os="+l+"&oa="+p+"&ztc=N&ploc="+r+"&cloc="+s+"&pk="+u+"&ck="+m+strEnd}function reset(){url=(url=window.location.href).substring(0,url.indexOf("?")),window.location.href=url}function expandFiltersP(){for(var e=document.getElementsByClassName("expandFilterP"),t=0;t<e.length;t++)e[t].style.display="none";document.getElementById("aside_programs").style.display="revert";for(var e=document.getElementsByClassName("moveToSide-Programs"),t=0;t<e.length;t++)e[t].style.display="revert"}function hideFiltersP(){for(var e=document.getElementsByClassName("expandFilterP"),t=0;t<e.length;t++)e[t].style.display="block";document.getElementById("aside_programs").style.display="none";for(var e=document.getElementsByClassName("moveToSide-Programs"),t=0;t<e.length;t++)e[t].style.display="none"}function expandFiltersC(){for(var e=document.getElementsByClassName("expandFilterC"),t=0;t<e.length;t++)e[t].style.display="none";document.getElementById("aside_courses").style.display="revert";for(var e=document.getElementsByClassName("moveToSide-Courses"),t=0;t<e.length;t++)e[t].style.display="revert"}function hideFiltersC(){for(var e=document.getElementsByClassName("expandFilterC"),t=0;t<e.length;t++)e[t].style.display="block";document.getElementById("aside_courses").style.display="none";for(var e=document.getElementsByClassName("moveToSide-Courses"),t=0;t<e.length;t++)e[t].style.display="none"}function getParameterByName(e,t=window.location.href){var a=RegExp("[?&]"+(e=e.replace(/[\[\]]/g,"\\$&"))+"(=([^&#]*)|&|#|$)").exec(t);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function swapToConEd(){window.location.href="/continuing-education.aspx"}input.addEventListener("keydown",function(e){"Enter"===e.key&&(e.preventDefault(),ddlFunction())});

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.