Select items after importing from clipboard
And wait for async switch to My Library if in a non-editable view
This commit is contained in:
parent
bb246e5514
commit
4d77977a29
|
@ -260,10 +260,21 @@ var Zotero_File_Interface = new function() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!ZoteroPane.collectionsView.editable) {
|
if (!ZoteroPane.collectionsView.editable) {
|
||||||
ZoteroPane.collectionsView.selectLibrary(null);
|
yield ZoteroPane.collectionsView.selectLibrary();
|
||||||
}
|
}
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
||||||
yield _finishImport(translation, false);
|
yield _finishImport(translation, false);
|
||||||
|
|
||||||
|
// Select imported items
|
||||||
|
try {
|
||||||
|
if (translation.newItems) {
|
||||||
|
ZoteroPane.itemsView.selectItems(translation.newItems.map(item => item.id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
Zotero.logError(e, 2);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user