Changeset 6820 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 27 Sep 2011, 08:25:04 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/resources.py
r6064 r6820 114 114 #: <input type="submit" name="xyz" value="abc"/> 115 115 #: onclick="return confirmPost('Are you sure?')"> 116 warning = ResourceInclusion(waeup_sirp, 'warning.js') 116 warning = ResourceInclusion(waeup_sirp, 'warning.js') 117 118 #: If you have many select boxes in a from which have to be selected at the same 119 # time you have to perform 120 #: two steps: 121 #: * In the `update()` method of the responsible view/page/form 122 #: require the JavaScript code to be rendered into the page: 123 #: 124 #: from waeup.sirp.browser.resources import toggleall 125 #: ... 126 #: class MyPage(...): 127 #: ... 128 #: def update(self): 129 #: toggleall.need() 130 #: 131 #: This way all required JavaScripts will be rendered correctly 132 #: into the HTML page generated. 133 #: 134 #: In your HTML code add some <input> tag with onClick event: 135 #: 136 #: <input type="checkbox" onClick="toggle(this, 'entries')" /> 137 138 toggleall = ResourceInclusion(waeup_sirp, 'toggleall.js') 117 139 118 140 #: A resource that binds jQueryUI tabs to <div> tags with class -
main/waeup.sirp/trunk/src/waeup/sirp/browser/static/jquery.dataTables.min.js
r6010 r6820 38 38 [];this.aoColumns=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=false;this.aoOpenRows= 39 39 [];this.sDom="lfrtip";this.sPaginationType="two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.bAjaxDataGet=true;this.fnServerData=function(a,b,c){j.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(d,f){f=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})}; 40 this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++){if(d%3===0&&d!==0)c=","+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100 ];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=n.oStdClasses;this.bSorted=this.bFiltered=false;this.oInit=null}function r(a){return function(){var b=[A(this[n.iApiIndex])].concat(Array.prototype.slice.call(arguments));40 this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++){if(d%3===0&&d!==0)c=","+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100,1000,5000];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=n.oStdClasses;this.bSorted=this.bFiltered=false;this.oInit=null}function r(a){return function(){var b=[A(this[n.iApiIndex])].concat(Array.prototype.slice.call(arguments)); 41 41 return n.oApi[a].apply(this,b)}}function s(a){var b,c;if(a.bInitialised===false)setTimeout(function(){s(a)},200);else{sa(a);U(a);K(a,true);a.oFeatures.bAutoWidth&&$(a);b=0;for(c=a.aoColumns.length;b<c;b++)if(a.aoColumns[b].sWidth!==null)a.aoColumns[b].nTh.style.width=v(a.aoColumns[b].sWidth);if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide)a.fnServerData.call(a.oInstance,a.sAjaxSource,[],function(d){for(b=0;b<d.aaData.length;b++)u(a, 42 42 d.aaData[b]);a.iInitDisplayStart=a._iDisplayStart;if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}K(a,false);w(a,d)});else if(!a.oFeatures.bServerSide){K(a,false);w(a)}}}function w(a,b){a._bInitComplete=true;if(typeof a.fnInitComplete=="function")typeof b!="undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a)}function y(a,b,c){o(a.oLanguage,b,"sProcessing");o(a.oLanguage,b,"sLengthMenu");o(a.oLanguage,b,"sEmptyTable");o(a.oLanguage, -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r6818 r6820 41 41 from waeup.sirp.students.studylevel import StudentStudyLevel, CourseTicket 42 42 from waeup.sirp.students.vocabularies import StudyLevelSource 43 from waeup.sirp.browser.resources import toggleall 43 44 44 45 # Save function used for save methods in manager pages … … 226 227 def update(self, *args, **kw): 227 228 datatable.need() 229 toggleall.need() 228 230 form = self.request.form 229 231 self.hitlist = [] -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containermanagepage.pt
r6695 r6820 9 9 <select name="searchtype"> 10 10 <option value="student_id">with id</option> 11 <option value=" name">with name</option>11 <option value="fullname">with name</option> 12 12 </select> 13 13 … … 21 21 <input type="hidden" name="old_searchtype" 22 22 tal:attributes="value view/searchtype" /> 23 24 <input type="checkbox" onClick="toggle(this, 'entries')" /> Select all 25 <br /><br /> 26 23 27 <table class="display dataTableManage"> 24 28 <thead> 25 29 <tr> 26 30 <th> </th> 27 <th>Student Id</th><th> Name</th>31 <th>Student Id</th><th>Fullname</th> 28 32 </tr> 29 33 </thead> … … 35 39 <span tal:content="item/student_id">A123456</span></a> 36 40 </td> 37 <td tal:content="item/ name">Bob</td>41 <td tal:content="item/fullname">Bob</td> 38 42 </tr> 39 43 </tbody> 40 44 </table> 45 41 46 <div class="actionButtons"> 42 47 <input type="submit" name="remove" value="Remove selected" />
Note: See TracChangeset for help on using the changeset viewer.