Making sure that hash navigation works with auth tabs

This commit is contained in:
Rob Harrington
2016-05-13 15:05:58 +10:00
parent 4b8146dd00
commit 92d8ee1a36
7 changed files with 8 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
Darkswarm.controller "ForgotCtrl", ($scope, $http, $location, AuthenticationService) ->
$scope.path = "/forgot"
$scope.active = $scope.isActive($scope.path)
$scope.sent = false
$scope.submit = ->

View File

@@ -1,6 +1,5 @@
Darkswarm.controller "LoginCtrl", ($scope, $http, $window, AuthenticationService, Redirections, Loading) ->
$scope.path = "/login"
$scope.active = $scope.isActive($scope.path)
$scope.submit = ->
Loading.message = t 'logging_in'

View File

@@ -1,6 +1,5 @@
Darkswarm.controller "SignupCtrl", ($scope, $http, $window, $location, Redirections, AuthenticationService) ->
$scope.path = "/signup"
$scope.active = $scope.isActive($scope.path)
$scope.errors =
email: null

View File

@@ -5,3 +5,8 @@ Darkswarm.controller "AuthenticationCtrl", ($scope, AuthenticationService, Spree
$scope.spree_user = SpreeUser.spree_user
$scope.isActive = AuthenticationService.isActive
$scope.select = AuthenticationService.select
$scope.tabs =
login: { active: $scope.isActive('/login') }
signup: { active: $scope.isActive('/signup') }
forgot: { active: $scope.isActive('/forgot') }

View File

@@ -1,4 +1,4 @@
%tab#forgot{ heading: "{{'forgot_password' | t}}", active: "active", select: "select(path)"}
%tab#forgot{ heading: "{{'forgot_password' | t}}", active: "tabs.forgot.active", select: "select(path)"}
%form{ ng: { controller: "ForgotCtrl", submit: "submit()" } }
.row
.large-12.columns

View File

@@ -1,4 +1,4 @@
%tab#login-content{ heading: "{{'label_login' | t}}", active: "active", select: "select(path)"}
%tab#login-content{ heading: "{{'label_login' | t}}", active: "tabs.login.active", select: "select(path)"}
%form{ ng: { controller: "LoginCtrl", submit: "submit()" } }
.row
.large-12.columns

View File

@@ -1,4 +1,4 @@
%tab#sign-up-content{ heading: "{{'label_signup' | t}}", active: 'active', select: "select(path)"}
%tab#sign-up-content{ heading: "{{'label_signup' | t}}", active: 'tabs.signup.active', select: "select(path)"}
%form{ ng: { controller: "SignupCtrl", submit: "submit()" } }
.row
.large-12.columns