Fix for Bug 6501 - missing scroll bar when updating child
authorOwen Leonard <oleonard@myacpl.org>
Thu, 16 Jun 2011 12:48:47 +0000 (08:48 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 19 Jun 2011 23:51:22 +0000 (11:51 +1200)
- 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>
koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt

index 1377aa5..503f954 100644 (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 %]
index 9331f5f..afad863 100644 (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 %]
index f73ce2d..81fa3b6 100644 (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' %]