Function that automatically follows Link headers and makes additional
requests as necessary, feeding the XMLHTTPRequest object from each
request to a reducer function.
- Archive remotely missing that user chooses to keep
- Ignore archived groups that don't existing remotely
- Unarchive groups that become available again
This can happen because objects are uploaded in batches, but the version
number from the last batch is used for all objects (since
APIClient.uploadObjects() handles batching internally).
Previously on Windows, where we don't have /bin/mv, we were recursing
into the data directory and copying files individually, which is very
slow, so automatic migration was disabled. Instead, try moving
directories with OS.File.move() with the `noCopy` flag. Moving
directories is technically unsupported by OS.File, but probably only
because of the possibility of a cross-volume copy (which is only
implemented for some platforms), and using `noCopy` hopefully prevents
that. If someone does have their data directory or storage directory on
a different volume, the migration might be quite slow, but leaving a
data directory behind in the Firefox profile directory (where it can be
easily misplaced with a seemingly unrelated Firefox reset) is worse.
E.g., moving 3,600 items to the trash now takes 4 seconds instead of 62
Instead of saving each item, update internal state and database directly
(which is more brittle but worth it). Also avoid unnecessary sorting
after removing an item from the items tree.
This allows for imported items to be saved individually instead of being
saved in a batch after processing the entire imported file (which for
large imports would hang the UI, even if the actual saving was
asynchronous). This also fixes the progress meter during asynchronous
saves.
To take advantage of this, import translators will need to return a
promise when available (using the native Promise object) from doImport()
and wait for optional promises from item.complete().
The logic here can probably be streamlined further. (E.g., we might be
able to say that item.complete() always returns a promise.) It's
complicated by the fact that, at the moment, Promise isn't available in
child sandboxes, though this can probably be fixed.
Tests forthcoming, but they require a translator that supports this,
which needs to be committed separately.
View with -w for a cleaner diff.
There seems to be a bug here where, if the item is off-screen when
modified, it doesn't become visible, but it now does stay visible when
it's on-screen to begin with.
At least until we have a better interface for setting library-specific
sync settings
Previously, if My Library file syncing was disabled or set to WebDAV, My
Publications files wouldn't be uploaded.
When adding many search conditions (e.g., when matching many items with the
`key` condition), the query can fail due to either the bound parameter limit or
the expression tree size limit.
To avoid this, add support for an 'inlineFilter' property on search conditions
when using the 'is' or 'isNot' operator. 'inlineFilter' is a function that
returns a quoted value suitable for direct embedding in the SQL statement, or
false if not valid. Multiple consecutive conditions for the same 'inlineFilter'
field are combined into an `IN (x, y, z)` condition.
- Add Cmd/Ctrl-Shift-I for "Import…"
- Cmd/Ctrl-Shift-V apparently pastes without formatting, so don't override it.
Instead, add a shortcut key to the menu option, defaulting to
Cmd-Option-Shift-I/Ctrl-Alt-Shift-I
- The I in both is now localizable
- Make version copyable
- Include "What's new" link to changelog
- Update some links and descriptions
To-do:
- Replace dev credits with a nice statement like in the Firefox About pane
Before 3.4.2, `yield` in a Bluebird `coroutine()` released Zalgo if an
already-resolved promise (e.g., from `Promise.resolve()`) was yielded,
continuing immediately instead of on the next turn of the event loop. We
apparently relied on that broken behavior in a few places, particularly from
`Zotero.DB.waitForTransaction()`. All the transaction-queueing stuff probably
needs to be reevaluated in general, but for now, mirror the previous possibly
ill-advised behavior by checking explicitly for a transaction before yielding
on `waitForTransaction()` (as well as the result of a 'load' event from
`libraryTreeView`).
Since 1) debug output logging via the prefs isn't necessarily possible
for startup errors in Standalone, 2) real-time output is prohibitively
slow and has a miniscule scrollback buffer on Windows unless you use a
Cygwin or Git terminal, and 3) copying/pasting/emailing was annoying
anyway, make -ZoteroDebug open a popup window that shows errors and
debug output and allows submitting straight to the server with a Debug
ID.
This should replace the existing debug output viewer as well, but that's
less of a priority.
-ZoteroDebugText or the debug.log pref can still be used to dump to the
terminal.
(Borrowing a technique from Thunderbird.)
This only affects the splitters in standard view. The splitter between the top
and bottom panes in stacked view still has a 1px draggable area.
We can probably do a similar thing to slim down splitters on Windows, as
planned in #367.
Apparently in 4.0 we defaulted to 'author' if a creatorType wasn't
passed. To avoid lots of errors like the one fixed in
dd0094893a,
add a similar fallback for 5.0 and log a warning (though not with the
translator name, unfortunately).
Month values from the Firefox language packs are included in a
JSON file used by `Zotero.Date.getMonths()`. `getMonths(true)` includes
English months as well.
The JSON file should be bundled with the connectors as well, and
Zotero.Date.init() should be updated to populate the month data from
that.
Remove localizations in standalone.dtd and replace with editMenuOverlay.dtd
files from the Mozilla language packs
Also remove some other unused strings
- Fixes errors in previous commits 55bfe54a and 9431e0de, to wit ...
- Apply unescapeHTML after RTF tag and entity conversions
- Remove high-bit character escape from entity converter,
and apply separately after remaining HTML entities are
decoded by unescapeHTML
- Tabs missing styling
- Preferences: Notes font menulist dropmarker missing (left border still
missing, could not find any CSS to help that out)
- Preferences: Numberbox background gray
For the tabs styling issue see
https://bugzilla.mozilla.org/show_bug.cgi?id=1306425
Not ideal -- we can't reduce the height of separators, so there's too much
padding between sections -- but still better (and way better on Linux, where a
thick black line was being drawn instead of the light dashes on macOS).
When "Get Additional Styles…" is clicked, open a stripped-down version
of the Zotero styles page in a window. When a style is clicked on,
install it and close the window.
I'm going to say that this closes#767, but as Aurimas notes there, if
you know the style you're looking for, being able to just type the name
in a dialog would be faster, so further improvements could be made. But
as it stands, this is much better than clicking through to a browser
(and hoping that it's one with the new connector with style installation
support).
Immediate sync triggering on remote library change using WebSocket API.
Currently kicks off a normal sync process for the modified library --
actual object data isn't pushed.
(This might not stay enabled for 5.0 Final.)
This moves most selection logic from ZoteroPane.selectItem() into
collectionTreeView::selectItem() so that it can be used in the
edit-citation dialog.
Unlike itemTreeView::selectItem(), which only selects within a given
items tree, this function automatically switches to a library root if
necessary. ZoteroPane.selectItem() remains and does a little bit extra
(unminimizing Zotero, focusing the items pane) in addition to calling
collectionTreeView::selectItem().
If an object was uploaded but was changed locally during the upload (e.g., the
user typing in a note), the local changes would be lost when the remotely saved
version was applied. Instead, watch for modifications to objects during the
upload and don't apply the remote versions of those objects or mark them as
synced.
- New flat theme (with padding tightened a bit from the default to fit
in right-hand pane)
- Adds search/replace within notes
- Adds URL autolinking
- Image pasting/dragging is now properly disallowed (though TinyMCE 4
has hooks that may allow us to actually support this by automatically
creating attachments)
- New blockquote style with color bar
- Replaces custom context menu on link click with built-in version
To-do:
- Fix display of pop-ups, which are now modal dialogs within the note
frame instead of pop-up windows, to stay fully within the frame
- Localize (more important now that there are tooltips)
- Support image dragging
- Update elements list for HTML5, for better drag-and-drop?
- Move directionality control to context menu instead of taking up
toolbar space?
- Evaluate other plugins for potential inclusion
- Show additional controls in separate note window?
- Fix opacity of text in tooltips
Closes#451, closes#421
And change "Changes take effect in new windows" to "Changes take effect
after restart"
(The note font size still requires a restart, as do the shortcut keys in
the Advaned pane.)
Not sure we want to expose this, particularly since there are tons of
spurious warnings in current builds due to a chrome registration issue,
but it can be handy for debugging some issues.
Previously, if Standalone was open and Firefox was opened in connector
mode, ZoteroOverlay.onLoad() was never run, which meant that, among
other things, the before-reload handler that closed the Zotero pane when
switching out of full mode was never added.