diff --git a/o2web/source/x_component_process_Xform/DatagridMobile.js b/o2web/source/x_component_process_Xform/DatagridMobile.js index 9027dc572822dd490dcdbfd064d1c4bfa3ff8108..ba669842310359330f0878d9bd24bcfe0a0fe07c 100644 --- a/o2web/source/x_component_process_Xform/DatagridMobile.js +++ b/o2web/source/x_component_process_Xform/DatagridMobile.js @@ -226,6 +226,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({ __loadReadDatagrid: function(callback){ //this.gridData = this._getValue(); + var titleHeaders = this.table.getElements("th"); var tds = this.table.getElements("td"); @@ -521,6 +522,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({ "toolbarGroupHidden": module.json.dg_toolbarGroupHidden || [] }; if (this.readonly) options.readonly = true; + if(!this.editable && !this.addable)options.readonly = true; var atts = []; data.each(function(d){ @@ -532,7 +534,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({ module.setAttachmentBusinessData(); - var attachmentController = new MWF.xApplication.process.Xform.AttachmentController(cell, this, options); + var attachmentController = new MWF.xApplication.process.Xform.AttachmentController(cell, module, options); attachmentController.load(); data.each(function (att) { @@ -835,7 +837,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({ } var cell; - var text = this._getValueText(idx, data.text.join(", ")); + // var text = this._getValueText(idx, data.text.join(", ")); if (dataRow){ cell = dataRow.getElement("td"); @@ -844,6 +846,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({ }else if( module.json.type == "Attachment" || module.json.type == "AttachmentDg" ){ this._createAttachment( cell, module, data ); }else{ + var text = this._getValueText(idx, data.text.join(", ")); if( module && module.json.type == "Textarea" ){ cell.set("html", text); }else{ @@ -866,6 +869,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({ }else if( module.json.type == "Attachment" || module.json.type == "AttachmentDg" ){ this._createAttachment( cell, module, data ); }else{ + var text = this._getValueText(idx, data.text.join(", ")); if( module && module.json.type == "Textarea" ){ cell.set("html", text); }else{ diff --git a/o2web/source/x_component_process_Xform/DatagridPC.js b/o2web/source/x_component_process_Xform/DatagridPC.js index 9ecfad8681350bc840a8f3be41a2afe192f17060..09150238482a968e52657c8e456f5570be81e5eb 100644 --- a/o2web/source/x_component_process_Xform/DatagridPC.js +++ b/o2web/source/x_component_process_Xform/DatagridPC.js @@ -610,7 +610,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({ "toolbarGroupHidden": module.json.dg_toolbarGroupHidden || [] }; if (this.readonly) options.readonly = true; - if(!this.editable)options.readonly = true; + if(!this.editable && !this.addable)options.readonly = true; var atts = []; data.each(function(d){ @@ -622,7 +622,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({ module.setAttachmentBusinessData(); - var attachmentController = new MWF.xApplication.process.Xform.AttachmentController(cell, this, options); + var attachmentController = new MWF.xApplication.process.Xform.AttachmentController(cell, module, options); attachmentController.load(); data.each(function (att) { @@ -884,7 +884,6 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({ if( module && module.json.type == "ImageClipper" ) { this._createImage(cell, module, v); }else if( module && (module.json.type == "Attachment" || module.json.type == "AttachmentDg") ){ - debugger; this._createAttachment( cell, module, v ); }else{ var text = this._getValueText(index, v);