MainInContainer.js 3.7 KB

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