diff options
Diffstat (limited to 'core/src/OC/apps.js')
-rw-r--r-- | core/src/OC/apps.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/core/src/OC/apps.js b/core/src/OC/apps.js index c7b2c4f5e17..dec2b94bfbb 100644 --- a/core/src/OC/apps.js +++ b/core/src/OC/apps.js @@ -1,11 +1,7 @@ /** - * ownCloud - core - * - * This file is licensed under the Affero General Public License version 3 or - * later. See the COPYING file. - * - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @copyright Bernhard Posselt 2014 + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2014 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-or-later */ import $ from 'jquery' @@ -21,7 +17,7 @@ const Apps = { /** * Shows the #app-sidebar and add .with-app-sidebar to subsequent siblings * - * @param {Object} [$el] sidebar element to show, defaults to $('#app-sidebar') + * @param {object} [$el] sidebar element to show, defaults to $('#app-sidebar') */ Apps.showAppSidebar = function($el) { const $appSidebar = $el || $('#app-sidebar') @@ -33,7 +29,7 @@ Apps.showAppSidebar = function($el) { * Shows the #app-sidebar and removes .with-app-sidebar from subsequent * siblings * - * @param {Object} [$el] sidebar element to hide, defaults to $('#app-sidebar') + * @param {object} [$el] sidebar element to hide, defaults to $('#app-sidebar') */ Apps.hideAppSidebar = function($el) { const $appSidebar = $el || $('#app-sidebar') @@ -68,20 +64,28 @@ export const registerAppsSlideToggle = () => { const areaSelector = $(button).data('apps-slide-toggle') const area = $(areaSelector) + /** + * + */ function hideArea() { area.slideUp(OC.menuSpeed * 4, function() { area.trigger(new $.Event('hide')) }) area.removeClass('opened') $(button).removeClass('opened') + $(button).attr('aria-expanded', 'false') } + /** + * + */ function showArea() { area.slideDown(OC.menuSpeed * 4, function() { area.trigger(new $.Event('show')) }) area.addClass('opened') $(button).addClass('opened') + $(button).attr('aria-expanded', 'true') const input = $(areaSelector + ' [autofocus]') if (input.length === 1) { input.focus() |