www

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

commit bd840a4c58237ade0f7b6637d3d8889f8d78aa13
parent e2c9ee03877c1ec53779e8ef457a7d4e5440a8a0
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat,  3 Jun 2006 20:51:48 +0000

Collection names must be non-empty -- interface side might follow iTunes behavior ('untitled playlist') here


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

diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -1029,6 +1029,8 @@ Scholar.Collection.prototype.hasChildItems = function(){ /** * Rename the collection * +* _name_ is non-empty string +* * Returns true on success, or false on error **/ Scholar.Collection.prototype.rename = function(name){ @@ -1248,6 +1250,14 @@ Scholar.Collections = new function(){ } + /** + * Add new collection to DB and return Collection object + * + * _name_ is non-empty string + * _parent_ is optional collectionID -- creates root collection by default + * + * Returns true on success; false on error + **/ function add(name, parent){ if (!name){ return false;