最近在学习Extjs,感觉到了extjs的强大,尤其是看了它的desktop之后,ext的desktop做的确实不错,在网上找了一下extjs的desktop的资料,并没有太多完整的实例有的话想下载很麻烦,于是决定自己整一个,说干就干,我的desktop是SSH+Extjs 4实现
?
?
总体架构就是大家看到的截图,至于SSH框架的大家就不在这里赘述了,接下来介绍每个包的作用:
??? core包中存放desktop的核心代码:
????
? ? css包用于存放样式:
???
?? ext包用于存放js:
?images用于存放desktop中的图片,在extjs的desktop的例子中可以找到images包
modules中用于存放桌面上显示的模块:
?接下来就是把App.js 和setting.js以及desktop.html考到WebContent的目录下
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>extjs4 desktop</title> <!-- css --> <link rel="stylesheet" type="text/css" href="extjslib/css/ext-all.css" /> <link rel="stylesheet" type="text/css" href="extjslib/css/desktop.css" /> <!-- base js --> <script type="text/javascript" src="extjslib/ext/ext-all.js"></script> <!-- <script type="text/javascript" src="extjslib/ext/ext-lang-zh_CN.js"></script> --> <!-- core js --> <script type="text/javascript" src="extjslib/core/Module.js"></script> <script type="text/javascript" src="extjslib/core/Video.js"></script> <script type="text/javascript" src="extjslib/core/Wallpaper.js"></script> <script type="text/javascript" src="extjslib/core/FitAllLayout.js"></script> <script type="text/javascript" src="extjslib/core/StartMenu.js"></script> <script type="text/javascript" src="extjslib/core/TaskBar.js"></script> <script type="text/javascript" src="extjslib/core/ShortcutModel.js"></script> <script type="text/javascript" src="extjslib/core/Desktop.js"></script> <script type="text/javascript" src="extjslib/core/App.js"></script> <!-- module js --> <script type="text/javascript" src="modules/WallpaperModel.js"></script> <script type="text/javascript" src="modules/VideoWindow.js"></script> <script type="text/javascript" src="modules/BogusModule.js"></script> <script type="text/javascript" src="modules/BogusMenuModule.js"></script> <script type="text/javascript" src="modules/TabWindow.js"></script> <script type="text/javascript" src="modules/GridWindow.js"></script> <script type="text/javascript" src="modules/AccordionWindow.js"></script> <script type="text/javascript" src="modules/SystemStatus.js"></script> <script type="text/javascript" src="modules/Notepad.js"></script> <script type="text/javascript" src="modules/UserManager.js"></script> <!-- config js --> <script type="text/javascript" src="Settings.js"></script> <script type="text/javascript" src="App.js"></script> <script type="text/javascript"> Ext.Loader.setConfig({enabled:true}); Ext.Loader.setPath({ 'Ext.ux.desktop': 'extjslib', //'Fly.modules': 'modules', MyDesktop: '' }); Ext.require('MyDesktop.App'); var myDesktopApp; Ext.override(Ext.ZIndexManager, { tempHidden: [], show: function() { var comp, x, y; while (comp = this.tempHidden.shift()) { x = comp.x;