Loading template/app/Application.js +11 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,17 @@ Ext.define('Docs.Application', { Ext.create('Docs.view.Viewport'); // Update favorites grid height between browser tabs if changed Ext.getStore('Settings').on('load', function(store) { var favHeight = Docs.Settings.get('favorites-height'); if (favHeight) { var tabPanel = Ext.getCmp('classes-tab-panel'); tabPanel.suspendEvents(); tabPanel.setHeight(favHeight); tabPanel.resumeEvents(); } }); Docs.History.init(); // When google analytics event tracking script present on page Loading template/app/Favorites.js +22 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,28 @@ Ext.define("Docs.Favorites", { storeName: 'Favorites', singleton: true, init: function() { this.callParent(arguments); // Populate favorites with Top 10 classes if (this.store.data.items.length == 0) { this.store.add([ { cls: 'Ext.data.Store' }, { cls: 'Ext' }, { cls: 'Ext.grid.Panel' }, { cls: 'Ext.panel.Panel' }, { cls: 'Ext.form.field.ComboBox' }, { cls: 'Ext.data.Model' }, { cls: 'Ext.form.Panel' }, { cls: 'Ext.button.Button' }, { cls: 'Ext.tree.Panel' }, { cls: 'Ext.Component' } ]); this.syncStore(); } }, /** * Associates Favorites with Docs TreePanel component. * @param {Docs.view.tree.Tree} tree Loading template/app/controller/Classes.js +10 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ Ext.define('Docs.controller.Classes', { } ], activeUrl: null, init: function() { this.addEvents( /** Loading Loading @@ -149,6 +151,9 @@ Ext.define('Docs.controller.Classes', { var cls = clsUrl; var member; if (this.activeUrl == clsUrl) return; this.activeUrl = clsUrl; if (!noHistory) { Docs.History.push("/api/" + clsUrl); } Loading Loading @@ -177,7 +182,7 @@ Ext.define('Docs.controller.Classes', { this.showClass(json, member); }, failure : function(response, opts) { console.log('Fail'); // console.log('Fail'); }, scope: this }); Loading Loading @@ -209,6 +214,10 @@ Ext.define('Docs.controller.Classes', { }, showGuide: function(name, noHistory) { if (this.activeUrl == name) return; this.activeUrl = name; noHistory || Docs.History.push("/guide/" + name); Ext.data.JsonP.request({ Loading template/app/view/Viewport.js +4 −4 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ Ext.define('Docs.view.Viewport', { region: 'north', height: Docs.Settings.get('favorites-height') || 150, padding: '2 4 0 0', bodyPadding: '8 15 8 12', bodyPadding: '3 15 0 12', border: false, plain: true, split: true, Loading @@ -111,6 +111,7 @@ Ext.define('Docs.view.Viewport', { plugins: [{ pluginId: 'favGridDD', ptype: 'gridviewdragdrop', animate: true, dragText: 'Drag and drop to reorganize' }], listeners: { Loading Loading @@ -209,10 +210,9 @@ Ext.define('Docs.view.Viewport', { */ setPageTitle: function(text) { text = Ext.util.Format.stripTags(text); var title = Ext.query("title")[0]; if (!this.origTitle) { this.origTitle = title.innerHTML; this.origTitle = document.title; } title.innerHTML = text ? (text + " - " + this.origTitle) : this.origTitle; document.title = text ? (text + " - " + this.origTitle) : this.origTitle; } }); template/resources/sass/viewport.scss +11 −6 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ a { background: #fff; @include border-radius(5px); @include box-shadow(0, 0, 4px, rgba(0, 0, 0, 0.4)); line-height: 1.4em; line-height: 1.5em; h3 { font-size: 1.2em; padding: 1em 0 0.4em 0; Loading Loading @@ -508,6 +508,10 @@ a { margin: 0 0 1em 2em; li { list-style: disc outside; } } ol { margin: 0 0 1em 2em; li { list-style: decimal outside; } } h3 { font-weight: bold; font-size: 1.1em; } Loading @@ -528,8 +532,9 @@ a { @mixin guides-h3-heading { font-weight: bold; color: #314e64; margin-top: 1em; font-size: 14px; margin-top: 0.5em; padding-top: 16px; font-size: 16px; line-height: 16px; margin-bottom: 4px; } Loading Loading @@ -559,7 +564,7 @@ a { @include guides-h3-heading; } } .class-overview { .deprecated-signature, .protected-signature, .static-signature, .constructor-signature { .deprecated-signature, .protected-signature, .static-signature { font-weight: bold; text-transform: uppercase; color: white; Loading @@ -575,8 +580,8 @@ a { background-color: $docs-text-color; } .constructor-signature { margin-left: 0; margin-right: 5px; background-color: $docs-text-color; } margin-right: 3px; color: $docs-link-color; } .cfgGroup { margin: 10px 0 3px 0; } } Loading Loading
template/app/Application.js +11 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,17 @@ Ext.define('Docs.Application', { Ext.create('Docs.view.Viewport'); // Update favorites grid height between browser tabs if changed Ext.getStore('Settings').on('load', function(store) { var favHeight = Docs.Settings.get('favorites-height'); if (favHeight) { var tabPanel = Ext.getCmp('classes-tab-panel'); tabPanel.suspendEvents(); tabPanel.setHeight(favHeight); tabPanel.resumeEvents(); } }); Docs.History.init(); // When google analytics event tracking script present on page Loading
template/app/Favorites.js +22 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,28 @@ Ext.define("Docs.Favorites", { storeName: 'Favorites', singleton: true, init: function() { this.callParent(arguments); // Populate favorites with Top 10 classes if (this.store.data.items.length == 0) { this.store.add([ { cls: 'Ext.data.Store' }, { cls: 'Ext' }, { cls: 'Ext.grid.Panel' }, { cls: 'Ext.panel.Panel' }, { cls: 'Ext.form.field.ComboBox' }, { cls: 'Ext.data.Model' }, { cls: 'Ext.form.Panel' }, { cls: 'Ext.button.Button' }, { cls: 'Ext.tree.Panel' }, { cls: 'Ext.Component' } ]); this.syncStore(); } }, /** * Associates Favorites with Docs TreePanel component. * @param {Docs.view.tree.Tree} tree Loading
template/app/controller/Classes.js +10 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ Ext.define('Docs.controller.Classes', { } ], activeUrl: null, init: function() { this.addEvents( /** Loading Loading @@ -149,6 +151,9 @@ Ext.define('Docs.controller.Classes', { var cls = clsUrl; var member; if (this.activeUrl == clsUrl) return; this.activeUrl = clsUrl; if (!noHistory) { Docs.History.push("/api/" + clsUrl); } Loading Loading @@ -177,7 +182,7 @@ Ext.define('Docs.controller.Classes', { this.showClass(json, member); }, failure : function(response, opts) { console.log('Fail'); // console.log('Fail'); }, scope: this }); Loading Loading @@ -209,6 +214,10 @@ Ext.define('Docs.controller.Classes', { }, showGuide: function(name, noHistory) { if (this.activeUrl == name) return; this.activeUrl = name; noHistory || Docs.History.push("/guide/" + name); Ext.data.JsonP.request({ Loading
template/app/view/Viewport.js +4 −4 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ Ext.define('Docs.view.Viewport', { region: 'north', height: Docs.Settings.get('favorites-height') || 150, padding: '2 4 0 0', bodyPadding: '8 15 8 12', bodyPadding: '3 15 0 12', border: false, plain: true, split: true, Loading @@ -111,6 +111,7 @@ Ext.define('Docs.view.Viewport', { plugins: [{ pluginId: 'favGridDD', ptype: 'gridviewdragdrop', animate: true, dragText: 'Drag and drop to reorganize' }], listeners: { Loading Loading @@ -209,10 +210,9 @@ Ext.define('Docs.view.Viewport', { */ setPageTitle: function(text) { text = Ext.util.Format.stripTags(text); var title = Ext.query("title")[0]; if (!this.origTitle) { this.origTitle = title.innerHTML; this.origTitle = document.title; } title.innerHTML = text ? (text + " - " + this.origTitle) : this.origTitle; document.title = text ? (text + " - " + this.origTitle) : this.origTitle; } });
template/resources/sass/viewport.scss +11 −6 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ a { background: #fff; @include border-radius(5px); @include box-shadow(0, 0, 4px, rgba(0, 0, 0, 0.4)); line-height: 1.4em; line-height: 1.5em; h3 { font-size: 1.2em; padding: 1em 0 0.4em 0; Loading Loading @@ -508,6 +508,10 @@ a { margin: 0 0 1em 2em; li { list-style: disc outside; } } ol { margin: 0 0 1em 2em; li { list-style: decimal outside; } } h3 { font-weight: bold; font-size: 1.1em; } Loading @@ -528,8 +532,9 @@ a { @mixin guides-h3-heading { font-weight: bold; color: #314e64; margin-top: 1em; font-size: 14px; margin-top: 0.5em; padding-top: 16px; font-size: 16px; line-height: 16px; margin-bottom: 4px; } Loading Loading @@ -559,7 +564,7 @@ a { @include guides-h3-heading; } } .class-overview { .deprecated-signature, .protected-signature, .static-signature, .constructor-signature { .deprecated-signature, .protected-signature, .static-signature { font-weight: bold; text-transform: uppercase; color: white; Loading @@ -575,8 +580,8 @@ a { background-color: $docs-text-color; } .constructor-signature { margin-left: 0; margin-right: 5px; background-color: $docs-text-color; } margin-right: 3px; color: $docs-link-color; } .cfgGroup { margin: 10px 0 3px 0; } } Loading