From 64f93777a98e4995b337d23ce1dedacb0fc8fbdb Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 21 Mar 2008 08:20:04 -0500 Subject: [PATCH] Fixing branch select onChange() function, hopefully fixes Bug 1957, Holiday Calendar broken in Internet Explorer Signed-off-by: Joshua Ferraro --- .../intranet-tmpl/prog/en/modules/tools/holidays.tmpl | 7 ++++++- tools/holidays.pl | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl index aa87eb18c2..006ec4b835 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl @@ -88,7 +88,7 @@ } function changeBranch () { - var branch = document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value; + var branch = $("#branch option:selected").val(); location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch; } @@ -108,6 +108,11 @@ function Help() { newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes'); } + $(document).ready(function() { + $("#branch").change(function(){ + changeBranch(); + }); + }); //]]> diff --git a/tools/holidays.pl b/tools/holidays.pl index 9dd93f0c59..d2f61e5b60 100755 --- a/tools/holidays.pl +++ b/tools/holidays.pl @@ -60,8 +60,7 @@ my $branchesList = CGI::scrolling_list(-name => 'branch', -size => 1, -default => [$branch], -multiple => 0, - -id => "branch", - -onChange => "changeBranch()"); + -id => "branch"); $branches->finish; -- 2.39.5