PageSourceSearch

https://www.reading.ac.uk/sc93/js/uor.module.clearing.common.min.js

js reading.ac.uk collected 2026-09-24 08:26:12 UTC 4,181 bytes, 1 lines download raw bytes

1var uorClearingCommon={};let clearingTypeAheadDebounceTimeout;(function(){$(document).ready(function(){uorClearingCommon.init()});this.init=function(){};this.clearSortandFilter=function(n){$(`${n} #sort-by-toggle`).prop("checked",!1);$(`${n} .sort-by .placeholder-text`).text("Sort by").attr("data-sort-selectedvalue","");this.clearAllFilter(n);typeof searchCallback=="function"&&searchCallback(null,"clearFilter")};this.clearAllFilter=function(n){$(`${n} input[type="checkbox"]`).prop("checked",!1);$(".filter-count-badge").text("");this.toggleClearAllFilters()};this.clearAllFiltersCommon=function(n,t){this.clearAllFilter(n);typeof t=="function"&&t(null,"clearFilter")};this.toggleClearAllFilters=function(){const n=$('.course-dropdown input[type="checkbox"]:checked').length>0;n?$(".clear-all-filters-wrapper").show():$(".clear-all-filters-wrapper").hide()};this.ajaxCall=function(n,t,i,r,u,f){var e=$("#"+i),o=$('input[name="__RequestVerificationToken"]',e).val();$.ajax({url:n,cache:!1,data:t,headers:{"Content-Type":"application/x-www-form-urlencoded",__RequestVerificationToken:o},method:r,success:function(n){u(n)},error:function(n,t,i){f(n,t,i)}})};this.updateFilterCounts=function(){var n,u;let t=0;const i=[{toggleId:"degree-type-toggle",groupKey:uorClearingCommon.FilterGroups.DEGREE_TYPES},{toggleId:"a-level-toggle",groupKey:uorClearingCommon.FilterGroups.ALEVEL_OFFERS},{toggleId:"btec-toggle",groupKey:uorClearingCommon.FilterGroups.BTEC_OFFERS},{toggleId:"ib-toggle",groupKey:uorClearingCommon.FilterGroups.IB_OFFERS},{toggleId:"additional-toggle",groupKey:uorClearingCommon.FilterGroups.ADDITIONAL}];for(n=0;n<i.length;n++){var e=i[n].toggleId,o=i[n].groupKey,r=uorClearingCommon.getGroupedCheckboxSelections(o).length;t+=r;u=document.querySelector('.filter-count-badge[data-toggle-id="'+e+'"]');u&&(u.textContent=r>0?"("+r+")":"")}const f=$("#global-filter-count");f.text("");t>0&&f.text("("+t+")")};this.createCourseSearchRequestModel=function(){return{CourseSection:"2025",SearchTerm:"",DegreeTypes:[],ALevelOffers:[],BtecOffers:[],IBOffers:[],ExcludeCourses:[],SearchBy:"",SortBy:"",PageNumber:1,PageSize:10,isAjax:!0,dataSourceId:"",eventType:"",AdditionalRequirement:[]}};this.getGroupedCheckboxSelections=function(n){var t=[];return $('#filters-panel input[type="checkbox"]:checked[data-name="'+n+'"][data-value]').each(function(){var n=$(this).data("value");t.push(encodeURIComponent(n))}),t};this.bindTypeAhead=function(){autocomplete!=null&&($("#gridSearch").typeahead("destroy"),autocomplete=null);var t=new Bloodhound({datumTokenizer:function(n){return n.toLowerCase().split(/[\s(),]+/)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:"/api/v1/earlyclearing/Suggestions",cache:!1,prepare:function(n,t){return t.type="POST",t.contentType="application/json",t.data=JSON.stringify({searchTerm:n,courseSection:decodeURIComponent($("[data-course-section]").attr("data-course-section")),searchType:decodeURIComponent($("[data-component]").attr("data-component")),_t:Date.now()}),t},transport:function(n,t,i){clearTimeout(clearingTypeAheadDebounceTimeout);clearingTypeAheadDebounceTimeout=setTimeout(function(){$.ajax(n).done(t).fail(i)},500)},transform:function(n){return n&&n.success&&Array.isArray(n.data)?n.data:[]}}}),n=$("[data-suggestion-count]").attr("data-suggestion-count");n&&n!=="undefined"||(n="5");$("#gridSearch").typeahead({hint:!1,highlight:!1,minLength:1},{name:"courses",display:function(n){return n},limit:parseInt(n),source:t,templates:{suggestion:function(n){return"<div>"+n+"<\/div>"}}});autocomplete=!0};this.FilterGroups={DEGREE_TYPES:"degree-type-items",ALEVEL_OFFERS:"a-level-items",BTEC_OFFERS:"btec-items",IB_OFFERS:"ib-items",ADD
1ITIONAL:"additional-items"};this.isControlDisabled=function(n,t){return $(t).hasClass("active")||$(t).hasClass("disabled")?(n.preventDefault(),!0):!1};this.isPageNumberDisabled=function(n,t){var i=$(".course-listing").attr("data-current-page"),r=$(t).text();return i==r?!0:!1};this.scrollToTop=function(){var t=$("[data-scroll-top]").attr("data-scroll-top"),n;t=="True"&&(n=$("#skipnav"),$("html, body").animate({scrollTop:n.offset().top-100},500,"swing"))}}).apply(uorClearingCommon);

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.