# HG changeset patch # User bsw # Date 1460965107 -7200 # Node ID 5b97578192bc5e6a9f29b02137fc6b6b5d82b0f2 # Parent deb01dfd4429e153ab2452dcfbf51eb3aba31623 Hide not needed parts of notification configuration view diff -r deb01dfd4429 -r 5b97578192bc app/main/member/settings_notification.lua --- a/app/main/member/settings_notification.lua Mon Apr 18 07:00:12 2016 +0200 +++ b/app/main/member/settings_notification.lua Mon Apr 18 09:38:27 2016 +0200 @@ -39,6 +39,7 @@ id = "notify_level_all", type = "radio", name = "disable_notifications", value = "false", checked = not app.session.member.disable_notifications and "checked" or nil + onchange = [[ $(".view_on_notify_level_all_false")[this.checked ? "show" : "hide"](400) ]] } } ui.tag{ @@ -49,7 +50,7 @@ slot.put("
") - ui.container{ attr = { style = "margin-left: 3em;" }, content = function() + ui.container{ attr = { class = "view_on_notify_level_all_false", style = "margin-left: 3em;" }, content = function() ui.container{ content = _"You will receive status update notification on issue phase changes. Additionally you can subscribe for a regular digest including updates on initiative drafts and new suggestions." } slot.put("
") @@ -60,6 +61,7 @@ id = "digest_on", type = "radio", name = "digest", value = "true", checked = app.session.member.notification_hour ~= nil and "checked" or nil + onchange = [[ $(".view_on_digest_true")[this.checked ? "show" : "hide"](400) ]] } } ui.tag{ @@ -68,7 +70,7 @@ } end } - ui.container{ attr = { style = "margin-left: 4em;" }, content = function() + ui.container{ attr = { class = "view_on_digest_true", style = "margin-left: 4em;" }, content = function() ui.tag{ content = _"Day:" } slot.put(" ") ui.field.select{ @@ -119,6 +121,7 @@ id = "digest_off", type = "radio", name = "digest", value = "false", checked = app.session.member.notification_dow == nil and app.session.member.notification_hour == nil and "checked" or nil + onchange = [[ $(".view_on_digest_true")[this.checked ? "hide" : "show"](400) ]] } } ui.tag{ @@ -136,7 +139,8 @@ attr = { id = "notify_level_none", type = "radio", name = "disable_notifications", value = "true", - checked = app.session.member.disable_notifications and "checked" or nil + checked = app.session.member.disable_notifications and "checked" or nil, + onchange = [[ $(".view_on_notify_level_all_false")[this.checked ? "hide" : "show"](400) ]] } } ui.tag{