summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-01-14 18:19:16 +0100
committerThomas Bruederli <thomas@roundcube.net>2014-01-14 18:19:16 +0100
commit7c28d45c8e9a448002595d26ca5cf88726b47123 (patch)
treef4f64489c8cde85b1d1fd16684253a1e2ccfb0ba /program
parentaa581c2912fa291c59605d876a6b37241a6a8b06 (diff)
Update class name in subscriptions folder list after saving folder properties
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js12
-rw-r--r--program/steps/settings/save_folder.inc3
2 files changed, 14 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index da102143f..3c547566d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -5834,8 +5834,11 @@ function rcube_webmail()
// replace an existing table row with a new folder line (with subfolders)
this.replace_folder_row = function(oldfolder, newfolder, display_name, is_protected, class_name)
{
- if (!this.gui_objects.subscriptionlist)
+ if (!this.gui_objects.subscriptionlist) {
+ if (this.is_framed)
+ return parent.rcmail.replace_folder_row(oldfolder, newfolder, display_name, is_protected, class_name);
return false;
+ }
var i, n, len, name, dispname, oldrow, tmprow, row, level,
tbody = this.gui_objects.subscriptionlist.tBodies[0],
@@ -5846,6 +5849,13 @@ function rcube_webmail()
// find subfolders of renamed folder
list = this.get_subfolders(oldfolder);
+ // no renaming, only update class_name
+ if (oldfolder == newfolder) {
+ $('#'+id).attr('class', class_name || '');
+ this.subscription_list.focus();
+ return;
+ }
+
// replace an existing table row
this._remove_folder_row(id);
row = $(this.add_folder_row(newfolder, display_name, is_protected, subscribed, true, class_name));
diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc
index f720735e0..d1449bb38 100644
--- a/program/steps/settings/save_folder.inc
+++ b/program/steps/settings/save_folder.inc
@@ -189,6 +189,9 @@ else if (!$error) {
rcmail_update_folder_row($folder['name'], $folder['oldname'], $folder['subscribe'], $folder['class']);
$OUTPUT->send('iframe');
}
+ else if (!empty($folder['class'])) {
+ rcmail_update_folder_row($folder['name'], $folder['oldname'], $folder['subscribe'], $folder['class']);
+ }
}
else {
// show error message