summaryrefslogtreecommitdiff
path: root/js/emailsettings.js
blob: c7f85fe9aec2b9ba3d1e19411449488094bd937d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$(function() {

function toggleIncomingOptions() {
    var enabled = $('#emailpost').attr('checked');
    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.
        $('#emailincoming').removeAttr('style')
                           .find('input').removeAttr('disabled');
    } else {
        $('#emailincoming').attr('style', 'opacity: 0.5')
                           .find('input').attr('disabled', 'disabled');
    }
}

toggleIncomingOptions();

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

});