Commit graph

419 commits

Author SHA1 Message Date
Dan Stillman
d4f682aa88 Merge branch 'fx60' 2019-10-21 21:44:01 -04:00
Dan Stillman
85a9acd403 Update submodules 2019-10-14 01:41:13 -04:00
Dan Stillman
4e63cfd40e Update submodules 2019-10-08 01:10:34 -04:00
Dan Stillman
4b60c6ca27 Type/field handling overhaul
This changes the way item types, item fields, creator types, and CSL
mappings are defined and handled, in preparation for updated types and
fields.

Instead of being predefined in SQL files or code, type/field info is
read from a bundled JSON file shared with other parts of the Zotero
ecosystem [1], referred to as the "global schema". Updates to the
bundled schema file are automatically applied to the database at first
run, allowing changes to be made consistently across apps.

When syncing, invalid JSON properties are now rejected instead of being
ignored and processed later, which will allow for schema changes to be
made without causing problems in existing clients. We considered many
alternative approaches, but this approach is by far the simplest,
safest, and most transparent to the user.

For now, there are no actual changes to types and fields, since we'll
first need to do a sync cut-off for earlier versions that don't reject
invalid properties.

For third-party code, the main change is that type and field IDs should
no longer be hard-coded, since they may not be consistent in new
installs. For example, code should use `Zotero.ItemTypes.getID('note')`
instead of hard-coding `1`.

[1] https://github.com/zotero/zotero-schema
2019-09-16 02:27:22 -04:00
Dan Stillman
f292d9c030 Clarify translator/style repository update modes 2019-09-16 00:51:33 -04:00
Dan Stillman
3f3b6501ce Update whitelist for TinyMCE 2019-09-16 00:38:47 -04:00
Dan Stillman
ee5302f893 Add 'zotero/' prefix for Zotero-specific modules
Pulling from chrome/content/zotero/modules/

This may or may not be what we want to do, but it's better than
intermingling our modules with third-party modules in 'resource/'.
2019-08-27 00:47:39 -04:00
Dan Stillman
0165f75f79 Stub Promise.defer() to avoid the Bluebird deprecation warnings
We should indeed use `new Zotero.Promise`, but we don't need the
warnings for existing code.
2019-08-27 00:47:39 -04:00
Dan Stillman
78e9db9523 Fx60: Fix issues with JS code modules
- The Mozilla CommonJS loader is no longer available, so bundle the
  Fx52 version of it
- Strict mode is enforced
- `this` is only defined as a global object in .jsm files, not .js files
- `this` can't be converted to a string for BackstagePass test, so check
  for presence of Components.utils.import instead
- The return value from import() is no longer available
2019-08-27 00:47:39 -04:00
Dan Stillman
2b041ecfd4 Update submodules 2019-08-05 04:39:27 -04:00
Dan Stillman
88b01b7678 Update submodules 2019-07-23 15:12:55 -04:00
Dan Stillman
daf49bd89a Update submodules 2019-07-17 18:18:55 -04:00
Dan Stillman
054d3c9b6f Update submodules 2019-07-12 20:27:09 -04:00
Dan Stillman
b718abe23e Fix incorrect prompt about URL prefix when adding links in notes
Regression in ba9f81368b. This is also a proper fix for what that was
trying to fix.
2019-07-07 21:38:35 -04:00
Dan Stillman
0beddb9680 Add flags to disable retraction warnings
Separate flags for hiding the retraction altogether and for hiding
citation warnings for it

New functions:

Zotero.Retractions.hideRetraction(item)
Zotero.Retractions.shouldShowCitationWarning(item)
Zotero.Retractions.disableCitationWarningsForItem(item)

Addresses #1710
2019-07-03 01:23:02 -04:00
Dan Stillman
288ad93422 Fix startup error due to missing retractedItems table
This shouldn't be possible, but there've been a couple reports of people
ending up on version 103 without the table, so create it again with IF
NOT EXISTS. This is obviously a bad fix, but until we know how this
happened it's the best we can do.
2019-06-19 17:06:05 -04:00
Dan Stillman
a6d7b623ac Update submodules 2019-06-19 02:18:42 -04:00
Dan Stillman
dc670938a4 Update submodules 2019-06-14 11:18:04 -04:00
Dan Stillman
d7417af83e Update submodules 2019-06-10 15:00:55 -04:00
Dan Stillman
48580c49d1 Retraction Watch integration
- Check for retracted items using data from Retraction Watch
- Show an X next to retracted items in the items list, and show a
  scary message at the top of the item pane with more info and links.
