liquid_feedback_frontend
diff env/ui/partial_load.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 | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/env/ui/partial_load.lua Sat Feb 20 22:10:31 2010 +0100 1.3 @@ -0,0 +1,55 @@ 1.4 +function ui.partial_load(args) 1.5 + local hourglass_target = ui._partial.hourglass_target 1.6 + local target = ui._partial.target 1.7 + local id = param.get_id_cgi() 1.8 + local module = ui._partial.module 1.9 + local view = ui._partial.view 1.10 + local cgi_params = cgi.params 1.11 + 1.12 + local params = { 1.13 + } 1.14 + 1.15 + if ui._partial and ui._partial.static_params then 1.16 + for key, value in pairs(ui._partial.static_params) do 1.17 + params[key] = value 1.18 + end 1.19 + end 1.20 + if ui._partial and ui._partial.params then 1.21 + for i, param_name in ipairs(ui._partial.params) do 1.22 + params[param_name] = cgi_params[param_name] 1.23 + end 1.24 + end 1.25 + if args.params then 1.26 + for key, value in pairs(args.params) do 1.27 + params[key] = value 1.28 + end 1.29 + end 1.30 + 1.31 + request.force_absolute_baseurl() 1.32 + 1.33 + return 1.34 + 'var hourglass_el = document.getElementById("' .. hourglass_target .. '");' .. 1.35 + 'var hourglass_src = hourglass_el.src;' .. 1.36 + 'hourglass_el.src = "' .. encode.url{ static = "icons/16/connect.png" } .. '";' .. 1.37 + 'partialMultiLoad(' .. 1.38 + '{ trace: "trace", system_error: "system_error", ' .. target .. ': "default" },' .. 1.39 + '{},' .. 1.40 + '"error",' .. 1.41 + '"' .. encode.url{ 1.42 + module = module, 1.43 + view = view, 1.44 + id = id, 1.45 + params = params 1.46 + } .. '&_webmcp_json_slots[]=default&_webmcp_json_slots[]=trace&_webmcp_json_slots[]=system_error",' .. 1.47 + '{},' .. 1.48 + '{},' .. 1.49 + 'function() {' .. 1.50 + 'hourglass_el.src = hourglass_src;' .. 1.51 + '},' .. 1.52 + 'function() {' .. 1.53 + 'hourglass_el.src = hourglass_src;' .. 1.54 + '}' .. 1.55 + '); ' .. 1.56 + 'return(false);' 1.57 +end 1.58 +