[Koha-patches] [PATCH] [SIGNED OFF] Fix for Bug 6501 - missing scroll bar when updating child
Liz Rea
lrea at nekls.org
Thu Jun 16 19:55:26 CEST 2011
From: Owen Leonard <oleonard at myacpl.org>
- 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 <lrea at nekls.org>
---
.../prog/en/includes/circ-toolbar.inc | 2 +-
.../prog/en/includes/members-toolbar.inc | 2 +-
.../prog/en/modules/members/update-child.tt | 18 ++++++++++++++++--
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
index 1377aa5..503f954 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
@@ -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 %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
index 9331f5f..afad863 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
@@ -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 %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt
index f73ce2d..81fa3b6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt
@@ -1,6 +1,16 @@
[% 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>
@@ -41,12 +51,15 @@ window.close();
<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>
@@ -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' %]
--
1.7.2.5
More information about the Koha-patches
mailing list