Commit graph

6738 commits

Author SHA1 Message Date
Adomas Venčkauskas
390b8b2c86 Fix quickformat early dismisal error 2018-04-24 01:37:10 -04:00
Adomas Venčkauskas
387109c1da Don't needlessly regenerate citation IDs 2018-04-24 01:37:10 -04:00
Adomas Venčkauskas
593153eebe Adds a progress bar for non quick-format integration actions
The progress percentage is based on the most recent transaction
(or undeterminate if this is the first session transaction)

Fix undefined function call error
2018-04-24 01:37:10 -04:00
Dan Stillman
33f8fcfafb Fix syncing of saved search changes
Condition changes were only uploaded after every other change + sync
2018-04-22 17:27:33 -04:00
Adomas Venčkauskas
5e5b567782 Add a connector document integration endpoint
Specifically for google docs via the connector, but could potentially be
used for any integration via HTTP or connector.
2018-04-20 13:08:34 +03:00
Martynas Bagdonas
00efd01aaf Ask for description when reporting metadata (#1488) 2018-04-19 04:35:03 -04:00
Dan Stillman
6450d39933 Throw async error from _loadTranslator() 2018-04-19 02:59:41 -04:00
Dan Stillman
3bc08ba10c Change overwritten translator message from error to warning 2018-04-19 02:59:41 -04:00
Martynas Bagdonas
0b4e1f9360 Use the extracted arXiv identifier when recognizing PDF (#1487) 2018-04-19 02:35:20 -04:00
Dan Stillman
b22e496b05 Allow setting CORS allowed origins for translation-server 2018-04-18 16:15:26 -04:00
Martynas Bagdonas
fa0576a4dd Add arXiv identifier support (#1486) 2018-04-18 13:03:10 -04:00
Dan Stillman
bf26c230be Update submodules 2018-04-16 14:58:37 -04:00
Dan Stillman
3835bc9110 Assign merge-tracking relations properly when merging >2 items
https://forums.zotero.org/discussion/71459/incorrect-document-refresh-after-three-item-merge
2018-04-15 17:05:55 -04:00
Dan Stillman
8853f8ca47 Allow higher local object version during full sync
Local object versions can be higher than remote versions, because we
upload in batches and only record the version from the last batch.

This could cause trouble if an object failed to upload during a Restore
to Online Library, causing it to be retried later with version 0 (unlike
during a restore when the version is omitted), causing the library to be
reset, causing any local objects with higher local versions to be
redownloaded.
2018-04-14 16:50:41 -04:00
Dan Stillman
794d3880e7 Set 'control' attribute for item box fields
Set 'control' to the id of either the value label or the textbox,
depending on whether the field is being edited. This causes NVDA to read
the label associated with the textbox, but seemingly only the first time
it's selected.

Unfortunately NVDA also does some other unpleasant things, like reading
a description from the duplicate-merging pane, which isn't the active
element in the deck, and reading the entire text, including all field
labels, of the item box) I'm not sure how much we can improve this until
we're on Electron.

VoiceOver doesn't read the textbox's label either, even though it does
so in the bookmarks window in Firefox. Maybe things have improved since
Firefox 52, so we can text again after upgrading to Firefox 60.

Addresses #1411
2018-04-14 13:25:31 -04:00
Dan Stillman
0cc3e64b8a Restore proper incompatible DB message
Fixes #1446
2018-04-14 11:38:54 -04:00
Dan Stillman
0e3071576b Show "Export Collection…" if there are items in subcollections
And generate collection context menu asynchronously

Closes #1482
2018-04-14 11:33:16 -04:00
Dan Stillman
460a423df3 Don't let an progress window block shutdown
Closes #1485
2018-04-14 10:28:00 -04:00
Dan Stillman
71f7ec5207 Avoid invalid-field warning for parentItem in fromJSON() after 6f1833f936 2018-04-14 10:27:40 -04:00
Dan Stillman
ce834fc5f3 Don't focus previous row when choosing autocompleted creator
https://forums.zotero.org/discussion/71310/
2018-04-14 10:27:40 -04:00
Frank Bennett
94271325d7 Asyncify Zotero.Relations.getByObject(), called only from item merge. (#1480)
Use getAsync() to acquire subject in Zotero.Relations.getByObject()
2018-04-14 10:26:16 -04:00
Dan Stillman
ceb9749937 Avoid invalid-field warning in Item::fromJSON() after 6f1833f936 2018-04-14 00:06:27 -04:00
Dan Stillman
6f1833f936 Remove items from trash and My Publications when removed via sync
Zotero.Item::fromJSON() wasn't properly accounting for missing 'deleted'
or 'inPublications' properties.
2018-04-13 23:36:59 -04:00
Dan Stillman
4248e59eeb Add log line when trying to drag already-linked collection 2018-04-13 16:12:24 -04:00
Adomas Venčkauskas
029c9fc251 Don't refresh citations when citation delaying is enabled via doc prefs 2018-04-12 14:00:28 +03:00
Adomas Venčkauskas
ea8003c541 Fix an invalid variable reference 2018-04-12 14:00:28 +03:00
Dan Stillman
9a304b6699 Better handling of remotely changed items in locally missing collections 2018-04-07 17:04:35 -04:00
Dan Stillman
17f7bcbbad Target selector: Increase recents to 7 2018-04-06 07:36:13 -04:00
Dan Stillman
eeadeaa1b1 Target selector: Fix recents handling 2018-04-06 07:32:24 -04:00
Dan Stillman
222bb5bad4 Target selector: Don't lose recent targets when saving to same target
A target could fill up the list from different sessions, pushing other
recents out.
2018-04-06 04:27:58 -04:00
Adomas Venčkauskas
7d424f6d12 Return notes from /saveItems connector endpoint 2018-04-05 15:27:02 +03:00
Dan Stillman
bddb5ed243 Target selector: Fix moving translated items between certain libraries
Moving a translated item from a non-filesEditable library to a
filesEditable library would fail (because the endpoint handler was named
"SaveItem" instead of "SaveItems").

Fixes zotero/zotero-connectors#235
2018-04-05 05:41:45 -04:00
Adomas Venčkauskas
ac180c2324 Fix initial integration action requiring a slow citeproc (re)load
(Regression 9c7271c6)
2018-04-04 13:52:33 +03:00
Dan Stillman
d4fce3c855 Update citeproc-js to 1.1.201 2018-04-04 03:34:24 -04:00
Dan Stillman
3b17681db3 Update citeproc-js to 1.1.200 2018-04-03 18:41:40 -04:00
Dan Stillman
4f9847da04 Save parent item to correct library when recognizing PDF without DOI 2018-04-02 15:34:22 -04:00
Dan Stillman
a8d199967e Fix crash if item field invalid for new type is open on type change
https://forums.zotero.org/discussion/71200/bug-when-changing-item-type-report-id-607330517
2018-04-01 15:34:44 -04:00
Dan Stillman
8d0dc359b4 Move prefs.js parsing to Zotero.Profile.readPrefsFromFile(prefsFile) 2018-04-01 13:44:10 -04:00
Dan Stillman
7f81e62bc8 Automatically create new data directories for additional profiles
E.g., if you have a main profile using ~/Zotero and create a second
"Work" profile, a "~/Zotero Work" data directory will be created
automatically and set as a custom data directory
2018-04-01 13:36:00 -04:00
Dan Stillman
0b384abe66 Fix DST display bug in Accessed and a few other date fields
If you entered a date that was in DST (including the current date at
00:00:00) but you were in standard time, the previous day was displayed.

Since access dates for saved items include explicit timestamps and most
people don't work between the hours of midnight and 3 a.m., this didn't
come up very often, and it was easy to miss when it did, since you'd be
unlikely to notice it for previously entered dates. (Someone noticed it
today because DST ended in Australia.)

This only affected the item pane, so citations were unaffected.
2018-04-01 08:17:06 -04:00
Dan Stillman
350b47364e Allow library switching in target selector
If switching from a filesEditable library to a non-filesEditable
library, files are removed. If going the other direction (including if
the original save was to a non-filesEditable library), the save is
performed again from the beginning in order to include attachments. If
switching between two filesEditable libraries, the storage directory is
just moved.

Addresses zotero/zotero-connectors#220
2018-03-31 08:26:40 -04:00
Dan Stillman
9e955bde99 Add Zotero.Item.prototype.moveToLibrary()
Move an item and its attachments to another library. Attachments are
removed as necessary if linked files or all files aren't supported in
the target library.
2018-03-31 08:26:36 -04:00
Dan Stillman
bc141ce36b Add .allowsLinkedFiles property to Zotero.Library objects 2018-03-31 08:26:36 -04:00
Dan Stillman
20df18636d Keep track of recent save targets for target selector
Addresses zotero/zotero-connectors#220
2018-03-31 08:25:39 -04:00
Dan Stillman
37e850c67b Reopen targeted collection on window open if closed at save time (macOS) 2018-03-30 01:55:04 -04:00
Dan Stillman
5a08d22dbf Fix attachment save failure on macOS with window closed
Use hiddenDOMWindow if no other window
2018-03-30 01:47:54 -04:00
Dan Stillman
fe5af63277 Update citeproc-js to 1.1.199 2018-03-29 18:27:52 -04:00
Dan Stillman
52c1249523 Fix weird test failure after c5cd38b4a5
The change in c5cd38b4a5 seems like it shouldn't have had any effect,
but creating an empty Set before yielding somehow avoided a race
condition with the subsequent updateSession call.
2018-03-29 08:29:37 -04:00
Dan Stillman
c5cd38b4a5 Additional comments and cleanup for target selector handler 2018-03-29 07:44:44 -04:00
Dan Stillman
9b9773db16 Skip items in save session that no longer exist
Ideally I guess the entry would be removed from the save popup in the
connector and a second button click would do a fresh save rather than
reopening the popup, but for now just avoid an error.

Addresses zotero/zotero-connectors#220
2018-03-29 07:44:41 -04:00
Dan Stillman
a4aabd9f3e Don't select items in trash on target selector change
Items in the trash will still be updated properly (since they can still
exist in collections and have tags), but the collection selected in the
target selector should remain selected in the client.

Addresses zotero/zotero-connectors#220
2018-03-29 07:44:37 -04:00
Dan Stillman
00d85fb6da Update parent item from target selector if item was made a child item
This is necessary for automatic PDF recognition.

Addresses zotero/zotero-connectors#220
2018-03-29 07:44:25 -04:00
Dan Stillman
0f6b712963 Return proper text for 409 errors from HTTP server 2018-03-29 07:11:35 -04:00
Dan Stillman
46eb84e859 Add Zotero.Item.prototype.parentItem getter 2018-03-29 07:11:15 -04:00
Dan Stillman
38330e4c13 Support target selector sessions for /connector/import 2018-03-28 08:46:13 -04:00
Adomas Venčkauskas
bff7cee374 Add a test case for copied citations (for 9c7271c6) 2018-03-28 14:55:46 +03:00
Adomas Venčkauskas
9c7271c606 Fix citations copied from other documents causing citeproc errors
Might slow down the initial interaction with a document in
automatic updates mode.
2018-03-28 14:42:38 +03:00
Dan Stillman
9ae582e345 Fix non-HiDPI tag swatches when item type image is low-res 2018-03-28 01:24:05 -04:00
Dan Stillman
3c5bc44ddf Fix potential upgrade error from c96363746b
If a related item was defined using both an old userID and the current
one, the schema upgrade step could fail.
2018-03-27 10:42:01 -04:00
Dan Stillman
24b9612a56 Force empty storage filenames to '_'
Hopefully fixes https://forums.zotero.org/discussion/71039/sync-error-empty-path-for-item
2018-03-27 10:27:23 -04:00
Adomas Venčkauskas
4e977f91cc Ensure citation fields are properly initialized (regression 3445519) 2018-03-27 12:45:04 +03:00
Adomas Venčkauskas
3445519714 Fix citationByIndex[i].sortedItem errors during citation insertion
Caused by inproper handling of copy-pasted citations in documents
2018-03-26 15:31:26 +03:00
Dan Stillman
32aebd388b Fix upgrade error in c96363746b if no related items 2018-03-26 04:48:32 -04:00
Dan Stillman
c96363746b Fix related-item relations pointing to a previous user account
If somebody switched accounts in a previous version, it was apparently
possible for related items to end up pointing at an item URI with the
old userID, which could cause a 403 on sync.

https://forums.zotero.org/discussion/70989/report-id-477331252

(5.0 deletes data when switching accounts to avoid exactly this sort of
bug.)
2018-03-26 02:12:20 -04:00
Dan Stillman
43692ee564 Use HiDPI icons in related-items box 2018-03-26 02:12:20 -04:00
Martynas Bagdonas
39ed2217cd Return pdfMaxPages to search preferences (#1475) 2018-03-26 02:12:05 -04:00
Dan Stillman
2effad4f6a Add function to delay syncs, and connector server endpoint to trigger it
This will allow the connector to delay syncs while the target selector
window is open, and it can probably be used for imports and other
things.
2018-03-25 05:15:36 -04:00
Adomas Venčkauskas
b9837c690d Fix item URLs not unproxifying when saving from the connector
Regression from zotero/zotero-connectors#b7a0872
2018-03-22 15:36:52 +02:00
Dan Stillman
67b34b1482 Create automatic (not manual) tags when retrieving PDF metadata by ISBN
https://forums.zotero.org/discussion/71003/metadata-problem
2018-03-21 12:58:20 -07:00
Adomas Venčkauskas
3e39cb33d9 Shows original and modified citation in warning prompt. Closes #1468 2018-03-20 11:57:09 +02:00
Dan Stillman
d44cc05c3d Use 1.25dppx for HiDPI icon threshold
On some laptops, scaling settings might cause the DPI to drop between
96 (1x) and 144 (1.5x), and downscaled icons are probably better than
upscaled ones.
2018-03-19 13:46:50 -07:00
Adomas Venčkauskas
a12b997b8a Fix corrupt citation prompt going into recursive loop 2018-03-19 11:37:07 +02:00
Adomas Venčkauskas
8d3e893aec Fix alert not displaying after failed style install 2018-03-19 11:37:07 +02:00
Philipp Zumstein
0bb2bdcbe3 Replace p tag with two line breaks in ZU.cleanTags (#1465) 2018-03-18 23:35:49 -07:00
Adomas Venčkauskas
a659c6c6ff Fix edited citation prompt not displaying (regression 25d8898) 2018-03-17 21:47:36 +02:00
Adomas Venčkauskas
749faabb46 Fix [(j-1)].sorteditems.slice(...)[0] is undefined integration error
Caused by empty citations being present in the document (i.e. without
any cited items and placeholder text like {Citation}).
2018-03-17 21:39:21 +02:00
Martynas Bagdonas
7b8f2e1dfe Use language field returned from recognizer-server 2018-03-16 11:23:41 -07:00
Dan Stillman
cf12f1e9cc Update citeproc-js to 1.1.193 2018-03-15 10:13:41 -07:00
Dan Stillman
06e17fd76d "Choose File Handler" -> "Choose Application" for PDF viewer
(And potentially others in the future)
2018-03-15 00:13:04 -07:00
Adomas Venčkauskas
e3648dfda0 Ensure delayed citation prompt strings are localizable 2018-03-14 19:08:38 +02:00
Adomas Venčkauskas
25d8898ab0 Ensure that document refresh doesn't perform needless text writes 2018-03-14 15:27:10 +02:00
Adomas Venčkauskas
92346c8fb9 Clarify location of refresh button in delayed citation copy 2018-03-14 13:21:22 +02:00
Adomas Venčkauskas
6f6e18b406 Increase citation delay prompt timeout to 15 seconds
By prompting after 3 seconds we catch a lot of people who click through
the prompt without bothering to read or figure out what it does and then
come to the forums report the citing "bugs". An increased timeout will
catch less people and those who are caught are possibly more likely to
figure out how delayed citing updates work since they would greatly
benefit from it.
2018-03-14 09:22:00 +02:00
Adomas Venčkauskas
6c5aa06d6b Fix integration delayed citations popup timer. Closes #1461 2018-03-12 14:52:46 +02:00
Dan Stillman
c04b85e746 Use all DOI translators for metadata retrieval
The old recognizer code only used CrossRef, and the new code copied
that, but I think the old code simply predated additional DOI
translators and was never updated.
2018-03-11 18:16:19 -04:00
Dan Stillman
877ff972a9 Select created items when importing RIS/BibTeX from connector 2018-03-11 01:20:40 -05:00
Dan Stillman
137a0ebbfd Don't delete automatic tags after web translation
Regression from c8cf9b9e6f, probably
2018-03-10 11:18:44 -05:00
Dan Stillman
3dcdd7f2ba Safer fix for external note focus issues
Follow-up to 96e96c0348 and 07efe0304e
2018-03-09 15:15:18 -05:00
Dan Stillman
07efe0304e Fix separate-window button for child notes (broken by 96e96c0348) 2018-03-09 15:01:33 -05:00
Dan Stillman
96e96c0348 Focus correct note window when multiple note windows are open
Probably broken by dcfaa5521e
2018-03-09 14:26:18 -05:00
Dan Stillman
6745ea9868 Fix multiple-item context menu (broken by 7e3bad7390) 2018-03-09 06:58:46 -05:00
Dan Stillman
6c8cf71c9a Select parent item after metadata retrieval if only PDF was selected
TODO: select all parents
2018-03-09 06:57:43 -05:00
Dan Stillman
16ad422e89 Fix cut-off top line of search bar on Windows 2018-03-09 06:35:22 -05:00
Dan Stillman
da30f9e25c Restore attachment title and filename when undoing Retrieve Metadata 2018-03-09 01:07:57 -05:00
Dan Stillman
81a75d79be Keep PDF handler menulist the right size 2018-03-08 22:03:59 -05:00
Adomas Venčkauskas
f871da17c8 Don't hide the automatic citation updates option in doc prefs 2018-03-08 22:23:59 +02:00
Dan Stillman
23ebdedf48 Allow a day for undo/report for metadata retrieval, not an hour 2018-03-08 04:06:30 -05:00
Dan Stillman
7e3bad7390 "Undo Retrieve Metadata" and "Report Inaccurate Metadata"
New context menu options for items that were recognized in the last day
and that haven't been modified
2018-03-08 03:53:39 -05:00
Adomas Venčkauskas
cc5c17a6e1 Fix embedded items not showing up in the citation dialog.
Regression in 2ad0dc00d, bad fix in 553d2b00. Closes #1448
2018-03-08 10:25:00 +02:00
Dan Stillman
438d9669c1 Fix font size scaling of tag selector tags on macOS and Linux 2018-03-07 22:16:18 -05:00