Commit graph

23 commits

Author SHA1 Message Date
Dan Stillman
3241faf503 Fix tag saving for intercepted imports from connector
Save tags in intercepted files as automatic tags
2018-05-23 21:16:18 -04:00
Dan Stillman
d0e42a1186 Automatically switch to My Library on connector save in noneditable view 2018-04-27 18:27:06 -04:00
Dan Stillman
1cfc90186f Serialize attachment indexing
Add newly added attachments to a queue, start processing it after five
seconds have passed since the last attachment was added, and process
another every half second after that unless another is added.

This queue won't survive a restart, so the queue should really be in the
DB, but this should avoid problems when adding multiple attachments at
once.

Addresses #1284
2018-03-01 01:28:28 -05:00
Dan Stillman
97661539dc Automatically retrieve metadata when saving PDFs
Applies to dragging to the collections pane or the items pane, adding
via New Item menu, or saving via the connector server

If the renaming pref is enabled, the PDF is renamed after recognition.

Can be disabled in the preferences

Closes #917
2018-03-01 01:28:28 -05:00
Dan Stillman
c8cf9b9e6f Support for connector-based save target selection
- Updates /saveItems and /saveSnapshot to take a sessionID
- Provides a list of editable collections in the current library
- Adds an /updateSession method that takes a sessionID and updates the
  collection and tags of any items saved via that operation (and changes
  the currently selected collection)

Cross-library changes are not yet supported
2018-02-07 04:04:37 -05:00
Dan Stillman
48d4d2d5a5 Standardize connector server behavior for saves to read-only libraries
Return a 500 for read-only libraries for all save modes. Read-only views
within editable libraries will save to the library root.

Addresses #185, RIS/BibTeX interception to read-only view behaves
differently from save button
2017-09-27 17:39:18 -04:00
Adomas Venčkauskas
a5a7df328a Changes imports from connector to save to selected collection
Closes #1289
2017-08-15 11:35:53 +03:00
Adomas Venčkauskas
84c1367e7b Adjust connector server test for ece3491e2 2017-07-19 11:55:46 +03:00
Tom Najdek
063e13ef22 Modernize sinon.stub() calls 2017-06-01 11:36:17 -04:00
Adomas Venčkauskas
01df8f59e5 Default to first translator for /connector/savePage if not provided 2017-02-21 16:40:10 -05:00
Dan Stillman
0570c2edc7 Fix test failure after 27cb099c82
Attachments are now saved before the connector server responds, because they're
no longer started out-of-band in saveItems(). This is necessary to prevent
transaction badness during imports, but it may not be what we want for the
connector, so we may want to revisit this after further testing.
2017-02-09 02:29:24 -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
9541a6cfcd Fix connector server test after 6900a5cc 2016-11-30 22:40:54 -05:00
Adomas Venčkauskas
45c944e731 Fix server_connector tests broken in 69ab4b0b
Don't display error prompt in standalone when style install fails.
Fixes an import bug when import input is invalid.
2016-11-30 14:58:43 +02:00
Adomas Ven
69ab4b0b1d Add server_connector endpoint to import styles and import translatable resources (#1120) 2016-11-29 14:59:58 -05:00
Adomas Venčkauskas
e83bbbad4e Fix getTranslatorCode bugs
- /connector/getTranslatorCode used to respond with empty content
- CodeGetter froze connectors by issuing hundreds of simultanious XHR
  requests
2016-09-20 15:55:58 +03:00
Adomas Venčkauskas
3f25d64984 Fixes freezing occuring on linux while running tests
server_connectorTest - alternating port prevents
exceptions not catchable in JS for httpd server when the socket
and the port remains open after httpd.stop() callback

support - changes the window on which `setTimeout()` is ran in dialogs.
If the timeout is ran on the main window the `dialog` object appears to
lose certain properties and not respond to interactions completely.
2016-06-23 16:15:48 +03:00
Dan Stillman
fdd90b04d3 Save to My Library via connector when read-only library is selected
(Or My Publications, which is editable but shouldn't allow direct saving)

Also switches to My Library
2016-06-09 02:47:29 -04:00
Dan Stillman
19714d5b9b Avoid logged error after server_connector saveSnapshot tests
Indexing currently happens a second after the 201 is returned to the
connector, so we have to wait for that before continuing tests, or else
a DB clear in a later test (e.g., storageLocal) will cause an error to
be logged when the indexing kicks off.
2016-06-02 16:47:27 -04:00
Dan Stillman
47b934f67e Fix direct saving of PDFs via connector 2016-05-25 17:34:26 -04:00
Dan Stillman
7b5b2dc89e Close browser window in server connector tests 2016-05-23 01:19:44 -04:00
Dan Stillman
0be2796500 Fix webpage/snapshot saving from connector 2016-05-20 15:51:54 -04:00
Dan Stillman
eb400587e8 Fix various bugs saving from connector and add test 2016-05-13 15:00:54 -04:00