source: products/quintagroup.referencedatagridfield/trunk/quintagroup/referencedatagridfield/skins/referencedatagridfield/datagridwidget_manipulators.pt @ 2269

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

Overlap ATReferenceBrowserWidget referencebrowser.js to insert data into proper <input> tag on the page

  • Property svn:eol-style set to native
File size: 4.3 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<body>
8
9    <metal:define define-macro="edit_manipulators">   
10   
11         <tal:manipulator-cells>
12               
13                <tal:comment replace="nothing">
14                     IE doesn't seem to respect em unit paddings here so we
15                     use absolute pixel paddings.
16                </tal:comment>
17
18                <tal:comment replace="nothing">
19                        <!-- Add reference -->
20                </tal:comment>
21
22                <td class="datagridwidget-manipulator"
23                    tal:define="multiVal      python:0;
24                                fieldRealName field/getName;
25                                ">
26                    <div style="clear: both"
27                         tal:define="startup_directory python:here.referencebrowser_startupDirectory(widget.getStartupDirectory(here));
28                                     global at_url at_url|python:'/'.join(here.getPhysicalPath());
29                                     field_id string:link_uid_${fieldId}">
30                        <input type="button"
31                               class="searchButton"
32                               value="Add Reference"
33                               onClick=""
34                               i18n:attributes="value label_add;"
35                               tal:attributes="onClick string:javascript:referencebrowser_openBrowser('${startup_directory}','${field_id}', '${at_url}', '${fieldRealName}', this)" />
36                    </div>
37                </td>
38
39                <tal:comment replace="nothing">
40                        <!-- Insert -->         
41                </tal:comment>
42
43                 <td class="datagridwidget-manipulator"
44                        tal:condition="python: widget.isInsertEnabled(context, field)">
45                     <img tal:attributes="
46                                src string:${portal_url}/add_row_icon.gif;
47                                "
48                          alt="Add row" 
49                          onclick="dataGridFieldFunctions.addRowAfter(this); return false"/>
50                 </td>                 
51
52                <tal:comment replace="nothing">
53                        <!-- Delete -->         
54                </tal:comment>   
55                 <td  class="datagridwidget-manipulator"
56                        tal:condition="python: widget.isDeleteEnabled(context, field)">
57                     <img tal:attributes="
58                                src string:${portal_url}/delete_row_icon.gif;
59                                "
60                          alt="Delete row" 
61                          onclick="dataGridFieldFunctions.removeFieldRow(this);return false"/>
62                 </td>
63                   
64                <tal:comment replace="nothing">
65                        <!-- Move up -->               
66                </tal:comment>             
67                    <td class="datagridwidget-manipulator">
68       
69                       <img tal:attributes="
70                                src string:${portal_url}/move_row_up_icon.gif;
71                                "
72                             alt="Move row up" 
73                             tal:condition="python: widget.isReorderEnabled(context, field)"
74                             onclick="dataGridFieldFunctions.moveRowUp(this);return false"/>
75                                                                   
76                    </td>
77                   
78                <tal:comment replace="nothing">
79                        <!-- Move down -->             
80                </tal:comment>                             
81                    <td class="datagridwidget-manipulator">
82                   
83                        <img tal:attributes="
84                                src string:${portal_url}/move_row_down_icon.gif;
85                                "
86                             alt="Move row down" 
87                             tal:condition="python: widget.isReorderEnabled(context, field)"
88                             onclick="dataGridFieldFunctions.moveRowDown(this);return false"/>
89                             
90                    </td>
91                   
92
93                <tal:comment replace="nothing">
94                        <!-- The index field of this row -->           
95                </tal:comment>                             
96                    <td class="datagridwidget-hidden-data">
97
98                           <tal:ordering-field tal:condition="newRow">
99                       <input type="hidden"
100                               value="template_row_marker"
101                               tal:attributes="name string:${fieldName}.orderindex_:records;
102                                               id string:orderindex__${fieldId};" />
103                                </tal:ordering-field>                       
104                               
105                           <tal:ordering-field tal:condition="not: newRow">
106                               <input type="hidden"
107                                       tal:attributes="name string:${fieldName}.orderindex_:records;
108                                                       id string:orderindex__${fieldId};
109                                                       value repeat/rows/number;" />   
110                           </tal:ordering-field>                                                                                           
111                    </td>
112                       
113                </tal:manipulator-cells>
114    </metal:define>
115</body>
116
117</html>   
Note: See TracBrowser for help on using the repository browser.