]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - js/emailsettings.js
make .attachment.more ajax work with ajax-loaded content, i.e. infiniteScroll
[quix0rs-gnu-social.git] / js / emailsettings.js
1 $(function() {
2
3 function toggleIncomingOptions() {
4     var enabled = $('#emailpost').prop('checked', true);
5     if (enabled) {
6         // Note: button style currently does not respond to disabled in our main themes.
7         // Graying out the whole section with a 50% transparency will do for now. :)
8         // @todo: add a general 'disabled' class style to the base themes.
9         $('#emailincoming').css('opacity', '')
10                            .find('input').prop('disabled', false);
11     } else {
12         $('#emailincoming').css('opacity', '0.5')
13                            .find('input').prop('disabled', true);
14     }
15 }
16
17 toggleIncomingOptions();
18
19 $('#emailpost').click(function() {
20     toggleIncomingOptions();
21 });
22
23 });