MediaWiki:Newarticleassistant-formscript: Difference between revisions
From Bulbanews, your community Pokémon newspaper.
Jump to navigationJump to search
mNo edit summary |
(Hope this works) |
||
Line 5: | Line 5: | ||
if ($sourceType == 'exclusive' || $sourceType == 'none') { | if ($sourceType == 'exclusive' || $sourceType == 'none') { | ||
$('#bnSourcename').attr('disabled', true).closest('tr').fadeTo('fast', 0.5); | $('#bnSourcename').attr('disabled', true).closest('tr').fadeTo('fast', 0.5); | ||
} else { | |||
$('#bnSourcename').removeAttr('disabled').closest('tr').fadeTo('fast', 1.0); | |||
} | |||
if ($sourceType == 'exclusive' || $sourceType == 'other' || $sourceType == 'none') { | |||
$('#bnSourcelink').attr('disabled', true).closest('tr').fadeTo('fast', 0.5); | $('#bnSourcelink').attr('disabled', true).closest('tr').fadeTo('fast', 0.5); | ||
} else { | } else { | ||
$('#bnSourcelink').removeAttr('disabled').closest('tr').fadeTo('fast', 1.0); | $('#bnSourcelink').removeAttr('disabled').closest('tr').fadeTo('fast', 1.0); | ||
} | } |
Revision as of 14:56, 31 October 2014
/*
*/ $(document).ready(function() { $('#bnSourcetype').change(function() { $sourceType = $(this).val(); if ($sourceType == 'exclusive' || $sourceType == 'none') { $('#bnSourcename').attr('disabled', true).closest('tr').fadeTo('fast', 0.5); } else { $('#bnSourcename').removeAttr('disabled').closest('tr').fadeTo('fast', 1.0); } if ($sourceType == 'exclusive' || $sourceType == 'other' || $sourceType == 'none') { $('#bnSourcelink').attr('disabled', true).closest('tr').fadeTo('fast', 0.5); } else { $('#bnSourcelink').removeAttr('disabled').closest('tr').fadeTo('fast', 1.0); } }); $('#bnSourcename').attr('disabled', true).closest('tr').fadeTo(0, 0.5); $('#bnSourcelink').attr('disabled', true).closest('tr').fadeTo(0, 0.5); }); /*
*/