PageSourceSearch

https://shirdisai.org.uk/Cnt/Jq/ShirdiSai/ViewDetails.js?v=1.0.0.4796

js shirdisai.org.uk collected 2026-10-02 14:29:06 UTC 4,591 bytes, 136 lines download raw bytes

1if (typeof (window.ShirdiSai) == "undefined") {
2    window.ShirdiSai = {};
3}
4
5ShirdiSai.ViewDetails = (function () {
6
7    var init = function () {
8        setInitEvents();
9        //loadMyFoldersTree();
10        setCookieEvts();
11    }
12
13    var loadMyFoldersTree = function () {
14        var params = JSON.stringify({});
15        AjaxLib.Async('/Api/CommonSrvc.asmx', "GetFoldersTree", params, function (jsonData) {
16            if (jsonData.Ok == true) {
17                displayFolderTree(jsonData.Res);
18            }
19            else {
20                Tly.Helper.ShowErr(jsonData.Err.ErrMsg);
21            }
22        });
23    }
24
25    var folderIds = [];
26    var displayFolderTree = function (jsonRes) {
27        var treeHtml = "";
28        //$.each(jsonRes, function (i, item) {
29            //treeHtml += " <li class='dropdown-submenu'>";
30            //treeHtml += "<a href='#' class='dropdown-toggle' data-toggle='dropdown'>" + item.FolderName + "</a>";
31            treeHtml += recurseTree(jsonRes)
32            //treeHtml += " </li>";
33
34        //});
35            //$("#GalleryMenus").html(treeHtml);
36            //$('.gallery-dropdown').dropdown();
37    }
38
39    function recurseTree(data) {
40        var folHtml = "";
41        if (typeof (data) !== 'undefined' && data != null) {
42           
43            $.each(data, function (i, item) { //each object at this level
44                var folderName = item.FolderName;
45                if (folderName != null) {
46                    if (folderName.length > 20) {
47                        folderName = folderName.slice(0, 20) + "...";
48                    }
49                }
50                var folderId = item.FolderId;
51                folderIds.push(folderId);
52                folHtml += "<li class='dropdown-submenu'><a href='#' class='dropdown-toggle' data-toggle='dropdown'>" + folderName + "</a>";
53                //folHtml += "<li id='FolTree_" + folderId + "'><i class='fa fa-folder-open folder-ico' id='FolIco_" + folderId + "'></i> <a href='#' id='Folder_" + folderId + "'>" + folderName + "</a>";
54
55                if (item.Children != null) {
56                    if (item.Children.length > 0) {
57                        var sub = "";
58                        folHtml += "<ul class='dropdown-menu'>";
59                        sub += recurseTree(item.Children)
60                        folHtml += sub;
61                        folHtml += "</ul>";
62                    }
63                }
64                folHtml += "</li>";
65            });
66
67           
68        }
69        return folHtml;
70    }
71
72
73    var setCookieEvts = function () {
74        var isCookieAccepted = $.cookie('AgreeCookies');
75        if (typeof (isCookieAccepted) === 'undefined' || isCookieAccepted == null || isCookieAccepted == "0" || isCookieAccepted == 0 || isCookieAccepted == "") {
76            $.cookie('AgreeCookies', 0);
77            $("#CookieTopBar").removeClass('sr-only');
78            $("#CookieTopBar").attr('style', 'display:block');
79
80        }
81        else {
82            $("#CookieTopBar").remove();
83        }
84
85        $("#AgreeCookiePolicyBtn").on('click', function (evt) {
86            evt.preventDefault();
87            var params = JSON.stringify({});
88            AjaxLib.Async('/Api/Auth.asmx', "AcceptCookiePolicy", params, function (jsonData) {
89                if (jsonData.Ok == true) {
90                    $("#CookieTopBar").remove();
91                }
92            });
93        });
94
95    }
96
97    var setInitEvents = function () {
98        $('.dp-caret').on('click', function (event) {
99            event.preventDefault();
100            event.stopPropagation();
101            $(this).parent().siblings().removeClass('open');
102            $(this).parent().toggleClass('open');
103        });
104    }
105
106
107    var viewCentreDet = function (ImgName) {
108        bootbox.dialog({
109            title: "",
110            message: "<div class='text-center'>" +
111                "<span class='text-center'><img class='img-responsive' width='100%' src='Cnt/img/" + ImgName + "'></span></div>",
112            buttons: {
113                primary: {
114                    label: "Ok",
115                    className: "btn-default btn-sm",
116                    callback: function () {
117                        return true;
118                    }
119                }
120            }
121        }
122        );
123    }
124
125    return {
126
127        Init: function () {
128            init();
129        },
130
131        ViewCentreDet: function (ImgName) {
132            viewCentreDet(ImgName);
133        }
134    }
135
136})();

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.