- 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>
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 %]
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 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › 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>
<form method="post" action="update-child.pl">
<fieldset>
-<table>
+<table id="catst">
+<thead>
<tr>
<th> </th>
<th>Code</th>
<th>Description</th>
</tr>
+</thead>
+<tbody>
[% FOREACH CAT_LOO IN CAT_LOOP %]
<tr>
<td>
<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 %]" />
</div>
-[% INCLUDE 'intranet-bottom.inc' %]
+[% INCLUDE 'popup-bottom.inc' %]