summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-08-02 10:29:22 +0000
committeralecpl <alec@alec.pl>2010-08-02 10:29:22 +0000
commitbe9d4d2ab715189de335233b1f83b3026d7e38ee (patch)
tree27e40396b1cd6689fde67bf0cb193f05352cd51c /program/js/app.js
parent8ed0152e5129daef980429cd5f9e56e75dbf2b74 (diff)
- Fix message list and preview pane cleanup on search request
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js24
1 files changed, 15 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 2f7b55b6e..53eeb71c9 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1836,18 +1836,14 @@ function rcube_webmail()
page = 1;
this.env.current_page = page;
this.select_all_mode = false;
- this.show_contentframe(false);
- this.env.messages = {};
}
+ // unselect selected messages and clear the list and message data
+ this.clear_message_list();
+
if (mbox != this.env.mailbox || (mbox == this.env.mailbox && !page && !sort))
url += '&_refresh=1';
- // unselect selected messages
- this.last_selected = 0;
- if (this.message_list) {
- this.message_list.clear_selection();
- }
this.select_folder(mbox, this.env.mailbox);
this.env.mailbox = mbox;
@@ -1869,6 +1865,16 @@ function rcube_webmail()
}
};
+ this.clear_message_list = function()
+ {
+ this.env.messages = {};
+ this.last_selected = 0;
+
+ this.show_contentframe(false);
+ if (this.message_list)
+ this.message_list.clear(true);
+ };
+
// send remote request to load message list
this.list_mailbox_remote = function(mbox, page, add_url)
{
@@ -2819,7 +2825,7 @@ function rcube_webmail()
var thisMCE = tinyMCE.get(props.id), existingHtml;
if (thisMCE.plugins.spellchecker && thisMCE.plugins.spellchecker.active)
thisMCE.execCommand('mceSpellCheck', false);
-
+
if (existingHtml = thisMCE.getContent()) {
if (!confirm(this.get_label('editorwarning'))) {
return false;
@@ -3183,7 +3189,7 @@ function rcube_webmail()
if (value != '') {
var addurl = '';
if (this.message_list) {
- this.message_list.clear();
+ this.clear_message_list();
if (this.env.search_mods) {
var mods = this.env.search_mods[this.env.mailbox] ? this.env.search_mods[this.env.mailbox] : this.env.search_mods['*'];
if (mods) {