From dc2751b85ce70f0bb0fd6fc36b1baeec225b02a5 Mon Sep 17 00:00:00 2001 From: David Norton Date: Wed, 26 Jul 2006 15:28:31 +0000 Subject: [PATCH] Fixes #129, add menu/contextual menu items for export/bibliography (currently just in contextual menu). --- chrome/chromeFiles/content/scholar/overlay.js | 22 ++++++++++++++++++- .../chromeFiles/content/scholar/overlay.xul | 6 +++++ .../locale/en-US/scholar/scholar.dtd | 2 ++ .../locale/en-US/scholar/scholar.properties | 4 ++++ 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js index f3a124876..e0ab6d543 100644 --- a/chrome/chromeFiles/content/scholar/overlay.js +++ b/chrome/chromeFiles/content/scholar/overlay.js @@ -276,11 +276,15 @@ var ScholarPane = new function() { menu.childNodes[2].removeAttribute('disabled'); menu.childNodes[3].removeAttribute('disabled'); + menu.childNodes[5].removeAttribute('disabled'); + menu.childNodes[6].removeAttribute('disabled'); } else { menu.childNodes[2].setAttribute('disabled', true); menu.childNodes[3].setAttribute('disabled', true); + menu.childNodes[5].setAttribute('disabled', true); + menu.childNodes[6].setAttribute('disabled', true); } } @@ -289,14 +293,30 @@ var ScholarPane = new function() var menu = document.getElementById('scholar-itemmenu'); if(itemsView && itemsView.selection.count > 0) + { menu.childNodes[2].removeAttribute('disabled'); + menu.childNodes[4].removeAttribute('disabled'); + menu.childNodes[5].removeAttribute('disabled'); + } else + { menu.childNodes[2].setAttribute('disabled', true); + menu.childNodes[4].setAttribute('disabled', true); + menu.childNodes[5].setAttribute('disabled', true); + } if(itemsView && itemsView.selection.count > 1) + { menu.childNodes[2].setAttribute('label', Scholar.getString('pane.items.menu.remove.multiple')); + menu.childNodes[4].setAttribute('label', Scholar.getString('pane.items.menu.export.multiple')); + menu.childNodes[5].setAttribute('label', Scholar.getString('pane.items.menu.createBib.multiple')); + } else - menu.childNodes[2].setAttribute('label', Scholar.getString('pane.items.menu.remove')); + { + menu.childNodes[2].setAttribute('label', Scholar.getString('pane.items.menu.remove')); + menu.childNodes[4].setAttribute('label', Scholar.getString('pane.items.menu.export')); + menu.childNodes[5].setAttribute('label', Scholar.getString('pane.items.menu.createBib')); + } } function newNote() diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul index ff2a0277f..21a24da12 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -30,11 +30,17 @@ + + + + + + diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd index d5ed3de63..4092688bf 100644 --- a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd +++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd @@ -25,6 +25,8 @@ + + diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties index bbef86d0b..1a961943c 100644 --- a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties +++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties @@ -8,6 +8,10 @@ pane.items.delete = Are you sure you want to delete the selected item? pane.items.delete.multiple = Are you sure you want to delete the selected items? pane.items.menu.remove = Remove Selected Item... pane.items.menu.remove.multiple = Remove Selected Items... +pane.items.menu.export = Export Selected Item... +pane.items.menu.export.multiple = Export Selected Items... +pane.items.menu.createBib = Create Bibliography From Selected Item... +pane.items.menu.createBib.multiple = Create Bibliography From Selected Items... pane.item.selected.zero = No items selected pane.item.selected.multiple = %1 items selected