提交 cf4f6ab7 编写于 作者: 蔡祥熠

Merge branch 'feature/Portal.windgetElement_addNoWrap' into 'release'

Merge of feature/【门户管理】插入组件元素时新增不包裹div的选项 to release

See merge request o2oa/o2oa!909

(cherry picked from commit 0b8af7d2)

26a7459d 组件元素新增不包裹div的选项
上级 15a49b37
......@@ -60,7 +60,12 @@ MWF.xApplication.portal.PageDesigner.Module.Widgetmodules = MWF.PCWidgetmodules
return;
}
module.appendWidgetModules( widgetid, relativeNode, position );
var wrapDiv = "yes";
dlg.node.getElements(".wrapDiv").each( function (el) {
if( el.get("checked") )wrapDiv = el.get("value");
});
module.appendWidgetModules( widgetid, relativeNode, position, wrapDiv );
this.close();
}
},
......@@ -143,7 +148,7 @@ MWF.xApplication.portal.PageDesigner.Module.Widgetmodules = MWF.PCWidgetmodules
this.form.moveModule = null;
delete this;
},
appendWidgetModules: function( widgetid, relativeNode, position ){
appendWidgetModules: function( widgetid, relativeNode, position, wrapDiv ){
MWF.Actions.get("x_portal_assemble_designer").getWidget(widgetid, function(json){
var parentModule = this.parentContainer || this.inContainer || this.onDragModule;
......@@ -180,10 +185,20 @@ MWF.xApplication.portal.PageDesigner.Module.Widgetmodules = MWF.PCWidgetmodules
this.page.json.moduleList[moduleJson.id] = moduleJson;
}.bind(this));
debugger;
this.page.parseModules(this.containerModule, this.node);
if( wrapDiv === "no" ){
this.node.getChildren().each( function (el) {
if( el.get("MWFType") && el.get("id")){
var id = el.get("id");
el.inject( relativeNode || this.copyNode, position || "before" );
}
}.bind(this));
this.page.parseModules( parentModule, parentModule.node);
//this.containerModule.delete();
this.page.selected();
this.containerModule.destroy();
}else{
this.page.parseModules(this.containerModule, this.node);
}
//var copyModuleNode = this.node.getFirst();
//while (copyModuleNode) {
......
......@@ -5,6 +5,13 @@
<td align="right">选择部件</td>
<td colspan="2" id="MWFWidgetSelectTd"></td>
</tr>
<tr>
<td align="right">是否包裹div</td>
<td colspan="2">
<input class="wrapDiv" type="radio" name="wrapDiv" value="yes" checked }/>
<input class="wrapDiv" type="radio" name="wrapDiv" value="no"}/>
</td>
</tr>
<!--<tr>-->
<!--<td align="right">组件标识冲突处理</td>-->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册