diff --git a/template/app/History.js b/template/app/History.js index 83965030e1336f02349283a890ff412ac32c1cc3..257498e01e2da0c7c4323b910ea5e7e0e56fcabe 100644 --- a/template/app/History.js +++ b/template/app/History.js @@ -59,7 +59,12 @@ Ext.define("Docs.History", { Docs.App.getController('Examples').loadExample(url.url, true); } else { - Docs.App.getController('Welcome').loadIndex(true); + if (Docs.App.getController('Welcome').isActive()) { + Docs.App.getController('Welcome').loadIndex(true); + } + else { + Docs.App.getController('Classes').loadIndex(true); + } } }, diff --git a/template/app/controller/Welcome.js b/template/app/controller/Welcome.js index 99a8215bfbf30189a9e665b31bd908490314df77..3fc26ea4e33bc79ad154cab3336adf324a7885ea 100644 --- a/template/app/controller/Welcome.js +++ b/template/app/controller/Welcome.js @@ -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(); } });