emailsettings.js 727 Bytes
Newer Older
1 2 3
$(function() {

function toggleIncomingOptions() {
4
    var enabled = $('#emailpost').prop('checked', true);
5 6 7 8
    if (enabled) {
        // Note: button style currently does not respond to disabled in our main themes.
        // Graying out the whole section with a 50% transparency will do for now. :)
        // @todo: add a general 'disabled' class style to the base themes.
9 10
        $('#emailincoming').css('opacity', '')
                           .find('input').prop('disabled', false);
11
    } else {
12 13
        $('#emailincoming').css('opacity', '0.5')
                           .find('input').prop('disabled', true);
14 15 16 17 18 19 20 21 22 23
    }
}

toggleIncomingOptions();

$('#emailpost').click(function() {
    toggleIncomingOptions();
});

});