Loading template/app/Syntax.js 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * Utility for performing syntax highlighting. */ Ext.define("Docs.Syntax", { singleton: true, /** * Marks all code blocks with "prettyprint" class and then calls * the prettify library function to highlight them. * * @param {HTMLElement/Ext.core.Element} root HTML element inside * which to perform the highlighting. */ highlight: function(root) { Ext.Array.forEach(Ext.query("pre > code", root.dom || root), function(el) { Ext.get(el).addCls("prettyprint"); }); prettyPrint(); } }); template/app/controller/Classes.js +1 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ Ext.define('Docs.controller.Classes', { success: function(json) { Ext.getCmp("guide").update(json.guide); Ext.getCmp('container').layout.setActiveItem(2); Docs.Syntax.highlight(Ext.get("guide")); }, scope: this }); Loading template/app/view/class/Overview.js +1 −10 Original line number Diff line number Diff line Loading @@ -48,16 +48,7 @@ Ext.define('Docs.view.class.Overview', { this.addDocked(this.toolbar); this.update(this.renderClass(docClass)); this.syntaxHighlight(); }, // Marks all code blocks with "prettyprint" class and then calls // the prettify library function to highlight them. syntaxHighlight: function() { Ext.Array.forEach(Ext.query("pre > code"), function(el) { Ext.get(el).addCls("prettyprint"); }); prettyPrint(); Docs.Syntax.highlight(this.getEl()); }, renderClass: function(cls) { Loading template/index.html +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ <script type="text/javascript" src="app/controller/Classes.js"></script> <script type="text/javascript" src="app/controller/Search.js"></script> <script type="text/javascript" src="app/History.js"></script> <script type="text/javascript" src="app/Syntax.js"></script> <script type="text/javascript" src="output/tree.js"></script> <script type="text/javascript" src="output/members.js"></script> Loading template/resources/sass/viewport.scss +1 −1 Original line number Diff line number Diff line Loading @@ -371,7 +371,7 @@ a:hover { border: 0; } #doc-overview, #api-guide { #doc-overview, #guide { pre { background-color: #f7f7f7; border: solid 1px #e8e8e8; Loading Loading
template/app/Syntax.js 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * Utility for performing syntax highlighting. */ Ext.define("Docs.Syntax", { singleton: true, /** * Marks all code blocks with "prettyprint" class and then calls * the prettify library function to highlight them. * * @param {HTMLElement/Ext.core.Element} root HTML element inside * which to perform the highlighting. */ highlight: function(root) { Ext.Array.forEach(Ext.query("pre > code", root.dom || root), function(el) { Ext.get(el).addCls("prettyprint"); }); prettyPrint(); } });
template/app/controller/Classes.js +1 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ Ext.define('Docs.controller.Classes', { success: function(json) { Ext.getCmp("guide").update(json.guide); Ext.getCmp('container').layout.setActiveItem(2); Docs.Syntax.highlight(Ext.get("guide")); }, scope: this }); Loading
template/app/view/class/Overview.js +1 −10 Original line number Diff line number Diff line Loading @@ -48,16 +48,7 @@ Ext.define('Docs.view.class.Overview', { this.addDocked(this.toolbar); this.update(this.renderClass(docClass)); this.syntaxHighlight(); }, // Marks all code blocks with "prettyprint" class and then calls // the prettify library function to highlight them. syntaxHighlight: function() { Ext.Array.forEach(Ext.query("pre > code"), function(el) { Ext.get(el).addCls("prettyprint"); }); prettyPrint(); Docs.Syntax.highlight(this.getEl()); }, renderClass: function(cls) { Loading
template/index.html +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ <script type="text/javascript" src="app/controller/Classes.js"></script> <script type="text/javascript" src="app/controller/Search.js"></script> <script type="text/javascript" src="app/History.js"></script> <script type="text/javascript" src="app/Syntax.js"></script> <script type="text/javascript" src="output/tree.js"></script> <script type="text/javascript" src="output/members.js"></script> Loading
template/resources/sass/viewport.scss +1 −1 Original line number Diff line number Diff line Loading @@ -371,7 +371,7 @@ a:hover { border: 0; } #doc-overview, #api-guide { #doc-overview, #guide { pre { background-color: #f7f7f7; border: solid 1px #e8e8e8; Loading