Switch Taxons input over to category selection on BPE, clean up interface

This commit is contained in:
Rob H
2014-08-08 10:54:10 +10:00
parent 1e68052711
commit 32c8b9cdcd
8 changed files with 144 additions and 105 deletions

View File

@@ -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) ->