Loading template/app/controller/Guides.js +4 −2 Original line number Diff line number Diff line Loading @@ -133,8 +133,10 @@ Ext.define('Docs.controller.Guides', { } this.getViewport().setPageTitle(json.title); if (this.activeUrl !== url) { Ext.getCmp("guide").update('<a class="print guide" href="?print=/guide/' + name + '" target="_blank">Print</a>' + json.guide); Docs.Syntax.highlight(Ext.get("guide")); Ext.getCmp("guide").load({ name: name, content: json.guide }); } this.activeUrl = url; this.scrollContent(); Loading template/app/controller/InlineExamples.js +15 −11 Original line number Diff line number Diff line Loading @@ -59,7 +59,17 @@ Ext.define('Docs.controller.InlineExamples', { } }, 'classoverview': { resize: function() { resize: this.adjustSize, afterload: this.replaceExampleDivs }, 'guidecontainer': { resize: this.adjustSize, afterload: this.replaceExampleDivs } }); }, adjustSize: function() { Ext.Array.each(Ext.ComponentQuery.query('.inlineexample'), function(c) { if (c.codeEditor) { c.doLayout(); Loading @@ -67,12 +77,6 @@ Ext.define('Docs.controller.InlineExamples', { } }); }, afterload: function() { this.replaceExampleDivs(); } } }); }, activateTab: function(cmp, buttonCls) { Ext.Array.each(cmp.up('inlineexample').query('toolbar button'), function(b) { Loading template/app/view/Viewport.js +2 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ Ext.define('Docs.view.Viewport', { 'Docs.view.cls.Index', 'Docs.view.cls.Container', 'Docs.view.guides.Index', 'Docs.view.guides.Container', 'Docs.view.videos.Index', 'Docs.view.videos.Container', 'Docs.view.examples.Index' Loading Loading @@ -108,7 +109,7 @@ Ext.define('Docs.view.Viewport', { }, { autoScroll: true, xtype: 'container', xtype: 'guidecontainer', id: 'guide', cls: 'iScroll' }, Loading template/app/view/guides/Container.js 0 → 100644 +37 −0 Original line number Diff line number Diff line /** * The guide page. * * Renders the guide and print button. */ Ext.define('Docs.view.guides.Container', { extend: 'Ext.container.Container', alias: 'widget.guidecontainer', componentCls: 'guide-container', initComponent: function() { this.addEvents( /** * @event * Fired after guide loaded. */ 'afterload' ); this.callParent(arguments); }, /** * Loads guide into the page. * @param {Object} guide */ load: function(guide) { this.tpl = this.tpl || new Ext.XTemplate( '<a class="print guide" href="?print=/guide/{name}" target="_blank">Print</a>', '{content}' ); this.update(this.tpl.apply(guide)); Docs.Syntax.highlight(this.getEl()); this.fireEvent('afterload'); } }); No newline at end of file template/resources/sass/viewport.scss +1 −1 Original line number Diff line number Diff line Loading @@ -383,7 +383,7 @@ a { border: 0; } .class-overview, #guide { .class-overview, .guide-container { pre { background-color: #f7f7f7; border: solid 1px #e8e8e8; Loading Loading
template/app/controller/Guides.js +4 −2 Original line number Diff line number Diff line Loading @@ -133,8 +133,10 @@ Ext.define('Docs.controller.Guides', { } this.getViewport().setPageTitle(json.title); if (this.activeUrl !== url) { Ext.getCmp("guide").update('<a class="print guide" href="?print=/guide/' + name + '" target="_blank">Print</a>' + json.guide); Docs.Syntax.highlight(Ext.get("guide")); Ext.getCmp("guide").load({ name: name, content: json.guide }); } this.activeUrl = url; this.scrollContent(); Loading
template/app/controller/InlineExamples.js +15 −11 Original line number Diff line number Diff line Loading @@ -59,7 +59,17 @@ Ext.define('Docs.controller.InlineExamples', { } }, 'classoverview': { resize: function() { resize: this.adjustSize, afterload: this.replaceExampleDivs }, 'guidecontainer': { resize: this.adjustSize, afterload: this.replaceExampleDivs } }); }, adjustSize: function() { Ext.Array.each(Ext.ComponentQuery.query('.inlineexample'), function(c) { if (c.codeEditor) { c.doLayout(); Loading @@ -67,12 +77,6 @@ Ext.define('Docs.controller.InlineExamples', { } }); }, afterload: function() { this.replaceExampleDivs(); } } }); }, activateTab: function(cmp, buttonCls) { Ext.Array.each(cmp.up('inlineexample').query('toolbar button'), function(b) { Loading
template/app/view/Viewport.js +2 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ Ext.define('Docs.view.Viewport', { 'Docs.view.cls.Index', 'Docs.view.cls.Container', 'Docs.view.guides.Index', 'Docs.view.guides.Container', 'Docs.view.videos.Index', 'Docs.view.videos.Container', 'Docs.view.examples.Index' Loading Loading @@ -108,7 +109,7 @@ Ext.define('Docs.view.Viewport', { }, { autoScroll: true, xtype: 'container', xtype: 'guidecontainer', id: 'guide', cls: 'iScroll' }, Loading
template/app/view/guides/Container.js 0 → 100644 +37 −0 Original line number Diff line number Diff line /** * The guide page. * * Renders the guide and print button. */ Ext.define('Docs.view.guides.Container', { extend: 'Ext.container.Container', alias: 'widget.guidecontainer', componentCls: 'guide-container', initComponent: function() { this.addEvents( /** * @event * Fired after guide loaded. */ 'afterload' ); this.callParent(arguments); }, /** * Loads guide into the page. * @param {Object} guide */ load: function(guide) { this.tpl = this.tpl || new Ext.XTemplate( '<a class="print guide" href="?print=/guide/{name}" target="_blank">Print</a>', '{content}' ); this.update(this.tpl.apply(guide)); Docs.Syntax.highlight(this.getEl()); this.fireEvent('afterload'); } }); No newline at end of file
template/resources/sass/viewport.scss +1 −1 Original line number Diff line number Diff line Loading @@ -383,7 +383,7 @@ a { border: 0; } .class-overview, #guide { .class-overview, .guide-container { pre { background-color: #f7f7f7; border: solid 1px #e8e8e8; Loading