emailsettings.js 727 B

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