[open-ils-commits] r10506 - trunk/Open-ILS/web/opac/common/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 2 11:07:01 EDT 2008
Author: erickson
Date: 2008-09-02 11:06:59 -0400 (Tue, 02 Sep 2008)
New Revision: 10506
Modified:
trunk/Open-ILS/web/opac/common/js/utils.js
Log:
added logic to detect Safari. if Safari, use the same select.option onclick trickery that IE requires
Modified: trunk/Open-ILS/web/opac/common/js/utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/utils.js 2008-09-02 15:05:43 UTC (rev 10505)
+++ trunk/Open-ILS/web/opac/common/js/utils.js 2008-09-02 15:06:59 UTC (rev 10506)
@@ -111,7 +111,7 @@
/* ------------------------------------------------------------------------------------------- */
/* 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 @@
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 doSelectorActions(sel) {
- if(IE && sel) {
+ if((IE || Safari) && sel) {
sel.onchange = function() {
var o = sel.options[sel.selectedIndex];
if(o && o.onclick) o.onclick()
More information about the open-ils-commits
mailing list