Commit graph

5491 commits

Author SHA1 Message Date
Dan Stillman
2c18968c3a Fix Quick Format dialog for search results in unloaded libraries
Since the search might return items in libraries that haven't yet been loaded,
we have to get those items asynchronously and load their data explicitly. Need
to test this with a large document to make sure it still properly populates the
list with search results and then adds matching cited items.
2016-05-17 13:43:11 -04:00
Dan Stillman
7192929ac3 Add Zotero.DataObjects.prototype.loadDataTypes(objects, dataTypes)
Bulk-loads data for objects that are potentially in different libraries. This
would generally be used to load necessary data for cross-library search
results, since those results might include objects in libraries that haven't
yet been loaded.
2016-05-17 13:43:11 -04:00
Dan Stillman
dd9cc40c16 Cancel pending feed update check on Zotero shutdown
This avoids errors for a missing 'feeds' table during tests, when the callback
started in Zotero.Feeds.init() runs but the Zotero object has been torn down
and the database hasn't yet been reinitialized.
2016-05-17 13:43:11 -04:00
Dan Stillman
6907af86fd Add XPCOM clearTimeout() and remove Zotero.wait()
Properly emulate setTimeout() with support for cancelling timers.
2016-05-17 13:43:11 -04:00
Dan Stillman
a285e97815 Remove pumpGenerator/promiseGenerator
And update integration code to use ES6 generators and Bluebird's .each()
instead.
2016-05-17 13:43:11 -04:00
Dan Stillman
d8025be676 Ignore sanitization changes when comparing notes in conflict
Until we have a consistent way of sanitizing HTML on client and server, account
for differences manually. More differences between HTMLPurifier and TinyMCE
should be added as necessary.
2016-05-17 02:33:53 -04:00
Dan Stillman
6f04b34d59 Close #945, Optimize bulk reload on multi-item changes 2016-05-16 18:25:35 -04:00
Dan Stillman
56dcd6da26 Add file sync info/link to File Not Found dialog 2016-05-15 04:24:00 -04:00
Dan Stillman
427234917d Properly test whether file syncing is enabled for a library 2016-05-15 04:22:24 -04:00
Dan Stillman
a8ea8656d2 Fix sync error after changing child item to top-level 2016-05-15 03:34:06 -04:00
Dan Stillman
a7ea92fd52 Mark items with missing full-text cache files as unsynced for full text
Fixes #954, Full-text content processor tries to process missing cache
files on every idle
2016-05-15 01:30:35 -04:00
Dan Stillman
82d00a4e7a Change some instances of attachmentMIMEType to attachmentContentType 2016-05-13 15:56:35 -04:00
Dan Stillman
eb400587e8 Fix various bugs saving from connector and add test 2016-05-13 15:00:54 -04:00
Dan Stillman
55c60a69ac Delay feed fetching 5 seconds at startup
Would be better not to start until after the initial library's items had
been loaded, but that's a little awkward to do from non-window code.
Might make more sense when there's only Standalone.
2016-05-13 02:26:46 -04:00
Dan Stillman
59c0c7fcad Don't include file properties for ZFS-synced libraries
They're disallowed by the API in group libraries and not necessary in personal
libraries, because they're set atomically with the file upload.
2016-05-12 17:00:28 -04:00
Dan Stillman
0f45569ccd Default to NC for My Publications CC license, and reorder SA option 2016-05-12 14:31:57 -04:00
Dan Stillman
62ef910631 Better debug output for full sync 2016-05-12 03:02:50 -04:00
Dan Stillman
92ec1324dc Add a debug flag to prompt or throw on an attempted sync upload
extensions.zotero.sync.debugUploadPolicy = {1, 2}

1 to prompt, 2 to throw

This can be used to test sync functionality without altering the server
state unexpectedly. When prompting, the request body, if any, is logged
to debug output.
2016-05-12 03:02:50 -04:00
Dan Stillman
98cd96eb01 Make DELETE a write method in Zotero.HTTP.isWriteMethod() 2016-05-12 03:02:26 -04:00
Dan Stillman
8bbde63284 Update menu for non-collections when right-clicking on unselected row
Previously, item-dependent menu options in the context menu of
collectionsTreeRow types other than 'collection' weren't updated after
the asynchronous loading of the items. The menu is now updated for all
types, so, e.g., "Empty Trash" is now updated properly after items in
the trash have been loaded.
2016-05-12 02:12:22 -04:00
Dan Stillman
16a58c03be Save scroll position across non-selected changes for collections view 2016-05-09 13:58:33 -04:00
Dan Stillman
9345452601 Don't restore items tree scroll position if selecting new items 2016-05-09 13:58:23 -04:00
Dan Stillman
0bab038925 Fix #984, 5.0: Avoid scrolling items list when adding items via sync 2016-05-09 13:26:33 -04:00
Dan Stillman
53e1e1a9b7 .collectionTreeViewID -> .treeViewID, and add it to Zotero.Item too
Also .collectionTreeViewImage -> .treeViewImage
2016-05-09 12:34:03 -04:00
Dan Stillman
cb8b2bda1b Windows file path fixes
- Fix upgrading of Mozilla-style attachments/storage file paths on upgrade
  (requires re-upgrade)
