MainInContainer.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //用法,z在 cms / 流程表单 / 门户中插入会议应用
  2. //MWF.xApplication.Meeting = MWF.xApplication.Meeting || {};
  3. //MWF.xApplication.Meeting.options = MWF.xApplication.Meeting.options || {};
  4. //MWF.xDesktop.requireApp("Meeting", "MainInContainer", null, false);
  5. //var container = this.form.get("div").node;
  6. //var scrollNode = container;
  7. //var meeting = new MWF.xApplication.Meeting.MainInContainer( this.form.getApp().desktop, {}, container, this.form.getApp().content , scrollNode );
  8. //meeting.load();
  9. MWF.xDesktop.requireApp("Meeting", "lp."+MWF.language, null, false);
  10. MWF.xDesktop.requireApp("Meeting", "Main", null, false);
  11. MWF.xApplication.Meeting.MainInContainer = new Class({
  12. Extends: MWF.xApplication.Meeting.Main,
  13. Implements: [Options, Events],
  14. options: {
  15. "style": "default" ,
  16. "name": "Meeting",
  17. "sideBarEnable" : false
  18. },
  19. initialize: function(desktop, options, container, content, scrollNode){
  20. this.setOptions(options);
  21. this.desktop = desktop;
  22. this.container = container;
  23. this.content = content;
  24. this.scrollNode = scrollNode;
  25. this.path = "../x_component_"+this.options.name.replace(/\./g, "_")+"/$Main/";
  26. this.options.icon = this.path+this.options.style+"/"+this.options.icon;
  27. this.cssPath =this.path+this.options.style+"/css.wcss";
  28. this.inBrowser = true;
  29. this.inContainer = true;
  30. this._loadCss();
  31. },
  32. loadInBrowser: function(){
  33. this.window = {
  34. "isHide": false,
  35. "isMax": true,
  36. "maxSize": function(){},
  37. "restore": function(){},
  38. "setCurrent": function(){},
  39. "hide": function(){},
  40. "maxOrRestoreSize": function(){},
  41. "restoreSize": function(){},
  42. "close": function(){},
  43. "titleText" : {
  44. set : function(){}
  45. }
  46. };
  47. this.window.content = this.content;
  48. //this.content = this.window.content;
  49. //this.content.setStyles({"height": "100%", "overflow": "hidden"});
  50. //window.addEvent("resize", function(){
  51. // this.fireAppEvent("resize");
  52. //}.bind(this));
  53. //window.onbeforeunload = function(e){
  54. // this.fireAppEvent("queryClose");
  55. //}.bind(this);
  56. this.fireAppEvent("postLoadWindow");
  57. this.fireAppEvent("queryLoadApplication");
  58. this.setContentEvent();
  59. this.loadApplication(function(){
  60. this.fireAppEvent("postLoadApplication");
  61. }.bind(this));
  62. //this.content.setStyle("height", document.body.getSize().y);
  63. this.fireAppEvent("postLoad");
  64. },
  65. createNode: function(){
  66. this.content.setStyle("overflow", "hidden");
  67. this.node = new Element("div.reportNode", {
  68. "styles": {"width": "100%", "height": "100%", "overflow": "hidden", "position":"relative","background-color":"#f0f0f0"}
  69. }).inject(this.container);
  70. }
  71. });