diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-04-21 09:04:49 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-04-21 09:04:49 +0000 |
| commit | d058d498c86cd91e8cf4a8962f5fc1d3f2fb04a9 (patch) | |
| tree | d13332a23dc5546dbc8855b5a1daf0dcaccc4954 /roundcubemail/program/js/list.js | |
| parent | 25353df02f73e8abc6e0d3ec5a2f5ce86afcfff3 (diff) | |
- Speed up message list displaying on IE (initialize list in background)
- use DOM methods instead of jQuery for messages list object
git-svn-id: https://svn.roundcube.net/trunk@2408 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/list.js')
| -rw-r--r-- | roundcubemail/program/js/list.js | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index dabcecb92..5f017df03 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -98,7 +98,7 @@ init: function() /** - * + * Init list row and set mouse events on it */ init_row: function(row) { @@ -123,7 +123,7 @@ init_row: function(row) /** - * + * Remove all list rows */ clear: function(sel) { @@ -154,20 +154,21 @@ remove_row: function(uid, sel_next) /** - * + * Add row to the list and initialize it */ insert_row: function(row, attop) { - var tbody = this.list.tBodies[0]; - if (!row.jquery) - row = $(row); + if (this.background) + var tbody = this.background; + else + var tbody = this.list.tBodies[0]; if (attop && tbody.rows.length) - row.prependTo(tbody) + tbody.insertBefore(row, tbody.firstChild); else - row.appendTo(tbody); + tbody.appendChild(row); - this.init_row(row[0]); + this.init_row(row); this.rowcount++; }, @@ -828,6 +829,20 @@ drag_mouse_up: function(e) } return rcube_event.cancel(e); +}, + + +/** + * Creating the list in background + */ +set_background_mode: function(flag) +{ + if (flag) { + this.background = document.createElement('TBODY'); + } else if (this.background) { + this.list.replaceChild(this.background, this.list.tBodies[0]); + this.background = null; + } } }; |
