X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..HEAD:/examples/shared/extjs/App.js diff --git a/examples/shared/extjs/App.js b/examples/shared/extjs/App.js index b81b159f..033feb91 100644 --- a/examples/shared/extjs/App.js +++ b/examples/shared/extjs/App.js @@ -1,31 +1,24 @@ -/*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** - * Ext.App - * @extends Ext.util.Observable - * @author Chris Scott - */ -Ext.App = function(config) { +/* - // set up StateProvider - this.initStateProvider(); +This file is part of Ext JS 4 - // array of views - this.views = []; +Copyright (c) 2011 Sencha Inc - Ext.apply(this, config); - if (!this.api.actions) { this.api.actions = {}; } +Contact: http://www.sencha.com/contact - // init when onReady fires. - Ext.onReady(this.onReady, this); +GNU General Public License Usage +This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. - Ext.App.superclass.constructor.apply(this, arguments); -} -Ext.extend(Ext.App, Ext.util.Observable, { +If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. + +*/ +/** + * Ext.App + * @extends Ext.util.Observable + * @author Chris Scott + */ +Ext.define('Ext.App', { + extend: 'Ext.util.Observable', /*** * response status codes. @@ -50,6 +43,22 @@ Ext.extend(Ext.App, Ext.util.Observable, { // private, ref to message-box Element. msgCt : null, + constructor: function(config) { + this.views = []; + + this.initStateProvider(); + + Ext.apply(this, config); + + if (!this.api.actions) { + this.api.actions = {}; + } + + Ext.onReady(this.onReady, this); + + Ext.App.superclass.constructor.apply(this, arguments); + }, + // @protected, onReady, executes when Ext.onReady fires. onReady : function() { // create the msgBox container. used for App.setAlert @@ -73,7 +82,7 @@ Ext.extend(Ext.App, Ext.util.Observable, { } // register provider with state manager. - Ext.state.Manager.setProvider(new Ext.state.CookieProvider({ + Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider', { path: '/', expires: exptime, domain: null, @@ -174,7 +183,7 @@ Ext.extend(Ext.App, Ext.util.Observable, { * @param {Object} status */ decodeStatusIcon : function(status) { - iconCls = ''; + var iconCls = ''; switch (status) { case true: case this.STATUS_OK: @@ -233,4 +242,5 @@ Ext.extend(Ext.App, Ext.util.Observable, { handleException : function(res) { Ext.MessageBox.alert(res.type.toUpperCase(), res.message); } -}); \ No newline at end of file +}); +