提交 a592de7e 编写于 作者: NoSubject's avatar NoSubject

修复表单设计元素样式问题

上级 f36b1ce1
......@@ -67,6 +67,9 @@ MWF.xApplication.process.FormDesigner.Module.Attachment = MWF.FCAttachment = new
_initModule: function(){
this.node.empty();
this.loadAttachmentController(this.json.editorProperties);
this.setPropertiesOrStyles("styles");
this._setNodeProperty();
if (!this.form.isSubform) this._createIconAction();
this._setNodeEvent();
......
......@@ -108,6 +108,8 @@ MWF.xApplication.process.FormDesigner.Module.Common = MWF.FCCommon = new Class({
},
setCustomStyles: function(){
this._recoveryModuleData();
var border = this.node.getStyle("border");
this.node.clearStyles();
var styles = this.node.getStyles("display", "padding");
......
......@@ -107,9 +107,49 @@ MWF.xApplication.process.FormDesigner.Module.Tab$Content = MWF.FCTab$Content = n
this.recoveryWidgetstyle = null;
if (this.json.recoveryStyles) this.json.styles = this.json.recoveryStyles;
this.json.recoveryStyles = null;
},
setCustomStyles: function(){
this._recoveryModuleData();
}
// setCustomStyles: function(){
// this._recoveryModuleData();
// //debugger;
// var border = this.node.getStyle("border");
// this.node.clearStyles();
// this.node.setStyles(this.css.moduleNode);
//
// if (this.initialStyles) this.node.setStyles(this.initialStyles);
// this.node.setStyle("border", border);
//
// if (this.json.styles) Object.each(this.json.styles, function(value, key){
// if ((value.indexOf("x_processplatform_assemble_surface")!=-1 || value.indexOf("x_portal_assemble_surface")!=-1)){
// var host1 = MWF.Actions.getHost("x_processplatform_assemble_surface");
// var host2 = MWF.Actions.getHost("x_portal_assemble_surface");
// if (value.indexOf("/x_processplatform_assemble_surface")!==-1){
// value = value.replace("/x_processplatform_assemble_surface", host1+"/x_processplatform_assemble_surface");
// }else if (value.indexOf("x_processplatform_assemble_surface")!==-1){
// value = value.replace("x_processplatform_assemble_surface", host1+"/x_processplatform_assemble_surface");
// }
// if (value.indexOf("/x_portal_assemble_surface")!==-1){
// value = value.replace("/x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
// }else if (value.indexOf("x_portal_assemble_surface")!==-1){
// value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
// }
// }
//
// var reg = /^border\w*/ig;
// if (!key.test(reg)){
// if (key){
// if (key.toString().toLowerCase()==="display"){
// if (value.toString().toLowerCase()==="none"){
// this.node.setStyle("opacity", 0.3);
// }else{
// this.node.setStyle("opacity", 1);
// this.node.setStyle(key, value);
// }
// }else{
// this.node.setStyle(key, value);
// }
// }
// }
// }.bind(this));
// }
});
......@@ -261,6 +261,46 @@ MWF.xApplication.process.FormDesigner.Module.Tab$Page = MWF.FCTab$Page = new Cla
},
setCustomStyles: function(){
this._recoveryModuleData();
//debugger;
// var border = this.node.getStyle("border");
// this.node.clearStyles();
// this.node.setStyles(this.css.moduleNode);
//
// if (this.initialStyles) this.node.setStyles(this.initialStyles);
// this.node.setStyle("border", border);
//
// if (this.json.styles) Object.each(this.json.styles, function(value, key){
// if ((value.indexOf("x_processplatform_assemble_surface")!=-1 || value.indexOf("x_portal_assemble_surface")!=-1)){
// var host1 = MWF.Actions.getHost("x_processplatform_assemble_surface");
// var host2 = MWF.Actions.getHost("x_portal_assemble_surface");
// if (value.indexOf("/x_processplatform_assemble_surface")!==-1){
// value = value.replace("/x_processplatform_assemble_surface", host1+"/x_processplatform_assemble_surface");
// }else if (value.indexOf("x_processplatform_assemble_surface")!==-1){
// value = value.replace("x_processplatform_assemble_surface", host1+"/x_processplatform_assemble_surface");
// }
// if (value.indexOf("/x_portal_assemble_surface")!==-1){
// value = value.replace("/x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
// }else if (value.indexOf("x_portal_assemble_surface")!==-1){
// value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
// }
// }
//
// var reg = /^border\w*/ig;
// if (!key.test(reg)){
// if (key){
// if (key.toString().toLowerCase()==="display"){
// if (value.toString().toLowerCase()==="none"){
// this.node.setStyle("opacity", 0.3);
// }else{
// this.node.setStyle("opacity", 1);
// this.node.setStyle(key, value);
// }
// }else{
// this.node.setStyle(key, value);
// }
// }
// }
// }.bind(this));
}
});
......@@ -402,8 +402,48 @@ MWF.xApplication.process.FormDesigner.Module.Tab = MWF.FCTab = new Class({
this.recoveryWidgetstyle = null;
if (this.json.recoveryStyles) this.json.styles = this.json.recoveryStyles;
this.json.recoveryStyles = null;
},
setCustomStyles: function(){
this._recoveryModuleData();
}
// setCustomStyles: function(){
// this._recoveryModuleData();
// //debugger;
// var border = this.node.getStyle("border");
// this.node.clearStyles();
// this.node.setStyles(this.css.moduleNode);
//
// if (this.initialStyles) this.node.setStyles(this.initialStyles);
// this.node.setStyle("border", border);
//
// if (this.json.styles) Object.each(this.json.styles, function(value, key){
// if ((value.indexOf("x_processplatform_assemble_surface")!=-1 || value.indexOf("x_portal_assemble_surface")!=-1)){
// var host1 = MWF.Actions.getHost("x_processplatform_assemble_surface");
// var host2 = MWF.Actions.getHost("x_portal_assemble_surface");
// if (value.indexOf("/x_processplatform_assemble_surface")!==-1){
// value = value.replace("/x_processplatform_assemble_surface", host1+"/x_processplatform_assemble_surface");
// }else if (value.indexOf("x_processplatform_assemble_surface")!==-1){
// value = value.replace("x_processplatform_assemble_surface", host1+"/x_processplatform_assemble_surface");
// }
// if (value.indexOf("/x_portal_assemble_surface")!==-1){
// value = value.replace("/x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
// }else if (value.indexOf("x_portal_assemble_surface")!==-1){
// value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
// }
// }
//
// var reg = /^border\w*/ig;
// if (!key.test(reg)){
// if (key){
// if (key.toString().toLowerCase()==="display"){
// if (value.toString().toLowerCase()==="none"){
// this.node.setStyle("opacity", 0.3);
// }else{
// this.node.setStyle("opacity", 1);
// this.node.setStyle(key, value);
// }
// }else{
// this.node.setStyle(key, value);
// }
// }
// }
// }.bind(this));
// }
});
......@@ -2254,7 +2254,7 @@ debugger;
this.node.setStyles({
"height":"auto"
});
debugger;
//var content = this.contentNode.getFirst().getFirst().get("html");
var tmpNode = this.contentNode.getFirst().getFirst().clone(true);
var htmlNode = tmpNode.getLast();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册