Adding tablesorter

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2008-03-18 15:04:11 -05:00 committed by Joshua Ferraro
parent 1b9b33c8a1
commit 07f85bd3e5
2 changed files with 49 additions and 30 deletions

View File

@ -211,11 +211,16 @@
<!-- TMPL_IF NAME="else" -->
<div id="toolbar">
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pack.js"></script>
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
yuiToolbar();
$("#sysprefst").tablesorter({
sortList: [[0,0]],
headers: { 1: {sorter:false},2: { sorter: false },3: { sorter: false },4: { sorter: false }}
});
});
// YUI Toolbar Functions
function yuiToolbar() {
@ -229,15 +234,15 @@
<h1>System preferences admin</h1>
<h2>'<!-- TMPL_VAR name="tab" -->' preferences</h2>
<!-- TMPL_VAR NAME="searchfield" -->
<table width="80%">
<tr>
<table width="80%" id="sysprefst">
<thead> <tr>
<th>Preference</th>
<th>Explanation</th>
<th>Value</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<!-- TMPL_LOOP NAME="loop" -->
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="loop" -->
<tr<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
<td><strong><a href="<!-- TMPL_VAR NAME="edit" -->"><!-- TMPL_VAR NAME="variable" --></a></strong></td><td> <!-- TMPL_VAR NAME="explanation" --></td>
@ -248,7 +253,7 @@
<td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit </a></td>
<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
</tr>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP --></tbody>
</table>
<!-- /TMPL_IF -->

View File

@ -2,10 +2,25 @@
<title>Koha &rsaquo; Patrons &rsaquo; <!-- TMPL_IF NAME="unknowuser" -->Patron does not exist<!-- TMPL_ELSE -->Patron Details for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pack.js"></script>
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$.tablesorter.addParser({
id: 'articles',
is: function(s) {return false; },
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
type: 'text'
});
$(document).ready(function() {
$('#finesholdsissues > ul').tabs();
$("#issuest").tablesorter({
sortList: [[1,0]],
<!-- TMPL_IF NAME="noItemTypeImages" -->headers: { 0: { sorter: 'articles' },1: { sorter: false },4: { sorter: false },5:{sorter:false},6:{sorter:false},7:{sorter:false},8:{sorter:false}}<!-- TMPL_ELSE -->headers: { 0: {sorter:false}, 1: { sorter: 'articles' },2: { sorter: false },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false},9:{sorter:false}}<!-- /TMPL_IF -->
});
$("#holdst").tablesorter({
sortList: [[0,0]],
headers: { 1: {sorter:false}, 2: { sorter: 'articles' },4: { sorter: false },5: { sorter: false }}
});
$('#manage-patron-image').find("input[@value*=Delete]").click(function(){
return confirm('Are you sure you want to delete this patron image? This cannot be undone.');
});<!-- TMPL_IF NAME="picture" -->
@ -119,7 +134,7 @@ for (var i=0;i<ItemsNodes.length;i++){
<!-- TMPL_IF NAME="reregistration" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
<form action="" name="form">
<input type="hidden" name="reregistration" value="<!-- TMPL_VAR NAME="reregistration"-->" />
<input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
</form>
<!-- TMPL_IF NAME="flagged" -->
@ -219,7 +234,7 @@ for (var i=0;i<ItemsNodes.length;i++){
<!-- /TMPL_UNLESS -->
<input type="hidden" id="image" name="filetype" value="image" />
<input type="hidden" id="cardnumber" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" />
<input type="hidden" id="borrowernumber" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
<ol>
<li>
<label for="uploadfile">Select the file to upload: </label><input type="file" id="uploadfile" name="uploadfile" />
@ -308,8 +323,8 @@ for (var i=0;i<ItemsNodes.length;i++){
<div id="finesholdsissues" class="toptabs">
<ul>
<li><a href="#finesandcharges">Fines &amp; Charges</a></li>
<li><a href="#checkedout">Checked Out</a></li>
<li><a href="#finesandcharges">Fines &amp; Charges</a></li>
<li><a href="#onhold">On Hold</a></li>
</ul>
@ -323,12 +338,13 @@ for (var i=0;i<ItemsNodes.length;i++){
</div>
<div id="checkedout">
<h2>Items on loan</h2>
<h2>Checked Out</h2>
<!-- TMPL_IF NAME="issueloop" --><form action="/cgi-bin/koha/reserve/renewscript.pl" method="post">
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
<table>
<tr>
<table id="issuest">
<thead>
<tr>
<!-- TMPL_UNLESS NAME="noItemTypeImages" --><th scope="col">&nbsp;</th><!-- /TMPL_UNLESS -->
<th scope="col">Title</th>
<th scope="col">Barcode</th>
@ -339,9 +355,9 @@ for (var i=0;i<ItemsNodes.length;i++){
<th scope="col">Price</th>
<th scope="col">Renew</th>
<th scope="col">Return</th>
</tr>
</tr></thead>
<!-- TMPL_LOOP name="issueloop" -->
<tbody> <!-- TMPL_LOOP name="issueloop" -->
<!-- TMPL_IF name="overdue" -->
<tr class="problem">
<!-- TMPL_ELSE -->
@ -379,7 +395,7 @@ for (var i=0;i<ItemsNodes.length;i++){
<!-- TMPL_ELSE -->
<input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
<!-- TMPL_IF NAME="red" -->
<input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" onClick="javascript:uncheck_sibling(this);" />
<input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" onclick="javascript:uncheck_sibling(this);" />
<!-- TMPL_ELSE -->
<input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" onClick="javascript:uncheck_sibling(this);" />
<!-- /TMPL_IF -->
@ -394,23 +410,21 @@ for (var i=0;i<ItemsNodes.length;i++){
</td>
<!-- /TMPL_IF -->
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop --></tbody>
<tr>
<!-- TMPL_UNLESS NAME="noItemTypeImages" --><td>&nbsp;</td><!-- /TMPL_UNLESS -->
<td colspan="5">Total replacement cost:</td>
<td><!-- TMPL_VAR NAME="totalprice" --></td>
<td colspan="2">
<td colspan="3">
renewal due date :<input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" />
<script type="text/javascript">
//<![CDATA[
Calendar.setup(
{
Calendar.setup({
inputField : "newduedate",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "newduedate_button"
}
);
});
//]]>
</script>
</td>
@ -418,10 +432,10 @@ for (var i=0;i<ItemsNodes.length;i++){
</table>
<fieldset class="action">
<input type="submit" name="renew_checked" value="Renew or Return checked items" />
<input type="submit" name="renew_all" value="Renew all" onClick="checkall('items[]');"/>
<input type="submit" name="return_all" value="Return all" onClick="checkall('barcodes[]');"/>
<input type="button" name="renew_all" value="Uncheck all Renew" onClick="uncheckall('items[]');"/>
<input type="button" name="return_all" value="Uncheck all Returns" onClick="uncheckall('barcodes[]');"/>
<input type="submit" name="renew_all" value="Renew all" onclick="checkall('items[]');"/>
<input type="submit" name="return_all" value="Return all" onclick="checkall('barcodes[]');"/>
<input type="button" name="renew_all" value="Uncheck all Renew" onclick="uncheckall('items[]');"/>
<input type="button" name="return_all" value="Uncheck all Returns" onclick="uncheckall('barcodes[]');"/>
</fieldset>
</form><!-- TMPL_ELSE --><p>Patron has nothing checked out.</p><!-- /TMPL_IF -->
</div>
@ -431,16 +445,16 @@ for (var i=0;i<ItemsNodes.length;i++){
<!-- TMPL_IF NAME="reservloop" -->
<form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
<input type="hidden" name="from" value="borrower" />
<table>
<tr>
<table id="holdst">
<thead><tr>
<th>Hold date</th>
<th>Barcode</th>
<th>Title</th>
<th>Author</th>
<th>Localisation</th>
<th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="reservloop" -->
<th>Delete?</th>
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="reservloop" -->
<tr class="<!-- TMPL_VAR NAME="color" -->">
<td>
<!-- TMPL_VAR NAME="reservedate" -->
@ -480,7 +494,7 @@ for (var i=0;i<ItemsNodes.length;i++){
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR name="borrowernumber" -->" /></td>
</tr>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP --></tbody>
</table>
<fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" /></fieldset>
</form>