liquid_feedback_frontend
view app/main/api/style.lua @ 1329:1a55c68445d4
Allow empty selection for unit registration field
author | bsw |
---|---|
date | Fri Aug 03 17:07:06 2018 +0200 (2018-08-03) |
parents | 32cc544d5a5b |
children |
line source
1 slot.set_layout(nil, "application/json")
4 local r = json.object{
5 color = json.object()
6 }
8 local style = execute.chunk{ module = "style", chunk = "_style", params = { style = config.style } }
10 if style.color_md then
11 r.color.md = {}
12 for k, v in pairs(style.color_md) do
13 r.color.md[k] = v
14 end
15 end
17 if style.color_rgb then
18 r.color.rgb = {}
19 for k, v in pairs(style.color_rgb) do
20 r.color.rgb[k] = v
21 end
22 end
24 slot.put_into("data", json.export(json.object{ result = r }))