Commit graph

5491 commits

Author SHA1 Message Date
Adomas Ven
5859dd6956 Compatibility fixes for shared connector code (#1082)
Safari does not support generators yet. Removes coroutines
and removes the requirement for bluebird, which should
improve script injection performance.
2016-09-05 19:49:23 -04:00
Dan Stillman
f68ee60524 Follow-ups to getAPIKey() changes in 008321bb89
Addresses #1086
2016-09-05 04:00:55 -04:00
Dan Stillman
008321bb89 Generate API key during auto-sync after upgrade
Fixes #1086, Sync settings/auto-sync glitch after Standalone upgrade
2016-09-05 03:21:49 -04:00
Dan Stillman
c01fc5d762 Merge branch '4.0' 2016-08-28 03:37:55 -04:00
Dan Stillman
ad45c3e51a Fix document wrapping issues in translation-server
Fixes https://github.com/zotero/translation-server/issues/26
2016-08-28 03:29:46 -04:00
Dan Stillman
b7507b03a8 Generate citation cluster via Create Bibliography dialog
Instead of generating individual citations

This matches Quick Copy behavior and is almost certainly what people
want.
2016-08-26 02:42:56 -04:00
Dan Stillman
bdec4b119f Fix error handling during local file import translation
A failure during detect (which is normal during file import attempts)
would cause later translator detection to fail.
2016-08-22 21:41:10 -04:00
Dan Stillman
8aee80106d Fix errors uploading remotely missing objects with local version numbers
If an object exists locally but not remotely and the local version has a
version number, that's an error. I don't think that should ever happen,
but it can if things somehow get out of sync due to other bugs.

To address, reprocess the API delete log during a full sync and then
reset the version number of all remaining local objects that don't exist
remotely (not just unmodified objects, as was the case previously) to 0
for uploading.

When remote deletions are reprocessed, delete local objects that haven't
been modified and show the conflict resolution window for any local
items that have.

Also:

- Clean up checking of last remote library version during download
  syncs
- Add Zotero.DataObjects.getAllKeys()
2016-08-20 14:56:31 -04:00
Adomas Ven
076bdadb29 Fixes feed sync bugs after conflicts. (#1074)
SyncedSettings.set() caches values. If an object passed to set() is
modified after the call then get() returns that modified object.
2016-08-16 03:03:42 -04:00
Dan Stillman
1b5c7aa6d8 Default to showing synced storage properties in Item::toResponseJSON()
toResponseJSON() is usually used to emulate the API, which shows md5/mtime

Also fix passing of options to toJSON() from toResponseJSON()
2016-08-15 04:47:34 -04:00
Dan Stillman
9ba3745b94 Don't clear md5/mtime in item JSON if skipped in patch mode
The client skips synced storage properties (md5, mtime) when uploading items to
ZFS-enabled libraries, but since the API returns JSON with those values
included after writes, they do get saved to the sync cache. If the local
attachment is then modified and the client generates a diff from the cached
version with those properties skipped, they'll be included in the patch JSON as
empty strings in order to clear them. This changes Zotero.Item::toJSON() to
skip those properties in patch mode as well.

This fixes a sync error ("Cannot change 'md5' directly in group library") when
a group attachment is updated locally.
2016-08-15 04:38:04 -04:00
Dan Stillman
41eb49cf7f Fix handling of object-level 404/412 errors 2016-08-15 02:26:04 -04:00
Dan Stillman
daf0f8e0b0 Merge branch '4.0' 2016-08-14 17:27:36 -04:00
Dan Stillman
03ef4723f8 Fix delay-generator handling during upgrade check and full sync 2016-08-14 17:23:02 -04:00
Dan Stillman
976b5c82c6 Fix error delaying on second library upload conflict 2016-08-14 17:23:02 -04:00
Dan Stillman
b4e6584417 Fix PDF metadata recognition in Firefox 48
Reapplies modifications to SpecialPowers code after a0843f317

This is essentially the changes within the SpecialPowers code block from this
diff, with some modifications for the new code:

git diff 1257b17e..a0571a9a17 chrome/content/zotero/xpcom/translation/translate_firefox.js
2016-08-13 19:36:15 -04:00
Dan Stillman
7ea5bab206 Fix delaying if remote library version changes during downloads 2016-08-13 03:34:29 -04:00
Dan Stillman
a0843f3171 Update to latest Mozilla SpecialPowers code for Proxy.create
This fixes the "Proxy.create is not a function" errors during PDF
metadata retrieval in Firefox 48 after the old Proxy API removal, but it
still throws "doc.location is null".

Addresses #1076
2016-08-13 02:05:50 -04:00
Dan Stillman
2bcd77f870 Temporary fix for 404 uploading missing object with local version
This shouldn't happen, but if it does, the API should return a 412 for
such objects, resulting in a full sync. Until the API fix is rolled out,
do the same on a 404.
2016-08-12 01:51:14 -04:00
Dan Stillman
da9ac72d51 Fix error adding >200 items to sync queue 2016-08-10 01:57:52 -04:00
Adomas Ven
715193639b Fixes a bug when zotero dir exists elsewhere and you want to select a custom one (#1070) 2016-08-09 11:59:10 -04:00
Dan Stillman
0eb6dc9ca5 Merge branch '4.0' 2016-08-09 01:52:21 -04:00
Dan Stillman
19a4c64903 Update citeproc-js to 1.1.113 2016-08-08 02:03:45 -04:00
Dan Stillman
c5dad533a1 Fix translator updates 2016-08-03 01:26:19 -04:00
Dan Stillman
90cc7efef4 Fix #1038 again for separate note windows 2016-08-01 03:36:54 -04:00
Philipp Zumstein
3dfb73faba Allow ZU.doGet to have requestHeaders (#1062)
This is mainly for translators which have to work with content negotiation,
e.g. ORCID API or API calls of ISBN agencies.
2016-07-31 14:46:03 -04:00
Dan Stillman
d5b2f67afa Automatically resolve item deletion/trash conflicts
If the item was deleted on one side and moved to the trash on the other,
just delete the item on the trash side. Since trash emptying happens
automatically, this would otherwise result in a conflict even if the
user carefully avoided making changes before a manual sync.
2016-07-30 23:03:30 -04:00
Dan Stillman
254da12e12 Hide unsigned add-on warning in Standalone
There's no need for Zotero Standalone add-ons to be signed by Mozilla.

Currently only hides when the Extensions pane is first loaded, so if the user
switches to Appearance or Plugins and switches back, the warning reappears
2016-07-23 16:25:25 -04:00
Dan Stillman
9077b2f495 Fix display of some icons in Standalone 2016-07-22 11:59:55 -04:00
Dan Stillman
70a91f9674 Increase max tag colors from 6 to 9 2016-07-22 11:59:55 -04:00
Dan Stillman
3b71ec5410 Throw "Error", not "Exception", in merge.xml 2016-07-21 13:16:08 -04:00
Dan Stillman
01ba8dfc34 Don't show missing-group warning for skipped groups 2016-07-20 15:36:31 -04:00
Dan Stillman
1bd058ed48 Prompt for library data reset on 403 upload error
Addresses #1041 for data -- still needed for files
2016-07-19 22:12:13 -04:00
Dan Stillman
5fee2bf4ca Prompt to reset library data/files on loss of write access
On reset, items are overwritten with pristine versions if available and deleted
otherwise, and then the library is marked for a full sync. Unsynced/changed
files are deleted and marked for download.

Closes #1002

Todo:

- Handle API key access change (#953, in part)
- Handle 403 from data/file upload for existing users (#1041)
2016-07-19 19:05:17 -04:00
Dan Stillman
ee74030d03 Warn if attachmentSyncedModificationTime is set to too-low timestamp 2016-07-19 18:51:15 -04:00
Dan Stillman
3655c09450 Zotero.Item.prototype.deleteAttachmentFile() 2016-07-19 18:51:05 -04:00
Dan Stillman
66ca2cfda2 Fix saving of automatically merged remote changes during sync 2016-07-19 02:27:38 -04:00
Dan Stillman
2857f85656 Alphabetize feed list 2016-07-19 01:50:18 -04:00
Dan Stillman
7b45b920fc Fix clearing of missing fields in Item::fromJSON() 2016-07-18 23:44:36 -04:00
Dan Stillman
2d39614143 Fix subcollections being shown at top level of groups
Fixes #1065
2016-07-18 17:51:59 -04:00
Dan Stillman
ab10d1617e Replace deprecated Zotero.Libraries.isEditable() call on note save 2016-07-17 15:14:06 -04:00
Dan Stillman
381fe38b89 Fix #1038, Notes skip back to beginning if typing during auto-save
Set a unique id on the note editor at initialization and pass it along
to item.saveTx(). When notify() is called, if the save was triggered
from the current note field, don't do a refresh.

This does mean that the note field won't reflect changes (e.g.,
normalizations) made by the save process until the user clicks away and
back, which makes me a little uncomfortable. If we can find specific
cases where that occurs (paste?), we can reevaluate this approach.
2016-07-17 15:14:06 -04:00
Dan Stillman
69dec87aa6 Allow passing arbitrary values to notifier events from DataObject.save()
item.saveTx({
    notifierData: {
        foo: 1
    }
});

foo: 1 will be included in the extraData[id] object in notify().
2016-07-17 15:14:06 -04:00
Dan Stillman
4449da7e91 Tweak note field auto-save triggering
This avoids unnecessary timeout calls and fixes a problem where typing
in a newly initialized note doesn't save it until the first blur().
2016-07-17 15:13:39 -04:00
Dan Stillman
6a7e3d0259 Add "is (less|greater) than" to num pages/volumes search conditions
https://forums.zotero.org/discussion/60897/
2016-07-16 17:15:17 -04:00
Adomas Ven
b0157efd23 Clone feed item if no translators available (#1061) 2016-07-14 14:17:56 -04:00
Adomas Venčkauskas
f7a6464f82 Use feed item links for guid if id unavailable 2016-07-13 13:49:46 +03:00
Dan Stillman
1b6dffb886 Don't refresh collections pane when updating library last-sync times 2016-07-12 03:23:47 -04:00
Dan Stillman
cd3f621a00 Don't auto-sync skipped libraries on change 2016-07-12 00:41:08 -04:00
Dan Stillman
599598566b Use best first creator for OpenURL author, not just first position
This also fixes Google Scholar Search lookup to use an author not in first creator
position [1].

[1] https://forums.zotero.org/discussion/58384/
2016-07-11 06:30:55 -04:00