@@ -160,26 +160,19 @@ return {
160160 break ;
161161 case fts . lov :
162162 if ( v !== '' ) {
163- //if(f.icon && f.list & f.list[0].icon){
164- // return 'f.icon' + this._lovText(f,v);
165- //}else{
166- //return Evol.Dico.lovText(f, iconPath+v, hashLov);
167- return Evol . Dico . lovText ( f , v , hashLov , iconsPath ) ;
168- //}
163+ return Evol . Dico . lovItemText ( f , v , hashLov , iconsPath ) ;
169164 }
170165 break ;
171166 case fts . list :
172167 if ( _ . isString ( v ) ) {
173- v = v . split ( ',' ) ;
168+ v = v . split ( ',' ) ;
174169 }
175- if ( v && v . length ) {
176- var vs = [ ] ;
177- _ . each ( v , function ( vi ) {
178- vs . push ( Evol . Dico . lovText ( f , vi , hashLov , iconsPath ) ) ;
179- } ) ;
180- return vs . join ( ', ' ) ;
170+ if ( v && v . length && v [ 0 ] !== '' ) {
171+ return '<div class="evo-f-list"><div>' + _ . map ( v , function ( vi ) {
172+ return Evol . Dico . lovItemText ( f , vi , hashLov , iconsPath ) ;
173+ } ) . join ( '</div><div>' ) + '</div></div>' ;
181174 }
182- return v ;
175+ return '' ;
183176 case fts . date :
184177 case fts . time :
185178 case fts . datetime :
@@ -200,6 +193,8 @@ return {
200193 return dom . linkEmail ( wId ?f . id :null , v ) ;
201194 case fts . url :
202195 return dom . link ( f . id , v , v , f . id ) ;
196+ case fts . json :
197+ return dom . input . textM ( f . id , Evol . Format . jsonString ( v , false ) , f . maxLen , f . height , true ) ;
203198 //case fts.color:
204199 // return uiInput.colorBox(f.id, v, v);
205200 default :
@@ -273,7 +268,7 @@ return {
273268 }
274269 } ,
275270 // get field value (not id but text) for a field of type lov
276- lovText :function ( f , v , hash , iconsPath ) {
271+ lovItemText :function ( f , v , hash , iconsPath , inDiv ) {
277272 if ( f . list && f . list . length > 0 && hash ) {
278273 if ( ! ( f . id in hash ) ) {
279274 hash [ f . id ] = { } ;
@@ -298,7 +293,7 @@ return {
298293 return '' ;
299294 } ,
300295
301- lovTextNoPix :function ( f , v ) {
296+ lovItemTextNoPix :function ( f , v ) {
302297 var listItem = _ . find ( f . list , function ( item ) {
303298 return item . id == v ;
304299 } ) ;
0 commit comments