Hide the dropdown if you click the share file action button

This commit is contained in:
Michael Gapczynski 2011-08-11 12:03:48 -04:00
parent 0f91438b80
commit 0ad0ed77c5

View file

@ -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);