diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js index 796560177..f514af851 100644 --- a/chrome/chromeFiles/content/scholar/overlay.js +++ b/chrome/chromeFiles/content/scholar/overlay.js @@ -291,8 +291,26 @@ var ScholarPane = new function() function deleteSelectedCollection() { - if(collectionsView.selection.count > 0 && confirm(Scholar.getString('pane.collections.delete'))) - collectionsView.deleteSelection(); + if (collectionsView.selection.count == 1) + { + var row = + collectionsView._getItemAtRow(collectionsView.selection.currentIndex); + + if (row.isCollection()) + { + if (confirm(Scholar.getString('pane.collections.delete'))) + { + collectionsView.deleteSelection(); + } + } + else if (row.isSearch()) + { + if (confirm(Scholar.getString('pane.collections.deleteSearch'))) + { + collectionsView.deleteSelection(); + } + } + } } function editSelectedCollection() diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties index 08634b59a..8dd6390a4 100644 --- a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties +++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties @@ -1,5 +1,5 @@ pane.collections.delete = Are you sure you want to delete the selected collection? -pane.collections.delete.multiple = Are you sure you want to delete the selected collections? +pane.collections.deleteSearch = Are you sure you want to delete the selected search? pane.collections.name = Collection name: pane.collections.rename = Rename collection: pane.collections.library = My Library