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
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
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
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
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
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
Dan Stillman
3a995d64a4
Fix saving of tags
2015-05-06 04:23:31 -04:00
Dan Stillman
26e1372f46
Throw an error if item type isn't set when saving
...
And add a test for throwing from setField(), which already happens.
2015-05-06 04:20:47 -04:00
Dan Stillman
7879e5432a
Fix new attachment charset saving, which I definitely didn't test before
2015-05-06 04:20:45 -04:00
Dan Stillman
33eaaffd83
Fix Date Modified handling when saving items
2015-05-06 04:19:20 -04:00
Dan Stillman
e5cbfb71a6
Throw ZoteroMissingObjectError for missing item errors
...
And don't log in DataObject.saveData() before rethrowing, since the
calling code will probably take care of it
2015-05-06 04:19:20 -04:00
Dan Stillman
d67fd9fda2
Don't send add notifications for collections if skipNotifier is passed
2015-05-05 15:57:37 -04:00
Dan Stillman
01f04802f0
Fix loadAllData() on regular items without notes
...
Set a flag when setting the item type that instructs loadAllData()
whether to attempt to call loadNote()
2015-05-05 15:57:37 -04:00
Dan Stillman
beb17436f8
Don't mark parentKey as changed when set to false for an unsaved item
...
And return undefined for search objects
2015-05-05 15:57:37 -04:00
Dan Stillman
b0f52a0f07
Allow attachmentLinkMode to be specified as a string ('linked_url')
2015-05-05 15:57:36 -04:00
Dan Stillman
93a6a4ffdb
Don't mark an empty field set to an empty string as changed
...
And some tests
2015-05-05 15:57:36 -04:00
Dan Stillman
18714a4fcb
Default to user library for saved searches
...
For consistency with collections and items
2015-05-05 03:17:51 -04:00
Dan Stillman
bb760707d4
Get id values directly in Zotero.DataObject.prototype.loadPrimaryData
2015-05-05 02:56:56 -04:00
Dan Stillman
02a36eab9b
Fix various issues with rapid UI/data changes due to asyncification
2015-05-05 02:53:06 -04:00
Dan Stillman
fc428f8e1b
Insert new saved search rows without refreshing collections list
...
And some other selection-related tweaks
2015-05-05 02:52:26 -04:00
Dan Stillman
2ca53677f8
Don't resave collection with no parent after .parentKey = false
2015-05-05 02:52:26 -04:00
Dan Stillman
aa512f0f8d
Miscellaneous data layer fixes and tweaks
2015-05-04 03:19:58 -04:00
Dan Stillman
53e40bb0f4
Miscellaneous tweaks
2015-05-04 02:46:40 -04:00
Dan Stillman
ef91299951
Asyncify Zotero.CollectionTreeCache.clear()
2015-05-04 02:46:39 -04:00
Dan Stillman
8ec248f7ec
Remove some unnecessary asyncness in tree views
...
E.g., closing a container doesn't need to yield
2015-05-04 02:46:39 -04:00
Dan Stillman
d22f762bb6
Add new collection rows without reloading the collections list
2015-05-04 02:46:34 -04:00
Dan Stillman
6328d1f39b
CollectionTreeView::selectLibrary() doesn't need to be async
2015-05-04 02:45:56 -04:00
Dan Stillman
8fec5ace3a
Fix post-save textbox focusing bugs in right-hand pane
...
Fix a couple cases of lost text field focus after an edit, including
focusing of the Title field after using New Item when a field is already
being edited and has a changed value.
Also, in tests, select My Library and wait for items to load when using
the loadZoteroPane() support function. We could add a parameter to skip
that or move it to a separate function, but the code to detect it is a
bit convoluted and it's a prerequisite for many tests, so it's handy to
have a function for it.
2015-05-04 02:45:55 -04:00