diff --git a/chrome/chromeFiles/content/scholar/data_access.js b/chrome/chromeFiles/content/scholar/data_access.js index e21fe39a18..e60ce5212f 100644 --- a/chrome/chromeFiles/content/scholar/data_access.js +++ b/chrome/chromeFiles/content/scholar/data_access.js @@ -696,8 +696,9 @@ Scholar.Object.prototype._loadObjectData = function(){ - - +/* + * Primary interface for accessing Scholar objects + */ Scholar.Objects = new function(){ // Private members var _objects = new Array(); @@ -705,6 +706,7 @@ Scholar.Objects = new function(){ // Privileged methods this.get = get; this.getAll = getAll; + this.getTreeRows = getTreeRows; this.reload = reload; this.reloadAll = reloadAll; @@ -712,6 +714,9 @@ Scholar.Objects = new function(){ * Retrieves (and loads, if necessary) an arbitrary number of objects * * Can be passed ids as individual parameters or as an array of ids, or both + * + * If only one argument and it's an id, return object directly; + * otherwise, return array indexed by objectID */ function get(){ var toLoad = new Array(); @@ -722,7 +727,7 @@ Scholar.Objects = new function(){ } var ids = Scholar.flattenArguments(arguments); - + for (var i=0; i