mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Switch Taxons input over to category selection on BPE, clean up interface
This commit is contained in:
@@ -4,10 +4,10 @@ angular.module("ofn.admin").directive "ofnTaxonAutocomplete", (Taxons) ->
|
||||
link: (scope,element,attrs,ngModel) ->
|
||||
setTimeout ->
|
||||
element.select2
|
||||
placeholder: Spree.translations.taxon_placeholder
|
||||
multiple: true
|
||||
placeholder: "Category"
|
||||
multiple: false
|
||||
initSelection: (element, callback) ->
|
||||
callback Taxons.findByIDs(element.val())
|
||||
callback Taxons.findByID(scope.product.category)
|
||||
query: (query) ->
|
||||
query.callback { results: Taxons.findByTerm(query.term) }
|
||||
formatResult: (taxon) ->
|
||||
|
||||
Reference in New Issue
Block a user