diff options
author | VicDeo <victor.dubiniuk@gmail.com> | 2012-10-09 14:00:04 +0400 |
---|---|---|
committer | VicDeo <victor.dubiniuk@gmail.com> | 2012-10-09 14:00:33 +0400 |
commit | f29f1cad1d0a868235737b74f15f97e053fc34a7 (patch) | |
tree | cb804fa6ac771a8eae442749503c9562e5eb7904 /apps | |
parent | 2bd4035076dee5927d3f92fb7fcef3b75d1544ca (diff) |
Prevent Versions click handler from closing sharing dropdown
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_versions/js/versions.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index 9075095d286..aa79cffeca4 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -21,7 +21,7 @@ $(document).ready(function(){ } ,function(filename){ // Action to perform when clicked - if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback + if (scanFiles.scanning || !$('#dropdown').hasClass('drop-versions')){return;}//workaround to prevent additional http request block scanning feedback var file = $('#dir').val()+'/'+filename; // Check if drop down is already visible for a different file @@ -45,7 +45,7 @@ function createVersionsDropdown(filename, files) { var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ); - var html = '<div id="dropdown" class="drop" data-file="'+files+'">'; + var html = '<div id="dropdown" class="drop drop-versions" data-file="'+files+'">'; html += '<div id="private">'; html += '<select data-placeholder="Saved versions" id="found_versions" class="chzen-select" style="width:16em;">'; html += '<option value=""></option>'; @@ -137,8 +137,7 @@ function createVersionsDropdown(filename, files) { $(this).click( function(event) { - - if ($('#dropdown').has(event.target).length === 0) { + if ($('#dropdown').has(event.target).length === 0 && $('#dropdown').hasClass('drop-versions')) { $('#dropdown').hide('blind', function() { $('#dropdown').remove(); $('tr').removeClass('mouseOver'); |