~txerpa-openerp/openobject-client-web/txerpa

« back to all changes in this revision

Viewing changes to addons/openerp/widgets/form/templates/text.mako

  • Committer: Biel - txerpa.com
  • Date: 2013-08-09 12:30:58 UTC
  • mfrom: (4670.2.245 openobject-client-web)
  • Revision ID: biel.massot@txerpa.com-20130809123058-892zu673ti1j8yjd
Actualizo a la ultima revision de trunk. Hay muchos bugs correjidos desde 2012. Elimino la revision 4873 por problemas de rendimiento en el dashboard de Contabilidad

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
% if editable:
2
 
    % if inline:
3
 
        <input id ="${name}" name="${name}" type="text" class="${css_class}" size="1"
4
 
            ${py.attrs(attrs, kind=kind, value=value)}/>
5
 
    % else:
 
2
    <div class = "text">
6
3
        <textarea rows="6" id ="${name}" name="${name}" class="${css_class}"
7
4
            ${py.attrs(attrs, kind=kind)} style="width: 100%;">${value}</textarea>
8
5
        <script type="text/javascript">
10
7
                new openerp.ui.TextArea('${name}');
11
8
            }
12
9
        </script>
 
10
        % if translatable:
 
11
         <img name = "${name}" src="/openerp/static/images/stock/stock_translate.png" class="translatable" />
 
12
         <script type="text/javascript">
 
13
             jQuery('img[name=${name}]').click(function() {
 
14
                 var params = {
 
15
                     'relation': '${model}',
 
16
                     'id': jQuery('#_terp_id').attr('value'),
 
17
                     'data': jQuery('#_terp_context').attr('value'),
 
18
                 };
 
19
                 translate_fields(null, params);
 
20
             });
 
21
         </script>
13
22
    % endif
14
 
 
15
23
    % if error:
16
24
        <span class="fielderror">${error}</span>
17
25
    % endif
 
26
    </div>
18
27
% else:
19
28
    <p kind="${kind}" id="${name}" class="raw-text">${value}</p>
20
29
% endif