Commit graph

10469 commits

Author SHA1 Message Date
Abe Jellinek
a4c3f5267b Fix ScienceDirect PDF downloads
ScienceDirect sometimes puts the `name` directive at the end of the Content-Type
header instead of in Content-Disposition. That isn't strictly spec-approved, but
there are other directives (`charset` and `boundary`) that can also be appended
to Content-Type per the spec. We want to strip them before looking for handlers.

https://forums.zotero.org/discussion/105194/sciencedirect-pdf-downloads-not-working-zotero-7
2023-05-25 17:57:32 +03:00
Dan Stillman
6e2ec2300d Fix checking for Firefox profiles high up in filesystem
This was triggering an erroneous warning dialog about a failure to check
for Firefox profiles during Linux tests (where the profile is at
something like /tmp/tmp.l5phnqSxBH/Zotero), but it could also affect a
custom profile directory location.
2023-05-25 03:37:06 -04:00
Abe Jellinek
6405997723 Use Zotero.appName in window title 2023-05-25 09:13:42 +03:00
Abe Jellinek
91fec9024c Bidi: Fix control characters appearing in reader window titles on Windows
Fix in 6d5ce578e4 only affected tabs.

Fixes #3135
2023-05-25 09:05:36 +03:00
Abe Jellinek
087a9859b4 Fix preference binding issues and "Include Zotero Links" checkboxes
- Set zotero-noteQuickCopy-menu's preference attribute to the correct key
- Warn about all ID-ish preference attribute values
  - zotero-noteQuickCopy-menu's preference attribute was being set to the ID of
    a now-nonexistent <preference> element. preference attribute values should
    be preference keys now, but we were only warning if the associated
    <preference> element was actually there
  - We can't warn in all cases where the preference doesn't yet exist, because
    some preferences don't have default values, and we shouldn't limit to
    preferences that don't exist, because then the warning will stop showing
    after the preference is persisted once
- When a <preference> ID is replaced by the associated key, update the
  preference attribute so future syncFromPref() and syncToPrefOnModify() calls
  will set the correct preference
- Listen to a range of events on all bound nodes, no matter their type
- Don't resolve _firstPaneLoadDeferred until actually done loading

Fixes #3131.
2023-05-24 20:46:00 +03:00
Martynas Bagdonas
26068a855c Make note editor iframe an XUL element to avoid focus anomalies
Fixes #3128
2023-05-24 17:38:15 +01:00
Dan Stillman
0b1d958a86 Fix erroneous warning if Firefox profile directory can't be found
`Zotero.File.getContentsAsync()` now uses IOUtils rather than OS.File
2023-05-24 06:53:23 -04:00
Dan Stillman
f5433f04e6 Update searchfox link to permalink 2023-05-24 02:25:20 -04:00
Abe Jellinek
caa1036da2 Remote translation: Don't use wantGlobalProperties
Not necessary - just use the properties we inherit from contentWindow. This
fixes the DOMParser constructor, which fails if called without a window context
from a non-system principal.

https://forums.zotero.org/discussion/105163/zotero-7-doi-translator-broken-in-scaffold
2023-05-23 22:30:24 +03:00
Abe Jellinek
fd6ea99967 Item box: Always save current item when switching items
Fixes #3125
2023-05-23 19:40:09 +03:00
Abe Jellinek
61749d39a6 Item box: Populate both fields on creator autocomplete click
Fixes #3129
2023-05-23 19:06:56 +03:00
Dan Stillman
8440501ad2 Remove unused Zotero.isBigSurOrLater property 2023-05-23 01:55:31 -04:00
Dan Stillman
f9dab9b041 Show correct OS info in error reports 2023-05-23 01:55:31 -04:00
Dan Stillman
478dcc4f0f Add Zotero.Utilities.Internal.subprocess(command, args)
To run a short-lived command and return stdout

