Commit graph

11006 commits

Author SHA1 Message Date
Dan Stillman
65a7bf7fc0 Fix doctype declaration in updates.xhtml 2024-03-30 00:58:54 -04:00
Dan Stillman
92dfca2dc9 fx115: Temporarily disable integration loading 2024-03-30 00:58:54 -04:00
Dan Stillman
b6a597a7f9 fx115: nsIPromptService → Services.prompt 2024-03-30 00:58:54 -04:00
Dan Stillman
ef75f59037 fx115: Remove support for OS.File instance from md5Async() 2024-03-30 00:58:54 -04:00
Dan Stillman
95caebde2b Remove some old connector code 2024-03-30 00:58:54 -04:00
Dan Stillman
920461cd9d fx115: Update lots of OS.File/OS.Path uses 2024-03-30 00:58:54 -04:00
Dan Stillman
5a8a7ebccc fx115: Bundle PluralForm.jsm from older Firefox 2024-03-30 00:58:54 -04:00
Dan Stillman
d026d9684f fx115: Comment out -moz-tree-image CSS rules
We used them for pie spinners for attachment downloads in the items
list, but I guess we lost that with the new tree, and now they just log
warnings because the property was removed. We should reimplement with
SVG.
2024-03-30 00:58:53 -04:00
Dan Stillman
f472ee6a4c fx115: Remove global.dtd includes and chromedir attribute
It only had `locale.dir`, which it looks like we can handle in different
ways now:

- CSS rules with `:-moz-locale-dir(ltr)`
- `let isLTR = document.documentElement.matches(":-moz-locale-dir(ltr)");`
2024-03-30 00:58:53 -04:00
Dan Stillman
13ab3bd87f fx115: Add command-line handling to Firefox command-line handler
XPCOM objects have to be statically registered now, so instead of
creating our own command-line handler, just stuff our code into the
Firefox one.

