app/components/marty/simple_app/client/simple_app.js in marty-2.4.7 vs app/components/marty/simple_app/client/simple_app.js in marty-2.4.8

- old
+ new

@@ -1,50 +1,58 @@ { - initComponent: function(){ + initComponent: function () { this.callParent(); this.mainPanel = this.down('panel[itemId="main_panel"]'); - this.menuBar = this.down('container[itemId="menu_bar"]'); + this.menuBar = this.down('container[itemId="menu_bar"]'); var statusBar = this.statusBar = this.down('container[itemId="status_bar"]'); // Setting the "busy" indicator for Ajax requests - Ext.Ajax.on('beforerequest', function(){ statusBar.showBusy(); }); - Ext.Ajax.on('requestcomplete', function(){ statusBar.hideBusy(); }); - Ext.Ajax.on('requestexception', function(){ statusBar.hideBusy(); }); + Ext.Ajax.on('beforerequest', function () { + statusBar.showBusy(); + }); + Ext.Ajax.on('requestcomplete', function () { + statusBar.hideBusy(); + }); + Ext.Ajax.on('requestexception', function () { + statusBar.hideBusy(); + }); this.setRouting(); }, - setRouting: function(){ + setRouting: function () { this.router = Ext.util.History; this.router.init(); this.router.on('change', this.loadRoute, this); }, - loadRoute: function(token){ - if (token){ - this.netzkeLoadComponent(token, {container: this.mainPanel}); + loadRoute: function (token) { + if (token) { + this.netzkeLoadComponent(token, { + container: this.mainPanel + }); } else { this.mainPanel.removeAll(); } }, - afterRender: function(){ + afterRender: function () { this.callParent(); var currentToken = this.router.getToken(); if (typeof currentToken == "string" && currentToken.length > 0) { this.loadRoute(currentToken); } }, - appLoadComponent: function(name) { + appLoadComponent: function (name) { this.router.add(name); }, - netzkeLoadComponentByAction: function(action){ + netzkeLoadComponentByAction: function (action) { this.router.add(action.name.underscore()); }, - onToggleConfigMode: function(params){ + onToggleConfigMode: function (params) { this.toggleConfigMode(); } }