Commit graph

8821 commits

Author SHA1 Message Date
Dan Stillman
bdec99f103 Update DB compatibility for annotations and noteSchemaVersion 2021-03-02 17:36:05 -05:00
Dan Stillman
b8eeb3abaa Drop decimal places from annotation sortIndex 2021-03-02 17:36:05 -05:00
Dan Stillman
acc3a70083 Remove SQL sort by parentItemID in Zotero.Sync.Data.Local.getUnsynced()
Now handled by Zotero.DataObjects.sortByParent()
2021-03-02 17:36:05 -05:00
Dan Stillman
8f5662ee6a Better error logging on sync engine upload failure 2021-03-02 17:36:05 -05:00
Dan Stillman
99b959285e Send Zotero-Schema-Version header with API requests
Set to the current global schema version
2021-03-02 17:36:05 -05:00
Dan Stillman
e133aab530 Annotation support in Item::fromJSON()/toJSON()
And clean up embedded-image handling
2021-03-02 17:36:05 -05:00
Dan Stillman
3c6ae0e656 Throw on missing parentItemID in Attachments.importEmbeddedImage() 2021-03-02 17:36:05 -05:00
Dan Stillman
a94323fc15 Sort multiple levels of items when generating API JSON
Added Zotero.DataObjects.sortByParent() to sort child items immediately
after their parent items. Zotero.DataObjects.sortByLevel(), which is
used for collections, sorts each level together, but that's less
appropriate for items where, e.g., an embedded-image attachment should
immediately follow the note that depends on it.
2021-03-02 17:36:05 -05:00
Dan Stillman
427a227370 Rename 'area' annotations to 'image' annotations 2021-03-02 17:36:05 -05:00
Martynas Bagdonas
05318b3021 Improve note editor and backups 2021-03-02 17:36:05 -05:00
Martynas Bagdonas
bce50e8e9c Add old note backup and preview 2021-03-02 17:36:05 -05:00
Martynas Bagdonas
4d8a9ed753 Replace all note local URIs at the first sync time 2021-03-02 17:36:05 -05:00
Martynas Bagdonas
af57565acf Reorganize and improve notes 2021-03-02 17:36:05 -05:00
Dan Stillman
078a18f7c0 Shorten sortIndex to 22 characters 2021-03-02 17:36:05 -05:00
Dan Stillman
63a416db40 Fix display of note titles on startup (regression from noteSchemaVersion) 2021-03-02 17:36:05 -05:00
Dan Stillman
4142f4b316 Replace occurrences of .getNote() with .note 2021-03-02 17:36:05 -05:00
Dan Stillman
ebc53a2bbc Add noteSchemaVersion, and replace item.getNote() with .note
```
var noteContents = item.note; // was item.getNote()
var schemaVersion = item.noteSchemaVersion;

item.setNote(contents) // default to Zotero.Notes.schemaVersion
item.setNote(contents, schemaVersion) - explicit version
```
2021-03-02 17:36:05 -05:00
Martynas Bagdonas
2543a695e8 Introduce PDF reader and note editor 2021-03-02 17:36:05 -05:00
Dan Stillman
cbeb5881e9 Hide annotations from items list 2021-03-02 17:36:05 -05:00
Dan Stillman
1c366de546 Initial annotation support 2021-03-02 17:36:05 -05:00
Dan Stillman
92ba393488 Don't clear item type set in constructor when loading primary data
Generally, don't clear the change state for primaryData when calling
loadPrimaryData() on an item that doesn't exist. Specifically, this
fixes an issue where calling loadPrimaryData() on a nonexistent item
after setting a libraryID and key would also clear any item type set in
the constructor. The same would apply for props set in the
Collection/Search constructors.
2021-03-02 17:36:05 -05:00
Dan Stillman
8026f744c5 Remove old HTML snapshot annotation support
Any data trapped in these tables hasn't been accessible in many years.
2021-03-02 17:36:04 -05:00
Dan Stillman
b54d4e78b7 Save createdByUserID and lastModifiedByUserID for group items 2021-03-02 17:36:04 -05:00
Dan Stillman
bb0a1dab13 Don't normalize primary data values in Item.setField()
Just enforce proper data types
2021-03-02 17:36:04 -05:00
Dan Stillman
cca5dc0314 Don't send unnecessary format=json in sync download requests 2021-03-02 17:36:04 -05:00
Dan Stillman
0941a14a65 Remove 'lastsync' assignment from Zotero.Collection constructor 2021-03-02 17:36:04 -05:00
Dan Stillman
b4522535e8 Add _hasFieldChanged()/_getChangedField/_getLatestField() to DataObject
Make it easier to use the new `_changedData` approach to object
modifications (currently used only for `tags` and `deleted`) where
changed data is stored in a separate object rather than in the primary
variables. _getLatestField() can be used to return either the new
unsaved value or the current saved value.
2021-03-02 17:36:04 -05:00
Dan Stillman
c9eb661f25 Update locales from Transifex 2021-02-25 18:54:07 -05:00
Dan Stillman
b2b909b42c Update submodules 2021-02-25 18:45:28 -05:00
Dan Stillman
33528d0f36 Fix "New Collection" button when My Publications is selected
Fixes #1955
2021-02-25 18:30:33 -05:00
Dan Stillman
ba7f7e3250
Merge pull request #1962 from fletcherhaz/context-menu
Add context menu for React textboxes to Create Parent Dialog
2021-02-25 17:57:09 -05:00
Dan Stillman
3ff92e2795 Add "More Information" button to invalid-data sync error 2021-02-25 16:08:54 -05:00
Fletcher Hazlehurst
8c00510835 Remove XUL overlay, but keep functionality. 2021-02-24 16:11:19 -07:00
Fletcher Hazlehurst
60d8beece3 Add context menu for React textboxes to Create Parent Dialog 2021-02-22 20:14:07 -07:00
Dan Stillman
31478d1fba Use multi-line editor for all title fields (e.g., Case Name)
https://forums.zotero.org/discussion/87286/suggestion-multi-line-case-name-display-in-info-panel
2021-02-09 17:05:50 -05:00
Dan Stillman
843bcbb68a Show invalid-data warning in sync button tooltip for group libraries
Instead of showing warning button on toolbar

