-/*!
- * Ext JS Library 3.3.1
- * Copyright(c) 2006-2010 Sencha Inc.
- * licensing@sencha.com
- * http://www.sencha.com/license
- */
/**
* Ext.App
* @extends Ext.util.Observable
* @author Chris Scott
*/
-Ext.App = 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);
-};
-
-Ext.extend(Ext.App, Ext.util.Observable, {
+Ext.define('Ext.App', {
+ extend: 'Ext.util.Observable',
/***
* response status codes.
// 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
- this.msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);
+ this.msgCt = Ext.core.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);
this.msgCt.setStyle('position', 'absolute');
this.msgCt.setStyle('z-index', 9999);
this.msgCt.setWidth(300);
}
// 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,
}
this.msgCt.alignTo(document, 't-t');
- Ext.DomHelper.append(this.msgCt, {html:this.buildMessageBox(status, String.format.apply(String, Array.prototype.slice.call(arguments, 1)))}, true).slideIn('t').pause(delay).ghost("t", {remove:true});
+ Ext.core.DomHelper.append(this.msgCt, {html:this.buildMessageBox(status, String.format.apply(String, Array.prototype.slice.call(arguments, 1)))}, true).slideIn('t').pause(delay).ghost("t", {remove:true});
},
/***
* @param {Object} status
*/
decodeStatusIcon : function(status) {
- iconCls = '';
+ var iconCls = '';
switch (status) {
case true:
case this.STATUS_OK:
handleException : function(res) {
Ext.MessageBox.alert(res.type.toUpperCase(), res.message);
}
-});
\ No newline at end of file
+});