Changeset 5929
- Timestamp:
- 12 Apr 2011, 11:42:30 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/resources.py
r5835 r5929 61 61 datepicker = ResourceInclusion(waeup_sirp, 'datepicker.js', 62 62 depends=[jqueryui]) 63 64 65 #: If you want generate alert or confirm messages then you have to perform 66 #: two steps: 67 #: * In the `update()` method of the responsible view/page/form 68 #: require the JavaScript code to be rendered into the page: 69 #: 70 #: from waeup.sirp.browser.resources import datepicker 71 #: ... 72 #: class MyPage(...): 73 #: ... 74 #: def update(self): 75 #: warning.need() 76 #: 77 #: This way all required JavaScripts will be rendered correctly 78 #: into the HTML page generated. 79 #: 80 #: In your HTML code add some <input> or <a> tag with onClick event: 81 #: 82 #: <input type="submit" name="xyz" value="abc"/> 83 #: onclick="return confirmPost('Are you sure?')"> 84 85 warning = ResourceInclusion(waeup_sirp, 'warning.js') -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/facultycontainerpage.pt
r5917 r5929 1 1 <h2>Faculties</h2> 2 2 3 4 5 3 <div tal:condition="python: not len(context.keys())"> 4 There are no faculties registered yet. 5 </div> 6 6 7 <div name="thefacultytable" tal:condition="python: len(context.keys())"> 8 <div tal:replace="structure view/table/renderHTML" /> 9 </div> 7 <table class="zebra"> 8 <thead> 9 <tr> 10 <th>Code</th> 11 <th>Title</th> 12 <th> </th> 13 </tr> 14 </thead> 15 <tbody> 16 <tr tal:repeat="value context/values" 17 tal:attributes="class python: repeat['value'].odd() and 'odd' or 'even'"> 18 <td> <a tal:attributes="href value/__name__"> <span tal:content="value/code">Name</span></a></td> 19 <td tal:content="value/title">Title</td> 20 <td class="text-right"> 21 <form method="post"> 22 <input type="hidden" name="code" 23 tal:attributes="value value/__name__"/> 24 <input type="submit" name="delete" value="remove" 25 onclick="return confirmPost('All departments and courses of this faculty will be removed too. Are you sure?')"> 26 </form> 27 28 </td> 29 </tr> 30 </tbody> 31 </table>
Note: See TracChangeset for help on using the changeset viewer.