@@ -346,6 +346,8 @@ Evol.Dico = {
346346 return Evol . UI . linkEmail ( f . id , v ) ;
347347 case fTypes . url :
348348 return Evol . UI . link ( f . id , v , v , f . id ) ;
349+ //case fTypes.color:
350+ // return Evol.UI.input.colorBox(f.id, v, v);
349351 default :
350352 return v ;
351353 }
@@ -355,6 +357,7 @@ Evol.Dico = {
355357 HTMLField4One : function ( fld , fid , fv , mode , iconsPath , skipLabel ) {
356358 var h = [ ] ,
357359 EvoUI = Evol . UI ,
360+ uiInput = EvoUI . input ,
358361 fTypes = Evol . Dico . fieldTypes ;
359362 // --- field label ---
360363 if ( mode === 'mini' ) {
@@ -373,7 +376,7 @@ Evol.Dico = {
373376 }
374377 h . push ( '">' ) ;
375378 switch ( fld . type ) {
376- case fTypes . color :
379+ case fTypes . color : // TODO is the color switch necessary?
377380 //h.push(Evol.UI.input.colorBox(fid, fv), fv);
378381 h . push ( '<div id="' , fid , '" class="form-control">' , fv , '</div>' ) ;
379382 break ;
@@ -390,19 +393,19 @@ Evol.Dico = {
390393 } else {
391394 switch ( fld . type ) {
392395 case fTypes . text :
393- h . push ( EvoUI . input . text ( fid , fv , fld , null ) ) ;
396+ h . push ( uiInput . text ( fid , fv , fld , null ) ) ;
394397 break ;
395398 case fTypes . int :
396399 case fTypes . dec :
397- h . push ( EvoUI . input . textInt ( fid , fv , fld . max , fld . min ) ) ;
400+ h . push ( uiInput . textInt ( fid , fv , fld . max , fld . min ) ) ;
398401 break ;
399402 case fTypes . money :
400403 h . push ( '<div class="input-group">' , EvoUI . input . typeFlag ( '$' ) ,
401- EvoUI . input . textInt ( fid , fv ) ,
404+ uiInput . textInt ( fid , fv ) ,
402405 '</div>' ) ;
403406 break ;
404407 case fTypes . bool :
405- h . push ( EvoUI . input . checkbox ( fid , fv ) ) ;
408+ h . push ( uiInput . checkbox ( fid , fv ) ) ;
406409 break ;
407410 case fTypes . textml :
408411 case fTypes . html :
@@ -415,30 +418,30 @@ Evol.Dico = {
415418 fld . height = 5 ;
416419 }
417420 }
418- h . push ( EvoUI . input . textM ( fid , fv , fld . maxlength , fld . height ) ) ;
421+ h . push ( uiInput . textM ( fid , fv , fld . maxlength , fld . height ) ) ;
419422 break ;
420423 case fTypes . date :
421- h . push ( EvoUI . input . date ( fid , fv ) ) ;
424+ h . push ( uiInput . date ( fid , fv ) ) ;
422425 break ;
423426 case fTypes . datetime :
424- h . push ( EvoUI . input . dateTime ( fid , fv ) ) ;
427+ h . push ( uiInput . dateTime ( fid , fv ) ) ;
425428 break ;
426429 case fTypes . time :
427- h . push ( EvoUI . input . time ( fid , fv ) ) ;
430+ h . push ( uiInput . time ( fid , fv ) ) ;
428431 break ;
429432 case fTypes . lov :
430- h . push ( EvoUI . input . select ( fid , fv , '' , true , fld . list ) ) ;
433+ h . push ( uiInput . select ( fid , fv , '' , true , fld . list ) ) ;
431434 break ;
432435 case fTypes . list : // fv is an array. will use select2
433436 h . push ( '<div id="' , fid , '" class="w-100 form-control"></div>' ) ;
434437 break ;
435438 case fTypes . email :
436- h . push ( '<div class="input-group">' , EvoUI . input . typeFlag ( Evol . i18n . sgn_email ) ,
437- EvoUI . input . text ( fid , fv , fld ) ,
439+ h . push ( '<div class="input-group">' , uiInput . typeFlag ( Evol . i18n . sgn_email ) ,
440+ uiInput . text ( fid , fv , fld ) ,
438441 '</div>' ) ;
439442 break ;
440443 case fTypes . url :
441- h . push ( EvoUI . input . text ( fid , fv , fld ) ) ;
444+ h . push ( uiInput . text ( fid , fv , fld ) ) ;
442445 break ;
443446 //case fTypes.doc:
444447 case fTypes . pix :
@@ -447,14 +450,14 @@ Evol.Dico = {
447450 } else {
448451 h . push ( '<p class="">' , Evol . i18n . nopix , '</p>' ) ;
449452 }
450- h . push ( EvoUI . input . text ( fid , fv , fld , null ) ) ;
453+ h . push ( uiInput . text ( fid , fv , fld , null ) ) ;
451454 break ;
452455 case fTypes . color :
453456 //h.push('<div id="',fid, '" class="form-control">',fv,'</div>');
454- h . push ( EvoUI . input . color ( fid , fv ) ) ;
457+ h . push ( uiInput . color ( fid , fv ) ) ;
455458 break ;
456459 case fTypes . hidden :
457- h . push ( EvoUI . input . hidden ( fid , fv ) ) ;
460+ h . push ( uiInput . hidden ( fid , fv ) ) ;
458461 break ;
459462 }
460463 }
0 commit comments