liquid_feedback_frontend
view app/main/interest/_action/update.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 | 374bbc2ff102 | 
| children | 42547a48774d | 
 line source
     1 local issue_id = assert(param.get("issue_id", atom.integer), "no issue id given")
     3 local interest = Interest:by_pk(issue_id, app.session.member.id)
     5 local issue = Issue:by_id(issue_id)
     7 if issue.closed then
     8   slot.put_into("error", _"This issue is already closed.")
     9   return false
    10 elseif issue.fully_frozen then 
    11   slot.put_into("error", _"Voting for this issue has already begun.")
    12   return false
    13 end
    15 if param.get("delete", atom.boolean) then
    16   if interest then
    17     interest:destroy()
    18     slot.put_into("notice", _"Interest removed")
    19   else
    20     slot.put_into("notice", _"Interest not existant")
    21   end
    22   return
    23 end
    25 if not interest then
    26   interest = Interest:new()
    27   interest.issue_id   = issue_id
    28   interest.member_id  = app.session.member_id
    29   interest.autoreject = false
    30 end
    32 local autoreject = param.get("autoreject", atom.boolean)
    33 if autoreject ~= nil then
    34   interest.autoreject = autoreject
    35 end
    37 interest:save()
    39 slot.put_into("notice", _"Interest updated")
