commit dc2751b85ce70f0bb0fd6fc36b1baeec225b02a5
parent aff9cd5708141652d992664a5156b27cafec08f8
Author: David Norton <david@nortoncrew.com>
Date: Wed, 26 Jul 2006 15:28:31 +0000
Fixes #129, add menu/contextual menu items for export/bibliography
(currently just in contextual menu).
Diffstat:
4 files changed, 33 insertions(+), 1 deletion(-)
diff --git 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
@@ -30,11 +30,17 @@
<menuseparator/>
<menuitem label="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();"/>
<menuitem label="&toolbar.removeCollection.label;" oncommand="ScholarPane.deleteSelectedCollection();"/>
+ <menuseparator/>
+ <menuitem label="&toolbar.exportCollection.label;" oncommand="Scholar_File_Interface.exportProject();"/>
+ <menuitem label="&toolbar.createBibCollection.label;" oncommand="Scholar_File_Interface.bibliographyFromProject();"/>
</popup>
<popup id="scholar-itemmenu" onpopupshowing="ScholarPane.buildItemContextMenu();">
<menuitem label="&toolbar.newItem.label;" command="cmd_scholar_newItem"/>
<menuseparator/>
<menuitem oncommand="ScholarPane.deleteSelectedItem();"/>
+ <menuseparator/>
+ <menuitem oncommand="Scholar_File_Interface.exportItems();"/>
+ <menuitem oncommand="Scholar_File_Interface.bibliographyFromItems();"/>
</popup>
</popupset>
<vbox id="collections-pane" persist="width" flex="1">
diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd
@@ -25,6 +25,8 @@
<!ENTITY toolbar.newCollection.label "New Project">
<!ENTITY toolbar.renameCollection.label "Rename Project...">
<!ENTITY toolbar.removeCollection.label "Remove Project...">
+<!ENTITY toolbar.exportCollection.label "Export Project...">
+<!ENTITY toolbar.createBibCollection.label "Create Bibliography From Project...">
<!ENTITY toolbar.search.label "Search:">
<!ENTITY selectitems.title "Select Items">
diff --git 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