www

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

commit 146b92585dce1823babb500453dc960b6497c194
parent 433121ec50ec4f81b4ee5376de9a01904dbe7b3f
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 31 Aug 2006 06:27:02 +0000

Fixes #249, User should not be able to try to delete "My Library"


Diffstat:
Mchrome/chromeFiles/content/scholar/overlay.js | 22++++++++++++++++++++--
Mchrome/chromeFiles/locale/en-US/scholar/scholar.properties | 2+-
2 files changed, 21 insertions(+), 3 deletions(-)

diff --git 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 @@ -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