Commit graph

9804 commits

Author SHA1 Message Date
Tom Najdek
124b64f3a2
Skip importing annotations for non-PDF attachments 2024-04-03 13:21:52 +02:00
Abe Jellinek
ad661e9c8d
Preferences: Fix overflow at small window sizes (#3916) 2024-04-02 16:16:05 -04:00
Tom Najdek
5242851421
fx115: Fix "libraries to sync" appears in a tiny window
Also increased the width of the icon column to avoid truncation
2024-04-02 17:56:03 +02:00
Abe Jellinek
009f2a5607
Bring Check for Updates to front if re-triggered, unify functions (#3861) 2024-04-02 06:42:35 -04:00
Abe Jellinek
0b04a518e7
Open CSL tools as chrome and use native controls (#3908) 2024-04-02 06:39:17 -04:00
Dan Stillman
db5db03c9c HTTP.checkSecurity(): Only throw for state == 'broken' 2024-04-02 06:22:14 -04:00
Dan Stillman
423393c78b Include domain in insecure-connection error 2024-04-02 06:22:14 -04:00
Dan Stillman
35aaa013ed Move ZoteroPane.syncAlert() to Sync.Runner.alert()
And use for sync setup in prefs so that it includes the dialog header
from the sync error messages
2024-04-02 06:22:14 -04:00
Tom Najdek
c16f5d1524 fx115: Fix detecting insecure connection no longer works 2024-04-02 06:22:14 -04:00
windingwind
29c0460930
Fix ZoteroPane#loadURI with zotero: URLs (#3904) 2024-04-01 16:58:55 -04:00
Abe Jellinek
a78d1c3876
Fix window shrinking on each launch (#3910) 2024-04-01 16:33:38 -04:00
Abe Jellinek
669574b484
subprocess(): Use isAbsolute instead of checking for slash (#3911) 2024-04-01 16:22:05 -04:00
Abe Jellinek
2a114cef9b Preferences: Restore subpane Back button
It was technically still there, just offscreen. The wrapper element
was display: block, and some block layout quirk caused the button to
grow to fill the wrapper, which then put it offscreen when rotated.

This removes the wrapper and replaces it with a margin. Also fixes an
incorrect margin in RTL locales.
2024-04-01 11:57:00 -04:00
windingwind
751457268b Fix ItemDetails pinned pane with custom sections 2024-04-01 12:41:08 +08:00
windingwind
ee6b9d7af7 Refactor ItemPaneSection#_handleDataChange
Remove unused _handleDataChange and rename it to _handleItemChange
2024-04-01 11:35:36 +08:00
Tom Najdek
db499fdf2b
fx115: Fix basic viewer wrong window size 2024-03-31 13:00:41 +02:00
Tom Najdek
7bf0aa4958
fx115: Fix wizards
* Fix wrong window dimensions
* Fix missing buttons in import wizard
* Fix tiny items selector in RTF Scan Wizard
2024-03-31 12:39:12 +02:00
Dan Stillman
72168a27ec Add default value for args parameter in subprocess() 2024-03-31 05:26:12 -04:00
Dan Stillman
5d150958de Use absolute path when running sw_vers 2024-03-31 05:26:12 -04:00
Dan Stillman
a45be190ea Fix incorrect instance of PathUtils.join() instead of joinRelative() 2024-03-30 08:10:33 -04:00
Dan Stillman
26bfe3dbdc CI: Fix "invalid ELF header" error for libc.so in OS.File.unixSymLink() 2024-03-30 07:00:52 -04:00
Dan Stillman
38e4fea455 Change "Add-ons" to "Plugins" in Tools menu
Addresses #3354
2024-03-30 05:13:03 -04:00
Dan Stillman
1ae4d12a39 Tweak error text when registering custom item-pane sections 2024-03-30 04:44:32 -04:00
Dan Stillman
56e02b3cad headheader in ItemPaneManager.registerSection() 2024-03-30 04:44:20 -04:00
Abe Jellinek
4e912b84c0 fx-compat: Copy over fx115 Window menu changes (#3899) 2024-03-30 01:02:09 -04:00
Abe Jellinek
1b646fb6e2 fx-compat: Fix up Scaffold a bit
- Output pane no longer gets huge after load
- URL box grows
- Metadata grid fills available space (but still needs work re overflow)
- row-resize cursor on Tests splitter
2024-03-30 01:02:09 -04:00
Abe Jellinek
0f61646e26 fx-compat: Preferences: Fix content not growing with window 2024-03-30 01:02:09 -04:00
windingwind
4407c24329 Support tooltiptext on ItemPane custom section head buttons
Fix ItemPane custom section head button event listener
Update ItemPaneManager document
2024-03-30 01:02:08 -04:00
Dan Stillman
849ffe0133 Don't try to register command line handler if already registered
Avoids an error when reiniting during tests
2024-03-30 01:02:08 -04:00
abaevbog
89320a7ee4 fx115: fix tags autocomplete breakage (#3882)
With fx115, changes from 49fe2b98d9
made the autocomplete popup appear blank when the reader tab is opened.
Not re-creating the PopupAutoComplete in tagsBox makes the items from
autocomplete popup visible again. But it makes the autocomplete appear
below the "Add tags" popup for annotations (what 49fe2b98d9
originally fixed), and it also creates a duplicate <popupset>
with a new autocomplete panel at the bottom of the DOM every time autocomplete runs.
The duplicate <panel>s do not have an id.

Manually adding a <popupset> with a <panel> whose id="PopupAutoComplete"
does not create any duplicates and properly positions the popup.

Fixes: #3881
2024-03-30 01:02:08 -04:00
windingwind
98ed686212 fx115: fix the itemBox rows stretching on menu open (#3898) 2024-03-30 01:02:08 -04:00
abaevbog
2f4a232c41 fx115: fix tooltips for tabs, tabs menu and virtualized table (#3877)
Fix and improve tooltip logic

- fx115: move main html-tooltip outside of the deck, otherwise it only
shows up in the library tab.
- Zotero_Tooltip is not required in the tabs bar and the button of the
tag selector. Setting the tooltip attribute on the closest XUL parent
and adding title attribute makes the tooltip properly appear.
- Remove manual handling of the hover effect from tabs manu. The
hover effect doesn't stick around after drag-drop with fx115 anymore,
so it's not required. And then the usual title attribute works for the
tooltip.
- Set title instead of tooltiptext attribute in tagSelectorList
so that the tooltip appears

After zotero@8e2790e,
the pointer effects don't fire on the actual cells of the table
(only on the parent row), so the tooltips do not appear for the cells.
This is a (hopefully) temporary solution to handle mousemove events over the row
of the table, find the right cell that the mouse is over, and
use Zotero_Tooltip to manually display the tooltip.

Tweaked Zotero_Tooltip to create the fake tooltip and place it into
the DOM. Zotero_Tooltip is also imported by virtualized-table as a module
because one shouldn't have to load it in .xhtml file for every new window
where the virtualized-table is used.
2024-03-30 01:02:08 -04:00
Adomas Venčkauskas
dca7dcccab fx115: Changes for word processor plugin support 2024-03-30 00:58:58 -04:00
Adomas Venčkauskas
7276b8c50d fx115: Readd support for -file, -url and winword command line handlers 2024-03-30 00:58:58 -04:00
windingwind
e51739e1d4 fx115: fix layout on Windows 2024-03-30 00:58:58 -04:00
windingwind
a110e86cff fx115: fix main window element layout 2024-03-30 00:58:58 -04:00
windingwind
bda096a26f fx115: fix attachment box label overflow 2024-03-30 00:58:57 -04:00
windingwind
42724d13f7 fx115: fix context pane notes list layout 2024-03-30 00:58:57 -04:00
windingwind
64489b243f fx115: fix context pane sidenav render 2024-03-30 00:58:57 -04:00
windingwind
41acf4c737 Implement ItemPane custom section API
Unify properties as getter in ContextPane
Replace section `mode` with `editable`
Remove section `inTrash`
2024-03-30 00:58:57 -04:00
windingwind
b34859d882 CEify contextPane 2024-03-30 00:58:57 -04:00
windingwind
b2ad17d604 CEify itemPane 2024-03-30 00:58:57 -04:00
Dan Stillman
827bcd704d fx115: Fix "Check for Updates" window
Also:

- Tweak text to be less alarming (fixes #3074)
- Don't show "No updates found" if update was already downloaded
  (fixes #3148)

Download progress still isn't shown (#3130) but I'll fix that later
2024-03-30 00:58:57 -04:00
Dan Stillman
b42e412c4f Spaces to tabs in updates.js 2024-03-30 00:58:57 -04:00
Dan Stillman
cd3fda98d1 Fix broken tests due to protocol handler and autocomplete re-registration
For the protocol handler, unregister on reinit(). For autocomplete, just
skip registration if already registered.
2024-03-30 00:58:57 -04:00
abaevbog
349ae52b9c fx115: working autocomplete (#3789)
- autocomplete registration removed from chrome.manifest
- static registration happening in zotero.js
- tweaks to autocomplete methods to implement nsIAutoCompleteSearch based on
https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/tests/unit/test_378079.js#154
2024-03-30 00:58:57 -04:00
Abe Jellinek
8cb0c58b60 Restore old flags
Fixes reports!
2024-03-30 00:58:56 -04:00
Abe Jellinek
506482551d Register protocol handler dynamically
Fixes reader but not reports yet.
2024-03-30 00:58:56 -04:00
Bogdan Abaev
1b12b66e48 fx115: classic citation dialog fixes
- have panes for item selection occupy all available space
- use Zotero ES module to fix simple editor

search in classic citation dialog seems broken
2024-03-30 00:58:56 -04:00
Bogdan Abaev
2d3bc12ca0 fx115: lookup panel fixes
- do not resize based on scrollable content - it shrinks the panel
- add padding into the stylesheet
- remove onShowing, since it doesn't seem needed anymore
2024-03-30 00:58:56 -04:00
Bogdan Abaev
5f37ae4ab1 fx115: fix tabs menu
Fixed visuals and working drag-drop again.

Fx115 made previously used toolbarbuttons act very strange wih drag-drop:
instead of dragging the actual button, the #text node would receive
dragstart event and a single letter would end up being dragged.
During troubleshooting, elements created via document.createXULElement
had this issues while being dragged (or acted oddly in other ways, e.g.
refusing to be dragged at all).

This includes a minor rewrite to use div-s instead of XUL components.
2024-03-30 00:58:56 -04:00
Bogdan Abaev
87297f8d29 fx115 fixes
A number of style changes to fix layout for fx115.

- Make panes occupy all width/height based on layout.
- Display the tag splitter on windows and mac.
- Fix to odd fx115 behavior that gives an un-collapsed pane the
initial width of min-width * 2.
- Ensure that whenever there is a width attribute on contextPane, it will
be present in the style as well.
- Set width = 0 on zotero pane when it is not selected because it kept
preventing the contextPane from properly expanding.
- Context pane has its height changed on splitter drag.
- Set height of the context pane in stacked mode to 0 to avoid
having a blank gap after collapse.
- Remove negative margin before the toolbar if the collection tree
is collapsed on mac.
- Tweaks splitter styles to have mouse target of more than 1px.
Added positive z-index to make sure splitters are not covered by panes.
Splitter styles are somewhat unified for all platforms.
- Fix lookup panel sizing
- Quicksearch margin edits to not squize the input field.
- Collection and quick search fields layout fixed
- Use flex properties to fix layout
- fix outline display for editable-text
- fix the contextpane width going out of bounds
- stacked itemPane is visible after layout change
- In stacked view, prevent itemPane from being dragged so high that
it covers itemTree and overlaps with toolbar
2024-03-30 00:58:56 -04:00
Dan Stillman
dd745ed1aa fx115: PathUtils.normalize() requires files to exist
Unlike OS.Path.normalize()
2024-03-30 00:58:55 -04:00
windingwind
c8d49e76e5 Fix title bar layout 2024-03-30 00:58:55 -04:00
Abe Jellinek
6854ad814b fx115: Preferences: Make style manager scroll again 2024-03-30 00:58:55 -04:00
Abe Jellinek
5ca626c143 Don't resize window when Sync preferences are loaded 2024-03-30 00:58:55 -04:00
Abe Jellinek
0c5479f033 Replace TEMP_ strings in hiddenWindow.xhtml
Restores correct menuitem labels and shortcuts.
2024-03-30 00:58:55 -04:00
Dan Stillman
32793b80ae fx115: Temporarily disable missing entities for localized keys 2024-03-30 00:58:54 -04:00
Dan Stillman
f38506bccb fx115: Remove dialogOverlay.dtd include 2024-03-30 00:58:54 -04:00
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
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
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
Abe Jellinek
5e10e627c3
Replace calls to keepParents() with keepTopLevel() (#3766) 2024-02-28 19:13:20 -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
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
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
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
Dan Stillman
5940b63908 Revert "Fix empty Quick Copy locale dropdown"
This reverts commit 0dfe276d9b.

Causing a hang when some people mouse over the Export tab:

https://forums.zotero.org/discussion/111956/zotero-7-beta-freezes-in-the-settings-panel
2024-02-19 03:32:53 -05:00
Martynas Bagdonas
009a2ca38a Properly trigger note image attachment sync and display it when finished 2024-02-16 14:38:17 +02:00
Martynas Bagdonas
d47ed5f747 Hide unnecessary menu separators in Tools menu 2024-02-16 12:31:58 +02:00
Tom Najdek
abe8def0f1
Trim leading/trailing space in filename format string. Fix #3701 2024-02-16 10:17:03 +01:00
Adomas Venčkauskas
f548efde15 Citation dialog: Allow citing the same item multiple times
Removed as part of #3544 but it turns out there's good uses for it:
https://forums.zotero.org/discussion/111831/multiple-citations-of-the-same-source

The same item still won't appear multiple times in the Open Documents
section, but you can look for it in your Library or Cited section
2024-02-15 08:47:57 +02:00
Abe Jellinek
fbc82f687d updateLocaleList: Append menuitem to menupopup, not parent menulist
Appending to the menulist sort of worked - the text of the added
menuitem appeared in the menulist label, albeit off to the right -
but the item didn't actually show in the menu and didn't get removed
on subsequent calls.
2024-02-14 16:38:54 -05:00
Abe Jellinek
ba5d34876e Don't fire syncfrompreference when value hasn't changed
Except during initialization. Fixes an infinite loop when the Quick Copy
locale is set to a custom value.
2024-02-14 16:36:22 -05:00
Abe Jellinek
0dfe276d9b Fix empty Quick Copy locale dropdown
Closes #3254
2024-02-14 16:09:06 -05:00
Abe Jellinek
43d9d604a6 Fix blockRemoteResources passed to wrong method
After OOPification of HiddenBrowser.jsm. The constructor accepts
blockRemoteResources, the load() method ignores it.
2024-02-14 11:25:44 -05:00
Adomas Venčkauskas
beb7b51cb3 Adjust the titlebar/menubar xml and styling.
Reasoning:
- Different Linux DEs specify different titlebar button (min, max,
close) locations which we did not and could not support before.
- Previous approach copied from Firefox depended on custom offsets
specified in CSS instead of allowing the browser engine to place
elements

Changes:
- Titlebar and menubar no longer collapsed into each other with a
negative margin, instead just a single flexbox (on macOS the titlebar
is still collapsed into the tab bar)
- Support for -moz-gtk-csd-reversed-placement to correctly place the
titlebar buttons on Linux
- Removed/changed some code copied from Firefox that does not apply or
uses the wrong selectors
- Fixed the display of Linux Unity DE buttons with icons appearing outside
of button borders
- Removed the Z in the titlebar on Linux since only a few DEs use that.
- Aligned the tabbar on Linux and Windows to the left margin of the
window.
2024-02-14 06:24:00 -05:00
Adomas Venčkauskas
34b389d118 Fix the startup missing data directory picker not working 2024-02-14 13:22:41 +02:00
Abe Jellinek
f729172bdd Fix error after setting custom file handler 2024-02-13 13:58:49 -05:00
Abe Jellinek
872e7b2427 Item/attachment box: Prevent default label focus/blur behavior
Since ceb1dd7da3 added a tabindex on
#zotero-view-item, clicking anywhere outside a field in the pane will
blur the active field. That's an improvement, but it conflicted with our
custom label behavior - when an active field's label is clicked, we want
to blur it and keep it blurred, but the default behavior is to re-focus
it on mouseup.

Fix by preventing the default focus behavior on mousedown/click.
2024-02-09 14:38:56 -05:00
Abe Jellinek
6a39980a97 Save Abstract edits when switching items
Since itemPane.js sets mode before item, the editable-text's value would
get reset before save() ran.

Not touching the header since we're replacing that with an item-box
field (which does not have this bug) soon anyway.

Fixes #3679
2024-02-09 12:21:56 -05:00
Adomas Venčkauskas
0aea17581e Citation Dialog: Show selected notes in the Add Note dialog
Closes #3642
2024-02-09 14:24:05 +02:00
Adomas Venčkauskas
d852185950 Citation Dialog: Fix open documents being matched multiple times.
Closes #3690
2024-02-09 14:17:43 +02:00
Abe Jellinek
4a91df1b1d
Add test for SandboxItem#setExtra() (#3572) 2024-02-09 09:34:47 +02:00
Adomas Venčkauskas
90282b3739 Clear item tree pivot after switching collections. Closes #3551
After switching collections and shift-clicking on the item tree
will no longer group-select from the pivot of the previous selection
2024-02-08 15:03:02 +02:00
Bogdan Abaev
527fa5b12f linux: collection highlight on control
On Linux, trigger collection highlighting on Control instead of Alt
to not interfere with the menubar.

Addresses: #3683
2024-02-08 10:07:36 +02:00
Adomas Venčkauskas
88482bd776 Do not register the menu access key handlers multiple times 2024-02-07 17:18:56 +02:00
Bogdan Abaev
fc5aa1a6ba win: no collection highlight if input is focused
So that collections do not randomly get highlighted when one clicks
Ctrl-C/Ctrl-V to copy-paste something in the itemPane
2024-02-06 15:20:43 -05:00
abaevbog
ceb1dd7da3
additions to keyboard nav for toolbar buttons and reader (#3602)
- handle space and enter in zotero pane to always click on toolbarbutton.
It ensures consistent behavior across all components to avoid Enter
triggering click on some buttons but not others.
- address the issue of focus not being able to leave the reader once it
gets there. On Escape, when reader is opened, instead of re-focusing the reader,
focus the selected tab. From there, Enter will focus the reader, and tabbing
allows you to reach the itemPane.
- Tab/Shift-tab moves focus between Sync button and itemPane when
reader is opened
2024-02-06 12:51:06 -05:00
Bogdan Abaev
e69ce9b86c avoid ztabindex overlap when new creator is added
Increated the ztabindex offset for non-creator rows, so that when a new
creator is added but not saved yet, there is no two elements with
the same ztabindex which would break tab-based navigation

Fixes: #3666
2024-02-06 12:44:29 -05:00
Bogdan Abaev
15d5dcaaee itemBox creator names fixes
- Instead of setting default name as the value of the field when a
creator name is empty, set the default names as a placeholder so that
it shows up only when the field is empty.
- Have the creator options show up before the creator is saved so that
the mode can be switches before saving the creator.
- Re-do of capitalizeCreatorName to not break when one of the names is focused.

Fixes: #3610
2024-02-06 12:44:29 -05:00
abaevbog
3a2cd70684
update tab when collection row is updated (#3673)
When saved search, collection or feed is renamed, update the zotero-pane
tab so that it has the new title.

Fixes: #3664
2024-02-06 02:23:09 -05:00
Abe Jellinek
de89e82e75 Make Tags/Related sections functional in note windows
Fixes #3581
2024-02-05 17:11:42 -05:00
Dan Stillman
f29f87ad5b Fix missing "Edit Saved Search" label
Regression from f8108aca45

https://forums.zotero.org/discussion/111486/zotero-7-beta-edit-saved-search-from-right-click-on-a-saved-search-collection
2024-02-04 06:22:50 -05:00
Abe Jellinek
6486c509ad Fix customElements.js error when editing saved search
Fixes #3672
2024-02-02 15:32:55 -05:00
windingwind
3acef799f5
Fix custom elements import (#3639)
Fixes #3600
2024-02-02 04:02:08 -05:00
abaevbog
a74c86d948
collection search tooltiptext and placeholder cleanup (#3632)
Fluent tooltiptext for collection search button and placeholder
for collection search input
2024-02-02 03:58:27 -05:00
abaevbog
4a3a80b4f8
editable-text min/max-lines attributes (#3649)
- min/max-lines attribute on editable-text determines how tall the field
can/has to be
- if max-lines is not specified (or is below 1), the textarea will expand
as much as needed without overflow
- removed hardcoded height and variables from css, substituted them with
usage of these attributes for consistency
- No fields have any max-lines at this point, so all fields will expand as
needed
2024-02-02 03:53:23 -05:00
Abe Jellinek
c10dabcbba Ignore editable-text blurs caused by window becoming inactive
Fixes #3588
2024-02-02 03:39:55 -05:00
Abe Jellinek
6b1940cebb Add generic menu for all unfocused editable-texts 2024-02-02 03:39:55 -05:00
Abe Jellinek
af79e9c405 Ignore base-mapped fields more robustly 2024-02-02 03:39:55 -05:00
Abe Jellinek
b8c1b7c139 Fix DOI View Online/Copy as URL regression
Was opening/copying the bare DOI, not the URL.
2024-02-02 03:39:55 -05:00
Abe Jellinek
fa6e6f9458 Make existing edit context menus more context-aware
- Don't show the default text editing context menu when right-clicking
  an unfocused editable-text
- In item box/header context menus, only show Copy and Paste (plus
  field-specific transform options) when unfocused

Fixes #3619
2024-02-02 03:39:35 -05:00
abaevbog
9823b1199a
no extra arrows from scrollable components on win (#3634)
Somehow `scrollbar-width: thin` removes unnecessary arrows from
editable-text textarea and itemPane on windows

Addresses: #3633
2024-02-02 03:05:59 -05:00
Tom Najdek
41ccbc90a0
Fix missing variable value in import wizard localization. Fix #3471 2024-02-01 15:41:23 +01:00
Tom Najdek
6efbf4c2ec
Fix tab content misaligned in RTL mode. Fix #3658 2024-02-01 15:41:23 +01:00
abaevbog
8bcf1d446a
url/doi/options icon does not occupy space unless hovered (#3631)
url/doi/options do not occupy space unless the row is focused or hovered.
This does not apply to options icons after multiline fields because
it would shrink textarea on hover and shift text in an awkward way.

Fixes: #3612
2024-02-01 04:27:32 -05:00
Martynas Bagdonas
8a9df4a1b3 Move context pane toggle into reader toolbar
Related #3648
2024-02-01 14:49:59 +08:00
Dan Stillman
ebd3d7a988 Fix wrong tab being selected after Reopen Closed Tab
Fixes #3651
2024-02-01 00:55:02 -05:00
Tom Najdek
493c3add8a
Fix a memory leak in file renaming preferences pane (#3654) 2024-02-01 00:44:22 -05:00
Dan Stillman
f8108aca45 Move "Rename Collection" and "Edit Saved Search" to Fluent
Without ellipses

And remove unused "Edit Feed…", which is in zotero.dtd too
2024-02-01 00:42:14 -05:00
Abe Jellinek
a4c09ed701 Trigger inline editing from Rename Collection... 2024-02-01 00:42:14 -05:00
Abe Jellinek
ab5def98a7 Move item type menu CSS override to SCSS 2024-01-31 14:48:59 -05:00
Abe Jellinek
0e251b4975 Scaffold: Fix tests losing defer: true on update 2024-01-31 14:30:34 -05:00
Abe Jellinek
7944253bed Scaffold: Update HiddenBrowser to use object-oriented API
Fixes updating tests.
2024-01-31 14:27:21 -05:00
Abe Jellinek
3f348e3340 Use actual placeholder attribute for editable-texts
As far as I can tell, the Abstract field was the only editable-text
using a placeholder set by Fluent.

https://github.com/zotero/zotero/pull/3632#issuecomment-1919619813
2024-01-31 13:06:57 -05:00