Commit graph

7806 commits

Author SHA1 Message Date
Dan Stillman
2939b3ae95 Merge branch 'mendeley-import' (#1451) 2018-06-05 07:52:12 -04:00
Dan Stillman
0f4e5ef508 Mendeley import
Accept Mendeley SQLite databases via File → Import… and perform a
direct import, including collections, timestamps, notes, attachments,
and extracted annotations.

When a Mendeley database is present, File → Import… shows a wizard that
lets you choose between a file and Mendeley for the source, and choosing
the latter shows a list of available databases in the Mendeley data
directory.

Known fields that aren't valid for a type are stored in Extra.

Files in the Mendeley 'Downloaded' folder are stored. Files elsewhere
are linked.
2018-06-05 07:52:01 -04:00
Dan Stillman
a894404ad3 Update locales from Transifex 2018-06-05 06:18:52 -04:00
Dan Stillman
c5ba2e55f3 Add a debug line before submitting output
This will help clarify whether the person waited to submit or just
submitted while stuff was happening.
2018-06-04 19:58:10 -04:00
Dan Stillman
f7e411d561 Add support for databases in other directories
Previously you could use Zotero.DBConnection to open another database in
the data directory, but not one stored elsewhere in the filesystem. This
allows an absolute path to be passed instead. Various operations
(backups, corrupt DB recovery, pragma commands) are disabled for
external databases.
2018-06-02 04:10:39 -04:00
Dan Stillman
603388c79d Add missing quote to error 2018-06-02 02:27:24 -04:00
Adomas Venčkauskas
547f1c29e3 Integration: Fix non-existent session errors preventing displayError from working 2018-06-01 23:26:24 +03:00
Dan Stillman
9220b2d9c2 Fix inconsequential bug in Zotero.MIME.sniffForMIMEType()
`undefined` was being passed as an argument to slice(), but 0 is the
only offset that's used anyway, and that's what happens if you pass
`undefined`.
2018-05-27 21:23:38 -04:00
Dan Stillman
7271fdf6b7 Add Zotero.Sync.Runner.delayIndefinite()
Delays syncing until the returned function is run
2018-05-27 21:23:38 -04:00
Dan Stillman
86b94ae713 Add optional 'db' parameter to Zotero.DB.tableExists()
To check attached databases
2018-05-27 21:23:38 -04:00
Dan Stillman
52737ec694 Set locking_mode=EXCLUSIVE only for main database in Zotero.DBConnection
Otherwise attached databases are also exclusive
2018-05-27 21:23:38 -04:00
Dan Stillman
6ff51103f5 Make Zotero.ItemFields.getFieldIDFromTypeAndBase() work on non-base fields
This previously returned false if a non-base-mapped field was passed,
even if the field was valid for the given item type. It now returns the
passed field as long as the field is valid for the type, which matches
the behavior for base fields.
2018-05-27 21:23:38 -04:00
Dan Stillman
44fd598699 Load creators if needed to update display title in Items._loadItemData() 2018-05-27 21:23:38 -04:00
Dan Stillman
a714f06670 Use Zotero.warn() for item.setCreator() warning 2018-05-27 21:23:38 -04:00
Dan Stillman
78e87a351c Handle relations property in collection fromJSON() 2018-05-27 21:23:38 -04:00
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
Adomas Venčkauskas
2f620c5f91 Fix corrupt bibliography handling. Closes #1503 2018-05-22 13:28:13 +03:00
Dan Stillman
763d7dec75 Allow Link header for translation-server responses via CORS 2018-05-15 21:17:45 -04:00
Dan Stillman
4acd178819 Fix user-agent handling for faked UAs from connector 2018-05-15 20:18:41 -04:00
Adomas Venčkauskas
6960b7f86e Fixes the refresh error after style reinstall. Closes #1500 2018-05-15 14:14:07 +03:00
Dan Stillman
81ab8f7b20 Allow header object instead of just content type in server responses 2018-05-13 04:27:27 -04:00
Dan Stillman
05843bb093 Fix base fields in connectorTypeSchemaData.js 2018-05-10 02:26:44 -04:00
Dan Stillman
5751838a3d Update submodules 2018-05-09 04:20:41 -04:00
Dan Stillman
20dd81729b Update locales from Transifex 2018-05-09 04:18:23 -04:00
Dan Stillman
4a7aad03c4 Fix text() brokenness, and remove change warning fo attr()/text()
1) text() wasn't handling the index property.

2) This removes the warning that attr()/text() no longer no require a
document as the first argument, because there's no reason to prevent
translators from being able to pass an element. It would require
rewriting various translators unnecessarily and make certain patterns
more verbose (because you'd need to match based on global scope in each
selector).

It won't be necessary to pass a Document once we remove 4.0 support and
the global attr()/text() are always available, so we can add a warning
for that then.

