Commit 936dbdbf authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Add fav-icons back to class tree.

parent a0ae7696
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -35,6 +35,25 @@ Ext.define('Docs.ClassTree', {
        }
    },

    initComponent: function() {
        // Expand the main tree
        this.root.expanded = true;
        this.root.children[0].expanded = true;
        // Add links for favoriting classes
        this.addFavIcons(this.root);

        this.callParent();
    },

    addFavIcons: function(node) {
        if (node.isClass) {
            node.text += '<a rel="'+node.id+'" class="fav"></a>';
        }
        if (node.children) {
            Ext.Array.forEach(node.children, this.addFavIcons, this);
        }
    },

    selectCurrentClass: function() {
        var treePanel = Ext.getCmp('treePanelCmp');

+0 −2
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@ Ext.onReady(function() {
        }, false);
    }

    Docs.classData.expanded = true;
    Docs.classData.children[0].expanded = true;
    Ext.create('Docs.ClassTree', {
      root: Docs.classData
    });