- Save relative paths using forward slashes for consistency, and convert
  to platform-appropriate slashes on use
2016-05-09 02:30:00 -04:00
Dan Stillman
317b1dfa0f Disable connector switching for 5.0 beta
Don't start the connector pipe (Mac/Linux), don't listen for IPC on the
command-line (Windows), and don't try to release Standalone's lock if DB is
busy when Firefox starts.
2016-05-08 22:38:58 -04:00
Dan Stillman
216900094b Merge branch '4.0' 2016-05-07 13:27:56 -04:00
Dan Stillman
e5edd12371 RTF Scan fixes
- Firefox 46 compatibility
- Stretched progress meters

Partial backport of c5716a395f
2016-05-07 13:18:22 -04:00
Dan Stillman
c7c271f2c4 Fix CSL editor in Firefox 46 2016-05-07 13:17:57 -04:00
Dan Stillman
e1706e15e2 Expand/collapse library fixes
- Fixes #994, 5.0: "+" doesn't expand all collections within a library
- If a container (library, collection) is closed directly, the open state of
  all containers below it are now restored when it's reopened. Previously all
  collections would be closed on a manual reopen (though they might have been
  restored on the next Zotero restart).
- If "-" is pressed, all containers are closed, and reopening the library will
  show only top-level collections.
