diff options
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(); + } }); |