From 109c8272f1b981e684222c8a965b23c550256c6c Mon Sep 17 00:00:00 2001 From: Travis Kriplean Date: Thu, 12 Dec 2013 16:36:36 -0800 Subject: [PATCH] change toggle state UI Former-commit-id: 90c5c92323c7ceb71183e4ffd1e93a067df08b1c [formerly a1f71159a1460537b224d96622ebca53a71e022c] [formerly 2ea7abb81d0edc36164917f2bbb80941699d2b10 [formerly 2ea7abb81d0edc36164917f2bbb80941699d2b10 [formerly b9ffc7bdb95ed72eef24ee6fcfad593503477ffa]]] Former-commit-id: 2451e5cf1d1128a54982c89494db4d8c4bb6dd8e [formerly 51067308847457ff57e8e1ba5309d856fcfd7ce3] Former-commit-id: 75e370c623ec9f158f98c2fe4cdd20bb933a7aec Former-commit-id: 04c915225d67ca1ccfe133038f574df06c89f1ac --- .../proposal/toggle/toggle_view.coffee | 12 ++++++++--- .../apps/franklin/proposal/_toggle.sass | 21 ++++++++++++------- app/views/backbone/_proposal.html.haml | 21 ++++++++++++------- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/app/assets/javascripts/backbone/apps/franklin/proposal/toggle/toggle_view.coffee b/app/assets/javascripts/backbone/apps/franklin/proposal/toggle/toggle_view.coffee index 601c9deedd..621dcbeae5 100644 --- a/app/assets/javascripts/backbone/apps/franklin/proposal/toggle/toggle_view.coffee +++ b/app/assets/javascripts/backbone/apps/franklin/proposal/toggle/toggle_view.coffee @@ -13,12 +13,17 @@ crafting = @state == Proposal.ReasonsState.separated if !active && updating - call = 'View your opinion' + call = 'View Your Opinion' else if updating - call = 'Update your opinion' + call = 'Update Your Opinion' else - call = if crafting then 'Adding your own opinion' else 'Add your own opinion' + if crafting + call = 'Craft Your Own Opinion' + else + call = 'Craft Your Own Opinion' + + results_call = 'View All Opinions' current_user = App.request 'user:current' _.extend {}, @model.attributes, @@ -26,6 +31,7 @@ updating : updating crafting : crafting call : call + results_call : results_call onRender : -> super diff --git a/app/assets/stylesheets/apps/franklin/proposal/_toggle.sass b/app/assets/stylesheets/apps/franklin/proposal/_toggle.sass index d7e656a961..0404ca576e 100644 --- a/app/assets/stylesheets/apps/franklin/proposal/_toggle.sass +++ b/app/assets/stylesheets/apps/franklin/proposal/_toggle.sass @@ -23,12 +23,19 @@ // +font-size(3) &[data-state="separated"], &[data-state="together"] - margin-top: $vertical_baseline - a + margin-top: 2 * $vertical_baseline + + .m-proposal-state-primary + +font-size(6) color: $decision_board_text_color + font-weight: bold + + .m-proposal-state-secondary + color: lighten($base_text_color, 20%) &:hover - color: darken($decision_board_text_color, 10%) - +font-size(3) - i - +font-size(4) - vertical-align: middle \ No newline at end of file + color: $base_text_color + +font-size(1) + text-decoration: underline + // i + // +font-size(4) + // vertical-align: middle \ No newline at end of file diff --git a/app/views/backbone/_proposal.html.haml b/app/views/backbone/_proposal.html.haml index bb8626a6ec..1c35c375af 100644 --- a/app/views/backbone/_proposal.html.haml +++ b/app/views/backbone/_proposal.html.haml @@ -13,19 +13,26 @@ (( if(crafting && (active || updating) ) { )) - %a{ :href => "{{Routes.proposal_path( long_id )}}"} - %i.icon-large -  - + .m-proposal-state-primary {{ call }} + %a{ :href => "{{Routes.proposal_path( long_id )}}", :class => 'm-proposal-state-secondary'} + // %i.icon-large + //  + + {{ results_call }} + (( } else if(!crafting && (active || updating) ) { )) - %a{ :href => "{{Routes.new_position_proposal_path( long_id )}}"} - %i.icon-large -  + .m-proposal-state-primary + {{ results_call }} + + %a{ :href => "{{Routes.new_position_proposal_path( long_id )}}", :class => 'm-proposal-state-secondary'} + // %i.icon-large + //  {{ call }} + (( } )) ////////////// position ////////////