Removed collapsible sidebar
authorAlexander Ebert <ebert@woltlab.com>
Thu, 14 Apr 2016 11:41:45 +0000 (13:41 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 14 Apr 2016 11:41:51 +0000 (13:41 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Ui/Collapsible/Sidebar.js [deleted file]

diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Collapsible/Sidebar.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Collapsible/Sidebar.js
deleted file mode 100644 (file)
index 9729bd8..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Provides the sidebar toggle button.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @module     WoltLab/WCF/Ui/Collapsible/Sidebar
- */
-define(['Ajax', 'Language', 'Dom/Util'], function(Ajax, Language, DomUtil) {
-       "use strict";
-       
-       var _isOpen = false;
-       var _main = null;
-       var _name = '';
-       
-       /**
-        * @module      WoltLab/WCF/Ui/Collapsible/Sidebar
-        */
-       var UiCollapsibleSidebar = {
-               /**
-                * Sets up the toggle button.
-                */
-               setup: function() {
-                       var sidebar = elBySel('.sidebar');
-                       if (sidebar === null) {
-                               return;
-                       }
-                       
-                       _isOpen = (elData(sidebar, 'is-open') === 'true');
-                       _main = elById('main');
-                       _name = elData(sidebar, 'sidebar-name');
-                       
-                       this._createUI(sidebar);
-                       
-                       _main.classList[(_isOpen ? 'remove' : 'add')]('sidebarCollapsed');
-               },
-               
-               /**
-                * Creates the toggle button.
-                * 
-                * @param       {Element}       sidebar         sidebar element
-                */
-               _createUI: function(sidebar) {
-                       var button = elCreate('a');
-                       button.href = '#';
-                       button.className = 'collapsibleButton jsTooltip';
-                       elAttr(button, 'title', Language.get('wcf.global.button.collapsible'));
-                       
-                       var span = elCreate('span');
-                       span.appendChild(button);
-                       DomUtil.prepend(span, sidebar);
-                       
-                       button.addEventListener('click', this._click.bind(this));
-               },
-               
-               /**
-                * Toggles the sidebar on click.
-                * 
-                * @param       {object}        event           event object
-                */
-               _click: function(event) {
-                       event.preventDefault();
-                       
-                       _isOpen = (_isOpen === false);
-                       
-                       Ajax.api(this, {
-                               isOpen: ~~_isOpen
-                       });
-               },
-               
-               _ajaxSetup: function() {
-                       return {
-                               data: {
-                                       actionName: 'toggle',
-                                       className: 'wcf\\system\\user\\collapsible\\content\\UserCollapsibleSidebarHandler',
-                                       sidebarName: _name
-                               },
-                               url: 'index.php/AJAXInvoke/?t=' + SECURITY_TOKEN + SID_ARG_2ND
-                       };
-               },
-               
-               _ajaxSuccess: function(data) {
-                       _main.classList[(_isOpen ? 'remove' : 'add')]('sidebarCollapsed');
-               }
-       };
-       
-       return UiCollapsibleSidebar;
-});