summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-10-22 09:51:51 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-10-22 09:52:37 (GMT)
commit4b5a6c6249430cbd8e4c2a67e1f123397643b89e (patch)
tree764834ac3de48a59d1df1599f3d9696d1fed95e0
parent1e2f711ff7514ca9ef5b52c769668f52edfadf55 (diff)
downloadroundcubemail-plugins-kolab-4b5a6c6249430cbd8e4c2a67e1f123397643b89e.tar.gz
Fix so Rename option is disabled when no (real) folder is selected
-rw-r--r--plugins/kolab_files/kolab_files.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js
index 0fc8a1b..bf63721 100644
--- a/plugins/kolab_files/kolab_files.js
+++ b/plugins/kolab_files/kolab_files.js
@@ -79,8 +79,7 @@ window.rcmail && rcmail.addEventListener('init', function() {
// document.onmouseup = function(e){ return p.doc_mouse_up(e); };
rcmail.gui_objects.filelist.parentNode.onmousedown = function(e){ return kolab_files_click_on_list(e); };
- rcmail.enable_command('menu-open', 'menu-save', 'files-sort', 'files-search', 'files-search-reset',
- 'folder-create', 'folder-rename', true);
+ rcmail.enable_command('menu-open', 'menu-save', 'files-sort', 'files-search', 'files-search-reset', 'folder-create', true);
rcmail.file_list.init();
kolab_files_list_coltypes();
@@ -1006,14 +1005,14 @@ function kolab_files_ui()
if (is_collection) {
var found = $('#folder-collection-' + folder, list).addClass('selected');
- rcmail.enable_command('files-folder-delete', 'files-upload', false);
+ rcmail.enable_command('files-folder-delete', 'folder-rename', 'files-upload', false);
this.env.folder = null;
rcmail.command('files-list', {collection: folder});
}
else {
var found = $('#' + this.env.folders[folder].id, list).addClass('selected');
- rcmail.enable_command('files-folder-delete', 'files-upload', true);
+ rcmail.enable_command('files-folder-delete', 'folder-rename', 'files-upload', true);
this.env.folder = folder;
this.env.collection = null;
rcmail.command('files-list', {folder: folder});
@@ -1137,7 +1136,7 @@ function kolab_files_ui()
return;
this.env.folder = null;
- rcmail.enable_command('files-folder-delete', 'files-folder-rename', 'files-list', false);
+ rcmail.enable_command('files-folder-delete', 'folder-rename', 'files-list', false);
this.display_message('kolab_files.folderdeletenotice', 'confirmation');
// refresh folders list