Item.getCreators() to return multidim array of creator data (same as doing a loop to numNotes() and using getCreator())

This commit is contained in:
Dan Stillman 2006-06-27 20:26:44 +00:00
parent 5ab37dacd5
commit 22296470c3

View File

@ -192,6 +192,18 @@ Scholar.Item.prototype.getCreator = function(pos){
} }
/*
* Returns a multidimensional array of creators, or an empty array if none
*/
Scholar.Item.prototype.getCreators = function(){
var creators = [];
for (var i=0, len=this.numCreators(); i<len; i++){
creators.push(this.getCreator(i));
}
return creators;
}
/* /*
* Set or update the creator at the specified position * Set or update the creator at the specified position
*/ */
@ -1073,6 +1085,7 @@ Scholar.Item.prototype._loadItemData = function(){
Scholar.Notes = new function(){ Scholar.Notes = new function(){
this.add = add; this.add = add;
@ -1115,6 +1128,7 @@ Scholar.Notes = new function(){
/* /*
* Primary interface for accessing Scholar items * Primary interface for accessing Scholar items
*/ */