cmspreview.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  5. <link rel="stylesheet" type="text/css" href="css/style.css" charset="UTF-8" />
  6. <link rel="stylesheet" href="css/mBoxNotice.css" charset="UTF-8" />
  7. <link rel="stylesheet" href="css/mBoxTooltip.css" charset="UTF-8" />
  8. <script src="../o2_lib/mootools/mootools-1.6.0.min.js?v=2.0.8"></script>
  9. <script src="../o2_core/o2.min.js?v=2.0.8"></script>
  10. <script src="../o2_core/compatible.min.js?v=2.0.8"></script>
  11. <script src="../o2_lib/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. var href = window.location.href;
  17. if (href.indexOf("debugger")!=-1) layout["debugger"] = true;
  18. var mode = (new URI(href)).get("data").mode;
  19. if (mode){
  20. if (mode=="mobile") layout.mobile = true;
  21. }
  22. layout.session = window.frameElement.ownerDocument.window.layout.session || {};
  23. //layout.desktop = layout;
  24. o2.addReady(function(){
  25. o2.load(["../o2_lib/mootools/plugin/mBox.Notice.js", "../o2_lib/mootools/plugin/mBox.Tooltip.js"], {"sequence": true}, function(){
  26. MWF.defaultPath = "/x_desktop"+MWF.defaultPath;
  27. MWF.loadLP("zh-cn");
  28. MWF.require("MWF.xDesktop.Layout", function(){
  29. //MWF.require("MWF.xDesktop.Authentication", null, false);
  30. (function(){
  31. layout.load = function(){
  32. // if (this.isAuthentication()){
  33. var preview = window.frameElement.retrieve("preview");
  34. layout.desktop = window.frameElement.ownerDocument.window.layout.desktop;
  35. MWF.xDesktop.requireApp("cms.Xform", "Form", function(){
  36. layout.appForm = new MWF.CMSForm($("layout"), preview.data);
  37. layout.appForm.app = {
  38. "options" : {
  39. "name" : "CMSDocument"
  40. },
  41. "content": document.body,
  42. "addEvent" : function(){}
  43. };
  44. MWF.getJSON("res/preview/cmsdoc.json", function(data){
  45. layout.appForm.businessData = {
  46. "data": data.data,
  47. "document": data.document,
  48. "attachmentList": data.attachmentList,
  49. "status": {
  50. //"readonly": (this.options.readonly) ? true : false
  51. "readonly": true //this.readonly
  52. },
  53. "control" : data.control
  54. };
  55. layout.appForm.load();
  56. });
  57. });
  58. // }
  59. };
  60. layout.load();
  61. })();
  62. });
  63. });
  64. });
  65. </script>
  66. </head>
  67. <body style="overflow: auto">
  68. <div id="layout" style="overflow: auto">
  69. <div id="layout_top">
  70. </div>
  71. <div id="layout_form">
  72. </div>
  73. </div>
  74. </body>
  75. </html>