]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - js/emailsettings.js
Merge branch 'master' into 0.9.x
[quix0rs-gnu-social.git] / js / emailsettings.js
1 $(function() {
2
3 function toggleIncomingOptions() {
4     var enabled = $('#emailpost').attr('checked');
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').removeAttr('style')
10                            .find('input').removeAttr('disabled');
11     } else {
12         $('#emailincoming').attr('style', 'opacity: 0.5')
13                            .find('input').attr('disabled', 'disabled');
14     }
15 }
16
17 toggleIncomingOptions();
18
19 $('#emailpost').click(function() {
20     toggleIncomingOptions();
21 });
22
23 });