Browse Source

Adding checks for dateformat preference so that tablesorter script can be passed an extra parameter for proper sorting of metric dates (Bug 2089, dates & table ordering with jquery)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
3.0.x
Owen Leonard 15 years ago
committed by Joshua Ferraro
parent
commit
157b5a1eb6
  1. 3
      circ/circulation.pl
  2. 1
      circ/pendingreserves.pl
  3. 1
      circ/transferstodo.pl
  4. 1
      circ/transferstoreceive.pl
  5. 1
      circ/waitingreserves.pl
  6. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
  7. 3
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tmpl
  8. 9
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstodo.tmpl
  9. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl
  10. 3
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tmpl
  11. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
  12. 9
      koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
  13. 3
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl
  14. 6
      koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
  15. 1
      members/moremember.pl
  16. 1
      opac/opac-topissues.pl
  17. 1
      opac/opac-user.pl
  18. 1
      suggestion/acceptorreject.pl
  19. 1
      tools/koha-news.pl

3
circ/circulation.pl

@ -702,7 +702,8 @@ $template->param( picture => 1 ) if $picture;
$template->param(
SpecifyDueDate => C4::Context->preference("SpecifyDueDate"),
CircAutocompl => C4::Context->preference("CircAutocompl") ,
CircAutocompl => C4::Context->preference("CircAutocompl"),
dateformat => C4::Context->preference("dateformat"),
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
);
output_html_with_http_headers $query, $cookie, $template->output;

1
circ/pendingreserves.pl

