Przeglądaj źródła

数据网格附件移动端支持

huqi 5 lat temu
rodzic
commit
9fdedbf382

+ 2 - 2
o2web/source/x_component_process_FormDesigner/Module/Attachment.js

@@ -66,8 +66,8 @@ MWF.xApplication.process.FormDesigner.Module.Attachment = MWF.FCAttachment = new
 
 	_initModule: function(){
 		this.node.empty();
-		if (this.parentContainer.json.moduleName == "datagrid$Data" && !this.json.size) this.json.size = "min";
-		if (this.parentContainer.json.moduleName == "datagrid$Data" && !this.json.listStyle) this.json.listStyle = "sequence";
+		if (this.parentContainer && this.parentContainer.json.moduleName == "datagrid$Data" && !this.json.size) this.json.size = "min";
+		if (this.parentContainer && this.parentContainer.json.moduleName == "datagrid$Data" && !this.json.listStyle) this.json.listStyle = "sequence";
 		this.loadAttachmentController(this.json.editorProperties);
 
 		this.setPropertiesOrStyles("styles");

+ 1 - 0
o2web/source/x_component_process_Xform/Attachment.js

@@ -1590,6 +1590,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
         var data = [];
         this.attachmentController.attachments.each(function(att){
             var o = {
+                "id": att.data.id,
                 "person": att.data.person,
                 "creatorUid": att.data.creatorUid,
                 "name": att.data.name,

+ 9 - 6
o2web/source/x_component_process_Xform/DatagridMobile.js

@@ -823,11 +823,13 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
         this.validationMode();
         this.fireEvent("completeLineEdit", [table]);
 
-        this.addAction.set("text", MWF.xApplication.process.Xform.LP.addLine);
-        this.addAction.removeEvents("click");
-        this.addAction.addEvent("click", function(){
-            this._addLine();
-        }.bind(this));
+        if (this.addAction){
+            this.addAction.set("text", MWF.xApplication.process.Xform.LP.addLine);
+            this.addAction.removeEvents("click");
+            this.addAction.addEvent("click", function(){
+                this._addLine();
+            }.bind(this));
+        }
 
         this.form.saveFormData();
         return true;
@@ -950,7 +952,8 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
                 var data = currentTable.retrieve("data");
 
                 //var attKeys = [];
-                var titleThs = currentTable.getElements("th");
+                debugger;
+                var titleThs = _self.table.getElements("th");
                 titleThs.each(function(th, i){
                     var key = th.get("id");
                     var module = _self.editModules[i];