www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 22296470c33508a54e35d3c14653c6778f03aafc
parent 5ab37dacd5032a839b1253c06697bc3fb32b806e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 27 Jun 2006 20:26:44 +0000

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


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/data_access.js | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -193,6 +193,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 */ Scholar.Item.prototype.setCreator = function(orderIndex, firstName, lastName, creatorTypeID){ @@ -1073,6 +1085,7 @@ Scholar.Item.prototype._loadItemData = function(){ + Scholar.Notes = new function(){ this.add = add; @@ -1115,6 +1128,7 @@ Scholar.Notes = new function(){ + /* * Primary interface for accessing Scholar items */