Changeset 4850


Ignore:
Timestamp:
Mar 26, 2009, 10:53:48 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #1240: Implement "lazy loading" in the generic "item overview"

Disable lazy-loading for nodes that are known to not have any children.

Location:
branches/2.11-stable/www/common/overview
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.11-stable/www/common/overview/ajax.jsp

    r4840 r4850  
    6262          folderIcon = "Annotation";
    6363        }       
    64         int numChildren = n.getChildren() == null ?
    65           0 : n.getChildren().size();
     64        int numChildren = n.numChildren();
    6665        %>begin
    6766id  <%=n.getId()%>
    6867title <%=n.getTitle() + (n.getNodeType() == Node.Type.FOLDER ? " (" + numChildren + ")" : "")%>
    6968folderIcon  <%=folderIcon %>
     69numChildren <%=numChildren %>
    7070end
    7171<%
  • branches/2.11-stable/www/common/overview/tree.jsp

    r4847 r4850  
    264264      {
    265265        var id = kv['id'];
    266         var folderIcon = kv['folderIcon'];                               
     266        var folderIcon = kv['folderIcon'];   
     267        var numChildren = kv['numChildren'];                           
    267268        numAdded++;
    268269        var node = JoustMenu.addLazyChildItem(
    269270              parentMenu.index, folderIcon, Main.trimString(kv['title']), 'showInfo(\''+id+'\')',
    270                 '' , id, 'lazyInitSubNode(\''+id+'\')');
     271                '' , id, numChildren == '0' ? '' : 'lazyInitSubNode(\''+id+'\')');
    271272      }
    272273      else
Note: See TracChangeset for help on using the changeset viewer.