"Delay citation updates until manual refresh" would be fine in the doc
prefs, but "until manual refresh" is a bit too awkward for the prompt.
Instead, go with @rmzelle's suggestion from #1242 of referring to
"automatic citation updates", and invert the checkbox.
These should've all been replaced with dc:replaces relations in a schema
update step, so any that exist were likely synced down from the API
(since fixed) and should be obsolete/redundant.
- Removed obsolete logic for citation.properties.deleted, which is no
longer set anywhere
- Introduced a bibliography class
- BibliographyEditInterface no longer edits state
- Fields._processFields() now has linear flow because:
- Exception handling for missing items and corrupt fields reworked to be
handled in relevant Field classes, so that the flow remains linear
- Document modifying functions (i.e. Fields.updateDocument()) now only
called in Zotero.Integration.Interface functions instead of all over
the place
- document.setDocPrefs() now called after every execCommand() since
the cost is trivial, but that simplifies a bunch of logic
- Misc code cleanup
TODO at some point in the future:
- Move Integration.(init/delete)Pipe out
- Decouple references and clarify functions in Integration.Fields and
Integration.Session
- Moves a bunch of citation related processing from Integration.Session
- Replaces missing item handling with a function instead of exception
- Solves some really confusing flow issues in _processFields
This is the first really big change that detangles UI stuff from
directly changing state. io.citation is no longer tied to the citation
loaded in the session in any way and CitationEditInterface does not
write anything to session or document. All writes are handled in
Fields.addEditCitation()
Using new es6 class syntax because getters/setters don't
retain `this` context with Zotero.extendClass and we're building
with at least FX45 on every platform now where the syntax is supported
The current document is automatically used (but can still be provided as
the first argument to avoid accidental bugs during the transition).
Closes#1323
Addresses zotero/translators#1277
- Enable/disable download mode drop-down for groups separately from user
library
- Fixing hiding of terms of service message when Zotero storage isn't
selected
If you started typing just as auto-save was kicking in (i.e., 1 second
after stopping typing), any additional characters could be removed and
the cursor could jump back to the beginning of the note.
Fixes#1336, probably
- When a child note is opened in a separate window, the parent window is
selected. (This used to work but was broken in 5.0.)
- When a top-level note is opened (via double-click), the right-hand pane
changes to show "Editing in separate window".
- If a note that's currently open in a separate window is clicked on,
the right-hand pane shows "Editing in a separate window".
- If a note window is closed and the item is selected, the note editor
reappears in the right-hand pane after the note is saved.
This will avoid unnecessary UI updates and data loss bugs from the two
notes getting out of sync (and is just generally cleaner).
Also:
- General cleanup of note display code
Nesting the panel in the toolbarbutton seems to cause the button to
appear as if it were clicked on any click/right-click in the textbox,
and I couldn't find a way to prevent that with event.stopPropagation().
Also cleans up this code in general
Restores the "Restore to Zotero Server" functionality, now using the
API:
1. Get all remote keys and send `DELETE` for any that don't exist
locally.
2. Upload all local objects in full (non-patch) mode using only library
version so that the remotes are overwritten.
3. Reset file sync history, causing all files to be uploaded (or, more
likely, reassociated with existing remote files).
Since these are treated as regular updates on the server, they'll sync
down to other clients normally. Unsynced changes by other clients might
still trigger conflicts.
This and Reset File Sync History can also now be run on group libraries,
with a library selector in the Reset pane (which I forgot to do with
React).
The full sync option is now removed from the Reset pane, since there
wasn't ever really a reason to run it manually.
We should be able to reimplement Restore from Online Library (#1386)
using the inverse of this approach.
Closes#914
And fix deprecation warning from passing an nsIFile
(Also updates the Zotero.Styles.install() documentation to note that the
first parameter's `file` property can be a string path.)
A XUL one for the current use in Advanced Search and an HTML one for
future uses. Sets the value to libraryID and adds data attributes for
editable/filesEditable on the HTML one.
If the read-only file is set on a file in the 'storage' directory, it's
added to the ZIP for snapshot/WebDAV syncing, and when extracted the
setDates() call was failing. This clears the read-only attribute (and
system and hidden) when extracting all files.
The check only does anything if we're using the default location, and
otherwise if we migrate the wrong directory (say, because somebody
opened Standalone 4.0 before upgrading to 5.0) we won't prompt until the
next restart.
f40b7ae6ac didn't help with people who've already upgraded, so check at
startup and show a warning if the profile is inaccessible until 1) the
profile has been accessed once or 2) the user checks "Don't show again"
in the warning dialog.
Also fix Zotero.Profile.getDefaultInProfilesDir() to properly throw an
error if it can't access the default directory.