PageSourceSearch

https://cq-ecce.org/wp-content/plugins/directorypress-frontend/assets/js/directorypress-frontend-public.js

js cq-ecce.org collected 2026-10-05 07:38:06 UTC 4,600 bytes, 110 lines download raw bytes

1var loader = '<div class="dpfl-loader-wrapper"><div class="dpfl-loader"><div class="dpfl-ripple"><div></div><div></div></div></div></div>';
2var loader_wrapper = '.dpfl-loader-wrapper';
3
4jQuery(document).ready(function($) {
5	
6    jQuery("#directorypress-panel-sidebar-wrapper").jqueryAccordionMenu();
7	$("#menu-toggle").click(function(e) {
8        e.preventDefault();
9        $(".dashboard-wrapper").toggleClass("active");
10    });
11	
12	
13	$url = window.location.href
14	$('.jquery-accordion-menu').find('a[href="'+$url+'"]').parent('li').parent('ul').parent('li').children('.parent-menu-link').addClass('active');
15	$('.jquery-accordion-menu').find('a[href="'+$url+'"]').parent('li').parent('ul').parent('li').children('.parent-menu-link').addClass('submenu-indicator-minus');
16	$('.jquery-accordion-menu').find('a[href="'+$url+'"]').parent('li').parent('ul.submenu').css('display', 'block');
17	$('.jquery-accordion-menu').find('a[href="'+$url+'"]').parent('li').addClass('active');
18
19});
20
21
22// panel menu
23(function($, window, document, undefined) {
24    var pluginName = "jqueryAccordionMenu";
25    var defaults = {
26        speed: 300,
27        showDelay: 0,
28        hideDelay: 0,
29        singleOpen: true,
30        clickEffect: true
31    };
32
33    function Plugin(element, options) {
34        this.element = element;
35        this.settings = $.extend({}, defaults, options);
36        this._defaults = defaults;
37        this._name = pluginName;
38        this.init()
39    };
40    $.extend(Plugin.prototype, {
41        init: function() {
42			this.openSubmenu();
43            this.submenuIndicators();
44            if (defaults.clickEffect) {
45                this.addClickEffect()
46            }
47        },
48        openSubmenu: function() {
49            $(this.element).children("ul").find("li").bind("click touchstart", function(e) {
50                e.stopPropagation();
51                e.preventDefault();
52                if ($(this).children(".submenu").length > 0) {
53                    if ($(this).children(".submenu").css("display") == "none") {
54                        $(this).children(".submenu").delay(defaults.showDelay).slideDown(defaults.speed);
55                        $(this).children(".submenu").siblings("a").addClass("submenu-indicator-minus");
56                        if (defaults.singleOpen) {
57                            $(this).siblings().children(".submenu").slideUp(defaults.speed);
58                            $(this).siblings().children(".submenu").siblings("a").removeClass("submenu-indicator-minus")
59                        }
60                        return false
61                    } else {
62                        $(this).children(".submenu").delay(defaults.hideDelay).slideUp(defaults.speed)
63                    }
64                    if ($(this).children(".submenu").siblings("a").hasClass("submenu-indicator-minus")) {
65                        $(this).children(".submenu").siblings("a").removeClass("submenu-indicator-minus")
66                    }
67                }
68                window.location.href = $(this).children("a").attr("href")
69            })
70        },
71        submenuIndicators: function() {
72            if ($(this.element).find(".submenu").length > 0) {
73                $(this.element).find(".submenu").siblings("a").append("<span class='submenu-indicator'></span>")
74            }
75        },
76        addClickEffect: function() {
77            var ink, d, x, y;
78            $(this.element).find("a").bind("click touchstart", function(e) {
79                $(".ink").remove();
80                if ($(this).children(".ink").length === 0) {
81                    $(this).prepend("<span class='ink'></span>")
82                }
83                ink = $(this).find(".ink");
84                ink.removeClass("animate-ink");
85                if (!ink.height() && !ink.width()) {
86                    d = Math.max($(this).outerWidth(), $(this).outerHeight());
87                    ink.css({
88                        height: d,
89                        width: d
90                    })
91                }
92                x = e.pageX - $(this).offset().left - ink.width() / 2;
93                y = e.pageY - $(this).offset().top - ink.height() / 2;
94                ink.css({
95                    top: y + 'px',
96                    left: x + 'px'
97                }).addClass("animate-ink")
98            })
99        }
100    });
101    $.fn[pluginName] = function(options) {
102        this.each(function() {
103            if (!$.data(this, "plugin_" + pluginName)) {
104                $.data(this, "plugin_" + pluginName, new Plugin(this, options))
105            }
106        });
107        return this
108    }
109	
110})(jQuery, window, document);

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.