The Subprocess module can also start long-running process and
communicate with them, but we'll implement something different for that
if we need it.
2023-05-23 01:46:25 -04:00
Dan Stillman
522de4ad92 Add 32/64-bit info after version number in about dialog on Windows/Linux 2023-05-22 23:58:00 -04:00
Dan Stillman
66623b945e Temporary fix for context-menu options getting triggered on Windows
https://forums.zotero.org/discussion/105103/right-click-on-collections-or-items-not-functioning-properly-in-zotero-7
2023-05-22 06:16:53 -04:00
Dan Stillman
55fe6f33f5 fx-compat: Fix XMLSerializer calls
https://forums.zotero.org/discussion/105118/zotero-7-error-upon-exporting-in-mods-format
2023-05-22 01:34:41 -04:00
Dan Stillman
c653449cc0 Increase active tabs count from 2 to 3 on <=8 GB systems
To match current Zotero 6 behavior on non-Windows systems
2023-05-20 19:12:19 -04:00
Abe Jellinek
db4a79838b Preferences: Resync menulists when their subtrees change 2023-05-19 16:54:32 +03:00
Abe Jellinek
ff43d1877e Focus preferences window if already open on Cmd-Comma 2023-05-19 16:46:24 +03:00
Abe Jellinek
eecd85a1c2 Disable window dragging inside toolbar controls
And enable in the context pane toolbar extension.
2023-05-17 16:52:50 +03:00
Abe Jellinek
f299692de7 Allow window dragging from PDF reader toolbar
Fixes #2713
2023-05-16 16:23:32 +03:00
Dan Stillman
3ba6fbf0f7 Avoid warnings in console due to duplicated brand.ftl
zoteroPane.xhtml includes base.js via customElements.js, and base.js
inserts brand.ftl, so we don't need to include brand.ftl as a link.
2023-05-10 07:12:24 -04:00
Dan Stillman
05fd1601ad Update locales from Transifex
This removes some newlines due to processing changes in our script.
2023-05-10 06:25:05 -04:00
Dan Stillman
b8c9bfcc34 Update non-English Mozilla locale files
Mostly just minor whitespace changes due to changes in our processing
script
2023-05-10 06:25:05 -04:00
Dan Stillman
8cf7993af5 Add non-English updates.properties
(And update the en-US version with some strings that we don't use but
might if we updated to a slightly newer version of the updater before
they got rid of the dedicated update window)
2023-05-10 06:25:05 -04:00
Dan Stillman
08a508b750 fx-compat: Fix collections-containing-an-item highlight 2023-05-09 17:49:18 -04:00
Abe Jellinek
fa31956d28
fx-compat: Fix feed button appearance/overflow behavior (#3114) 2023-05-09 16:38:33 -04:00
Abe Jellinek
942986c6b6 fx-compat: Use native checkboxes for Quick Copy options 2023-05-09 16:01:52 +03:00
Abe Jellinek
508cd0a64c
Hide About window in Window menu (Mac) (#3113) 2023-05-08 20:35:40 -04:00
Abe Jellinek
8c37865c07 Fix add-on install error message when file is entirely invalid
If the file wasn't an XPI at all, or it didn't contain valid metadata for fx102,
the error message would previously show "%S" where the add-on name should be.
Now we fall back to the file path.
2023-05-08 20:13:47 +03:00
Abe Jellinek
b30f97dad5 fx-compat: Allow file drop on Add-ons window
Fixes #3099
2023-05-08 20:06:47 +03:00
Abe Jellinek
ddbcc32bd8 fx-compat: Basic viewer: Add necessary FTL 2023-05-08 19:51:31 +03:00
Dan Stillman
371bcfea81 "Zotero Preferences" → "Zotero Settings" on macOS
Fixes #3105
2023-05-07 23:56:16 -04:00
Dan Stillman
87c71f74a0 Move -app-name variable to brand.ftl
So a custom build doesn't have to modify each .ftl file

`app-name` is redundant with the Firefox strings, but it's what we used
previously and is easier to remember.
2023-05-07 23:55:34 -04:00
Dan Stillman
43373b77ec Remove connectorTypeSchemaData.js and update build_typeSchemaData.js
We now use zoteroTypeSchemaData.js in the connector, so update the
build script to generate that.
2023-05-06 02:01:03 -04:00
Dan Stillman
2dc08a0dfb Fix React key warning after 4c283d88c7 2023-05-05 06:48:49 -04:00
Dan Stillman
2e0f7062c3 Don't log error at startup if session.json doesn't exist 2023-05-05 06:42:31 -04:00
Dan Stillman
4974532276 Z7: Fix Mark as Read/Unread button in feeds not working
Fixes #3092, but overflow in non-English locales needs to be addressed
in #3110
2023-05-05 06:34:43 -04:00
Dan Stillman
5a75c59bf2 Z7: Style improvements in update dialog 2023-05-05 05:20:33 -04:00
Dan Stillman
fc48025629 Reindent updates.css 2023-05-05 05:15:41 -04:00
Dan Stillman
00703c0b8f Z7: Fix conflict resolution merge window styling
Closes #3090
2023-05-05 04:28:07 -04:00
Dan Stillman
4c283d88c7 Remove key hack for setting innerHTML in item tree
Results in a segfault during tests due to a null pointer deference
2023-05-04 08:40:06 -04:00
Dan Stillman
febc2fcc7d fx-compat: Wait until request completion in WebProgressFinishListener
`nsIWebProgressListener.onStateChange()` gets called twice at the end of
requests, once with `stateFlags` set to `327696` and once with it set to
`262160`, which corresponds to `STATE_STOP + STATE_IS_NETWORK +
STATE_IS_REQUEST` and `STATE_STOP + STATE_IS_NETWORK`. httpd.js debug
logging shows that the connection is closed between the two calls. In
WebProgressFinishListener, we were previously calling `onFinish` after
the first one, but in Zotero 7, at least on Linux (or maybe just on
slower machines due to a race condition), the file from `saveURI()`
doesn't appear to be reliably written after the first call, causing
`Attachments.downloadFile()` to fail in `_enforcePDF()` due to an empty
file.

This changes WebProgressFinishListener to wait until the second
`STATE_STOP` call. We'll have to confirm whether this is the
state-change pattern for all requests, but it fixes our Find Available
PDF tests in CI.
2023-05-01 02:52:37 -04:00
Dan Stillman
296c0142f2 fx-compat: OS.File.read()IOUtils.read() in getContentsAsync()
https://firefox-source-docs.mozilla.org/dom/ioutils_migration.html

This also fixes a bug when `getContentsAsync()` is passed an
`nsIInputStream` or `nsIChannel` where raw bytes were returned instead
of a string. Not sure if we're doing that anywhere. If we are, this
would presumably break that code, but the function is supposed to return
a decoded string.
2023-04-30 05:23:41 -04:00
Dan Stillman
2f6f2feade for…infor…of in sniffForMIMEType() 2023-04-29 18:50:39 -04:00
Dan Stillman
4ec357bb26 Use pdf-worker to extract text for item.attachmentContent if no cache 2023-04-29 17:38:14 -04:00
Dan Stillman
c326a6c971 Fix more files for combined repos 2023-04-29 07:50:54 -04:00
Dan Stillman
e46ae13a5a Remove resizabledialog.xml binding 2023-04-29 03:15:39 -04:00
Dan Stillman
4a77bc4be0 fx-compat: Update conflict resolution merge window (#3090)
Tests passing, but not yet styled properly
2023-04-29 03:13:53 -04:00
Dan Stillman
ed224dce34 Z7: Update relatedbox tests 2023-04-28 01:54:00 -04:00
Dan Stillman
07acfb444a Z7: Fix Add Item by Identifier tests (and rename textbox)
Now only one textbox, so no need to call it 'multiline'
2023-04-28 01:54:00 -04:00
Dan Stillman
42f87597cf Add missing debug line for notifier registration 2023-04-27 03:39:25 -04:00
Dan Stillman
59ca0731b8 Fix note editor not being properly unregistered from notifier 2023-04-27 03:37:31 -04:00
Tom Najdek
a8c30362a1
Remove shadow root from PublicationsLicenseInfo #3082
* Fix legacy css path
 * Rename license-info.scss -> publicationsLicenseInfo.scss to match element name
2023-04-26 15:23:49 +02:00
Tom Najdek
842f474939
Remove shadow root from StyleConfigurator #3082
Also renamed style-configurator.scss -> styleConfigurator.scss
2023-04-26 15:23:49 +02:00
Dan Stillman
947fa2b558 Ignore numeric values for Type: lines in Extra
https://forums.zotero.org/discussion/comment/433334/#Comment_433334
2023-04-26 04:55:43 -04:00
Dan Stillman
eaef035062 Update non-en-US updates.dtd based on en-US file
Now that the localizer has been updated to handle Mozilla
.dtd/.properties files
2023-04-26 04:40:22 -04:00
Dan Stillman
144dbf8af0 Add Mozilla updates.dtd for non-English locales
From some 2017-era langpacks I had downloaded. These strings aren't in
current langpacks, which use a different update mechanism, but we're
bundling a modified version of updates.xhtml from Firefox.
2023-04-26 04:40:22 -04:00
Dan Stillman
15151acb3e Add Mozilla locale strings for Breton 2023-04-26 04:40:22 -04:00
Dan Stillman
3d0896f1b6 Update menubar.ftl and textActions.ftl from current Mozilla langpacks 2023-04-26 04:40:22 -04:00
Dan Stillman
9236d65215 Add Mozilla wizard.ftl 2023-04-26 04:40:22 -04:00
Dan Stillman
3693674fc9 Fix Fluent localization for non-English locales
All declared Fluent files need to exist for a locale to be used (in a
window?). Since Mozilla code tries to load Fluent files, we need to copy
non-English Mozilla .ftl files to their default effective path (just in
the app omni.ja instead of the toolkit omni.ja).

Fixes #3094
2023-04-26 04:40:22 -04:00
Abe Jellinek
c07eccb468 Scaffold: Improve perceived translation speed
When translators do a lot of logging.

https://github.com/zotero/translators/pull/3022#issuecomment-1517291971
2023-04-21 13:38:42 -04:00
Dan Stillman
fb2d35c765 Better logging for changes to deleted property 2023-04-21 06:51:41 -04:00
Dan Stillman
4a30dd2e4f Fix potential sync error after Replace Online Library in group
https://forums.zotero.org/discussion/104431/syncing-problem

Replace Online Library can upload annotations created by others in a
group library, so if the upload resulted in a local write, "Cannot edit
item in library" was thrown, since annotations by others aren't
writable. This should've only been a problem if the uploaded data was
actually modified by the server, but we were also checking whether
objects were editable before checking if they had actually changed, so
it would happen for any upload of another person's annotation.

This fixes the order of checks when saving objects and makes an
edit-check exception for saving uploaded data for group annotations.
2023-04-21 06:51:25 -04:00
Abe Jellinek
c7d30ebde4
Allow disabling JavaScript in basic viewer (#3089)
And:
- Prevent JavaScript inside notes from executing in reports
- Update calls to openInViewer() to pass an options object
2023-04-20 15:50:57 -04:00
Dan Stillman
78a81f321a Update utilities and translate submodules 2023-04-20 05:48:10 -04:00
Dan Stillman
1ec37ebcbf Fix redundant Number on Dataset item type 2023-04-20 03:21:33 -04:00
Dan Stillman
7774cb7ffb Update citeproc-js to 1.4.63
73bc1b44bc
2023-04-19 17:27:06 -04:00
Adomas Venčkauskas
a9937740c5 Fix classic citation dialog collection tree not working (regression b213b8f1)
Report https://forums.zotero.org/discussion/104460/zotero-6-0-24-classic-add-citation-dialog-doesnt-show-collections-content
2023-04-19 15:26:24 +03:00
Abe Jellinek
83527d27fb Preferences: Fix site settings delete button being disabled after click 2023-04-18 14:10:24 -04:00
Adomas Venčkauskas
50e780ad57 Fix broken citation dialog (regression 01b9a3c2) 2023-04-18 14:51:16 +03:00
Abe Jellinek
b222bbcccb fx-compat: RemoteTranslate improvements
- Support removeHandler()
- Return DB items from translate() when called with libraryID
- Don't invoke done until attachments are done

Fixes #3084 ("after all" hook still times out, but that happens even if the test
is disabled)
2023-04-17 16:20:54 -04:00
Dan Stillman
348083d287 Refresh Feeds row when feed unread count is updated
Regression from fd744fb526
2023-04-15 05:51:38 -04:00
Dan Stillman
44f283c4a2 Update translate module
Missing from #2784
2023-04-15 03:38:08 -04:00
Dan Stillman
2796e6c80a Fix attachment tests that depend on HTML indexing
HTML files are now indexed instead of read directly, and indexing was
previous skipped in tests and otherwise performed on a delay, so set a
flag in the affected tests that triggers inline indexing.
2023-04-15 00:24:35 -04:00
Dan Stillman
d1ae009f57 Fix HTML indexing when using linkFromDocument() 2023-04-15 00:24:13 -04:00
Dan Stillman
c81391b5b6 Fix Collection condition in Advanced Search (regression from 6b819e259c)
The shadow root here is from xul:menulist, not one of our CEs.
2023-04-14 16:00:26 -04:00
Dan Stillman
033733122a
Merge pull request #2784 from AbeJellinek/fx-compat-loadDocument
fx-compat: Implement Scaffold functions, SingleFile, PDF redirects, and style installation
2023-04-14 15:07:26 -04:00
Abe Jellinek
893ad2bf62 fx-compat: Fix PDF and style interception 2023-04-14 11:44:52 -04:00
Abe Jellinek
0612a9e6f5 fx-compat: Run translation and SingleFile in [hidden] browser
And replace loadDocuments().
2023-04-14 11:44:44 -04:00
Abe Jellinek
b2947aede0 fx-compat: Fix attaching CookieSandbox to a browser 2023-04-14 11:44:02 -04:00
Abe Jellinek
667058204d fx-compat: HiddenBrowser: Fix destroy() and URI/path check 2023-04-14 11:44:02 -04:00
Abe Jellinek
4b99b2715d fx-compat: HiddenBrowser: Add more options
- Make docShell properties configurable
- Allow requiring a successful HTTP status code
2023-04-14 11:43:48 -04:00
Adomas Venčkauskas
fd744fb526 Fix feed update refreshing, scrolling item and collection trees
Closes #2950
2023-04-14 15:23:01 +03:00
Dan Stillman
49b7e43c81 Zotero{ -app-name } for some localized strings 2023-04-14 07:03:31 -04:00
Abe Jellinek
01b9a3c268
fx-compat: Fix <tab> keyboard nav, move CE imports to single file (#2756)
Having a single customElements.js file that we import everywhere we need it
helps with organization, and it gives us a single place to put things like the
<tab> fix.

We could switch to using setElementCreationCallback() like Firefox if the number
of imports gets out of hand, but the overhead right now should be small.
2023-04-12 23:09:40 -04:00
Dan Stillman
33ef7b1641 Prevent setting search .name to empty value
Prevents bug in zotero-citation plugin (at least on macOS) from creating
a search that breaks syncing

We were already checking for a missing name in `saveTx()`, but the
plugin is saving the same search twice in rapid succession, the second
time without a name, and the second attempt clears the search object's
name value after the first save's `_initSave()` check and before its SQL
write. The second save fails, but the first save goes through without a
name, resulting in a sync error.

https://forums.zotero.org/discussion/104274/id-1702002152-cannot-sync
https://github.com/MuiseDestiny/zotero-citation/issues/31
2023-04-12 22:23:13 -04:00
Dan Stillman
cadfca7475 Set a default annotation color if not assigned
https://forums.zotero.org/discussion/104249/sync-issue-on-ipados
2023-04-12 22:23:13 -04:00
Abe Jellinek
b33d3ec799
Basic viewer: Open separate windows per URI (#3081) 2023-04-12 16:53:28 -04:00
Dan Stillman
8e6f33f045 Re-enable hardware acceleration
For all the people who turned it off to fix rendering problems in the
PDF reader due to Fx60
2023-04-12 06:14:50 -04:00
Martynas Bagdonas
e6e424836d Update PDF.js in PDF reader 2023-04-12 11:15:46 +03:00
Martynas Bagdonas
5880d62000 Fix citation dialog opening from note editor 2023-04-12 11:14:56 +03:00
Abe Jellinek
e747c089fc fx-compat: Basic viewer: Fix menus
- Add strings and items to previously empty and untitled Edit and Window menus
- Add basic context menu to the browser
2023-04-10 16:47:08 -04:00
Abe Jellinek
72ec5c64d9 fx-compat: Fix printing from basic viewer
Fixes #3071
2023-04-10 16:09:06 -04:00
Abe Jellinek
48f7830558 fx-compat: Load zotero://report/ channels as chrome
It seems that the issue wasn't that zotero:// URLs can't be loaded in a content
browser, but rather that the report extension was returning a channel that the
content browser couldn't access. For some reason, it handled that failure by
passing the URL off to the OS, which then opened a duplicate instance of Zotero.

Also:

- Remove ensureBrowserType() and always use <browser type="content"> in
  basicViewer (see b8966f)
- Fix system principal being used to load extensions without `loadAsChrome` set
  to true if an extension with `loadAsChrome` set to true had been loaded in the
  past
2023-04-10 16:01:09 -04:00
Abe Jellinek
6a85dd2c5e
fx-compat: Lay out preferences window with flexbox (#3073) 2023-04-10 15:37:50 -04:00
Abe Jellinek
80c2f233d4 fx-compat: Fix WebDAV settings layout
Fixes #3069
2023-04-10 14:39:17 -04:00
Dan Stillman
1db153b66b Space out pref sections 2023-04-10 06:43:41 -04:00
Dan Stillman
593b4fd515 Move Config Editor button to bottom of Advanced prefpane 2023-04-10 06:43:15 -04:00
Dan Stillman
8b2362a84e Update locales from Transifex and merge new English strings 2023-04-10 06:09:04 -04:00
Dan Stillman
6372d3c01b Point to our textActions.ftl in editMenuOverlay.js
This doesn't help with zotero/zotero-standalone-build#113, though.
2023-04-10 05:59:41 -04:00
Dan Stillman
db856014aa Remove obsolete extensions-pane overlay 2023-04-10 05:59:41 -04:00
Dan Stillman
16ef1c476e
Merge pull request #3067 from tnajdek/2925-direct-login-fx-102
Port Mendeley Import fixes & improvements from master branch
2023-04-08 18:03:18 -04:00
Dan Stillman
d420ab34eb Mendeley importer: Add native=true to checkbox 2023-04-08 17:17:14 -04:00
Abe Jellinek
6d5ce578e4 Bidi: Fix control characters appearing in the window title on Windows 2023-04-07 13:50:15 -04:00
Dan Stillman
79fa3c7b0f Remove obsolete parameter to WebSocket constructor 2023-04-07 01:32:19 -04:00
Tom Najdek
5e2507041d
Remove unused import, nicer plurals, lint 2023-04-06 17:10:13 +02:00
Tom Najdek
a6042d3958
Mendeley importer: Fix issue with empty tags (#3018)
Also adds a test for this particular case and for importing tags in
general.
2023-04-06 17:10:13 +02:00
Tom Najdek
96022847d7
Mendeley importer: Fix issue with empty creators (#3016)
It does not appear to be possible to create a creator with no values in
Mendeley, however we got reports of these causing the imports to fail.
This tweak makes the importer more resilient by discarding empty/invalid
creators.
2023-04-06 17:10:13 +02:00
Dan Stillman
a6a69605c6
Mendeley citation relinking tweaks
- Show "More information" link next to relink option
- Automatically check relink option when coming from integration prompt
- Change done message to "[x] items were relinked" instead of "0 items
  were imported"
2023-04-06 17:10:13 +02:00
Adomas Venčkauskas
e10fc538d0
Add a prompt to import Mendeley DB if mendeley citation found in doc 2023-04-06 17:10:13 +02:00
Adomas Venčkauskas
9b938f2236
Add a nicer interface for prompts 2023-04-06 17:10:13 +02:00
Tom Najdek
197d8d1f3b
Add option to Mendeley importer to relink items
New option only appears if importer version is < 1 or not present.
It will:
    * Skip fetching collections and attachments
    * Skip any new items
    * Update relations on existing items
2023-04-06 17:10:12 +02:00
Dan Stillman
80bdf51ecb
Store Mendeley importer version number in database 2023-04-06 17:10:12 +02:00
Tom Najdek
1923085068
Block Mendeley import if ZotFile installed 2023-04-06 17:10:12 +02:00
Tom Najdek
4b523555d6
Mendeley Import: Auth using direct login
* Importer will now ask user for a login and password via form and will
  perform sign-in directly using credentials rather than oauth
* Signing in this way enables importer to obtain desktop document ID
  which is now stored for each item
* It's possible to switch back to the old method (ouath) by setting
  `import.mendeleyUseOAuth` pref to `true`.
* New option to only import new items. This options only appears if
  database contains previously imported items.
* Importer will now update mendeleyDB:documentUUID on existing items to
  match value used in Mendeley Desktop if available
* Importer will no longer create collections when no new items are
  imported * Importer will only report number of new items imported on
  re-import * Importer will now preserve dateAdded on re-import

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2023-04-06 17:10:12 +02:00
Abe Jellinek
8e04c077ca
Don't add border to the top/sides of the toolbar on Windows (#3061) 2023-04-06 01:04:00 -04:00
Abe Jellinek
db74640993 fx-compat: Make Tools -> Error Console work
Fixes #3059
2023-04-05 14:13:37 -04:00
Abe Jellinek
5d44089214 fx-compat: Fix some CE style conflicts
- Windows global styles make .header bold, so we'll override them
- Prefix IDs in <notes-box>
- Give <tags-box> Add button a normal margin
  - I think the CSS this removes was meant to apply to tags in the list, not the
    Add button, but that's handled elsewhere now
2023-04-05 12:39:32 -04:00
Martynas Bagdonas
fcf3cec0fc Don't show HTML and Markdown options for collection export
Fixes #3033
2023-04-05 09:30:38 +02:00
Abe Jellinek
16411422c8 fx-compat: Item box: Set control attribute on label
For accessibility.
2023-04-04 14:39:50 -04:00
Abe Jellinek
d9b16c15f7 fx-compat: <split-menu-button>: Use margin instead of absolute height
And add space to the right of the button text. Should look right on Linux now.

Fixes #3041
2023-04-03 12:01:25 -04:00
Dan Stillman
2131a1e4ee Update global schema and utilities 2023-04-02 19:10:55 -04:00
Dan Stillman
3530545eb9 Remove base-only localized strings from searchConditions
Now all included in `itemFields.`

We still use base-only fields as search conditions, and schema.json
consumers might want to do so as well, so it makes sense to include
them.
2023-04-01 22:04:50 -04:00
Dan Stillman
e27c1b5335 Add Dataset and Standard item types
zotero/zotero-bits#22
zotero/zotero-bits#52
2023-04-01 16:34:43 -04:00
Dan Stillman
6ac13e3281 Limit Everything full-text-word subsearch to current library
This fixes an error using Everything if another library hasn't yet been
loaded and should speed up Everything searches for people with multiple
libraries.

This is sort of an awkward fix, because it doesn't fix the underlying
problem of `addCondition('libraryID', ...)` not working the same as
`.libraryID =` for some search conditions that perform subsearches. But
supporting `addCondition('libraryID', ...)` for those would get
complicated, because there could technically be multiple such
conditions, and applying those to a subsearch that used `AND` would get
messy. So let's just fix the problem at hand.

Fixes #3032
2023-04-01 04:55:05 -04:00
Dan Stillman
1aa82094f1 Better way of skipping migration of Place and Date from Extra
Or at least a way that we already have built-in and that only applies to
the call in `Zotero.Item::migrateExtraFields()`. This doesn't
distinguish between CSL fields (`publisher-place`, `event-place`,
`issued`) and actual Zotero field, and we really only need to skip
the former, but it's fine.

Follow-up to e3cfeee81, related to #3030
2023-04-01 04:52:30 -04:00
Dan Stillman
e3cfeee813 Temporarily disable extracting Issued from Extra
Until we can parse ranges in the Date field. See #3030.

citeproc-js will still use it (which is the point).
2023-04-01 04:52:14 -04:00
Adomas Ven
d6a9b43515 Sorts first-author last name matches first when year present. (#3025)
Closes #3024
2023-04-01 04:52:04 -04:00
Adomas Ven
6b819e259c
fx102: Cleans up scss files, removes shadow DOM use from CEs (#3051)
Removes a huge amount of excessive files and duplication for CE scss.
All CE css is now output in the single
zotero-react-client.css file.

Moving all CE styling into a single stylesheet required removing their
shadow DOMs. It is desirable anyway, since you want to
be able to style CEs from "outside", when embedding in different
contexts.

Shadow removal required some CE code changes to maintain
functionality.

Elements refactored:
- attachment-box (displayed when an attachment (like PDF) is selected in
the item tree)
- color-picker (in the tag color selector)
- guidance-panel (displayed on first run when editing authors for a book
section)
- item-box (info tab in the item pane)
- note-editor
- notes-box (note tab in the item pane)
- quick-search-textbox
- related-box (related tab in the item pane)
- tags-box (tags tab in the item pane)
- zoterosearch (advanced search condition builder form)
2023-04-01 01:37:55 -04:00
Martynas Bagdonas
bd9a40562f Replace pdftotext and pdfinfo with pdf-worker 2023-03-31 12:48:05 +01:00
Adomas Venčkauskas
3a0731a024 Merge branch 'fx-compat-monkey-patch-toolbarbutton' into fx102 2023-03-29 15:05:37 +03:00
Abe Jellinek
988a443974 Fix the toolbarbutton dropmarker style 2023-03-29 15:03:07 +03:00
Abe Jellinek
88ce834385 Monkey-patch toolbarbutton CE to display a native menu on macOS 2023-03-29 15:02:55 +03:00
Tom Najdek
3eeac6f8b0
Fix double <browser> regression in basicViewer #3039 2023-03-28 13:01:15 +02:00
Dan Stillman
1af3142c52 Update translators, styles, CSL locales, and global schema 2023-03-28 04:25:22 -04:00
Abe Jellinek
fe89ad5a51 ProgressWindow: Fix incorrect sizing
Setting a height/max-height was causing the window not to grow correctly when
rows were added. Whatever the purpose of those styles was in past FF versions,
they're no longer necessary now.
2023-03-27 14:15:05 -04:00
Dan Stillman
8469a2485b
Merge pull request #2862 from tnajdek/2252-bulk-folder-import-no-react-wizards-squashed
fx-compat: Wizards. Add folder import
2023-03-27 01:20:44 -04:00
Abe Jellinek
ca2b84af8f
fx-compat: Disable macKeyset completely on non-Mac (#3044) 2023-03-25 04:06:48 -04:00
Abe Jellinek
2b3ee82d56 fx-compat: <split-menu-button>: Use margin-inline-end 2023-03-24 14:34:13 -04:00
Abe Jellinek
c30a648edf fx-compat: <split-menu-button>: Add divider 2023-03-24 14:31:26 -04:00
Abe Jellinek
5b08eec813 fx-compat: Don't run <split-menu-button> command handler when popup is opened 2023-03-23 14:15:14 -04:00
Abe Jellinek
8f87a74398 fx-compat: Fix showNativeElementPopup() positioning on Win/Linux 2023-03-23 14:14:29 -04:00
Abe Jellinek
8512402eca fx-compat: Fix Reset Sync subpane
cfbfcf2 changed restore{To,From}Server to restore{To,From}OnlineLibrary and
updated most of the references, but not the ones in preferences_sync_reset.
Other languages still have those strings under the old key names.
2023-03-23 10:18:46 -04:00
Tom Najdek
01611cbb07
Temporarily disable folder import #2862 2023-03-23 14:16:51 +01:00
Tom Najdek
fc572ba2a6
fx-compat: Convert Publications dialog to CE 2023-03-23 14:16:51 +01:00
Tom Najdek
c65e8f1621
fx-compat: Convert rtfScan to use CE wizards
Also:
* Adds Style Configurator CE
* Extends "base" CE to enable fluent l10n
2023-03-23 14:16:51 +01:00
Tom Najdek
5ea43bd65c
fx-compat: Convert import wizard to use CE 2023-03-21 20:42:43 +01:00
Tom Najdek
2820add3d1
Add bulk folder import #2252 2023-03-21 20:38:39 +01:00
Dan Stillman
6117221cbc fx-compat: Remove DOMParser init() calls
No longer supported. Still possible to pass to the constructor, but
almost certainly not necessary:

https://udn.realityripple.com/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIDOMParser#Principals_document_and_base_URI
2023-03-20 16:32:40 -04:00
Tom Najdek
13cc393840
fx-compat: long tag fixer (#2649)
* Manual tag splitting from tag selector
* Only apply split to the tag in current library
* Preserve tag type
2023-03-16 21:20:11 -04:00
Abe Jellinek
b1595cdd1d Scaffold: Support the detectedItemType test field (#3023) 2023-03-14 10:21:10 -04:00
Dan Stillman
0ba81a1a92 Fix no such column: IA.authorName error from early 6.0 beta upgrade
Fixes #3013
2023-03-09 01:28:44 -05:00
Dan Stillman
c675150305 fx102: Update quit keybindings
- Add 'x' accesskey for "Exit" on Windows
- Show "Quit" instead of "Exit" on Linux
- Don't show Ctrl-Q for shortcut key on Windows

But Ctrl-Q still works on Windows when it shouldn't because of the Mac
keybinding, which still gets registered even if disabled
programmatically in platformKeys.js.

fx102 follow-up to #3010
2023-03-09 01:26:44 -05:00
Adomas Venčkauskas
b4d534c02d Use referrer from connector when saving snapshots
Closes #3006
2023-03-09 00:37:25 -05:00
Dan Stillman
c048460c22 Match duplicates with same last name but different field modes
https://forums.zotero.org/discussion/103307/duplicates-not-being-recognised-as-duplicates
2023-02-28 00:45:03 -05:00
Abe Jellinek
0627ee0cb6
fx-compat: Fix adding/editing feeds (#2632) 2023-02-26 05:34:21 -05:00
Abe Jellinek
53ace4876e fx-compat: Fix feed Add To button
And make accessible by keyboard
2023-02-26 05:00:31 -05:00
Abe Jellinek
730677a918 fx-compat: Fix ProgressWindow 2023-02-26 05:00:31 -05:00
Dan Stillman
95f2e40434 Use clearer variable in item box
https://groups.google.com/g/zotero-dev/c/TvOfXVxwwkA/m/SdpU1QD7AAAJ
2023-02-25 01:40:10 -05:00
Abe Jellinek
fd85411e26
Preserve capitalization in Zotero.HTTP.request() headers (#3002) 2023-02-24 02:15:07 -05:00
Dan Stillman
e18624e4b5 Fix startup error if DB corrupt and no backup files
Fixes #2996
2023-02-24 02:11:17 -05:00
Martynas Bagdonas
429970ad30 Fix annotation image rendering caused issues:
- Don't save unmodified annotation item when rendering annotation image
- Don't render annotation image multiple times
2023-02-24 02:11:17 -05:00
Adomas Ven
ba06db2e19 Remove firefox-zotero IPC pipe and switching code (#2990) 2023-02-24 02:11:17 -05:00
Martynas Bagdonas
504e932d88 Add missing text color string 2023-02-24 02:11:17 -05:00
Martynas Bagdonas
f49a6bf807 Add more colors to pdf-reader, note-editor and introduce text color tool 2023-02-24 02:11:17 -05:00
Abe Jellinek
55b17c2b7e Scaffold web template: Serialize multiples
Fixes #2980
2023-02-23 16:36:59 -05:00
Adomas Ven
cfbfcf20bf Refactor l10n code. Remove use of react-intl. (#2975)
Strings from .dtd files are now accessible from Zotero.getMessage
as the eventual move to Fluent would remove their distinction.
2023-02-10 10:26:49 +02:00
Dan Stillman
bcfdaaabab Update Retraction Watch retraction reasons 2023-02-10 01:55:23 -05:00
Dan Stillman
bac87cbc42 Detect retractions for DOIs with capital letters
https://forums.zotero.org/discussion/102745/retraction-watch-not-working
2023-02-10 01:55:12 -05:00
Dan Stillman
c6bcc2572c Add PDF reader tab title pref to General pane 2023-02-10 01:54:36 -05:00
Dan Stillman
3be8abeae2 Fix broken creator autocomplete if place becomes a base field
Well this was a wild one to debug.

Creator fields were only initialized for autocomplete due to a series of
>10-year-old bugs:

1) In `showEditor()`, `Zotero.ItemFields.isAutocompleteField(fieldName)`
   was called for creator fields, which would pass, e.g.,
   `creator-0-lastName`.

2) In `isAutocompleteField()`, `ItemFields.getName()` would normalize
   `creator-0-lastName` to `false`, since it's not a valid field.

3) `isAutocompleteField()` listed `place` as a base field despite its
   not having any mapped fields, so when `getTypeFieldsFromBase()` was
   called on it, the return value would be `false`, which would be added
   to the list of autocomplete fields, which would mean that the
   normalized field of `false` from `creator-0-lastName` would match,
   which would mean that `isAutocompleteField('creator-0-lastName')`
   would always return true...as long as `place` never gained a mapped
   field.

Except `isAutocompleteField()` wasn't supposed to be the test for
initializing autocomplete for creator fields anyway -- `fieldName ==
'creator'` was. But `fieldName` is something like `creator-0-lastName`,
not `creator`, which meant that that test always failed, which meant
that if `place` did gain a mapped field, both tests would fail, which
would cause the creator field not to be initialized for autocomplete,
which would cause it to break as soon as you started to type into it.

This fixes that.
2023-02-10 01:39:31 -05:00
Martynas Bagdonas
a78860f092 Add Filename option for PDF tab title pref 2023-02-09 17:21:21 +00:00
Dan Stillman
382bde0fc2 Rename PDF tab title pref to include reader
In case we have a separate pref for notes or something else

(cherry picked from commit 6d0e5959e6)
2023-02-09 17:21:21 +00:00
Martynas Bagdonas
c0c1d011fa Add a hidden pref for tab title with support for Creator-Year-Title option (#2985)
(cherry picked from commit a5fb64f295)
2023-02-09 17:21:21 +00:00
Dan Stillman
8272989171 Add DOMParser to plugin scope 2023-02-09 05:36:03 -05:00
Abe Jellinek
4865f8afca Scaffold: Await more async functions
Might help prevent a deadlock I experienced when switching back to Zotero after
changing a translator file externally (although I can't reproduce it).
2023-01-23 12:32:30 -05:00
Dan Stillman
786d3db880 Revert "Limit Windows version to 2 PDF tabs in memory"
This reverts commit ffc8088ccd.

I cherry-picked this, but it's not necessary in Zotero 7, which has a
Win64 build.
2023-01-17 23:09:05 -05:00
Dan Stillman
3d4b93c86a Fix DOI field context menu not appearing after field edit
Context menu wouldn't appear again until the item box was refreshed
2023-01-17 23:05:48 -05:00
YFdyh000
bb5fe45f31 Show fieldLocalizedName in Scaffold - List All Fields (#2965) 2023-01-17 10:39:02 -05:00
Abe Jellinek
7e0b898765 fx-compat: Preferences: Fix pane script global object
Panes were being loaded with Zotero_Preferences as their global scope, so global
variables they defined would be set on that object instead of the window.
2023-01-17 10:28:57 -05:00
Adomas Venčkauskas
b6edaea54c fx102: Fix Word for Windows initialization and prefs 2023-01-13 09:56:59 +02:00
Dan Stillman
c7da16f07d Add protection against immediate retries in delayGenerator 2023-01-11 02:31:08 -05:00
Dan Stillman
6a1f0251cd Fix incorrect retries if multiple HTTP.request() calls get 500s
https://forums.zotero.org/discussion/comment/425814/#Comment_425814

The passed intervals array was modified, so after a request() got a 500,
subsequent calls would start with longer delays and eventually start
retrying immediately.
2023-01-11 02:20:07 -05:00
Dan Stillman
437b457134 Additional logging for "Invalid sync state undefined"
https://forums.zotero.org/discussion/102186/invalid-sync-state-undefined
2023-01-08 02:02:28 -05:00
Martynas Bagdonas
ffc8088ccd Limit Windows version to 2 PDF tabs in memory
Fixes zotero/zotero#2955
2023-01-08 02:02:28 -05:00
Abe Jellinek
7e7e8b88a2 LABD file relinking: Process using Unix paths (#2961) 2023-01-05 15:40:28 -05:00
Dan Stillman
959e868126 Read default prefs from prefs.js in a plugin's root directory
The file should follow the same `pref("extensions.foo.bar", "value");`
syntax as files previously in defaults/preferences/, which should no
longer be used in Zotero 7. (For an extension that works in both Zotero
6 and 7, it's OK to have a file in defaults/preferences for Zotero 6 and
an identical prefs.js for Zotero 7.)

Files in defaults/preferences/ aren't automatically loaded when a plugin
is installed/enabled but are still loaded at app startup by Mozilla code
for now. Plugins shouldn't count on that continuing to be the case in
Zotero 7 and should switch to prefs.js.

We'll add a way for bootstrapped plugins to manually trigger reading of
a prefs.js file in Zotero 6.
2023-01-05 01:53:03 -05:00
Dan Stillman
83792757de Remove pref code for <Fx59 2023-01-05 01:09:28 -05:00
Abe Jellinek
fc8a037d12 Zotero.HTTP.request(): Process headers case insensitively
Using the Headers class from the Fetch API.

Before, the added test would fail: `_requestInternal()`, not finding a header
named `Content-Type` (case sensitive), would set it to
`application/x-www-form-urlencoded`. XMLHttpRequest, upon being given both
`content-type`: `application/json`) and `Content-Type`:
`application/x-www-form-urlencoded`, would helpfully merge the two, producing
`content-type`: `application/json, application/x-www-form-urlencoded`. That's
obviously not the correct behavior.
2022-12-23 21:37:15 -05:00
Abe Jellinek
e46ffaf84b Add /connector/request endpoint 2022-12-23 21:37:15 -05:00
Dan Stillman
bad4597a86 Add mechanism for setting preferences remotely
Limited to a hard-coded list

Initially limited to `extensions.zotero.import.mendeleyUseOAuth`,
to switch the Mendeley importer from direct login to OAuth
2022-12-23 17:26:20 -05:00
Dan Stillman
32b6e0a485 Allow 204 response to OPTIONS request from WebDAV server
https://forums.zotero.org/discussion/101824/possible-to-allow-http-204-response-for-options-request-in-webdav-server-check

The specs used to (seemingly inadvertently) disallow 204 for OPTIONS,
but they've been clarified to make it clear that it's allowed [1], and MDN
now even shows it as an example [2].

[1] https://stackoverflow.com/a/57455110
[2] https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
2022-12-23 17:26:04 -05:00
Abe Jellinek
da075fb215 fx-compat: Scaffold: Fix Tests richlistbox growing when tests are added 2022-12-20 13:19:22 -05:00
Adomas Venčkauskas
c12e5659ab Fix a potential bug in integration plugin when field codes are corrupt 2022-12-14 16:26:33 +02:00
Dan Stillman
75aa17f169 Fix running function passed to Zotero.openInViewer()
This fixes plugin removal in the Add-ons window.

Broken by b8966f7878
2022-12-11 18:39:27 -07:00
Dan Stillman
e7fa5d7f9d Add setTimeout and clearTimeout to plugin scope 2022-12-10 02:11:30 -07:00
Abe Jellinek
45e0340787 v-t: Fix freeze when type-to-find wraps and first row is selected 2022-12-06 14:58:58 +02:00