liquid_feedback_frontend

annotate app/main/index/download.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 8d91bccab0bf
children f49cdfb72567
rev   line source
bsw/jbe@6 1 if not config.download_dir then
bsw/jbe@6 2 error("feature not enabled")
bsw/jbe@6 3 end
bsw/jbe@6 4
bsw/jbe@6 5 slot.put_into("title", _"Download database export")
bsw/jbe@6 6
bsw/jbe@6 7 slot.select("actions", function()
bsw/jbe@6 8 ui.link{
bsw/jbe@6 9 content = function()
bsw/jbe@6 10 ui.image{ static = "icons/16/cancel.png" }
bsw/jbe@6 11 slot.put(_"Cancel")
bsw/jbe@6 12 end,
bsw/jbe@6 13 module = "index",
bsw/jbe@6 14 view = "index"
bsw/jbe@6 15 }
bsw/jbe@6 16 end)
bsw/jbe@6 17
bsw/jbe@6 18 util.help("index.download", _"Download")
bsw/jbe@6 19
bsw/jbe@6 20 ui.container{
bsw/jbe@6 21 attr = { class = "wiki use_terms" },
bsw/jbe@6 22 content = function()
bsw/jbe@6 23 slot.put(format.wiki_text(config.download_use_terms))
bsw/jbe@6 24 end
bsw/jbe@6 25 }
bsw/jbe@6 26
bsw/jbe@6 27
bsw/jbe@6 28 local file_list = os.listdir(config.download_dir)
bsw/jbe@6 29
bsw/jbe@6 30 local tmp = {}
bsw/jbe@6 31 for i, filename in ipairs(file_list) do
bsw/jbe@6 32 if not filename:find("^%.") then
bsw/jbe@6 33 tmp[#tmp+1] = filename
bsw/jbe@6 34 end
bsw/jbe@6 35 end
bsw/jbe@6 36
bsw/jbe@6 37 local file_list = tmp
bsw/jbe@6 38
bsw/jbe@6 39 table.sort(file_list, function(a, b) return a > b end)
bsw/jbe@6 40
bsw/jbe@6 41 ui.list{
bsw/jbe@6 42 records = file_list,
bsw/jbe@6 43 columns = {
bsw/jbe@6 44 {
bsw/jbe@6 45 content = function(filename)
bsw/jbe@6 46 slot.put(encode.html(filename))
bsw/jbe@6 47 end
bsw/jbe@6 48 },
bsw/jbe@6 49 {
bsw/jbe@6 50 content = function(filename)
bsw/jbe@6 51 ui.link{
bsw/jbe@6 52 content = _"Download",
bsw/jbe@6 53 module = "index",
bsw/jbe@6 54 view = "download_file",
bsw/jbe@6 55 params = { filename = filename }
bsw/jbe@6 56 }
bsw/jbe@6 57 end
bsw/jbe@6 58 }
bsw/jbe@6 59 }
bsw/jbe@6 60 }

Impressum / About Us