app/assets/javascripts/curate/select_works.js.coffee in curate-0.5.0 vs app/assets/javascripts/curate/select_works.js.coffee in curate-0.5.1
- old
+ new
@@ -7,18 +7,14 @@
jsonContainer: "docs"
propertyToSearch: "title"
preventDuplicates: true
tokenValue: "pid"
onResult: (results) ->
-# selectedPids = $.map( $targetElement.tokenInput("get") , (el, index) -> return el.pid )
-# pidsToFilter = $targetElement.data('exclude').concat(selectedPids)
pidsToFilter = $targetElement.data('exclude')
- console.log(results.docs)
$.each(results.docs, (index, value) ->
- console.log(value)
# Filter out anything listed in data-exclude. ie. the current object.
if (pidsToFilter.indexOf(value.pid) > -1)
results.docs.splice(index, 1)
)
- return results;
+ return results
}
- )
\ No newline at end of file
+ )