mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-10 03:30:22 +00:00
Manually bringing over the login links for checkout
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
#= require spin
|
||||
#
|
||||
#= require angular
|
||||
#= require angular-cookies
|
||||
#= require angular-resource
|
||||
#= require ../shared/mm-foundation-tpls-0.2.0-SNAPSHOT
|
||||
#= require ../shared/angular-local-storage.js
|
||||
#
|
||||
#= require ../shared/jquery.timeago
|
||||
#= require foundation
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Darkswarm.controller "CheckoutCtrl", ($scope, $rootScope, order) ->
|
||||
Darkswarm.controller "CheckoutCtrl", ($scope, $rootScope, order, $location, $anchorScroll) ->
|
||||
$scope.require_ship_address = false
|
||||
$scope.order = order
|
||||
$scope.userOpen = true
|
||||
|
||||
$scope.initialize = ->
|
||||
# Our shipping_methods comes through as a hash like so: {id: requires_shipping_address}
|
||||
@@ -25,5 +26,10 @@ Darkswarm.controller "CheckoutCtrl", ($scope, $rootScope, order) ->
|
||||
event.preventDefault()
|
||||
checkout.submit()
|
||||
|
||||
$scope.scrollTo = (name)->
|
||||
$location.hash(name);
|
||||
$anchorScroll();
|
||||
$scope.userOpen = false
|
||||
|
||||
$scope.initialize()
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
window.MenuCtrl = Darkswarm.controller "MenuCtrl", ($scope, Navigation) ->
|
||||
|
||||
$scope.toggleLogin = ->
|
||||
Navigation.navigate "/login"
|
||||
|
||||
$scope.toggleSignup = ->
|
||||
Navigation.navigate "/signup"
|
||||
|
||||
$scope.toggleSignup = ->
|
||||
Navigation.navigate "/signup"
|
||||
|
||||
$scope.toggle = (path = null)->
|
||||
Navigation.navigate(path)
|
||||
@@ -1,5 +1,6 @@
|
||||
window.Darkswarm = angular.module("Darkswarm", ["ngResource", "filters", 'mm.foundation']).config ($httpProvider, $tooltipProvider) ->
|
||||
window.Darkswarm = angular.module("Darkswarm", ["ngResource", "filters", 'mm.foundation', 'angularLocalStorage']).config ($httpProvider, $tooltipProvider) ->
|
||||
$httpProvider.defaults.headers.post['X-CSRF-Token'] = $('meta[name="csrf-token"]').attr('content')
|
||||
$httpProvider.defaults.headers.put['X-CSRF-Token'] = $('meta[name="csrf-token"]').attr('content')
|
||||
$httpProvider.defaults.headers['common']['X-Requested-With'] = 'XMLHttpRequest'
|
||||
$httpProvider.defaults.headers.common.Accept = "application/json, text/javascript, */*"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user