liquid_feedback_frontend

annotate 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
rev   line source
bsw/jbe@5 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."
bsw/jbe@5 2
bsw/jbe@5 3 ui.script{ static = "js/browser_warning.js" }
bsw/jbe@5 4 ui.script{ script = "checkBrowser(" .. encode.json(_"Your web browser is not fully supported yet." .. " " .. warning_text:gsub("\n", "\n\n")) .. ");" }
bsw/jbe@5 5
bsw/jbe@5 6 ui.tag{
bsw/jbe@5 7 tag = "noscript",
bsw/jbe@5 8 content = function()
bsw/jbe@5 9 slot.put(_"JavaScript is disabled or not available." .. " " .. encode.html_newlines(warning_text))
bsw/jbe@5 10 end
bsw/jbe@5 11 }
bsw/jbe@5 12
bsw/jbe@0 13 slot.put_into("title", encode.html(config.app_title))
bsw/jbe@0 14
bsw@11 15 slot.select("title", function()
bsw@11 16 ui.container{
bsw@11 17 attr = { class = "lang_chooser" },
bsw@11 18 content = function()
bsw@15 19 for i, lang in ipairs{"en", "de", "eo"} do
bsw@11 20 ui.link{
bsw@11 21 content = function()
bsw@11 22 ui.image{
bsw@11 23 static = "lang/" .. lang .. ".png",
bsw@11 24 attr = { style = "margin-left: 0.5em;", alt = lang }
bsw@11 25 }
bsw@11 26 end,
bsw/jbe@19 27 text = _('Select language "#{langcode}"', { langcode = lang }),
bsw@11 28 module = "index",
bsw@11 29 action = "set_lang",
bsw@11 30 params = { lang = lang },
bsw@11 31 routing = {
bsw@11 32 default = {
bsw@11 33 mode = "redirect",
bsw@11 34 module = request.get_module(),
bsw@11 35 view = request.get_view(),
bsw@11 36 id = param.get_id_cgi(),
bsw@11 37 params = param.get_all_cgi()
bsw@11 38 }
bsw@11 39 }
bsw@11 40 }
bsw@11 41 end
bsw@11 42 end
bsw@11 43 }
bsw@11 44 end)
bsw@11 45
bsw@11 46
bsw@11 47 local lang = locale.get("lang")
bsw@11 48 local basepath = request.get_app_basepath()
bsw@11 49 local file_name = basepath .. "/locale/motd/" .. lang .. "_public.txt"
bsw@11 50 local file = io.open(file_name)
bsw@11 51 if file ~= nil then
bsw@11 52 local help_text = file:read("*a")
bsw@11 53 if #help_text > 0 then
bsw@11 54 ui.container{
bsw@11 55 attr = { class = "motd wiki" },
bsw@11 56 content = function()
bsw@11 57 slot.put(format.wiki_text(help_text))
bsw@11 58 end
bsw@11 59 }
bsw@11 60 end
bsw@11 61 end
bsw@11 62
bsw@11 63
bsw@11 64
bsw/jbe@0 65 ui.tag{
bsw/jbe@0 66 tag = 'p',
bsw@3 67 content = _'You need to be logged in, to use this system.'
bsw/jbe@0 68 }
bsw/jbe@0 69
bsw/jbe@0 70 ui.form{
bsw/jbe@0 71 attr = { class = "login" },
bsw/jbe@0 72 module = 'index',
bsw/jbe@0 73 action = 'login',
bsw/jbe@0 74 routing = {
bsw/jbe@0 75 ok = {
bsw/jbe@0 76 mode = 'redirect',
bsw/jbe@0 77 module = 'index',
bsw/jbe@0 78 view = 'index'
bsw/jbe@0 79 },
bsw/jbe@0 80 error = {
bsw/jbe@0 81 mode = 'forward',
bsw/jbe@0 82 module = 'index',
bsw/jbe@0 83 view = 'login',
bsw/jbe@0 84 }
bsw/jbe@0 85 },
bsw/jbe@0 86 content = function()
bsw/jbe@0 87 ui.field.text{
bsw/jbe@0 88 attr = { id = "username_field" },
bsw/jbe@5 89 label = _'login name',
bsw/jbe@0 90 html_name = 'login',
bsw/jbe@0 91 value = ''
bsw/jbe@0 92 }
bsw/jbe@0 93 ui.script{ script = 'document.getElementById("username_field").focus();' }
bsw/jbe@0 94 ui.field.password{
bsw/jbe@0 95 label = _'Password',
bsw/jbe@0 96 html_name = 'password',
bsw/jbe@0 97 value = ''
bsw/jbe@0 98 }
bsw/jbe@0 99 ui.submit{
bsw/jbe@0 100 text = _'Login'
bsw/jbe@0 101 }
bsw/jbe@0 102 end
bsw/jbe@0 103 }
bsw@11 104

Impressum / About Us