[open-ils-commits] r10504 - branches/rel_1_2_3/Open-ILS/web/opac/common/js

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 2 11:05:12 EDT 2008


Author: erickson
Date: 2008-09-02 11:05:11 -0400 (Tue, 02 Sep 2008)
New Revision: 10504

Modified:
   branches/rel_1_2_3/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: branches/rel_1_2_3/Open-ILS/web/opac/common/js/utils.js
===================================================================
--- branches/rel_1_2_3/Open-ILS/web/opac/common/js/utils.js	2008-09-02 13:58:45 UTC (rev 10503)
+++ branches/rel_1_2_3/Open-ILS/web/opac/common/js/utils.js	2008-09-02 15:05:11 UTC (rev 10504)
@@ -111,7 +111,7 @@
 
 /* ------------------------------------------------------------------------------------------- */
 /* 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 @@
    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