source: products/quintagroup.referencedatagridfield/trunk/quintagroup/referencedatagridfield/skins/referencedatagridfield/datagrid_styled_cell.pt @ 2290

Last change on this file since 2290 was 2290, checked in by mylan, 14 years ago

Added StyledColumn? with possibility to change style on focus and blur of the input tag

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xmlns:tal="http://xml.zope.org/namespaces/tal"
3      xmlns:metal="http://xml.zope.org/namespaces/metal"
4      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5      i18n:domain="plone">
6     
7     
8<!-- View/edit free text columns
9 
10  -->
11
12<body>
13    <!-- VIEW -->
14    <metal:view_cell_macro define-macro="view_cell">               
15      <div tal:content="cell_value" />
16    </metal:view_cell_macro>
17
18    <!-- EDIT -->
19    <metal:edit_cell_macro define-macro="edit_cell">
20       <input style="width: 100%" name="myfield.name:records"
21              tal:define="attribs python:column_definition.getAttributes(rows);"
22              tal:attributes="name string:${fieldName}.${column}:records;
23                          id string:${column}_${fieldId};
24                          value cell_value;
25                          class python:attribs['class'];
26                          onblur python:attribs['onblur'];
27                          onfocus python:attribs['onfocus'];
28                          initial_value cell_value;
29                          "
30           type="text" />
31    </metal:edit_cell_macro>
32   
33   <!-- EMPTY EDIT -->
34    <metal:edit_empty_cell_macro define-macro="edit_empty_cell">
35       <input style="width: 100%" name="myfield.name:records"
36                       tal:attributes="name string:${fieldName}.${column}:records;
37                                       id string:${column}_${fieldId};
38                                       value python: column_definition.getDefault(here);
39                                       onchange eventHandler;
40                                       "
41                       type="text" />
42    </metal:edit_empty_cell_macro>
43   
44   
45
46</body>
47
48</html>
49
Note: See TracBrowser for help on using the repository browser.