liquid_feedback_frontend
diff app/main/timeline/index.lua @ 144:7c3e8a1678fc
fix timeline saved filters
add Members:set_setting_map code
check for empty name
update settings when saved under same name
fixes bug #305
add Members:set_setting_map code
check for empty name
update settings when saved under same name
fixes bug #305
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Wed Oct 06 18:15:23 2010 +0200 (2010-10-06) |
| parents | 53a45356c107 |
| children | 90520c9fca44 |
line diff
1.1 --- a/app/main/timeline/index.lua Wed Oct 06 16:35:33 2010 +0200 1.2 +++ b/app/main/timeline/index.lua Wed Oct 06 18:15:23 2010 +0200 1.3 @@ -3,6 +3,7 @@ 1.4 view = "_constants" 1.5 } 1.6 1.7 +local active_name = "" 1.8 local options_box_count = param.get("options_box_count", atom.number) or 1 1.9 if options_box_count > 10 then 1.10 options_box_count = 10 1.11 @@ -36,6 +37,7 @@ 1.12 local name = setting_map.subkey 1.13 if options_string == current_options then 1.14 active = true 1.15 + active_name = name 1.16 end 1.17 ui.link{ 1.18 image = { static = "icons/16/time.png" }, 1.19 @@ -65,6 +67,9 @@ 1.20 end, 1.21 module = "timeline", 1.22 view = "save_filter", 1.23 + params = { 1.24 + current_name = active_name 1.25 + }, 1.26 attr = { 1.27 onclick = "el=document.getElementById('timeline_save');el.checked=true;el.form.submit();return(false);" 1.28 } 1.29 @@ -77,7 +82,6 @@ 1.30 module = "timeline", 1.31 action = "update", 1.32 content = function() 1.33 - 1.34 ui.container{ 1.35 1.36 content = function() 1.37 @@ -164,7 +168,7 @@ 1.38 name = "show_options", 1.39 value = param.get("show_options", atom.boolean) 1.40 } 1.41 - 1.42 + ui.hidden_field{ name = "current_name", value = active_name } 1.43 ui.field.boolean{ 1.44 attr = { id = "timeline_save", style = "display: none;", onchange="this.form.submit();" }, 1.45 name = "save",