Commit graph

7182 commits

Author SHA1 Message Date
Dan Stillman
1424fd9a0e Fix updating of the styles page in the RTF Scan dialog
There were various errors due to changes in integrationDocPrefs.xul
since RTF Scan was last worked on.
2019-07-09 01:46:34 -04:00
Dan Stillman
c0fe471db3 Fix retraction warning remaining after item deletion until next selection
Regression from something recent, I think
2019-07-04 22:05:18 -04:00
Adomas Venčkauskas
cd14a536dc Add retracted citation warning tests. Fix a bug with embedded prompts 2019-07-04 15:16:26 +03:00
Dan Stillman
eedc066d41 Allow hiding of retraction warning for replaced works
This is unfortunate, but some journals are abusing (what should be)
unique identifiers.

https://forums.zotero.org/discussion/comment/335113/#Comment_335113
2019-07-04 07:11:53 -04:00
Adomas Venčkauskas
2186e939a9 Set the retracted flag for retracted items even if no prompt is required 2019-07-03 23:10:30 +03:00
Adomas Venčkauskas
9efd7cc07d Retracted item citation warning changes
Allows the user to suppress the item retraction warnings from the
citation dialog and makes the retraction warning suppression global.
See #1710
2019-07-03 15:18:41 +03:00
Adomas Venčkauskas
0f9b073073 Ensure retracted item suppression is saved on any integration operation 2019-07-03 13:55:16 +03:00
Dan Stillman
0beddb9680 Add flags to disable retraction warnings
Separate flags for hiding the retraction altogether and for hiding
citation warnings for it

New functions:

Zotero.Retractions.hideRetraction(item)
Zotero.Retractions.shouldShowCitationWarning(item)
Zotero.Retractions.disableCitationWarningsForItem(item)