Fixes zotero/translators#1647
2018-05-08 20:33:13 -04:00
Dan Stillman
90677ae158 Add tick@2x.png 2018-05-08 19:17:35 -04:00
Adomas Venčkauskas
23224f6093 Fix 'idx is undefined' error in integration missing item handler 2018-05-07 15:23:07 +03:00
Martynas Bagdonas
9165a0247f Fix PMID and arXiv identifiers extraction (#1498) 2018-05-07 06:04:11 -04:00
Dan Stillman
e6dbd1ed92 Add PDF Expert support to zotero://open-pdf
Requested here: https://github.com/jlegewie/zotfile/issues/352#issuecomment-386896327
2018-05-06 14:07:23 -04:00
Dan Stillman
5a85d1ac9e Update citeproc-js to 1.1.206 2018-05-05 03:28:59 -04:00
Dan Stillman
9ebe4037a4 Update locales from Transifex 2018-05-05 02:48:08 -04:00
Dan Stillman
7dbfd5ce29 Remove some extraneous lines in Zotero.OpenPDF 2018-05-05 01:54:49 -04:00
Dan Stillman
609657a8e4 Add zotero://open-pdf handler to open PDF at a given page
This is loosely based on the same functionality in ZotFile, but it tries
to do the right thing based on existing Zotero settings: either the new
PDF handler setting in the prefs or the system-default app. The latter
can only reliably be determined on Windows (and this uses ZotFile's
function to read that from the registry), but this tries to figure it
out on macOS and Linux too using the Mozilla handler service. (The
handler service only gets you an app name, not a path, so on Linux we
can try reading mimetypes.list and the like in case someone is using a
system-default okular or evince not in /usr/bin, but that's not yet
implemented.)

This uses the new 5.0 URL format, and a 'page' query parameter instead
of a path component:

zotero://open-pdf/library/items/[itemKey]?page=[page]
zotero://open-pdf/groups/[groupID]/items/[itemKey]?page=[page]

It also accepts ZotFile-style URLs, though, so if you uninstall ZotFile
you should still be able to open those links. ZotFile will need to
accept the new format for new links to work when ZotFile is installed,
since it will override this handler.

This functionality will be necessary for annotation extraction (#1018)
and for imported annotations from Mendeley (#1451).
2018-05-05 00:55:22 -04:00
Adomas Venčkauskas
5b595122b7 Fix inproper cleanup of legacy API word processor plugins 2018-05-02 09:39:08 +03:00
Dan Stillman
81b876a5b2 Don't prompt to upgrade source version of connector 2018-04-29 20:29:01 -04:00
Dan Stillman
17b4c2e98e Show upgrade prompt for connector pings from below a certain version
Shows a prompt once per restart or once per day, whichever is longer,
with an option to not show again for a month. Can be disabled completely
by setting extensions.zotero.showConnectorVersionWarning to false.

Currently prompts for connector versions below 5.0.35.

This is a temporary solution for #1489 until the connector checks and
warns on its own when it's outdated and most people are on a version
that does that (particularly Safari users, who don't auto-upgrade).
2018-04-29 04:53:00 -04:00
Dan Stillman
1649cae956 Update locales from Transifex 2018-04-29 03:54:10 -04:00
Dan Stillman
41590741ba Add level: 0 for libraries in target list for connector 2018-04-27 18:59:11 -04:00
Dan Stillman
a0d85c0673 Don't switch libraries when uneditable in /getSelectedCollection
Follow-up to d0e42a1186
2018-04-27 18:58:12 -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
c55b355548 Add "Firefox/[version]" to user agent
Some sites didn't render properly, both in snapshots and in Scaffold,
due to browser sniffing.
2018-04-27 01:38:41 -04:00
Dan Stillman
a4cd45ceb4 Exclude note prefix and suffix when searching
This avoids having "1" match all notes (though really we should be
searching on a plain-text string stored in a separate column).
2018-04-26 02:15:13 -04:00
Dan Stillman
6fb99d2d90 Filter logged server responses
- Limit size to 1500 characters
- Remove collection names in /getSelectedCollection response
2018-04-25 16:02:11 -04:00
Adomas Venčkauskas
6cf11f083b Add a sendToBack connector endpoint for macOS integration window management 2018-04-25 15:42:41 +03:00
Adomas Venčkauskas
ac24ffe636 Always center the integration progress window 2018-04-25 15:42:41 +03:00
Adomas Venčkauskas
aad29a5469 Use XPCOM DOMParser in http integration client to avoid addon conflicts 2018-04-25 15:42:41 +03:00
Adomas Venčkauskas
f69c7d2e2d Fix a http integration client conflict with zotero addons 2018-04-25 14:07:55 +03:00
Adomas Venčkauskas
8b36f33513 Ensure the progress bar is hidden if session initialisation fails 2018-04-24 12:54:08 +03:00
Dan Stillman
e31d706ee4 Date.strToDate: Only check for date.* localized strings in client
Zotero.getString() now exists in the connector, but the expected strings
aren't defined (or needed), so an error is logged.
2018-04-24 05:08:27 -04:00
Dan Stillman
d573a5b639 Merge pull request #1476 from adomasven:feature/connector-doc-integration
Doc Integration Endpoint for the Connector
2018-04-24 01:37:48 -04:00