Changeset 3621 in subversion


Ignore:
Timestamp:
May 15, 2010 10:49:10 AM (3 years ago)
Author:
alec
Message:
  • improve performance of threads expanding/collapsing (significant on IE)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/list.js

    r3584 r3621  
    487487        if (r.has_children) { 
    488488          r.expanded = false; 
    489           this.update_expando(r.uid); 
     489          if (!r.depth || !this.multiexpand) 
     490            this.update_expando(r.uid, false); 
    490491          this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded }); 
    491492        } 
     
    526527        if (r.has_children) { 
    527528          r.expanded = true; 
    528           this.update_expando(r.uid, true); 
     529          // in multiexpand mode only root has expando icon 
     530          // so we don't need to set it for children, this 
     531          // improves performance because getElementById() 
     532          // is relatively slow on IE  
     533          if (!r.depth || !this.multiexpand) 
     534            this.update_expando(r.uid, true); 
    529535          this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded }); 
    530536        } 
     
    10441050      this.collapse(selected_row); 
    10451051 
    1046   var expando = document.getElementById('rcmexpando' + selected_row.uid); 
    1047   if (expando) 
    1048     expando.className = selected_row.expanded?'expanded':'collapsed'; 
     1052  this.update_expando(selected_row.uid, selected_row.expanded); 
    10491053 
    10501054  return false; 
Note: See TracChangeset for help on using the changeset viewer.