Changeset 6023


Ignore:
Timestamp:
3 May 2011, 07:12:06 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement jQuery datatables on CertificateManageFormPage?.
Sort on column 2 and disable sorting on columns 1 (checkbox column).

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r6022 r6023  
    13631363        return "Certificate: %s (%s)" % (self.context.title, self.context.code)
    13641364       
    1365     #def update(self):
    1366     #    if 'delcourse' in self.request.form:
    1367     #        code = self.request.form['code']
    1368     #        level = self.request.form['level']
    1369     #        self.context.delCourseRef(code, level=level)
    1370     #    return
    13711365       
    13721366    def getCourseList(self):
     
    14431437        tabs.need()
    14441438        #warning.need()
     1439        datatable.need()
    14451440        return super(CertificateManageFormPage, self).update()
    14461441       
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/static/datatable.js

    r6018 r6023  
    11$(document).ready(function(){
    22    $('.dataTable').dataTable();
     3        $('.dataTableManage').dataTable( {
     4                "aaSorting": [[ 1, "asc" ]],
     5                "aoColumnDefs":[{ "bSortable": false, "aTargets": [ 0 ] }]
     6        } );   
    37});
     8
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatemanagepage.pt

    r6007 r6023  
    7474<div id="tab-2">
    7575  <h3>Course Referrers</h3>
    76   <table class="zebra">
     76  <table class="display dataTableManage">
    7777    <thead>
    7878      <tr>
    79         <th>&nbsp;</th><th>Code</th><th>Course</th><th>Level</th>
     79        <th>&nbsp;</th><th>Level</th><th>Code</th><th>Course</th>
    8080        <th>Mandatory</th>
    8181      </tr>
     
    8383    <tbody>
    8484      <tr tal:repeat="cc context/values">
    85         <td>
     85         <td>
    8686          <input type="checkbox"
    8787                 name="val_id"
    8888                 tal:attributes="value cc/__name__" />
     89        </td>
     90         <td>
     91          <span tal:content="cc/level">
     92           LEVEL
     93          </span>
    8994        </td>
    9095        <td>
     
    103108        </td>
    104109        <td>
    105           <span tal:content="cc/level">
    106            LEVEL
    107           </span>
    108         </td>
    109                 <td>
    110110          <span tal:content="cc/core_or_elective">
    111111           MANDATORY
     
    116116  </table>
    117117 
    118     <div id="actionsView">
     118  <div id="actionsView">
    119119        <span class="actionButtons" tal:condition="view/availableActions">
    120120            <span tal:repeat="action view/actions"
     
    124124            </span>
    125125        </span>
    126     </div>     
     126  </div>     
    127127 
    128128</div>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/departmentmanagepage.pt

    r6018 r6023  
    7474   
    7575<div id="tab-2"> 
    76     <table class="display dataTable">
     76    <table class="display dataTableManage">
    7777      <thead>
    7878        <tr>
     
    110110
    111111<div id="tab-3"> 
    112     <table class="display dataTable">
     112    <table class="display dataTableManage">
    113113      <thead>
    114114        <tr>
Note: See TracChangeset for help on using the changeset viewer.