From bebe0c41f64d4137db6665b241c57f7c2250b857 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 11:50:46 +1000 Subject: [PATCH 01/25] Styling for hubs and producers - adding rounded corners, making current shop less intense --- .../darkswarm/active_table.css.sass | 6 ++++- .../stylesheets/darkswarm/branding.css.sass | 12 ---------- .../stylesheets/darkswarm/hub_node.css.sass | 23 ++++++------------- app/assets/stylesheets/darkswarm/mixins.sass | 4 ++++ 4 files changed, 16 insertions(+), 29 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/active_table.css.sass b/app/assets/stylesheets/darkswarm/active_table.css.sass index 695ee3039a..36df754b66 100644 --- a/app/assets/stylesheets/darkswarm/active_table.css.sass +++ b/app/assets/stylesheets/darkswarm/active_table.css.sass @@ -44,6 +44,7 @@ .active_table_row // Inherits from active_table border: 1px solid transparent + @include border-radius(0.5em) // Foundation overrides margin-left: 0 @@ -63,14 +64,18 @@ border-right: 1px solid $disabled-bright border-top: 0 border-bottom: 0 + @include border-radius(0) .active_table_row:first-child border-top: 1px solid $disabled-bright + color: $dark-grey + @include border-radius-mixed(0.5em, 0.5em, 0, 0) &:hover, &:active, &:focus // color: $dark-grey .active_table_row:last-child border-bottom: 1px solid $disabled-bright + @include border-radius-mixed(0, 0, 0.5em, 0.5em) //Open row sections @@ -104,7 +109,6 @@ color: $dark-grey &.open .active_table_row:first-child - &, & * color: $dark-grey diff --git a/app/assets/stylesheets/darkswarm/branding.css.sass b/app/assets/stylesheets/darkswarm/branding.css.sass index 68f60dde53..fabb82130f 100644 --- a/app/assets/stylesheets/darkswarm/branding.css.sass +++ b/app/assets/stylesheets/darkswarm/branding.css.sass @@ -1,15 +1,3 @@ -// ORIGINAL -// $clr-brick: #8f301d -// $clr-brick-light: #f5e4e1 -// $clr-brick-ultra-light: #f7f4ef -// $clr-brick-bright: #db583d -// $clr-brick-light-bright: #f4bbb0 - -// $clr-turquoise: #097563 -// $clr-turquoise-light: #cef2ec -// $clr-turquoise-ultra-light: #e6faf7 -// $clr-turquoise-bright: #1d8f7c - $clr-brick: #c1122b $clr-brick-light: #f5e6e7 $clr-brick-ultra-light: #faf5f6 diff --git a/app/assets/stylesheets/darkswarm/hub_node.css.sass b/app/assets/stylesheets/darkswarm/hub_node.css.sass index 0ef4d83672..c4ae2d0082 100644 --- a/app/assets/stylesheets/darkswarm/hub_node.css.sass +++ b/app/assets/stylesheets/darkswarm/hub_node.css.sass @@ -15,7 +15,6 @@ color: $clr-brick-bright //Hub and Producer icons - // i.ofn-i_040-hub i.ofn-i_063-hub, i.ofn-i_064-hub-reversed, i.ofn-i_059-producer, i.ofn-i_060-producer-reversed font-size: 2rem display: inline-block @@ -75,17 +74,6 @@ &:hover, &:active, &:focus border: none color: $disabled-dark - &.open - .active_table_row:first-child - color: $disabled-dark - strong - color: $disabled-dark - &:hover, &:active, &:focus - color: $disabled-dark - strong - color: $disabled-dark - .active_table_row:nth-child(2) - background-color: rgba(255, 255, 255, 0) //Padding second row &.open @@ -96,13 +84,16 @@ &.current //overwrites active_table &.closed, &.open - .active_table_row:first-child - background-color: $clr-brick + .active_table_row:first-child, .active_table_row:last-child + background-color: rgba(245, 230, 231, 0.95) opacity: 1 &:hover, &:focus, &:active opacity: 0.9 - &, & * - color: white + &.closed + a, a * + color: $clr-brick + &:hover, &:active, &:focus + color: $clr-brick-bright &.open, &.closed .active_table_row border-color: $clr-brick diff --git a/app/assets/stylesheets/darkswarm/mixins.sass b/app/assets/stylesheets/darkswarm/mixins.sass index 2da53e9c50..6eef888a17 100644 --- a/app/assets/stylesheets/darkswarm/mixins.sass +++ b/app/assets/stylesheets/darkswarm/mixins.sass @@ -20,6 +20,10 @@ -webkit-border-radius: $border-radius border-radius: $border-radius +@mixin border-radius-mixed($border-radius-TL, $border-radius-TR, $border-radius-BR, $border-radius-BL) + -webkit-border-radius: $border-radius-TL $border-radius-TR $border-radius-BR $border-radius-BL + border-radius: $border-radius-TL $border-radius-TR $border-radius-BR $border-radius-BL + @mixin transform-translate($translate) -ms-transform: $translate -webkit-transform: $translate From 997479f5befac68381c7984db0af9a971a834a89 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 13:05:21 +1000 Subject: [PATCH 02/25] Change label on mobile menu --- app/views/shared/menu/_mobile_menu.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shared/menu/_mobile_menu.html.haml b/app/views/shared/menu/_mobile_menu.html.haml index 6cc81cab9d..b5045c7ed9 100644 --- a/app/views/shared/menu/_mobile_menu.html.haml +++ b/app/views/shared/menu/_mobile_menu.html.haml @@ -17,13 +17,13 @@ %a{"ofn-scroll-to" => "hubs"} %span.nav-primary %i.ofn-i_040-hub - Hubs + Shops - else %li.li-menu %a{href: root_path + "#/#hubs"} %span.nav-primary %i.ofn-i_040-hub - Hubs + Shops %li.li-menu %a{href: main_app.map_path} %span.nav-primary From 16ad465571157a2857c69451b5c7978966b010c3 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 15:40:12 +1000 Subject: [PATCH 03/25] tweak placeholder name --- app/views/home/_hubs.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/_hubs.html.haml b/app/views/home/_hubs.html.haml index e93e312fb7..ede6750b83 100644 --- a/app/views/home/_hubs.html.haml +++ b/app/views/home/_hubs.html.haml @@ -14,7 +14,7 @@ / %i.ofn-i_020-search %input{type: :text, "ng-model" => "query", - placeholder: "Search by Shop or Suburb...", + placeholder: "Search by Name or Suburb...", "ng-debounce" => "150", "ofn-disable-enter" => true} From 71918539b812c78655d8c27ea6b815b461145067 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 15:40:35 +1000 Subject: [PATCH 04/25] Undo changing name Hubs to Shops, for the moment --- app/views/shared/menu/_mobile_menu.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shared/menu/_mobile_menu.html.haml b/app/views/shared/menu/_mobile_menu.html.haml index b5045c7ed9..6cc81cab9d 100644 --- a/app/views/shared/menu/_mobile_menu.html.haml +++ b/app/views/shared/menu/_mobile_menu.html.haml @@ -17,13 +17,13 @@ %a{"ofn-scroll-to" => "hubs"} %span.nav-primary %i.ofn-i_040-hub - Shops + Hubs - else %li.li-menu %a{href: root_path + "#/#hubs"} %span.nav-primary %i.ofn-i_040-hub - Shops + Hubs %li.li-menu %a{href: main_app.map_path} %span.nav-primary From 7d0cf2ace9442138c068a38c69cefe4ebc6f1676 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 15:41:01 +1000 Subject: [PATCH 05/25] Adding rounded corners to producers nodes for active table --- .../stylesheets/darkswarm/producer_node.css.sass | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/producer_node.css.sass b/app/assets/stylesheets/darkswarm/producer_node.css.sass index 25759d30e5..08c9fd87ef 100644 --- a/app/assets/stylesheets/darkswarm/producer_node.css.sass +++ b/app/assets/stylesheets/darkswarm/producer_node.css.sass @@ -1,4 +1,5 @@ @import branding +@import mixins .producers .active_table .active_table_node @@ -7,6 +8,7 @@ @media all and (max-width: 640px) .skinny-head background-color: $clr-turquoise-light + @include border-radius-mixed(0.5em, 0.5em, 0, 0) margin-top: -1rem margin-bottom: 1rem padding-top: 1rem @@ -14,6 +16,7 @@ .follow-icons &, & * font-size: 1.5rem + // Producer icons i.ofn-i_059-producer, i.ofn-i_060-producer-reversed @@ -75,9 +78,12 @@ //Closed row &.closed - &:hover, &:active, &:focus - .active_table_row.closed - border: 1px solid $clr-turquoise + .active_table_row.closed + border: 1px solid transparent + @media all and (max-width: 640px) + border-color: $clr-turquoise-light + &:hover, &:active, &:focus + border-color: $clr-turquoise From de7837aea986f154ef8cb8f21554940aa8188712 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 15:41:28 +1000 Subject: [PATCH 06/25] New greys and translucent colors for global use --- app/assets/stylesheets/darkswarm/branding.css.sass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/darkswarm/branding.css.sass b/app/assets/stylesheets/darkswarm/branding.css.sass index fabb82130f..9fa27dcc96 100644 --- a/app/assets/stylesheets/darkswarm/branding.css.sass +++ b/app/assets/stylesheets/darkswarm/branding.css.sass @@ -1,5 +1,6 @@ $clr-brick: #c1122b $clr-brick-light: #f5e6e7 +$clr-brick-light-trans: rgba(245, 230, 231, 0.9) $clr-brick-ultra-light: #faf5f6 $clr-brick-bright: #eb4c46 $clr-brick-med-bright: #e5a2a0 @@ -10,6 +11,8 @@ $clr-turquoise-light: #ceefe4 $clr-turquoise-ultra-light: #e8f9f4 $clr-turquoise-bright: #23a877 -$disabled-dark: #999 +$disabled-light: #e5e5e5 $disabled-bright: #ccc +$disabled-dark: #999 +$med-grey: #666 $dark-grey: #333 \ No newline at end of file From af064a3fc790fde9fd47ddc4d3f264bf7c990326 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 15:42:08 +1000 Subject: [PATCH 07/25] Adding more spacing for fat view on small devices - vertical spacing for each chunk --- app/assets/stylesheets/darkswarm/active_table.css.sass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/stylesheets/darkswarm/active_table.css.sass b/app/assets/stylesheets/darkswarm/active_table.css.sass index 36df754b66..27b98850b7 100644 --- a/app/assets/stylesheets/darkswarm/active_table.css.sass +++ b/app/assets/stylesheets/darkswarm/active_table.css.sass @@ -81,6 +81,8 @@ //Open row sections .fat > div border-top: 1px solid #aaa + @media all and (max-width: 640px) + margin-top: 1em ul, ol font-size: 0.875rem From 1eef483c445ae379d9ac1875b9fa843210dc844b Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 15:42:37 +1000 Subject: [PATCH 08/25] Hub node styling for different use cases of active / inactive / current / open / closed --- .../stylesheets/darkswarm/hub_node.css.sass | 124 ++++++++++-------- 1 file changed, 72 insertions(+), 52 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/hub_node.css.sass b/app/assets/stylesheets/darkswarm/hub_node.css.sass index c4ae2d0082..7da56435ed 100644 --- a/app/assets/stylesheets/darkswarm/hub_node.css.sass +++ b/app/assets/stylesheets/darkswarm/hub_node.css.sass @@ -11,8 +11,10 @@ overflow-y: visible //Generic text link style - a:hover, a:active, a:focus - color: $clr-brick-bright + a, a * + color: $clr-brick + &:hover, &:active, &:focus + color: $clr-brick-bright //Hub and Producer icons i.ofn-i_063-hub, i.ofn-i_064-hub-reversed, i.ofn-i_059-producer, i.ofn-i_060-producer-reversed @@ -33,72 +35,90 @@ float: left font-weight: 700 - @media all and (max-width: 640px) - &.closed, &.open + //CLOSED row + &.closed + .active_table_row + border: 1px solid transparent + @media all and (max-width: 640px) + border-color: $clr-brick-light + &:hover, &:active, &:focus + border-color: $clr-brick-light-bright + + //OPEN row + &.open + .active_table_row, .active_table_row:first-child, .active_table_row:last-child + border-color: $clr-brick-light-bright + + &.open, &.closed + @media all and (max-width: 640px) .active_table_row:first-child .skinny-head background-color: $clr-brick-light + @include border-radius-mixed(0.5em, 0.5em, 0, 0) margin-top: -1rem margin-bottom: 1rem padding-top: 1rem padding-bottom: 1rem - &.inactive - &.closed, &.open - .active_table_row:first-child .skinny-head - background-color: white - &.current - &.closed, &.open - .active_table_row:first-child .skinny-head - background-color: $clr-brick-bright - &.current - &.inactive - &.closed, &.open - .active_table_row:first-child .skinny-head - background-color: #555 - - //Inactive row - &.inactive, &.inactive strong - color: $disabled-dark - &, & * - color: $disabled-dark - - a i.ofn-i_040-hub - color: $disabled-dark - &.current - &.inactive - &.closed, &.open - .active_table_row:first-child - background-color: $disabled-dark - &, & * - color: white - &.closed - &:hover, &:active, &:focus - border: none - color: $disabled-dark + label + margin-top: 1rem //Padding second row &.open .active_table_row:nth-child(2) padding-bottom: 0.75rem - - //Current selected row + + //CURRENT hub (shows selected hub) &.current //overwrites active_table &.closed, &.open + a, a * + color: $clr-brick + .active_table_row + border-color: $clr-brick .active_table_row:first-child, .active_table_row:last-child - background-color: rgba(245, 230, 231, 0.95) + background-color: $clr-brick-light-trans opacity: 1 &:hover, &:focus, &:active opacity: 0.9 - &.closed - a, a * - color: $clr-brick - &:hover, &:active, &:focus - color: $clr-brick-bright - &.open, &.closed - .active_table_row - border-color: $clr-brick - &.inactive - &.open, &.closed - .active_table_row - border-color: $disabled-dark + border-color: $clr-brick-bright + @media all and (max-width: 640px) + .active_table_row:first-child .skinny-head + background-color: rgba(255,255,255,0.85) + + //INACTIVE - closed hub + &.inactive + &.closed, &.open + &, & * + color: $disabled-dark + &.closed + .active_table_row, .active_table_row:first-child, .active_table_row:last-child + &:hover, &:active, &:focus + border-color: $disabled-bright + &.open + .active_table_row, .active_table_row:first-child, .active_table_row:last-child + border-color: $disabled-bright + // & Current hub + &.closed, &.open + &.current + .active_table_row, .active_table_row:first-child, .active_table_row:last-child + a, a * + color: $med-grey + border-color: $disabled-dark + background-color: rgba(220,220,220,0.5) + &:hover, &:focus, &:active + border-color: $disabled-dark + // Small devices + @media all and (max-width: 640px) + + .active_table_row:first-child .skinny-head + background-color: $disabled-bright + + // Small devices + @media all and (max-width: 640px) + .active_table_row, .active_table_row:first-child, .active_table_row:last-child + border-color: $disabled-bright + background-color: transparent + &:hover, &:focus, &:active + border-color: $disabled-dark + .active_table_row:first-child .skinny-head + background-color: $disabled-light From 24507c6c0aff54a1486094e47bbb8f7a59d947b1 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 16:29:38 +1000 Subject: [PATCH 09/25] turn off Profile filter again until ready to support this --- app/views/shared/components/_filter_controls.html.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/shared/components/_filter_controls.html.haml b/app/views/shared/components/_filter_controls.html.haml index d35727c087..4548085550 100644 --- a/app/views/shared/components/_filter_controls.html.haml +++ b/app/views/shared/components/_filter_controls.html.haml @@ -11,9 +11,9 @@ .small-12.medium-6.columns.text-right .profile-checkbox - / Hide until we're ready to work on this: + / Hide until we're ready to work on this: - / %input{type: "checkbox", name: "profile"}>< - / %label Show profiles - / %button.button.secondary.tiny.help-btn.ng-scope{:popover => "Profiles do not have a shopfront on the Open Food Network, but they may have their own physical or online shop elsewhere", "popover-placement" => "left"}>< - / %i.ofn-i_013-help + / %input{type: "checkbox", name: "profile"}>< + / %label Show profiles + / %button.button.secondary.tiny.help-btn.ng-scope{:popover => "Profiles do not have a shopfront on the Open Food Network, but they may have their own physical or online shop elsewhere", "popover-placement" => "left"}>< + / %i.ofn-i_013-help From a642ad0855bbec429356626e313917f234ca3279 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 17:00:59 +1000 Subject: [PATCH 10/25] More style detail for small view inactive hub small views --- app/assets/stylesheets/darkswarm/hub_node.css.sass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/hub_node.css.sass b/app/assets/stylesheets/darkswarm/hub_node.css.sass index 19d119f1e5..eb539cc0b5 100644 --- a/app/assets/stylesheets/darkswarm/hub_node.css.sass +++ b/app/assets/stylesheets/darkswarm/hub_node.css.sass @@ -94,9 +94,13 @@ border-color: $disabled-bright &.open .active_table_row, .active_table_row:first-child, .active_table_row:last-child - border-color: $disabled-bright - // & Current hub + // border-color: $disabled-bright + &, &:hover, &:active, &:focus + border-color: $disabled-bright + &.closed, &.open + + // & Current hub &.current .active_table_row, .active_table_row:first-child, .active_table_row:last-child a, a * @@ -105,9 +109,9 @@ background-color: rgba(220,220,220,0.5) &:hover, &:focus, &:active border-color: $disabled-dark + // Small devices @media all and (max-width: 640px) - .active_table_row:first-child .skinny-head background-color: $disabled-bright @@ -117,7 +121,8 @@ border-color: $disabled-bright background-color: transparent &:hover, &:focus, &:active - border-color: $disabled-dark + border-color: $disabled-bright + opacity: 0.85 .active_table_row:first-child .skinny-head background-color: $disabled-light From de64a5154bc42e8d6c0d8c419df5f2179bc63a78 Mon Sep 17 00:00:00 2001 From: summerscope Date: Thu, 11 Sep 2014 17:13:07 +1000 Subject: [PATCH 11/25] Fixing markup icon class name was incorrect --- .../templates/price_breakdown_button.html.haml | 2 +- .../stylesheets/darkswarm/_shop-popovers.css.sass | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/templates/price_breakdown_button.html.haml b/app/assets/javascripts/templates/price_breakdown_button.html.haml index 8a86ed2618..e5dbbe7123 100644 --- a/app/assets/javascripts/templates/price_breakdown_button.html.haml +++ b/app/assets/javascripts/templates/price_breakdown_button.html.haml @@ -1,2 +1,2 @@ %button.graph-button{"ng-class" => "{open: tt_isOpen}"} - %i.ofn-i-058-graph + %i.ofn-i_058-graph diff --git a/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass b/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass index 6fa8a72c1b..e1eb2cd448 100644 --- a/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass +++ b/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass @@ -87,10 +87,10 @@ button.graph-button &:hover, &:active, &:focus background-color: rgba(255,255,255,1) - i.ofn-i-058-graph + i.ofn-i_058-graph color: $clr-brick-bright - i.ofn-i-058-graph + i.ofn-i_058-graph color: #999 margin: 0 padding: 0 @@ -98,7 +98,7 @@ button.graph-button @media all and (max-width: 640px) padding: 3px - i.ofn-i-058-graph + i.ofn-i_058-graph font-size: 0.75rem button.graph-button.open @@ -107,10 +107,10 @@ button.graph-button.open &:hover, &:active, &:focus background-color: rgba(255,255,255,1) - i.ofn-i-058-graph + i.ofn-i_058-graph color: $clr-brick-bright - i.ofn-i-058-graph + i.ofn-i_058-graph color: $clr-brick From 6d7fd6dc941a710da862dea47fa806424a0140ef Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 10:48:33 +1000 Subject: [PATCH 12/25] Add in logic to change right hand label if this is the current hub --- app/views/home/_skinny.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/home/_skinny.html.haml b/app/views/home/_skinny.html.haml index 3c5654437c..da9709479b 100644 --- a/app/views/home/_skinny.html.haml +++ b/app/views/home/_skinny.html.haml @@ -15,12 +15,16 @@ .columns.small-6.medium-3.large-4.text-right{"bo-if" => "hub.active"} %a.hub.open_closed{"bo-href" => "hub.path", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-empties-cart" => "hub"} %i.ofn-i_033-open-sign - %span.margin-top {{ hub.orders_close_at | sensible_timeframe }} + %span.margin-top{ bo: { if: "current()" } } + %em Shopping here + %span.margin-top{ bo: { if: "!current()" } } {{ hub.orders_close_at | sensible_timeframe }} .columns.small-6.medium-3.large-4.text-right{"bo-if" => "!hub.active"} %a.hub.open_closed{"bo-href" => "hub.path", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-empties-cart" => "hub"} %i.ofn-i_032-closed-sign - %span.margin-top Orders closed + %span.margin-top{ bo: { if: "current()" } } + %em Shopping here + %span.margin-top{ bo: { if: "!current()" } } Orders closed From 9c33be911c401fb4c055d82c5d0c8b9ecd4eeffe Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 10:49:59 +1000 Subject: [PATCH 13/25] Update placeholder label --- app/views/home/_hubs.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/_hubs.html.haml b/app/views/home/_hubs.html.haml index ede6750b83..ff90a45d48 100644 --- a/app/views/home/_hubs.html.haml +++ b/app/views/home/_hubs.html.haml @@ -14,7 +14,7 @@ / %i.ofn-i_020-search %input{type: :text, "ng-model" => "query", - placeholder: "Search by Name or Suburb...", + placeholder: "Search by name or suburb...", "ng-debounce" => "150", "ofn-disable-enter" => true} From 126e9e82a6553f2e1f56ae39ae527b492d6ccb83 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 10:58:51 +1000 Subject: [PATCH 14/25] Add in blues for use --- app/assets/stylesheets/darkswarm/branding.css.sass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/darkswarm/branding.css.sass b/app/assets/stylesheets/darkswarm/branding.css.sass index 9fa27dcc96..011ef2ff68 100644 --- a/app/assets/stylesheets/darkswarm/branding.css.sass +++ b/app/assets/stylesheets/darkswarm/branding.css.sass @@ -11,8 +11,13 @@ $clr-turquoise-light: #ceefe4 $clr-turquoise-ultra-light: #e8f9f4 $clr-turquoise-bright: #23a877 +$clr-blue: #0096ad +$clr-blue-light: #85d9e5 +$clr-blue-bright: #14b6cc + $disabled-light: #e5e5e5 $disabled-bright: #ccc $disabled-dark: #999 $med-grey: #666 -$dark-grey: #333 \ No newline at end of file +$dark-grey: #333 + From ecacde41dd798e461de4c18d074309b0aec89062 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 11:00:10 +1000 Subject: [PATCH 15/25] Tweaks to big input for small screens --- app/assets/stylesheets/darkswarm/big-input.sass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/big-input.sass b/app/assets/stylesheets/darkswarm/big-input.sass index 20c87d6a6b..15bf937f39 100644 --- a/app/assets/stylesheets/darkswarm/big-input.sass +++ b/app/assets/stylesheets/darkswarm/big-input.sass @@ -9,8 +9,6 @@ @include avenir @include csstrans @include border-radius(0.5rem) - - // transition: all 0.5s ease background: rgba(255,255,255,0.1) border: 2px solid $input font-size: 2rem @@ -21,6 +19,8 @@ margin-bottom: 0.5rem box-shadow: none color: $inputactv + @media all and (max-width: 640px) + font-size: 1.25rem &:hover @include box-shadow(0 1px 1px 0 rgba(255,255,255,0.25)) From 01397b2e49a5000a3d25eaf3531e7c19fe654341 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 11:01:35 +1000 Subject: [PATCH 16/25] Tweaks to filter box --- .../stylesheets/darkswarm/active_table_search.css.sass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/darkswarm/active_table_search.css.sass b/app/assets/stylesheets/darkswarm/active_table_search.css.sass index 417b0d9996..0503e30d0f 100644 --- a/app/assets/stylesheets/darkswarm/active_table_search.css.sass +++ b/app/assets/stylesheets/darkswarm/active_table_search.css.sass @@ -9,7 +9,13 @@ margin-right: 0 .row.filter-box:first-child - // border-top: 1px solid $clr-brick + border: 1px solid $clr-blue-light + @include border-radius(0.25em) + margin-top: 2px + +.row.filter-box:last-child + background: transparent + margin-top: 1em products .filter-box background: #f7f7f7 @@ -20,6 +26,8 @@ products .filter-box .tdhead padding: 0.25rem 0.5rem margin-top: 0.9rem + color: $clr-blue + border-bottom: 1px solid $clr-blue-light // OVERRIDES [class*="block-grid-"] From bfa71942fe8a29c36e76ee44cd336d8dfdc0cf04 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 11:02:28 +1000 Subject: [PATCH 17/25] Tweaks to input placeholder label --- app/views/producers/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/producers/index.html.haml b/app/views/producers/index.html.haml index b8645f936a..76dc60a7e6 100644 --- a/app/views/producers/index.html.haml +++ b/app/views/producers/index.html.haml @@ -13,7 +13,7 @@ .small-12.columns %input.animate-show{type: :text, "ng-model" => "query", - placeholder: "Search by Producer or Suburb...", + placeholder: "Search by producer or suburb...", "ng-debounce" => "150", "ofn-disable-enter" => true} From 1c5a495d5cc7d31a0ac148477a78856c3c8a42fb Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 11:29:41 +1000 Subject: [PATCH 18/25] Making icons smaller, adding a bit of background shadow to pop them out --- app/assets/images/map_001-producer-only.svg | 84 +++++++++--------- .../images/map_002-producer-only-profile.svg | 88 ++++++++++--------- app/assets/images/map_003-producer-shop.svg | 84 +++++++++--------- .../images/map_004-producer-shop-profile.svg | 88 ++++++++++--------- app/assets/images/map_005-hub.svg | 51 ++++++----- app/assets/images/map_006-hub-profile.svg | 53 +++++------ app/assets/images/map_007-shop.svg | 53 ++++++----- app/assets/images/map_008-shop-profile.svg | 79 +++++++++-------- 8 files changed, 307 insertions(+), 273 deletions(-) diff --git a/app/assets/images/map_001-producer-only.svg b/app/assets/images/map_001-producer-only.svg index b34c01f1ed..423442a68f 100644 --- a/app/assets/images/map_001-producer-only.svg +++ b/app/assets/images/map_001-producer-only.svg @@ -11,53 +11,57 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - + - - - - - - + + + + + + + + + diff --git a/app/assets/images/map_002-producer-only-profile.svg b/app/assets/images/map_002-producer-only-profile.svg index 0522f91257..f84834f6c6 100644 --- a/app/assets/images/map_002-producer-only-profile.svg +++ b/app/assets/images/map_002-producer-only-profile.svg @@ -11,55 +11,59 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - + - - - - - + + + + + + + + diff --git a/app/assets/images/map_003-producer-shop.svg b/app/assets/images/map_003-producer-shop.svg index 84c324ac4e..82ca2ce55c 100644 --- a/app/assets/images/map_003-producer-shop.svg +++ b/app/assets/images/map_003-producer-shop.svg @@ -11,53 +11,57 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - + - - - - - - + + + + + + + + + diff --git a/app/assets/images/map_004-producer-shop-profile.svg b/app/assets/images/map_004-producer-shop-profile.svg index 4d35236813..06316e61a3 100644 --- a/app/assets/images/map_004-producer-shop-profile.svg +++ b/app/assets/images/map_004-producer-shop-profile.svg @@ -11,55 +11,59 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - + - - - - - + + + + + + + + diff --git a/app/assets/images/map_005-hub.svg b/app/assets/images/map_005-hub.svg index be2d292c20..13c0b99779 100644 --- a/app/assets/images/map_005-hub.svg +++ b/app/assets/images/map_005-hub.svg @@ -11,36 +11,41 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - + - - - - + + + + + + + diff --git a/app/assets/images/map_006-hub-profile.svg b/app/assets/images/map_006-hub-profile.svg index b284ea34f3..57347a38e3 100644 --- a/app/assets/images/map_006-hub-profile.svg +++ b/app/assets/images/map_006-hub-profile.svg @@ -11,38 +11,41 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - + - - - + + + + + + diff --git a/app/assets/images/map_007-shop.svg b/app/assets/images/map_007-shop.svg index e2ebe118ce..5007c75e5f 100644 --- a/app/assets/images/map_007-shop.svg +++ b/app/assets/images/map_007-shop.svg @@ -11,37 +11,42 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - + - - - + + + + + + diff --git a/app/assets/images/map_008-shop-profile.svg b/app/assets/images/map_008-shop-profile.svg index 635602b7bf..cab4e2e01f 100644 --- a/app/assets/images/map_008-shop-profile.svg +++ b/app/assets/images/map_008-shop-profile.svg @@ -11,56 +11,61 @@ ]> + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px" + viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve"> - + - - + - - - - - - + + - + - + - - - - + + + + + + + + + + + + From a28eaba31a2c6355b51914e7da57eca5c8e73b6d Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 11:45:13 +1000 Subject: [PATCH 19/25] Turn off price graph pop overs for small devices --- app/assets/stylesheets/darkswarm/_shop-popovers.css.sass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass b/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass index e1eb2cd448..feb6529fa2 100644 --- a/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass +++ b/app/assets/stylesheets/darkswarm/_shop-popovers.css.sass @@ -84,6 +84,9 @@ button.graph-button display: inline background-color: rgba(255,255,255,0.5) padding: 5px + @media all and (max-width: 768px) + display: none + // Hide for small &:hover, &:active, &:focus background-color: rgba(255,255,255,1) From 0dd33e6635604e80598ec9662417852d71f18d10 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 13:40:00 +1000 Subject: [PATCH 20/25] Modal styling updates ated trying to fix mobile scrolling issue. getting there. --- .../stylesheets/darkswarm/modals.css.sass | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/modals.css.sass b/app/assets/stylesheets/darkswarm/modals.css.sass index 0681dd73b4..0d33841286 100644 --- a/app/assets/stylesheets/darkswarm/modals.css.sass +++ b/app/assets/stylesheets/darkswarm/modals.css.sass @@ -6,25 +6,21 @@ dialog, .reveal-modal outline: none padding: 1rem overflow-y: scroll - - // Sets up max heights based on device height - @media all and (min-height: 1025px) + + // Reveal.js + // @media only screen and (max-width: 40.063em) + + @media only screen and (max-width: 640px) + max-height: auto + position: absolute !important + top: 0 + left: 0 + + // Medium and up - when modal is NOT full screen + @media only screen and (min-width: 641px) + top: 10% max-height: 80% - @media all and (min-height: 700px) and (max-height: 1024px) - max-height: 70% - - @media all and (min-height: 600px) and (max-height: 699px) - max-height: 60% - - @media all and (min-height: 481px) and (max-height: 599px) - max-height: 60% - - @media only screen and (max-height: 480px) and (min-width: 641px) - max-height: 60% - - @media all and (max-height: 480px) - overflow-y: scroll .reveal-modal-bg From 3cff83b7a5c6af03dfd3db8e533a2c5849aa0729 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 14:42:58 +1000 Subject: [PATCH 21/25] Kill the outside modal close button styling once and for all --- .../templates/partials/close.html.haml | 2 +- .../stylesheets/darkswarm/modals.css.sass | 33 ++----------------- app/views/modals/_producer.html.haml | 2 +- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/app/assets/javascripts/templates/partials/close.html.haml b/app/assets/javascripts/templates/partials/close.html.haml index 1facd8edeb..a02ae410a8 100644 --- a/app/assets/javascripts/templates/partials/close.html.haml +++ b/app/assets/javascripts/templates/partials/close.html.haml @@ -1,2 +1,2 @@ -%a.close-reveal-modal.outside{"ng-click" => "$close()"} +%a.close-reveal-modal{"ng-click" => "$close()"} %i.ofn-i_009-close diff --git a/app/assets/stylesheets/darkswarm/modals.css.sass b/app/assets/stylesheets/darkswarm/modals.css.sass index 0d33841286..c9c3d4e8c8 100644 --- a/app/assets/stylesheets/darkswarm/modals.css.sass +++ b/app/assets/stylesheets/darkswarm/modals.css.sass @@ -7,16 +7,17 @@ dialog, .reveal-modal padding: 1rem overflow-y: scroll - // Reveal.js + // Reveal.js break point: // @media only screen and (max-width: 40.063em) + // Small - when modal IS full screen @media only screen and (max-width: 640px) max-height: auto position: absolute !important top: 0 left: 0 - // Medium and up - when modal is NOT full screen + // Medium and up - when modal IS NOT full screen @media only screen and (min-width: 641px) top: 10% max-height: 80% @@ -35,31 +36,3 @@ dialog .close-reveal-modal, .reveal-modal .close-reveal-modal &:hover, &:active, &:focus background-color: rgba(235,235,235,1) color: #333 - -// dialog .close-reveal-modal.outside, .reveal-modal .close-reveal-modal.outside -// top: -2.5rem -// right: -2.5rem -// font-size: 2rem -// color: white -// text-shadow: none -// padding: 0.25rem -// @include border-radius(999999) -// border: 1px solid transparent -// &:hover, &:active, &:focus -// text-shadow: 0 1px 3px #333 -// border: 1px solid white - -// @media all and (max-width: 640px) -// top: 0.5rem -// right: 0.5rem -// font-size: 2rem -// color: white -// text-shadow: none -// padding: 0.25rem -// background-color: rgba(150,150,150,0.85) -// @include border-radius(999999) -// border: 1px solid transparent -// &:hover, &:active, &:focus -// text-shadow: 0 1px 3px #333 -// border: 1px solid white - diff --git a/app/views/modals/_producer.html.haml b/app/views/modals/_producer.html.haml index 5d2d342f6d..51a45cfe5f 100644 --- a/app/views/modals/_producer.html.haml +++ b/app/views/modals/_producer.html.haml @@ -50,7 +50,7 @@ %a{"ng-href" => "http://instagram.com/{{enterprise.instagram}}", target: "_blank"} %i.ofn-i_043-instagram - %a.close-reveal-modal.outside{"ng-click" => "$close()"} + %a.close-reveal-modal{"ng-click" => "$close()"} %i.ofn-i_009-close From dbefd43f07c6a0dc6f0da6ad1d79e7f8f5acb6e4 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 12 Sep 2014 15:33:02 +1000 Subject: [PATCH 22/25] Add commented-out scrolling code. Return false from click handlers. --- .../javascripts/darkswarm/directives/hub_modal.js.coffee | 4 +++- app/assets/javascripts/darkswarm/directives/modal.js.coffee | 4 +++- .../darkswarm/directives/producer_modal.js.coffee | 5 +++-- .../javascripts/darkswarm/services/map_modal.js.coffee | 5 ++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee b/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee index 6eb0299ab4..8e42d0c835 100644 --- a/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.directive "hubModal", ($modal)-> +Darkswarm.directive "hubModal", ($modal, $document)-> restrict: 'E' replace: true template: "{{enterprise.name}}" @@ -6,3 +6,5 @@ Darkswarm.directive "hubModal", ($modal)-> elem.on "click", (ev)=> ev.stopPropagation() scope.modalInstance = $modal.open(controller: ctrl, templateUrl: 'hub_modal.html', scope: scope) + #$document.scrollTo 0, 0 + false diff --git a/app/assets/javascripts/darkswarm/directives/modal.js.coffee b/app/assets/javascripts/darkswarm/directives/modal.js.coffee index 7c1babe215..f45388cca3 100644 --- a/app/assets/javascripts/darkswarm/directives/modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.directive "ofnModal", ($modal)-> +Darkswarm.directive "ofnModal", ($modal, $document)-> # Generic modal! Uses transclusion so designer-types can do stuff like: # %ofn-modal # CONTENT @@ -17,3 +17,5 @@ Darkswarm.directive "ofnModal", ($modal)-> elem.on "click", => transclude scope, (clone)-> scope.modalInstance = $modal.open(controller: ctrl, template: clone, scope: scope) + #$document.scrollTo 0, 0 + false diff --git a/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee b/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee index af2b13f157..d30a807655 100644 --- a/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.directive "producerModal", ($modal)-> +Darkswarm.directive "producerModal", ($modal, $document)-> restrict: 'E' replace: true template: "" @@ -7,4 +7,5 @@ Darkswarm.directive "producerModal", ($modal)-> elem.on "click", (ev)=> ev.stopPropagation() scope.modalInstance = $modal.open(controller: ctrl, templateUrl: 'producer_modal.html', scope: scope) - + #$document.scrollTo 0, 0 + false diff --git a/app/assets/javascripts/darkswarm/services/map_modal.js.coffee b/app/assets/javascripts/darkswarm/services/map_modal.js.coffee index c9ed30f558..30e9563d7e 100644 --- a/app/assets/javascripts/darkswarm/services/map_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/services/map_modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.factory "MapModal", ($modal, $rootScope)-> +Darkswarm.factory "MapModal", ($modal, $rootScope, $document)-> new class MapModal open: (enterprise)-> scope = $rootScope.$new(true) # Spawn an isolate to contain the enterprise @@ -7,6 +7,9 @@ Darkswarm.factory "MapModal", ($modal, $rootScope)-> if enterprise.is_distributor scope.hub = enterprise $modal.open(templateUrl: "hub_modal.html", scope: scope) + #$document.scrollTo 0, 0 + else scope.producer = enterprise $modal.open(templateUrl: "map_modal_producer.html", scope: scope) + #$document.scrollTo 0, 0 From c365047d0cfe3f551cd16ebe6743f73c1a98c0b4 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 15:40:12 +1000 Subject: [PATCH 23/25] Short description goes back in producer fat view until we can clean up the HTML formatting --- app/views/producers/_fat.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/producers/_fat.html.haml b/app/views/producers/_fat.html.haml index a8512c9a22..f420b33386 100644 --- a/app/views/producers/_fat.html.haml +++ b/app/views/producers/_fat.html.haml @@ -1,13 +1,13 @@ .row.active_table_row{"ng-show" => "open()", "ng-click" => "toggle()", "ng-class" => "{'open' : !ofn-i_032-closed-sign()}"} .columns.small-12.medium-7.large-7.fat - / No long description available because it spits out HTML formatting producer.long_description - %div{"bo-if" => "producer.long_description"} + / Will add in long description available once clean up HTML formatting producer.long_description + %div{"bo-if" => "producer.description"} %label About us %img.right.show-for-medium-up{src: "{{ producer.logo }}" } %p.text-small - {{ producer.long_description }} - %div.show-for-medium-up{"bo-if" => "producer.long_description.length==0"} + {{ producer.description }} + %div.show-for-medium-up{"bo-if" => "producer.description.length==0"} %label   .columns.small-12.medium-5.large-5.fat From 799bfae6e4751d441393b917540eb122805b249f Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 15:51:20 +1000 Subject: [PATCH 24/25] Revert "Add commented-out scrolling code. Return false from click handlers." This reverts commit dbefd43f07c6a0dc6f0da6ad1d79e7f8f5acb6e4. --- .../javascripts/darkswarm/directives/hub_modal.js.coffee | 4 +--- app/assets/javascripts/darkswarm/directives/modal.js.coffee | 4 +--- .../darkswarm/directives/producer_modal.js.coffee | 5 ++--- .../javascripts/darkswarm/services/map_modal.js.coffee | 5 +---- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee b/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee index 8e42d0c835..6eb0299ab4 100644 --- a/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/hub_modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.directive "hubModal", ($modal, $document)-> +Darkswarm.directive "hubModal", ($modal)-> restrict: 'E' replace: true template: "{{enterprise.name}}" @@ -6,5 +6,3 @@ Darkswarm.directive "hubModal", ($modal, $document)-> elem.on "click", (ev)=> ev.stopPropagation() scope.modalInstance = $modal.open(controller: ctrl, templateUrl: 'hub_modal.html', scope: scope) - #$document.scrollTo 0, 0 - false diff --git a/app/assets/javascripts/darkswarm/directives/modal.js.coffee b/app/assets/javascripts/darkswarm/directives/modal.js.coffee index f45388cca3..7c1babe215 100644 --- a/app/assets/javascripts/darkswarm/directives/modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.directive "ofnModal", ($modal, $document)-> +Darkswarm.directive "ofnModal", ($modal)-> # Generic modal! Uses transclusion so designer-types can do stuff like: # %ofn-modal # CONTENT @@ -17,5 +17,3 @@ Darkswarm.directive "ofnModal", ($modal, $document)-> elem.on "click", => transclude scope, (clone)-> scope.modalInstance = $modal.open(controller: ctrl, template: clone, scope: scope) - #$document.scrollTo 0, 0 - false diff --git a/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee b/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee index d30a807655..af2b13f157 100644 --- a/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.directive "producerModal", ($modal, $document)-> +Darkswarm.directive "producerModal", ($modal)-> restrict: 'E' replace: true template: "" @@ -7,5 +7,4 @@ Darkswarm.directive "producerModal", ($modal, $document)-> elem.on "click", (ev)=> ev.stopPropagation() scope.modalInstance = $modal.open(controller: ctrl, templateUrl: 'producer_modal.html', scope: scope) - #$document.scrollTo 0, 0 - false + diff --git a/app/assets/javascripts/darkswarm/services/map_modal.js.coffee b/app/assets/javascripts/darkswarm/services/map_modal.js.coffee index 30e9563d7e..c9ed30f558 100644 --- a/app/assets/javascripts/darkswarm/services/map_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/services/map_modal.js.coffee @@ -1,4 +1,4 @@ -Darkswarm.factory "MapModal", ($modal, $rootScope, $document)-> +Darkswarm.factory "MapModal", ($modal, $rootScope)-> new class MapModal open: (enterprise)-> scope = $rootScope.$new(true) # Spawn an isolate to contain the enterprise @@ -7,9 +7,6 @@ Darkswarm.factory "MapModal", ($modal, $rootScope, $document)-> if enterprise.is_distributor scope.hub = enterprise $modal.open(templateUrl: "hub_modal.html", scope: scope) - #$document.scrollTo 0, 0 - else scope.producer = enterprise $modal.open(templateUrl: "map_modal_producer.html", scope: scope) - #$document.scrollTo 0, 0 From cc9d2ebbacf333ad261783967adb8199c22aee46 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 12 Sep 2014 16:01:25 +1000 Subject: [PATCH 25/25] Modal styling fixes for scrolling on mobile view --- app/assets/stylesheets/darkswarm/modals.css.sass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/darkswarm/modals.css.sass b/app/assets/stylesheets/darkswarm/modals.css.sass index 5e6c06dcfd..e6303a4cd7 100644 --- a/app/assets/stylesheets/darkswarm/modals.css.sass +++ b/app/assets/stylesheets/darkswarm/modals.css.sass @@ -12,7 +12,9 @@ dialog, .reveal-modal // Small - when modal IS full screen @media only screen and (max-width: 640px) - max-height: auto + max-height: initial + // This is needed to make the height not the height of whole content page + min-height: 100% position: absolute !important top: 0 left: 0