Browse Source

修复数据网格中的输入组件图标和输入框不在同一行的问题

unknown 5 năm trước cách đây
mục cha
commit
631781a26d

+ 10 - 0
o2web/source/x_component_process_Xform/DatagridMobile.js

@@ -1107,9 +1107,14 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
             var json = this.form._getDomjson(td);
             td.store("dataGrid", this);
             if (json){
+                var isField = false;
                 var module = this.form._loadModule(json, td, function(){
+                    isField = this.field;
                     this.field = false;
                 });
+                if( isField ){
+                    module.node.setStyle("padding-right","0px");
+                }
                 td.store("module", module);
                 this.form.modules.push(module);
             }
@@ -1444,9 +1449,14 @@ MWF.xApplication.process.Xform.DatagridMobile$Data =  new Class({
             var moduleNodes = this.form._getModuleNodes(this.node);
             moduleNodes.each(function(node){
                 var json = this.form._getDomjson(node);
+                var isField = false;
                 var module = this.form._loadModule(json, node, function(){
+                    isField = this.field;
                     this.field = false;
                 });
+                if( isField ){
+                    module.node.setStyle("padding-right","0px");
+                }
                 module.dataModule = this;
                 this.dataGrid.editModules.push(module);
             }.bind(this));

+ 11 - 0
o2web/source/x_component_process_Xform/DatagridPC.js

@@ -930,9 +930,14 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
 			var json = this.form._getDomjson(td);
 			td.store("dataGrid", this);
 			if (json){
+				var isField = false;
 				var module = this.form._loadModule(json, td, function(){
+					isField = this.field;
 					this.field = false;
 				});
+				if( isField ){
+					module.node.setStyle("padding-right","0px");
+				}
 				td.store("module", module);
 				this.form.modules.push(module);
 			}
@@ -1229,9 +1234,15 @@ MWF.xApplication.process.Xform.DatagridPC$Data =  new Class({
 			var moduleNodes = this.form._getModuleNodes(this.node);
 			moduleNodes.each(function(node){
 				var json = this.form._getDomjson(node);
+				var isField = false;
 				var module = this.form._loadModule(json, node, function(){
+					debugger;
+					isField = this.field;
 					this.field = false;
 				});
+				if( isField ){
+					module.node.setStyle("padding-right","0px");
+				}
 				module.dataModule = this;
 				this.dataGrid.editModules.push(module);
 			}.bind(this));