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

@@ -3,6 +3,11 @@ angular.module("ofn.admin").factory "Taxons", (taxons, $filter) ->
constructor: ->
@taxons = taxons
# For finding a single Taxon
findByID: (id) ->
$filter('filter')(@taxons, {id: id}, true)[0]
# For finding multiple Taxons represented by comma delimited string
findByIDs: (ids) ->
taxon for taxon in @taxons when taxon.id.toString() in ids.split(",")