Branch 'roundcubemail-plugins-kolab-3.1' - plugins/kolab_files

Aleksander Machniak machniak at kolabsys.com
Wed Oct 22 11:52:43 CEST 2014


 plugins/kolab_files/kolab_files.js |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 4b5a6c6249430cbd8e4c2a67e1f123397643b89e
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Wed Oct 22 05:51:51 2014 -0400

    Fix so Rename option is disabled when no (real) folder is selected

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




More information about the commits mailing list