Loading template/js/App.js +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ Ext.define("Docs.App", { Ext.Array.forEach(Ext.query("#api-overview .guides a"), function(el) { Ext.get(el).addListener('click', function() { this.setGuideMode(); Docs.Guides.load(el.href); Docs.Guides.load(el.className); }, this, {preventDefault: true}); }, this); Loading template/js/Guides.js +6 −3 Original line number Diff line number Diff line Loading @@ -7,11 +7,14 @@ Ext.define("Docs.Guides", { /** * Loads guide from given URL. * * @param {String} url * @param {String} name name of the guide * @param {Boolean} noHistory true to not add browser history entry */ load: function(url) { load: function(name, noHistory) { noHistory || Docs.History.push("/guide/" + name); Ext.Ajax.request({ url: url, url: Docs.App.getBaseUrl() + "/guides/" + name + "/index.html", success: function(response) { var html = response.responseText; this.render(html); Loading template/js/History.js +10 −6 Original line number Diff line number Diff line Loading @@ -25,17 +25,21 @@ Ext.define("Docs.History", { // Parses current URL and navigates to the page navigate: function() { var className = this.parseUrl(); if (className) { Docs.ClassLoader.load(className, true); Ext.getCmp('treePanelCmp').selectClass(className); var url = this.parseUrl(); if (url.type === "api") { Docs.ClassLoader.load(url.key, true); Ext.getCmp('treePanelCmp').selectClass(url.key); } else if (url.type === "guide") { Docs.App.setGuideMode(); Docs.Guides.load(url.key, true); } }, // Parses current browser location parseUrl: function() { var matches = document.location.hash.match(/#\/api\/(.*)/); return matches ? matches[1] : undefined; var matches = document.location.hash.match(/#\/(api|guide)\/(.*)/); return matches ? {type: matches[1], key: matches[2]} : {}; }, /** Loading Loading
template/js/App.js +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ Ext.define("Docs.App", { Ext.Array.forEach(Ext.query("#api-overview .guides a"), function(el) { Ext.get(el).addListener('click', function() { this.setGuideMode(); Docs.Guides.load(el.href); Docs.Guides.load(el.className); }, this, {preventDefault: true}); }, this); Loading
template/js/Guides.js +6 −3 Original line number Diff line number Diff line Loading @@ -7,11 +7,14 @@ Ext.define("Docs.Guides", { /** * Loads guide from given URL. * * @param {String} url * @param {String} name name of the guide * @param {Boolean} noHistory true to not add browser history entry */ load: function(url) { load: function(name, noHistory) { noHistory || Docs.History.push("/guide/" + name); Ext.Ajax.request({ url: url, url: Docs.App.getBaseUrl() + "/guides/" + name + "/index.html", success: function(response) { var html = response.responseText; this.render(html); Loading
template/js/History.js +10 −6 Original line number Diff line number Diff line Loading @@ -25,17 +25,21 @@ Ext.define("Docs.History", { // Parses current URL and navigates to the page navigate: function() { var className = this.parseUrl(); if (className) { Docs.ClassLoader.load(className, true); Ext.getCmp('treePanelCmp').selectClass(className); var url = this.parseUrl(); if (url.type === "api") { Docs.ClassLoader.load(url.key, true); Ext.getCmp('treePanelCmp').selectClass(url.key); } else if (url.type === "guide") { Docs.App.setGuideMode(); Docs.Guides.load(url.key, true); } }, // Parses current browser location parseUrl: function() { var matches = document.location.hash.match(/#\/api\/(.*)/); return matches ? matches[1] : undefined; var matches = document.location.hash.match(/#\/(api|guide)\/(.*)/); return matches ? {type: matches[1], key: matches[2]} : {}; }, /** Loading