Commit graph

10348 commits

Author SHA1 Message Date
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