Otherwise if one person in a group upgrades to a beta with new fields,
everyone in the group will get a warning, even if they're already on the
latest release version. In a personal library, the user can upgrade to
the same version.
2021-02-09 16:36:06 -05:00
Dan Stillman
b919143630 Skip conflict resolution for remote objects that can't be saved
E.g., if a local item has been modified in a way that conflicts with a
remote item that also has a new, unknown field, don't show the CR
window -- just add the item to the sync queue and show the
some-data-could-not-be-downloaded error.
2021-02-07 16:49:01 -05:00
Dan Stillman
254695f4b3 Skip extra sync download after some conflicts
If an upload fails with a 412, and then we download, and then we go to
upload but there was nothing to upload (e.g., because the remote version
was chosen or there was an error saving it), there's no reason to do a
download again after that.
2021-02-07 16:38:14 -05:00
Dan Stillman
61e29aa8eb Don't set non-working 'tooltiptext' in React Button
Follow-up to ba9c7ae739
2021-02-06 23:51:28 -05:00
Dan Stillman
e9e434cd2e Fix tooltips for tags box icons
Addresses #1947

If we're going to need this regularly we should just create a React
Image element that does this automatically for 'title'.
2021-02-06 23:51:11 -05:00
Dan Stillman
01819d68d1 Show tag selector Actions menu on mousedown, not click 2021-02-06 23:37:56 -05:00
Dan Stillman
ba9c7ae739 Fix 'title' attribute on React Button component
E.g., Actions menu in tag selector

Neither 'title' (HTML) nor 'tooltiptext' (XUL) works on HTML elements in
XUL documents, so add a mechanism to fake tooltip behavior and use it in
our Button component. This can be triggered by other React components if
necessary.

This is (mostly) mirroring Firefox tooltip behavior, which is a bit less
sophisicated than macOS behavior. If we end up using this for
everything, we can improve the behavior (e.g., start the delay when
entering the element, not when the mouse stops).

Fixes #1947
2021-02-06 23:37:32 -05:00
Dan Stillman
cf132fdd29 Log POST request body for server requests 2021-02-05 17:51:59 -05:00
fletcherhaz
55acf9a0c0
Do not send back saveSingleFile: true if saving a PDF snapshot. (#1950) 2021-02-05 15:31:34 -05:00
Dan Stillman
293bf07c03 Temporarily increase sync upload timeout from 60 to 120 seconds
This shouldn't be necessary, but currently items with thousands of
creators can be very slow to save.
2021-02-03 16:18:30 -05:00
Dan Stillman
fd94d731d4 Update locales from Transifex and merge new English strings 2021-01-27 10:10:43 -05:00
Dan Stillman
ff9471fe2c Add English strings for Word for Mac ARM-is-supported warning 2021-01-27 00:59:18 -05:00
Dan Stillman
b3220e83b1 Don't pass nested collections to translators as top-level collections
While we need to pass all items from descendant collections to
translators, only the immediate child collections of the selected
library or collection should be returned from Zotero.nextCollection().

I'm not sure how long we've been doing this wrong, but it resulted in
duplicated subcollections when round-tripping Zotero RDF. (TEI is the
only other translator that uses nextCollection(), so its exports were
probably similarly incorrect.)

https://forums.zotero.org/discussion/87135/export-import-creates-numerous-duplicate-subcollections
2021-01-25 03:58:04 -05:00
Dan Stillman
10ca05e22e Return array instead of iterator for Collection.getChildCollections(true) 2021-01-25 03:58:04 -05:00
Diego de la Hera
05e56acf77
Fix Input component doesn't work if autoComplete=false (#1939)
The Input component doesn't work if its autoComplete prop is set to false, as described here: https://groups.google.com/g/zotero-dev/c/vKdxvZJL8UQ
2021-01-20 20:58:09 -05:00