Commit f9dc6024 authored by Nick Poulden's avatar Nick Poulden
Browse files

More example integration

parent 6d78ef02
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,7 +17,10 @@ Ext.define("Docs.History", {
    // Parses current URL and navigates to the page
    navigate: function(token) {
        var url = this.parseToken(token);
        if (url.type === "api") {
        if (url.url == "/api") {
            Docs.App.getController('Classes').loadIndex(true);
        }
        else if (url.type === "api") {
            Docs.App.getController('Classes').loadClass(url.url, true);
        }
        else if (url.type === "guide") {
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ Ext.define('Docs.controller.Classes', {
            Docs.History.push("");
        }
        this.getViewport().setPageTitle("");
        Ext.getCmp('nested-west-region-container').layout.setActiveItem(0);
        Ext.getCmp('card-panel').layout.setActiveItem(0);
    },

+15 −2
Original line number Diff line number Diff line
@@ -38,7 +38,20 @@ Ext.define('Docs.view.examples.Tree', {
    },

    onItemClick: function(view, node, item, index, e) {

        var url = node.raw.url;

        if (url) {
            Ext.getCmp('card-panel').layout.setActiveItem('example');
            Ext.get('exampleIframe').dom.setAttribute('src', 'extjs/examples/' + node.raw.url)
        }
        else if (!node.isLeaf()) {
            if (node.isExpanded()) {
                node.collapse(false);
            }
            else {
                node.expand(false);
            }
        }
    }
});