PageSourceSearch

https://www.todylaboratories.com/Scripts/contentMenu.js

js todylaboratories.com collected 2026-10-10 01:39:04 UTC 3,806 bytes, 115 lines download raw bytes

1if (typeof (Tody) === "undefined") var Tody = {};
2
3(function($) {
4
5    Tody.ContentMenu = new function() {
6
7        var self = this;
8        var cookieName = "contentMenuVisibility";
9        var allowedPages = ['comanda', 'paidorder', 'freeorder'];
10        var modulesOpenedPages = ['requestspecialoffer'];
11        self.init = function() {
12
13            if ($("div.modulesContainer").is(':not(:visible)') || $("div.modulesContainer").length == 0) {
14                $('#showHideModulesLink').html('<h3 class="orange">' + Lang.ShowGamas + '</h3>');
15            }
16            else {
17                $('#showHideModulesLink').html('<h3 class="orange">' + Lang.HideGamas + '</h3>');
18            }
19
20            showHideModules();
21
22            //raport game
23            if ($("div.ordersContainer").is(':not(:visible)') || $("div.ordersContainer").length == 0) {
24                $('#showHideOrdersLink').html('<h3 class="orange">' + Lang.ShowOrdersGamasGroups + '</h3>');
25            }
26            else {
27                $('#showHideOrdersLink').html('<h3 class="orange">' + Lang.HideOrdersGamasGroups + '</h3>');
28            }
29
30            showHideOrders();
31
32        };
33
34        var showHideModules = function() {
35
36            $('#showHideModulesLink').click(function() {
37                updateSession();
38            });
39        };
40
41        var showHideOrders = function() {
42
43            $('#showHideOrdersLink').click(function() {
44                updateSessionOrders();
45            });
46        };
47
48        var updateSession = function() {
49
50            var menuListShouldBeClosed;
51            if ($("div.modulesContainer").is(':not(:visible)') || $("div.modulesContainer").length == 0) {
52                menuListShouldBeClosed = false;
53            } else {
54                menuListShouldBeClosed = true;
55            }
56
57            var dataForPost = { isClosed: menuListShouldBeClosed,
58                pageDetailsId: pageDetailsId
59            };
60
61            $.ajax({
62                type: "POST",
63                url: actionUrl('/ModulesMenu/UpdateModuleListState'),
64                data: dataForPost,
65                dataType: "json",
66                success: function(result) {
67                    window.location = window.location;
68                },
69                error: function(msg) {
70                    Boxy.alert(msg.status + " : " + msg.statusText, null, {
71                        title: Lang.Caution,
72                        closeOnButtonClick: true
73                    });
74                }
75            });
76        };
77
78        var updateSessionOrders = function() {
79
80            var ordersListShouldBeClosed;
81            if ($("div.ordersContainer").is(':not(:visible)') || $("div.ordersContainer").length == 0) {
82                ordersListShouldBeClosed = false;
83            } else {
84                ordersListShouldBeClosed = true;
85            }
86
87            var dataForPost = { isClosed: ordersListShouldBeClosed,
88                pageDetailsId: pageDetailsId
89            };
90
91            $.ajax({
92                type: "POST",
93                url: actionUrl('/ModulesMenu/UpdateOrdersListState'),
94                data: dataForPost,
95                dataType: "json",
96                success: function(result) {
97                    window.location = window.location.href.replace('#', '');
98                },
99                error: function(msg) {
100                    Boxy.alert(msg.status + " : " + msg.statusText, null, {
101                        title: Lang.Caution,
102                        closeOnButtonClick: true
103                    });
104                }
105            });
106        };
107        
108
109    };
110})(jQuery);
111
112
113jQuery(document).ready(function() {
114    Tody.ContentMenu.init();
115});

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.