summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-15 14:49:10 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-15 14:49:10 +0000
commit78aa43379ef57271e34972e6b9015b481644fac1 (patch)
tree0b0819acbc229f9e21f2c819a39cc5133e765117 /roundcubemail/program
parenta40cf88d649d0770d9b214c490c8e413e0425e35 (diff)
- improve performance of threads expanding/collapsing (significant on IE)
git-svn-id: https://svn.roundcube.net/trunk@3621 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/js/list.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js
index 9493121d5..480cc6243 100644
--- a/roundcubemail/program/js/list.js
+++ b/roundcubemail/program/js/list.js
@@ -486,7 +486,8 @@ collapse_all: function(row)
$(new_row).hide();
if (r.has_children) {
r.expanded = false;
- this.update_expando(r.uid);
+ if (!r.depth || !this.multiexpand)
+ this.update_expando(r.uid, false);
this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded });
}
}
@@ -525,7 +526,12 @@ expand_all: function(row)
$(new_row).show();
if (r.has_children) {
r.expanded = true;
- this.update_expando(r.uid, true);
+ // in multiexpand mode only root has expando icon
+ // so we don't need to set it for children, this
+ // improves performance because getElementById()
+ // is relatively slow on IE
+ if (!r.depth || !this.multiexpand)
+ this.update_expando(r.uid, true);
this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded });
}
}
@@ -1043,9 +1049,7 @@ use_plusminus_key: function(keyCode, mod_key)
else
this.collapse(selected_row);
- var expando = document.getElementById('rcmexpando' + selected_row.uid);
- if (expando)
- expando.className = selected_row.expanded?'expanded':'collapsed';
+ this.update_expando(selected_row.uid, selected_row.expanded);
return false;
},