# HG changeset patch # User Brian Neal # Date 1285204586 0 # Node ID 91c0902de04dc65f022726d483c847b50770eafc # Parent 307a74e2811256ad4e703eee60da2063a81e2221 Fixing #115: time zone picker javascript doesn't work on IE8. Apparently IE doesn't like array.indexOf(), but jQuery saves the day with a utility function that provides the same functionality. diff -r 307a74e28112 -r 91c0902de04d media/js/timezone.js --- a/media/js/timezone.js Thu Sep 23 00:26:07 2010 +0000 +++ b/media/js/timezone.js Thu Sep 23 01:16:26 2010 +0000 @@ -35,7 +35,7 @@ var area_match = tz.match(/^(\w+)\/.*$/); if (area_match != null) { - var i = gcalTzInfo.areas.indexOf(area_match[1]); + var i = $.inArray(area_match[1], gcalTzInfo.areas); tz_area.options.selectedIndex = (i != -1) ? i : gcalTzInfo.default_area; } else @@ -63,7 +63,7 @@ if (loc_match != null) { var loc = loc_match[1].replace(/_/g, ' '); - var i = gcalTzInfo.locations[tz_area.options.selectedIndex].indexOf(loc); + var i = $.inArray(loc, gcalTzInfo.locations[tz_area.options.selectedIndex]); tz_loc.options.selectedIndex = (i != -1) ? i : gcalTzInfo.default_location; } else