Addresses #1710
2019-07-03 01:23:02 -04:00
Dan Stillman
f49d5805cd Apply subtitle capitalization to additional styles
This also fixes a style initialization error when the style id is
invalid, which was a regression in a0be2da42c.
2019-07-01 22:39:12 -04:00
Dan Stillman
d13ffcd9a3 Revert "Temporarily disable "Export Document…" button for 5.0.69"
This reverts commit a6e9d76c41.
2019-06-25 23:53:47 -04:00
Dan Stillman
fb101e8fe6 Fix hanging indent in HTML output after citeproc-js 1.2.2 (5.0.57)
The patch in 0036e0a1e for the change in citeproc-js behavior was
incomplete.
2019-06-25 23:36:57 -04:00
Dan Stillman
a6e9d76c41 Temporarily disable "Export Document…" button for 5.0.69 2019-06-24 21:22:34 -04:00
Dan Stillman
aba37b31e4 Fix error from retractions notifier handler on group modification 2019-06-23 20:01:26 -04:00
Dan Stillman
ead93b6ccc Stop uploading files on quota error until next manual sync or restart 2019-06-22 05:29:47 -04:00
Dan Stillman
94795095f2 Fix potential error on retracted item modification
If a retracted item was in the trash at startup or when detected and
there were no other retracted items in the library, an error would occur
if the item was modified.
2019-06-20 18:18:10 -04:00
Dan Stillman
c1ab361c92 Revert "Temporarily disable "Export Document…" button for 5.0.68"
This reverts commit f38ae94259.
2019-06-20 16:25:41 -04:00
Dan Stillman
f38ae94259 Temporarily disable "Export Document…" button for 5.0.68 2019-06-19 17:24:34 -04:00
Dan Stillman
288ad93422 Fix startup error due to missing retractedItems table
This shouldn't be possible, but there've been a couple reports of people
ending up on version 103 without the table, so create it again with IF
NOT EXISTS. This is obviously a bad fix, but until we know how this
happened it's the best we can do.
2019-06-19 17:06:05 -04:00
Dan Stillman
50a4308514 Remove retraction flag from items that no longer match 2019-06-19 06:41:33 -04:00
Dan Stillman
8589aae7bc Fix retracted items in unloaded libraries not being flagged correctly 2019-06-19 02:11:37 -04:00
Dan Stillman
7306fe910d Fix updating of Next button in RTFScan (regression from 269e2f8bff)
And fix a logged warning
2019-06-16 02:33:24 -04:00
Dan Stillman
e3e6b8ef9c Revert "Temporarily disable "Export Document…" button for 5.0.67"
This reverts commit 487d675783.
2019-06-16 02:33:24 -04:00
Dan Stillman
dc670938a4 Update submodules 2019-06-14 11:18:04 -04:00
Dan Stillman
487d675783 Temporarily disable "Export Document…" button for 5.0.67 2019-06-14 11:16:14 -04:00
Dan Stillman
75712ed42d Remove "Move to Trash" button in item retraction banner
There can be situations where people legitimately want to keep the item,
so encouraging deletion is a bit presumptuous.
2019-06-13 12:22:54 -04:00
Dan Stillman
ae7a262592 Don't switch to Retracted Items for single item from banner View button
Only for multiple items
2019-06-13 00:09:04 -04:00
Dan Stillman
45f6492494 Adjustments to citation retraction warning (#1704)
- Fix don't-show-again checkbox for non-DB items
- Tweak warning text
- Don't show comma after year if year is missing (which it shouldn't be)
- Remove redundant try/catch
2019-06-13 00:08:49 -04:00
Adomas Venčkauskas
4337362a1b Add a checks and prompts for retracted items within an existing doc 2019-06-13 00:57:56 +03:00
Dan Stillman
b4b19c4811 Add Zotero.Retractions.getRetractionsFromJSON()
Addresses #1703
2019-06-12 01:05:49 -04:00
Dan Stillman
d353439980 Add retractions.enabled hidden pref to disable retraction checking 2019-06-11 21:24:17 -04:00
Dan Stillman
e69786bd69 Fix error and show File Not Found dialog opening attachment with empty path 2019-06-11 06:46:46 -04:00
Dan Stillman
ccc4dccffd Fix error copying attachment without path to another library 2019-06-11 06:46:09 -04:00
Dan Stillman
f7f55f05ad Percent-encode " character in DOIs when opening/copying as link
I'm not sure a double-quote actually appears in any DOIs, but it's
technically valid and would result in an invalid URL.

Follow-up to 782c2a1d1

Addresses #295
2019-06-10 17:06:59 -04:00
Dan Stillman
d7417af83e Update submodules 2019-06-10 15:00:55 -04:00
Dan Stillman
782c2a1d15 Don't URL-encode most characters in DOIs when opening/copying as link
Only #, ?, and % are now encoded.

Addresses #295
2019-06-10 14:56:28 -04:00
Dan Stillman
5c03813d81 Add Retracted Items virtual collection
Shown automatically when retracted items are detected
2019-06-10 02:38:42 -04:00
Dan Stillman
502f5fe491 Run notifier observers in tests after all others
This ensures that main functionality will have already run if a test
waits on the same event.
2019-06-10 02:20:11 -04:00
Dan Stillman
e807f98e02 Retracted items: Fix "Move to Trash" button not appearing 2019-06-10 02:18:49 -04:00
Dan Stillman
cf8d383027 Add "Show Item in Library" button to retracted citation warning 2019-06-07 23:05:25 -04:00
Dan Stillman
368b057104 Use toJSON() if available when running Zotero.debug() on objects 2019-06-07 21:22:52 -04:00
Dan Stillman
b793c0c406 Hard-code short PMID to avoid sending
The PMID prefix length is 5 and there are no other PMIDs under 5 digits,
so a 3-digit PMID would be identifiable.
2019-06-07 10:20:33 -04:00
Dan Stillman
47164edea6 Retraction improvements
- Fix list download logic
- Close bar when clicking "View Item"
- Don't show "Move to Trash" if item isn't editable
- Download new list if cached version differs from client
- Reduce height of notification bar
- Switch to a slightly darker red
2019-06-07 08:21:15 -04:00
Adomas Venčkauskas
75b38caf6f Add a warning when citing a retracted item 2019-06-07 12:59:42 +03:00
Dan Stillman
d0412e1fbb Add "Move to Trash" button in item retraction header 2019-06-07 04:20:55 -04:00
Dan Stillman
28326cd4cd Add license block to file 2019-06-07 02:24:23 -04:00
Dan Stillman
7f4f2770ba Add notification banner when retracted items are found
And other retraction tweaks
2019-06-07 01:15:17 -04:00
Dan Stillman
de0a65af7b Add Breton locale 2019-06-06 20:52:37 -04:00
Dan Stillman
48580c49d1 Retraction Watch integration
- Check for retracted items using data from Retraction Watch
- Show an X next to retracted items in the items list, and show a
  scary message at the top of the item pane with more info and links.
