Commit graph

5714 commits

Author SHA1 Message Date
Dan Stillman
7e39e46085 Focus note editor when pressing Tab is pressed on note in middle pane
Closes #1136
2016-12-21 06:15:05 -05:00
Dan Stillman
084f5a72df Make API server configurable with extensions.zotero.api.url
Needless to say, use of this pref is unsupported.

Closes #901
2016-12-21 05:52:55 -05:00
Dan Stillman
3b6b6aa36b Remove tab mode
Closes #1135
2016-12-21 05:11:21 -05:00
Dan Stillman
405f41f4c2 Disable connector switching
And so it begins...

Closes #1134
2016-12-21 05:11:21 -05:00
Adomas Venčkauskas
8e083c688a Fix connector translator caching from repo and standalone 2016-12-20 17:05:38 +02:00
Dan Stillman
2f65c7d29c Better error logging for https://forums.zotero.org/discussion/63029/ 2016-12-20 03:33:04 -05:00
Dan Stillman
c1035958d4 Fix for child attachments being saved if prefs off (from 8c2c097c6) 2016-12-19 04:19:18 -05:00
Dan Stillman
8c2c097c6b Fix attachment handling during translation
Synchronously determine whether attachment saving should be attempted and only
start attachment progress if it can
2016-12-18 09:07:57 -05:00
Dan Stillman
6994c63a0e Tweak recognizePDF fix, add test coverage, and enable manual tests
Still disabled in Travis until we mock the remote services
2016-12-17 08:05:33 -05:00
Dan Stillman
e34bf4d5cb Prompt to try manual data dir migration again if Firefox is open 2016-12-17 07:42:03 -05:00
Dan Stillman
6b0e3ac2d2 Fix PDF metadata retrieval after 78b1d2ee35 2016-12-17 06:17:37 -05:00
Dan Stillman
b7daef6bf4 Update submodules 2016-12-16 03:31:06 -05:00
Dan Stillman
5950bfd963 Add menu option for opening Error Console in Standalone, commented out
Not sure we want to expose this, particularly since there are tons of
spurious warnings in current builds due to a chrome registration issue,
but it can be handy for debugging some issues.
2016-12-16 03:23:12 -05:00
Dan Stillman
04941f23db Fix switching out of full mode when started in connector mode
Previously, if Standalone was open and Firefox was opened in connector
mode, ZoteroOverlay.onLoad() was never run, which meant that, among
other things, the before-reload handler that closed the Zotero pane when
switching out of full mode was never added.
2016-12-16 03:16:48 -05:00
Dan Stillman
3d117c4135 Fix upgrade prompt after incompatible DB in Standalone
Since 693c0286e, probably
2016-12-15 05:44:52 -05:00
Dan Stillman
50df62a0e7 Remove debug line and tweak whitespace/style 2016-12-15 00:30:37 -05:00
Adomas Venčkauskas
cff74484be Pass failure response to Connector.callMethod callbacks 2016-12-14 16:02:37 +02:00
Adomas Venčkauskas
deb8503863 Remove coroutine from translate.js not supported in connector
From 7fc352b9
2016-12-14 15:28:06 +02:00
Adomas Venčkauskas
a853bb0661 Fix removed translator handling in connectors 2016-12-14 14:18:20 +02:00
Dan Stillman
c5527a82fb Generate new saved search names within libraries, not globally 2016-12-14 03:37:56 -05:00
Dan Stillman
2c9c057360 Fix related items box after 8a4c8d2be0 2016-12-14 03:36:18 -05:00
Dan Stillman
0be67dbda5 Don't allow data dir migration via prefs if directory exists
And treat an existing non-empty directory as a failure during the
migration, since it should now never happen

Also suggest manually moving on Windows if more than 100 attachments
2016-12-14 02:14:56 -05:00
Dan Stillman
58f554a930 Throw if invalid object id passed to Zotero.DataObjects::getAsync() 2016-12-14 02:02:35 -05:00
Dan Stillman
8a4c8d2be0 Classic citation dialog fixes
- Fix loading for libraries that haven't yet been loaded (including if
  the Zotero pane hasn't yet been opened)
- Show a loading message over the items tree
- Fix item selection when editing citation (except if library data
  hasn't yet been loaded, but that doesn't happen in Standalone)
