From d6a92d6dc0c484c37b6240100d2a3df16daae224 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Wed, 28 May 2008 15:33:07 -0500 Subject: [PATCH] Make printslip and printpage buttons use popup. This bug was reported by existing users. Signed-off-by: Joshua Ferraro --- .../intranet-tmpl/prog/en/includes/circ-toolbar.inc | 12 ++++++++---- .../prog/en/includes/members-toolbar.inc | 10 +++++++--- 2 files changed, 15 insertions(+), 7 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 08414e5180..38a31339e4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc @@ -32,11 +32,15 @@ function confirm_reregistration() { }); // YUI Toolbar Functions + function printx_window(print_type) { + window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=&print=" + print_type, "printwindow"); + return false; + } function yuiToolbar() { var printmenu = [ - { text: _("Print Page"), url: "/cgi-bin/koha/members/moremember.pl?borrowernumber=&print=page" }, - { text: _("Print Slip"), url: "/cgi-bin/koha/members/moremember.pl?borrowernumber=&print=slip" } + { text: _("Print Page"), onclick: {fn: function(){printx_window("page")}}, }, + { text: _("Print Slip"), onclick: {fn: function(){printx_window("slip")}}, } ]; var moremenu = [ @@ -47,7 +51,7 @@ function confirm_reregistration() { , disabled: true}, { text: _("Delete"), disabled: true, onclick: { fn: confirm_deletion } } - ] + ]; new YAHOO.widget.Button({ type: "menu", @@ -70,7 +74,7 @@ function confirm_reregistration() { new YAHOO.widget.Button("addnote"); new YAHOO.widget.Button("changepassword"); new YAHOO.widget.Button("changepassword"); - new YAHOO.widget.Button("printslilp"); + new YAHOO.widget.Button("printslip"); new YAHOO.widget.Button("printpage"); new YAHOO.widget.Button("renewpatron"); 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 3adcfdbad9..dbeec1b920 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -46,11 +46,15 @@ function update_child() { }); // YUI Toolbar Functions + function printx_window(print_type) { + window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=&print=" + print_type, "printwindow"); + return false; + } function yuiToolbar() { var printmenu = [ - { text: _("Print Page"), url: "/cgi-bin/koha/members/moremember.pl?borrowernumber=&print=page" }, - { text: _("Print Slip"), url: "/cgi-bin/koha/members/moremember.pl?borrowernumber=&print=slip" } + { text: _("Print Page"), onclick: {fn: function(){printx_window("page")}}, }, + { text: _("Print Slip"), onclick: {fn: function(){printx_window("slip")}}, } ]; var moremenu = [ @@ -58,7 +62,7 @@ function update_child() { { text: _("Set Permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=", disabled: true}, { text: _("Delete"), onclick: { fn: confirm_deletion } }, { text: _("Update Child to Adult Patron") , onclick: { fn: update_child }, disabled: true} - ] + ]; new YAHOO.widget.Button({ type: "menu", -- 2.39.5