Minor JS tweaks

This commit is contained in:
Will Marshall
2014-04-17 11:47:59 +10:00
parent f2a048bf6e
commit 3b440ed027
3 changed files with 1 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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