diff --git a/o2web/source/x_component_process_FormDesigner/Module/Form.js b/o2web/source/x_component_process_FormDesigner/Module/Form.js index b3ef26444dcc8a672b4a79a5033ad258af1cd0fe..0b515496992afcbe779d4e6d359cb3292d187555 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/Form.js +++ b/o2web/source/x_component_process_FormDesigner/Module/Form.js @@ -137,10 +137,23 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({ // 移动端表单加载工具栏 loadMobileActionToos: function() { if (this.options.mode==="Mobile"){ - if (!this.json.defaultTools){ - this.json.defaultTools = o2.JSON.get(this.path+"toolbars.json", null,false); + if (!this.json.multiTools){ + var tools = []; + if( this.json.defaultTools ){ + tools = this.json.defaultTools; + }else{ + tools = o2.JSON.get(this.path+"toolbars.json", null,false); + } + tools.map( function (d) { d.system = true; return d; }); + if (this.json.tools){ + tools = tools.concat( this.json.tools ); + } + this.json.multiTools = tools; } - if (!this.json.tools) this.json.tools=[]; + // if (!this.json.defaultTools){ + // this.json.defaultTools = o2.JSON.get(this.path+"toolbars.json", null,false); + // } + // if (!this.json.tools) this.json.tools=[]; } }, _load : function( templateStyles, oldStyleValue ){ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Form/form.html b/o2web/source/x_component_process_FormDesigner/Module/Form/form.html index 9ee45ed529e66af19122f8a88d7d04b9f12a741c..99aa91abce5927e853d75839553fdf0a70391ee8 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/Form/form.html +++ b/o2web/source/x_component_process_FormDesigner/Module/Form/form.html @@ -290,8 +290,9 @@
-
-
+ + +
{{$.lp.noEventInfo}}
diff --git a/o2web/source/x_component_process_FormDesigner/Property.js b/o2web/source/x_component_process_FormDesigner/Property.js index ddce3135ccb8f48df28ccf475078d9cc1e13cf5a..88b2d61c4d495b300e2a9a30cccb190f73d2475e 100644 --- a/o2web/source/x_component_process_FormDesigner/Property.js +++ b/o2web/source/x_component_process_FormDesigner/Property.js @@ -2278,14 +2278,19 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({ var name = node.get("name"); var actionContent = this.data[name]; MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){ - var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, { + var options = { "maxObj": this.propertyNode.parentElement.parentElement.parentElement, "isSystemTool" : true, + "target" : node.get("data-target"), "onChange": function(){ this.data[name] = actionEditor.data; this.changeData(name); }.bind(this) - }); + }; + if(node.get("data-systemToolsAddress")){ + options.systemToolsAddress = node.get("data-systemToolsAddress"); + } + var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, options); actionEditor.load(actionContent); }.bind(this)); }.bind(this)); diff --git a/o2web/source/x_component_process_Xform/Form.js b/o2web/source/x_component_process_Xform/Form.js index ad652f83348d34842e9c94ccc1f740e6aad6cb34..65f22252b9bfcdf2d3af035956f6f319a7618d96 100644 --- a/o2web/source/x_component_process_Xform/Form.js +++ b/o2web/source/x_component_process_Xform/Form.js @@ -729,7 +729,9 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class( } }, _loadMobileDefaultTools: function (callback) { - if (this.json.defaultTools) { + if (this.json.multiTools) { + if (callback) callback(); + }else if (this.json.defaultTools) { if (callback) callback(); } else { this.json.defaultTools = o2.JSON.get("../x_component_process_FormDesigner/Module/Form/toolbars.json", function (json) { @@ -742,23 +744,36 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class( _loadMobileActions: function (node, callback) { var tools = []; this._loadMobileDefaultTools(function () { - if (this.json.defaultTools) { - var jsonStr = JSON.stringify(this.json.defaultTools); + + var jsonStr; + if( this.json.multiTools ){ + jsonStr = JSON.stringify(this.json.multiTools); jsonStr = o2.bindJson(jsonStr, {"lp": MWF.xApplication.process.Xform.LP.form}); - this.json.defaultTools = JSON.parse(jsonStr); - this.json.defaultTools.each(function (tool) { + this.multiToolsJson = JSON.parse(jsonStr); + var json = Array.clone(this.multiToolsJson); + json.each(function (tool) { var flag = this._checkDefaultMobileActionItem(tool, this.options.readonly); if (flag) tools.push(tool); }.bind(this)); - } - if (this.json.tools) { - var jsonStr = JSON.stringify(this.json.tools); - jsonStr = o2.bindJson(jsonStr, {"lp": MWF.xApplication.process.Xform.LP.form}); - this.json.tools = JSON.parse(jsonStr); - this.json.tools.each(function (tool) { - var flag = this._checkCustomMobileActionItem(tool, this.options.readonly); - if (flag) tools.push(tool); - }.bind(this)); + }else{ + if (this.json.defaultTools) { + jsonStr = JSON.stringify(this.json.defaultTools); + jsonStr = o2.bindJson(jsonStr, {"lp": MWF.xApplication.process.Xform.LP.form}); + this.json.defaultTools = JSON.parse(jsonStr); + this.json.defaultTools.each(function (tool) { + var flag = this._checkDefaultMobileActionItem(tool, this.options.readonly); + if (flag) tools.push(tool); + }.bind(this)); + } + if (this.json.tools) { + jsonStr = JSON.stringify(this.json.tools); + jsonStr = o2.bindJson(jsonStr, {"lp": MWF.xApplication.process.Xform.LP.form}); + this.json.tools = JSON.parse(jsonStr); + this.json.tools.each(function (tool) { + var flag = this._checkCustomMobileActionItem(tool, this.options.readonly); + if (flag) tools.push(tool); + }.bind(this)); + } } this.mobileTools = tools; //app上用原来的按钮样式