Changeset 9145 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 2 Sep 2012, 07:20:56 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/actionbutton.pt
r7459 r9145 1 1 <a class="btn actionbar" tal:condition="viewlet/target_url" 2 tal:attributes="href viewlet/target_url ">2 tal:attributes="href viewlet/target_url; onclick viewlet/onclick"> 3 3 <img src="" alt="edit" 4 4 tal:attributes="src viewlet/icon_url; -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r9024 r9145 66 66 """A base for action buttons. 67 67 68 An action button provides an icon, some text and links to a 69 target. If you want to set a different text, icon or target name 68 An action button provides an icon, some text, links to a 69 target and optionally an onclick event handler. 70 If you want to set a different text, icon or target name 70 71 for some active button below, just override the approriate 71 72 attribute in the concerned viewlet. … … 82 83 * ``target_url`` 83 84 The URL of the link target. 85 86 * ``onclick`` 87 An onclick Javascript event handler. 84 88 85 89 """ … … 142 146 """ 143 147 return self.view.url(self.view.context, self.target) 148 149 @property 150 def onclick(self): 151 """Onclick event... 152 """ 153 return 144 154 145 155 class PlainActionButton(ActionButton): -
main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
r9138 r9145 190 190 return self.view.url(self.view.context, self.target) 191 191 192 @property 193 def onclick(self): 194 return "return window.confirm(%s);" % _( 195 "'A history message will be added. Are you sure?'") 196 192 197 class StudentActivateActionButton(ManageActionButton): 193 198 grok.order(6) … … 204 209 return '' 205 210 return self.view.url(self.view.context, self.target) 211 212 @property 213 def onclick(self): 214 return "return window.confirm(%s);" % _( 215 "'A history message will be added. Are you sure?'") 206 216 207 217 class StudentClearanceManageActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.