mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-14 04:04:23 +00:00
Reworking the JS specs
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -12,5 +12,3 @@ Darkswarm.controller "ProductsCtrl", ($scope, $rootScope, Product, OrderCycle) -
|
||||
code = e.keyCode || e.which
|
||||
if code == 13
|
||||
e.preventDefault()
|
||||
|
||||
$scope.productPrice = (product) ->
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user