Эх сурвалжийг харах

修复流程ckeditor extraPlugins参数无效的问题

unknown 5 жил өмнө
parent
commit
72d0bd7cf1

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

@@ -610,6 +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;
 
 		var atts = [];
 		data.each(function(d){
@@ -880,8 +881,11 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
 							var v = cellData[key];
 
 							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") ){
+								debugger;
+								this._createAttachment( cell, module, v );
 							}else{
 								var text = this._getValueText(index, v);
 								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.reference = this.form.businessData.work.job;
             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.plugins.basePath = COMMON.contentPath+"/res/framework/htmleditor/ckeditor/plugins/";