From 582bec06b16152d99e216b002079558d77c1632c Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sun, 11 Apr 2010 21:01:56 +0000 Subject: [PATCH] (bug 22970) Made upload.js compatible with FF<3.5. --- includes/DefaultSettings.php | 2 +- skins/common/upload.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 669fa544d5..bd482508eb 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1684,7 +1684,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '269'; +$wgStyleVersion = '270'; # Server-side caching: diff --git a/skins/common/upload.js b/skins/common/upload.js index 99bb68881c..fc16ebca48 100644 --- a/skins/common/upload.js +++ b/skins/common/upload.js @@ -43,17 +43,20 @@ function wgUploadSetup() { // AJAX wpDestFile warnings if ( wgAjaxUploadDestCheck ) { + // Insert an event handler that fetches upload warnings when wpDestFile + // has been changed document.getElementById( 'wpDestFile' ).onchange = function ( e ) { wgUploadWarningObj.checkNow(this.value); }; + // Insert a row where the warnings will be displayed just below the + // wpDestFile row var optionsTable = document.getElementById( 'mw-htmlform-description' ).tBodies[0]; - var row = document.createElement( 'tr' ); + var row = optionsTable.insertRow( 1 ); var td = document.createElement( 'td' ); td.id = 'wpDestFile-warning'; td.colSpan = 2; row.appendChild( td ); - optionsTable.insertBefore( row, optionsTable.children[1] ); } if ( wgAjaxLicensePreview ) { -- 2.20.1