Loading lib/jsduck/options.rb +2 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ module JsDuck @categories_path = nil @inline_examples_dir = nil @pretty_json = false @link_tpl = '<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' @link_tpl = '<a href="#!/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' # Note that we wrap image template inside <p> because {@img} often # appears inline within text, but that just looks ugly in HTML @img_tpl = '<p><img src="doc-resources/%u" alt="%a"></p>' Loading Loading @@ -166,7 +166,7 @@ module JsDuck "%# - inserts '#' if member name present", "%- - inserts '-' if member name present", "%a - anchor text for link", "Default is: '<a href=\"#/api/%c%-%m\" rel=\"%c%-%m\" class=\"docClass\">%a</a>'", " ") do |tpl| "Default is: '<a href=\"#!/api/%c%-%m\" rel=\"%c%-%m\" class=\"docClass\">%a</a>'", " ") do |tpl| @link_tpl = tpl end Loading template/app/History.js +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ Ext.define("Docs.History", { // Parses current URL and navigates to the page navigate: function(token) { token = token.replace(/^!/, ""); var url = this.parseToken(token); if (url.url == "/api") { Docs.App.getController('Classes').loadIndex(true); Loading Loading @@ -58,6 +59,9 @@ Ext.define("Docs.History", { * @param {String} token the part of URL after # */ push: function(token) { if (!/^#!?/.test(token)) { token = "#!"+token; } Ext.util.History.add(token); } }); template/app/Renderer.js +3 −3 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ Ext.define('Docs.Renderer', { }, renderLink: function(className) { return Ext.String.format('<a href="#/api/{0}" rel="{0}" class="docClass">{0}</a>', className); return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{0}</a>', className); }, renderMembers: function(cls) { Loading Loading @@ -165,7 +165,7 @@ Ext.define('Docs.Renderer', { // member name and type + link to owner class and source '<div class="title">', '<div class="meta">', '<a href="#/api/{owner}" rel="{owner}" class="definedIn docClass">{owner}</a><br/>', '<a href="#!/api/{owner}" rel="{owner}" class="definedIn docClass">{owner}</a><br/>', '<a href="source/{href}" target="_blank" class="viewSource">view source</a>', '</div>', '{signature}', Loading Loading @@ -208,7 +208,7 @@ Ext.define('Docs.Renderer', { renderSignature: function(member) { this.signatureTpl = this.signatureTpl || new Ext.XTemplate( '{before}<a href="#/api/{owner}-{tagname}-{name}" class="name {expandable}">{name}</a>{params}{after}' '{before}<a href="#!/api/{owner}-{tagname}-{name}" class="name {expandable}">{name}</a>{params}{after}' ); var cfg = Ext.apply({}, member); Loading template/app/controller/Classes.js +5 −5 Original line number Diff line number Diff line Loading @@ -129,11 +129,11 @@ Ext.define('Docs.controller.Classes', { // We don't want to select the class that was opened in another window, // so restore the previous selection. handleUrlClick: function(url, event, view) { // Remove everything up to # url = url.replace(/.*#/, ""); // Remove everything up to #! url = url.replace(/.*#!?/, ""); if (this.opensNewWindow(event)) { window.open("#"+url); window.open("#!"+url); view && view.selectUrl(this.activeUrl ? this.activeUrl : ""); } else { Loading @@ -149,10 +149,10 @@ Ext.define('Docs.controller.Classes', { loadIndex: function(noHistory) { this.activeUrl = ""; if (!noHistory) { Docs.History.push("#/api"); Docs.History.push("#!/api"); } this.getViewport().setPageTitle(""); Ext.getCmp('doctabs').activateTab('#/api'); Ext.getCmp('doctabs').activateTab('#!/api'); Ext.getCmp('treecontainer').showTree('classtree'); Ext.getCmp('card-panel').layout.setActiveItem('classindex'); }, Loading template/app/controller/Examples.js +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ Ext.define('Docs.controller.Examples', { }, loadIndex: function() { Ext.getCmp('doctabs').activateTab('#/example'); Ext.getCmp('doctabs').activateTab('#!/example'); Ext.getCmp('card-panel').layout.setActiveItem('exampleindex'); Ext.getCmp('treecontainer').showTree('exampletree'); }, Loading Loading
lib/jsduck/options.rb +2 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ module JsDuck @categories_path = nil @inline_examples_dir = nil @pretty_json = false @link_tpl = '<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' @link_tpl = '<a href="#!/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' # Note that we wrap image template inside <p> because {@img} often # appears inline within text, but that just looks ugly in HTML @img_tpl = '<p><img src="doc-resources/%u" alt="%a"></p>' Loading Loading @@ -166,7 +166,7 @@ module JsDuck "%# - inserts '#' if member name present", "%- - inserts '-' if member name present", "%a - anchor text for link", "Default is: '<a href=\"#/api/%c%-%m\" rel=\"%c%-%m\" class=\"docClass\">%a</a>'", " ") do |tpl| "Default is: '<a href=\"#!/api/%c%-%m\" rel=\"%c%-%m\" class=\"docClass\">%a</a>'", " ") do |tpl| @link_tpl = tpl end Loading
template/app/History.js +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ Ext.define("Docs.History", { // Parses current URL and navigates to the page navigate: function(token) { token = token.replace(/^!/, ""); var url = this.parseToken(token); if (url.url == "/api") { Docs.App.getController('Classes').loadIndex(true); Loading Loading @@ -58,6 +59,9 @@ Ext.define("Docs.History", { * @param {String} token the part of URL after # */ push: function(token) { if (!/^#!?/.test(token)) { token = "#!"+token; } Ext.util.History.add(token); } });
template/app/Renderer.js +3 −3 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ Ext.define('Docs.Renderer', { }, renderLink: function(className) { return Ext.String.format('<a href="#/api/{0}" rel="{0}" class="docClass">{0}</a>', className); return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{0}</a>', className); }, renderMembers: function(cls) { Loading Loading @@ -165,7 +165,7 @@ Ext.define('Docs.Renderer', { // member name and type + link to owner class and source '<div class="title">', '<div class="meta">', '<a href="#/api/{owner}" rel="{owner}" class="definedIn docClass">{owner}</a><br/>', '<a href="#!/api/{owner}" rel="{owner}" class="definedIn docClass">{owner}</a><br/>', '<a href="source/{href}" target="_blank" class="viewSource">view source</a>', '</div>', '{signature}', Loading Loading @@ -208,7 +208,7 @@ Ext.define('Docs.Renderer', { renderSignature: function(member) { this.signatureTpl = this.signatureTpl || new Ext.XTemplate( '{before}<a href="#/api/{owner}-{tagname}-{name}" class="name {expandable}">{name}</a>{params}{after}' '{before}<a href="#!/api/{owner}-{tagname}-{name}" class="name {expandable}">{name}</a>{params}{after}' ); var cfg = Ext.apply({}, member); Loading
template/app/controller/Classes.js +5 −5 Original line number Diff line number Diff line Loading @@ -129,11 +129,11 @@ Ext.define('Docs.controller.Classes', { // We don't want to select the class that was opened in another window, // so restore the previous selection. handleUrlClick: function(url, event, view) { // Remove everything up to # url = url.replace(/.*#/, ""); // Remove everything up to #! url = url.replace(/.*#!?/, ""); if (this.opensNewWindow(event)) { window.open("#"+url); window.open("#!"+url); view && view.selectUrl(this.activeUrl ? this.activeUrl : ""); } else { Loading @@ -149,10 +149,10 @@ Ext.define('Docs.controller.Classes', { loadIndex: function(noHistory) { this.activeUrl = ""; if (!noHistory) { Docs.History.push("#/api"); Docs.History.push("#!/api"); } this.getViewport().setPageTitle(""); Ext.getCmp('doctabs').activateTab('#/api'); Ext.getCmp('doctabs').activateTab('#!/api'); Ext.getCmp('treecontainer').showTree('classtree'); Ext.getCmp('card-panel').layout.setActiveItem('classindex'); }, Loading
template/app/controller/Examples.js +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ Ext.define('Docs.controller.Examples', { }, loadIndex: function() { Ext.getCmp('doctabs').activateTab('#/example'); Ext.getCmp('doctabs').activateTab('#!/example'); Ext.getCmp('card-panel').layout.setActiveItem('exampleindex'); Ext.getCmp('treecontainer').showTree('exampletree'); }, Loading