summaryrefslogtreecommitdiff
path: root/js/emailsettings.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/emailsettings.js')
-rw-r--r--js/emailsettings.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/js/emailsettings.js b/js/emailsettings.js
new file mode 100644
index 000000000..c7f85fe9a
--- /dev/null
+++ b/js/emailsettings.js
@@ -0,0 +1,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();
+});
+
+});