summaryrefslogtreecommitdiff
path: root/skins/common/upload.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /skins/common/upload.js
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'skins/common/upload.js')
-rw-r--r--skins/common/upload.js49
1 files changed, 1 insertions, 48 deletions
diff --git a/skins/common/upload.js b/skins/common/upload.js
index c877620b..99917c75 100644
--- a/skins/common/upload.js
+++ b/skins/common/upload.js
@@ -35,11 +35,6 @@ window.wgUploadSetup = function() {
}
}
- // Toggle source type
- var sourceTypeCheckboxes = document.getElementsByName( 'wpSourceType' );
- for ( var i = 0; i < sourceTypeCheckboxes.length; i++ ) {
- sourceTypeCheckboxes[i].onchange = toggleUploadInputs;
- }
// AJAX wpDestFile warnings
if ( wgAjaxUploadDestCheck ) {
@@ -86,44 +81,6 @@ window.wgUploadSetup = function() {
};
};
-/**
- * Iterate over all upload source fields and disable all except the selected one.
- *
- * @return emptiness
- */
-window.toggleUploadInputs = function() {
- // Iterate over all rows with UploadSourceField
- var rows;
- if ( document.getElementsByClassName ) {
- rows = document.getElementsByClassName( 'mw-htmlform-field-UploadSourceField' );
- } else {
- // Older browsers don't support getElementsByClassName
- rows = new Array();
-
- var allRows = document.getElementsByTagName( 'tr' );
- for ( var i = 0; i < allRows.length; i++ ) {
- if ( allRows[i].className == 'mw-htmlform-field-UploadSourceField' )
- rows.push( allRows[i] );
- }
- }
-
- for ( var i = 0; i < rows.length; i++ ) {
- var inputs = rows[i].getElementsByTagName( 'input' );
-
- // Check if this row is selected
- var isChecked = true; // Default true in case wpSourceType is not found
- for ( var j = 0; j < inputs.length; j++ ) {
- if ( inputs[j].name == 'wpSourceType' )
- isChecked = inputs[j].checked;
- }
-
- // Disable all unselected rows
- for ( var j = 0; j < inputs.length; j++ ) {
- if ( inputs[j].type != 'radio')
- inputs[j].disabled = !isChecked;
- }
- }
-};
window.wgUploadWarningObj = {
'responseCache' : { '' : '&nbsp;' },
@@ -289,11 +246,7 @@ window.toggleFilenameFiller = function() {
if(!document.getElementById) return;
var upfield = document.getElementById('wpUploadFile');
var destName = document.getElementById('wpDestFile').value;
- if (destName=='' || destName==' ') {
- wgUploadAutoFill = true;
- } else {
- wgUploadAutoFill = false;
- }
+ wgUploadAutoFill = ( destName == '' || destName == ' ' );
};
window.wgUploadLicenseObj = {