MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
do the slow CheckPaymentOutages last
show amounts changed by JS after they're ready
Line 42: Line 42:
if ( now > outages[i]['start'] ) {
if ( now > outages[i]['start'] ) {
if ( now < outages[i]['end'] ) {
if ( now < outages[i]['end'] ) {

if ( (typeof outages[i]['country'] === 'undefined') || (outages[i]['country'] == country) ) {
if ( (typeof outages[i]['country'] === 'undefined') || (outages[i]['country'] == country) ) {
$('.paymentmethod-' + outages[i]['method']).hide();
$('.paymentmethod-' + outages[i]['method']).hide();
}
}

}
}
}
}
Line 320: Line 318:
/* Form functions */
/* Form functions */
function clearOther(box) {
function clearOther(box) {
document.getElementById("input_amount_other").checked = true;
document.getElementById("input_amount_other").checked = true;
box.value = "";
box.value = "";
box.style.color = "#000000";
box.style.color = "#000000";
}
}


Line 330: Line 328:


function selectAmount() {
function selectAmount() {
$('#input_amount_other_box').val('');
$('#input_amount_other_box').val('');
$('input[name="amountGiven"]').val('');
$('input[name="amountGiven"]').val('');
}
}
/* End form functions */
/* End form functions */
Line 381: Line 379:
adjustHPC();
adjustHPC();
adjustOtherVal();
adjustOtherVal();

$('.consider-amounts').show();
$('#donate-form-wrapper').show();


// Load list of payment outages from meta, and hide any which are current
// Load list of payment outages from meta, and hide any which are current