MainInContainer.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. MWF.xDesktop.requireApp("Report", "lp.zh-cn", null, false);
  2. MWF.xDesktop.requireApp("Report", "Main", null, false);
  3. MWF.xApplication.Report.MainInContainer = new Class({
  4. Extends: MWF.xApplication.Report.Main,
  5. Implements: [Options, Events],
  6. options: {
  7. "style": "default",
  8. "name": "Report",
  9. "view" : "all",
  10. "sideBarEnable" : false
  11. },
  12. initialize: function(desktop, options, container, content, scrollNode){
  13. this.setOptions(options);
  14. this.desktop = desktop;
  15. this.container = container;
  16. this.content = content;
  17. this.scrollNode = scrollNode;
  18. this.path = "/x_component_"+this.options.name.replace(/\./g, "_")+"/$Main/";
  19. this.options.icon = this.path+this.options.style+"/"+this.options.icon;
  20. this.cssPath =this.path+this.options.style+"/css.wcss";
  21. this.inBrowser = true;
  22. this.inContainer = true;
  23. this._loadCss();
  24. },
  25. loadInBrowser: function(){
  26. this.window = {
  27. "isHide": false,
  28. "isMax": true,
  29. "maxSize": function(){},
  30. "restore": function(){},
  31. "setCurrent": function(){},
  32. "hide": function(){},
  33. "maxOrRestoreSize": function(){},
  34. "restoreSize": function(){},
  35. "close": function(){},
  36. "titleText" : {
  37. set : function(){}
  38. }
  39. };
  40. this.window.content = this.content;
  41. //this.content = this.window.content;
  42. //this.content.setStyles({"height": "100%", "overflow": "hidden"});
  43. //window.addEvent("resize", function(){
  44. // this.fireAppEvent("resize");
  45. //}.bind(this));
  46. //window.onbeforeunload = function(e){
  47. // this.fireAppEvent("queryClose");
  48. //}.bind(this);
  49. this.fireAppEvent("postLoadWindow");
  50. this.fireAppEvent("queryLoadApplication");
  51. this.setContentEvent();
  52. this.loadApplication(function(){
  53. this.fireAppEvent("postLoadApplication");
  54. }.bind(this));
  55. //this.content.setStyle("height", document.body.getSize().y);
  56. this.fireAppEvent("postLoad");
  57. },
  58. createNode: function(){
  59. this.content.setStyle("overflow", "hidden");
  60. this.node = new Element("div.reportNode", {
  61. "styles": {"width": "100%", "height": "100%", "overflow": "hidden"}
  62. }).inject(this.container);
  63. }
  64. });