mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-07 07:36:58 +00:00
Fixing a minor regression
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
Darkswarm.controller "ProductsCtrl", ($scope, $rootScope, Product, OrderCycle) ->
|
||||
$scope.products = Product.products
|
||||
$scope.loading = Product.loading
|
||||
$scope.Product = Product
|
||||
$scope.limit = 3
|
||||
$scope.ordering = {order: "name"}
|
||||
$scope.order_cycle = OrderCycle.order_cycle
|
||||
|
||||
$scope.incrementLimit = ->
|
||||
if $scope.limit < $scope.products.length
|
||||
if $scope.limit < $scope.Product.products.length
|
||||
$scope.limit = $scope.limit + 1
|
||||
|
||||
$scope.searchKeypress = (e)->
|
||||
|
||||
@@ -9,6 +9,7 @@ Darkswarm.factory 'Product', ($resource) ->
|
||||
loading: true
|
||||
|
||||
update: =>
|
||||
@loading = true
|
||||
@products = $resource("/shop/products").query =>
|
||||
@loading = false
|
||||
@
|
||||
|
||||
Reference in New Issue
Block a user