Commit graph

12572 commits

Author SHA1 Message Date
Dan Stillman
6374aea1c8 Update translators 2023-01-12 21:34:42 -05:00
Dan Stillman
be6eee5412 Update locales from Transifex 2023-01-12 21:33:09 -05:00
Dan Stillman
5919f0e77a Fix DOI field context menu not appearing after field edit
Context menu wouldn't appear again until the item box was refreshed
2023-01-12 20:35:22 -05:00
Dan Stillman
f006995676 Item box: Use addEventListener() 2023-01-12 20:35:20 -05:00
Dan Stillman
665473b108 Add protection against immediate retries in delayGenerator 2023-01-11 02:32:44 -05:00
Dan Stillman
21777af980 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:32:39 -05:00
YFdyh000
4fbb89a588
stop opening while right click on attachment's url (#2962) 2023-01-09 19:36:05 -05:00
Dan Stillman
ff38ff5b9d 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-01-09 06:15:33 -05:00
Dan Stillman
9d2c7d44f8 Additional logging for "Invalid sync state undefined"
https://forums.zotero.org/discussion/102186/invalid-sync-state-undefined
2023-01-07 15:25:21 -05:00
Abe Jellinek
3678639273
LABD file relinking: Process using Unix paths (#2961) 2023-01-05 15:07:10 -05:00
Martynas Bagdonas
52a079044d Limit Windows version to 2 PDF tabs in memory
Fixes zotero/zotero#2955
2023-01-02 12:51:14 +02:00
Dan Stillman
7e61be9799 Disable /connector/request tests from 86c56951df
Until we restore the new header handling
2022-12-25 04:01:35 -05:00
Dan Stillman
0862e1e1bc Revert "Zotero.HTTP.request(): Process headers case insensitively"
This reverts commit f6dd47dd1f.

I shouldn't have cherry-picked this from fx102.
2022-12-24 03:55:15 -05:00
Abe Jellinek
f6dd47dd1f 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:42:36 -05:00
Abe Jellinek
86c56951df Add /connector/request endpoint 2022-12-23 21:42:36 -05:00
Dan Stillman
51762e1c41 Update translators 2022-12-23 00:41:43 -05:00
Dan Stillman
5697f12310 Update locales from Transifex 2022-12-23 00:40:26 -05:00
Dan Stillman
4184dc18d2 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 00:20:43 -05:00
Dan Stillman
da392518ed 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-17 04:02:20 -07:00
Dan Stillman
1a83b472e8 Merge new English strings 2022-12-17 02:35:08 -07:00
Dan Stillman
7262465109 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"
2022-12-17 04:31:55 -05:00
Tom Najdek
91c385a67a 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
2022-12-17 04:31:55 -05:00
Dan Stillman
48ad7c0ab7 Mendeley import prompt tweaks
- Tweak message text
- Add "More Information" button
2022-12-17 03:58:16 -05:00
Adomas Venčkauskas
2082b68dd3 Add a prompt to import Mendeley DB if mendeley citation found in doc 2022-12-17 03:58:16 -05:00
Adomas Venčkauskas
dcd6cdbcb3 Add a nicer interface for prompts 2022-12-17 03:58:16 -05:00
Adomas Venčkauskas
d27fc31ef0 Fix a potential bug in integration plugin when field codes are corrupt 2022-12-14 16:20:44 +02:00
Dan Stillman
95e46ac8a2 Store Mendeley importer version number in database 2022-12-13 23:38:53 -07:00
Dan Stillman
41b0e64109 "installed" → "enabled" in ZotFile error message for Mendeley import 2022-12-13 23:38:53 -07:00
Martynas Bagdonas
77eb325b26 Update note-editor and pdf-worker submodules 2022-12-12 12:56:53 +02:00
Dan Stillman
a9dc25decc Update translators and styles 2022-12-12 00:27:04 -07:00
Dan Stillman
df3856f735 Update locales from Transifex 2022-12-12 00:27:04 -07:00
Abe Jellinek
6a0ecd243d v-t: Fix freeze when type-to-find wraps and first row is selected 2022-12-06 14:00:54 +01:00
Dan Stillman
1422d84bd6 Add "support questions" to CONTRIBUTING.md 2022-12-01 05:09:56 -05:00
Adomas Venčkauskas
3d8bbb3e55 Link Mendeley citations in documents to imported items. Closes #2622 2022-11-29 16:27:36 +02:00
Dan Stillman
f33cf1cde3 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 20c6fe67
2022-11-28 04:30:50 -05:00
Adomas Venčkauskas
deb5d1cd27 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:57:07 +02:00
Adomas Venčkauskas
29006c556d Fix quick format locator regexp to not match numbers without space.
Closes #2915
2022-11-22 15:57:05 +02:00
Adomas Venčkauskas
2db90511f9 Import URL from XPCOM code instead of relying on window for Proxy code
Also fix other failing proxy tests. Closes #2928
2022-11-21 11:51:18 +02:00
Adomas Venčkauskas
8135895313 Fix proxy test 2022-11-21 11:28:52 +02:00
Adomas Venčkauskas
dfdc66a41c Proxy code: ensure URL constructor in non-window JS scope
Closes #2924
2022-11-21 10:24:11 +02:00
Dan Stillman
1106685f2d Fix Item.fromJSON() failure after deb17d450e 2022-11-19 05:26:04 -05:00
Dan Stillman
deb17d450e Don't allow note on embedded-image attachments
https://github.com/windingwind/zotero-better-notes/issues/212
2022-11-19 04:55:32 -05:00
Dan Stillman
89bc094690 Fix response content type in Find Available PDF test 2022-11-16 18:35:31 -05:00
Dan Stillman
1a1c08890f Use clearer name for Find Available PDF tests 2022-11-16 18:35:31 -05:00
Dan Stillman
a48e0f2437 Handle relative PDF links when using custom PDF resolver 2022-11-16 18:35:31 -05:00
Tom Najdek
ac4308b3e7
Fix focus stealing in item box #2885 (#2895) 2022-11-16 15:55:24 -05:00
Adomas Venčkauskas
c3c0b363c1 Make sure URL constructor is available in non-window environment 2022-11-15 15:23:24 +02:00
Adomas Venčkauskas
ae14d433f9 Don't throw when getting potential proxies with invalid URL 2022-11-15 13:53:25 +02:00
Adomas Venčkauskas
b91d85f288 Deproxify homepage URLs without trailing slash. Closes #2884 2022-11-15 13:23:04 +02:00
Dan Stillman
26847c672f Fix clearing of active quick search after annotation change
https://forums.zotero.org/discussion/90727/search-results-disappear
2022-11-14 22:56:11 -05:00