mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Merge branch 'master' into bom
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
window.ForgotSidebarCtrl = Darkswarm.controller "ForgotSidebarCtrl", ($scope, $http, $location) ->
|
||||
$scope.spree_user = {
|
||||
email: null
|
||||
}
|
||||
window.ForgotSidebarCtrl = Darkswarm.controller "ForgotSidebarCtrl", ($scope, $http, $location, SpreeUser) ->
|
||||
$scope.spree_user = SpreeUser.spree_user
|
||||
$scope.sent = false
|
||||
|
||||
$scope.active = ->
|
||||
$location.path() == '/forgot'
|
||||
@@ -12,9 +11,7 @@ window.ForgotSidebarCtrl = Darkswarm.controller "ForgotSidebarCtrl", ($scope, $h
|
||||
$scope.submit = ->
|
||||
if $scope.spree_user.email != null
|
||||
$http.post("/user/spree_user/password", {spree_user: $scope.spree_user}).success (data)->
|
||||
|
||||
$location.path("/reset")
|
||||
|
||||
$scope.sent = true
|
||||
.error (data) ->
|
||||
$scope.errors = "Email address not found"
|
||||
else
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
window.LoginSidebarCtrl = Darkswarm.controller "LoginSidebarCtrl", ($scope, $http, $location) ->
|
||||
$scope.spree_user = {
|
||||
remember_me: 0
|
||||
}
|
||||
window.LoginSidebarCtrl = Darkswarm.controller "LoginSidebarCtrl", ($scope, $http, $location, SpreeUser) ->
|
||||
$scope.spree_user = SpreeUser.spree_user
|
||||
|
||||
$scope.active = ->
|
||||
$location.path() == '/login'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
window.SignupSidebarCtrl = Darkswarm.controller "SignupSidebarCtrl", ($scope, $http, $location) ->
|
||||
$scope.spree_user = {}
|
||||
window.SignupSidebarCtrl = Darkswarm.controller "SignupSidebarCtrl", ($scope, $http, $location, SpreeUser) ->
|
||||
$scope.spree_user = SpreeUser.spree_user
|
||||
$scope.errors =
|
||||
email: null
|
||||
password: null
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Darkswarm.factory 'SpreeUser', ($resource) ->
|
||||
new class SpreeUser
|
||||
spree_user: {
|
||||
remember_me: 0
|
||||
email: null
|
||||
}
|
||||
Reference in New Issue
Block a user