2016-12-14 02:02:21 -05:00
Adomas Venčkauskas
ead9eaf1a0 Align advanced feed settings dropmarker on OSX 2016-12-13 18:16:38 +02:00
Dan Stillman
5862aa5ea5 Don't bother deleting from sync cache when deleting feed items 2016-12-13 09:46:15 -05:00
Adomas Ven
d6d4e4b33e Saner feed database management (#1131)
* Mark feedItems read in a single batch SQL update
* Automatically remove old feed items
* User-facing preference globally and per-feed for feed item expiration
2016-12-13 09:07:43 -05:00
Dan Stillman
7fc352b9b7 Fix "Add Item by Identifier" (broken by 78b1d2ee3)
And make lookup tests run when not on Travis, though we should still mock the
HTTP requests.
2016-12-13 05:23:21 -05:00
Dan Stillman
69430d74b2 Maybe fix race condition when updating translators manually at startup
If you got the timing just right, you could wipe out all your
translators (though standard ones would be reinstalled on restart).
Hopefully that's fixed?
2016-12-13 02:15:53 -05:00
Adomas Ven
747c11c917 Improves proxy support (#1129)
Improves proxy support

- Automatically detect and dehyphenise https proxies which use EZProxy
  HttpsHyphens
- Web translators now pass around Zotero.Proxy instances which can
  proxify/deproxify urls passed to `translate.setLocation()` before calling
  `translate.getTranslators()`/ translate.detect()`. The proxy passing is
  done within connector background/injected processes and between
  standalone and connectors.
- Proxy protocol unified with connectors. Connectors can now pass
  proxies to `/connector/save_items`. The proxies will be used to resolve
  true item and attachment urls when saving.

Closes zotero/zotero#578, zotero/zotero#721

Relevant zotero/zotero#34, zotero/zotero#556
2016-12-12 14:29:59 +02:00
Dan Stillman
c2ebcc9dbc Fix failures on Travis due to broken isDir 2016-12-12 06:57:42 -05:00
Dan Stillman
80f888f374 Fix replacement of existing item storage directories
- Make Zotero.Attachments.createDirectoryForItem() delete existing
  directory instead of moving it to orphaned-files; also now returns a
  string path instead of an nsIFile
- Use above function during file sync instead of
  _deleteExistingAttachmentFiles(), which was partly broken
- Fix throwing on errors when saving some attachment types
2016-12-12 04:06:01 -05:00
Dan Stillman
60ed6d447e Show "Loading…" in Quick Copy drop-down before list is loaded
Styles and translators have to be loaded before the list is displayed,
so there can be a delay if the prefs are opened right at startup.
2016-12-12 02:05:17 -05:00
Dan Stillman
425838e2ec Fix potential translator initialization problem after 04516af552 2016-12-12 02:04:18 -05:00
Dan Stillman
2ead95b39a Don't include child items in imported-item count 2016-12-11 03:00:10 -05:00
Dan Stillman
4d77977a29 Select items after importing from clipboard
And wait for async switch to My Library if in a non-editable view
2016-12-11 02:30:34 -05:00
Dan Stillman
bb246e5514 Scroll first selected row into view in itemTreeView::selectItems()
Separate out the enhanced ensureRowIsVisible() logic from selectItem()
and call it from selectItems() as well on the first item in the set.
2016-12-11 02:30:34 -05:00
Dan Stillman
142694ca0f Fix opacity of lines in progress popup when using addLines()
Lines default to 50%, but addLines() doesn't provide a mechanism for
updating the opacity, so all the callers that used addLines() showed as
gray. Instead, just default to 100% when using addLines().
2016-12-11 02:30:34 -05:00
Dan Stillman
78b1d2ee35 Import translation improvements
- Don't block the UI with a progress meter during imports. Instead, show
  a popup in the bottom right when the import is done that shows how
  many items were saved.
- Fix hang when importing some files
- Fix various problems with asynchronous operations/transactions
    - Use the save queue for imports instead of creating concurrent
      transactions that can time out
    - Wait for the save to finish before returning from the translate()
      promise. All save modes now use the save queue, so code that
      handled the non-save-queue process can probably be removed.
    - Serialize child attachments instead of running them concurrently.
      This might make multi-attachment saves a little slower, since they
      can't download at the same time, but it avoids problems with
      concurrent transactions. We might be able to improve this to allow
      concurrent downloads, or allow concurrent saves for a limited
      number of items (e.g., from web saving) if not for larger imports.
- Change collection handling during import, since UI is now active
  - Select the root collection at the beginning of the import
  - Assign items and collections to the root during the import instead
    of at the end
  - Don't select other collections
- Change a few ItemSaver functions to use promises and remove
  unnecessary callbacks. (This includes some connector code that needs
  to be tested.)
- Change some `parentID` variables in ItemSaver to `parentItemID` for
  clarity, since collections are now handled in more places

To-do:

- Save items in smaller batches instead of doing all in the same
  transaction
- Show progress meter in a bottom-right popup during the import
2016-12-11 02:30:34 -05:00
Dan Stillman
c61a9dc5f3 Localized plural form support for Zotero.getString()
Zotero.getString() now takes a third parameter, `num` (which should also
appear in `params`) to use when determining which plural form of the
string to use. Localized strings should include all forms in the order
specified in [1], separated by semicolons.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals
2016-12-11 02:30:34 -05:00
Dan Stillman
9836f33d41 Add .collections support to Zotero.Attachments.linkFromURL() 2016-12-09 06:30:39 -05:00
Dan Stillman
0e72ee3305 Sort translators in import filepicker drop-down 2016-12-09 06:30:38 -05:00
Dan Stillman
04516af552 Stop using Zotero.lazy() for Zotero.Translators.init()
It makes things too complicated with some of the logic necessary for bundled
file updating.
2016-12-09 06:30:38 -05:00
Dan Stillman
98720462fe Fix multi-tag insert mode 2016-12-08 06:57:05 -05:00
Adomas Venčkauskas
eaa758870e Octal literals invalid in strict mode, replacing with hexadecimal
Relevant in connectors
2016-12-08 13:28:33 +02:00
Dan Stillman
fbd21bae16 Don't update feeds after syncs during tests
This reverts commit 60befe52e4 and adds a
better fix that leaves the notifier event in place. Feeds just don't
need to update after syncs during tests.
2016-12-08 05:58:46 -05:00
Dan Stillman
2b9ef26c61 Fix renaming linked attachment files 2016-12-08 03:57:49 -05:00
Dan Stillman
021f8e1476 Bypass cache when requesting .prop file from WebDAV
This might not be necessary, but it's an attempt to troubleshoot
https://forums.zotero.org/discussion/63439/attachments-not-syncing,
which might be a caching issue.
2016-12-06 08:40:19 -05:00
Dan Stillman
73e1fd07b0 Fix error exporting standalone notes 2016-12-06 08:17:45 -05:00
Dan Stillman
99cd11e793 Exclude feeds from Quick Format searches
Addresses #1126
2016-12-06 07:14:16 -05:00