[Svn] r3854 - trunk/roundcubemail/program/js

trac at roundcube.net trac at roundcube.net
Mon Aug 2 12:29:22 CEST 2010


Author: alec
Date: 2010-08-02 05:29:22 -0500 (Mon, 02 Aug 2010)
New Revision: 3854

Modified:
   trunk/roundcubemail/program/js/app.js
Log:
- Fix message list and preview pane cleanup on search request


Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2010-08-02 09:05:34 UTC (rev 3853)
+++ trunk/roundcubemail/program/js/app.js	2010-08-02 10:29:22 UTC (rev 3854)
@@ -1836,18 +1836,14 @@
       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 @@
     }
   };
 
+  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 @@
       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 @@
     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) {

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list