PageSourceSearch

https://dmt.gov.ae/-/media/Extension-Themes/ex-core/scripts/Searchs/component-search-base-model.js

js dmt.gov.ae collected 2026-10-01 12:09:52 UTC 537 bytes, 21 lines download raw bytes

1XA.component.search.baseModel = (function ($, document) {
2    
3    return Backbone.Model.extend({
4		sortFacetArray: function(sortOrder, facetArray) {
5			switch (sortOrder) {
6				case 'SortByCount': {
7					facetArray.sort(function(a, b) { return a.Count < b.Count });
8					break;
9				}
10				case 'SortByNames':
11				default: {
12					//no need to sort by names as values are sorted that way by default
13					break;
14				}
15			}
16		}
17	});
18
19}(jQuery, document));
20
21XA.register('searchBaseModel', XA.component.search.baseModel);

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.