A few parameters require the Zotero object, which isn't available in the
Firefox CLH, so I've left those in zotero-service.js for now until we
decide how to deal with those.
2024-03-30 00:58:53 -04:00
Dan Stillman
e76c6c6a1a fx115: Update loadURI() calls to take nsIURI and remove loadURIWithFlags
https://bugzilla.mozilla.org/show_bug.cgi?id=1810141
https://bugzilla.mozilla.org/show_bug.cgi?id=1444760
2024-03-30 00:58:53 -04:00
Dan Stillman
c36f40735c fx115: Change FilePicker to Mozilla ESM style
var { FilePicker } = ChromeUtils.importESModule('chrome://zotero/content/modules/filePicker.mjs');
2024-03-30 00:58:53 -04:00
Dan Stillman
95d577beb6 fx115: Add shims for most of OS.File, OS.Path, and OS.Constants.Path
var { OS } = ChromeUtils.importESModule("chrome://zotero/content/osfile.mjs");
2024-03-30 00:58:53 -04:00
Dan Stillman
2051f08b4c fx115: Move Zotero object initialization to zotero.mjs 2024-03-30 00:58:53 -04:00
Tom Najdek
45bd374530
Fix error when dealing with invalid certificates (#3893) 2024-03-29 07:44:40 -04:00
Bogdan Abaev
0f8dce630d qf: fix insertNote dialog breakage
Fix breakage in insert note dialog caused by missing icon container after 1eaff81
2024-03-29 09:59:26 +02:00
Abe Jellinek
37a6df4ccb
editable-text: Clean up render() (#3895) 2024-03-29 01:16:58 -04:00
Abe Jellinek
f9e25675f0 editable-text: Prevent dropping text into read-only field 2024-03-28 13:13:10 -04:00
Abe Jellinek
489cee6b24 FileHandlers: Throw error when handler is missing on Windows/Linux
Not awaiting exec() has the side effect that we no longer get errors
if the executable is missing / isn't actually executable. Extract those
checks to prevent problems of the sort fixed in 63f54d3 in the future.
2024-03-27 13:52:15 -04:00
Abe Jellinek
63f54d3184 FileHandlers: Fall back when _getSystemHandler() fails
Continue to Zotero.launchFile() as intended.

https://forums.zotero.org/discussion/113179/pdfs-will-not-open-in-system-reader-when-double-clicked
2024-03-27 13:23:54 -04:00
windingwind
54b9ff6e8a
Preferences: Dispatch showing on all children (#3876) 2024-03-26 23:05:05 -04:00
Abe Jellinek
4f0e9bb9bb Scaffold: Enable syntax highlighting/formatting in Test Input 2024-03-26 16:36:05 -04:00
Abe Jellinek
a7044db15e Scaffold: Remember cookies set in browser by default
Making this configurable - it's worth testing translators to make sure
that they *aren't* dependent on some specific cookie configuration,
apart from obvious cases like login-gated sites.
2024-03-26 14:22:08 -04:00
Abe Jellinek
37ac6f9058 Update translate submodule 2024-03-26 14:19:47 -04:00
Tom Najdek
a0658b5ada
Fix styles in CSL Preview window (#3873) 2024-03-24 05:56:23 -04:00
Abe Jellinek
750f53aa53 Update translate submodule 2024-03-22 13:14:43 -04:00
Abe Jellinek
bef7ecd409 Scaffold: Print attachment URLs
Useful for debugging. This doesn't apply to tests.
2024-03-22 12:44:30 -04:00
Abe Jellinek
ff96de8723 Scaffold: Remove id field from returned items
Generates confusing diff output and isn't necessary.
2024-03-22 11:41:14 -04:00
Tom Najdek
19f4509075
Fix incorrectly colored icons in create collection dialog (#3872) 2024-03-22 01:23:31 -04:00
Martynas Bagdonas
a50b7ef04a Finish dictionary installation even if file cleanup fails (on Windows) 2024-03-19 12:03:27 +02:00
Abe Jellinek
0e087c8441 Update translate submodule 2024-03-18 15:50:30 -04:00
Abe Jellinek
cee1e3a596 Scaffold: Update copyright year automatically 2024-03-18 12:20:22 -04:00
Sebastian Karcher
6d02076a1c
Scaffold: Fix MARC template, update copyright (#3856) 2024-03-18 12:17:48 -04:00
abaevbog
1eaff8110c
Quick-format: do not hide reference panel (#3816)
Citation dialog: keep reference panel open without selection

- Reference panel remains opened while the focus is on an input
- The first item from the reference panel is no longer selected by default
to avoid unwanted items being added as a bubble
- The first item from the reference panel is selected only when the
dialog has no bubbles or when a search for a non-empty input has ran
- Shift-Enter from input or reference panel will accept the dialog's
state instead of creating a bubble
- Ensure that the reference panel reloads when a bubble is deleted
- Added button to accept the citation dialog

Some other changes:
- Z-icon and spinner/accept icon occupy the same amount
of space
- Ensure that window's width is 800px
- Set the editor's width dynamically when DOM is loaded
- Remove not used css classes and css adding margins to
z-icon.
- Do not accept/bubbleize while loading
2024-03-18 14:27:21 +02:00
Bogdan Abaev
3dc37183b4 qf: fix wrong references panel position on windows
- use dialog as the anchor, not the document element
- after the window is resized, the panel will remain
where it was, so if it's far away from the dialog,
if gets closed and re-opened to reposition it.
2024-03-18 13:00:17 +02:00
Tom Najdek
f144f3a725
Don't use link icon in tabs or open-tabs menu. Resolve #3837 2024-03-15 13:49:43 +01:00
abaevbog
e5dd25fbd5
Fix collections filter not hiding on windows (#3850)
On windows, if the cross icon from the collection filter
search-textbox is clicked, the 'blur' event fires before
the input is cleared, and the filter is never hidden.
To make sure that the search field ends up going away,
hide it if the field is empty and not focused in input
handler.

Fixes: #3840
2024-03-15 03:37:42 -04:00
Bogdan Abaev
eb2ef8a2d1 shortcuts of tab navigation capturing events
2 listeners handle shortcuts and hotkeys: bubbling ZoteroPane.handleKeyDown
and capturing Zoteropane.captureKeyDown.
We generally want shortcuts to be handled by the non-capturing listener
to avoid a conflict with lower level component that may want to handle the event
(e.g. we want to handle Escape keypress only if nothing else took care of it).
Tab navigation is an exception, since we want it to happen all the time.
For example, Ctrl+PageUp can be handled by itemTree but we want to override
it to make sure that it selects the tab regardless of other listeners.

This fixes regression after 5f0e3d5
where the tab selection logic was never reached because the event was handled
by itemTree.
2024-03-13 15:38:40 +02:00
Bogdan Abaev
e07ac555af fix collection highlight regression
- Bring back un-highlighting of collections on keydown if any other
control key besides Ctrl/Options is pressed (with better comments).
It fixes regression after 527fa5b12f
where if one presses, for example, Ctrl-Shift-A to copy an item,
collection highlighting would scroll the collection tree for no reason.

- To decrease the chance of collection highlighting being activated when
it is not intended, only highlight collections when the itemTree is focused
2024-03-13 15:38:40 +02:00
Tom Najdek
f8d59d14bc
Move tags back to beginning of item rows #3781 (#3839)
To get the current behaviour (tags after title), set
pref `extensions.zotero.ui.tagsAfterTitle` to true.
2024-03-12 19:02:52 -04:00
abaevbog
8e5732cf9c
fix to "show in library" not focusing the itemTree (#3836)
- handle additional focusElementID options value in Zotero_Tabs.select to
focus a node with the specified ID, instead of what was recorded
as last focused element
- use that parameter in ZoteroPane.selectItems to make sure that
itemTree is focused after the tab is switched to zotero-pane
- removed redundant calls to Zotero_Tabs.select('zotero-pane') after
Zotero_Pane.selectItems
2024-03-12 18:57:48 -04:00
Abe Jellinek
c31a40c749
editable-text: Make dropping text work when field is unfocused (#3730) 2024-03-12 01:38:00 -04:00
Abe Jellinek
5489b6cc4b
Scaffold: Show current Git branch in title (#3834) 2024-03-12 01:33:03 -04:00
abaevbog
844fd98c72
qf: fix suppress author checkbox click (#3832)
Use <checkbox> instead of <html:input type="checkbox"> for the
suppress author checkbox. <html:input> on mousedown on the actual box
looses focus, so the popover is immediately closed by focusout listener.
Fixes: #3830
2024-03-11 17:53:58 -04:00
windingwind
92a04fcffa
Revert editable text style on Windows (#3828) 2024-03-11 02:25:26 -04:00
windingwind
f0db826b72
Fix update.xhtml style on Windows (#3824) 2024-03-10 01:57:38 -05:00
Tom Najdek
16fa1ac893
Fix attachment icon remains after deleting attachment. Fix #3779 2024-03-08 15:22:15 +01:00
Adomas Venčkauskas
633bee45af Fix Citation dialog not working on Windows with high refresh rates
Closes #3804
2024-03-08 12:24:01 +02:00
Bogdan Abaev
d688ebc10f qf: fix conflicts with windows input styles
Fix regression caused by 23da0d70b0 where
unwanted styles were applied to inputs inserted into quick format dialog
2024-03-07 20:12:31 +02:00
Abe Jellinek
ac196a5944
Preferences: Don't reopen to subpane (#3802) 2024-03-07 03:09:30 -05:00
Abe Jellinek
1ca23fedb2 FileHandlers: Don't await long-running exec() on Windows/Linux
We can await /usr/bin/open on macOS because it returns as soon as the
application has begun launching, but we can't await when we exec a
program directly on other platforms.

Fixes #3799
2024-03-06 14:03:17 -05:00
Abe Jellinek
ba86e9b4c9 Preferences: Catch l10n failure and print a more helpful error 2024-03-04 11:24:32 -05:00
windingwind
23da0d70b0
Implement Windows redesign for native elements (#3727) 2024-03-02 02:51:55 -05:00
windingwind
337f54ac03
Fix attachmetsBox inTrash? (#3780) 2024-03-01 17:11:11 -05:00
abaevbog
b047f3d903
itemBox: ensure the grippy is hidden if <2 authors (#3735)
When contextmenu closes, it clears visibility style from all components.
It is added temporarily so that the options buttons do not
disappear if the mouse leaves the row. The visibility setting for
the grippy for items with only one author should be in
a separate class so that grippy is not displayed by accident.

Fixes: zotero#3732
2024-03-01 00:46:09 -05:00
Abe Jellinek
9e78957c72 Preferences: Fix freeze/double dialog when setting data directory
Addresses #3767
2024-02-29 10:45:52 -08:00
Abe Jellinek
19b12b613b Preferences: Dispatch synctopreference *before* setting preference
Matches pre-fx102 behavior.
2024-02-29 10:44:05 -08:00
Abe Jellinek
ae441c6db1 FileHandlers: Fix Acrobat and PDF Expert not opening on macOS
Fixes #3771
2024-02-29 09:24:11 -08:00
Abe Jellinek
352f71e32e
Fix zotero://open/ and FileHandlers regressions (#3761) 2024-02-29 05:08:33 -05:00
abaevbog
55c5fd2783
do not change input's colors in dark mode (#3769)
Hardcode transparent background and black text color for inputs.
Otherwise, the inputs end up with dark background and white text
which does not work with the rest of the dialog that always has white
background.
This is temporary until the rest of the dialog works with the dark mode.

Fixes: #3768
2024-02-29 00:12:42 -05:00
Abe Jellinek
5e10e627c3
Replace calls to keepParents() with keepTopLevel() (#3766) 2024-02-28 19:13:20 -05:00
yexingsha
b8fa54ecce
Increase image icon contrast (#3762) 2024-02-28 17:03:14 -05:00
Abe Jellinek
cbe75f1de4
New Collection dialog: Widen (#3733) 2024-02-28 01:53:32 -05:00
abaevbog
1a48e4d3f6
quick-format: post-accessibility update edits (#3753)
- Backspace from the very beginning of the input will delete the previous
bubble, as opposed to removing the input itself. If it makes it so that
two inputs are next to each other, they are merged.
- When a new input is created via a mouse click, and the current input
is empty, manually delete it right away. Waiting for the blur handler
to remove it makes it so that the bubbles shift back and forth for a moment
when a new input is added and the old input is not removed.
- Minor tweak to make sure that even if there's a 'br' before an input,
clicking before it will not make a new input and just refocus it.

Fixes: zotero#3749
2024-02-28 00:20:54 -05:00
Abe Jellinek
368e94fbb1
Locate menu: Don't show "New Tab" when external, fix bugs (#3755)
- Run label update logic once instead of repeating on every item
- Show plural attachment type when multiple attachments of same type
  are selected (instead of "Attachments")
- Fix incorrect icon and label showing when openReaderInNewWindow = true
2024-02-28 00:13:07 -05:00
Abe Jellinek
e1538d9f10
Use HTTPS when opening DOIs via Locate menu and double-click (#3757) 2024-02-27 17:42:08 -05:00
Abe Jellinek
50331b9a04 editable-text: Accurately set height limits from min/max-lines
2ex wasn't quite right, so let's use the actual line-height when
possible.
2024-02-27 11:34:02 -08:00
Dan Stillman
98fc32a65e Add Tamil locale from Transifex
Contributed by @TamilNeram
2024-02-27 07:01:49 -05:00
abaevbog
5f0e3d550b
make shortcuts keypress listener non-capturing (#3743)
- ZoteroPane.handleKeyDown does not capture events. It is not strictly
necessary now but it helps to avoid future issues such as one solved in
b15fb36f1b. One benefit from this now is
if one tabs onto a toolbarbutton that opens a menu in contextPane (e.g.
an options button in itemBox), clicks space to open the menu and then
escape to close it, this will keep focus where it was, while the capturing
listener would immediately shift the focus to the reader.
- Removed shift-tab specific case from the handler. It looks like it
was handling the shift-tab in the following scenarios:
from notes search bar (can just be handled by Tab),
from "Return to notes list button" in note editor toolbar (it's no longer there),
from a child of zotero-view-item e.g. itembox. (does not apply,
since zotero-view-item itself is a focusable scrollable area)
- use reader.focus() instead of reader.focusFirst() in tab handler,
since focusFirst() focuses the <body> of the browser and it's not interactable.
2024-02-27 01:52:40 -05:00
Abe Jellinek
bbab56837e Set Abstract section summary to abstract 2024-02-27 01:50:40 -05:00
Abe Jellinek
cb420fb570 Add support for collapsible-section summaries 2024-02-27 01:50:40 -05:00
Dan Stillman
0ace47f742 Quick Format: "Return" → "Enter" for aria-describedBy on macOS 2024-02-27 01:39:26 -05:00
Dan Stillman
a443bc066f Quick Format: Tweak aria-describedBy text 2024-02-27 01:30:09 -05:00
abaevbog
0007d077cc
accessibility improvements for quick format dialog (#3464)
- removed all cursor-related logic. Instead, insert a new input component
each time the user wants to type. The input remain between bubbles
and focusing on one will open the reference panel. Leaving the input hides
the reference panel.
- during drag-drop reordering, lock the editor height so that it doesn't
get out of sync with the window.
- removed the iframe, since it was no longer needed.
- keyboard navigation: Home/End will place an input at the start/end
of the editor and focus it. Tab focuses the last active input if any, or
the input in the end otherwise. Shift-Tab from the editor focuses the
dropdown button if it is active. Tab from the input will focus the first
entry of the reference list. Tab from the reference list will focus the
active input. Shift-ArrowLeft/Right from focused bubble will swap the bubble
with its neighbor. ArrowDown/Up from bubble will open/close the citation dialog.
- when a reference item is selected, previously active input is re-focused.
- aria-properties to have voiceover, JAWS and NVDA read bubbles, inputs and
reference items, as well as announce hints about available keypresses.
- typing from bubble or the reference panel will refocus previously active
input
- different minor updates to make the functionality less janky
- refactoring of refreshing and resizing of the reference panel to
be more straightforward and to only do it when necessary.
E.g. clicking on a bubble and closing the
popover after will not rerun search and just display the old results.
- some throttling logic so that two escape keypresses one after another
when the itemPopover is open do not close the entire dialog
- renamed variables: qfb=dialog, qfe=editor, panel=itemPopover
- use short form of locator string for bubbles
2024-02-27 01:00:14 -05:00
Martynas Bagdonas
5dcaf65757 Don't show context pane toggle in standalone reader window 2024-02-26 20:43:20 +02:00
Tom Najdek
cffb5cdd4b
Fix best attachment type sometimes missing. Fix #3740 2024-02-26 13:14:27 +01:00
Abe Jellinek
52856ae696 Fully block all HTTP requests in the reader 2024-02-24 02:21:06 -05:00
Abe Jellinek
6095ee91ff Generalize RemoteResourceBlockingObserver -> BlockingObserver 2024-02-24 02:21:06 -05:00
Dan Stillman
965149fe0f Merge new English strings 2024-02-23 16:59:24 -05:00
Abe Jellinek
a7d59a90d3
Unify attachment opening code and support EPUB/snapshot note links (#3705) 2024-02-23 06:38:11 -05:00
Tom Najdek
b1333d0e9d
More attachment type icons in the item tree (#3645) 2024-02-23 06:11:40 -05:00
windingwind
ae8cbdf3b7
Support keyboard navigation in attachment preview (#3739) 2024-02-23 05:58:09 -05:00
Abe Jellinek
93536a1592 Fix autocomplete issues caused by stopping 'change' propagation
Only stop propagation when the window is inactive, and don't fire the
synthetic event on blur. Does the same thing as efd7ec6 was intended to
do, but in a less heavy-handed way.

Fixes #3734
2024-02-22 16:39:20 -05:00
Abe Jellinek
efd7ec6dc2 Fix title/abstract saving when window becomes inactive
We weren't stopping 'change' from propagating upwards when the change hadn't
actually been committed yet, and the pane-header and abstract-box CEs
listen to that event instead of 'blur'.
2024-02-22 09:56:28 -05:00
abaevbog
26fd57398c
do not focus contextPane after it's opened (#3728)
When contextPane is toggled open, keep the focused element unchanged

Fixes: #3716
2024-02-22 02:36:51 -05:00
Abe Jellinek
b15fb36f1b editable-text: Don't put 'null'/'undefined' in the field
In case something deleted dataset.initialValue after focus and before we
received this keypress.

Addresses #3725. Might still want to rework that listener, but this
change made sense regardless, since the same kind of race condition
could be triggered elsewhere.
2024-02-21 16:07:02 -05:00
Abe Jellinek
07296b4506 Merge: Count last word when calculating most frequent words
Not that it really matters.
2024-02-21 15:12:14 -05:00
Abe Jellinek
69d9b01b6e Preferences: Exclude HTML hidden="" elements from search 2024-02-21 14:58:49 -05:00
Abe Jellinek
71a85e4d06 Preferences: Delete menulist observer after disconnecting 2024-02-21 12:47:03 -05:00
Martynas Bagdonas
38a42d3c91 Properly trigger shifted annotation sync after deleting PDF pages 2024-02-21 15:04:24 +02:00
Abe Jellinek
64b8c7b250
SingleFile actor: Skip cross-origin frames to fix error (#3721) 2024-02-21 06:43:45 -05:00
Abe Jellinek
130a72af1b
Fix empty Quick Copy locale dropdown (without a freeze) (#3720) 2024-02-21 06:42:59 -05:00
yexingsha
35a324b65b
Replace tag icons and update scss (#3722) 2024-02-21 06:39:12 -05:00
Martynas Bagdonas
2918e5d1a4 Don't use sortable property when inserting a citation inside note editor
Fixes #3723
2024-02-21 09:12:49 +02:00
Abe Jellinek
1f599283df
Fix indexing files with text content types that Firefox won't display (#3708) 2024-02-19 05:11:16 -05:00
Tom Najdek
24cb38cfc8
Fix attachment column icon flickering upon selection (#3695) 2024-02-19 05:04:28 -05:00
abaevbog
826774b1f7
keyboard navigation for tag selector (#3615)
- Tab from the tags list or shift-tab from the tags filter field
focuses the first non-disabled tag. If there are none, the tags are
skipped and the focus moves directly to the input field or the tags list.
- Arrow Right/Left move focus between tags skipping over disabled tags
- Space/Enter clicks on the selected tag
- Space/Enter click on the search button when focused
2024-02-19 04:57:03 -05:00
Tom Najdek
1b751d675b
Trim spaces from values in getFileBaseNameFromItem (#3711) 2024-02-19 04:43:19 -05:00
abaevbog
61d3c5c85c
revision of focus management through the reader (#3687)
- brought back escape behavior that just focuses the reader whenever
a reader tab is opened, wherever it comes from (unless it's from an
element that is .open - like an item type menu, in which case just
let it get closed)
- removed moving focus from contextPane title to sync button on shift-tab
- using new reader methods onIframeTab, onToolbarShiftTab to move focus
to the contextPane on tab from reader iframe or to the sync button
on shift-tab from the toolbar

So now, the focus path is: tab bar -> tabs menu -> sync button -> reader
toolbar -> reader sidebar -> reader scrollable area -> contextPane title
(if visible) or tab bar
2024-02-19 04:03:00 -05:00
windingwind
294835b995
Fix csl editor style in dark theme (#3702) 2024-02-19 03:35:57 -05:00