liquid_feedback_frontend

annotate app/main/interest/_show_box.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 559c6be0e1e9
children ca006681befc
rev   line source
bsw/jbe@0 1
bsw/jbe@0 2 local issue = param.get("issue", "table")
bsw/jbe@0 3
bsw/jbe@4 4 local interest = Interest:by_pk(issue.id, app.session.member.id)
bsw/jbe@0 5
bsw/jbe@4 6 if interest then
bsw/jbe@4 7 slot.select("actions", function()
bsw/jbe@0 8
bsw/jbe@0 9 ui.container{
bsw/jbe@4 10 attr = { class = "interest vote_info"},
bsw/jbe@0 11 content = function()
bsw/jbe@4 12 ui.container{
bsw/jbe@4 13 attr = {
bsw/jbe@19 14 class = "head head_active" .. (interest.autoreject and " head_autoreject" or ""),
bsw/jbe@4 15 onclick = "document.getElementById('interest_content').style.display = 'block';"
bsw/jbe@4 16 },
bsw/jbe@4 17 content = function()
bsw/jbe@5 18 ui.image{
bsw/jbe@5 19 static = "icons/16/eye.png"
bsw/jbe@5 20 }
bsw/jbe@4 21 slot.put(_"Your are interested")
bsw/jbe@19 22
bsw/jbe@19 23 if interest.autoreject then
bsw/jbe@19 24 ui.image{
bsw/jbe@19 25 static = "icons/16/thumb_down_red.png"
bsw/jbe@19 26 }
bsw/jbe@19 27 end
bsw/jbe@19 28
bsw/jbe@4 29 ui.image{
bsw/jbe@4 30 static = "icons/16/dropdown.png"
bsw/jbe@4 31 }
bsw/jbe@4 32 end
bsw/jbe@0 33 }
bsw/jbe@4 34
bsw/jbe@4 35 ui.container{
bsw/jbe@4 36 attr = { class = "content", id = "interest_content" },
bsw/jbe@4 37 content = function()
bsw/jbe@4 38 ui.container{
bsw/jbe@4 39 attr = {
bsw/jbe@4 40 class = "close",
bsw/jbe@4 41 style = "cursor: pointer;",
bsw/jbe@4 42 onclick = "document.getElementById('interest_content').style.display = 'none';"
bsw/jbe@4 43 },
bsw/jbe@4 44 content = function()
bsw/jbe@4 45 ui.image{ static = "icons/16/cross.png" }
bsw/jbe@4 46 end
bsw/jbe@4 47 }
bsw/jbe@5 48 if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then
bsw/jbe@5 49 ui.link{
bsw/jbe@19 50 text = _"Remove my interest",
bsw/jbe@19 51 module = "interest",
bsw/jbe@19 52 action = "update",
bsw/jbe@19 53 params = { issue_id = issue.id, delete = true },
bsw/jbe@5 54 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
bsw/jbe@5 55 }
bsw/jbe@5 56 slot.put("<br />")
bsw/jbe@5 57 slot.put("<br />")
bsw/jbe@5 58 end
bsw/jbe@4 59 if interest.autoreject then
bsw/jbe@4 60 ui.field.text{ value = _"Autoreject is on." }
bsw/jbe@5 61 if issue.state ~= "finished" and issue.state ~= "cancelled" then
bsw/jbe@5 62 ui.link{
bsw/jbe@19 63 text = _"Remove autoreject",
bsw/jbe@19 64 module = "interest",
bsw/jbe@19 65 action = "update",
bsw/jbe@19 66 params = { issue_id = issue.id, autoreject = false },
bsw/jbe@5 67 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
bsw/jbe@5 68 }
bsw/jbe@5 69 end
bsw/jbe@4 70 else
bsw/jbe@4 71 ui.field.text{ value = _"Autoreject is off." }
bsw/jbe@5 72 if issue.state ~= "finished" and issue.state ~= "cancelled" then
bsw/jbe@5 73 ui.link{
bsw/jbe@19 74 text = _"Set autoreject",
bsw/jbe@19 75 module = "interest",
bsw/jbe@19 76 action = "update",
bsw/jbe@19 77 params = { issue_id = issue.id, autoreject = true },
bsw/jbe@5 78 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
bsw/jbe@5 79 }
bsw/jbe@5 80 end
bsw/jbe@4 81 end
bsw/jbe@4 82 end
bsw/jbe@0 83 }
bsw/jbe@0 84 end
bsw/jbe@4 85 }
bsw/jbe@4 86 end)
bsw@16 87 else
bsw@16 88 if not issue.closed and not issue.fully_frozen then
bsw@16 89 ui.link{
bsw/jbe@19 90 image = { static = "icons/16/user_add.png" },
bsw/jbe@19 91 text = _"Add my interest",
bsw/jbe@19 92 module = "interest",
bsw/jbe@19 93 action = "update",
bsw/jbe@19 94 params = { issue_id = issue.id },
bsw@16 95 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
bsw@16 96 }
bsw@16 97 end
bsw/jbe@4 98 end

Impressum / About Us