Commit graph

6715 commits

Author SHA1 Message Date
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
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
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
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
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
Adomas Venčkauskas
390b8b2c86 Fix quickformat early dismisal error 2018-04-24 01:37:10 -04:00
Adomas Venčkauskas
387109c1da Don't needlessly regenerate citation IDs 2018-04-24 01:37:10 -04:00
Adomas Venčkauskas
593153eebe Adds a progress bar for non quick-format integration actions
The progress percentage is based on the most recent transaction
(or undeterminate if this is the first session transaction)

Fix undefined function call error
2018-04-24 01:37:10 -04:00
Dan Stillman
33f8fcfafb Fix syncing of saved search changes
Condition changes were only uploaded after every other change + sync
2018-04-22 17:27:33 -04:00
Adomas Venčkauskas
5e5b567782 Add a connector document integration endpoint
Specifically for google docs via the connector, but could potentially be
used for any integration via HTTP or connector.
2018-04-20 13:08:34 +03:00
Martynas Bagdonas
00efd01aaf Ask for description when reporting metadata (#1488) 2018-04-19 04:35:03 -04:00
Dan Stillman
6450d39933 Throw async error from _loadTranslator() 2018-04-19 02:59:41 -04:00
Dan Stillman
3bc08ba10c Change overwritten translator message from error to warning 2018-04-19 02:59:41 -04:00
Martynas Bagdonas
0b4e1f9360 Use the extracted arXiv identifier when recognizing PDF (#1487) 2018-04-19 02:35:20 -04:00
Dan Stillman
b22e496b05 Allow setting CORS allowed origins for translation-server 2018-04-18 16:15:26 -04:00
Martynas Bagdonas
fa0576a4dd Add arXiv identifier support (#1486) 2018-04-18 13:03:10 -04:00
Dan Stillman
bf26c230be Update submodules 2018-04-16 14:58:37 -04:00
Dan Stillman
3835bc9110 Assign merge-tracking relations properly when merging >2 items
https://forums.zotero.org/discussion/71459/incorrect-document-refresh-after-three-item-merge
2018-04-15 17:05:55 -04:00
Dan Stillman
8853f8ca47 Allow higher local object version during full sync
Local object versions can be higher than remote versions, because we
upload in batches and only record the version from the last batch.

This could cause trouble if an object failed to upload during a Restore
to Online Library, causing it to be retried later with version 0 (unlike
during a restore when the version is omitted), causing the library to be
reset, causing any local objects with higher local versions to be
redownloaded.
2018-04-14 16:50:41 -04:00
Dan Stillman
794d3880e7 Set 'control' attribute for item box fields
Set 'control' to the id of either the value label or the textbox,
depending on whether the field is being edited. This causes NVDA to read
the label associated with the textbox, but seemingly only the first time
it's selected.

Unfortunately NVDA also does some other unpleasant things, like reading
a description from the duplicate-merging pane, which isn't the active
element in the deck, and reading the entire text, including all field
labels, of the item box) I'm not sure how much we can improve this until
we're on Electron.

VoiceOver doesn't read the textbox's label either, even though it does
so in the bookmarks window in Firefox. Maybe things have improved since
Firefox 52, so we can text again after upgrading to Firefox 60.

Addresses #1411
2018-04-14 13:25:31 -04:00
Dan Stillman
0cc3e64b8a Restore proper incompatible DB message
Fixes #1446
2018-04-14 11:38:54 -04:00
Dan Stillman
0e3071576b Show "Export Collection…" if there are items in subcollections
And generate collection context menu asynchronously

Closes #1482
2018-04-14 11:33:16 -04:00
Dan Stillman
460a423df3 Don't let an progress window block shutdown
Closes #1485
2018-04-14 10:28:00 -04:00
Dan Stillman
71f7ec5207 Avoid invalid-field warning for parentItem in fromJSON() after 6f1833f936 2018-04-14 10:27:40 -04:00
Dan Stillman
ce834fc5f3 Don't focus previous row when choosing autocompleted creator
https://forums.zotero.org/discussion/71310/
2018-04-14 10:27:40 -04:00
Frank Bennett
94271325d7 Asyncify Zotero.Relations.getByObject(), called only from item merge. (#1480)
Use getAsync() to acquire subject in Zotero.Relations.getByObject()
2018-04-14 10:26:16 -04:00
Dan Stillman
ceb9749937 Avoid invalid-field warning in Item::fromJSON() after 6f1833f936 2018-04-14 00:06:27 -04:00
Dan Stillman
6f1833f936 Remove items from trash and My Publications when removed via sync
Zotero.Item::fromJSON() wasn't properly accounting for missing 'deleted'
or 'inPublications' properties.
2018-04-13 23:36:59 -04:00