Z7 removed an `OS.File.open()` in `_checkForUpdatedFiles()` that would
throw on missing files and cause them to be marked for download in a
`catch`.
This likely caused the fix for #1753 not to work in Z7.
Adds a new function, Zotero.HTTP.download(), that uses
Zotero.HTTP.request(). This fixes downloads via authenticated proxies in
Zotero 7 and gives us other request() functionality (e.g., 5xx retrying)
for free.
The downside is that this is probably less efficient, potentially
loading large downloads in memory. We should create a replacement for
request() based on fetch() that supports getting the body as a
ReadableStream.
Fixes#5062
Fix error if local note or attachment is added to a parent item while
the remote version was added to a collection. Now, the new local parent
item will be added to any collections the remote child item was added
to.
Fixes#2934
When tagsBox item is changed by clicking on an itemTree row,
the blur even never fires on the currently focused tag. So
whatever changes were made will be discarded. To avoid it,
blur any opened tag rows (which triggers a saveTx)
when an item is being set, same way it is done in itemBox.
Also, a small tweak to properly fetch the focused tag
via editable-text:focus-within selector, since editable-text:focus is
always empty because the focus is on the input inside of
editable-text.
Fixes: #4942
For a URL like
`https://ezproxy.school.edu/login?url=http://resolver.ebscohost.com/openurl`,
without a trailing `?`, we were just adding a `%` to the end, making the
URL invalid after the redirection (`/openurl&url_ver=Z39.88-2004`
instead of `/openurl?url_ver=Z39.88-2004`).
(And apparently no one who sent in these URLs actually tested them
in-app?)
- Make the annotations importer more resilient to missing data
- Fix notebooks not being imported in some cases
- Fix an instance of a hidden browser leaked by the Mendeley Importer
We fix `://` or `//` automatically after #3483, but a leading ':'
character would still show an internal `NS_ERROR_MALFORMED_URI` error.
Instead, just say "[url] is not a valid WebDAV URL".
For APIs that have lifecycle control, e.g. item
pane section, the `update` is passed in the init
hook.
For APIs without lifecycle, we can't pass a value.
Instead, we provide a method to refresh in the API
instance.
Fix the glitch where having anyField search condition
along with any other condition would return an empty
result set if joinMode="any".
This would happen due to a conflict between conditions
caused by wrapping "anyField" condition set into a quickSearch
block, which enforces "AND" operator between conditions.
Fixes: #4830
- Section buttons, Locate, and Notes in the sidenav are focusable
- itemPane section buttons are combined into one focusable
group. Those buttons by themselves don't mean anything in
the context of keyboard navigation as they just scroll
to the section in the itemPane. In fact, having info,
abstract, attachments, etc. focusable and announceable by
screen readers is just confusing. However, we do want the group
of those buttons to be focusable to switch back to
zotero-context-pane-item-deck from zotero-context-pane-notes-deck
if the notes button in the sidenav is pressed.
- sidenav can be reached by tabbing into it from the end of itemPane
or via shift-tab from the focused tab
- sidenav buttons can be navigated with up/down arrows
- notes list in the context pane can be activated via the button in the
sidenav and navigated via up/down arrows
- use command vs onclick listener for notes list context menus to work
with keyboard-triggered clicks as well
- focus itemPane when tabs are switched in sidenav
Do not try to re-select a previously selected item
if it was filtered out from itemTree, e.g. after
it was removed from currently selected collection.
Otherwise, quick search gets cleared in an attempt to
re-select the item.
Fixes: #4616
Unify plugin API classes
Add info box custom row API tests
Refactor itemBox.js create element
Wrap hooks in API for safe call
Add test for item tree api and hook error handling
Remove try/catch from #4816
Move plugin API definitions to xpcom/pluginAPI
If you unlinked your sync account and then relinked, the ZFS storage
controller would still have the old API key and file-sync requests would
fail. Since that was never supposed to be possible, it resulted in
"Group with libraryID 1 does not exist" errors during file syncing until
you restarted the app.
- Added menuitems to move collections within the same
library and to copy collections
- "Move to" only displays collections within the
current library
- "Copy to" displays all libraries, if more than
one library exists. If there is only one library,
top-level collections from "My Library" are displayed.
- while copying within the same library, create copies
of all collections and add items into them, without
actually duplicating items
- while copying between different libraries, items
will be duplicated, the same way it is done when
collections are dragged and dropped in another library
- added "Change Parent Item…" context menu option to
itemTree as a non-drag-drop alternative to changing the
parent of attachments or notes
- context menu option appears only when all selected
items are notes or attachments
- upon activation, a dialog to select the new parent
will appear. Added a tweak to the dialog to disable
the "accept" button if a selected item is not top level
- minor edit to itemTree to set the multiselect property
based on a prop, since we do not want to have multiselect
enabled in this instance
- hide all virtual collections in selectItemsDialog via new
io.hideCollections parameter
- "Convert to Standalone Attachment" button in dialog if
child attachment is selected
- shift enter on a creator row will add a new empty creator
row after focused row. If shift-Enter is on the last creator
before "More creators", all creators will be rendered.
- fixed encountered glitch where switching the mode of
creator would not always update the pref, so next time
a new creator row is added, it would not be of correct
mode.
- fixed encountered bug where a newly added creator row
could receive an index of an existing creator that is not rendered
( "More creators" label is displayed). In that case,
saving such creator would override an existing creator
and erasing that creator would remove invisible creators.
- added a few tests for these edge cases
- on shift-enter in unsaved creator row that only
has whitespace, do nothing, the focus will stay
in that row. It will be discarded if the focus leaves
it with nothing but whitespace.
- fix focus getting lost on shift-enter on an edited
creator field after adding just some whitespace.
Fixes: #4393Fixes: #4710
- Return base field instead of throwing if base field is passed for a
type that has a base-mapped field
- Return false instead of throwing for invalid type-field combination