cubicweb/uilib.py
changeset 12508 a8c1ea390400
parent 11767 432f87a63057
child 12567 26744ad37953
equal deleted inserted replaced
12507:211472ab15c8 12508:a8c1ea390400
    30 
    30 
    31 from six import PY2, PY3, text_type, binary_type, string_types, integer_types
    31 from six import PY2, PY3, text_type, binary_type, string_types, integer_types
    32 
    32 
    33 from logilab.mtconverter import xml_escape, html_unescape
    33 from logilab.mtconverter import xml_escape, html_unescape
    34 from logilab.common.date import ustrftime
    34 from logilab.common.date import ustrftime
    35 from logilab.common.deprecation import deprecated
       
    36 
    35 
    37 from cubicweb import _
    36 from cubicweb import _
    38 from cubicweb.utils import js_dumps
    37 from cubicweb.utils import js_dumps
    39 
    38 
    40 
    39 
   140     'Boolean': print_boolean,
   139     'Boolean': print_boolean,
   141     'Float': print_float,
   140     'Float': print_float,
   142     'Decimal': print_float,
   141     'Decimal': print_float,
   143     'Interval': print_timedelta,
   142     'Interval': print_timedelta,
   144     }
   143     }
   145 
       
   146 @deprecated('[3.14] use req.printable_value(attrtype, value, ...)')
       
   147 def printable_value(req, attrtype, value, props=None, displaytime=True):
       
   148     return req.printable_value(attrtype, value, props, displaytime)
       
   149 
   144 
   150 def css_em_num_value(vreg, propname, default):
   145 def css_em_num_value(vreg, propname, default):
   151     """ we try to read an 'em' css property
   146     """ we try to read an 'em' css property
   152     if we get another unit we're out of luck and resort to the given default
   147     if we get another unit we're out of luck and resort to the given default
   153     (hence, it is strongly advised not to specify but ems for this css prop)
   148     (hence, it is strongly advised not to specify but ems for this css prop)