From 0ad0ed77c50886a5c85d7b745b128430e4a3833c Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Thu, 11 Aug 2011 12:03:48 -0400 Subject: [PATCH] Hide the dropdown if you click the share file action button --- apps/files_sharing/js/share.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index b5aef4068e7..686361d9aba 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -3,9 +3,13 @@ $(document).ready(function() { FileActions.register('all', 'Share', OC.imagePath('core', 'actions/share'), function(filename) { if ($('#dropdown').length != 0) { $('#dropdown').hide('blind', function() { + var dropdownFile = $('#dropdown').data('file') + var file = $('#dir').val()+'/'+filename; $('#dropdown').remove(); $('tr').removeClass('mouseOver'); - createDropdown(filename, $('#dir').val()+'/'+filename); + if (dropdownFile != file) { + createDropdown(filename, file); + } }); } else { createDropdown(filename, $('#dir').val()+'/'+filename);