diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-06-05 13:19:56 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-06-05 13:19:56 +0200 |
commit | 86a9cb2a6b167a216f5bd39350ea5cf4fd2305f6 (patch) | |
tree | ddaf41b4c0f941020be86f7fe2cdc5b9862dff5b /core/js/js.js | |
parent | 24641c909ee45e82d5ec7602a3a31e153cbbbb35 (diff) | |
download | nextcloud-server-86a9cb2a6b167a216f5bd39350ea5cf4fd2305f6.tar.gz nextcloud-server-86a9cb2a6b167a216f5bd39350ea5cf4fd2305f6.zip |
add app sidebar toggle and swipe on mobile
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index b3cefa83bee..123c4ad8e81 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1131,6 +1131,21 @@ function initCore() { } setupMainMenu(); + + // App sidebar on mobile + var snapper = new Snap({ + element: document.getElementById('app-content'), + disable: 'right', + maxPosition: 230 + }); + $('#app-content').prepend('<div id="app-navigation-toggle" class="icon-menu" style="display:none;"></div>'); + $('#app-navigation-toggle').click(function(){ + if(snapper.state().state == 'left'){ + snapper.close(); + } else { + snapper.open('left'); + } + }); } $(document).ready(initCore); |