Commit graph

123 commits

Author SHA1 Message Date
Dan Stillman
ba1f69b4d5 Merge branch '4.0' 2016-04-12 16:09:10 -04:00
Dan Stillman
9330b9cd40 Update submodules 2016-04-12 04:52:52 -04:00
Dan Stillman
560eb37d0b Schema update step to fix invalid item relations
As corrected in d0a110072
2016-04-11 16:29:48 -04:00
Dan Stillman
8a57183e0b Remove unused version table rows 2016-04-01 02:38:36 -04:00
Dan Stillman
a1ce85decb Overhaul object downloading/processing during data syncs
Previously, objects were first downloaded and saved to the sync cache,
which was then processed separately to create/update local objects. This
meant that a server bug could result in invalid data in the sync cache
that would never be processed. Now, objects are saved as they're
downloaded and only added to the sync cache after being successfully
saved. The keys of objects that fail are added to a queue, and those
objects are refetched and retried on a backoff schedule or when a new
client version is installed (in case of a client bug or a client with
outdated data model support).

An alternative would be to save to the sync cache first and evict
objects that fail and add them to the queue, but that requires more
complicated logic, and it probably makes more sense just to buffer a few
downloads ahead so that processing is never waiting for downloads to
finish.
2016-03-23 04:29:04 -04:00
Adomas Venčkauskas
12fc6cfbe8 Various feeds changes
- Hide notes, tags and related for feed items in itembox
- Add feed support for <enclosure> elements
- Add feed syncing methods for synced settings (additional work is
  needed on the sync architecture to download synced settings from the
  server)
- Change feed item clear policy to be less aggressive
- Adjust for deasyncification
- Disable translate-on-select
- Close adomasven/zotero#7, Remove context menu items from feeds
2016-03-22 06:56:36 -04:00
Adomas Venčkauskas
e206b0af5e Various feeds changes
- Change sort order for feed items to natural order
- Remove display of dates in itembox
- Trim html tags from creators in FeedReader parser
2016-03-22 06:56:33 -04:00
Dan Stillman
f4896a15ec Merge branch '4.0' 2016-03-17 05:08:06 -04:00
Dan Stillman
8830dfeff9 Update version and submodules 2016-03-15 03:31:08 -04:00
Dan Stillman
244a52ad22 Merge branch '4.0' 2016-03-06 01:20:51 -05:00
Dan Stillman
ee1e8578ce Update submodules 2016-03-01 01:25:48 -05:00
Dan Stillman
a152e35786 Don't create itemSeeAlso table (already removed via schema updates) 2016-02-17 18:04:06 -05:00
Dan Stillman
3b402c564c Closes #900, Change fields order for cases in system.sql 2016-02-06 04:12:07 -05:00
Dan Stillman
3071b8093b Merge branch '4.0' 2016-01-20 01:23:02 -05:00
Dan Stillman
c5a9987f37 WebDAV file sync overhaul for 5.0
Also:

- Remove last-sync-time mechanism for both WebDAV and ZFS, since it can
  be determined by storage properties (mtime/md5) in data sync
- Add option to include synced storage properties in item toJSON()
  instead of local file properties
- Set "Fake-Server-Match" header in setHTTPResponse() test support
  function, which can be used for request count assertions -- see
  resetRequestCount() and assertRequestCount() in webdavTest.js
- Allow string (e.g., 'to_download') instead of constant in
  Zotero.Sync.Data.Local.setSyncState()