- Lookup is done in a privacy-preserving manner using k-anonymity --
  the server is unable to determine the specific items that exist in
  the client, so people who don't sync don't need to share any library
  data (though the server doesn't log the lookups anyway).

TODO:

- Pop up an alert when new items are found
- Show a confirmation prompt when citing a retracted item
- Support items without DOIs or PMIDs
- Add a proper PMID field and expand DOI to more item types so these
  values don't need to be parsed out of Extra
- Clear the banner immediately when all possible fields are cleared
  instead of waiting a few seconds
2019-06-06 09:17:21 -04:00
Adomas Venčkauskas
897a042ee0 Ensure no further action is taken after the import unavailable prompt 2019-06-04 11:26:46 +03:00
Adomas Venčkauskas
b8b8cbba3a Add a prompt for unsupported import attempts 2019-06-04 09:28:15 +03:00
Dan Stillman
41706a3a67 Fix "Cannot edit item in read-only library" during sync 2019-06-03 03:36:10 -04:00
Dan Stillman
1f1b2e9b27 Don't send null storage properties
When doing Restore to Online Library from a backup that was never
file-synced, 'mtime' and 'md5' can be null, but we don't want to clear
existing properties on the server.
2019-05-31 02:43:43 -04:00
Dan Stillman
e33a2d730d Fix tag type handling when merging items
Most importantly, don't change all tags to manual on the merged item.
2019-05-29 05:43:33 -04:00
Adomas Venčkauskas
96a0b77192 Add the export warning to the plugin interface export command 2019-05-29 12:00:55 +03:00
Adomas Venčkauskas
07c8269433 Add an ability to throw non-error alerts from connector integration 2019-05-29 11:24:53 +03:00
Adomas Venčkauskas
fedd6f8241 Add an 'exportDocument' integration command endpoint 2019-05-28 13:51:08 +03:00
Dan Stillman
6ba6028ed0 Fix "too many SQL variables" deleting collection with >1000 items 2019-05-15 15:49:06 -04:00
Dan Stillman
2af63c0f33 Change document import/export documentation URL 2019-05-15 01:51:59 -04:00
Dan Stillman
c29c855d28 Document import/export: Additional text tweaks 2019-05-14 23:50:47 -04:00
Dan Stillman
222bc4f25d Fix update error cancelling document import
Closes #1694
2019-05-14 23:43:14 -04:00
Dan Stillman
8274c1c231 Tweaks to document import/export
Remove unused code and adjust text

Follow-up to 48778f28
2019-05-14 23:36:00 -04:00
Adomas Ven
48778f2847 Document export-import UI and integration code (#1501) 2019-05-14 21:06:18 -04:00
Adomas Venčkauskas
dd8ceb93aa Add data generator customization fields and add collection generation 2019-05-14 16:46:34 +03:00
Dan Stillman
ebda79a958 zotero://select improvements
- Support items within collections and searches:

zotero://select/library/collections/:collectionKey/items/:itemKey
zotero://select/groups/:groupID/collections/:collectionKey/items/:itemKey

- Fix the 'itemKey' parameter:

zotero://select/library/collections/:collectionKey/items?itemKey=:itemKey1,:itemKey2

- Select library root if collection/search not specified
2019-05-09 02:11:57 -04:00
Dan Stillman
32de0d4037 Fix potential error reconciling changes after 3fbb17a2e6 2019-05-08 06:29:46 -04:00
Dan Stillman
3fbb17a2e6 Properly upload local changes after automatic conflict resolution
If an object changed on both sides and the changes were either
non-conflicting or identical but there were other local changes, the
local object was incorrectly being marked as synced, causing it not to
be uploaded until it was next modified locally.
2019-05-08 04:34:21 -04:00
Adomas Venčkauskas
dd51c592e2 Skip document scan when automatic citation updates are disabled
Closes #1689
2019-05-06 16:38:44 +03:00
Adomas Venčkauskas
63a8d2b8c4 Fix citeproc preview call citationsPre/post arrays 2019-05-06 14:58:05 +03:00
Dan Stillman
787e57f6a2 Reopen collapsed collections pane on restart, for now
Same as item pane

Closes #825
2019-05-05 23:34:23 -04:00
Dan Stillman
ec0b993a17 Fix erroneous sync conflict if creators are changed in the same way 2019-05-03 01:15:27 -04:00
Dan Stillman
d3bf704cf3 Tag selector: Show truncated tags in tooltip on hover 2019-05-02 18:36:50 -04:00
Adomas Venčkauskas
17aca346c6 Fix wrongly shown error upon bibliography insertion (since 96d6114c) 2019-04-30 09:56:44 +03:00
Dan Stillman
f5404bc7ee Add Item by Identifier dialog fixes
- Revert to single-line mode after closing
- Don't add newline if Shift-Enter is pressed in an empty textbox
- Hide progress meter in multi-line mode until beginning search
2019-04-28 23:24:56 -04:00
Adomas Venčkauskas
96d6114c71 Fix not throwing appropriate errors when citations required and not present
Also fixes displaying Yes/No for regular exceptions (regression 0cb056c9)
2019-04-26 15:10:49 +03:00
Dan Stillman
bd7cdbdc81 Don't hang on invalid DOI returned from recognizer-server
THis shouldn't happen anymore, but might as well be safe.
2019-04-23 19:07:41 -04:00
Dan Stillman
a0be2da42c Automatically capitalize subtitle for APA styles
Applied to all styles with ids matching 'apa($|-)'

Currently limited to colons, but Juris-M/citeproc-js#74 may extend this
to other punctuation

Closes #1681
2019-04-21 17:05:12 -04:00
Dan Stillman
7496faa8cf Update citeproc-js to 1.2.2 2019-04-20 15:32:46 -04:00
Dan Stillman
4eec421fe4 Don't return cached internal array for child notes 2019-04-16 05:33:31 -04:00
Dan Stillman
9b7984ef26 Run JS: Fix window title and stuck result pane after error 2019-04-16 03:34:45 -04:00
Dan Stillman
679f22d089 What's all this, then? A British English locale? I say!
This adds "English (UK)" to the locale list, which allows for "tag
colours" and allows dates to be recognized in d/m/y form.

I changed "color" and "license" on Transifex, but I'll leave other words
for others to change. If we stick to Oxford spelling, there probably
won't be too much else.
2019-04-16 03:33:30 -04:00
Adomas Venčkauskas
a57d38aa29 Fix numbers in strings addition caused bug in providing citeproc citation data 2019-04-10 10:35:30 +03:00
Dan Stillman
1ca6898cb9 Fix Zutilo breakage (regression from d9cee322cd) 2019-04-10 02:13:37 -04:00
Adomas Venčkauskas
78c3d5808b Fix citeproc errors due to improper citeproc state updates
The error is triggered upon initial interaction with a doc after Zotero
restart or if new external citations (copied into the document) are
peresnt and `session.updateSession()` is called without a subsequent
`session.updateDocument()` call. `session.updateSession()` is called
without a subsequent `session.updateDocument()` call every time the
user cancels a citation insert.

More specifically, `session.updateSession()` is called every time a
citation dialog is invoked. It retrieves all citations and writes them
into a local `session.citationsByIndex` object. Moreover, it marks
each citation that hasn't seen before in a `session.newIndices` object.
`session.newIndices` is there to ensure that we load every new citation
into citeproc upon document update. This object is built by marking any
citation that does not appear in the previous invocation's list of
citations as new. However, if the document is never updated (because the
user cancels the insertion) then the new indices are not loaded
into citeproc. This commit fixes that, by excluding citeproc unloaded
items from the previous invocation's citation list.
2019-04-08 17:43:52 +03:00
Dan Stillman
ff6a4400b4 Update citeproc-js to 1.1.236 2019-04-07 11:36:27 -04:00
Frank Bennett
e618410eb2 Export CSL JSON with title-short rather than shortTitle 2019-04-04 00:45:32 +09:00
Dan Stillman
9ed48f3837 Keep earliest Date Added when merging items
Closes #1669
2019-04-02 14:01:25 -04:00
Dan Stillman
531c092800 Tweak integration error text (#1672) 2019-04-01 17:40:45 -04:00
Dan Stillman
cf3f52ef37
Merge pull request #1672 from adomasven/feature/better-integration-errors
Display a more user-friendly error for integration errors
2019-04-01 17:40:13 -04:00
Dan Stillman
2f43ea82f9 Disable logging for tag truncation issue 2019-03-31 07:39:06 -04:00
Dan Stillman
3ca5ac421c Don't truncate tags unnecessarily if width is miscalculated
https://forums.zotero.org/discussion/76665/tag-issue-display-of-some-tags-erratic
2019-03-31 07:37:24 -04:00
Dan Stillman
ecdcb65f57 Add debugging for tag selector truncation issue
https://forums.zotero.org/discussion/76665/tag-issue-display-of-some-tags-erratic
2019-03-30 12:23:20 -04:00
Dan Stillman
3829f12603 Speed up renaming of colored tags 2019-03-30 10:35:03 -04:00
Dan Stillman
6a2611c9c6 Additional logging for teleporting collections
https://forums.zotero.org/discussion/comment/328917/#Comment_328917
2019-03-30 07:58:15 -04:00
Dan Stillman
038119c481
Merge pull request #1668 from Juris-M/zmaster
Handle handingindent return from citeproc-js as boolean
2019-03-29 02:53:06 -04:00
Dan Stillman
732cd01073 Update citeproc-js to 1.1.228 2019-03-29 02:23:51 -04:00
Dan Stillman
3126c58d30 Tag selector UI tweaks
- Don't cut off bottom of tags on Windows
- Fix appearance of search bar on Windows/Linux
- Fix cancel button on Windows/Linux
- Don't cut off right-hand pane of bottom bar when narrowing pane
2019-03-29 01:46:54 -04:00
Dan Stillman
d9cee322cd Tag selector performance overhaul
- Use react-virtualized to render tags on demand, reducing the number
  of DOM elements from potentially tens of thousands to <100. This
  requires tags to be absolutely positioned, so sizing and
  positioning need to be precomputed rather than relying on CSS.
- Avoid unnecessary refreshes, speed up tag retrieval, and optimize
  sorting
- Debounce reflowing when resizing tag selector

Also:

- Scroll to top when changing collections
- Allow tags to take up full width of tag selector without truncation

Closes #1649
Closes #281
2019-03-28 06:28:34 -04:00
Adomas Venčkauskas
0cb056c994 Display a more user-friendly error for integration errors 2019-03-27 17:34:32 +02:00
Dan Stillman
69ff8ac1b6 Search anywhere within tag for tag selector filter
Follow-up to 62ea7e970a, and I think in line with the pre-React
behavior
2019-03-27 07:49:59 -04:00
Dan Stillman
b248d28992 Revert "Update citeproc-js to 1.1.226"
This reverts commit a5c7955670.

We need to push out a release to fix some bugs, so let's leave this out
for now.
2019-03-27 07:26:15 -04:00