Commit graph

9047 commits

Author SHA1 Message Date
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
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
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
593b4fd515 Move Config Editor button to bottom of Advanced prefpane 2023-04-10 06:43:15 -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
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
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
Adomas Venčkauskas
e59bcd2b64 Link Mendeley citations in documents to imported items. Closes #2622 2022-11-29 16:27:19 +02:00
Dan Stillman
76f2f0c783 Don't show items with annotated attachments after moving to trash
https://forums.zotero.org/discussion/100775/deleted-items-keep-reappearing-in-my-library

Regression from c3ee588bf
2022-11-28 04:34:49 -05:00
Abe Jellinek
ca1f83e9c9 fx-compat: Tag Color Chooser: Don't disable label
The default styles make it a strange-looking gray color, and there's no reason
to disable it separately if the element it's connected to is disabled.
2022-11-22 21:00:35 -05:00
Abe Jellinek
16eac5040b fx-compat: Fix error when switching language to Automatic
Services.locale always wants an array now, but it can be empty.

We still get "Uncaught (in promise) undefined" printed to the console, no stack,
not caught by "Pause on exceptions" in the debugger... but it's not clear that
that's actually coming from this code, and it doesn't seem to prevent anything
from working.
2022-11-22 20:53:29 -05:00
Adomas Venčkauskas
f98ab3b0a6 Import URL from XPCOM code instead of relying on window for Proxy code
Also fix other failing proxy tests. Closes #2928
2022-11-22 15:58:49 +02:00
Adomas Venčkauskas
b561aff94f Avoid locator detection on paste in citation dialog. Closes #2856
Locators will get detected if there is additional typing or editing
after the paste
2022-11-22 15:54:30 +02:00
Adomas Venčkauskas
4fa208d4d7 fx-compat: Fix pasting in quick format dialog 2022-11-22 15:52:57 +02:00
Adomas Venčkauskas
350a5d2cbb Fix quick format locator regexp to not match numbers without space.
Closes #2915
2022-11-22 15:51:54 +02:00
Adomas Venčkauskas
e8356de3c1 Proxy code: ensure URL constructor in non-window JS scope
Closes #2924
2022-11-22 15:51:54 +02:00
Abe Jellinek
4b09edfa42
fx-compat: Add color picker CE (#2682) 2022-11-21 02:48:16 -05:00
Dan Stillman
4dbb2d88b9 Update styles, translators, and CSL locales 2022-11-21 01:14:07 -05:00
Dan Stillman
5a82aa952d Don't allow note on embedded-image attachments
https://github.com/windingwind/zotero-better-notes/issues/212
2022-11-21 01:14:07 -05:00
Dan Stillman
b5862ba780 Handle relative PDF links when using custom PDF resolver 2022-11-21 01:14:07 -05:00
Dan Stillman
1f0a721101 Fix focus stealing in item box (#2885)
Port of #2895
2022-11-21 01:14:07 -05:00
Adomas Venčkauskas
0e4cdda8c7 Prevent citation merging from being always enabled after refreshing the doc 2022-11-21 01:14:07 -05:00
Abe Jellinek
00b387afc2
fx-compat: Toolbar fixes (#2922)
- Don't rely on Zotero.hiDPISuffix being initialized in menuToolbarbutton.js --
  it probably hasn't been at the time that the code that creates the dropmarker
  is running
- Fix merge mistake that created a duplicate block of CSS
2022-11-21 00:07:59 -05:00
Abe Jellinek
74492e40c4
Improve bidi & RTL support (#2415)
- Render cell text in its native direction
- Fix context menu positioning
- Fix item box (localizations needed)
- Fix column resizing
- Fix bidi text in collection tree
- Always right-align in RTL, always left-align in LTR.
  I'm going off advice from this excellent guide for RTL website design
  by Ahmad Shadeed: https://rtlstyling.com/posts/rtl-styling#tables
- Join creators in the tree ("Smith and Jones") using a format string to
  support languages like Arabic and Hebrew where there shouldn't be a
  space after the "and".
- Fix tabs
- Fix toolbar on Mac, flip icons on other platforms
2022-11-20 18:23:17 -05:00