# HG changeset patch # User bsw # Date 1329088602 -3600 # Node ID bde068b37608a8727e9ae54abcb565e97142d6fa # Parent f460555c98969f9cd4156f8202d61b84a2a5f354 Dropdown boxes except of delegation box removed, optical enhancements and repositioning of elements diff -r f460555c9896 -r bde068b37608 app/main/_layout/default.html --- a/app/main/_layout/default.html Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/_layout/default.html Mon Feb 13 00:16:42 2012 +0100 @@ -30,44 +30,37 @@
-
-
- -
- -
-
- -
-
- -
-
- -
-
- -
-
-
- -
- -
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+
-
- -
+
-
+
+ +
+
-
+
diff -r f460555c9896 -r bde068b37608 app/main/area/show.lua --- a/app/main/area/show.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/area/show.lua Mon Feb 13 00:16:42 2012 +0100 @@ -65,10 +65,21 @@ end - -execute.view{ - module = "area", - view = "show_tab", - params = { area = area } -} - +if app.session.member then + execute.view{ + module = "area", + view = "show_tab", + params = { area = area } + } +else + execute.view{ + module = "issue", + view = "_list", + params = { + issues_selector = area:get_reference_selector("issues"), + filter = cgi.params["filter"], + filter_voting = param.get("filter_voting"), + for_area_list = true + } + } +end diff -r f460555c9896 -r bde068b37608 app/main/delegation/_show_box.lua --- a/app/main/delegation/_show_box.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/delegation/_show_box.lua Mon Feb 13 00:16:42 2012 +0100 @@ -194,6 +194,7 @@ if not issue or (issue.state ~= "finished" and issue.state ~= "cancelled") then change_delegation(scope, unit_id, area_id, issue, delegation, initiative_id) + slot.put("
") end for i, record in ipairs(delegation_chain) do diff -r f460555c9896 -r bde068b37608 app/main/initiative/_action/add_support.lua --- a/app/main/initiative/_action/add_support.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/initiative/_action/add_support.lua Mon Feb 13 00:16:42 2012 +0100 @@ -37,24 +37,12 @@ supporter.auto_support = auto_support end supporter:save() - slot.put_into("notice", _"Your support has been added to this initiative") - if supporter.auto_active then - slot.put_into("notice", _"Auto support is now enabled") - end -elseif (auto_support ~= nil and supporter.auto_support ~= auto_support) and config.auto_support then - supporter.auto_support = auto_support - if auto_support then - slot.put_into("notice", _"Auto support is now enabled") - else - slot.put_into("notice", _"Auto support is now disabled") - end - supporter.draft_id = last_draft.id - supporter:save() +-- slot.put_into("notice", _"Your support has been added to this initiative") elseif supporter.draft_id ~= last_draft.id then supporter.draft_id = last_draft.id supporter:save() - slot.put_into("notice", _"Your support has been updated to the latest draft") +-- slot.put_into("notice", _"Your support has been updated to the latest draft") else - slot.put_into("notice", _"You are already supporting the latest draft") +-- slot.put_into("notice", _"You are already supporting the latest draft") end diff -r f460555c9896 -r bde068b37608 app/main/initiative/_action/remove_support.lua --- a/app/main/initiative/_action/remove_support.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/initiative/_action/remove_support.lua Mon Feb 13 00:16:42 2012 +0100 @@ -17,7 +17,7 @@ if supporter then supporter:destroy() - slot.put_into("notice", _"Your support has been removed from this initiative") +-- slot.put_into("notice", _"Your support has been removed from this initiative") else - slot.put_into("notice", _"You are already not supporting this initiative") +-- slot.put_into("notice", _"You are already not supporting this initiative") end \ No newline at end of file diff -r f460555c9896 -r bde068b37608 app/main/initiative/show_support.lua --- a/app/main/initiative/show_support.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/initiative/show_support.lua Mon Feb 13 00:16:42 2012 +0100 @@ -17,9 +17,6 @@ local initiative = param.get("initiative", "table") local supporter = Supporter:by_pk(initiative.id, app.session.member.id) - local unique_string = multirand.string(16, '0123456789abcdef') - - local partial = { routing = { default = { @@ -44,7 +41,7 @@ if not initiative.issue.fully_frozen and not initiative.issue.closed then if supporter then if not supporter:has_critical_opinion() then - ui.tag{ attr = { class = "supporter" }, content = function() + ui.container{ attr = { class = "supporter" }, content = function() ui.image{ static = "icons/16/thumb_up_green.png" } @@ -58,9 +55,9 @@ slot.put(_"Your are potential supporter") end } end - slot.put(" · ") ui.link{ - text = _"Remove my support from this initiative", + image = { static = "icons/16/cross.png" }, + text = _"Withdraw support", module = "initiative", action = "remove_support", id = initiative.id, @@ -73,6 +70,7 @@ local params = param.get_all_cgi() params.dyn = nil ui.link{ + image = { static = "icons/16/thumb_up_green.png" }, text = _"Support this initiative", module = "initiative", action = "add_support", @@ -104,6 +102,7 @@ end if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then ui.link{ + image = { static = "icons/16/comments.png" }, text = _"change discussion URL", module = "initiative", view = "edit", diff -r f460555c9896 -r bde068b37608 app/main/interest/_action/update.lua --- a/app/main/interest/_action/update.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/interest/_action/update.lua Mon Feb 13 00:16:42 2012 +0100 @@ -15,9 +15,9 @@ if param.get("delete", atom.boolean) then if interest then interest:destroy() - slot.put_into("notice", _"Interest removed") + --slot.put_into("notice", _"Interest removed") else - slot.put_into("notice", _"Interest not existent") + --slot.put_into("notice", _"Interest not existent") end return end @@ -30,4 +30,4 @@ interest:save() -slot.put_into("notice", _"Interest updated") +--slot.put_into("notice", _"Interest updated") diff -r f460555c9896 -r bde068b37608 app/main/interest/_show_box.lua --- a/app/main/interest/_show_box.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/interest/_show_box.lua Mon Feb 13 00:16:42 2012 +0100 @@ -4,16 +4,14 @@ local interest = Interest:by_pk(issue.id, app.session.member.id) local membership = Membership:by_pk(issue.area_id, app.session.member_id) -if interest then - slot.select("actions", function() +slot.select("interest", function() + if interest then ui.container{ - attr = { class = "interest vote_info"}, content = function() ui.container{ attr = { class = "head head_active", - onclick = "document.getElementById('interest_content').style.display = 'block';" }, content = function() ui.image{ @@ -21,50 +19,31 @@ } slot.put(_"Your are interested") - ui.image{ - static = "icons/16/dropdown.png" - } end } - - ui.container{ - attr = { class = "content", id = "interest_content" }, - content = function() - ui.container{ - attr = { - class = "close", - style = "cursor: pointer;", - onclick = "document.getElementById('interest_content').style.display = 'none';" - }, - content = function() - ui.image{ static = "icons/16/cross.png" } - end - } - if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then - ui.link{ - text = _"Remove my interest", - module = "interest", - action = "update", - params = { issue_id = issue.id, delete = true }, - routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } - } - slot.put("
") - slot.put("
") - end - end - } + + if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then + ui.link{ + image = { static = "icons/16/cross.png" }, + text = _"Withdraw interest", + module = "interest", + action = "update", + params = { issue_id = issue.id, delete = true }, + routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } + } + end end } - end) -else - if not issue.closed and not issue.fully_frozen then - ui.link{ - image = { static = "icons/16/user_add.png" }, - text = _"Add my interest", - module = "interest", - action = "update", - params = { issue_id = issue.id }, - routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } - } + else + if not issue.closed and not issue.fully_frozen then + ui.link{ + image = { static = "icons/16/user_add.png" }, + text = _"Add my interest", + module = "interest", + action = "update", + params = { issue_id = issue.id }, + routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } + } + end end -end +end) diff -r f460555c9896 -r bde068b37608 app/main/issue/_filters.lua --- a/app/main/issue/_filters.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/issue/_filters.lua Mon Feb 13 00:16:42 2012 +0100 @@ -18,7 +18,7 @@ }, { name = "accepted", - label = _"In discussion", + label = _"Discussion", selector_modifier = function(selector) selector:add_where("issue.accepted NOTNULL AND issue.half_frozen ISNULL AND issue.closed ISNULL") end diff -r f460555c9896 -r bde068b37608 app/main/issue/_show_head.lua --- a/app/main/issue/_show_head.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/issue/_show_head.lua Mon Feb 13 00:16:42 2012 +0100 @@ -12,9 +12,6 @@ util.html_rss_head{ title = _"Initiatives in this issue (last updated first)", module = "initiative", view = "list_rss", params = { issue_id = issue.id, order = "last_updated" } } end -slot.select("path", function() -end) - slot.select("title", function() ui.link{ content = _("Issue ##{id}", { id = issue.id }), diff -r f460555c9896 -r bde068b37608 app/main/member/_action/update_display.lua --- a/app/main/member/_action/update_display.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/member/_action/update_display.lua Mon Feb 13 00:16:42 2012 +0100 @@ -1,4 +1,3 @@ -app.session.member:set_setting("tab_mode", param.get("tab_mode")) app.session.member:set_setting("initiatives_preview_limit", param.get("initiatives_preview_limit", atom.number)) slot.put_into("notice", _"Your display settings have been updated") \ No newline at end of file diff -r f460555c9896 -r bde068b37608 app/main/membership/_action/update.lua --- a/app/main/membership/_action/update.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/membership/_action/update.lua Mon Feb 13 00:16:42 2012 +0100 @@ -4,9 +4,9 @@ if param.get("delete", atom.boolean) then if membership then membership:destroy() - slot.put_into("notice", _"Membership removed") + --slot.put_into("notice", _"Membership removed") else - slot.put_into("notice", _"Membership not existent") + --slot.put_into("notice", _"Membership not existent") end return end diff -r f460555c9896 -r bde068b37608 app/main/membership/_show_box.lua --- a/app/main/membership/_show_box.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/app/main/membership/_show_box.lua Mon Feb 13 00:16:42 2012 +0100 @@ -9,41 +9,22 @@ ui.container{ attr = { class = "head head_active", - onclick = "document.getElementById('membership_content').style.display = 'block';" }, content = function() ui.image{ static = "icons/16/user_green.png" } slot.put(_"You are member") - - ui.image{ - static = "icons/16/dropdown.png" - } end } - ui.container{ - attr = { class = "content", id = "membership_content" }, - content = function() - ui.container{ - attr = { - class = "close", - style = "cursor: pointer;", - onclick = "document.getElementById('membership_content').style.display = 'none';" - }, - content = function() - ui.image{ static = "icons/16/cross.png" } - end - } - ui.link{ - text = _"Remove my membership", - module = "membership", - action = "update", - params = { area_id = area.id, delete = true }, - routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } } - } - end + ui.link{ + image = { static = "icons/16/cross.png" }, + text = _"Withdraw membership", + module = "membership", + action = "update", + params = { area_id = area.id, delete = true }, + routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } } } else ui.link{ diff -r f460555c9896 -r bde068b37608 db/session.lua --- a/db/session.lua Sun Feb 12 20:03:26 2012 +0100 +++ b/db/session.lua Mon Feb 13 00:16:42 2012 +0100 @@ -13,3 +13,6 @@ COMMENT ON COLUMN "session"."member_id" IS 'Reference to member, who is logged in'; COMMENT ON COLUMN "session"."lang" IS 'Language code of the selected language'; + + +DELETE FROM "setting" WHERE key = 'tab_mode'; \ No newline at end of file diff -r f460555c9896 -r bde068b37608 static/style.css --- a/static/style.css Sun Feb 12 20:03:26 2012 +0100 +++ b/static/style.css Mon Feb 13 00:16:42 2012 +0100 @@ -118,6 +118,7 @@ font-size: 90%; line-height: 100%; padding-left: 10px; + overflow: hidden; } .topbar .logolf { @@ -166,6 +167,7 @@ .searchbox form { float: left; + margin: 0px; } .searchbox div { @@ -194,46 +196,14 @@ * Title of current page including path and actions */ -.title_bar { - padding-bottom: 1ex; - xbackground-color: #def; - text-shadow: #fff 0px 0px 3px; -} - -.title_bar_content { - padding-left: 1em; - padding-top: 1.5ex; +.title { + background-color: #ddd; background: -webkit-gradient(linear, left top, left bottom, - /*color-stop(0%,#abd3ee), color-stop(100%,#ffffff)*/ color-stop(0%,#ddd), color-stop(100%,#fff) ); -} - -.path { - color: #444; -} - -.path div { - font-size: 100%; - line-height: 180%; -} - -.path a { - color: #444; -} - -.slot_path div { - display: inline; - margin-left: 1em; - margin-right: 1em; -} - -.title { + text-shadow: #fff 0px 0px 3px; color: #000; - margin-bottom: 1ex; -} - -.slot_title { + padding: 1ex 1em 0 1em; } .title div { @@ -241,17 +211,18 @@ line-height: 110%; } -.title div a { - xfont-weight: bold; -} - .title a { color: #000; } -.title2 div { +.slot_title2 { + margin-top: 1ex; + margin-left: 1em; +} + +.initiatives_list { + clear: left; margin-bottom: 1ex; - xline-height: 130%; } .member_image_avatar { @@ -268,23 +239,29 @@ .actions { font-size: 75%; line-height: 220%; + margin-top: 1ex; + margin-bottom: 2ex; } -.slot_actions { - display: inline; +.interest { + margin-left: 1.33em; + margin-bottom: 1.33ex; +} + +.slot_actions .interest { + margin-left: 0em; } .actions a { - padding: 1px 0.5em 1px 0.0em; margin-right: 1em; border-radius: 5px; + padding-right: 0.3em; } - .slot_initiative_head { background: -webkit-gradient(linear, left top, left bottom, /*color-stop(0%,#AFEFB9), color-stop(100%,#ffffff) */ - color-stop(0%,#ddd), color-stop(100%,#fff) + color-stop(0%,#e7e7e7), color-stop(100%,#fff) ); padding-left: 1em; padding-top: 2ex; @@ -294,11 +271,8 @@ .initiative_name { font-weight: bold; font-size: 125%; - xline-height: 110%; - xmargin-bottom: 0.7ex; } - .content_navigation { font-size: 75%; background-color: #eee; @@ -323,14 +297,15 @@ border-left: 1px solid black; } + +.actions a { + float: left; +} + .actions a:hover { background-color: #d7d7d7; } -.title_bar .actions a:hover { - background-color: #fff; -} - .actions img { padding-left: 0.2em; padding-right: 0.2em; @@ -363,13 +338,19 @@ padding-left: 0.2em; padding-right: 0.2em; } +.actions .supporter, .vote_info .head { float: left; margin-right: 1em; } +.actions .supporter, +.actions .interest .head { + padding-right: 0.3em; +} + .interest .head_active, -.actions .potential_supporter{ +.actions .potential_supporter { background-color: #fec; box-shadow: #fff 0px 0px 10px 1px; border-radius: 5px; @@ -425,12 +406,12 @@ .vote_info .content { font-size: 133%; line-height: 100%; - top: 3ex; + top: 2.8ex; display: none; position: absolute; z-index: 10; - background-color: #fff; - border: 1px solid #999; + background-color: #ddddff; + border-radius: 0 5px 5px 5px; padding: 1em; width: 35em; } @@ -458,6 +439,7 @@ .vote_info .member_thumb { clear: left; + background: #fff; } .delegation_overridden .member_thumb { @@ -490,7 +472,7 @@ .ui_tabs_links { margin-top: 2ex; - margin-bottom: 2ex; + margin-bottom: 1ex; font-size: 75%; } @@ -520,61 +502,6 @@ xpadding: 1ex 1ex 1ex 1ex; } -.web10 .ui_tabs_accordeon_head { - margin-bottom: 1ex; -} - -.web20 .ui_tabs_accordeon_head { - font-size: 80%; - font-weight: bold; - display: block; - background: #eee; - border: 1px solid #bbb; - color: #000; - padding: 0.75ex; - margin-top: 2ex; - cursor: pointer; -} - -.web20 .ui_tabs_accordeon_head img { - vertical-align: middle; - margin-right: 0.5em; -} - -.web20 .ui_tabs_accordeon_head .bargraph { - margin-right: 0.5em; -} - -.web20 .ui_tabs_accordeon_content { - border: 1px solid #aaa; - border-top: none; - padding: 2ex 1em 2ex 1em; - margin-bottom: 3ex; -} - -.web20 .issue_initiative_list .ui_tabs_accordeon_head { - background-color: #e5e5ff; -} - -.web20 .issue_initiative_list .ui_tabs_accordeon_head, -.web20 .issue_initiative_list .ui_tabs_accordeon_content { - border-color: #aad; -} - -.web20 .issue_initiative_list .ui_tabs_accordeon_content .ui_tabs_accordeon_content { - border-color: #bbb; - border-width: 1px; -} - -.web20 .issue_initiative_list .ui_tabs_accordeon_content .ui_tabs_accordeon_head { - background-color: #eee; - border: 1px solid #bbb; -} - -.web20 .issue_initiative_list .ui_tabs_accordeon_head a { - font-size: 120%; -} - .ui_tabs_links a.yellow { background-color: #fec; color: #000; @@ -591,17 +518,6 @@ padding: 1ex; } -.web20 .ui_tabs_accordeon_head.yellow { - background-color: #fec; - border-color: #b96; - xpadding: 1ex; - xmargin-bottom: 2ex; -} - -.web20 .ui_tabs_accordeon_content.yellow { - border-color: #b96; -} - .ui_tabs_links a.red { background-color: #c33; color: #000; @@ -618,17 +534,6 @@ padding: 1ex; } -.web20 .ui_tabs_accordeon_head.red { - background-color: #c23; - border-color: #b66; - xpadding: 1ex; - xmargin-bottom: 2ex; -} - -.web20 .ui_tabs_accordeon_content.red { - border-color: #b66; -} - /************************************************************************* * ui.filters @@ -844,40 +749,6 @@ /************************************************************************* - * Hidden inline form - */ - -.hidden_inline_form { - display: none; - border: 1px solid #444; - width: 42em; - position: fixed; - background-color: #fff; - left: 5em; - top: 5ex; -z-index: 2; -} - -.hidden_inline_form a { - padding: 0.5ex; - color: #fff; -} - - -.hidden_inline_form .head { - background-color: #444; - color: #fff; - display: block; - padding: 0.5ex; -} - -.hidden_inline_form input[type=text], -.hidden_inline_form textarea, -.hidden_inline_form select { - width: 30em; -} - -/************************************************************************* * Positive / Negtive votes */ @@ -970,10 +841,6 @@ background: none; } -.initiative_link { - padding: 0.5ex 0.5em; -} - .initiative_link.selected { font-weight: bold; } @@ -1034,7 +901,7 @@ border-radius: 7px; } -.member_thumb a{ +.member_thumb a { position: absolute; top: 0; left: 0; @@ -1201,6 +1068,7 @@ .slot_help_hidden { float: right; margin-right: 1em; + margin-top: 1ex; } .help_actions {