Issue #540 Fix up hub list navigation

This commit is contained in:
Rick Giner
2015-05-10 18:13:30 +10:00
parent 98c1a95bd1
commit b7c1a43125
3 changed files with 21 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, Navigation, $location, $templateCache, CurrentHub) ->
$scope.toggle = ->
HashNavigation.toggle $scope.hub.hash
$scope.toggle = (e) ->
HashNavigation.toggle $scope.hub.hash if !angular.element(e.target).inheritedData('is-link')
$scope.open = ->
HashNavigation.active $scope.hub.hash

View File

@@ -30,9 +30,18 @@
float: right
margin-left: 0.5rem
//Hub Link
@media all and (max-width: 640px)
a.hub
display: block
//Hub Name
span.hub-name-listing
font-weight: 700
&:after
content: ">>"
display: inline-block
margin-left: 5px
//CLOSED row
&.closed

View File

@@ -1,7 +1,7 @@
.row.active_table_row{"ng-if" => "hub.is_distributor", "ng-click" => "toggle()", "ng-class" => "{'closed' : !open(), 'is_distributor' : producer.is_distributor}", bindonce: true}
.row.active_table_row{"ng-if" => "hub.is_distributor", "ng-click" => "toggle($event)", "ng-class" => "{'closed' : !open(), 'is_distributor' : producer.is_distributor}", bindonce: true}
.columns.small-12.medium-6.large-5.skinny-head
%a.hub{"bo-href" => "hub.path", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-empties-cart" => "hub"}
.columns.small-12.medium-5.large-5.skinny-head
%a.hub{"bo-href" => "hub.path", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-empties-cart" => "hub", "data-is-link" => "true"}
%i{bo: {class: "hub.icon_font"}}
%span.margin-top.hub-name-listing{"bo-bind" => "hub.name | truncate:40"}
@@ -10,7 +10,7 @@
.columns.small-2.medium-1.large-1
%span.margin-top{"bo-bind" => "hub.address.state_name | uppercase"}
.columns.small-6.medium-3.large-4.text-right{"bo-if" => "hub.active"}
.columns.small-4.medium-3.large-3.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{ bo: { if: "current()" } }
@@ -18,13 +18,17 @@
%span.margin-top{ bo: { if: "!current()" } }
%span{"bo-bind" => "hub.orders_close_at | sensible_timeframe"}
.columns.small-6.medium-3.large-4.text-right{"bo-if" => "!hub.active"}
.columns.small-4.medium-3.large-3.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{ bo: { if: "current()" } }
%em Shopping here
%span.margin-top{ bo: { if: "!current()" } } Orders closed
.columns.small-2.medium-1.large-1.text-right
%span.margin-top
%i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"}
.row.active_table_row{"ng-if" => "!hub.is_distributor", "ng-class" => "closed"}
.columns.small-12.medium-6.large-5.skinny-head
%a.hub{"ng-click" => "openModal(hub)", "ng-class" => "{primary: hub.active, secondary: !hub.active}"}
@@ -39,3 +43,4 @@
.columns.small-6.medium-3.large-4.text-right
%span.margin-top{ bo: { if: "!current()" } }
%em Profile only