Commit graph

12515 commits

Author SHA1 Message Date
Martynas Bagdonas
b98a5e0545 Avoid error interrupting annotation extraction from multiple items 2022-08-11 02:25:43 -04:00
Dan Stillman
477dd69d54 Update locales from Transifex 2022-08-11 02:25:43 -04:00
Dan Stillman
82eb701ea7 Try to open external PDF reader to page number for "Show on Page"
PDF-handling code from `ZoteroPane.viewAttachment()` predates
`Zotero.OpenPDF` and didn't handle page numbers for external PDF
readers, so when called from "Show on Page" in a note (via
`ZoteroPane.viewPDF()`) it just launched the file itself in the
specified handler or via the OS.

For now, change to use `Zotero.OpenPDF.openToPage()` when there's a page
number. Later we should use `Zotero.OpenPDF` for everything, but that
code is more complicated than just using `launchFile()`, so we'll need
to do some testing (particularly on Linux) to see what's best.

(Note that "Show on Page" with an external reader doesn't make a ton of
sense, since you can't actually see the annotation, but opening the
right page is better than nothing.)

Fixes #2612
2022-08-11 02:25:43 -04:00
Abe Jellinek
139d92054f Scaffold templates: Pull URL from doc
Link URLs could lead to redirects.
2022-08-11 02:25:43 -04:00
Abe Jellinek
7d3e95e050 Fix Scaffold load error when fontSize pref is set 2022-08-11 02:25:43 -04:00
Abe Jellinek
8d75f37548
fx-compat: Add preferences with full-text/keyword search (#2659) 2022-08-10 18:26:23 -04:00
Abe Jellinek
db600cb5b9 fx-compat: Item box: Don't set flex attribute on HTML elements 2022-08-08 14:52:17 -04:00
Dan Stillman
78b0055206 Change app id to zotero@zotero.org
And remove all references to old id

We can do this because plugins will use new mechanisms for install and
update manifests that don't use the id (which also means it's now only
used internally).
2022-08-08 05:11:21 -04:00
Dan Stillman
ef33731490 fx-compat: Add message to Add-ons pane when no plugins installed
We'll want to update the rest of the instances of "extensions" or
"add-ons" to say "plugins" (unless we think we might support themes, in
which case we can keep "add-ons").
2022-08-06 03:49:40 -04:00
Abe Jellinek
cd296b1f37 fx-compat: Item box: Fix _*FieldValue(), more focus issues
_getFieldValue() and _setFieldValue() were using `.value` instead of
`.textContent`, so the few places that use it were getting/setting ignored
fields on divs.

fbc25834 messed up the tab index logic, shifting the responsibility for
preserving _lastTabIndex across refreshes: originally, the default was to throw
it away, and the caller was responsible for saving and restoring it if the
refresh was caused by tabbing between fields. The bad commit reversed the
situation and made the item box *remember* the _lastTabIndex by default,
meaning that a refresh caused by the notifier, for example, would focus the
last focused field even if it had been closed by the user in the meantime.

That bad change was a misguided attempt to fix the Tab key cycling infinitely
between Item Type, Title, and creators and never reaching further fields. The
actual fix was just to add `, textarea` to the query on line 1459.
2022-08-05 16:12:28 -04:00
Abe Jellinek
1315d02b2c fx-compat: Item box: Correct value margins, remove type dropmarker 2022-08-05 16:12:28 -04:00
Abe Jellinek
1ecc0b113b fx-compat: Item box: Fix auto-scroll functions 2022-08-05 12:32:03 -04:00
Abe Jellinek
cb14564174 fx-compat: Item box: Prevent editor from reopening after close
We did need to reset _lastTabIndex as the line removed in fbc25834 did, but
only immediately surrounding the saveTx() call.
2022-08-05 12:10:16 -04:00
Abe Jellinek
57abea5416 fx-compat: Item box: Remove some dead code
All already being handled by CSS (besides the exact character length limits, but
it's not clear that we really need those - we just ellipsize if it visually
overflows now, which seems fine).
2022-08-05 11:57:54 -04:00
Abe Jellinek
4e6fe4d119 fx-compat: Remove temp item type menulist logging 2022-08-05 11:49:14 -04:00
Abe Jellinek
1c36406b1e fx-compat: Item box: Fix removing creator while editing it 2022-08-05 11:45:58 -04:00
Abe Jellinek
361a83c378 fx-compat: Item box: Restore batch paste behavior
Since <input>s are single-line, we do the split operation on paste instead of on
blur.
2022-08-05 11:45:58 -04:00
Dan Stillman
53a09bb912 Add reason parameter for plugin bootstrap methods
As documented on https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions

And fix method names for `install()` and `uninstall()`
2022-08-05 04:51:07 -04:00
Dan Stillman
51f9150410 fx-compat: Initial plugin support
Plugins are ZIPs containing at least these two files:

- manifest.json: A WebExtension MV2 manifest with basic metadata
  properties and `applications.gecko` with `id` and `update_url`
- bootstrap.js: A bootstrap file, similar to old bootstrapped extensions,
  with `installed()`, `startup()`, `shutdown()`, and `uninstalled()`