@ -259,6 +259,7 @@ $template->param(
reserveloop => \@reservedata,
"BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $input, $cookie, $template->output;

1
circ/transferstodo.pl

@ -129,6 +129,7 @@ foreach my $br ( keys %$branches ) {
$template->param(
branchesloop => \@branchesloop,
show_date => format_date(C4::Dates->today('iso')),
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $input, $cookie, $template->output;

1
circ/transferstoreceive.pl

@ -125,6 +125,7 @@ foreach my $br ( keys %$branches ) {
$template->param(
branchesloop => \@branchesloop,
show_date => format_date(C4::Dates->today('iso')),
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $input, $cookie, $template->output;

1
circ/waitingreserves.pl

@ -159,6 +159,7 @@ foreach my $num (@getreserves) {
$template->param(
reserveloop => \@reservloop,
show_date => format_date(C4::Dates->today('iso')),
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $input, $cookie, $template->output;

7
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl

@ -17,14 +17,15 @@ $.tablesorter.addParser({
$(document).ready(function() {
$('#patronlists > ul').tabs();
$.tablesorter.defaults.widgets = ['zebra'];
$("#issuest").tablesorter({
// sortList: [[0,0]], don't sort by default to preserve 'previous checkouts' header
$("#issuest").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 1: { sorter: 'articles' },4:{sorter:false},5: { sorter: false },6:{sorter:false}}
});
$("#issuest").bind("sortEnd",function() {
$("#previous").parents("tr").remove(); // 'previous checkouts' header chokes table sorter
});
$("#holdst").tablesorter({
$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[0,0]],
headers: { 1: { sorter: 'articles' }}
});

3
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tmpl

@ -20,7 +20,8 @@ $.tablesorter.addParser({
$(document).ready(function() {
$("th a").hide();
$.tablesorter.defaults.widgets = ['zebra'];
$("#holdst").tablesorter({
$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[3,0]],
headers: { 0:{sorter:false},1:{sorter:false},3: { sorter: 'articles' },7:{sorter:false}}
});

9
koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstodo.tmpl

@ -11,11 +11,14 @@ $.tablesorter.addParser({
type: 'text'
});
$(document).ready(function() {
<!-- TMPL_LOOP NAME="branchesloop" -->
$.tablesorter.defaults.widgets = ['zebra'];
$("#transferst").tablesorter({
$("#transferst<!-- TMPL_VAR NAME="branchcode" -->").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[1,0]],
headers: { 1: { sorter: 'articles' },4:{sorter:false}}
});
<!-- /TMPL_LOOP -->
});
//]]>
</script>
@ -39,7 +42,7 @@ $.tablesorter.addParser({
<!-- TMPL_LOOP NAME="branchesloop" -->
<!-- TMPL_IF NAME="branchcode" -->
<h4>Holds waiting for: <!-- TMPL_VAR NAME="branchname" --></h4>
<table id="transferst">
<table id="transferst<!-- TMPL_VAR NAME="branchcode" -->" style="width:100%;">
<thead><tr>
<th>Date of hold</th>
<th>Title</th>
@ -56,7 +59,7 @@ $.tablesorter.addParser({
<a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a>
<!-- TMPL_ELSE -->
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- /TMPL_IF -->&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --> </b>) <br />Barcode : <!-- TMPL_VAR NAME="barcode" --></td>
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br />
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" -->, <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br />
<!-- TMPL_VAR NAME="borrowerphone" --><br />
<!-- TMPL_IF NAME="borrowermail" -->
<a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">

7
koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl

@ -11,11 +11,14 @@ $.tablesorter.addParser({
type: 'text'
});
$(document).ready(function() {
<!-- TMPL_LOOP NAME="branchesloop" -->
$.tablesorter.defaults.widgets = ['zebra'];
$("#transferst").tablesorter({
$("#transferst<!-- TMPL_VAR NAME="branchcode" -->").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[1,0]],
headers: { 1: { sorter: 'articles' },4:{sorter:false}}
});
<!-- /TMPL_LOOP -->
});
//]]>
</script>
@ -39,7 +42,7 @@ $.tablesorter.addParser({
<div id="resultlist">
<!-- TMPL_LOOP NAME="branchesloop" -->
<!-- TMPL_IF NAME="branchcode" -->
<table style="width: 100%" id="transferst">
<table style="width: 100%" id="transferst<!-- TMPL_VAR NAME="branchcode" -->">
<caption>Coming from <!-- TMPL_VAR NAME="branchname" --></caption>
<thead><tr>
<th>Date of transfer</th>

3
koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tmpl

@ -13,7 +13,8 @@ $.tablesorter.addParser({
$(document).ready(function() {
$("th a").hide();
$.tablesorter.defaults.widgets = ['zebra'];
$("#holdst").tablesorter({
$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[3,0]],
headers: { 1:{sorter:'articles'},3: { sorter: 'articles' },4:{sorter:false}}
});

6
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl

@ -14,11 +14,13 @@ $.tablesorter.addParser({
});
$(document).ready(function() {
$('#finesholdsissues > ul').tabs();
$("#issuest").tablesorter({
$("#issuest").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[1,0]],
headers: { 1: { sorter: 'articles' },4:{sorter:false},5: { sorter: false },6:{sorter:false},7:{sorter:false}}
});
$("#holdst").tablesorter({
$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[0,0]],
headers: { 1: { sorter: 'articles' },6: { sorter: false }}
});

9
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl

@ -25,7 +25,8 @@
}
});
$.tablesorter.defaults.widgets = ['zebra'];
$("#acceptedt").tablesorter({
$("#acceptedt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
});
$("#acceptedt").bind("sortStart",function() {
@ -33,7 +34,8 @@
}).bind("sortEnd",function() {
$("#sorting").hide();
});
$("#pendingt").tablesorter({
$("#pendingt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
});
$("#pendingt").bind("sortStart",function() {
@ -41,7 +43,8 @@
}).bind("sortEnd",function() {
$("#sorting").hide();
});
$("#rejectedt").tablesorter({
$("#rejectedt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
});
$("#rejectedt").bind("sortStart",function() {

3
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl

@ -5,7 +5,8 @@
<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({
$("#newst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[2,0]],
headers: { 0: {sorter:false},6: { sorter: false },7: { sorter: false }}
});

6
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl

@ -15,13 +15,15 @@ $.tablesorter.addParser({
});
$(function() {
$('#opac-user-views > ul').tabs();
$("#holdst").tablesorter({
$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
widgets : ['zebra'],
sortList: [[0,0]],
headers: { 0: { sorter: 'articles' },4: { sorter: false }
}
});
$("#checkoutst").tablesorter({
$("#checkoutst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
widgets : ['zebra'],
<!-- TMPL_IF NAME="AmazonContent" -->
sortList: [[3,0]],

1
members/moremember.pl

@ -357,6 +357,7 @@ $template->param(
StaffMember => ($category_type eq 'S'),
is_child => ($category_type eq 'C'),
# reserveloop => \@reservedata,
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $input, $cookie, $template->output;

1
opac/opac-topissues.pl

@ -120,6 +120,7 @@ foreach my $thisitemtype (keys %$itemtypes) {
$template->param(
itemtypeloop =>\@itemtypeloop,
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $input, $cookie, $template->output;

1
opac/opac-user.pl

@ -225,6 +225,7 @@ $template->param(
patronupdate => $patronupdate,
OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
userview => 1,
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $query, $cookie, $template->output;

1
suggestion/acceptorreject.pl

@ -174,6 +174,7 @@ push @allsuggestions,{"suggestiontype"=>"rejected",
$template->param(
suggestions => \@allsuggestions,
"op_$op" => 1,
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $input, $cookie, $template->output;

1
tools/koha-news.pl

@ -117,5 +117,6 @@ else {
}
$template->param(
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $cgi, $cookie, $template->output;

Loading…
Cancel
Save