From 5e0dd3a0ac24292fa84f082df92cdd405647c642 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 25 Jul 2016 23:59:48 +0200 Subject: [PATCH] Removed obsolete code --- wcfsetup/install/files/acp/js/WCF.ACP.js | 109 ----------------------- 1 file changed, 109 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index 601bb7d446..2b8978fc53 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -149,115 +149,6 @@ WCF.ACP.Cronjob.LogList = Class.extend({ } }); -/** - * Handles ACPMenu. - * - * @param array activeMenuItems - */ -WCF.ACP.Menu = Class.extend({ - /** - * Initializes ACPMenu. - * - * @param array activeMenuItems - */ - init: function(activeMenuItems) { - this._headerNavigation = $('nav#mainMenu'); - this._sidebarNavigation = $('aside.collapsibleMenu > div'); - - this._prepareElements(activeMenuItems); - }, - - /** - * Resets all elements and binds event listeners. - */ - _prepareElements: function(activeMenuItems) { - this._headerNavigation.find('li').removeClass('active'); - - this._sidebarNavigation.find('legend').each($.proxy(function(index, menuHeader) { - $(menuHeader).click($.proxy(this._toggleItem, this)); - }, this)); - - // close all navigation groups - this._sidebarNavigation.find('nav ul').each(function() { - $(this).hide(); - }); - - this._headerNavigation.find('li').click($.proxy(this._toggleSidebar, this)); - - if (activeMenuItems.length === 0) { - this._renderSidebar(this._headerNavigation.find('li:first').data('menuItem'), []); - } - else { - this._renderSidebar('', activeMenuItems); - } - }, - - /** - * Toggles a navigation group entry. - */ - _toggleItem: function(event) { - var $menuItem = $(event.currentTarget); - - $menuItem.parent().find('nav ul').stop(true, true).toggle('blind', { }, 200).end(); - $menuItem.toggleClass('active'); - }, - - /** - * Handles clicks on main menu. - * - * @param object event - */ - _toggleSidebar: function(event) { - var $target = $(event.currentTarget); - - if ($target.hasClass('active')) { - return; - } - - this._renderSidebar($target.data('menuItem'), []); - }, - - /** - * Renders sidebar including highlighting of currently active menu items. - * - * @param string menuItem - * @param array activeMenuItems - */ - _renderSidebar: function(menuItem, activeMenuItems) { - // reset visible and active items - this._headerNavigation.find('li').removeClass('active'); - this._sidebarNavigation.find('> div').hide(); - - if (activeMenuItems.length === 0) { - // show active menu - this._headerNavigation.find('li[data-menu-item="' + menuItem + '"]').addClass('active'); - this._sidebarNavigation.find('div[data-parent-menu-item="' + menuItem + '"]').show(); - } - else { - // open menu by active menu items, first element is always a head navigation item - menuItem = activeMenuItems.shift(); - - this._headerNavigation.find('li[data-menu-item="' + menuItem + '"]').addClass('active'); - this._sidebarNavigation.find('div[data-parent-menu-item="' + menuItem + '"]').show(); - - for (var $i = 0, $size = activeMenuItems.length; $i < $size; $i++) { - var $item = activeMenuItems[$i]; - - if ($.wcfIsset($item)) { - var $menuItem = $('#' + $.wcfEscapeID($item)); - - if ($menuItem.getTagName() === 'ul') { - $menuItem.show().parents('fieldset').children('legend').addClass('active'); - } - else { - $menuItem.addClass('active'); - } - } - } - } - } -}); - /** * Namespace for ACP package management. */ -- 2.20.1