2022-08-05 01:08:51 -04:00
Dan Stillman
e82e808f2b Update definition style of Zotero.log() and Zotero.logError() 2022-08-05 01:08:51 -04:00
Dan Stillman
e6256d60ec fx-compat: Fix logging to the browser console 2022-08-05 01:08:51 -04:00
Abe Jellinek
080ada78ee fx-compat: Item box: Prevent tabbing to hidden firstName 2022-08-04 17:20:01 -04:00
Abe Jellinek
fbc2583433 fx-compat: Item box: Fix tabbing 2022-08-04 17:02:41 -04:00
Abe Jellinek
7a22458ed4 fx-compat: Item box: Fix fieldMode resetting on blur
The fieldMode attribute of the input was being set by the call to
switchCreatorMode(), but it didn't carry over to the label that replaces it on
line 1997.

Also removed a debug line and cleaned up a bit.
2022-08-04 16:50:48 -04:00
Abe Jellinek
581f4bdf7b fx-compat: Fix parameter name typo 2022-08-04 15:10:32 -04:00
Abe Jellinek
617ede481a fx-compat: Add roles to banners
Fixes #2655 (with 0983ff)
2022-08-04 14:52:16 -04:00
Abe Jellinek
c7fc98dff6 fx-compat: editContextMenu -> editMenuOverlay
To reflect that it now handles the menu bar Edit menu as well.
2022-08-02 15:50:44 -04:00
Abe Jellinek
64155bf58f fx-compat: Fix edit context menu
The menupopup needs to be in a popupset to show correctly.
2022-08-02 15:49:06 -04:00
Abe Jellinek
27841acb83 fx-compat: Select items dialog: Fix search and make functional 2022-08-01 15:39:57 -04:00
Abe Jellinek
d4cd382092 fx-compat: Fix quick search height shifting 2022-08-01 15:36:06 -04:00
Abe Jellinek
f8ac57bdb1 fx-compat: Don't focus dropdown in quick search textbox
To match old behavior and fix autofocus.
2022-08-01 15:22:25 -04:00
Abe Jellinek
d018133e9b fx-compat: Use html-tooltip everywhere
And convert tooltiptext attributes on item box HTML elements to titles.
2022-08-01 15:02:42 -04:00
Abe Jellinek
812511e31b fx-compat: Open DOI popup as native menu, too 2022-08-01 14:29:35 -04:00
Abe Jellinek
bcf62e688f fx-compat: Item box: Use addEventListener() 2022-08-01 14:27:46 -04:00
Abe Jellinek
1ecb12048c fx-compat: Item box: Restore label top alignment 2022-08-01 14:20:34 -04:00
Adomas Venčkauskas
41907975b0 Adjust integration function comments and test dummy signature 2022-07-26 10:53:05 +03:00
Abe Jellinek
dc0b2ceb8b fx-compat: Item box: Make sure input has room 2022-07-21 16:18:32 -04:00
Abe Jellinek
808375d5e3 fx-compat: Item box: Fix creator name field sizing
Not the exact same sizing as Fx60, because that relied on some quirks
of the Mozilla box model that I can't reproduce with flexbox, but still
works about as well.
2022-07-21 16:12:28 -04:00
Abe Jellinek
37a6cc4de4 fx-compat: Item box: Fix date added/modified alignment
This CSS needs some serious cleanup, but we're getting somewhere.
2022-07-21 11:30:35 -04:00
Abe Jellinek
aeef51bc76 fx-compat: Item box: Clean up spacing 2022-07-21 11:17:31 -04:00
Abe Jellinek
1a8057aba1 fx-compat: Item box: Restore drop marker 2022-07-21 10:20:42 -04:00
Abe Jellinek
26a2398399 fx-compat: Restore guidance panels as CE
Fixes #2711.
2022-07-20 11:12:52 -04:00
Dan Stillman
8bfc42e8d8 Update version to 7.0.0 2022-07-19 22:38:01 -04:00
Dan Stillman
7b10182e4a Disable obsolete "Open in External Viewer" menu option
Hasn't done anything since in-browser viewing of certain file types in
Zotero 4 for Firefox. Perhaps we'd bring it back at some point, but
disable for now.
2022-07-19 22:38:01 -04:00
Dan Stillman
744837cce7 fx-compat: Remove Zotero.MIME.hasInternalHandler()
Hasn't been relevant since the Firefox NPAPI days, but was returning
true for `application/pdf` (possibly due to the bundled pdf.js in
Firefox still being included in our builds, which we should remove if
so), which was causing "Open in External Viewer" to appear, even though
it just opened the internal reader.
2022-07-19 22:38:01 -04:00
Abe Jellinek
5e6dc290b6 fx-compat: Scaffold: Read ESLint output from stdin
Need to update your zotero/translators clone to get linting working again.
2022-07-19 16:26:17 -04:00
Abe Jellinek
14f79018ad fx-compat: Scaffold: Fix "undefined" attributes 2022-07-19 14:44:28 -04:00
Abe Jellinek
db3aa5248c fx-compat: Scaffold: Fix list overflow in Tests 2022-07-19 14:44:28 -04:00
Abe Jellinek
8ff75607a5 fx-compat: Item box: Disable guidancepanel trigger + cleanup 2022-07-19 14:44:28 -04:00
Abe Jellinek
6f8c5d7c51 fx-compat: Item box: Make vertically scrollable 2022-07-19 14:44:20 -04:00