Loading Rakefile +24 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,29 @@ class JsDuckRunner system "cp -r #{@sdk_dir}/touch/build #{@out_dir}/touch" end def add_product_doc_urls @options += [ "--body-html", <<-EOHTML <script type="text/javascript"> Docs.otherProducts = [ { text: 'Ext JS 4.0', href: 'http://docs.sencha.com/ext-js/4-0' }, { text: 'Sencha Touch 2.0', href: 'http://docs.sencha.com/touch/2-0' }, { text: 'Sencha Animator 1.0', href: 'http://docs.sencha.com/animator/1-0' } ]; </script> EOHTML ] end def run # Pass multiple arguments to system, so we'll take advantage of the built-in escaping system(*["ruby", "bin/jsduck"].concat(@options)) Loading Loading @@ -496,6 +519,7 @@ task :touch2, [:mode] => :sass do |t, args| runner.add_touch2_export_notice if mode == "export" runner.set_touch2_src if mode == "export" runner.add_seo if mode == "debug" || mode == "live" runner.add_product_doc_urls if mode == "live" runner.run runner.copy_touch2_build if mode != "export" Loading template/app/view/Header.js 0 → 100644 +32 −0 Original line number Diff line number Diff line Ext.define('Docs.view.Header', { extend: 'Ext.container.Container', alias: 'widget.docheader', contentEl: 'header-content', initComponent: function() { if (Docs.otherProducts) { this.style = 'cursor: pointer;', this.cls = 'dropdown'; this.menu = Ext.create('Ext.menu.Menu', { renderTo: Ext.getBody(), plain: true, items: Docs.otherProducts }); } this.callParent(); }, listeners: { afterrender: function(cmp) { if (this.menu) { cmp.el.addListener('click', function(cmp, el) { this.menu.showBy(this.el, 'bl', [120, 0]); }, this); } } } }); template/app/view/Viewport.js +4 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ Ext.define('Docs.view.Viewport', { extend: 'Ext.container.Viewport', requires: [ 'Docs.view.search.Container', 'Docs.view.Header', 'Docs.view.Tabs', 'Docs.view.TreeContainer', 'Docs.view.welcome.Index', Loading @@ -24,6 +25,7 @@ Ext.define('Docs.view.Viewport', { defaults: { xtype: 'container' }, initComponent: function() { this.items = [ { region: 'north', Loading @@ -40,10 +42,9 @@ Ext.define('Docs.view.Viewport', { layout: 'hbox', items: [ { xtype: 'container', flex: 1, contentEl: 'header-content' xtype: 'docheader' }, { xtype: 'container', flex: 1 }, { xtype: 'searchcontainer', id: 'search-container', Loading template/resources/images/down-arr.png 0 → 100644 +963 B Loading image diff... template/resources/sass/viewport.scss +5 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,11 @@ a { #north-region { @include vertical-gradient(#074e7c, #095f93); .dropdown { padding-right: 15px; background: url(../images/down-arr.png) no-repeat bottom right; } } #footer { Loading Loading
Rakefile +24 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,29 @@ class JsDuckRunner system "cp -r #{@sdk_dir}/touch/build #{@out_dir}/touch" end def add_product_doc_urls @options += [ "--body-html", <<-EOHTML <script type="text/javascript"> Docs.otherProducts = [ { text: 'Ext JS 4.0', href: 'http://docs.sencha.com/ext-js/4-0' }, { text: 'Sencha Touch 2.0', href: 'http://docs.sencha.com/touch/2-0' }, { text: 'Sencha Animator 1.0', href: 'http://docs.sencha.com/animator/1-0' } ]; </script> EOHTML ] end def run # Pass multiple arguments to system, so we'll take advantage of the built-in escaping system(*["ruby", "bin/jsduck"].concat(@options)) Loading Loading @@ -496,6 +519,7 @@ task :touch2, [:mode] => :sass do |t, args| runner.add_touch2_export_notice if mode == "export" runner.set_touch2_src if mode == "export" runner.add_seo if mode == "debug" || mode == "live" runner.add_product_doc_urls if mode == "live" runner.run runner.copy_touch2_build if mode != "export" Loading
template/app/view/Header.js 0 → 100644 +32 −0 Original line number Diff line number Diff line Ext.define('Docs.view.Header', { extend: 'Ext.container.Container', alias: 'widget.docheader', contentEl: 'header-content', initComponent: function() { if (Docs.otherProducts) { this.style = 'cursor: pointer;', this.cls = 'dropdown'; this.menu = Ext.create('Ext.menu.Menu', { renderTo: Ext.getBody(), plain: true, items: Docs.otherProducts }); } this.callParent(); }, listeners: { afterrender: function(cmp) { if (this.menu) { cmp.el.addListener('click', function(cmp, el) { this.menu.showBy(this.el, 'bl', [120, 0]); }, this); } } } });
template/app/view/Viewport.js +4 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ Ext.define('Docs.view.Viewport', { extend: 'Ext.container.Viewport', requires: [ 'Docs.view.search.Container', 'Docs.view.Header', 'Docs.view.Tabs', 'Docs.view.TreeContainer', 'Docs.view.welcome.Index', Loading @@ -24,6 +25,7 @@ Ext.define('Docs.view.Viewport', { defaults: { xtype: 'container' }, initComponent: function() { this.items = [ { region: 'north', Loading @@ -40,10 +42,9 @@ Ext.define('Docs.view.Viewport', { layout: 'hbox', items: [ { xtype: 'container', flex: 1, contentEl: 'header-content' xtype: 'docheader' }, { xtype: 'container', flex: 1 }, { xtype: 'searchcontainer', id: 'search-container', Loading
template/resources/sass/viewport.scss +5 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,11 @@ a { #north-region { @include vertical-gradient(#074e7c, #095f93); .dropdown { padding-right: 15px; background: url(../images/down-arr.png) no-repeat bottom right; } } #footer { Loading