From: erickson Date: Tue, 2 Sep 2008 15:05:43 +0000 (+0000) Subject: added logic to detect Safari. if Safari, use the same select.option onclick trickery... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=35ce77d1255f6de7e9e8f2d8f70b0d36af89d512;p=Evergreen.git 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/branches/rel_1_2@10505 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/common/js/utils.js b/Open-ILS/web/opac/common/js/utils.js index 19c484c5ce..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, IE4mac, 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()