processDocuments() now uses an XHR 'document' request, wrapped to
provide a 'location' property, and uses promises for a simpler call
signature (though the old one will continue to work, for existing
translators). 'done' and 'exception' can now be handled via promises,
and in the translator sandbox an optional noCompleteOnError argument
instructs it not to automatically cancel the translation process with an
error (e.g., for supplementary materials).
Since we do need a hidden browser in some situations (e.g., for saving
snapshots), the old hidden-browser-based processDocuments() is still
available as Zotero.HTTP.loadDocuments().
This hopefully also fixes various problems with document property access
in translation-server.
If you swapped in a database with a different sync account from the
stored one and then opened the prefs, it would update the username to
match the username from the API key, and then when you synced it would
warn you using the new username for both accounts.
This stops the prefs from updating the username in the DB, so it only
happens during a sync.
(This behavior was put in in 77a95b5e6d, I guess so that if you open the
prefs twice before a sync it won't briefly show a missing/outdated
username after the first time, but that's not a big deal.)
This might help avoid the search bar brokenness that people are seeing
(and that we can't reproduce), though the same problem might just cause
a later error.
Return a 500 for read-only libraries for all save modes. Read-only views
within editable libraries will save to the library root.
Addresses #185, RIS/BibTeX interception to read-only view behaves
differently from save button
This is (hopefully) a better fix for selection issues than 2901174ba3. A
reference to the collectionTreeView is stored in a `view` property on
the collectionTreeRow, and when an itemTreeView is initialized and
passed a collectionTreeRow it assigns itself to an `itemTreeView`
property on the row's view.