liquid_feedback_frontend
annotate config/default.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 | 76a83a88367a | 
| children | b195682957dc | 
| rev | line source | 
|---|---|
| bsw/jbe@0 | 1 config.app_name = "LiquidFeedback" | 
| bsw/jbe@19 | 2 config.app_version = "beta10" | 
| bsw/jbe@0 | 3 | 
| bsw/jbe@0 | 4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)" | 
| bsw/jbe@0 | 5 | 
| bsw/jbe@4 | 6 config.app_logo = nil | 
| bsw/jbe@4 | 7 | 
| bsw/jbe@0 | 8 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany" | 
| bsw/jbe@0 | 9 | 
| bsw/jbe@6 | 10 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten" | 
| bsw/jbe@6 | 11 | 
| bsw/jbe@4 | 12 config.member_image_convert_func = { | 
| bsw/jbe@4 | 13 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, | 
| bsw/jbe@4 | 14 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end | 
| bsw@2 | 15 } | 
| bsw@2 | 16 | 
| bsw/jbe@4 | 17 config.member_image_default_file = { | 
| bsw/jbe@4 | 18 avatar = "avatar.jpg", | 
| bsw/jbe@4 | 19 photo = nil | 
| bsw/jbe@4 | 20 } | 
| bsw/jbe@4 | 21 | 
| bsw/jbe@6 | 22 config.mail_subject_prefix = "[LiquidFeedback] " | 
| bsw/jbe@6 | 23 | 
| bsw/jbe@4 | 24 config.fastpath_url_func = nil | 
| bsw/jbe@4 | 25 | 
| bsw/jbe@6 | 26 config.download_dir = nil | 
| bsw/jbe@6 | 27 | 
| bsw/jbe@6 | 28 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten" | 
| bsw/jbe@4 | 29 | 
| bsw/jbe@19 | 30 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" } | 
| bsw/jbe@19 | 31 | 
| bsw/jbe@19 | 32 if request.get_json_request_slots() then | 
| bsw/jbe@19 | 33 request.force_absolute_baseurl() | 
| bsw/jbe@19 | 34 end | 
| bsw@8 | 35 | 
| bsw@8 | 36 request.set_404_route{ module = 'index', view = '404' } | 
| bsw@8 | 37 | 
| bsw/jbe@0 | 38 -- uncomment the following two lines to use C implementations of chosen | 
| bsw/jbe@0 | 39 -- functions and to disable garbage collection during the request, to | 
| bsw/jbe@0 | 40 -- increase speed: | 
| bsw/jbe@0 | 41 -- | 
| bsw/jbe@0 | 42 -- require 'webmcp_accelerator' | 
| bsw/jbe@0 | 43 -- collectgarbage("stop") | 
| bsw/jbe@0 | 44 | 
| bsw/jbe@0 | 45 -- open and set default database handle | 
| bsw/jbe@0 | 46 db = assert(mondelefant.connect{ | 
| bsw/jbe@0 | 47 engine='postgresql', | 
| bsw/jbe@0 | 48 dbname='liquid_feedback' | 
| bsw/jbe@0 | 49 }) | 
| bsw/jbe@0 | 50 at_exit(function() | 
| bsw/jbe@0 | 51 db:close() | 
| bsw/jbe@0 | 52 end) | 
| bsw/jbe@0 | 53 function mondelefant.class_prototype:get_db_conn() return db end | 
| bsw/jbe@0 | 54 | 
| bsw/jbe@0 | 55 -- enable output of SQL commands in trace system | 
| bsw/jbe@0 | 56 function db:sql_tracer(command) | 
| bsw/jbe@0 | 57 return function(error_info) | 
| bsw/jbe@0 | 58 local error_info = error_info or {} | 
| bsw/jbe@0 | 59 trace.sql{ command = command, error_position = error_info.position } | 
| bsw/jbe@0 | 60 end | 
| bsw/jbe@0 | 61 end | 
| bsw/jbe@0 | 62 | 
| bsw/jbe@6 | 63 request.set_absolute_baseurl(config.absolute_base_url) | 
| bsw/jbe@0 | 64 | 
| bsw/jbe@0 | 65 | 
| bsw/jbe@0 | 66 | 
| bsw@2 | 67 -- TODO abstraction | 
| bsw/jbe@0 | 68 -- get record by id | 
| bsw/jbe@0 | 69 function mondelefant.class_prototype:by_id(id) | 
| bsw/jbe@0 | 70 local selector = self:new_selector() | 
| bsw/jbe@0 | 71 selector:add_where{ 'id = ?', id } | 
| bsw/jbe@0 | 72 selector:optional_object_mode() | 
| bsw/jbe@0 | 73 return selector:exec() | 
| bsw/jbe@0 | 74 end | 
| bsw/jbe@0 | 75 | 
| bsw@2 | 76 |