- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
App.js
资源名称:a.rar [点击查看]
上传用户:aa118c
上传日期:2021-05-13
资源大小:4785k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
HTML/CSS
- /*
- * Ext JS Library 2.2.1
- * Copyright(c) 2006-2009, Ext JS, LLC.
- * licensing@extjs.com
- *
- * http://extjs.com/license
- */
- Ext.app.App = function(cfg){
- Ext.apply(this, cfg);
- this.addEvents({
- 'ready' : true,
- 'beforeunload' : true
- });
- Ext.onReady(this.initApp, this);
- };
- Ext.extend(Ext.app.App, Ext.util.Observable, {
- isReady: false,
- startMenu: null,
- modules: null,
- getStartConfig : function(){
- },
- initApp : function(){
- this.startConfig = this.startConfig || this.getStartConfig();
- this.desktop = new Ext.Desktop(this);
- this.launcher = this.desktop.taskbar.startMenu;
- this.modules = this.getModules();
- if(this.modules){
- this.initModules(this.modules);
- }
- this.init();
- Ext.EventManager.on(window, 'beforeunload', this.onUnload, this);
- this.fireEvent('ready', this);
- this.isReady = true;
- },
- getModules : Ext.emptyFn,
- init : Ext.emptyFn,
- initModules : function(ms){
- for(var i = 0, len = ms.length; i < len; i++){
- var m = ms[i];
- this.launcher.add(m.launcher);
- m.app = this;
- }
- },
- getModule : function(name){
- var ms = this.modules;
- for(var i = 0, len = ms.length; i < len; i++){
- if(ms[i].id == name || ms[i].appType == name){
- return ms[i];
- }
- }
- return '';
- },
- onReady : function(fn, scope){
- if(!this.isReady){
- this.on('ready', fn, scope);
- }else{
- fn.call(scope, this);
- }
- },
- getDesktop : function(){
- return this.desktop;
- },
- onUnload : function(e){
- if(this.fireEvent('beforeunload', this) === false){
- e.stopEvent();
- }
- }
- });