Adding tablesorter

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2008-03-18 15:04:27 -05:00 committed by Joshua Ferraro
parent 4e9846ac22
commit f3dbe6c27b
4 changed files with 57 additions and 23 deletions

View File

@ -198,6 +198,7 @@ th {
background-color : #E8E8E8;
font-weight : bold;
padding : .2em 23px;
text-align : center;
}
#editions table, #editions td {

View File

@ -1,6 +1,22 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Comments waiting for Approval</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pack.js"></script>
<script type="text/javascript">//<![CDATA[
$(document).ready(function() {
$.tablesorter.addParser({
id: 'articles',
is: function(s) {return false; },
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
type: 'text'
});
$("#commentst").tablesorter({
sortList: [[0,0]],
headers: { 1: {sorter: 'articles'},2: { sorter: false },3: { sorter: false }}
});
});
//]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
@ -18,13 +34,13 @@
<h1>Comments</h1>
<!-- TMPL_IF NAME="reviews" -->
<table>
<tr>
<table id="commentst">
<thead><tr>
<th>
Authors
Commenter
</th>
<th>
On biblio
On Title
</th>
<th>
Comment
@ -32,15 +48,14 @@
<th>
&nbsp;
</th>
</tr>
<!-- TMPL_LOOP NAME="reviews" -->
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="reviews" -->
<tr>
<td>
<!-- TMPL_VAR NAME="surname" -->
<!-- TMPL_VAR NAME="firstname" -->
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a>
</td>
<td>
<!-- TMPL_VAR NAME="bibliotitle" -->
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="bibliotitle" --></a>
</td>
<td>
<!-- TMPL_VAR NAME="review" -->
@ -50,7 +65,7 @@
<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&amp;reviewid=<!-- TMPL_VAR NAME="reviewid" -->">Delete</a>
</td>
</tr>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP --></tbody>
</table>
<!-- TMPL_ELSE -->
<b>No comments to moderate</b>

View File

@ -2,6 +2,16 @@
<title>Koha &rsaquo; Tools &rsaquo; Koha News</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">//<![CDATA[
$(document).ready(function() {
$("#newst").tablesorter({
sortList: [[2,0]],
headers: { 0: {sorter:false},6: { sorter: false },7: { sorter: false }}
});
});
//]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
@ -100,8 +110,8 @@ Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->
</form>
<!-- TMPL_IF NAME="opac_news_count" -->
<form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit="return confirm('Are you sure you want to delete the selected news?')">
<table>
<tr>
<table id="newst">
<thead> <tr>
<th>&nbsp;</th>
<th>Language</th>
<th>Number</th>
@ -110,8 +120,8 @@ Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->
<th>Title</th>
<th>News</th>
<th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="opac_news" -->
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="opac_news" -->
<!-- TMPL_IF NAME="expired" -->
<tr class="expired">
<!-- TMPL_ELSE -->
@ -130,7 +140,7 @@ Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->
</td>
<td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=<!-- TMPL_VAR NAME="idnew" -->">Edit</a></td>
</tr>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP --></tbody>
</table>
<input type="hidden" name="op" value="del" />
<fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>

View File

@ -1,9 +1,17 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Notices<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF name="modify" --> &rsaquo; Modify notice<!-- TMPL_ELSE --> &rsaquo; Add notice<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" --> &rsaquo; Notice added<!-- /TMPL_IF --><!-- TMPL_IF NAME="delete_confirm" --> &rsaquo; Confirm Deletion<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_IF NAME="add_form" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pack.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#lettert").tablesorter({
widgets : ['zebra'],
sortList: [[0,0]],
headers: { 3: {sorter:false},4: { sorter: false }}
});
});
<!-- TMPL_IF NAME="add_form" -->
function isNotNull(f,noalert) {
if (f.value.length ==0) {
@ -90,9 +98,9 @@
}
}
}
<!-- /TMPL_IF -->
//]]>
</script>
<!-- /TMPL_IF -->
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
@ -127,16 +135,16 @@
<!-- TMPL_IF NAME="search" -->
<p>You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b></p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="letter" --><table>
<tr>
<!-- TMPL_IF NAME="letter" --><table id="lettert">
<thead><tr>
<th>Module</th>
<th>Code</th>
<th>Name</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="letter" -->
<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->" >
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="letter" -->
<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
<td><!-- TMPL_VAR NAME="module" --></td>
<td><!-- TMPL_VAR NAME="code" --></td>
<td><!-- TMPL_VAR NAME="name" --></td>
@ -147,7 +155,7 @@
<a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&amp;module=<!-- TMPL_VAR name="module"-->&amp;code=<!-- TMPL_VAR NAME="code" -->">Delete</a>
</td>
</tr>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP --></tbody>
</table>
<!-- /TMPL_IF -->