commit 4d77977a293b758f7c6ecb2cd4e57854e94a3f90 parent bb246e5514596030f8c02540713bfb611e572a62 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 9 Dec 2016 06:12:05 -0500 Select items after importing from clipboard And wait for async switch to My Library if in a non-editable view Diffstat:
| M | chrome/content/zotero/fileInterface.js | | | 13 | ++++++++++++- |
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js @@ -260,10 +260,21 @@ var Zotero_File_Interface = new function() { try { if (!ZoteroPane.collectionsView.editable) { - ZoteroPane.collectionsView.selectLibrary(null); + yield ZoteroPane.collectionsView.selectLibrary(); } } catch(e) {} + 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); + } });