r50195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50194‎ | r50195 | r50196 >
Date:19:08, 4 May 2009
Author:dale
Status:deferred
Tags:
Comment:
dom check for mw-upload-maxfilesize-url
Modified paths:
  • /branches/new-upload/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/skins/common/wikibits.js
@@ -442,12 +442,18 @@
443443 }
444444 //hide and show appropriate upload sizes
445445 if(idb == 'wpUploadFileURL'){
446 - document.getElementById('mw-upload-maxfilesize').style.display = "none";
447 - document.getElementById('mw-upload-maxfilesize-url').style.display = "block";
 446+ var e = document.getElementById('mw-upload-maxfilesize');
 447+ if(e) e.style.display = "none";
 448+
 449+ var e = document.getElementById('mw-upload-maxfilesize-url');
 450+ if(e) e..style.display = "block";
448451 }
449452 if(idb == 'wpUploadFile'){
450 - document.getElementById('mw-upload-maxfilesize-url').style.display = "none";
451 - document.getElementById('mw-upload-maxfilesize').style.display = "block";
 453+ var e = document.getElementById('mw-upload-maxfilesize-url');
 454+ if(e) e.style.display = "none";
 455+
 456+ var e = document.getElementById('mw-upload-maxfilesize');
 457+ if(e) e.style.display = "block";
452458 }
453459 document.getElementById(ida).disabled=true;
454460 document.getElementById(idb).disabled=false;

Status & tagging log