summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-08 13:36:33 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-08 13:36:33 +0200
commitef4c4787604b02f40d271a88126e1a2ed8753be0 (patch)
treeaaf8c523326848e4b1048b917d90feb8e15e8041
parent66233b76c83b8e31bc1ff301352393299130a18c (diff)
Reset search after folder creation/remove/rename
-rw-r--r--program/js/app.js18
-rw-r--r--program/js/treelist.js1
2 files changed, 19 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 346c4f75d..6a68ebfae 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -5834,6 +5834,12 @@ function rcube_webmail()
if (!this.gui_objects.subscriptionlist)
return false;
+ // reset searching
+ if (this.subscription_list.is_search()) {
+ this.subscription_select();
+ this.subscription_list.reset_search();
+ }
+
// disable drag-n-drop temporarily
this.subscription_list.draggable('destroy').droppable('destroy');
@@ -5999,6 +6005,12 @@ function rcube_webmail()
return false;
}
+ // reset searching
+ if (this.subscription_list.is_search()) {
+ this.subscription_select();
+ this.subscription_list.reset_search();
+ }
+
var subfolders = {},
row = this.subscription_list.get_item(oldid, true),
parent = $(row).parent(),
@@ -6044,6 +6056,12 @@ function rcube_webmail()
// remove the table row of a specific mailbox from the table
this.remove_folder_row = function(folder)
{
+ // reset searching
+ if (this.subscription_list.is_search()) {
+ this.subscription_select();
+ this.subscription_list.reset_search();
+ }
+
var list = [], row = this.subscription_list.get_item(folder, true);
// get subfolders if any
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 7d13143cd..cc1880da2 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -94,6 +94,7 @@ function rcube_treelist_widget(node, p)
this.get_node = get_node;
this.get_selection = get_selection;
this.is_search = is_search;
+ this.reset_search = reset_search;
/////// startup code (constructor)