liquid_feedback_frontend

view app/main/index/login.lua @ 19:00d1004545f1

Dynamic interface using XMLHttpRequests, and many other changes

Bugfixes:
- Only allow voting on admitted initiatives
- Repaired issue search
- Don't display delegations for closed issues on member page
- Don't show revoke link in initiative, when issue is already half_frozen
- Localization for voting JavaScript
- Display author of suggestions

Disclosure of voting data after voting is finished:
- Possibility to inspect every ballot including preferences
- Show number of voters preferring one initiative to another initiative

Interface behaviour changes:
- Reversed default order of drafts
- Default order of suggestions changed
- Show new drafts of initiatives only once per day in timeline

Accessibility:
- Barrier-free voting implemented
- POST links are now accessible without JavaScript
- Changed gray for unsatisfied supporters in bar graph to a lighter gray

Other interface improvements:
- Optical enhancements
- Dynamic interface using XMLHttpRequests
- Show usage terms in about section
- Show own membership in area listing
- Show uninformed supporters greyed out and marked with yellow question mark
- Warning box in non-admitted initiatives
- When voted, don't display voting notice and change label of voting link
- Show object counts in more tabulator heads
- Enlarged member statement input field

Miscellaneous:
- Code cleanup
- Added README file containing installation instructions
- Use new WebMCP function ui.filters{...} instead of own ui.filter and ui.order functions
author bsw/jbe
date Sat Feb 20 22:10:31 2010 +0100 (2010-02-20)
parents a3ac899559de
children 0849be391140
line source
1 local warning_text = _"Some JavaScript based functions (voting in particular) will not work.\nFor this beta, please use a current version of Firefox, Safari, Opera(?), Konqueror or another (more) standard compliant browser.\nAlternative access without JavaScript will be available soon."
3 ui.script{ static = "js/browser_warning.js" }
4 ui.script{ script = "checkBrowser(" .. encode.json(_"Your web browser is not fully supported yet." .. " " .. warning_text:gsub("\n", "\n\n")) .. ");" }
6 ui.tag{
7 tag = "noscript",
8 content = function()
9 slot.put(_"JavaScript is disabled or not available." .. " " .. encode.html_newlines(warning_text))
10 end
11 }
13 slot.put_into("title", encode.html(config.app_title))
15 slot.select("title", function()
16 ui.container{
17 attr = { class = "lang_chooser" },
18 content = function()
19 for i, lang in ipairs{"en", "de", "eo"} do
20 ui.link{
21 content = function()
22 ui.image{
23 static = "lang/" .. lang .. ".png",
24 attr = { style = "margin-left: 0.5em;", alt = lang }
25 }
26 end,
27 text = _('Select language "#{langcode}"', { langcode = lang }),
28 module = "index",
29 action = "set_lang",
30 params = { lang = lang },
31 routing = {
32 default = {
33 mode = "redirect",
34 module = request.get_module(),
35 view = request.get_view(),
36 id = param.get_id_cgi(),
37 params = param.get_all_cgi()
38 }
39 }
40 }
41 end
42 end
43 }
44 end)
47 local lang = locale.get("lang")
48 local basepath = request.get_app_basepath()
49 local file_name = basepath .. "/locale/motd/" .. lang .. "_public.txt"
50 local file = io.open(file_name)
51 if file ~= nil then
52 local help_text = file:read("*a")
53 if #help_text > 0 then
54 ui.container{
55 attr = { class = "motd wiki" },
56 content = function()
57 slot.put(format.wiki_text(help_text))
58 end
59 }
60 end
61 end
65 ui.tag{
66 tag = 'p',
67 content = _'You need to be logged in, to use this system.'
68 }
70 ui.form{
71 attr = { class = "login" },
72 module = 'index',
73 action = 'login',
74 routing = {
75 ok = {
76 mode = 'redirect',
77 module = 'index',
78 view = 'index'
79 },
80 error = {
81 mode = 'forward',
82 module = 'index',
83 view = 'login',
84 }
85 },
86 content = function()
87 ui.field.text{
88 attr = { id = "username_field" },
89 label = _'login name',
90 html_name = 'login',
91 value = ''
92 }
93 ui.script{ script = 'document.getElementById("username_field").focus();' }
94 ui.field.password{
95 label = _'Password',
96 html_name = 'password',
97 value = ''
98 }
99 ui.submit{
100 text = _'Login'
101 }
102 end
103 }

Impressum / About Us