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