preview.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" type="text/css" href="/x_desktop/res/css/style.css" charset="UTF-8" />
  5. <link rel="stylesheet" href="/x_desktop/res/css/mBoxNotice.css" charset="UTF-8" />
  6. <link rel="stylesheet" href="/x_desktop/res/css/mBoxTooltip.css" charset="UTF-8" />
  7. <script src="/x_desktop/res/common.js?v=0.3.19"></script>
  8. <!--<script src="/x_desktop/res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>-->
  9. <!--<script src="/x_desktop/res/framework/mootools/mootools-more-1.4.0.1-all_2.js"></script>-->
  10. <script src="res/framework/mootools/mootools-1.6.0.min.js"></script>
  11. <script src="res/framework/Decimal.js"></script>
  12. <title>FORM PREVIEW</title>
  13. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  14. <script>
  15. layout = window.layout || {};
  16. //layout.desktop = layout;
  17. COMMON.DOM.addReady(function(){
  18. COMMON.AjaxModule.load("/x_desktop/res/framework/mootools/plugin/mBox.Notice.js", null, false);
  19. COMMON.AjaxModule.load("/x_desktop/res/framework/mootools/plugin/mBox.Tooltip.js", null, false);
  20. COMMON.setContentPath("/x_desktop");
  21. COMMON.AjaxModule.load("mwf", function(){
  22. MWF.defaultPath = "/x_desktop"+MWF.defaultPath;
  23. MWF.loadLP("zh-cn");
  24. MWF.require("MWF.xDesktop.Layout", function(){
  25. //MWF.require("MWF.xDesktop.Authentication", null, false);
  26. (function(){
  27. layout.load = function(){
  28. // if (this.isAuthentication()){
  29. var preview = window.frameElement.retrieve("preview");
  30. layout.desktop = window.frameElement.ownerDocument.window.layout.desktop;
  31. MWF.xDesktop.requireApp("process.Xform", "Form", function(){
  32. layout.appForm = new MWF.APPForm($("layout"), preview.data);
  33. layout.appForm.app = {"content": document.body};
  34. MWF.getJSON("res/preview/work.json", function(data){
  35. layout.appForm.businessData = {
  36. "data": data.data,
  37. "taskList": data.taskList,
  38. "work": data.work,
  39. "workCompleted": data.workCompleted,
  40. "control": data.control,
  41. "activity": data.activity,
  42. "task": data.taskList[0],
  43. "workLogList": data.workLogList,
  44. "attachmentList": data.attachmentList,
  45. "status": {
  46. //"readonly": (this.options.readonly) ? true : false
  47. "readonly": this.readonly
  48. }
  49. };
  50. layout.appForm.load();
  51. });
  52. });
  53. // }
  54. };
  55. // layout.authentication = new MWF.xDesktop.Authentication({
  56. // "onLogin": layout.load.bind(layout)
  57. // });
  58. // layout.isAuthentication = function(){
  59. // var returnValue = true;
  60. // this.authentication.isAuthenticated(function(json){
  61. // this.user = json.data;
  62. // }.bind(this), function(){
  63. // this.authentication.loadLogin(this.node);
  64. // returnValue = false;
  65. // }.bind(this));
  66. // return returnValue;
  67. // };
  68. // layout.getServiceAddress = function(callback){
  69. // var uri = "http://"+layout.config.center+"/x_program_center/jaxrs/distribute/assemble";
  70. // MWF.restful("get", uri, null, function(json){
  71. // this.serviceAddressList = json.data;
  72. // if (callback) callback();
  73. // }.bind(this));
  74. // };
  75. //
  76. // MWF.getJSON("res/config/config.json", function(config){
  77. // layout.config = config;
  78. //
  79. // layout.getServiceAddress(function(){
  80. // layout.load();
  81. // });
  82. // });
  83. layout.load();
  84. })();
  85. });
  86. });
  87. });
  88. </script>
  89. </head>
  90. <body style="overflow: auto">
  91. <div id="layout" style="overflow: auto">
  92. <div id="layout_top">
  93. </div>
  94. <div id="layout_form">
  95. </div>
  96. </div>
  97. </body>
  98. </html>