Commit b18f5bf3 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Make classes page the main page if no welcome page.

parent f80d3e7a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -59,8 +59,13 @@ Ext.define("Docs.History", {
            Docs.App.getController('Examples').loadExample(url.url, true);
        }
        else {
            if (Docs.App.getController('Welcome').isActive()) {
                Docs.App.getController('Welcome').loadIndex(true);
            }
            else {
                Docs.App.getController('Classes').loadIndex(true);
            }
        }
    },

    // Parses current browser location
+8 −0
Original line number Diff line number Diff line
@@ -37,5 +37,13 @@ Ext.define('Docs.controller.Welcome', {
        );
        Ext.getCmp("failure").update(tpl.apply({msg: msg}));
        Ext.getCmp('card-panel').layout.setActiveItem("failure");
    },

    /**
     * True if welcome page is available.
     * @return {Boolean}
     */
    isActive: function() {
        return !!this.getIndex().getTab();
    }
});