Default to My Library if pane not yet open saving snapshot from connector
This commit is contained in:
parent
0be2796500
commit
f5812852cb
1 changed files with 5 additions and 3 deletions
|
@ -412,15 +412,17 @@ Zotero.Server.Connector.SaveSnapshot.prototype = {
|
|||
"init":function(url, data, sendResponseCallback) {
|
||||
Zotero.Server.Connector.Data[data["url"]] = "<html>"+data["html"]+"</html>";
|
||||
|
||||
// figure out where to save
|
||||
var libraryID = null;
|
||||
var collectionID = null;
|
||||
var zp = Zotero.getActiveZoteroPane();
|
||||
try {
|
||||
var libraryID = zp.getSelectedLibraryID();
|
||||
var collection = zp.getSelectedCollection();
|
||||
} catch(e) {}
|
||||
|
||||
// Default to personal library if pane not yet opened
|
||||
if (!libraryID) {
|
||||
libraryID = Zotero.Libraries.userLibraryID
|
||||
}
|
||||
|
||||
// determine whether snapshot can be saved
|
||||
var filesEditable;
|
||||
if (libraryID) {
|
||||
|
|
Loading…
Add table
Reference in a new issue