source: products/quintagroup.referencedatagridfield/trunk/quintagroup/referencedatagridfield/skins/referencedatagridfield/referencedatagrid_hidden_cell.pt @ 2360

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

Rename widgets for columns to referencedatagrid*, little templates cleanup

  • Property svn:eol-style set to native
File size: 2.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<body>
7    <!-- VIEW -->
8    <metal:view_cell_macro define-macro="view_cell">               
9      <div tal:content="cell_value" />
10    </metal:view_cell_macro>
11
12    <!-- EDIT -->
13    <metal:edit_cell_macro define-macro="edit_cell">
14       <tal:visible condition="python:columnd['visible']">
15       <input style="width: 100%" name="myfield.name:records"
16                       tal:attributes="name string:${fieldName}.${column}:records;
17                                       id string:${column}_${fieldId};
18                                       value cell_value;
19                                       onchange eventHandler;
20                                       "
21                       type="text" />
22       </tal:visible>
23       <tal:hidden condition="python:not columnd['visible']">
24       <input style="width: 100%" name="myfield.name:records"
25                       tal:attributes="name string:${fieldName}.${column}:records;
26                                       id string:${column}_${fieldId};
27                                       value cell_value;
28                                       onchange eventHandler;
29                                       "
30                       type="hidden" />
31       </tal:hidden>
32    </metal:edit_cell_macro>
33   
34   <!-- EMPTY EDIT -->
35    <metal:edit_empty_cell_macro define-macro="edit_empty_cell">
36
37       <tal:visible condition="python:columnd['visible']">
38       <input style="width: 100%" name="myfield.name:records"
39                       tal:attributes="name string:${fieldName}.${column}:records;
40                                       id string:${column}_${fieldId};       
41                                       value python: column_definition.getDefault(here);
42                                       onchange eventHandler;
43                                       "
44                       type="text" />
45       </tal:visible>
46       <tal:hidden condition="python:not columnd['visible']">
47       <input style="width: 100%" name="myfield.name:records"
48                       tal:attributes="name string:${fieldName}.${column}:records;
49                                       id string:${column}_${fieldId};
50                                       value python: column_definition.getDefault(here);
51                                       onchange eventHandler;
52                                       "
53                       type="hidden" />
54       </tal:hidden>
55    </metal:edit_empty_cell_macro>
56
57</body>
58</html>
Note: See TracBrowser for help on using the repository browser.