Просмотр исходного кода

Merge branch 'fix/ckeditor.indent' into 'wrdp'

Merge of fix/ckeditor.indent 修复数据网格只读状态下附件显示错误的问题,修复流程ckeditor extraPlugins参数无效的问题 to wrdp

See merge request o2oa/o2oa!2482
蔡祥熠 5 лет назад
Родитель
Сommit
a1f135179b

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

@@ -226,6 +226,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
     __loadReadDatagrid: function(callback){
     __loadReadDatagrid: function(callback){
         //this.gridData = this._getValue();
         //this.gridData = this._getValue();
 
 
+
         var titleHeaders = this.table.getElements("th");
         var titleHeaders = this.table.getElements("th");
         var tds = this.table.getElements("td");
         var tds = this.table.getElements("td");
 
 
@@ -521,6 +522,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
             "toolbarGroupHidden": module.json.dg_toolbarGroupHidden || []
             "toolbarGroupHidden": module.json.dg_toolbarGroupHidden || []
         };
         };
         if (this.readonly) options.readonly = true;
         if (this.readonly) options.readonly = true;
+        if(!this.editable && !this.addable)options.readonly = true;
 
 
         var atts = [];
         var atts = [];
         data.each(function(d){
         data.each(function(d){
@@ -532,7 +534,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
         module.setAttachmentBusinessData();
         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();
         attachmentController.load();
 
 
         data.each(function (att) {
         data.each(function (att) {
@@ -835,7 +837,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
                 }
                 }
 
 
                 var cell;
                 var cell;
-                var text = this._getValueText(idx, data.text.join(", "));
+                // var text = this._getValueText(idx, data.text.join(", "));
 
 
                 if (dataRow){
                 if (dataRow){
                     cell = dataRow.getElement("td");
                     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" ){
                     }else if( module.json.type == "Attachment" || module.json.type == "AttachmentDg" ){
                         this._createAttachment( cell, module, data );
                         this._createAttachment( cell, module, data );
                     }else{
                     }else{
+                        var text = this._getValueText(idx, data.text.join(", "));
                         if( module && module.json.type == "Textarea" ){
                         if( module && module.json.type == "Textarea" ){
                             cell.set("html", text);
                             cell.set("html", text);
                         }else{
                         }else{
@@ -866,6 +869,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
                     }else if( module.json.type == "Attachment" || module.json.type == "AttachmentDg" ){
                     }else if( module.json.type == "Attachment" || module.json.type == "AttachmentDg" ){
                         this._createAttachment( cell, module, data );
                         this._createAttachment( cell, module, data );
                     }else{
                     }else{
+                        var text = this._getValueText(idx, data.text.join(", "));
                         if( module && module.json.type == "Textarea" ){
                         if( module && module.json.type == "Textarea" ){
                             cell.set("html", text);
                             cell.set("html", text);
                         }else{
                         }else{

+ 6 - 3
o2web/source/x_component_process_Xform/DatagridPC.js

@@ -610,6 +610,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
 			"toolbarGroupHidden": module.json.dg_toolbarGroupHidden || []
 			"toolbarGroupHidden": module.json.dg_toolbarGroupHidden || []
 		};
 		};
 		if (this.readonly) options.readonly = true;
 		if (this.readonly) options.readonly = true;
+		if(!this.editable && !this.addable)options.readonly = true;
 
 
 		var atts = [];
 		var atts = [];
 		data.each(function(d){
 		data.each(function(d){
@@ -621,7 +622,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
 		module.setAttachmentBusinessData();
 		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();
 		attachmentController.load();
 
 
 		data.each(function (att) {
 		data.each(function (att) {
@@ -880,8 +881,10 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
 							var v = cellData[key];
 							var v = cellData[key];
 
 
 							var module = this.editModules[index];
 							var module = this.editModules[index];
-							if( module && module.json.type == "ImageClipper" ){
-								this._createImage( cell, module, v );
+							if( module && module.json.type == "ImageClipper" ) {
+								this._createImage(cell, module, v);
+							}else if( module && (module.json.type == "Attachment" || module.json.type == "AttachmentDg") ){
+								this._createAttachment( cell, module, v );
 							}else{
 							}else{
 								var text = this._getValueText(index, v);
 								var text = this._getValueText(index, v);
 								if( module && module.json.type == "Textarea" ){
 								if( module && module.json.type == "Textarea" ){

+ 8 - 1
o2web/source/x_component_process_Xform/Htmleditor.js

@@ -72,7 +72,14 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor =  new Class({
             editorConfig.localImageMaxWidth = 800;
             editorConfig.localImageMaxWidth = 800;
             editorConfig.reference = this.form.businessData.work.job;
             editorConfig.reference = this.form.businessData.work.job;
             editorConfig.referenceType = "processPlatformJob";
             editorConfig.referenceType = "processPlatformJob";
-            editorConfig.extraPlugins = ['pagebreak'];
+            if( editorConfig && editorConfig.extraPlugins ){
+                var extraPlugins = editorConfig.extraPlugins;
+                extraPlugins = typeOf( extraPlugins ) === "array" ? extraPlugins : extraPlugins.split(",");
+                extraPlugins.push( 'pagebreak' );
+                editorConfig.extraPlugins = extraPlugins;
+            }else{
+                editorConfig.extraPlugins = ['pagebreak'];
+            }
             
             
             // CKEDITOR.basePath = COMMON.contentPath+"/res/framework/htmleditor/ckeditor/";
             // CKEDITOR.basePath = COMMON.contentPath+"/res/framework/htmleditor/ckeditor/";
             // CKEDITOR.plugins.basePath = COMMON.contentPath+"/res/framework/htmleditor/ckeditor/plugins/";
             // CKEDITOR.plugins.basePath = COMMON.contentPath+"/res/framework/htmleditor/ckeditor/plugins/";