2016-05-07 04:02:42 -04:00
Dan Stillman
458d110269 Add file for custom sync exceptions 2016-05-06 05:18:09 -04:00
Dan Stillman
950b583e3b Remove obsolete code 2016-05-06 05:00:36 -04:00
Dan Stillman
52ca6d4713 Handle browser-offline error from anywhere in sync code
And don't throw from ConcurrentCaller, because it results in an
unhandled rejection
2016-05-06 05:00:17 -04:00
Dan Stillman
2894e4f462 Fix search by collection 2016-05-06 04:31:49 -04:00
Dan Stillman
8ba9fe7b80 Remove redundant failure delay handling in sync engine
The API client now automatically retries 5xx errors with a backoff schedule, so
the engine doesn't need to do it.
2016-05-06 04:31:49 -04:00
Dan Stillman
a78f923a72 Sync engine cleanup
- Use custom exception for user-initiated sync cancellations, which can bubble
  up to the sync runner -- this should help with a sync stop button (#915)
- Separate out deletions-downloading code
- Refactor delay generator handling on library version mismatch
- Clearer variable names
2016-05-06 04:31:49 -04:00
Dan Stillman
ab4138cf26 Don't throw in Zotero.DataObjects::get() for nonexistent objects
Return false for single ids or skip for multiple ids. This is the original
behavior, but at some point it started throwing an UnloadedDataException. IDs
are always loaded at initialization, though, so we know whether the objects
actually exist.
2016-05-05 06:36:24 -04:00
Dan Stillman
bf3ad6a2a4 Fix test breakage from 3ab335a0 and 09c3a95a 2016-05-05 06:36:24 -04:00
Dan Stillman
b7ad582d99 Merge pull request #991 from adomasven/fix/feed-import-test
Fixes feed-import (and possibly other feed) test unhandled rejections
2016-05-05 06:08:33 -04:00
Adomas Venčkauskas
d4a799b5cb Closes #981. Fixes feed-import (and possibly other feed) test unhandled rejections 2016-05-05 11:07:27 +01:00
Dan Stillman
09c3a95a7e Improve downloaded object processing
- Use an increasing notifier batch size, so objects initially appear one by one
  but then start showing up in batches, up to 50. (UI updates are expensive, so
  for larger syncs we don't want to update after each object.)
- Avoid separate save to update attachment file sync state, which was also
  happening outside of notifier batches (causing individual updates regardless
  of the batch size)
- Add a 10ms delay after processing each object, which keeps the UI responsive
  during downloads. #989 could reduce this to 1 during idle, to save a few
  minutes when downloading very large libraries.
2016-05-05 04:47:01 -04:00
Dan Stillman
4ac2da42d1 Zotero.Items.getAsync() -> get() in itemTreeView::notify() 2016-05-05 02:16:09 -04:00
Dan Stillman
3ab335a078 Don't clear search field when updating items list during sync
Fixes #985
2016-05-05 02:16:08 -04:00
Dan Stillman
8c98abe9dc Fix #988, 5.0: Tab skips Abstract and Extra fields 2016-05-04 21:10:08 -04:00
Dan Stillman
cd5e805b9e Sync logic improvements
- Cancel sync when cancelling conflict resolution window
- Don't try to upload unsynced objects if present in sync queue
2016-05-04 01:39:24 -04:00
Dan Stillman
391f525a75 Close #975, Process conflicts for all batches together 2016-05-03 23:18:42 -04:00
Dan Stillman
f8a0f9ad1d Use synchronous object getters during sync
Since objects should always already be loaded
2016-05-03 18:27:08 -04:00
Dan Stillman
f751495ce8 Remove debug output hover over sync icon 2016-05-03 18:27:08 -04:00
Philipp Zumstein
aef8453924 Fix some for each ... in cases (#978) 2016-05-03 17:51:12 -04:00
Dan Stillman
096ebb188b Try to log a better error for some instances of Zotero.debug(e); 2016-05-03 13:47:37 -04:00
Dan Stillman
72c8711cd3 String::contains() -> indexOf() for Firefox 48 (and 38) compatibility
.contains() was removed in Firefox 48, but .includes() wasn't available until
40, so use indexOf() for now. We can start using .contains() once we no longer
need to support 38 ESR.
2016-05-03 12:08:38 -04:00
Dan Stillman
315100e5ef Remove obsolete style code 2016-05-03 12:06:29 -04:00
Dan Stillman
e8aec31715 Fix various cases of sync errors with read-only libraries
Addresses #983
2016-05-03 02:55:26 -04:00
Dan Stillman
f844d9e46d Skip full-text content download if main library version hasn't changed
Since a data sync always happens first, the main library version will
always be higher if there's any full-text content to download.
2016-05-03 01:17:53 -04:00
Dan Stillman
e0e744f9b1 Use multi-item requests for full-text writes
This is necessary to get a library version after the write instead of an
item version. Otherwise after a full-text write, the main library
version is behind, so the next sync checks all object types for that
library instead of getting a 304.

Full text is batched up to 500K characters or 10 items, whichever is
less.

This also switches to using ?format=versions for /fulltext requests,
which isn't currently necessary but reflects what it's actually doing.
2016-05-03 01:17:52 -04:00
Dan Stillman
a0c7cf9bee Remove redundant error handling in Z.Sync.Data.Engine::_uploadObjects()
makeRequest() now retries 5xx errors automatically, so it's not
necessary higher up.
2016-05-02 05:53:07 -04:00
Dan Stillman
4cc6408105 Use object destructuring in Zotero.Sync.Data.Engine::_uploadObjects() 2016-05-02 05:52:42 -04:00
Dan Stillman
862b371b49 Refactor some API response handling code 2016-05-02 01:28:37 -04:00
Dan Stillman
14ce455483 Fix #982, 5.0: File dots not showing up for child attachments 2016-04-30 19:18:59 -04:00
Dan Stillman
6afce0cf22 Fix "treeRow is undefined" error dragging to bottom of collections list
If you drag past the collections list the row is -1.

Fixes #958
2016-04-30 17:15:13 -04:00
Dan Stillman
10181f7f56 Fix sync error on missing full-text
If a version is returned for an item's full-text content but a 404 is returned
for the content itself (because it's missing in Elasticsearch for some reason),
don't throw an error.

Also remove legacy array comprehensions in fulltext and syncFullTextEngine test
files, which apparently weren't being run.
2016-04-30 01:24:33 -04:00
Dan Stillman
750d691712 Throw errors instead of strings in FeedReader rejections 2016-04-29 23:32:49 -04:00
Dan Stillman
13c4bbebfa Save master item when merging 2016-04-29 20:29:44 -04:00
Dan Stillman
877063e73d Merge branch '4.0' 2016-04-29 20:29:31 -04:00
Dan Stillman
b4ac43fd77 Fix startup error on Firefox 48
Addresses #980. There are a couple other uses of the old API, but I'm not sure
how they're triggered, and we might be gone from Firefox before this is
relevant.
2016-04-29 17:28:24 -04:00
Dan Stillman
ef71d3f729 Revert "Try disabling gzip compression of uploads, in case it fixes sync error"
This reverts commit adec007df0.

Doesn't seem to make a difference.
2016-04-29 11:57:11 -04:00
Dan Stillman
adec007df0 Try disabling gzip compression of uploads, in case it fixes sync error
Just to see if it fixes the "Error connecting to server" errors some people are
seeing after upgrading to Firefox 46.
2016-04-29 00:38:19 -04:00
Adomas Venčkauskas
477a1fb5bc Fixes sync error when transfering credentials from legacy to API key 2016-04-28 15:18:09 +01:00
Dan Stillman
186561f320 Merge pull request #950 from adomasven/feature/import-feeds-from-opml
Close adomasven/zotero#11. Add support for feed imports from OPML files
2016-04-28 01:09:47 -04:00
Adomas Venčkauskas
3b758e562b Close adomasven/zotero#11. Add support for feed imports from OPML files 2016-04-27 20:32:20 +01:00
Dan Stillman
bb522868ad Merge pull request #977 from adomasven/fix/feed-remove-after-setting
Closes #961. Fixes feed dialogue remove read articles value not saving
2016-04-27 13:29:36 -04:00
Adomas Venčkauskas
98a3c4aeaa Closes #961. Fixes feed dialogue remove read articles value not saving 2016-04-27 16:38:28 +01:00
Adomas Venčkauskas
1892f7b5b0 Closes #951. Bypasses cache when retrieving feeds 2016-04-27 15:27:09 +01:00
Dan Stillman
295e9f3ecf Don't retry cancelled conflicts immediately
If other items were saved in the same batch, the conflict resolution
window could reappear immediately after cancelling it.
2016-04-27 05:45:35 -04:00
Dan Stillman
c146adce38 Hide sync error panel after custom button is clicked 2016-04-27 03:15:29 -04:00
Dan Stillman
e5bf7eff21 Open account settings in new tab from quota message 2016-04-27 03:15:10 -04:00
Dan Stillman
6d6afdd706 Show correct quota message for personal library 2016-04-27 03:14:51 -04:00
Dan Stillman
0ebf49849a Log counts of storage requests that succeeded and failed 2016-04-27 02:35:24 -04:00
Dan Stillman
1c90a77298 Fix handling of 413 for over-quota errors
And fix handling of custom error dialog button text/callbacks in
general.
2016-04-26 18:59:23 -04:00
Dan Stillman
098655d913 Prompt about username change at sync time, not just in prefs
This is necessary because you can copy a database synced with a
different account into the data directory without affecting the stored
pref.

Also tweak the text to use proper quotes and remove quaint references to
"the server".
2016-04-26 18:12:20 -04:00
Dan Stillman
758af2be9e Align "Set Up Syncing" button in prefs 2016-04-26 16:27:26 -04:00
Dan Stillman
a62e7e46bf Remove some unreachable code
Addresses #974
2016-04-26 02:00:51 -04:00
Dan Stillman
95ba68a757 Don't skip uploads of more than 25 items…
Fixes #965
2016-04-26 01:35:01 -04:00
Dan Stillman
55688a8104 Load item data in feed libraries before refreshing feeds 2016-04-26 00:00:12 -04:00
Dan Stillman
a8e94a8cba Extra debug logging for #965 2016-04-25 23:41:49 -04:00
Dan Stillman
f82fb89e1c Sort parent collections and items first in uploads
Closes #972
2016-04-25 20:16:31 -04:00
Dan Stillman
12e369b2b6 Show the invalid login prompt for an invalid API key
Addresses #953, but the message should still be updated to be more
precise now that passwords aren't used directly.
2016-04-25 03:12:11 -04:00
Dan Stillman
4eee369b66 Use /keys/current for key requests
Possible after https://github.com/zotero/dataserver/commit/beb38579ca1
2016-04-25 02:51:35 -04:00
Dan Stillman
ebb2f1667d Log feed errors to console 2016-04-25 00:50:28 -04:00
Dan Stillman
a05134e903 Fix search by file type
Fixes #966
2016-04-25 00:50:27 -04:00
Dan Stillman
010249e49b Fix support for old type-forcing object syntax for DB query parameters 2016-04-25 00:50:19 -04:00
Dan Stillman
a605fe1cff Don't try to access itemsView until loaded in citation dialogs 2016-04-25 00:33:57 -04:00
Dan Stillman
7bc80d1f32 Don't allow citing from feeds in classic dialog
And allow feeds to be hidden from collectionTreeView with hideSources

Fixes #964
2016-04-25 00:32:32 -04:00
Dan Stillman
174405defb Fix feed refresh interval calculation 2016-04-25 00:05:05 -04:00
Dan Stillman
7d4aa521ac Update citeproc-js to 1.1.101 2016-04-24 20:06:22 -04:00
Dan Stillman
bee32d1a51 Remove merged items from duplicates view without regenerating list 2016-04-24 19:58:44 -04:00
Dan Stillman
7cf0ff2683 Update citeproc-js to 1.1.100 2016-04-24 06:50:45 -04:00
Dan Stillman
a218da859c Fix COinS generation outside of translators
Fixes #963, 5.0: CrossRef lookup is not working
2016-04-24 04:50:29 -04:00
Dan Stillman
6a47d1dc44 Fix #962, 5.0: Add item by identifier in collection
Also adds a test for this, but lookup tests are disabled
until #699 is resolved.
2016-04-24 04:28:56 -04:00
Dan Stillman
425c86ca5e Fix #957, 5.0: Drag collections creates error messages 2016-04-24 04:07:23 -04:00
Dan Stillman
87a2eece3a Fix #959, 5.0: Submit to Zotero Server is not working 2016-04-24 04:04:40 -04:00
Dan Stillman
9f100cd011 Add 'logBodyLength' flag to Zotero.HTTP.request()
Can be used to limit how much of the request body is shown in debug
output, defaulting to 1024 chars.
2016-04-24 04:01:14 -04:00
Dan Stillman
a91957c588 Fix #956, 5.0: Merging of duplicate items is not working 2016-04-24 02:44:21 -04:00
Dan Stillman
c6444c29de Merge branch '4.0' 2016-04-23 04:07:51 -04:00
Dan Stillman
385e36a746 Show invalid-login prompt if no API key
This can be improved further in #953.
2016-04-23 03:33:01 -04:00
Dan Stillman
352eff2f04 Allow typing of usernames with spaces in the middle 2016-04-23 03:19:16 -04:00
Dan Stillman
f633db1f01 Miscellaneous tweaks 2016-04-23 00:59:20 -04:00
Dan Stillman
b66a6b9518 Remove old sync throttle code (replaced by Backoff header) 2016-04-23 00:58:52 -04:00
Dan Stillman
121a2f79a8 Check for closed database and cancel sync
This can prevent a long hang if there's a shutdown during sync.
2016-04-22 22:48:58 -04:00
Dan Stillman
d3fc4eb554 Mark browser-offline exception as fatal during syncing 2016-04-22 22:48:58 -04:00
Dan Stillman
9c7663979e Fix dragging of URLs into items list 2016-04-22 22:48:58 -04:00
Dan Stillman
f1af54236e Add Zotero.Notifier.Queue to keep event groups separate, and use for sync
A queue can be created and passed as an option to data layer methods, which
will then queue events on that queue instead of the main internal queue. A
queue or an array of queues can then be passed to Zotero.Notifier.commit() to
commit those events.

Some auxiliary functions don't yet take a queue, so those events will still get
run on DB transaction commit.

Sync data processing now processes notifier events in batches to reduce
repaints, even though individual objects are processed within their own
transactions (so that failures don't roll back other objects' data).

Also remove some unused notifier code
2016-04-22 22:48:58 -04:00
Dan Stillman
1e5090579b Fix ordering of notifier events
I'm not sure this matters -- since it was broken, itemTreeView notify()
code probably accounts for situations where, say, a 'modify' comes in
before an 'add' -- but it might avoid some edge cases in the future.
2016-04-22 22:48:57 -04:00
Dan Stillman
d974206d65 Add Zotero.warn()
Similar to Zotero.logError()
2016-04-22 22:48:46 -04:00
Dan Stillman
a726699b27 Update citeproc-js to 1.1.99 2016-04-22 00:01:37 -04:00
Dan Stillman
8a6402a744 Remove extra map refresh in itemTreeView::sort() 2016-04-22 00:00:37 -04:00
Dan Stillman
0539aa244a Another Zotero.Tags.getID() fix after e2cbfbd0fe 2016-04-21 16:40:45 -04:00
Dan Stillman
10806c0a2d Add id to Zotero.Tags notifier registration 2016-04-21 16:17:13 -04:00
Dan Stillman
39973abfa4 Update additional Zotero.ID.getID() calls after e2cbfbd0f 2016-04-21 16:15:41 -04:00
Dan Stillman
e7d27ee0f3 Close #931, [Async DB] Update long tag fixer 2016-04-21 11:46:23 -04:00
Dan Stillman
e2cbfbd0fe Deasyncify Zotero.Tags.getID()/getAsync(), and add Zotero.Tags.create() 2016-04-21 11:07:16 -04:00
Dan Stillman
bf416e56c2 Tweak sync error logging 2016-04-20 02:32:12 -04:00
Dan Stillman
3dabd63a0a Close #930, [API Syncing] Sync synced settings 2016-04-19 05:22:16 -04:00
Dan Stillman
97f3854662 Include 400 response in logged sync errors 2016-04-19 05:21:45 -04:00
Dan Stillman
716ba66032 Replace deprecated function call in sync code 2016-04-19 05:20:53 -04:00
Dan Stillman
2ee6886cf1 Update citeproc-js to 1.1.98 2016-04-17 04:16:25 -04:00
Dan Stillman
67f358df4b Fix error trying to load old snapshot annotations 2016-04-16 16:49:48 -04:00
Dan Stillman
d8850b25c2 Fix buttons in proxy redirect notification box 2016-04-16 14:22:11 -04:00
Dan Stillman
5e6b763623 Update citeproc-js to 1.1.96 2016-04-16 02:44:33 -04:00
Dan Stillman
c5716a395f Various RTF Scan fixes
- Firefox 46 compatibility
- Async DB
- Stretched progress meters
2016-04-15 04:45:50 -04:00
Dan Stillman
08b3eed7da Zotero.DataObject._loadDataType() -> .loadDataType()
It's generally not necessary to call this, but it can be useful if
specific data needs to be loaded in an unloaded library (e.g., an item's
creators for RTF Scan)
2016-04-15 04:45:50 -04:00
Dan Stillman
8e932ce73f Remove debugging lines 2016-04-15 04:23:03 -04:00
Dan Stillman
62f4586eb0 Properly disable download-mode menulist for groups in Sync pref pane 2016-04-15 01:33:28 -04:00
Dan Stillman
045554dd8e Fix #926 again with async DB 2016-04-13 01:59:27 -04:00
Dan Stillman
79504df5f8 Remove "/report.html" in report URLs
Firefox saves as Zotero Report.html (localized) without it, which is
fine.
2016-04-12 18:59:46 -04:00
Dan Stillman
ba1f69b4d5 Merge branch '4.0' 2016-04-12 16:09:10 -04:00
Joscha Legewie
f4e4f27279 Bug fix progressWindow.js: nArcs undefined
`nArcs` is undefined in `this.ItemProgress.prototype.setProgress()`. This has been the case for a long time but never came up because the progress indicator isn't used in Zotero, I believe. I think it's a nice UI element though and could be used for non-disruptive progress indicators.
2016-04-12 14:23:59 -05: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
d0a110072b Fix relation migration
The schema update step was generating invalid relations for related
items, resulting in sync errors on upload.
2016-04-11 14:48:26 -04:00
Dan Stillman
49d85dbe0f My Publications wizard changes
- Only show first pane (without Sharing pane) if no files or files
  aren't included
- Update authorship checkbox to reflect file include setting to avoid
  confusion
- Clarify in intro text that license applies to files, not notes --
  notes here are no different than notes in any public library, so it's
  sort of up to the user to clarify those if they're substantial enough
  for it to matter
- Adjust alignment of authorship checkbox if more than one line
2016-04-11 03:41:32 -04:00
Dan Stillman
aee214ed44 Update collection context menu once items have loaded
Otherwise, when right-clicking on a collection that's not currently
selected, some of the menu items appear gray at first, and a second
right-click is necessary after the items have loaded. This way the menu
items turn black once the items have loaded.
2016-04-11 02:52:09 -04:00
Dan Stillman
bb4db297c4 Fix "this.selection is undefined" switching away from loading collection 2016-04-11 02:29:25 -04:00
Dan Stillman
7c3a134107 Show loading message in middle pane if items loaded after startup 2016-04-11 02:29:08 -04:00
Dan Stillman
5e614e2787 Fix a few protocol handler bugs 2016-04-11 02:22:13 -04:00
Dan Stillman
46997bd3e4 Fix "cannot access dead object" error at startup
This could happen if a second page was loaded quickly at startup, before
translators finished loading and detection ran on the first page.
2016-04-11 02:20:10 -04:00
Dan Stillman
a1ef16a0a6 Add .library to Zotero.DataObject
This should replace uses of Zotero.Libraries.get(item.libraryID).
2016-04-10 19:46:10 -04:00
Dan Stillman
0469d6506a Show toolbar icon and collections pane while items are loading
Items in a library are now loaded only when a library is clicked on and
at sync time. There might be some other areas where they need to be
loaded or where this causes problems (e.g., drag and drop, word
processor integration).
2016-04-10 19:01:36 -04:00
Dan Stillman
2bdb818988 Fix large toolbar icons on HiDPI Linux
Fixes #943
2016-04-10 16:05:33 -04:00
Dan Stillman
85c0c086d5 Disable Restore to/from Zotero Server and add back Full Sync
Restore to/from will need to be reimplemented for API syncing (#914)

Closes #916
2016-04-10 05:19:51 -04:00
Dan Stillman
c9c5e40e95 Don't log relations-upgrade messages as errors 2016-04-10 04:32:23 -04:00
Dan Stillman
23e01fcefd Fix saving to My Library if Zotero pane hasn't been opened 2016-04-09 18:34:54 -04:00
Dan Stillman
9c53fe893c Skip collectionTreeView::notify() actions if no selection
I think this only happens if the Zotero pane hasn't yet been opened, which also
means an initial refresh() hasn't been done, which means that updates aren't
necessary.
2016-04-09 18:30:45 -04:00
Dan Stillman
1c19fe8d81 Use proper on-detect handler rather than pageshow in browser tests
Otherwise the test could run scrapeThisPage() before translators were ready. It
would be good to make scrapeThisPage wait for detection to complete so that an
early press still uses a translator for saving, but this way tests can also
test for the proper icon (though they don't now).
2016-04-09 18:26:13 -04:00
Dan Stillman
b650263d66 "Sync with Zotero Server" -> "Sync with zotero.org" 2016-04-08 17:03:29 -04:00
Dan Stillman
d2a5181637 Clarify/correct a couple Zotero.Item file method comments 2016-04-07 21:18:44 -04:00
Dan Stillman
14341ca16c Clear item creators when calling setCreators() with an empty array 2016-04-07 21:10:11 -04:00
Dan Stillman
79748b9132 Fix #940, UI not updating when dragging child item between parents 2016-04-07 21:10:11 -04:00
Dan Stillman
d78089d4b9 Properly update parent isOpen flag when removing child item at end of list 2016-04-07 21:10:10 -04:00
Dan Stillman
afaaf20c90 Allow click on menu title to select feed item add target
Instead of requiring a click on the menuitem at the top of the submenu, allow
a click on the menu itself.

This is a hack that, among other things, replicates the flash effect on
menuitems on OS X. Unfortunately, <menu> elements can't have checkboxes, so
only the menuitem in the submenu will be checked. (Otherwise I'd remove the
redundant menuitem in the submenu.)
2016-04-07 06:16:06 -04:00
Dan Stillman
a360494724 Backport Zotero.ID changes (fabc2ba6a) to 4.0 2016-04-07 04:43:54 -04:00
Dan Stillman
4bc4acb923 Hide empty fields in item pane when not editable (e.g., feeds)
A stopgap measure until we have a better design for the item pane
2016-04-06 05:14:29 -04:00
Dan Stillman
df1cdb9754 Abstract field tweaks
- Allow clicking on non-editable abstract field to expand/collapse it
- Change cursor when hovering over abstract to show it can be toggled
- Default abstracts to expanded
2016-04-06 02:04:06 -04:00
Dan Stillman
0f5b277c91 Fix error on missing files when searching full-text content 2016-04-06 01:10:42 -04:00
Dan Stillman
d7309ca64e Use hi-res attachment file bullets 2016-04-06 01:10:01 -04:00
Dan Stillman
d6064cfeba Add Zotero.hiDPISuffix to avoid "@2x" logic each time
Can use Zotero.hiDPISuffix directly in URLs to automatically substitute
"@2x" on HiDPI displays.
2016-04-06 01:09:14 -04:00
Dan Stillman
71d79e1f08 Make sure info pane is selected for feed items 2016-04-05 15:08:11 -04:00
Dan Stillman
1e8b74d9b9 Tweak item pane padding
The item pane scrollbox was actually padded on the outside. This removes
that padding, which slightly increases the viewable content in the pane.
2016-04-05 15:07:49 -04:00
Dan Stillman
f70c2bfa0a Feed item button tweaks
- Fix persistence of last translation target
- Add checkbox to menuitem of selected target
- Remove unnecessary flex attributes

Also:

- Move collectionTreeView row id (e.g., "L1", "C123") and image
  generation to Zotero.Library and Zotero.Collection properaties,
  .collectionTreeViewID and .collectionTreeViewImage -- currently used
  only for the feed add-to button, but could be expanded for use in
  collectionTreeView
2016-04-05 02:24:58 -04:00
Dan Stillman
8714816cec Fix feed item add-to button appearance on OS X 2016-04-05 02:24:36 -04:00
Dan Stillman
aa266c11f4 Add quotes around feed button target 2016-04-04 23:24:19 -04:00
Dan Stillman
cf212e2b70 Initialize feed button only when necessary
And without extra init() call

This fixes the button being initialized before Zotero.hiDPI is set, resulting
in a low-res icon until the target is changed.
2016-04-04 23:18:29 -04:00
Adomas Venčkauskas
5b8d3c178f Add a menu option to add feeds found on a page
Closes #adomasven/zotero/10
2016-04-04 17:36:51 -04:00
Dan Stillman
0f7d1c7061 Fix various connector-mode issues for 5.0
Still more to fix
2016-04-04 06:33:15 -04:00
Dan Stillman
7a449e8deb Clearer parameter name for autocomplete select handler
Refs #926
2016-04-02 04:16:35 -04:00
Dan Stillman
eecd625298 Populate both creator fields on Tab autocomplete select
Closes #926
2016-04-02 04:11:35 -04:00
fbennett
55bfe54af2 Bugfixes for new styled-textbox code 2016-04-02 12:02:53 +09:00
Dan Stillman
cdedbaccac Add some missing empty platform-specific CSS files 2016-04-01 06:05:59 -04:00
Dan Stillman
c8affb49ee Add empty Mac/Windows itemPane.css to avoid CSS load error 2016-04-01 05:51:49 -04:00
Dan Stillman
943b2c1ddf Don't auto-sync on feed library changes, and add Zotero.Library::syncable 2016-04-01 05:47:43 -04:00
Dan Stillman
7aa6d98f35 Use library icon for New Library button, and add more HiDPI icons
Includes HiDPI icons for feed rows, which weren't showing up before
2016-04-01 05:37:25 -04:00
Dan Stillman
129b8113b9 Don't try to show secondary sort menu in feeds
(Feeds don't have a visible primary sort column.)
2016-04-01 05:33:14 -04:00
Dan Stillman
842dea973b Remove references to removed Zotero.Items.cacheFields() 2016-04-01 05:33:14 -04:00
Dan Stillman
4cccf27bb1 A few debug message tweaks 2016-04-01 05:33:14 -04:00
Adomas Venčkauskas
3dc0ad3745 Add feed menu buttons. Close adomasven/zotero#9. 2016-04-01 12:25:37 +03:00
Dan Stillman
8a57183e0b Remove unused version table rows 2016-04-01 02:38:36 -04:00
Dan Stillman
514547ab3b Reinstate auto-sync, and remove lots of old sync code
The on-change auto-sync now syncs only the modified library, and does so
quite efficiently (and should be able to be made more efficient), so we
might be able to reduce the timeout below 15 seconds.
2016-04-01 02:30:17 -04:00
Dan Stillman
9b231169b2 Return the new item from ZoteroPane.duplicateSelectedItem() 2016-04-01 02:00:30 -04:00
fbennett
9431e0de53 HTML/RTF and RTF/HTML conversion for styled textbox 2016-04-01 09:24:02 +09:00
Adomas Venčkauskas
2b41f7af1d Close #934. Remove feed item read state syncing 2016-03-31 12:37:01 +03:00
Dan Stillman
70c41e8a51 Update citeproc-js to 1.1.91 2016-03-30 23:24:34 -04:00
Dan Stillman
fabc2ba6a2 Always start at MAX() + 1 for Zotero.ID.get(), and deasyncify
Instead of getting batches of unused primary key ids, even if they're lower
than other ids, which for some reason seemed like a good idea in 2008, just do
a `MAX()` on the table at startup and return the next available id on each call
to `Zotero.ID.get()`. This is much simpler, and not reusing ids allows them to
be used as a chronological sort field.

While SQLite's `SELECT last_insert_rowid()` could return auto-increment values,
it's unsafe with async DB access, since a second `INSERT` can come in before
the first `last_insert_rowid()` is called. This is true even in a transaction
unless a function that calls it is never called in parallel (e.g., with
`Zotero.Promise.all()`, which can be faster than sequential `yield`s).

Note that the next id is always initialized as MAX() + 1, so if an object is
added and then deleted, after a restart the same id will be given. (This is
equivalent to (though unrelated to) SQLite's `INTEGER PRIMARY KEY` behavior,
as opposed to its `INTEGER PRIMARY KEY AUTOINCREMENT` behavior.)

Closes #993, Feed items out of order
2016-03-30 01:39:43 -04:00
Dan Stillman
87acdce81b Pass query options to logQuery for DB.(value/column)Query
Allows, e.g., `debug: false` to work for those methods.
2016-03-28 17:53:03 -04:00
Dan Stillman
cebf2a3125 Throw an error from queryAsync() if onRow throws an error
If onRow throws StopIteration, the query will stop gracefully.
2016-03-28 17:47:25 -04:00
Dan Stillman
0c5eacbd0f Follow existing pref for gzip-compressed uploads 2016-03-28 05:19:32 -04:00
Dan Stillman
f906b4226d Fix loading of Edit Bibliography window in Firefox 45
Edit textbox is still broken, at least for some items.
2016-03-28 03:14:09 -04:00
Dan Stillman
35530af1fb Gzip-compress API uploads larger than 1000 characters 2016-03-28 02:38:28 -04:00
Dan Stillman
92f2e38325 Remove Zotero.UnresponsiveScriptIndicator
If import/export can still trigger the warning (which hopefully they
can't), we should just asyncify those further.
2016-03-27 03:34:40 -04:00
Dan Stillman
8b1f10aee0 Properly delete library version for full-text sync on library delete 2016-03-27 03:19:39 -04:00
Dan Stillman
b5adb084f2 Don't reload last folder on items pane crash, in case it's the problem
Otherwise you have to edit the prefs to continue using Zotero if, say, a saved
search causes a crash.
2016-03-26 04:16:23 -04:00