Merge pull request #4735 from mkllnk/4729-init-taxon-dropdown

Activate Foundation's dropdowns after tab switch
This commit is contained in:
Kristina Lim
2020-01-30 19:00:30 +08:00
committed by GitHub

View File

@@ -29,11 +29,17 @@ Darkswarm.controller "ProductsCtrl", ($scope, $filter, $rootScope, Products, Ord
data.map( (taxon) ->
$scope.supplied_taxons[taxon.id] = Taxons.taxons_by_id[taxon.id]
)
# Some taxons may be displayed in a dropdown.
# Foundation needs initialising again to add dropdown actions.
Foundation.init()
OrderCycleResource.properties params, (data)=>
$scope.supplied_properties = {}
data.map( (property) ->
$scope.supplied_properties[property.id] = Properties.properties_by_id[property.id]
)
# Some properties may be displayed in a dropdown.
# Foundation needs initialising again to add dropdown actions.
Foundation.init()
$scope.loadMore = ->
if ($scope.page * $scope.per_page) <= Products.products.length