summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-06-15 13:21:49 +0000
committeralecpl <alec@alec.pl>2011-06-15 13:21:49 +0000
commit1a034323fc7cefc8dd0283ae9d1a83ce3abbaf0a (patch)
tree4ef94a31685caf403f5d1688aa1dbf47f405cdde /program/js/app.js
parent5f2d1588dde55fcd064890bb63daa172bd9331c7 (diff)
- Add possibility to return subscription status and css class name for folder row from "folder_save" hook
- Fix folder preview frame state after folder creation
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 2c8fad6d2..f2744b7c0 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -4461,7 +4461,7 @@ function rcube_webmail()
};
// Add folder row to the table and initialize it
- this.add_folder_row = function (name, display_name, protected, subscribed, skip_init)
+ this.add_folder_row = function (name, display_name, protected, subscribed, skip_init, class_name)
{
if (!this.gui_objects.subscriptionlist)
return false;
@@ -4478,8 +4478,11 @@ function rcube_webmail()
}
// clone a table row if there are existing rows
- row = $(refrow).clone(true);
+ row = $(refrow).clone(true);
+
+ // set ID, reset css class
row.attr('id', id);
+ row.attr('class', class_name);
// set folder name
row.find('td:first').html(display_name);
@@ -4537,7 +4540,7 @@ function rcube_webmail()
};
// replace an existing table row with a new folder line (with subfolders)
- this.replace_folder_row = function(oldfolder, newfolder, display_name, protected)
+ this.replace_folder_row = function(oldfolder, newfolder, display_name, protected, class_name)
{
if (!this.gui_objects.subscriptionlist)
return false;
@@ -4553,7 +4556,7 @@ function rcube_webmail()
// replace an existing table row
this._remove_folder_row(id);
- row = $(this.add_folder_row(newfolder, display_name, protected, subscribed, true));
+ row = $(this.add_folder_row(newfolder, display_name, protected, subscribed, true, class_name));
// detect tree depth change
if (len = list.length) {