NIHVIVO-646 Slight change to implementation of existing author filter on autocomplete

This commit is contained in:
rjy7 2010-06-24 14:31:23 +00:00
parent 9d045bc98b
commit 1e127abac1
2 changed files with 12 additions and 8 deletions

View file

@ -168,7 +168,7 @@ var addAuthorForm = {
var cache = {};
var url = $('#acUrl').val();
var existingAuthorUris = addAuthorForm.getExistingAuthorUris();
jQuery.each(existingAuthorUris, function(index, element) {
url += '&filter=' + element;
});
@ -208,9 +208,10 @@ var addAuthorForm = {
},
getExistingAuthorUris: function() {
var authorUris = $('span.existingAuthorUri');
return authorUris.map(function() {
return $(this).html();
var existingAuthors = $('#authors .existingAuthor');
return existingAuthors.map(function() {
return $(this).attr('id');
});
},