diff --git a/chrome/chromeFiles/content/scholar/data_access.js b/chrome/chromeFiles/content/scholar/data_access.js index cd17554f56..2faf5ed71c 100644 --- a/chrome/chromeFiles/content/scholar/data_access.js +++ b/chrome/chromeFiles/content/scholar/data_access.js @@ -1114,6 +1114,72 @@ Scholar.Folder.prototype.isEmpty = function(){ return !!parseInt(this._empty); } +/** +* Deletes a folder and all descendent folders and items +**/ +Scholar.Folder.prototype.erase = function(){ + Scholar.DB.beginTransaction(); + + var descendents = this._getDescendents(); + var folders = new Array(this._id); + + for(var i=0, len=descendents.length; i