liquid_feedback_frontend

changeset 1281:5b97578192bc

Hide not needed parts of notification configuration view
author bsw
date Mon Apr 18 09:38:27 2016 +0200 (2016-04-18)
parents deb01dfd4429
children 0bd5142b9c5e
files app/main/member/settings_notification.lua
line diff
     1.1 --- a/app/main/member/settings_notification.lua	Mon Apr 18 07:00:12 2016 +0200
     1.2 +++ b/app/main/member/settings_notification.lua	Mon Apr 18 09:38:27 2016 +0200
     1.3 @@ -39,6 +39,7 @@
     1.4                id = "notify_level_all",
     1.5                type = "radio", name = "disable_notifications", value = "false",
     1.6                checked = not app.session.member.disable_notifications and "checked" or nil
     1.7 +              onchange = [[ $(".view_on_notify_level_all_false")[this.checked ? "show" : "hide"](400) ]]
     1.8              }
     1.9            }
    1.10            ui.tag{
    1.11 @@ -49,7 +50,7 @@
    1.12          
    1.13          slot.put("<br />")
    1.14          
    1.15 -        ui.container{ attr = { style = "margin-left: 3em;" }, content = function()
    1.16 +        ui.container{ attr = { class = "view_on_notify_level_all_false", style = "margin-left: 3em;" }, content = function()
    1.17          
    1.18            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." }
    1.19            slot.put("<br />")
    1.20 @@ -60,6 +61,7 @@
    1.21                  id = "digest_on",
    1.22                  type = "radio", name = "digest", value = "true",
    1.23                  checked = app.session.member.notification_hour ~= nil and "checked" or nil
    1.24 +                onchange = [[ $(".view_on_digest_true")[this.checked ? "show" : "hide"](400) ]]
    1.25                }
    1.26              }
    1.27              ui.tag{
    1.28 @@ -68,7 +70,7 @@
    1.29              }
    1.30            end }
    1.31              
    1.32 -          ui.container{ attr = { style = "margin-left: 4em;" }, content = function()
    1.33 +          ui.container{ attr = { class = "view_on_digest_true", style = "margin-left: 4em;" }, content = function()
    1.34              ui.tag{ content = _"Day:" }
    1.35              slot.put(" ")
    1.36              ui.field.select{
    1.37 @@ -119,6 +121,7 @@
    1.38                  id = "digest_off",
    1.39                  type = "radio", name = "digest", value = "false",
    1.40                  checked = app.session.member.notification_dow == nil and app.session.member.notification_hour == nil and "checked" or nil
    1.41 +                onchange = [[ $(".view_on_digest_true")[this.checked ? "hide" : "show"](400) ]]
    1.42                }
    1.43              }
    1.44              ui.tag{
    1.45 @@ -136,7 +139,8 @@
    1.46              attr = {
    1.47                id = "notify_level_none",
    1.48                type = "radio", name = "disable_notifications", value = "true",
    1.49 -              checked = app.session.member.disable_notifications and "checked" or nil
    1.50 +              checked = app.session.member.disable_notifications and "checked" or nil,
    1.51 +              onchange = [[ $(".view_on_notify_level_all_false")[this.checked ? "hide" : "show"](400) ]]
    1.52              }
    1.53            }
    1.54            ui.tag{

Impressum / About Us