PageSourceSearch

https://esru.co.za/DesktopModules/DNNGo_StyleSwicth/Resource/js/jquery.common.js?cdv=34

js esru.co.za collected 2026-10-08 18:13:08 UTC 4,775 bytes, 119 lines download raw bytes

1var DNNGo = {
2    split: function (str, separator) {
3        return str.split(separator);
4    },
5    setCookie: function (_name, _value, _PortalId) {
6        jQuery.cookie(_name, _value, { expires: 30, path: '/' });
7        jQuery.post(Resource_Ajax, { name: 'ck_' + _name, value: _value, PortalId: _PortalId });
8    },
9    getCookie: function (_name) {
10        return jQuery.cookie(_name);
11    },
12    setStyle: function (name, style_value, color) {
13        jQuery('#div_style_' + name).html(style_value.replace(/\{0\}/g, color));
14    },
15    eachColorPicker: function (Element) {
16        jQuery(Element).each(function (i, n) {
17            var $a, b, c, d;
18            $a = this;
19            b = jQuery(this).attr('data-name');
20            c = jQuery(this).attr('data-value');
21            jQuery(this).css("backgroundColor", jQuery(this).val());
22            jQuery(this).ColorPicker({
23                onSubmit: function (hsb, hex, rgb, el) {
24                    jQuery(el).val('#' + hex).ColorPickerHide();
25                },
26                onBeforeShow: function () {
27                    jQuery(this).ColorPickerSetColor(this.value);
28                },
29                onChange: function (hsb, hex, rgb) {
30                    jQuery($a).val('#' + hex).css('backgroundColor', '#' + hex);
31                    DNNGo.setStyle(b, c, '#' + hex);
32                    DNNGo.setCookie(b, '#' + hex, PortalId);
33                }
34            });
35        });
36    },
37    eachStyleList: function (Element) {
38        jQuery(Element).each(function (i, n) {
39            var $a, b, c;
40            $a = this;
41            b = jQuery(this).attr('data-name');
42            c = jQuery(this).attr('data-value');
43            jQuery(this).find('a').each(function (x, y) {
44                jQuery(this).click(function () {
45                    jQuery("#hidden_" + b).val(jQuery(this).attr("data-value"));
46                    jQuery(c).attr("class", jQuery(this).attr("data-value"));
47                    DNNGo.setCookie(b, jQuery(this).attr("data-value"), PortalId);
48                });
49
50            });
51        });
52    },
53    eachCssList: function (Element) {
54        jQuery(Element).each(function (i, n) {
55            var $a, b, c;
56            $a = this;
57            b = jQuery(this).attr('data-name');
58            //c = jQuery(this).attr('data-href');
59            jQuery(this).find('a').each(function (x, y) {
60                jQuery(this).click(function () {
61                    jQuery("#hidden_" + b).val(jQuery(this).attr("data-value"));
62                    jQuery('#DNNGo_StyleSwitch_CSS_'+b).attr("href", jQuery(this).attr("data-value"));
63                    DNNGo.setCookie(b, jQuery(this).attr('data-href'), PortalId);
64                });
65
66            });
67        });
68    },
69    eachSliderBox: function (Element) {
70        jQuery(Element).each(function (i, n) {
71            var a, b, c, d, e;
72            a = jQuery(this).attr('data-name');
73            b = jQuery(this).val();
74            c = parseInt(jQuery(this).attr('data-min'));
75            d = parseInt(jQuery(this).attr('data-max'));
76            e = jQuery(this).attr('data-value');
77   
78            jQuery("#slider_" + a).slider({
79                value: b,
80                min: c,
81                max: d,
82                step: 1,
83                slide: function (event, ui) {
84                    jQuery("#slider_amount_" + a).val(+ui.value);
85                    DNNGo.setStyle(a, e, ui.value);
86                    DNNGo.setCookie(a, ui.value, PortalId);
87                }
88            });
89        });
90    },
91    hideMenu: function ($) {
92        $('#styler_slider').stop(false, true).animate({ left: '-220px' }, 400, 'easeOutExpo', function () {
93            if ($('#styler_toggler').hasClass('styler_toggler_off')) {
94                $('#styler_toggler').removeClass('styler_toggler_off').addClass('styler_toggler_on');
95            } else {
96                $('#styler_toggler').removeClass('styler_toggler_on').addClass('styler_toggler_off');
97            }
98        });
99    },
100    showMenu: function ($) {
101        $('#styler_slider').stop(false, true).animate({ left: '0px' }, 400, 'easeOutExpo', function () {
102            if ($('#styler_toggler').hasClass('styler_toggler_off')) {
103                $('#styler_toggler').removeClass('styler_toggler_off').addClass('styler_toggler_on');
104            } else {
105                $('#styler_toggler').removeClass('styler_toggler_on').addClass('styler_toggler_off');
106            }
107        });
108    },
109    ExpansionMenuStatus: function ($) {
110        var MenuStatus = DNNGo.getCookie("MenuStatus");
111        if (MenuStatus == 'true') {
112            DNNGo.showMenu($);
113        }
114
115    }
116
117
118
119};

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.