PageSourceSearch

https://southamptonair.org.uk/Scripts/utils/ajaxLoader.js?v=3.229.10.17%20(77.107)

js southamptonair.org.uk collected 2026-10-07 17:53:38 UTC 3,574 bytes, 117 lines download raw bytes

1const AjaxLoader = new function AjaxLoader() {
2    const LOADER_WINDOW_ID = "ajaxLoaderWindow";
3    const LOADER_WINDOW_SELECTOR = "#" + LOADER_WINDOW_ID;
4    const LOADER_ELEMENT_ID = "kendoLoader";
5
6    let kendoWindow;
7
8    this.show = function () {
9        if (JsUtils.isEmpty(kendoWindow)) {
10            let loaderElement = createLoaderElement();
11            createLoaderWindowElement();
12
13            const kendoWindowConfig = {
14                modal: true,
15                visible: false,
16                resizable: false,
17                draggable: false,
18                title: false,
19                animation: false,
20                open: function () {
21                    loaderElement.kendoLoader({
22                        themeColor: "primary",
23                        size: "large",
24                        type: "converging-spinner"
25                    });
26                },
27                activate: function () {
28                    $(LOADER_WINDOW_SELECTOR).parent().css({
29                        "background": "transparent",
30                        "box-shadow": "none",
31                        "border": "none",
32                        "z-index": WindowManager.findHighestZIndex() + 1,
33
34                    });
35                }
36            };
37
38            kendoWindow = $(LOADER_WINDOW_SELECTOR).kendoWindow(kendoWindowConfig).data("kendoWindow");
39            $(window).on("resize", centerAjaxLoader);
40
41            kendoWindow.content(loaderElement);
42        }
43
44        kendoWindow.center().open();
45    };
46
47    this.hide = function () {
48        if (kendoWindow) {
49            kendoWindow.close();
50        }
51    };
52
53    function centerAjaxLoader() {
54        if (kendoWindow) {
55            kendoWindow.center();
56        }
57    }
58
59    function createLoaderWindowElement() {
60        if ($(LOADER_WINDOW_SELECTOR).length === 0) {
61            let loaderWindow = $("<div>").attr("id", LOADER_WINDOW_ID);
62            $("body").append(loaderWindow);
63        }
64    }
65
66    function createLoaderElement() {
67        return $("<div>").attr("id", LOADER_ELEMENT_ID);
68    }
69
70    this.addAjaxLoaderOnElement = function (element) {
71        let ajaxLoaderSrc = baseUrl + "Content/images/smallAjaxLoader.gif";
72        let ajaxLoader = $("<img>");
73
74        $(ajaxLoader).attr("src", ajaxLoaderSrc);
75        $(ajaxLoader).addClass("sectionAjaxLoader");
76        $(element).append(ajaxLoader);
77    }
78
79    this.destroyAjaxLoaderOnElement = function (element) {
80        $(element).find(".sectionAjaxLoader").remove();
81    }
82
83    JsUtils.deepFreeze(this);
84    JsUtils.defineGlobalConstant(this, "AjaxLoader");
85}
86
87
88function fileLoader() {
89    var k_fileLoaderId = "fileLoaderBox"
90    var k_fileLoaderSelector = "#" + k_fileLoaderId
91
92
93    this.show = function (parentElementVal) {
94        $(k_fileLoaderSelector).remove()
95        createImgLoaderElement(parentElementVal)
96        $(k_fileLoaderSelector).show();
97
98        function createImgLoaderElement(parentElementVal) {
99            if ($(k_fileLoaderSelector).length == 0) {
100                let fileLoaderBox = $("<div>")
101                fileLoaderBox.attr("id", k_fileLoaderId)
102
103                let loader = $("<div>")
104                loader.addClass('loader');
105
106                $(fileLoaderBox).append(loader)
107                parentElementVal.append(fileLoaderBox)
108            }
109        }
110    }
111
112    this.hide = function () {
113        $(k_fileLoaderSelector).hide();
114    }
115
116}
117var fileLoader = new fileLoader();

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.