Commit graph

6198 commits

Author SHA1 Message Date
Dan Stillman
df353bdc05 Optimistic updates for item tags box
Add/update/remove rows immediately and save after. If there's an error
during saving, reload the pane.
2017-07-18 17:32:38 -04:00
Dan Stillman
ef7da3486a New state-handling approach for item tag changes
If this works out I think we'll want to use this approach for
all data layer changes.

Previously, an unsaved change on an object would update its state
immediately, which was fine for synchronous code but breaks down if a
save involves multiple asynchronous calls, because modifying state after
the relevant data has been saved to the DB but before the `_changed`
object has been cleared would mean that new changes would be lost. Now,
changes are written to _changedData, and a get for the data first checks
_changedData before checking the state property (e.g., _tags) directly.
The changedData property is cleared as it's written, and once the object
is saved, the reload updates the state property with the new data.
2017-07-18 17:31:40 -04:00
Dan Stillman
09a859d7e3 Allow an array of strings in Zotero.Item::setTags()
New tags will all be of type 0 (manual)
2017-07-18 17:21:36 -04:00
Dan Stillman
3715c8da1b Fix use of multiple search translators
It was stopping after the first translator, which meant that some ISBN
lookups failed if the ISBN wasn't in Library of Congress.

Regression from 6da0845f4b, which hopefully didn't have a good reason
for this
2017-07-18 07:13:03 -04:00
Dan Stillman
5268060802 Move Tools -> Options to Edit -> Preferences on Windows
Closes #1167
2017-07-18 04:14:17 -04:00
Dan Stillman
76030d2c4a Fix tag selector font on Windows 2017-07-18 04:14:17 -04:00
Adomas Venčkauskas
6d7dcc44bc Add connector endpoint to retrieve proxies. Closes #1265 2017-07-18 10:25:54 +03:00
Dan Stillman
78dd1e132e Fix calculation of last WebDAV orphaned-file-purge time
Purging was happening after every download.
2017-07-17 16:53:11 -04:00
Dan Stillman
ba514b80d9 Add "Remove All Tags…" option to item tags box context menu 2017-07-17 16:34:52 -04:00
Dan Stillman
918ae23418 Increase default window size to 1000x600
(Plus a little, I think)
2017-07-17 16:34:52 -04:00
Adomas Venčkauskas
f829e4d6cc Fix an integration.js typo. Closes #1263 2017-07-14 13:40:44 +03:00
Dan Stillman
0f965b0de6 Fix collection context-menu options broken in 02774ac6f
E.g., selective sync
2017-07-14 01:06:57 -04:00
Dan Stillman
57881ff587 Fix restoring after closing from full-screen mode on macOS 2017-07-13 18:27:06 -04:00
Dan Stillman
ea513edf73 Prevent infinite loop if search points to itself 2017-07-13 18:07:58 -04:00
Dan Stillman
0c49350cdf Fix startup error from empty 'collection' search condition 2017-07-13 16:10:33 -04:00
Dan Stillman
df24917c2f Fix #1260, Windows Application (menu) key doesn't work in items pane 2017-07-13 03:26:28 -04:00
Dan Stillman
2d8132b6c8 Log URL for snapshot save timeouts 2017-07-13 02:33:28 -04:00
Dan Stillman
1247896d70 Fix crash from tag name collision with Object properties in tag selector 2017-07-13 01:19:15 -04:00
Dan Stillman
4ffbf6fca5 Use DOM_VK_* codes in itemTreeView keypress listener 2017-07-13 01:19:15 -04:00
Dan Stillman
dd5d3a8668 Fix blank window when opening ZotFile's zotero://open-pdf links
Fixes https://github.com/jlegewie/zotfile/issues/272
2017-07-12 18:25:49 -04:00
Dan Stillman
752e25e282 Fix id-not-an-integer warning from Show in Library 2017-07-12 15:44:49 -04:00
Dan Stillman
02774ac6fe Fix collection-menu selection via right-click->drag->release or keyboard 2017-07-12 15:43:20 -04:00
Dan Stillman
aad12db2ff Fix 'too many terms in compound SELECT' sync error 2017-07-12 04:21:52 -04:00
Dan Stillman
8f2508e167 Fix alignment of "What's New" in About window 2017-07-12 03:38:14 -04:00
Dan Stillman
fd2ba1d5b7 Fix file sync error on Windows from attachment paths with invalid characters
We filter these now, but upgraded databases with bad paths could still
exist and cause errors.
2017-07-12 02:58:25 -04:00
Dan Stillman
a62161dfc1 Add unused Zotero.Prefs.resetBranch()
I wrote this for account unlinking (since nsIPrefBranch.resetBranch()
isn't implemented) but decided we didn't want to delete all prefs for
that.
2017-07-12 01:20:55 -04:00
Dan Stillman
a7021f80ca Remove unused skipDefaultData property 2017-07-12 01:20:18 -04:00
Dan Stillman
efae7073f2 Avoid log message about json.collections being unknown after e683b2be0 2017-07-12 01:19:53 -04:00
Dan Stillman
d1d62184be Fix potential error loading support links
From ZOTERO_CONFIG not being defined. I can't reproduce this, but I've
seen it in the logs.
2017-07-12 01:18:41 -04:00
Dan Stillman
62fa86af82 Fix error on account unlink, and delete more files
Delete everything from data directory except for PDF tools
2017-07-12 01:16:25 -04:00
Dan Stillman
d2421825c9 Fix #1256, Report saving is broken 2017-07-11 06:14:21 -04:00
Dan Stillman
a982bd056d Zotero.Item::_collections is always an array 2017-07-11 04:46:09 -04:00
Dan Stillman
18f3c2cfb0 Fix "destFile is not defined" file sync error 2017-07-11 04:37:23 -04:00
Dan Stillman
375b4341a6 Remove debug lines 2017-07-11 04:29:36 -04:00
Dan Stillman
701a46ba84 Batch object deletions during syncing 2017-07-11 04:28:40 -04:00
Dan Stillman
fd7c2a6f6f Try harder to prevent sync-in-progress messages 2017-07-11 02:42:00 -04:00
Dan Stillman
c701f34aaa Fix array length check in Item.setType() 2017-07-11 02:41:41 -04:00
Dan Stillman
e683b2be07 Fix a potential sync error with child attachments
If a standalone attachment existed in a collection and then was added to
a parent (e.g., via Create Parent Item), and attachment metadata was
also changed at the same time (e.g., due to file syncing), the
'collection item must be top level' trigger could throw on another
syncing computer. To work around this, remove collections first, then
make changes to the parentItemID columns, and then add new collections.
2017-07-11 02:35:11 -04:00
Dan Stillman
3272387afe Increase snapshot save timeout to 30 seconds
We should maybe have a shorter timeout in the connector to show an error
and avoid showing the save-to-server dialog, but let's err on the side
of not cancelling saves.
2017-07-09 23:31:25 -04:00
Dan Stillman
32dedc6fb4 Cancel snapshot saves after 15 seconds
Otherwise a save could go on forever and the connector will never show
an error, and if you quit Zotero the connector will show the
save-to-server dialog (though the connector should have its own
timeout).
2017-07-09 23:17:30 -04:00
Dan Stillman
e551777989 Vacuum database automatically on successful integrity check
Firefox does this for Places, so we might as well too.
2017-07-09 18:17:15 -04:00
Dan Stillman
55b2dc39bf Fix Firefox 55 breakage (and remove unnecessary locale lookups)
We were manually looking up the current locale in various places and
passing it to nsIStringBundleService::createBundle(), but that hasn't
even been a supported argument for years. (I assume it was a long time
ago?)
2017-07-09 06:59:50 -04:00
Dan Stillman
59edca783e Allow dragging onto welcome text 2017-07-09 05:49:02 -04:00
Dan Stillman
a7e2e73e51 Update About dialog
- Replace Developers section with text that links to RRCHNM, the credits
page, and Get Involved.
- Remove dedicated zotero.org link
- Only show link underlines on hover
2017-07-08 19:11:45 -04:00
Dan Stillman
2ba773d612 Additional checks for stopped sync 2017-07-07 19:05:22 -04:00
Dan Stillman
de3b47fd78 Add "Delete Automatic Tags in This Library…" option to tag selector menu
I think it might be worth having a tag management window that lets you
view tags as a grid, sort by column (e.g., type), select ranges, delete,
consolidate, etc., but until then, this fulfills a popular request.
2017-07-07 18:19:12 -04:00
Dan Stillman
941ae5499c Use spread operator in flattenArguments 2017-07-07 18:19:12 -04:00
Dan Stillman
f2af77498b Allow single string in Zotero.Utilities.pluralize()
Zotero.Utilities.pluralize(5, 'tag') will produce 'tags' automatically
2017-07-07 18:19:12 -04:00
Dan Stillman
e2d7c7e999 Fix full-text sync tests after 1da18e4ca7 2017-07-07 06:23:27 -04:00
Dan Stillman
3b2d7eb970 Log errors from Zotero.serial()
And output errors in concurrentCaller if not otherwise logged
2017-07-07 05:31:37 -04:00