- Misc storage tweaks
2015-12-30 05:14:50 -05:00
Dan Stillman
0673face28 Update submodules and maxVersion 2015-12-10 16:33:51 -05:00
Dan Stillman
62aeb1da32 Full-text syncing support via API [DB reupgrade] 2015-11-12 02:54:51 -05:00
Dan Stillman
ccd765ff74 Update versions and submodules 2015-11-08 16:21:20 -05:00
Dan Stillman
7f43ca9503 Merge branch '4.0' 2015-11-01 21:22:13 -05:00
Dan Stillman
1e6c29766f Add deletion uploading to API syncing [DB reupgrade]
Tags deletions are not currently synced, and maybe don't need to be.
2015-11-01 03:58:54 -05:00
Dan Stillman
a22fe2ecda Update translators and renamed-styles.json 2015-10-02 05:05:26 -04:00
Dan Stillman
1b333be23f Add Zotero.Library.prototype.lastStorageSync 2015-09-29 04:42:13 -04:00
Dan Stillman
ec66d15a5f Update version and submodules 2015-09-24 22:13:35 -04:00
Aurimas Vinckevicius
88ab129ffb Add Feed and FeedItem
Also:
* _finalizeErase in Zotero.DataObject is now inheritable
* Call _initErase before starting a DB transaction
* removes Zotero.Libraries.add and Zotero.Libraries.remove (doesn't seem like this is used any more)
2015-09-21 17:08:21 -05:00
Dan Stillman
030f532d04 Update submodules 2015-08-27 16:00:36 +02:00
Dan Stillman
4eff7bd2d4 Update submodules 2015-08-13 18:38:59 -04:00
Dan Stillman
0aecaad761 Update conflict resolution for API syncing
This will appear much less frequently, since non-conflicting field changes on
both sides can be resolved automatically, but genuine field conflicts still
require manual conflict resolution.

The merge pane is no longer editable, since the itembox code to do that is
async and can't run in a modal window, but it's not really necessary,
particularly with conflicts happening less frequently.

TODO:

- Remote item deletions
- File conflicts
- Maybe handle some edge cases where the conflicted items fail to save
2015-08-06 04:14:49 -04:00
Dan Stillman
7b0c34a3ab Update submodules 2015-08-05 15:11:24 -04:00
Dan Stillman
fb9109e837 Update versions and submodules 2015-07-26 18:33:04 -04:00
Dan Stillman
5c523d8694 Merge branch '4.0' 2015-07-18 07:09:53 -04:00
Dan Stillman
2ad0f5ecdc Update translators 2015-07-12 23:57:58 -04:00
Dan Stillman
20f279043b Update submodules 2015-07-03 02:09:27 -04:00
Dan Stillman
4c751740b4 Update versions and translators 2015-06-30 23:41:48 -04:00
Dan Stillman
4233d2ebbd Update translators and repotime 2015-06-30 00:12:57 -04:00
Dan Stillman
99dd1c0697 Merge branch '4.0'
Since modal windows (e.g., the Create Bib window and the Quick Copy site
editor window) can't use yield, style retrieval
(Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a
previous async Zotero.Styles.init(). The translator list is generated in
the prefs window and passed into the Quick Copy site editor, but it's
possible the translators API should be changed to make getTranslators()
synchronous with a prior init() as well.
2015-06-27 16:59:58 -04:00
Dan Stillman
3a5854f49f Update versions and submodules 2015-06-26 02:40:18 -04:00
Dan Stillman
33dedd1753 Tags overhaul [DB reupgrade]
- Simplified schema
- Tags are now added without reloading entire tag selector
  - On my system, adding 400 tags to an item (separately, with the tag
    selector updating each time) went from 59 seconds to 42. (Given that
    it takes only 13 seconds with the tag selector closed, though,
    there's clearly more work to be done.)
- Tag selector now uses HTML flexbox (in identical fashion, for now, but
  with the possibility of fancier changes later, and with streamlined
  logic thanks to the flexbox 'order' property)
- Various async fixes
- Tests
2015-06-23 05:21:58 -04:00
Dan Stillman
f7216298b4 Update character set handling
Restore prepopulated charset table, but this time with just the
encodings from the WHATWG Encoding Standard. Assigning a charset to
Zotero.Item::attachmentCharset runs the value through
Zotero.CharacterSets.toCanonical() automatically.

This migrates attachment charsets to the new canonical values, clearing any
that are unsupported.

Other legacy mappings could still be added back, as disussed in #760.
2015-06-12 02:46:02 -04:00
Dan Stillman
a22c4969e6 Move editable and filesEditable props to libraries table [DB reupgrade]
And add group.fromJSON(json, userID), which sets editable and
filesEditable properties based on the group JSON (libraryReading, role
lists, etc.) and the given user
2015-06-07 15:50:07 -04:00
Dan Stillman
a740658452 Relations overhaul (requires new DB upgrade from 4.0)
Relations are now properties of collections and items rather than
first-class objects, stored in separate collectionRelations and
itemRelations tables with ids for subjects, with foreign keys to the
associated data objects.

Related items now use dc:relation relations rather than a separate table
(among other reasons, because API syncing won't necessarily sync both
items at the same time, so they can't be stored by id).

The UI assigns related-item relations bidirectionally, and checks for
related-item and linked-object relations are done unidirectionally by
default.

dc:isReplacedBy is now dc:replaces, so that the subject is an existing
object, and the predicate is now named
Zotero.Attachments.replacedItemPredicate.

Some additional work is still needed, notably around following
replaced-item relations, and migration needs to be tested more fully,
but this seems to mostly work.
2015-06-01 20:28:30 -04:00
Dan Stillman
eee0e22bf6 Add 'version' to sync cache primary key
The sync cache will have pristine copies of the existing versions of
local objects for better conflict resolution, but downloads will get
saved to the sync cache first before processing, so the cache needs to
be able to hold more than one version.
2015-05-19 01:25:31 -04:00
Dan Stillman
43a2045aec Change computerProgram 'version' to 'versionNumber'
And use 'version' instead of 'itemVersion' for object version for items

Also add deferred foreign key checking to system.sql so that DROP TABLE
commands don't fail mid-transaction
2015-05-04 02:45:53 -04:00
Dan Stillman
d8f3be4bee updateBundledStyles() asyncification and related changes
- Use async DB and OS.File for bundled file updates
- Remove support for translator/style ZIP files -- the two options are
  now non-unpacked XPIs with subfolders or unpacked source installations
- Now that we have async file access, don't store translator code in
  database cache -- just store metadata so that it's available without
  reading each translator file
- Change the (previously partially asyncified) Zotero.Styles/Translators
  APIs a bit -- while the getAll/getVisible methods are asynchronous and
  will wait for loading, the get() methods are synchronous and require
  styles/translators to be initialized before they're called. Most
  places that end up calling get() probably call getAll/getVisible first
  and should therefore be async, but if there's any way to trigger a
  get() first, that will need to be adjusted.
- Asyncify various other style/translator-related code

XPI support is untested, as is style/translator usage, so there are
almost certainly bugs. The latter depends on updated export format
support (#659), since toArray() no longer exists on this branch.

Addresses #529 and #520
2015-03-22 04:27:25 -04:00
Dan Stillman
bdd69d0a53 Merge branch '4.0' into api_syncing 2015-03-16 23:41:10 -04:00
Dan Stillman
a03772cae7 Merge branch 'master' into api_syncing
Note that this loses conflicting changes to translate_item.js from 849803473a,
so those will need to be reapplied if applicable. /cc @aurimasv, @mtd91429
2015-03-16 15:23:07 -04:00
Dan Stillman
39ecb7d916 Update translators 2015-02-10 22:52:53 -05:00
Dan Stillman
1afa1ffea6 Update submodules, repotime, and versions 2015-02-10 00:13:42 -05:00
Dan Stillman
b5b85ee589 Update submodules and repotime 2015-01-31 16:06:21 -05:00
Dan Stillman
b0e37a38a2 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/schema.js
	chrome/content/zotero/xpcom/translation/translate.js
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2015-01-29 19:59:47 -05:00
Dan Stillman
b785a3bfce Dynamically populate charsets table
Instead of limiting charsets to a fixed list, dynamically populate it
with any charset name of less than 50 ASCII characters. Previously,
unknown charsets were discarded.

Zotero.Item.prototype.attachmentCharset now always returns a charset
name. It can be set with either a name or a charsetID.

Also:

- Remove the unused 'originalPath' column in itemAttachments
2015-01-28 17:15:16 -05:00