]>
git.proxmox.com Git - extjs.git/blob - extjs/classic/classic/overrides/app/Application.js
4 Ext
.define('Ext.overrides.app.Application', {
5 override
: 'Ext.app.Application',
7 'Ext.tip.QuickTipManager'
10 // @cmd-auto-dependency {aliasPrefix: "view.", mvc: true, requires: ["Ext.plugin.Viewport"]}
12 * @cfg {Boolean/String} [autoCreateViewport=false]
13 * @deprecated 5.1 Instead use {@link #mainView}
14 * @member Ext.app.Application
16 autoCreateViewport
: false,
20 * @cfg {Boolean} enableQuickTips
21 * True to automatically set up Ext.tip.QuickTip support.
22 * @member Ext.app.Application
27 applyMainView: function(mainView
) {
28 var view
, proto
, config
, plugins
;
30 if (typeof mainView
=== 'string') {
31 view
= this.getView(mainView
);
33 view
= Ext
.ClassManager
.getByConfig(mainView
);
35 proto
= view
.prototype;
37 if (!proto
.isViewport
) {
38 plugins
= proto
.plugins
;
39 // Need to copy over any plugins defined on the prototype.
40 plugins
= ['viewport'].concat(plugins
? Ext
.Array
.from(plugins
, true) : []);
46 return view
.create(config
);
49 getDependencies: function(cls
, data
, requires
) {
50 var Controller
= Ext
.app
.Controller
,
51 proto
= cls
.prototype,
52 namespace = data
.$namespace,
53 viewportClass
= data
.autoCreateViewport
;
58 Ext
.raise("[Ext.app.Application] Can't resolve namespace for " +
59 data
.$className
+ ", did you forget to specify 'name' property?");
63 if (viewportClass
=== true) {
64 viewportClass
= 'Viewport';
66 requires
.push('Ext.plugin.Viewport');
69 Controller
.processDependencies(proto
, requires
, namespace, 'view', viewportClass
);
73 onBeforeLaunch: function() {
75 autoCreateViewport
= me
.autoCreateViewport
;
77 if (me
.getEnableQuickTips()) {
81 if(autoCreateViewport
) {
85 this.callParent(arguments
);
88 getViewportName: function () {
90 autoCreate
= this.autoCreateViewport
;
93 name
= (autoCreate
=== true) ? 'Viewport' : autoCreate
;
99 initViewport: function() {
100 this.setMainView(this.getViewportName());
103 initQuickTips: function() {
104 Ext
.tip
.QuickTipManager
.init();