PageSourceSearch

https://www.leibniz-liv.de/typo3temp/assets/compressed/facet_numer…df3b1961afef2b617f8c0a76851d8.js?1790883232

js leibniz-liv.de collected 2026-10-03 23:13:34 UTC 2,424 bytes, 70 lines download raw bytes

1/**
2 * The Controller. Controller responds to user actions and
3 * invokes changes on the model.
4 */
5function NumericRangeFacetController() {
6    var _this = this;
7
8    this.init = function () {
9        jQuery(".facet-type-numericRange-data").each(function () {
10            var facetName = jQuery(this).data("facet-name");
11            var rangeMin = jQuery(this).data("range-min");
12            var rangeMax = jQuery(this).data("range-max");
13            var rangeMinSelected = jQuery(this).data("range-min-selected");
14            var rangeMaxSelected = jQuery(this).data("range-max-selected");
15            var urlTemplate = jQuery(this).data("facet-url");
16
17            if (rangeMinSelected === 0 && rangeMaxSelected === 0) {
18                rangeMinSelected = rangeMin;
19                rangeMaxSelected = rangeMax;
20            }
21
22            var rangeGap = jQuery(this).data("range-gap");
23
24            jQuery(this).slider({
25                range: true,
26                values: [ rangeMinSelected, rangeMaxSelected],
27                min: rangeMin,
28                max: rangeMax,
29                step: rangeGap,
30                slide: function (event, ui) {
31                    min = ui.values[0];
32                    max = ui.values[1];
33                    if (isNaN(min)) { min = 0; }
34                    if (isNaN(max)) { max = 0; }
35
36                    jQuery("#facet-" + facetName + "-value").html(min.toString() + "-" + max.toString());
37                },
38                stop: function (event, ui) {
39                    min = ui.values[0];
40                    max = ui.values[1];
41                    if (isNaN(min)) { min = 0; }
42                    if (isNaN(max)) { max = 0; }
43
44                    url = urlTemplate.replace('___FROM___', min.toString());
45                    url = url.replace('___TO___', max.toString());
46                    _this.load(url);
47                }
48            });
49        });
50    };
51
52    var timers = {};
53
54    this.load = function (url) {
55        clearTimeout(timers[url]);
56        loadResult = function (url) {
57            window.location.href = url;
58        };
59        timers[url] = setTimeout(loadResult(url), 1500);
60    };
61}
62
63jQuery(document).ready(function () {
64    var numericRangeFacetController = new NumericRangeFacetController();
65    numericRangeFacetController.init();
66
67    jQuery("body").on("tx_solr_updated", function() {
68        numericRangeFacetController.init();
69    });
70});

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.