Fixes #129, add menu/contextual menu items for export/bibliography
(currently just in contextual menu).
This commit is contained in:
parent
aff9cd5708
commit
dc2751b85c
4 changed files with 33 additions and 1 deletions
|
@ -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()
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue