]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove the history dropdown before creating a new one
authorMichael Gapczynski <GapczynskiM@gmail.com>
Fri, 18 May 2012 14:42:49 +0000 (10:42 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Fri, 18 May 2012 14:42:49 +0000 (10:42 -0400)
apps/files_versions/js/versions.js

index 8638d3ee428c371443b42d8457e17b9f61742456..7f3a6baf899102a02db41ce88247783c2a57f64c 100644 (file)
@@ -16,9 +16,17 @@ $(document).ready(function(){
                        if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
                        
                        var file = $('#dir').val()+'/'+filename;
-
-                       createVersionsDropdown(filename, file)
-
+                       // Check if drop down is already visible for a different file
+                       if (($('#dropdown').length > 0)) {
+                               if (file != $('#dropdown').data('file')) {
+                                       $('#dropdown').hide('blind', function() {
+                                               $('tr').removeClass('mouseOver');
+                                               createVersionsDropdown(filename, file);
+                                       });
+                               }
+                       } else {
+                               createVersionsDropdown(filename, file);
+                       }
                });
        }
 });