Commit graph

10065 commits

Author SHA1 Message Date
Dan Stillman
337144a5eb Mendeley import: Reuse existing collections
If "Place imported collections and items into new collection" is
unchecked, previously imported collections will be reused when they're
in the right place in the hierarchy rather than creating new ones.
2018-06-08 04:52:18 -04:00
Dan Stillman
7494e4d88c Don't create import collection by default if no collections in library
If the selected library doesn't have collections, "Place imported
collections and items into new collection" will be unchecked in the
import wizard.
2018-06-08 02:44:13 -04:00
Dan Stillman
2b49e94a61 Fix sync breakage from 78e87a351 2018-06-07 17:18:28 -04:00
Dan Stillman
d0087d59d5 Update version 2018-06-07 17:07:08 -04:00
Dan Stillman
854cb05883 Mendeley import: Support repeated imports without duplicating items
Existing items are overwritten with new data (or skipped in the case of
file attachments).

Addresses #1451
2018-06-07 06:37:50 -04:00
Dan Stillman
835bdf6941 Merge new English strings 2018-06-06 01:58:09 -04:00
Dan Stillman
d98e89cf26 Add import option for creating a new collection
Use the new wizard for all imports (even if no Mendeley DB), and add a
page with a "Place imported collections and items into new collection"
option. If deselected, collections are added to the library root.
2018-06-05 22:39:23 -04:00
Dan Stillman
4008848c64 Mendeley import: Create imported_url attachments when possible
If there's a single PDF file and a single PDF URL and the file exists,
make an imported_url attachment instead of separate file and linked_url
attachments.

Addresses #1451
2018-06-05 19:57:28 -04:00
Dan Stillman
024b428fe6 Mendeley import: Add "Other…" button for selecting another DB
E.g., for selecting a DB from a backup

Addresses #1451
2018-06-05 19:57:20 -04:00
Dan Stillman
17f2025c53 Fix import into selected library from wizard 2018-06-05 08:39:17 -04:00
Dan Stillman
6ac65373a3 Mendeley import: Look for Downloaded files relative to DB if not found
Addresses #1451
2018-06-05 08:30:14 -04:00
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
e46f1d06e0 Update submodules 2018-06-05 05:46:41 -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
2dd0a560b7
Update CONTRIBUTING.md 2018-05-29 17:48:55 -04: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
3a3f46530d Adjust note header sizing/styling 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
3516598f4c Update recommended connector version 2018-05-08 20:56:35 -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
040e0a726a Simplify page path component parsing for zotero://open-pdf 2018-05-05 01:30:42 -04:00
Dan Stillman
60e0d79e01 Don't allow page path component for new-style zotero://open-pdf URLs
That's only necessary for ZotFile URLs.
2018-05-05 01:19:38 -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