- Lookup is done in a privacy-preserving manner using k-anonymity --
  the server is unable to determine the specific items that exist in
  the client, so people who don't sync don't need to share any library
  data (though the server doesn't log the lookups anyway).

TODO:

- Pop up an alert when new items are found
- Show a confirmation prompt when citing a retracted item
- Support items without DOIs or PMIDs
- Add a proper PMID field and expand DOI to more item types so these
  values don't need to be parsed out of Extra
- Clear the banner immediately when all possible fields are cleared
  instead of waiting a few seconds
2019-06-06 09:17:21 -04:00
Dan Stillman
ba9f81368b Don't prompt to add 'http://' prefix to anchor links in notes
https://forums.zotero.org/discussion/77600/removing-the-pop-up-add-http-when-adding-an-anchor-link
2019-05-30 04:18:28 -04:00
Dan Stillman
429c175d2e Update TinyMCE to 4.9.4
This fixes the issue of newlines being lost when copying notes.
2019-04-23 05:54:23 -04:00
Dan Stillman
679f22d089 What's all this, then? A British English locale? I say!
This adds "English (UK)" to the locale list, which allows for "tag
colours" and allows dates to be recognized in d/m/y form.

I changed "color" and "license" on Transifex, but I'll leave other words
for others to change. If we stick to Oxford spelling, there probably
won't be too much else.
2019-04-16 03:33:30 -04:00
Dan Stillman
8cadbe7eff Update locales from Transifex and submodules 2019-04-11 20:20:50 -04:00
Dan Stillman
d9cee322cd Tag selector performance overhaul
- Use react-virtualized to render tags on demand, reducing the number
  of DOM elements from potentially tens of thousands to <100. This
  requires tags to be absolutely positioned, so sizing and
  positioning need to be precomputed rather than relying on CSS.
- Avoid unnecessary refreshes, speed up tag retrieval, and optimize
  sorting
- Debounce reflowing when resizing tag selector

Also:

- Scroll to top when changing collections
- Allow tags to take up full width of tag selector without truncation

Closes #1649
Closes #281
2019-03-28 06:28:34 -04:00
Dan Stillman
6abf64943b Update submodules 2019-03-09 16:25:30 -05:00
Dan Stillman
ef4866f97b Update renamed-styles.json 2019-03-05 21:17:45 -05:00
Dan Stillman
9cdfe8e01c Update submodules 2019-03-05 21:17:14 -05:00
Adomas Venčkauskas
6d82ac3970 Fix window.name being unset when loading include.js. Closes #1645 2019-02-25 11:45:42 +02:00
Dan Stillman
0ea03ce72c Switch to services domain for recognizer requests
The recognizer endpoint can be customized by setting either
recognize.url (used directly) or services.url (used with a 'recognizer/'
suffix).
2019-02-18 14:30:54 -05:00
Adomas Venčkauskas
a532af6114 Fix sync client tests that depend on stubbing concurrentCaller Promise.
Regression since f5c4fb06
2019-01-22 13:49:00 +02:00
Dan Stillman
eb5d28b626
Merge pull request #1606 from adomasven/feature/reactify
Reactified Tag Selector
2019-01-21 04:07:28 -05:00
Adomas Venčkauskas
f5c4fb06e1 Ensure high-dpi icons are loaded in React components 2019-01-21 11:01:32 +02:00
Adomas Venčkauskas
a24cada451 React Tag Selector polish, i18n and tests
- Added icon-button UI code for the menubutton
- Upgrade to React 16 to allow non-standard attrs, such as `tooltiptext`
to support XUL tooltips
- Add i18n support for React UI elements
- Update tests for reactified tag selector
2019-01-21 11:01:27 +02:00
Dan Stillman
7cfac023fa Update renamed styles 2019-01-10 00:55:05 -05:00
Dan Stillman
01b974abf2 Update submodules 2019-01-10 00:37:47 -05:00
Tom Najdek
897e74c7f1 Reactify the Tag Selector 2019-01-07 15:33:45 +02:00
Dan Stillman
559881b896 Update submodules 2018-12-18 21:17:48 -05:00
Dan Stillman
c3e8af9294 Update TinyMCE to 4.9.1 2018-12-04 22:45:04 -07:00
Dan Stillman
f8acc0b10d Update submodules 2018-11-12 01:07:30 -05:00
Dan Stillman
9a8c676ed9 Update submodules 2018-10-23 17:08:46 -04:00
Dan Stillman
28e1d7dfb6 Update submodules 2018-10-21 02:17:57 -04:00
Dan Stillman
cbd8fa151d Update TinyMCE to 4.8.2
And add 'nonbreaking' plugin
2018-10-20 03:39:26 -04:00
Dan Stillman
f3964972ff Update translators 2018-10-09 17:58:27 -04:00
Dan Stillman
7ecaab73a0 Update submodules 2018-10-07 21:30:34 -04:00
Adomas Ven
b6065a7af6 Changes for bookmarklet update to current codebase (#1579) 2018-10-04 04:16:31 -04:00
Dan Stillman
e57e297156 Update submodules 2018-09-26 19:00:05 -04:00
Dan Stillman
d6095a4eac Update submodules 2018-08-30 16:52:24 -04:00
Dan Stillman
c2ca70055c Merge branch 'electron' 2018-08-16 19:16:46 -04:00
Dan Stillman
ce5be0bc75 Automatically download open-access PDFs when saving via the connector
If there's no translated PDF or the translated PDF fails and the item
has a DOI, check Zotero's Unpaywall mirror for possible sources and try
to download one of those.

Unlike with "Add Item by Identifier" and "Find Available PDF" in the
item context menu, this does not try the DOI/URL page, since it would
result in more data leakage and most of the time you'd be saving from
the DOI page already. We could consider offering it as an option, but
for it to be useful, you'd have to have an institutional subscription,
be on-campus or connected via VPN (for now), and be saving from
somewhere other than the main page.

A new connector endpoint, sessionProgress, takes the place of
attachmentProgress. Unlike attachmentProgress, sessionProgress can show
new attachments that have been added to the save, and with a little more
work should also be able to show when a parent item has been recognized
for a directly saved PDF.

This also adds support for custom PDF resolvers, available to all PDF
retrieval methods. I'll document those separately.

Closes #1542
2018-08-16 00:57:22 -04:00