From 4e2c8e7f9f826e8745b1aa363fbbebff1a5de396 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 30 Dec 2010 12:16:16 +0000 Subject: [PATCH] Fix JS errors in prefs.js caused by the (unintentional?) renaming of mw-input-timecorrection to mw-input-wptimecorrection. This was caused by one of the HTMLForm changes but those are all very mysterious to me, so I haven't tried to track down which change is to blame or figure out how to rename the inputs back. Instead, I updated the JS file to use the new IDs --- skins/common/prefs.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/skins/common/prefs.js b/skins/common/prefs.js index c63af3de7a..1eb8e5bfbb 100644 --- a/skins/common/prefs.js +++ b/skins/common/prefs.js @@ -14,8 +14,8 @@ window.checkTimezone = function( tz, msg ) { }; window.timezoneSetup = function() { - var tzSelect = document.getElementById( 'mw-input-timecorrection' ); - var tzTextbox = document.getElementById( 'mw-input-timecorrection-other' ); + var tzSelect = document.getElementById( 'mw-input-wptimecorrection' ); + var tzTextbox = document.getElementById( 'mw-input-wptimecorrection-other' ); if ( tzSelect && tzTextbox ) { addHandler( tzSelect, 'change', function( e ) { updateTimezoneSelection( false ); } ); @@ -40,8 +40,8 @@ window.fetchTimezone = function() { }; window.guessTimezone = function() { - var textbox = document.getElementById( 'mw-input-timecorrection-other' ); - var selector = document.getElementById( 'mw-input-timecorrection' ); + var textbox = document.getElementById( 'mw-input-wptimecorrection-other' ); + var selector = document.getElementById( 'mw-input-wptimecorrection' ); selector.value = 'other'; textbox.value = fetchTimezone(); @@ -50,13 +50,13 @@ window.guessTimezone = function() { }; window.updateTimezoneSelection = function( force_offset ) { - var selector = document.getElementById( 'mw-input-timecorrection' ); + var selector = document.getElementById( 'mw-input-wptimecorrection' ); if ( selector.value == 'guess' ) { return guessTimezone(); } - var textbox = document.getElementById( 'mw-input-timecorrection-other' ); + var textbox = document.getElementById( 'mw-input-wptimecorrection-other' ); var localtimeHolder = document.getElementById( 'wpLocalTime' ); var servertime = document.getElementsByName( 'wpServerTime' )[0].value; var minDiff = 0; -- 2.20.1