From 5ddc0e4ad688564794217bfb387cd53877937abc Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Mon, 14 Sep 2009 17:40:28 +0200 Subject: [PATCH] [biblibre-newacq](bug #3611) use jquery table sorter This patch, modify tables to use the jquery plugin to sort tables. --- .../en/modules/admin/aqbudgetperiods.tmpl | 32 ++++++---- .../prog/en/modules/admin/aqbudgets.tmpl | 58 ++++++++++++------- 2 files changed, 58 insertions(+), 32 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl index 7232ea9474..8fbc961573 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl @@ -3,6 +3,7 @@ + @@ -270,17 +277,19 @@ <!-- TMPL_IF name="else" --> <h2>Budget periods administration</h2> <!-- TMPL_IF name="cur" --><b>Currency = <!-- TMPL_VAR name="cur" --></b><!-- /TMPL_IF --> - <table> - <tr> - <th>Period Name</th> - <th>Start Date</th> - <th>End Date</th> - <th>Active</th> - <th>Locked</th> - <th>Total</th> - <th>Actions</th> - </tr> - + <table id="periodsh"> + <thead> + <tr> + <th>Period Name</th> + <th>Start Date</th> + <th>End Date</th> + <th>Active</th> + <th>Locked</th> + <th>Total</th> + <th>Actions</th> + </tr> + </thead> + <tbody> <!-- TMPL_LOOP name="period_loop" --> <!-- TMPL_IF NAME="__odd__" --> <tr> @@ -301,6 +310,7 @@ </td> </tr> <!-- /TMPL_LOOP --> + </tbody> </table> <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div> <!-- /TMPL_IF --> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index b48fd65b36..21464c7e53 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -6,6 +6,7 @@ <script type="text/javascript"> //<![CDATA[ // + var actTotal =""; function ownerRemove(f) { @@ -79,6 +80,19 @@ } //]]> </script> +<!-- TMPL_ELSE --> +<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script> +<script type="text/javascript"> +//<![CDATA[ + // + $(document).ready(function() { + $("#budgeth").tablesorter({ + widgets : ['zebra'], + sortList: [[0,0]] + }); + }); +//]]> +</script> <!-- /TMPL_IF --> </head> @@ -127,26 +141,28 @@ </fieldset> </form> -<table> - <tr> - <th>Budget hierarchy</th> - <th>Budget name</th> - <th>Total<br>allocated</th> - <th>Base-level<br>allocated</th> - <th>Sub-level<br>allocated (unallocated)</th> - <th>Base-level<br>spent</th> - <th>Base-level<br>remaining</th> - <!-- - <th>Sub-level<br>spent</th> - <th>Encum%</th> - <th>Expend%</th> - --> - <th>Owner</th> - <th>Branch</th> - <th>Note</th> - <th colspan="3">Actions</th> - </tr> - +<table id="budgeth"> + <thead> + <tr> + <th>Budget hierarchy</th> + <th>Budget name</th> + <th>Total<br>allocated</th> + <th>Base-level<br>allocated</th> + <th>Sub-level<br>allocated (unallocated)</th> + <th>Base-level<br>spent</th> + <th>Base-level<br>remaining</th> + <!-- + <th>Sub-level<br>spent</th> + <th>Encum%</th> + <th>Expend%</th> + --> + <th>Owner</th> + <th>Branch</th> + <th>Note</th> + <th colspan="3">Actions</th> + </tr> + </thead> + <tbody> <!-- TMPL_LOOP name="budget" --> <!-- TMPL_IF NAME="toggle" --> <tr class="highlight"> @@ -190,7 +206,7 @@ <!-- /TMPL_IF --> </tr> <!-- /TMPL_LOOP --> - + </tbody> <tfoot> <tr> <th colspan='2' style='text-align: left;' nowrap>Period allocated <!--TMPL_IF NAME="budget_period_total" --><!-- TMPL_VAR NAME='budget_period_total'--><!-- /TMPL_IF --> </th> -- 2.39.2