Changeset 488 in subversion


Ignore:
Timestamp:
Feb 21, 2007 3:34:23 AM (6 years ago)
Author:
robin
Message:

Sort subscription folder list after adding or renaming a folder.

File:
1 edited

Legend:

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

    r486 r488  
    25862586      } 
    25872587 
     2588    this.sort_subscription_list(); 
    25882589    }; 
    25892590 
     
    27342735    }; 
    27352736 
     2737  // sort subscription folder list 
     2738  this.sort_subscription_list = function() 
     2739    { 
     2740    var tbody = this.gui_objects.subscriptionlist.tBodies[0]; 
     2741    for (var i = 0; i<(tbody.childNodes.length-1); i++) 
     2742      { 
     2743      if (this.env.subscriptionrows[tbody.childNodes[i].id]!=null) 
     2744        { 
     2745        var swapped = false; 
     2746        for (var j = i+1; j<(tbody.childNodes.length); j++) 
     2747          { 
     2748          if ((this.env.subscriptionrows[tbody.childNodes[j].id]!=null) && 
     2749              (this.env.subscriptionrows[tbody.childNodes[i].id][0]> 
     2750               this.env.subscriptionrows[tbody.childNodes[j].id][0])) 
     2751            { 
     2752            var swap = tbody.replaceChild(tbody.childNodes[i], tbody.childNodes[j]); 
     2753            if (typeof(tbody.childNodes[i]) != 'undefined') 
     2754              tbody.insertBefore(swap, tbody.childNodes[i]) 
     2755            else 
     2756              tbody.appendChild(swap); 
     2757            swapped = true; 
     2758            } 
     2759          } 
     2760        } 
     2761      } 
     2762    }; 
     2763 
    27362764 
    27372765  /*********************************************************/ 
Note: See TracChangeset for help on using the changeset viewer.