Loading template/app.js +2 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ Ext.application({ ], launch: function() { Docs.App = this; Ext.create('Docs.view.Viewport'); Docs.History.init(); } }); template/app/controller/Classes.js +27 −21 Original line number Diff line number Diff line Loading @@ -10,6 +10,14 @@ Ext.define('Docs.controller.Classes', { ], init: function() { Ext.getBody().addListener('click', function(cmp, el) { this.loadClass(el.rel); }, this, { preventDefault: true, delegate: '.docClass' }); this.control({ '#treePanelCmp': { itemclick: this.treeItemClick Loading Loading @@ -41,13 +49,6 @@ Ext.define('Docs.controller.Classes', { preventDefault: true, delegate: '.not-expandable' }); cmp.el.addListener('click', function(cmp, el) { this.loadClass(el.rel); }, this, { preventDefault: true, delegate: '.docClass' }); } } }); Loading Loading @@ -103,6 +104,8 @@ Ext.define('Docs.controller.Classes', { }, showClass: function(cls, anchor) { if (this.currentCls != cls) { var container = Ext.getCmp('container'), showClass = container.down('showclass'), classHeader = showClass.down('classheader'), Loading @@ -118,6 +121,7 @@ Ext.define('Docs.controller.Classes', { } Ext.getCmp('treePanelCmp').selectClass(cls.name); } if (anchor) { Ext.getCmp('doc-overview').scrollToEl("#" + anchor); Loading @@ -125,6 +129,8 @@ Ext.define('Docs.controller.Classes', { var docContent = Ext.get(Ext.query('#doc-overview .x-panel-body')[0]); docContent.scrollTo('top', 0); } this.currentCls = cls; }, showGuide: function(name, noHistory) { Loading template/app/controller/Search.js 0 → 100644 +33 −0 Original line number Diff line number Diff line Ext.define('Docs.controller.Search', { extend: 'Ext.app.Controller', views: [ 'search.Dropdown' ], init: function() { this.control({ '#treePanelCmp': { itemclick: this.treeItemClick } }); }, handleClick: function(curItem) { curItem = curItem || panel.getSelectionModel().getLastSelected(); var cls = curItem.data.cls; if (curItem.data.type != 'cls') { cls += '-' + curItem.data.type + '-' + curItem.data.member; } panel.hide(); Docs.controller.Classes.loadClass(cls); } // listeners: { // itemclick: function(panel, item) { // this.handleClick(item); // } // } }); template/app/store/Search.js 0 → 100644 +0 −0 Empty file added. template/app/view/Viewport.js +3 −1 Original line number Diff line number Diff line Loading @@ -44,12 +44,14 @@ Ext.define('Docs.view.Viewport', { listeners: { click: function() { Ext.getCmp('container').layout.setActiveItem(0); Docs.History.push(""); } } }, { cls: 'search', height: 40 height: 40, html: '<input type="text" id="search-field" />' }, { flex: 1, Loading Loading
template/app.js +2 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ Ext.application({ ], launch: function() { Docs.App = this; Ext.create('Docs.view.Viewport'); Docs.History.init(); } });
template/app/controller/Classes.js +27 −21 Original line number Diff line number Diff line Loading @@ -10,6 +10,14 @@ Ext.define('Docs.controller.Classes', { ], init: function() { Ext.getBody().addListener('click', function(cmp, el) { this.loadClass(el.rel); }, this, { preventDefault: true, delegate: '.docClass' }); this.control({ '#treePanelCmp': { itemclick: this.treeItemClick Loading Loading @@ -41,13 +49,6 @@ Ext.define('Docs.controller.Classes', { preventDefault: true, delegate: '.not-expandable' }); cmp.el.addListener('click', function(cmp, el) { this.loadClass(el.rel); }, this, { preventDefault: true, delegate: '.docClass' }); } } }); Loading Loading @@ -103,6 +104,8 @@ Ext.define('Docs.controller.Classes', { }, showClass: function(cls, anchor) { if (this.currentCls != cls) { var container = Ext.getCmp('container'), showClass = container.down('showclass'), classHeader = showClass.down('classheader'), Loading @@ -118,6 +121,7 @@ Ext.define('Docs.controller.Classes', { } Ext.getCmp('treePanelCmp').selectClass(cls.name); } if (anchor) { Ext.getCmp('doc-overview').scrollToEl("#" + anchor); Loading @@ -125,6 +129,8 @@ Ext.define('Docs.controller.Classes', { var docContent = Ext.get(Ext.query('#doc-overview .x-panel-body')[0]); docContent.scrollTo('top', 0); } this.currentCls = cls; }, showGuide: function(name, noHistory) { Loading
template/app/controller/Search.js 0 → 100644 +33 −0 Original line number Diff line number Diff line Ext.define('Docs.controller.Search', { extend: 'Ext.app.Controller', views: [ 'search.Dropdown' ], init: function() { this.control({ '#treePanelCmp': { itemclick: this.treeItemClick } }); }, handleClick: function(curItem) { curItem = curItem || panel.getSelectionModel().getLastSelected(); var cls = curItem.data.cls; if (curItem.data.type != 'cls') { cls += '-' + curItem.data.type + '-' + curItem.data.member; } panel.hide(); Docs.controller.Classes.loadClass(cls); } // listeners: { // itemclick: function(panel, item) { // this.handleClick(item); // } // } });
template/app/view/Viewport.js +3 −1 Original line number Diff line number Diff line Loading @@ -44,12 +44,14 @@ Ext.define('Docs.view.Viewport', { listeners: { click: function() { Ext.getCmp('container').layout.setActiveItem(0); Docs.History.push(""); } } }, { cls: 'search', height: 40 height: 40, html: '<input type="text" id="search-field" />' }, { flex: 1, Loading