Reworking the JS specs

This commit is contained in:
Will Marshall
2014-05-21 16:54:48 +10:00
parent 67e72f4504
commit f997026796
8 changed files with 50 additions and 59 deletions

View File

@@ -1,4 +1,5 @@
Darkswarm.controller "ProductNodeCtrl", ($scope) ->
$scope.price = ->
if $scope.product.variants.length > 0
prices = (v.price for v in $scope.product.variants)

View File

@@ -12,5 +12,3 @@ Darkswarm.controller "ProductsCtrl", ($scope, $rootScope, Product, OrderCycle) -
code = e.keyCode || e.which
if code == 13
e.preventDefault()
$scope.productPrice = (product) ->

View File

@@ -2,6 +2,9 @@ Darkswarm.factory 'Product', ($resource) ->
new class Product
constructor: ->
@update()
# TODO: don't need to scope this into object
# Already on object as far as controller scope is concerned
data:
products: null
loading: true