mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-30 06:31:16 +00:00
Minor JS tweaks
This commit is contained in:
@@ -9,7 +9,6 @@ window.AccountSidebarCtrl = Darkswarm.controller "AccountSidebarCtrl", ($scope,
|
||||
Navigation.navigate($scope.path)
|
||||
|
||||
$scope.emptyCart = (href, ev)->
|
||||
console.log href
|
||||
if $(ev.delegateTarget).hasClass "empties-cart"
|
||||
location.href = href if confirm "Changing your Hub will clear your cart."
|
||||
else
|
||||
|
||||
@@ -2,7 +2,6 @@ Darkswarm.directive "ofnFocus", ->
|
||||
restrict: "A"
|
||||
link: (scope, element, attrs) ->
|
||||
scope.$watch attrs.ofnFocus, ((focus) ->
|
||||
console.log focus
|
||||
focus and element.focus()
|
||||
return
|
||||
), true
|
||||
|
||||
@@ -5,7 +5,7 @@ Darkswarm.factory 'Order', ($resource, Product, order, $http, CheckoutFormState)
|
||||
constructor: ->
|
||||
@order = order
|
||||
# Default to first shipping method if none selected
|
||||
#@order.shipping_method_id ||= parseInt(Object.keys(@order.shipping_methods)[0])
|
||||
@order.shipping_method_id ||= parseInt(Object.keys(@order.shipping_methods)[0])
|
||||
|
||||
navigate: (path)->
|
||||
window.location.pathname = path
|
||||
|
||||
Reference in New Issue
Block a user