Mercurial > public > sg101
changeset 264:91c0902de04d
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.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 23 Sep 2010 01:16:26 +0000 |
parents | 307a74e28112 |
children | 1ba2c6bf6eb7 |
files | media/js/timezone.js |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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