@@ -247,29 +247,29 @@ var s_autoform = function (schema, field) {
247247 schema . type = String ;
248248 autoform . readonly = ( permission === 'readonly' ) ;
249249 autoform . disabled = ( permission === 'readonly' ) ;
250- autoform . type = 'steedosHtml' ;
251- // if(permission == 'readonly'){
252- // autoform.type = 'steedosHtml';
253- // }
254- // else{
255- // var locale = Steedos.locale();
256- // if (locale === "zh-cn" || locale === "zh-CN") {
257- // locale = "zh-CN";
258- // } else {
259- // locale = "en-US";
260- // }
261- // autoform.afFieldInput = {
262- // type: "summernote",
263- // class: 'summernote-editor',
264- // settings: {
265- // height: 200,
266- // dialogsInBody: true,
267- // toolbar: [['font1', ['style']], ['font2', ['bold', 'underline', 'italic', 'clear']], ['font3', ['fontname']], ['color', ['color']], ['insert', ['link']]],
268- // fontNames: ['Arial', 'Comic Sans MS', 'Courier New', 'Helvetica', 'Impact', '宋体', '黑体', '微软雅黑', '仿宋', '楷体', '隶书', '幼圆'],
269- // lang: locale
270- // }
271- // };
272- // }
250+ // autoform.type = 'steedosHtml';
251+ if ( permission == 'readonly' ) {
252+ autoform . type = 'steedosHtml' ;
253+ }
254+ else {
255+ var locale = Steedos . locale ( ) ;
256+ if ( locale === "zh-cn" || locale === "zh-CN" ) {
257+ locale = "zh-CN" ;
258+ } else {
259+ locale = "en-US" ;
260+ }
261+ autoform . afFieldInput = {
262+ type : "summernote" ,
263+ class : 'summernote-editor' ,
264+ settings : {
265+ height : 200 ,
266+ dialogsInBody : true ,
267+ toolbar : [ [ 'font1' , [ 'style' ] ] , [ 'font2' , [ 'bold' , 'underline' , 'italic' , 'clear' ] ] , [ 'font3' , [ 'fontname' ] ] , [ 'color' , [ 'color' ] ] , [ 'insert' , [ 'link' ] ] ] ,
268+ fontNames : [ 'Arial' , 'Comic Sans MS' , 'Courier New' , 'Helvetica' , 'Impact' , '宋体' , '黑体' , '微软雅黑' , '仿宋' , '楷体' , '隶书' , '幼圆' ] ,
269+ lang : locale
270+ }
271+ } ;
272+ }
273273 break ;
274274 case 'image' :
275275 if ( is_multiselect ) {
0 commit comments