Addresses #532, Highlight collections containing item(s) when pressing alt/option

- Don't trigger other keyboard shortcuts twice
- Fix SQL error if item appears in no collections
This commit is contained in:
Dan Stillman 2007-02-06 09:44:20 +00:00
parent 51e2d36dd1
commit f994352ab9

View File

@ -244,6 +244,8 @@ var ZoteroPane = new function()
}
ZoteroPane.collectionsView.setHighlightedRows();
}
return;
}
// Ignore keystrokes if Zotero pane is closed
@ -322,7 +324,7 @@ var ZoteroPane = new function()
*/
function setHighlightedRowsCallback() {
var itemIDs = ZoteroPane.getSelectedItems(true);
if (itemIDs) {
if (itemIDs && itemIDs.length) {
var collectionIDs = Zotero.Collections.getCollectionsContainingItems(itemIDs, true);
if (collectionIDs) {
ZoteroPane.collectionsView.setHighlightedRows(collectionIDs);