diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2017-09-29 18:02:14 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2017-11-01 11:52:58 +0100 |
commit | 116cb58c3c47cbe88bed7f4d0dd7bb7cd703a714 (patch) | |
tree | 8ff52f0d912624618869ce9b773549ddf7daaa85 /apps/files_sharing/js/public.js | |
parent | f2fadf677c995a56d435708184f3bd3e8c8b620a (diff) | |
download | nextcloud-server-116cb58c3c47cbe88bed7f4d0dd7bb7cd703a714.tar.gz nextcloud-server-116cb58c3c47cbe88bed7f4d0dd7bb7cd703a714.zip |
Show and hide menu via Javascript, thanks @skjnldsv
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 1407737d007..8799e3e6fc8 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -424,4 +424,18 @@ $(document).ready(function () { return App.fileList.generatePreviewUrl(urlSpec); }; } + + $('#share-menutoggle').click(function() { + $('#share-menu').show(); + }); +}); + + +$(document).mouseup(function(e) { + var container = $('#share-menu'); + + // if the target of the click isn't the container nor a descendant of the container + if (!container.is(e.target) && container.has(e.target).length === 0) { + container.hide(); + } }); |