Collection names must be non-empty -- interface side might follow iTunes behavior ('untitled playlist') here
This commit is contained in:
parent
e2c9ee0387
commit
bd840a4c58
1 changed files with 10 additions and 0 deletions
|
@ -1029,6 +1029,8 @@ Scholar.Collection.prototype.hasChildItems = function(){
|
||||||
/**
|
/**
|
||||||
* Rename the collection
|
* Rename the collection
|
||||||
*
|
*
|
||||||
|
* _name_ is non-empty string
|
||||||
|
*
|
||||||
* Returns true on success, or false on error
|
* Returns true on success, or false on error
|
||||||
**/
|
**/
|
||||||
Scholar.Collection.prototype.rename = function(name){
|
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){
|
function add(name, parent){
|
||||||
if (!name){
|
if (!name){
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue