Parcourir la source

[流程管理]修复表单组件设置成隐藏的时候,组件图标高度为0的问题

unknown il y a 5 ans
Parent
commit
5c20c78130

+ 1 - 1
o2web/source/x_component_cms_Xform/ModuleImplements.js

@@ -30,7 +30,7 @@ if( !MWF.CMS$Input_Process ){
                 }
             }
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode && this.iconNode.offsetParent !== null ){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }

+ 1 - 1
o2web/source/x_component_cms_Xform/Readerfield.js

@@ -602,7 +602,7 @@ MWF.xApplication.cms.Xform.Readerfield = MWF.CMSReaderfield =  new Class({
         }else{
             if (this.json.styles) this.node.setStyles(this.json.styles);
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode  && this.iconNode.offsetParent !== null ){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }

+ 1 - 1
o2web/source/x_component_process_Xform/$Input.js

@@ -158,7 +158,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
     _loadStyles: function(){
         if (this.json.styles) this.node.setStyles(this.json.styles);
         if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-        if (this.iconNode){
+        if (this.iconNode && this.iconNode.offsetParent !== null){
             var size = this.node.getSize();
             //if (!size.y){
             //    var y1 = this.node.getStyle("height");

+ 1 - 1
o2web/source/x_component_process_Xform/Org.js

@@ -923,7 +923,7 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
         }else{
             if (this.json.styles) this.node.setStyles(this.json.styles);
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode && this.iconNode.offsetParent !== null){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }

+ 1 - 1
o2web/source/x_component_process_Xform/Orgfield.js

@@ -581,7 +581,7 @@ MWF.xApplication.process.Xform.Orgfield = MWF.APPOrgfield =  new Class({
         }else{
             if (this.json.styles) this.node.setStyles(this.json.styles);
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode && this.iconNode.offsetParent !== null){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }

+ 1 - 1
o2web/source/x_component_process_Xform/Personfield.js

@@ -887,7 +887,7 @@ MWF.xApplication.process.Xform.Personfield = MWF.APPPersonfield =  new Class({
         }else{
             if (this.json.styles) this.node.setStyles(this.json.styles);
             if (this.json.inputStyles) if (this.node.getFirst()) this.node.getFirst().setStyles(this.json.inputStyles);
-            if (this.iconNode){
+            if (this.iconNode && this.iconNode.offsetParent !== null){
                 var size = this.node.getSize();
                 this.iconNode.setStyle("height", ""+size.y+"px");
             }