PageSourceSearch

https://awra.org/iparts/Common/ContentCollectionOrganizer/ContentCollectionOrganizer.js

js awra.org collected 2026-09-24 09:42:17 UTC 4,098 bytes, 95 lines download raw bytes

1function Asi_Web_iParts_ContentCollectionOrganizer_ContentCollectionOrganizerDisplay(radPageControlId, contentHasRedirectRule) {
2
3    var url = window.location.pathname;
4    var filename = url.substring(url.lastIndexOf('/') + 1)
5    var lastPostionName = filename.replace("-", "").replace(".aspx", "") + "LastPosition";
6    LastScrollPosition(lastPostionName);
7
8    function LastScrollPosition(lastPostionName) {
9        if (lastPostionName != null && lastPostionName != "undefined") {
10            jQuery(document).ready(function () {
11                var lastPostion = localStorage.getItem(lastPostionName);
12                if (lastPostion != null && lastPostion > 125 && window.location.toString().indexOf("#") > 0)
13                    window.scroll({ top: lastPostion, left: 0, behavior: 'instant' });
14                localStorage.removeItem(lastPostionName);
15            });
16            jQuery(document).scroll(function () {
17                localStorage.setItem(lastPostionName, GetViewportScrollPos().y);
18            });
19        }
20    }
21
22    if (contentHasRedirectRule === "False") return;
23
24    var control = jQuery('#' + radPageControlId).find('div[data-heightoverride="true"]');
25    if (control !== null) {
26        jQuery(document).ready(function () {
27            frameHeight(control);
28        });
29
30        jQuery(document).ready(function () {
31            jQuery(window).resize(function () {
32                frameHeight(control);
33            });
34        });
35    }
36
37    function frameHeight(control) {
38        if (control.length > 0) {
39            var height = getDocumentHeight() - 100;
40            control.each(function (i, obj) {
41                obj.style.height = height + "px";
42                var count = i + 1;
43                if (control.length === count)
44                    jQuery("iframe").load(function () {
45                        var iframeContents = jQuery("iframe").contents();
46                        if (iframeContents !== null) {
47                            iframeContents.find("head").append('<base target="_top" />');
48                            var cancelButton = iframeContents.find("[id$=_CancelButton]");
49                            if (cancelButton !== null) {
50                                cancelButton.removeAttr("onclick");
51                                cancelButton.attr("onclick", "return CancelButton_Click(window.top.location=(window.location!=window.parent.location) ? document.referrer:document.location)");
52                            }
53                        }
54                    });
55            });
56        }
57    }
58
59    function getDocumentHeight() {
60        var doc = document;
61        return Math.max(
62            Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight),
63            Math.max(doc.body.offsetHeight, doc.documentElement.offsetHeight),
64            Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
65        );
66    }
67
68}
69
70//function Asi_Web_iParts_ContentCollectionOrganizer_ContentCollectionOrganizerLastLocation(radPageControlId) {
71
72//    alert("1");
73
74//    var url = window.location.pathname;
75//    var filename = url.substring(url.lastIndexOf('/') + 1)
76//    var lastPostionName = filename.replace("-", "").replace(".aspx", "") + "LastPosition";
77//    LastScrollPosition(lastPostionName);
78
79//    function LastScrollPosition(lastPostionName) {
80//        if (lastPostionName != null && lastPostionName != "undefined") {
81//            jQuery(document).ready(function () {
82//                var lastPostion = localStorage.getItem(lastPostionName);
83//                if (lastPostion != null && lastPostion > 125)
84//                    window.scroll({ top: lastPostion, left: 0, behavior: 'smooth' });
85//                localStorage.removeItem(lastPostionName);
86//            });
87//            jQuery(document).scroll(function () {
88//                localStorage.setItem(lastPostionName, GetViewportScrollPos().y);
89
90//                console.log(GetViewportScrollPos().y);
91//            });
92//        }
93//    }
94
95//}

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.