r79245 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79244‎ | r79245 | r79246 >
Date:12:16, 30 December 2010
Author:catrope
Status:ok
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/skins/common/prefs.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/prefs.js
@@ -14,8 +14,8 @@
1515 };
1616
1717 window.timezoneSetup = function() {
18 - var tzSelect = document.getElementById( 'mw-input-timecorrection' );
19 - var tzTextbox = document.getElementById( 'mw-input-timecorrection-other' );
 18+ var tzSelect = document.getElementById( 'mw-input-wptimecorrection' );
 19+ var tzTextbox = document.getElementById( 'mw-input-wptimecorrection-other' );
2020
2121 if ( tzSelect && tzTextbox ) {
2222 addHandler( tzSelect, 'change', function( e ) { updateTimezoneSelection( false ); } );
@@ -40,8 +40,8 @@
4141 };
4242
4343 window.guessTimezone = function() {
44 - var textbox = document.getElementById( 'mw-input-timecorrection-other' );
45 - var selector = document.getElementById( 'mw-input-timecorrection' );
 44+ var textbox = document.getElementById( 'mw-input-wptimecorrection-other' );
 45+ var selector = document.getElementById( 'mw-input-wptimecorrection' );
4646
4747 selector.value = 'other';
4848 textbox.value = fetchTimezone();
@@ -50,13 +50,13 @@
5151 };
5252
5353 window.updateTimezoneSelection = function( force_offset ) {
54 - var selector = document.getElementById( 'mw-input-timecorrection' );
 54+ var selector = document.getElementById( 'mw-input-wptimecorrection' );
5555
5656 if ( selector.value == 'guess' ) {
5757 return guessTimezone();
5858 }
5959
60 - var textbox = document.getElementById( 'mw-input-timecorrection-other' );
 60+ var textbox = document.getElementById( 'mw-input-wptimecorrection-other' );
6161 var localtimeHolder = document.getElementById( 'wpLocalTime' );
6262 var servertime = document.getElementsByName( 'wpServerTime' )[0].value;
6363 var minDiff = 0;

Follow-up revisions

RevisionCommit summaryAuthorDate
r798131.17: MFT r78093, r79245, r79570, r79571, r79573, r79574, r79581, r79582, r79...catrope13:20, 7 January 2011

Status & tagging log