| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <link rel="stylesheet" type="text/css" href="css/style.css" charset="UTF-8" />
- <link rel="stylesheet" href="css/mBoxNotice.css" charset="UTF-8" />
- <link rel="stylesheet" href="css/mBoxTooltip.css" charset="UTF-8" />
- <script src="../o2_core/o2.min.js"></script>
- <script src="../o2_lib/Decimal.js"></script>
- <title>FORM PREVIEW</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <script>
- layout = window.layout || {};
- var href = window.location.href;
- if (href.indexOf("debugger")!=-1) layout["debugger"] = true;
- var mode = (new URI(href)).get("data").mode;
- if (mode){
- if (mode=="mobile") layout.mobile = true;
- }
- layout.session = window.frameElement.ownerDocument.window.layout.session || {};
- //layout.desktop = layout;
- o2.addReady(function(){
- o2.load(["../o2_lib/mootools/plugin/mBox.Notice.js", "../o2_lib/mootools/plugin/mBox.Tooltip.js"], {"sequence": true}, function(){
- MWF.getJSON("res/config/config.json", function(config){
- layout.config = config;
- if (layout.config.app_protocol=="auto"){
- layout.config.app_protocol = window.location.protocol;
- }
- //MWF.defaultPath = "../x_desktop"+MWF.defaultPath;
- MWF.loadLP(MWF.language);
- MWF.require("MWF.widget.Common", null, false);
- MWF.require("MWF.xDesktop.Common", null, false);
- MWF.require("MWF.xAction.RestActions", null, false);
- MWF.require("MWF.xDesktop.Layout", function(){
- //MWF.require("MWF.xDesktop.Authentication", null, false);
- MWF.require("MWF.xDesktop.Actions.RestActions", null, false);
- (function(){
- layout.load = function(){
- debugger;
- // if (this.isAuthentication()){
- var preview = window.frameElement.retrieve("preview");
- layout.desktop = window.frameElement.ownerDocument.window.layout.desktop;
- MWF.xDesktop.requireApp("cms.Xform", "Form", function(){
- layout.appForm = new MWF.CMSForm($("layout"), preview.data);
- layout.appForm.app = {
- "options" : {
- "name" : "CMSDocument"
- },
- "content": document.body,
- "addEvent" : function(){}
- };
- MWF.getJSON("res/preview/cmsdoc.json", function(data){
- if( preview.form && preview.form.designer && preview.form.designer.application && preview.form.designer.application.id ){
- data.document.appId = preview.form.designer.application.id;
- }
- layout.appForm.businessData = {
- "data": data.data,
- "document": data.document,
- "attachmentList": data.attachmentList,
- "status": {
- //"readonly": (this.options.readonly) ? true : false
- "readonly": true //this.readonly
- },
- "control" : data.control
- };
- layout.appForm.load();
- });
- });
- // }
- };
- // layout.load();
- MWF.xDesktop.getServiceAddress(layout.config, function (service, center) {
- layout.serviceAddressList = service;
- layout.centerServer = center;
- layout.load();
- }.bind(this));
- })();
- });
- }.bind(this));
- });
- });
- </script>
- </head>
- <body style="overflow: auto">
- <div id="layout" style="overflow: auto">
- <div id="layout_top">
- </div>
- <div id="layout_form">
- </div>
- </div>
- </body>
- </html>
|