From fd0c123e44391aa01a85c5aeebbd0cea418f0808 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 08 Dec 2013 04:57:44 -0500
Subject: [PATCH] Fix fixed header issue after removing rows (1295420)

---
 program/js/app.js |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 28ee96b..398417a 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -187,8 +187,6 @@
     if (this.env.permaurl)
       this.enable_command('permaurl', 'extwin', true);
 
-    this.local_storage_prefix = 'roundcube.' + (this.env.user_id || 'anonymous') + '.';
-
     switch (this.task) {
 
       case 'mail':
@@ -3202,7 +3200,7 @@
   {
     this.env.recipients_delimiter = this.env.recipients_separator + ' ';
 
-    obj[bw.ie || bw.safari || bw.chrome ? 'keydown' : 'keypress'](function(e) { return ref.ksearch_keydown(e, this, props); })
+    obj.keydown(function(e) { return ref.ksearch_keydown(e, this, props); })
       .attr('autocomplete', 'off');
   };
 
@@ -6845,7 +6843,6 @@
 
           if ((response.action == 'list' || response.action == 'search') && this.message_list) {
             this.msglist_select(this.message_list);
-            this.message_list.resize();
             this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:this.message_list.rowcount });
           }
         }
@@ -6856,7 +6853,6 @@
             this.enable_command('search-create', this.env.source == '');
             this.enable_command('search-delete', this.env.search_id);
             this.update_group_commands();
-            this.contact_list.resize();
             this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount });
           }
         }
@@ -7447,11 +7443,20 @@
     setCookie(name, value, expires, this.env.cookie_path, this.env.cookie_domain, this.env.cookie_secure);
   };
 
+  this.get_local_storage_prefix = function()
+  {
+    if (!this.local_storage_prefix)
+      this.local_storage_prefix = 'roundcube.' + (this.env.user_id || 'anonymous') + '.';
+
+    return this.local_storage_prefix;
+  };
+
   // wrapper for localStorage.getItem(key)
   this.local_storage_get_item = function(key, deflt, encrypted)
   {
+
     // TODO: add encryption
-    var item = localStorage.getItem(this.local_storage_prefix + key);
+    var item = localStorage.getItem(this.get_local_storage_prefix() + key);
     return item !== null ? JSON.parse(item) : (deflt || null);
   };
 
@@ -7459,13 +7464,13 @@
   this.local_storage_set_item = function(key, data, encrypted)
   {
     // TODO: add encryption
-    return localStorage.setItem(this.local_storage_prefix + key, JSON.stringify(data));
+    return localStorage.setItem(this.get_local_storage_prefix() + key, JSON.stringify(data));
   };
 
   // wrapper for localStorage.removeItem(key)
   this.local_storage_remove_item = function(key)
   {
-    return localStorage.removeItem(this.local_storage_prefix + key);
+    return localStorage.removeItem(this.get_local_storage_prefix() + key);
   };
 
 }  // end object rcube_webmail

--
Gitblit v1.9.1