Tidying up tabs

This commit is contained in:
Will Marshall
2014-03-27 16:36:12 +11:00
parent 08c25b1604
commit 89fcf50762

View File

@@ -1,6 +1,6 @@
Darkswarm.controller "TabsCtrl", ($scope, $rootScope, $location, OrderCycle) ->
$scope.active = (path)->
if !OrderCycle.selected() and $location.hash() == "" and path == "/about"
if !OrderCycle.selected() and $location.hash() == "" and path == "about"
true
else
$location.hash() == path
@@ -9,10 +9,10 @@ Darkswarm.controller "TabsCtrl", ($scope, $rootScope, $location, OrderCycle) ->
$scope.tabs = ["contact", "about", "groups", "producers"]
for tab in $scope.tabs
$scope[tab] =
path: "/" + tab
path: tab
$scope.select = (tab)->
if $scope.active(tab.path)
$location.hash "/"
$location.hash ""
else
$location.hash tab.path