From 72a2dd92168028ae37cadca6bae55dbc99c8c392 Mon Sep 17 00:00:00 2001 From: David Norton Date: Fri, 19 May 2006 15:26:54 +0000 Subject: [PATCH] Folders deletion logic added (needs Folder.erase() which should recursively delete children as well) --- chrome/chromeFiles/content/scholar/sidebar.js | 59 +++++++++++-------- .../chromeFiles/content/scholar/sidebar.xul | 4 +- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/sidebar.js b/chrome/chromeFiles/content/scholar/sidebar.js index eba384f732..92f72e097a 100644 --- a/chrome/chromeFiles/content/scholar/sidebar.js +++ b/chrome/chromeFiles/content/scholar/sidebar.js @@ -134,37 +134,48 @@ Scholar.TreeView.prototype.performAction = function(action) { } Scholar.TreeView.prototype.performActionOnCell = function(action, row, col) { } Scholar.TreeView.prototype.getProgressMode = function(row, col) { } -Scholar.TreeView.prototype.deleteSelectedItem = function() +Scholar.TreeView.prototype.deleteSelection = function() { if(this.selection.count == 0) { return; } - else if(confirm("Are you sure you want to delete the selected item"+(this.selection.count > 1 ? "s" : "")+"?")) + if(!confirm("Are you sure you want to delete the selected item"+(this.selection.count > 1 ? "s" : "")+"?")) { - var items = new Array(); - var start = new Object(); - var end = new Object(); - - for (var i=0, len=this.selection.getRangeCount(); i