Loading template/app/History.js +18 −1 Original line number Diff line number Diff line Loading @@ -9,11 +9,28 @@ Ext.define("Docs.History", { */ init: function() { Ext.util.History.init(function() { this.navigate(Ext.util.History.getToken()); this.historyLoaded = true; this.initialNavigate(); }, this); Ext.util.History.on("change", this.navigate, this); }, /** * Called from Tabs controller to notify that initial tabs loading had been done. */ notifyTabsLoaded: function() { this.tabsLoaded = true; this.initialNavigate(); }, // Invoke initial navigation only after both tabs and history are loaded initialNavigate: function() { if (this.tabsLoaded && this.historyLoaded) { this.navigate(Ext.util.History.getToken()); } }, // Parses current URL and navigates to the page navigate: function(token) { var url = this.parseToken(token); Loading template/app/controller/Tabs.js +5 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,10 @@ */ Ext.define('Docs.controller.Tabs', { extend: 'Ext.app.Controller', requires: ['Docs.Settings'], requires: [ 'Docs.History', 'Docs.Settings' ], refs: [ { Loading Loading @@ -93,6 +96,7 @@ Ext.define('Docs.controller.Tabs', { this.addTabFromTree(url, {}); }, this); } Docs.History.notifyTabsLoaded(); }, /** Loading Loading
template/app/History.js +18 −1 Original line number Diff line number Diff line Loading @@ -9,11 +9,28 @@ Ext.define("Docs.History", { */ init: function() { Ext.util.History.init(function() { this.navigate(Ext.util.History.getToken()); this.historyLoaded = true; this.initialNavigate(); }, this); Ext.util.History.on("change", this.navigate, this); }, /** * Called from Tabs controller to notify that initial tabs loading had been done. */ notifyTabsLoaded: function() { this.tabsLoaded = true; this.initialNavigate(); }, // Invoke initial navigation only after both tabs and history are loaded initialNavigate: function() { if (this.tabsLoaded && this.historyLoaded) { this.navigate(Ext.util.History.getToken()); } }, // Parses current URL and navigates to the page navigate: function(token) { var url = this.parseToken(token); Loading
template/app/controller/Tabs.js +5 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,10 @@ */ Ext.define('Docs.controller.Tabs', { extend: 'Ext.app.Controller', requires: ['Docs.Settings'], requires: [ 'Docs.History', 'Docs.Settings' ], refs: [ { Loading Loading @@ -93,6 +96,7 @@ Ext.define('Docs.controller.Tabs', { this.addTabFromTree(url, {}); }, this); } Docs.History.notifyTabsLoaded(); }, /** Loading