MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
undo, needs some tweaking for frequency options |
rm IE8 checked workaround for amounts (but leave for frequency as still used by other browsers there) |
||
Line 323: | Line 323: | ||
$preSelectOption = $('input[name="amount"][value="' + preSelectAmount + '"]'); |
$preSelectOption = $('input[name="amount"][value="' + preSelectAmount + '"]'); |
||
if ( $preSelectOption.length ) { |
if ( $preSelectOption.length ) { |
||
// Select existing input |
// Select existing input |
||
$preSelectOption.prop('checked', true); |
$preSelectOption.prop('checked', true); |
||
$preSelectOption.siblings('label').addClass('checked'); |
|||
} else { |
} else { |
||
$('#input_amount_other_box').val( preSelectAmount ); |
$('#input_amount_other_box').val( preSelectAmount ); |
||
$('#input_amount_other').prop('checked', true); |
$('#input_amount_other').prop('checked', true); |
||
$('label[for="input_amount_other"]').addClass('checked'); |
|||
} |
} |
||
} |
} |
||
Line 372: | Line 370: | ||
$(".frequency-options label").click(function() { |
$(".frequency-options label").click(function() { |
||
$(".frequency-options label").removeClass("checked"); |
$(".frequency-options label").removeClass("checked"); |
||
$(this).addClass("checked"); |
|||
}); |
|||
$(".radiobuttons-cell label").click(function() { |
|||
$(".radiobuttons-cell label").removeClass("checked"); |
|||
$(this).addClass("checked"); |
$(this).addClass("checked"); |
||
}); |
}); |