diff --git a/README.md b/README.md index c5a172e..242a024 100644 --- a/README.md +++ b/README.md @@ -6,52 +6,26 @@ This application is rather suitable for instances that activate a lot of applica Comptatible with AppOrder. -Installation ------------- +* [Installation and upgrade](#user-content-installation-and-upgrade) +* [How to contribute?](#user-content-how-to-contribute) +* [Preview](#user-content-preview) -Side menu is availabe from the app store. +Installation and upgrade +------------------------ -If you want to install it from source: go to https://gitnet.fr/deblan/side_menu/releases and download the last release (side_menu_vX.Y.Z.zip). - -Copy the archive to your Nextcloud server. +Side menu is availabe from the app store. If you want to install it from source: go to https://gitnet.fr/deblan/side_menu/releases and download the last release (side_menu_vX.Y.Z.zip). Copy the content into `apps`. ``` $ cd /path/to/nextcloud/apps $ unzip -d side_menu /path/to/side_menu_vX.Y.Z.zip ``` -### Upgrade - -Side menu can be upgraded from the app store. - -If you want to install it from source: go to https://gitnet.fr/deblan/side_menu/releases and download the last release (side_menu_vX.Y.Z.zip). - -Copy the archive to your Nextcloud server. - -``` -$ cd /path/to/nextcloud/apps -$ rm -frv side_menu -$ unzip -d side_menu /path/to/side_menu_vX.Y.Z.zip -``` - -Preview -------- - -![](https://upload.deblan.org/u/2020-03/5e81b219.jpg) - -![](https://upload.deblan.org/u/2020-03/5e7fab2b.jpg) - -![](https://upload.deblan.org/u/2020-05/5eb6b76e.png) - -![](https://upload.deblan.org/u/2020-05/5eb6b78a.png) - -Configuration -------------- - Administrators can edit many settings using the administration page. Users can disable the menu using the page of personal settings. +Use the shortcut `Ctrl`+`o` to open and to hide the side menu. Use `tab` to navigate. + How to contribute? ------------------ @@ -67,3 +41,14 @@ If you are a developer: Build javascripts using `webpack --config ./webpack.js` (add `-w` to build them in real time). Then commit and create a pull request. + +Preview +------- + +![](https://upload.deblan.org/u/2020-03/5e81b219.jpg) + +![](https://upload.deblan.org/u/2020-03/5e7fab2b.jpg) + +![](https://upload.deblan.org/u/2020-05/5eb6b76e.png) + +![](https://upload.deblan.org/u/2020-05/5eb6b78a.png) diff --git a/appinfo/info.xml b/appinfo/info.xml index e1a8395..4aa08b9 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,6 +6,8 @@ 0) { + a.focus() + } + } + var sideMenuMouseLeave = function() { sideMenu @@ -43,6 +55,8 @@ sideMenu .addClass('open') .on('mouseenter', sideMenuMouseEnter) + + sideMenuFocus() } if (!isTouchDevice) { @@ -53,11 +67,23 @@ headerMenuOpener.on('click', function() { - sideMenu.addClass('open'); + sideMenu.addClass('open') + sideMenu.find('.side-menu-app.active a').focus() }) sideMenuOpener.on('click', function() { - sideMenu.removeClass('open'); + sideMenu.removeClass('open') + }) + + $(document).keydown(function(e) { + var key = e.key || e.keyCode + + if ((key === 'o' || key === 79) && e.ctrlKey === true) { + e.preventDefault() + + sideMenu.toggleClass('open') + sideMenuFocus() + } }) }) diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index e10315e..6ab0b0a 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -213,6 +213,9 @@ $choicesSizes = [ +

Use the shortcut Ctrl+o + to open and to hide the side menu. Use tab to navigate.

+
+
+

+ t('Tips')); ?> +

+ +

Use the shortcut Ctrl+o + to open and to hide the side menu. Use tab to navigate.

+
+
diff --git a/templates/settings/personal-form.php b/templates/settings/personal-form.php index f81cdce..9f7cffe 100644 --- a/templates/settings/personal-form.php +++ b/templates/settings/personal-form.php @@ -48,6 +48,9 @@ $choicesYesNo = [
+ +

Use the shortcut Ctrl+o + to open and to hide the side menu. Use tab to navigate.