Fix for Bug 6501 - missing scroll bar when updating child

- Adding "scrollbars=yes" to window.open javascript.
- Adding javascript tablesorter to categories table

To test, open a child patron record and choose more ->
Update Child to Adult Patron from the toolbar menu. The
resulting pop-up should have scrollbars. The table
of categories should be sortable with a default sort
on the description.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Owen Leonard 2011-06-16 08:48:47 -04:00 committed by Chris Cormack
parent c78608483e
commit 65d4d3c9b0
3 changed files with 18 additions and 4 deletions

View file

@ -27,7 +27,7 @@ function confirm_reregistration() {
function update_child() {
// var borrowernumbervalue= $("#borrowernumber").attr("value");
[% IF ( CATCODE_MULTI ) %]
window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=no,resizable=yes');
window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes');
[% ELSE %]
confirm_updatechild();
[% END %]

View file

@ -25,7 +25,7 @@ function confirm_reregistration() {
function update_child() {
[% IF ( CATCODE_MULTI ) %]
window.open('update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=no,resizable=yes');
window.open('update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes');
[% ELSE %]
confirm_updatechild();
[% END %]

View file

@ -1,6 +1,16 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Choose Adult category</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.tablesorter.defaults.widgets = ['zebra'];
$("#catst").tablesorter({
sortList: [[2,0]],
headers: { 0: { sorter: false }}
});
});
</script>
<style type="text/css">
#custom-doc { width:29em;*width:28.3em;min-width:377px; margin:auto; text-align:left; }
</style>
@ -41,12 +51,15 @@ window.close();
<form method="post" action="update-child.pl">
<fieldset>
<table>
<table id="catst">
<thead>
<tr>
<th>&nbsp;</th>
<th>Code</th>
<th>Description</th>
</tr>
</thead>
<tbody>
[% FOREACH CAT_LOO IN CAT_LOOP %]
<tr>
<td>
@ -55,6 +68,7 @@ window.close();
<td><label for="catcode[% CAT_LOO.catcode %]"><strong>[% CAT_LOO.catdesc %]</strong></label></td>
</tr>
[% END %]
</tbody>
</table>
<input type="hidden" name="op" value="update" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
@ -72,4 +86,4 @@ window.close();
</div>
[% INCLUDE 'intranet-bottom.inc' %]
[% INCLUDE 'popup-bottom.inc' %]