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
ab4320df07
Add Zotero.Libraries.getAll()
2015-05-19 01:20:12 -04:00
Dan Stillman
e0ea3ca99b
Don't show "[object Object]" in varDump() output
2015-05-19 01:17:12 -04:00
Dan Stillman
3b0b2c59b7
Always show HTTP request resolution, even without debug flag
2015-05-19 01:17:12 -04:00
Dan Stillman
abaa4da5ab
Much better data object change detection
...
Replace Z.DataObjects::diff() with Z.DataObjectUtilities.diff(). Instead
of just returning two objects with the differing fields, the new diff()
generates a changeset with operations to apply with applyChanges(),
including at the array member level for collections and tags. This,
combined with cached pristine copies of objects, will allow for vastly
better conflict resolution, with automatic merging of non-conflicting
changes.
Creators currently don't show granular changes, and ordering might make
it too tough to do so. Relations diffing isn't yet implemented.
2015-05-19 01:17:12 -04:00
Dan Stillman
daad18c1b5
Include running function in current count in ConcurrentCaller log line
2015-05-15 01:47:20 -04:00
Dan Stillman
f727b224e7
Fix tag diffing
2015-05-15 01:47:20 -04:00
Dan Stillman
7a93b132b3
Merge pull request #715 from rmzelle/proxylist-editbutton
...
Add Edit button to proxy list
2015-05-14 13:10:20 -04:00
rmzelle
bd8db988f3
Add Edit button to proxy list
2015-05-14 09:26:38 -04:00
Dan Stillman
3f4eebe51c
Set 'synced' to false automatically on save, unless value is changed
...
And add 'skipSyncedUpdate' option to leave untouched
Also move some save logic into Zotero.DataObject.prototype._saveData(),
and call that first.
2015-05-13 19:32:53 -04:00
Dan Stillman
fa039971e6
Fixes #714 , Zotero.defineProperty() lazy mode doesn't work
...
Patch from @aurimasv
2015-05-13 13:43:55 -04:00
Dan Stillman
f376db0705
Remove duplicate Zotero.defineProperty() function
...
Ended up in two places somehow
2015-05-13 12:35:26 -04:00
Dan Stillman
27ab9869be
Fix DB upgrading (broken in 14d435b8d
)
2015-05-13 11:20:12 -04:00
Dan Stillman
d9553b3cb2
Remove default for lastViewedFolder pref
...
The library row now has a different format, and My Library is selected by
default anyway.
2015-05-13 11:20:12 -04:00
Dan Stillman
3eed76698c
clearUserPref no longer throws on an invalid pref
2015-05-13 11:20:12 -04:00
Dan Stillman
1f8b6fad61
Don't include collections in child item JSON export
...
But handle it in Zotero.Items.diff() if it's there for one item
2015-05-13 11:20:11 -04:00
Dan Stillman
a4e6e96d3c
Use 2 seconds instead of 1 for closeTo() date tests
...
In case saving is real slow
2015-05-12 20:12:10 -04:00
Dan Stillman
24022623a1
Move patchBase into options in Zotero.Item.prototype.toJSON()
...
Also:
- Make .mode == 'patch' optional if .patchBase is provided.
- Remove requirement for item to be unchanged, which hopefully wasn't there for
a good reason
- Add a few tests, though more are needed
2015-05-12 20:12:10 -04:00
Dan Stillman
1578675ace
Change 'finite' param to 'maxTime' in delayGenerator
...
Allows delaying up to a specified amount of time before yielding false
2015-05-12 20:12:05 -04:00
Dan Stillman
27899c85b5
Add setter and tests for dateAdded
...
Setting dateAdded is necessary for syncing
2015-05-12 19:55:14 -04:00
Dan Stillman
1558ed8a27
Update Zotero.DataObjects.prototype.diff() to handle API JSON
2015-05-12 19:51:02 -04:00
Dan Stillman
50f627c0cd
Replace CollectionTreeView::getLastViewedRow() with selectByID()
2015-05-12 19:45:14 -04:00
Dan Stillman
d67e615b73
Allow foo, fooTest, fooTest.js, and tests/fooTest.js when running tests
2015-05-12 19:42:54 -04:00
Dan Stillman
7761335bc7
Merge pull request #712 from retorquere/export-group
...
export groups (#487 )
2015-05-12 12:03:00 -04:00
retorquere
47ffa1188a
export groups, unify library export
2015-05-12 17:52:35 +02:00
Dan Stillman
4d37b3d4c9
Temporary debugging of ItemTreeView::notify() yielding
2015-05-10 18:33:44 -04:00
Dan Stillman
c83bc1b01d
Don't reload skipped data types
2015-05-10 18:32:11 -04:00
Dan Stillman
14d435b8d8
Closes #711 , Remove support for nested transactions
2015-05-10 18:32:10 -04:00
Dan Stillman
e584dbf5dd
Wait for items list to refresh before handling notifications
...
This fixes an error if New Item is used before the items list has
loaded.
2015-05-10 18:30:07 -04:00
Dan Stillman
6faa2caff8
Add queryTx() to a run a single query in a transaction
...
Otherwise a write statement could run in the middle of an unrelated open
transaction.
2015-05-10 18:30:06 -04:00
Dan Stillman
aa70e60fc6
Add clearTimeout() implementation to Bluebird
...
Necessary for cancellable promises
2015-05-10 18:30:06 -04:00
Dan Stillman
03da4a9d52
Restore unselecting of last row in tree if removed
...
If no other rows are selected, select the row before the removed row
2015-05-10 18:30:06 -04:00
Dan Stillman
af7da366c9
Get connection without yielding if available in executeTransaction
2015-05-10 18:30:05 -04:00
Dan Stillman
a39a42546f
Add missing yield in restoreSelectedItems()
2015-05-10 18:30:05 -04:00
Dan Stillman
a64282118b
Fix items-count updating in right-hand pane
...
And some other tweaks to ZoteroPane.itemSelected()
2015-05-10 18:30:05 -04:00
Dan Stillman
84ff141edd
Make the '✖' for test errors red
...
This makes it much easier to find the errors in a long list of tests.
2015-05-10 03:30:25 -04:00
Dan Stillman
e2b62580d1
Fix errorHandler check in DataObject.save()
2015-05-08 13:35:04 -04:00
Dan Stillman
3349930483
Allow fromJSON to be called on unsaved items
2015-05-08 13:35:04 -04:00
Dan Stillman
5635fec4e3
Various creator-saving fixes
2015-05-08 13:35:01 -04:00
Dan Stillman
9f8510c821
Throw ZoteroUnknownTypeError on unknown item type in getItemTypeFields
...
This needs to be done in additional places as well.
2015-05-08 03:38:28 -04:00
Dan Stillman
3214e37d92
Ignore empty 'filename' property in Item.fromJSON()
2015-05-08 03:38:27 -04:00
Dan Stillman
e3da547c81
Avoid error if item tree disappeared during refresh
2015-05-08 03:38:27 -04:00
Dan Stillman
2a69885b11
Fix placement of saved searches in collections tree
...
And unify row add/remove handling between collections tree and items
tree
2015-05-07 18:20:26 -04:00
Dan Stillman
67abbc8c4a
Add errorHandler option to DataObject.prototype.save()
...
This allows calling code to do something other than call Zotero.debug()
on errors (like, say, nothing, in order to avoid logging certain
expected errors) before throwing.
2015-05-07 18:20:26 -04:00
Dan Stillman
47f3c1efe6
Don't reselect items unnecessarily
...
Store and check the last selected items in ZoteroPane.itemSelected() to
see if it's necessary to refresh the item pane. This prevents loss of
textbox focus if another write occurs while editing a field.
Also optimize row adding/removing in itemTreeView.js
2015-05-07 15:09:41 -04:00
Dan Stillman
afface4fba
Fix Zotero.Utilities.arrayEquals() for nested array comparisons
2015-05-07 15:09:41 -04:00
Dan Stillman
94f968ae57
Add Sinon mock framework for tests
2015-05-07 15:09:41 -04:00
Dan Stillman
c19a597766
Create 1000x400 browser windows for tests
2015-05-07 15:09:41 -04:00
Dan Stillman
37f5669319
Fix making an item a child item if it's in any collections
2015-05-07 15:09:40 -04:00
Dan Stillman
2525f8e532
Fix dragging items to collections
2015-05-07 15:09:40 -04:00