summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-05-18 10:42:49 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-05-18 10:42:49 -0400
commitfcb4d2aaeea5066e8efc04f71bc2551cde18fd39 (patch)
treed450ec96741bb455c4b829469a9d7f1141532af2 /apps/files_versions
parent122d1efecfec75eab6f47d8456685c6ce133dea9 (diff)
downloadnextcloud-server-fcb4d2aaeea5066e8efc04f71bc2551cde18fd39.tar.gz
nextcloud-server-fcb4d2aaeea5066e8efc04f71bc2551cde18fd39.zip
Remove the history dropdown before creating a new one
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/js/versions.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index 8638d3ee428..7f3a6baf899 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -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);
+ }
});
}
});