From b79bb876a6d4e7e625cbb4730e94200f595982be Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 2 Sep 2008 15:06:59 +0000 Subject: [PATCH] added logic to detect Safari. if Safari, use the same select.option onclick trickery that IE requires git-svn-id: svn://svn.open-ils.org/ILS/trunk@10506 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/common/js/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/opac/common/js/utils.js b/Open-ILS/web/opac/common/js/utils.js index 99197a880f..aeae80decf 100644 --- a/Open-ILS/web/opac/common/js/utils.js +++ b/Open-ILS/web/opac/common/js/utils.js @@ -111,7 +111,7 @@ function instanceOf(object, constructorFunction) { /* ------------------------------------------------------------------------------------------- */ /* detect my browser */ -var isMac, NS, NS4, NS6, IE, IE4, IEmac, IE4plus, IE5, IE5plus, IE6, IEMajor, ver4; +var isMac, NS, NS4, NS6, IE, IE4, IEmac, IE4plus, IE5, IE5plus, IE6, IEMajor, ver4, Safari; function detect_browser() { isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false; @@ -125,6 +125,7 @@ function detect_browser() { IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false; ver4 = (NS4 || IE4plus) ? true : false; NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false; + Safari = navigator.userAgent.match(/Safari/); IE5plus = IE5 || IE6; IEMajor = 0; @@ -303,7 +304,7 @@ function ogrep( obj, func ) { } function doSelectorActions(sel) { - if(IE && sel) { + if((IE || Safari) && sel) { sel.onchange = function() { var o = sel.options[sel.selectedIndex]; if(o && o.onclick) o.onclick() -- 2.43.2