Main.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. MWF.xApplication.Container.options = {
  2. "multitask": true,
  3. "executable": false
  4. };
  5. MWF.xApplication.Container.Main = new Class({
  6. Extends: MWF.xApplication.Common.Main,
  7. Implements: [Options, Events],
  8. options: {
  9. "style": "default",
  10. "name": "Container",
  11. "icon": "icon.png",
  12. "width": "1000",
  13. "height": "800",
  14. "isResize": true,
  15. "isMax": true,
  16. "title": ""
  17. },
  18. onQueryLoad: function(){
  19. if (this.status){
  20. this.clazzModule = this.status.clazzModule;
  21. this.clazzPath = this.status.clazzPath || "Main";
  22. this.clazz = this.status.clazz;
  23. this.options = this.status.options;
  24. this.parameter = this.status.parameter;
  25. }
  26. },
  27. loadApplication: function(callback){
  28. if (this.clazz && this.clazzModule && this.clazzPath){
  29. MWF.xDesktop.requireApp(this.clazzModule, this.clazzPath, function(){
  30. var obj = MWF;
  31. var paths = this.clazz.split(".");
  32. paths.each(function(p, i){
  33. if (i>0) obj = obj[p];
  34. }.bind(this));
  35. if (obj){
  36. this.app = new obj(this.content, null, this.options);
  37. this.app.load();
  38. }
  39. }.bind(this));
  40. }
  41. }
  42. });