提交 5eacc527 编写于 作者: 蔡祥熠

Merge branch 'cherry-pick-e98407f4' into 'wrdp_java8'

Merge branch 'fix/datatemplate' into 'wrdp'

See merge request o2oa/o2oa!5373
......@@ -46,6 +46,28 @@
"width": "auto",
"opacity": 1,
"background": "transparent"
},
"iconNode": {
"width": "104px",
"height": "16px",
"color": "#999",
"font-size": "12px",
"position": "static",
"margin": "0px",
"border-bottom": "1px solid #ccc",
"border-right": "1px solid #ccc"
},
"iconNodeIcon":{
"width": "19px",
"height": "16px",
"background": "url(../x_component_process_FormDesigner/Module/Datatemplate/default/icon/datatemplate.png) 0px center no-repeat",
"float": "left"
},
"iconNodeText":{
"line-height": "16px",
"height": "16px",
"width": "80px",
"float": "right"
}
}
\ No newline at end of file
......@@ -323,11 +323,21 @@ MWF.xApplication.portal.PageDesigner.Module.Page = MWF.PCPage = new Class({
},
loadModule: function(json, dom, parent){
var module;
if (json) {
var module = new MWF["PC" + json.type](this);
module.load(json, dom, parent);
return module;
if( json.events ){
module = new MWF["PC" + json.type](this);
module.load(json, dom, parent);
}else{
var className = json.type.capitalize();
this.getTemplateData(className, function(data){
json.events = Object.clone(data.events);
module = new MWF["PC" + json.type](this);
module.load(json, dom, parent);
}.bind(this), false);
}
}
return module;
},
setNodeEvents: function(){
......
......@@ -38,6 +38,7 @@ MWF.xApplication.portal.PageDesigner.Module.Table = MWF.PCTable = new Class({
tdContainer.table = this;
tdContainer.load(moduleData, td, this);
}else{
if(!json.event)json.events = Object.clone(data.events);
tdContainer = new MWF.PCTable$Td(this.form);
tdContainer.table = this;
tdContainer.load(json, td, this);
......
......@@ -196,20 +196,27 @@ MWF.xApplication.process.FormDesigner.Module.Datatemplate = MWF.FCDatatemplate =
containerNode = this.containerModule.node;
var dataStr = null;
// var dataStr = null;
// if (this.form.options.mode !== "Mobile"){
// dataStr = responseJSON.data;
// }else{
// dataStr = responseJSON.mobileData;
// }
// var data = null;
// if (dataStr){
// // data = JSON.decode(MWF.decodeJsonString(dataStr));
// data = JSON.decode(dataStr);
// }
var data;
if (this.form.options.mode !== "Mobile"){
dataStr = responseJSON.data;
data = responseJSON.data;
}else{
dataStr = responseJSON.mobileData;
}
var data = null;
if (dataStr){
data = JSON.decode(MWF.decodeJsonString(dataStr));
data = responseJSON.mobileData;
}
var tmpNode = new Element("div").inject( this.form.container );
tmpNode.set("html", data.html);
var html = tmpNode.getFirst().get("html");
var html = tmpNode.get("html");
tmpNode.destroy();
containerNode.set("html", html );
......@@ -224,7 +231,13 @@ MWF.xApplication.process.FormDesigner.Module.Datatemplate = MWF.FCDatatemplate =
var oid = moduleJson.id;
var id = moduleJson.id;
var idx = 1;
while (this.form.json.moduleList[id]) {
// while (this.form.json.moduleList[id]) {
// id = oid + "_" + idx;
// idx++;
// }
while (this.form.checkModuleId(id, moduleJson.type).elementConflict){
id = oid + "_" + idx;
idx++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册