Commit graph

574 commits

Author SHA1 Message Date
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
Dan Stillman
3070af0dc8 Use dedicated S3 hostname for proxy check
Use zoteroproxycheck.s3.amazonaws.com of s3.amazonaws.com, both for
clarity and because the latter redirects, which makes it hard to test in
a browser after an SSL cert error.
2018-08-09 15:45:15 -04:00
Dan Stillman
26056c87f1 Fix non-integer userID in settings table
A submitted database had a text userID with a trailing "A0. Not sure how
that happened -- it doesn't appear to be possible in current code -- but
it caused group permissions not to be properly synced.
2018-08-09 03:30:47 -04:00
Dan Stillman
868a21b7e7 Update renamed styles 2018-08-07 04:58:15 -04:00
adam3smith
94dde661f7 remove Moscow from biochemistry 2018-07-30 00:40:08 -04:00
adam3smith
a8521d2712 fix abbreviation for http://www.ncbi.nlm.nih.gov/nlmcatalog/7505598 (following NLM) 2018-07-30 00:40:03 -04:00
Adomas Venčkauskas
d5c2d887a7 Make ConcurrentCaller.js importable in electron 2018-07-11 14:32:45 +03:00
Sylvester Keil
31395e9516 Export ZOTERO_CONFIG when required as CommonJS 2018-07-11 13:58:41 +03:00
Dan Stillman
2ebc78adc0 Update submodules 2018-07-07 13:04:49 +02:00
Dan Stillman
c26bd73895 Update translators 2018-06-20 17:09:11 -04:00
Dan Stillman
f3a62f5a63 Automatically download open-access PDFs via Add Item by Identifier
When the associated-files pref is enabled, Add Item by Identifier uses a
Zotero Unpaywall mirror to find available open-access PDFs. No details
about the contents of searches are logged.
2018-06-16 14:35:44 -04:00
Dan Stillman
72481b072e Clean up extra files from Mendeley imports
Follow-up to cdee741a6
2018-06-16 03:07:46 -04:00
Dan Stillman
79d7c15d4f Update translators 2018-06-12 07:54:20 -04:00
Dan Stillman
2939b3ae95 Merge branch 'mendeley-import' (#1451) 2018-06-05 07:52:12 -04:00
Dan Stillman
e46f1d06e0 Update submodules 2018-06-05 05:46:41 -04:00
Dan Stillman
3a3f46530d Adjust note header sizing/styling 2018-05-27 21:23:38 -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
3516598f4c Update recommended connector version 2018-05-08 20:56:35 -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
6b4bce8754 Update submodules 2018-04-29 03:54:24 -04:00
Dan Stillman
bf26c230be Update submodules 2018-04-16 14:58:37 -04:00
Adomas Venčkauskas
21fadee7bb Refactor word plugin installer 2018-04-04 13:52:33 +03:00
Dan Stillman
b600885d11 Update translators 2018-03-27 03:10:56 -04:00
Dan Stillman
c96363746b Fix related-item relations pointing to a previous user account
If somebody switched accounts in a previous version, it was apparently
possible for related items to end up pointing at an item URI with the
old userID, which could cause a 403 on sync.

https://forums.zotero.org/discussion/70989/report-id-477331252

(5.0 deletes data when switching accounts to avoid exactly this sort of
bug.)
2018-03-26 02:12:20 -04:00
Dan Stillman
c71f657b08 Update translators 2018-03-20 15:31:58 -07:00
Dan Stillman
90b975445e Fix note display in read-only libraries and classic citation dialog 2018-03-11 01:41:16 -05:00
Dan Stillman
5f6de1c787 Update submodules 2018-03-09 14:35:41 -05:00
Dan Stillman
c7d05ad2f9 Use 'paste' plugin from TinyMCE 4.6.7 to fix drag and drop cursor issue
https://forums.zotero.org/discussion/70720/after-copy-by-dragging-the-cursor-disappears
2018-03-08 00:17:16 -05:00
Dan Stillman
51ddc46322 Update translators 2018-03-05 18:10:17 -05:00
Dan Stillman
e8403b9679 Update TinyMCE to 4.7.9 2018-03-01 22:41:28 -05:00
Dan Stillman
081793f72f Disable auto_focus for TinyMCE
TinyMCE triggers a focus on the window itself, which means that the
window steals focus when an attachment is created even if another Zotero
window is in front. Instead, do a manual focus in the external note
window, which is the one place I could find where we rely on it (though
there might be others).
2018-03-01 01:20:29 -05:00
Dan Stillman
16f228b2a3 Update renamed styles 2018-02-28 04:31:22 -05:00
Dan Stillman
7c64666167 Use separate subdomain for recognizer requests for now 2018-02-22 02:01:05 -05:00
Dan Stillman
eca9d82aa2 Update submodules 2018-01-29 17:22:35 -05:00
Dan Stillman
e3dee4dee7 Update translators 2018-01-17 01:15:31 -05:00
Dan Stillman
09fc3c2b1c Update submodules 2018-01-11 20:20:32 -05:00
Dan Stillman
5847388862 Add schema update step to remove dc:isReplacedBy relations
These should've all been replaced with dc:replaces relations in a schema
update step, so any that exist were likely synced down from the API
(since fixed) and should be obsolete/redundant.
2018-01-05 02:53:27 -05:00
Dan Stillman
545c800459 Open /start on first-run instead of /start_standalone
Closes #1389
2017-12-15 00:14:52 -05:00
Dan Stillman
90d948a6bc Update submodules 2017-12-13 21:33:00 -05:00
Dan Stillman
6051c245b4 Fix auto-focusing of notes in external window 2017-12-11 02:39:22 -05:00
Dan Stillman
8f98398dfd Update submodules 2017-12-03 15:20:35 -05:00
Dan Stillman
bbad56a32a Update submodules 2017-11-27 20:48:24 -05:00
Dan Stillman
d4ae63ff0d Update submodules 2017-11-22 03:15:37 -05:00
Dan Stillman
48928deba4 Update submodules 2017-11-17 09:37:54 -05:00
Dan Stillman
20ad57a368 Update submodules 2017-11-12 18:47:32 -05:00
Dan Stillman
56289b6693 Update submodules 2017-10-25 23:56:12 -04:00
Dan Stillman
45357bdb85 Update submodules 2017-10-17 21:05:52 -04:00
Dan Stillman
5f413b2ff3 Update submodules 2017-09-30 19:10:05 -04:00
Dan Stillman
da21c9c47b Remove old archive.org relations
These aren't allowed by the API and were breaking syncing (and haven't
been exposed anywhere for years anyway).
2017-09-22 16:58:16 -04:00
Dan Stillman
a455a72534 Remove invalid relations mangled during import
Not sure if this occurred for our own translators, but it addresses
items created from #1282.
2017-09-22 01:22:33 -04:00
Dan Stillman
d2a33f2613 Update submodules 2017-09-18 01:37:26 -04:00
Dan Stillman
acb990c75d Update submodules 2017-08-17 16:58:26 +02:00
Dan Stillman
dd0fafd41d Restore Cut/Copy/Paste to note context menu 2017-08-16 00:41:38 +02:00
Adomas Venčkauskas
55992e341d Add more logging for word plugin installer 2017-08-08 12:46:33 +03:00
Dan Stillman
ffc32d992d Update submodules 2017-07-30 15:34:03 -04:00
Dan Stillman
ac7c22a7c6 Fix searches for PowerPoint files
This also adds a mechanism for indicating that DB userdata upgrades
after a certain version are minor and shouldn't show "Upgrading
database…" or create a pre-upgrade backup.
2017-07-30 00:06:59 -04:00
Adomas Venčkauskas
81d5618346 Log a few more lines during the word plugin installation 2017-07-26 09:20:50 +03:00
Dan Stillman
6ae2b58d3f Update submodules 2017-07-24 08:59:23 -04:00
Dan Stillman
073d27311f Use HTTPS for Google Scholar and CrossRef lookup engines
TODO: Update existing engines
2017-07-23 00:57:04 -04:00
Adomas Venčkauskas
0ceb5ec9a9 Add some additional logging to docs plugin installer 2017-07-22 17:28:30 +03:00
Dan Stillman
94a3921d0a Update translators 2017-07-17 18:25:21 -04:00
Dan Stillman
b0c1a9a613 Add alignment menu to note context menu that restores justification option
(Even if it's generally a bad idea without hyphenation)

Also adds unused code that could replace the three alignment buttons in
the toolbar with a split-button menu with all four options. We could use
this if we needed more space and didn't think people would mind the
extra click when switching between left and center.
2017-07-17 16:34:48 -04:00
Dan Stillman
e5972b705f Update translators 2017-07-08 17:25:10 -04:00
Dan Stillman
3b2d7eb970 Log errors from Zotero.serial()
And output errors in concurrentCaller if not otherwise logged
2017-07-07 05:31:37 -04:00
Dan Stillman
b07fdc6335 Add intro text to middle pane when My Library is empty
This replaces the Quick Start Guide item in earlier versions.

Also increases size of My Publications intro text when the window is
wider.
2017-07-07 03:41:50 -04:00
Dan Stillman
dc71af9110 Update translators 2017-07-05 05:18:00 -04:00
Dan Stillman
7769b5d09e Update submodules 2017-07-03 03:03:41 -04:00
Dan Stillman
f6ac1732f2 "Install Browser Extensions" -> "Install Browser Connectors"
And change link from /extensions to /download/connectors
2017-06-27 16:26:13 -04:00
Dan Stillman
1d564970dc Add "Install Browser Extensions…" menu option 2017-06-26 18:49:31 -04:00
Dan Stillman
5aaefff1d6 Update submodules 2017-06-24 01:25:32 -04:00
Dan Stillman
97bac9fadc Move start page URL to config 2017-06-15 02:39:34 -04:00
Dan Stillman
d81e463507 Update translators 2017-06-06 04:37:45 -04:00
Dan Stillman
47f7f3a93f Fix logging of unhandled promise rejections 2017-06-02 10:37:40 -04:00
Tom Najdek
aa6037c088 Re-introduce custom implementation of setTimeout
* Resolves issues with some tests failing
2017-06-01 11:36:17 -04:00
Tom Najdek
14bf3184bb Fixes and tweaks to make tests work with babelized code
* Use mocha, chai & sinon from the npm. As of sinon 2.0
  sinon-as-promised is no longer required so it is removed
* Tweak code to re-use the same loader with the same environment
  throghout the code
* Introduce browserify step for testing tools that only provide
  node-compatible libraries (sinon, chai-as-promised)
* Introduce copy step for test data to resolve multiple issues with
  tests depending on files not being symlinks
* Re-introduce custom implementation of setTimeout to resolve issues
  with few tests
* Re-introduce custom Bluebird Promises config & monkey patch
2017-06-01 11:36:16 -04:00
Dan Stillman
d6c36ae9a3 Update help URLs and move to config file 2017-05-27 05:32:01 -04:00
Tom Najdek
9aa057edee Introduce a build system
* Add a multi-process, gulp-based build system to support es6 features,
  async/await, jsx and scss
* Add a package.json to support dependency management and allow starting
  the build process via npm
* Replace embedded Bluebird library with npm-installed one
* Add react, react-dom and web-library
* Introduce a custom require() loader in include.js as well as a minimal
  local require() implementation in various other places
2017-05-23 17:02:50 +01:00
Dan Stillman
eb42152c42 UI fixes for read-only notes
- Don't show toolbar in read-only note editor
- Get rid of "undefined" button in CR window
- Better padding/alignment in CR window
2017-05-12 20:01:47 -04:00
Adomas Venčkauskas
e1f09d4655 Remove unneeded connector files, update connectorTypeSchemaData.js
Addresses zotero/zotero-connectors#121
2017-05-08 14:38:03 +03:00
Dan Stillman
12e7b7b851 Update submodules 2017-05-08 00:14:06 -04:00
Dan Stillman
2eef1702e0 Prevent items in group libraries from being added to My Publications
And remove existing group items that have been added
2017-05-04 21:18:44 -04:00
Dan Stillman
7bd8f47dac Schema update step to remove linked files from My Publications 2017-04-27 15:33:25 -04:00
Dan Stillman
850a9bb309 Fix width of note link toolbar 2017-04-19 19:35:59 -04:00
Dan Stillman
d0b1a45c61 Restore ability to paste images in notes, for now
Allow this to continue working until we have a better solution that
keeps data URIs out of note markup and is counted against file quota.
Syncing most notes with embedded images will still result in a
note-too-long error.

Closes #1209
2017-04-16 02:40:20 -04:00
Dan Stillman
a2f11f5338 Update submodules 2017-04-14 23:14:22 -04:00
Dan Stillman
5ff2a59f87 Move My Publications into My Library
Instead of My Publications being a separate library, have it be a
special collection inside My Library. Top-level items can be dragged
into it as before, and child items can be toggled off and on with a
button in the item pane. Newly added child items won't be shown by
default.

For upgraders, items in the My Publications library will be moved into
My Library, which might result in their being duplicated if the items
weren't removed from My Library. The client will then upload those new
items into My Library.

The API endpoint will continue to show items in the separate My
Publications library until My Publications items are added to My
Library, so the profile page will continue to show them.
2017-04-12 19:26:58 -04:00
Dan Stillman
9bdb907751 Update submodules 2017-03-28 02:28:14 -04:00
Adomas Venčkauskas
8bc5d37dd1 Update word plugin status after installation. Closes #1200 2017-03-20 19:23:37 +02:00
Adomas Venčkauskas
2d93b07220 Replace old-style object properties in word-processor-plugin-installer 2017-03-20 17:24:16 +02:00
Dan Stillman
3a5490a1ef If userID is set, migrate any item relations with local user key
DB update to go along with 0d8643087a
2017-03-02 01:32:33 -05:00
Dan Stillman
9ac458e05c Add 'archived' property to Zotero.Library objects
Set when a user loses access to a library but chooses to keep it as a
read-only library.
2017-02-24 02:36:18 -05:00
Dan Stillman
01f18cba90 Fix word processor integration installation error 2017-02-23 15:11:17 -05:00
Adomas Venčkauskas
e8ac639273 Move the common code for word plugin installer to main repo
From https://github.com/zotero/zotero-word-for-mac-integration/blob/master/resource/installer_common.jsm

Removes some very old code to handle Gecko 2.1<
Does not affect existing plugins/installers in any way, but sets us up
to unifiy the installer once word plugins are updated.
2017-02-18 18:17:14 +01:00
Dan Stillman
12735faa92 Retain style properties when pasting content from Word/Office 2017-02-09 23:40:15 -05:00
Dan Stillman
fe063faf00 Add text color buttons to notes, and move direction to context menu
And reduce button spacing slightly to accommodate

Closes #1151
2017-02-03 15:33:05 -05:00
Dan Stillman
0998c1d1da Update TinyMCE to 4.5.2 2017-02-02 02:01:06 -05:00
Dan Stillman
bd8debb2df Use entity_encoding: 'raw' in notes
This (and some other things) will help avoid changes in uploaded notes, which
cause loss of cursor position and other problems after local notes are updated
with the server version.

A side effect is that multiple spaces won't be converted to `&nbsp;`, so
anything consuming note content will have to use `white-space: pre`.

(Notes in reports appear to be substituting `&nbsp;` as necessary,
though I'm not sure where that's happening.)
2017-02-02 02:01:06 -05:00
Dan Stillman
ae47ae28bd Fix #1163, Unable to open zotero urls from tinymce 2017-01-30 14:01:04 -05:00
Dan Stillman
a33c53dcdb Update translators 2017-01-27 17:46:25 -05:00
Dan Stillman
c3ba7340c6 Update submodules 2017-01-24 02:51:18 -05:00
Dan Stillman
e0d92ecd94 Update submodules 2017-01-19 05:48:46 -05:00
gracile-fr
695cb9583a Amend short form of French months (continuing #64)
The Firefox French language pack contains some mistakes regarding
the short form of months. As a consequence, French month parsing
didn't work.

Please note that these values aren't even the correct abbreviations
but only the three or four first letters of the correct abbreviations.
See the French CSL locale for the correct abbreviations.
2017-01-16 18:58:59 +01:00
Dan Stillman
9c0befceeb Update Bluebird to 3.4.7 2017-01-13 02:47:47 -05:00
Dan Stillman
97f5c41aff Update submodules 2017-01-10 01:57:50 -05:00
Dan Stillman
ef1ff8bc42 Fix #64, Non-English month parsing doesn't work in Standalone
Month values from the Firefox language packs are included in a
JSON file used by `Zotero.Date.getMonths()`. `getMonths(true)` includes
English months as well.

The JSON file should be bundled with the connectors as well, and
Zotero.Date.init() should be updated to populate the month data from
that.
2017-01-09 04:47:23 -05:00
Dan Stillman
1b3dfe1aea Update submodules 2017-01-06 03:44:40 -05:00
Dan Stillman
a076edc836 Update some deprecated function calls 2016-12-29 21:50:33 -05:00
Dan Stillman
2beb2c514c Push-based sync triggering
Immediate sync triggering on remote library change using WebSocket API.
Currently kicks off a normal sync process for the modified library --
actual object data isn't pushed.

(This might not stay enabled for 5.0 Final.)
2016-12-29 21:50:32 -05:00
Dan Stillman
437c55b286 Object.values() polyfill for <Fx47 after 269e2f8b
Zotero for Windows is still built with Fx45, so we need a polyfill for
Object.values().
2016-12-26 15:26:21 -05:00
Dan Stillman
044ecf2157 Keep TinyMCE dialogs within frame
This isn't ideal, but it mostly works, and keeps the dialogs vertically
(if not horizontally) moveable. It would be nice if the dialogs
automatically flowed to the available width.

This could be turned off in standalone note windows above a certain
width.
2016-12-26 13:15:49 -05:00
Dan Stillman
6ec2f9aaf9 Fix newlines in note HTML files 2016-12-26 11:27:09 -05:00
Dan Stillman
e75827bf28 Widen style dropdown in note editor to accommodate other languages 2016-12-26 03:18:08 -05:00
Dan Stillman
6c260bc9c9 Localize TinyMCE
Automatically use a language pack for the current locale if one is
available
2016-12-26 03:17:48 -05:00
Dan Stillman
dc04a1231c Upgrade to TinyMCE 4.5.1
- New flat theme (with padding tightened a bit from the default to fit
  in right-hand pane)
- Adds search/replace within notes
- Adds URL autolinking
- Image pasting/dragging is now properly disallowed (though TinyMCE 4
  has hooks that may allow us to actually support this by automatically
  creating attachments)
- New blockquote style with color bar
- Replaces custom context menu on link click with built-in version

 To-do:

- Fix display of pop-ups, which are now modal dialogs within the note
  frame instead of pop-up windows, to stay fully within the frame
- Localize (more important now that there are tooltips)
- Support image dragging
- Update elements list for HTML5, for better drag-and-drop?
- Move directionality control to context menu instead of taking up
  toolbar space?
- Evaluate other plugins for potential inclusion
- Show additional controls in separate note window?
- Fix opacity of text in tooltips

Closes #451, closes #421
2016-12-25 23:19:49 -05:00
Dan Stillman
0f89d4d7f5 Remove sync server URL 2016-12-19 14:40:08 -05:00
Dan Stillman
b7daef6bf4 Update submodules 2016-12-16 03:31:06 -05:00
Adomas Ven
d6d4e4b33e Saner feed database management (#1131)
* Mark feedItems read in a single batch SQL update
* Automatically remove old feed items
* User-facing preference globally and per-feed for feed item expiration
2016-12-13 09:07:43 -05:00
Dan Stillman
f2163b3433 New data directory handling
- Use $HOME/Zotero if zotero.sqlite exists, and set it as a custom data
  directory so that 4.0 uses it if loaded (resulting in a
  newer-db-version error instead of an empty database)
- Don't prompt whether to use data directory from the other version's
  profile directory (i.e., Firefox or Standalone) -- just do it
2016-11-12 16:44:34 -05:00
Dan Stillman
15a71dc741 Update submodules 2016-11-03 17:41:34 -04:00
Dan Stillman
1ae71c3830 Merge branch '4.0' 2016-11-03 17:40:58 -04:00
Dan Stillman
55ee55ed7b Update version and submodules 2016-11-02 02:20:49 -04:00
Dan Stillman
8a915beaaa Fix bug in relations upgrade fix 2016-10-20 22:48:20 -04:00
Dan Stillman
63ab9da467 Fix incorrect related items upgrade
https://forums.zotero.org/discussion/62779/zotero-5-0-relations-made-in-4-0-disappeared
2016-10-15 16:04:08 -04:00
Dan Stillman
51a3687123 Merge branch '4.0' 2016-10-12 19:29:32 -04:00
Dan Stillman
db2fc7d0ba Update translators 2016-10-03 11:54:25 -04:00
Dan Stillman
b8b85f4853 Update version 2016-09-22 00:19:27 -04:00
Dan Stillman
e8d0dc6e00 Update version 2016-09-19 05:16:37 -04:00
Dan Stillman
4adad64b16 Update version 2016-09-19 02:50:45 -04:00
Dan Stillman
21d3ca298b Merge branch '4.0' 2016-09-18 18:39:18 -04:00
Dan Stillman
71a7eb2628 Update submodules 2016-09-18 18:04:41 -04:00
Dan Stillman
5bcce8ba82 Merge branch '4.0' 2016-09-06 18:57:05 -04:00
Dan Stillman
6591ad63af Update translators 2016-09-06 18:53:27 -04:00
Dan Stillman
daf0f8e0b0 Merge branch '4.0' 2016-08-14 17:27:36 -04:00
Dan Stillman
649ce58726 Update version 2016-08-14 04:18:45 -04:00
Dan Stillman
8f9d356f11 Update translators 2016-08-13 20:39:41 -04:00
Dan Stillman
0eb6dc9ca5 Merge branch '4.0' 2016-08-09 01:52:21 -04:00
Dan Stillman
7daafd4ceb Update submodules 2016-08-08 02:22:57 -04:00
Dan Stillman
5878700808 Update version 2016-08-08 02:03:45 -04:00
Dan Stillman
01aec4134c Update submodules 2016-07-22 00:18:02 -04:00
Dan Stillman
a343a7af6e Merge branch '4.0' 2016-06-06 16:42:39 -04:00
Dan Stillman
0a0283483e Update submodules 2016-06-06 16:14:21 -04:00
Dan Stillman
d8abfa4f67 Save all item data values as string, and convert old integers to strings
Before 5.0 we performed a regexp on new item data values to determine if
they were integers and saved them natively in SQLite if so. We no longer
do that, but setField() used strict equality when checking for changes,
so an item could be marked as changed when comparing to a new string
value (e.g., from a write response from the API, which always returns
strings). To avoid that, this converts all old values in the DB to
strings and saves all incoming values as strings automatically. (This
should also help with searching and some other things.)
2016-05-18 17:25:50 -04:00
Dan Stillman
216900094b Merge branch '4.0' 2016-05-07 13:27:56 -04:00
Dan Stillman
9b41c8dd97 Update version 2016-05-07 13:19:27 -04:00
Dan Stillman
797f00ab7c Update translators 2016-05-02 22:41:52 -04:00
Dan Stillman
56c0933af0 Update version 2016-05-02 22:39:57 -04:00
Dan Stillman
b4a9858f37 Log message for unhandled promise rejection when string is thrown 2016-04-29 23:32:31 -04:00
Dan Stillman
5a4dddcbc6 Download to Bluebird 3.3.4 to fix translation error
browserTest.js -> "should save book with child note to current
collection" was failing with an attempt to translate as COinS instead of
RIS. If this isn't fixed in a subsequent Bluebird release, we can debug
further.
2016-04-27 16:06:58 -04:00
Dan Stillman
1a97f27fe3 Use Bluebird reflect() instead of deprecated settle() 2016-04-27 02:34:46 -04:00
Dan Stillman
05de47149f Allow marking of errors as handled for Bluebird
Set .handledRejection on an Error object to tell Bluebird that it's been
handled and shouldn't be logged by onPossiblyUnhandledRejection().
2016-04-27 02:32:58 -04:00
Dan Stillman
1502985d98 Update Bluebird to 3.3.5 2016-04-27 02:23:49 -04:00
Dan Stillman
a62e7e46bf Remove some unreachable code
Addresses #974
2016-04-26 02:00:51 -04:00
Dan Stillman
196b28cc66 Update version 2016-04-16 02:52:20 -04:00
Dan Stillman
ee5a62b9f4 Show error message on unhandled errors instead of duplicating the stack
Not sure if this is correct in all cases
2016-04-15 04:23:03 -04:00
Dan Stillman
ba1f69b4d5 Merge branch '4.0' 2016-04-12 16:09:10 -04:00
Dan Stillman
9330b9cd40 Update submodules 2016-04-12 04:52:52 -04:00
Dan Stillman
560eb37d0b Schema update step to fix invalid item relations
As corrected in d0a110072
2016-04-11 16:29:48 -04:00
Dan Stillman
8a57183e0b Remove unused version table rows 2016-04-01 02:38:36 -04:00
Dan Stillman
a1ce85decb Overhaul object downloading/processing during data syncs
Previously, objects were first downloaded and saved to the sync cache,
which was then processed separately to create/update local objects. This
meant that a server bug could result in invalid data in the sync cache
that would never be processed. Now, objects are saved as they're
downloaded and only added to the sync cache after being successfully
saved. The keys of objects that fail are added to a queue, and those
objects are refetched and retried on a backoff schedule or when a new
client version is installed (in case of a client bug or a client with
outdated data model support).

An alternative would be to save to the sync cache first and evict
objects that fail and add them to the queue, but that requires more
complicated logic, and it probably makes more sense just to buffer a few
downloads ahead so that processing is never waiting for downloads to
finish.
2016-03-23 04:29:04 -04:00
Dan Stillman
6c43e75d26 Merge pull request #902 from adomasven/feature/feed-reader-UI
Feed Reader UI

(I squashed a bunch of commits from the PR.)
2016-03-22 07:31:03 -04:00
Adomas Venčkauskas
12fc6cfbe8 Various feeds changes
- Hide notes, tags and related for feed items in itembox
- Add feed support for <enclosure> elements
- Add feed syncing methods for synced settings (additional work is
  needed on the sync architecture to download synced settings from the
  server)
- Change feed item clear policy to be less aggressive
- Adjust for deasyncification
- Disable translate-on-select
- Close adomasven/zotero#7, Remove context menu items from feeds
2016-03-22 06:56:36 -04:00
Adomas Venčkauskas
e206b0af5e Various feeds changes
- Change sort order for feed items to natural order
- Remove display of dates in itembox
- Trim html tags from creators in FeedReader parser
2016-03-22 06:56:33 -04:00
Dan Stillman
e8bffc2275 Remove Bluebird mod that may or may not still be necessary 2016-03-21 02:45:14 -04:00
Dan Stillman
ba079d07fe Update version 2016-03-19 03:00:29 -04:00
Dan Stillman
f4896a15ec Merge branch '4.0' 2016-03-17 05:08:06 -04:00
Dan Stillman
0a120d85b1 Update version 2016-03-17 02:59:52 -04:00
Dan Stillman
8830dfeff9 Update version and submodules 2016-03-15 03:31:08 -04:00
Dan Stillman
e9c2b4b76e Update version 2016-03-10 23:17:41 -05:00
Dan Stillman
d4214f5184 Update version 2016-03-10 07:04:48 -05:00
Dan Stillman
c1cb380bcb Update version 2016-03-07 21:56:43 -05:00
Dan Stillman
5df952b0f9 Update version 2016-03-07 08:33:45 -05:00
Dan Stillman
244a52ad22 Merge branch '4.0' 2016-03-06 01:20:51 -05:00
Dan Stillman
5a11777587 Update version 2016-03-05 01:38:50 -05:00
Dan Stillman
ee1e8578ce Update submodules 2016-03-01 01:25:48 -05:00
Dan Stillman
a152e35786 Don't create itemSeeAlso table (already removed via schema updates) 2016-02-17 18:04:06 -05:00
Dan Stillman
b05f1d29aa Backport better incompatible-DB-version handling from 2177a000ea
Implements #891 for 4.0
2016-02-06 04:59:15 -05:00
Dan Stillman
3b402c564c Closes #900, Change fields order for cases in system.sql 2016-02-06 04:12:07 -05:00
Dan Stillman
3071b8093b Merge branch '4.0' 2016-01-20 01:23:02 -05:00
Dan Stillman
b52360d0f4 Update versions 2016-01-14 19:42:14 -05:00
Dan Stillman
2ac27be95e Upgrade to Bluebird 3.1.1 2016-01-08 21:07:10 -05:00
Dan Stillman
2177a000ea Closes #891, Better incompatible-DB-version handling
Fixes the incompatible-version dialog and adds info on the version used
to upgrade the database, which may be helpful for troubleshooting.

Also fixes showing of the Zotero toolbar icons even in case of a startup
error.
2015-12-30 05:14:50 -05:00
Dan Stillman
c5a9987f37 WebDAV file sync overhaul for 5.0
Also:

- Remove last-sync-time mechanism for both WebDAV and ZFS, since it can
  be determined by storage properties (mtime/md5) in data sync
- Add option to include synced storage properties in item toJSON()
  instead of local file properties
- Set "Fake-Server-Match" header in setHTTPResponse() test support
  function, which can be used for request count assertions -- see
  resetRequestCount() and assertRequestCount() in webdavTest.js
- Allow string (e.g., 'to_download') instead of constant in
  Zotero.Sync.Data.Local.setSyncState()
- Misc storage tweaks
2015-12-30 05:14:50 -05:00
Dan Stillman
1d3113971b Bump versions 2015-12-17 16:40:37 -05:00
Dan Stillman
0673face28 Update submodules and maxVersion 2015-12-10 16:33:51 -05:00
Dan Stillman
62aeb1da32 Full-text syncing support via API [DB reupgrade] 2015-11-12 02:54:51 -05:00
Dan Stillman
bad9833896 Resolve caller.start() promise when passed functions finish
Instead of waiting for all queued functions to finish
2015-11-11 02:14:30 -05:00
Dan Stillman
ccd765ff74 Update versions and submodules 2015-11-08 16:21:20 -05:00
Dan Stillman
7f43ca9503 Merge branch '4.0' 2015-11-01 21:22:13 -05:00
Dan Stillman
1e6c29766f Add deletion uploading to API syncing [DB reupgrade]
Tags deletions are not currently synced, and maybe don't need to be.
2015-11-01 03:58:54 -05:00
Dan Stillman
ee6793a9e6 ConcurrentCaller changes
- Different constructor parameters
- id property for logging
- fcall() -> start()
- add() to enqueue without starting
- runAll() to run down queue and return promises for all current tasks
- wait() to wait for all running tasks to finish
2015-10-29 02:57:42 -04:00
Dan Stillman
62e586073d concurrent-caller.js -> concurrentCaller.js 2015-10-29 02:49:31 -04:00
Dan Stillman
ed33c6b712 Update Bluebird to 2.10.2 2015-10-29 02:23:22 -04:00
Dan Stillman
a22fe2ecda Update translators and renamed-styles.json 2015-10-02 05:05:26 -04:00
Dan Stillman
1b333be23f Add Zotero.Library.prototype.lastStorageSync 2015-09-29 04:42:13 -04:00
Dan Stillman
4dd56eadfc Update version 2015-09-25 13:29:02 -04:00
Dan Stillman
ec66d15a5f Update version and submodules 2015-09-24 22:13:35 -04:00
Dan Stillman
c43d36900a Update version 2015-09-24 18:24:52 -04:00
Dan Stillman
b2f0d3beb0 Update versions 2015-09-23 05:04:25 -04:00
Aurimas Vinckevicius
88ab129ffb Add Feed and FeedItem
Also:
* _finalizeErase in Zotero.DataObject is now inheritable
* Call _initErase before starting a DB transaction
* removes Zotero.Libraries.add and Zotero.Libraries.remove (doesn't seem like this is used any more)
2015-09-21 17:08:21 -05:00
Dan Stillman
1c087270e3 Update version 2015-08-27 17:42:58 +01:00
Dan Stillman
9bd2913b2a Unminify TinyMCE plugins 2015-08-27 16:07:50 +02:00
Dan Stillman
030f532d04 Update submodules 2015-08-27 16:00:36 +02:00
Dan Stillman
473c3affb8 Update version 2015-08-14 01:42:24 -04:00
Dan Stillman
4eff7bd2d4 Update submodules 2015-08-13 18:38:59 -04:00
Dan Stillman
c123b4a2f9 Switch to unminified editor_template_src.js in TinyMCE code 2015-08-13 17:53:40 -04:00
Dan Stillman
0aecaad761 Update conflict resolution for API syncing
This will appear much less frequently, since non-conflicting field changes on
both sides can be resolved automatically, but genuine field conflicts still
require manual conflict resolution.

The merge pane is no longer editable, since the itembox code to do that is
async and can't run in a modal window, but it's not really necessary,
particularly with conflicts happening less frequently.

TODO:

- Remote item deletions
- File conflicts
- Maybe handle some edge cases where the conflicted items fail to save
2015-08-06 04:14:49 -04:00
Dan Stillman
7b0c34a3ab Update submodules 2015-08-05 15:11:24 -04:00
Dan Stillman
1178d2509d Update versions 2015-08-05 15:08:29 -04:00
Dan Stillman
2da6bc7fcc Update version 2015-07-30 16:04:10 -04:00
Dan Stillman
fb9109e837 Update versions and submodules 2015-07-26 18:33:04 -04:00
Dan Stillman
984789d304 API syncing megacommit
There's a lot more to do, and this isn't ready for actual usage, but the
basic functionality is mostly in place and has decent test coverage. It
can successfully upgrade a library last used with classic syncing and
pull down changes via the API. Uploading mostly works but is currently
disabled for safety until it has better test coverage.

Downloaded JSON is first saved to a cache table, which is then used to
populate other tables and later for generating PATCH requests and
automatically resolving conflicts (since it shows what was changed
locally and what was changed remotely). Objects with unmet dependencies
or unknown fields are skipped for now but don't block the rest of the
sync.

Some of the bigger remaining to-dos:

- Tests for uploading
- Re-do the preferences to get an API key
- File sync integration
- Full-text syncing integration
- Manual conflict resolution (though this already includes much smarter
  conflict handling that automatically resolves many conflicts)
2015-07-20 18:16:57 -04:00
Dan Stillman
5c523d8694 Merge branch '4.0' 2015-07-18 07:09:53 -04:00
Dan Stillman
2ad0f5ecdc Update translators 2015-07-12 23:57:58 -04:00
Dan Stillman
9e050d6081 Update versions 2015-07-10 17:51:08 -04:00
Dan Stillman
44269d8999 Update versions 2015-07-06 18:02:07 -04:00
Dan Stillman
a080e4090d Update version 2015-07-04 00:02:05 -04:00
Dan Stillman
20f279043b Update submodules 2015-07-03 02:09:27 -04:00
Dan Stillman
44accbadec Update versions 2015-07-03 02:06:51 -04:00
Dan Stillman
4c751740b4 Update versions and translators 2015-06-30 23:41:48 -04:00
Dan Stillman
4233d2ebbd Update translators and repotime 2015-06-30 00:12:57 -04:00
Dan Stillman
99dd1c0697 Merge branch '4.0'
Since modal windows (e.g., the Create Bib window and the Quick Copy site
editor window) can't use yield, style retrieval
(Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a
previous async Zotero.Styles.init(). The translator list is generated in
the prefs window and passed into the Quick Copy site editor, but it's
possible the translators API should be changed to make getTranslators()
synchronous with a prior init() as well.
2015-06-27 16:59:58 -04:00
Dan Stillman
3a5854f49f Update versions and submodules 2015-06-26 02:40:18 -04:00
Dan Stillman
33dedd1753 Tags overhaul [DB reupgrade]
- Simplified schema
- Tags are now added without reloading entire tag selector
  - On my system, adding 400 tags to an item (separately, with the tag
    selector updating each time) went from 59 seconds to 42. (Given that
    it takes only 13 seconds with the tag selector closed, though,
    there's clearly more work to be done.)
- Tag selector now uses HTML flexbox (in identical fashion, for now, but
  with the possibility of fancier changes later, and with streamlined
  logic thanks to the flexbox 'order' property)
- Various async fixes
- Tests
2015-06-23 05:21:58 -04:00
Dan Stillman
f7216298b4 Update character set handling
Restore prepopulated charset table, but this time with just the
encodings from the WHATWG Encoding Standard. Assigning a charset to
Zotero.Item::attachmentCharset runs the value through
Zotero.CharacterSets.toCanonical() automatically.

This migrates attachment charsets to the new canonical values, clearing any
that are unsupported.

Other legacy mappings could still be added back, as disussed in #760.
2015-06-12 02:46:02 -04:00
Dan Stillman
cd2898ece3 Update Bluebird to v2.9.27 2015-06-08 04:05:46 -04:00
Dan Stillman
a22c4969e6 Move editable and filesEditable props to libraries table [DB reupgrade]
And add group.fromJSON(json, userID), which sets editable and
filesEditable properties based on the group JSON (libraryReading, role
lists, etc.) and the given user
2015-06-07 15:50:07 -04:00
Dan Stillman
a740658452 Relations overhaul (requires new DB upgrade from 4.0)
Relations are now properties of collections and items rather than
first-class objects, stored in separate collectionRelations and
itemRelations tables with ids for subjects, with foreign keys to the
associated data objects.

Related items now use dc:relation relations rather than a separate table
(among other reasons, because API syncing won't necessarily sync both
items at the same time, so they can't be stored by id).

The UI assigns related-item relations bidirectionally, and checks for
related-item and linked-object relations are done unidirectionally by
default.

dc:isReplacedBy is now dc:replaces, so that the subject is an existing
object, and the predicate is now named
Zotero.Attachments.replacedItemPredicate.

Some additional work is still needed, notably around following
replaced-item relations, and migration needs to be tested more fully,
but this seems to mostly work.
2015-06-01 20:28:30 -04:00
Dan Stillman
5ba344516e Update PDF tool handling in tests
The test runner now downloads and caches the PDF tools for the current
platform within the test data directory and only redownloads them when
out of date, and it updates the download URL so that the full-text code
pulls from the cache directory via a file:// URL.

The installPDFTools() support function now installs the files directly
instead of going through the prefs, and a new uninstallPDFTools()
function removes the tools. Since the presence of the PDF tools can
affect other tests, tests that need the tools should install them in a
before() and uninstall them in an after(), leaving most tests to run
without PDF indexing.

This also adds a callback to the waitForWindow() support function. If a
modal dialog is opened, it blocks the next promise handler from running,
so a callback has to be used to interact with and close the dialog
immediately.
2015-05-31 23:50:26 -04:00
Dan Stillman
6b87c641d9 Experimental approach to cancelling unnecessary promises
If a view or other resources are destroyed while a promise is being
resolved, subsequent code can fail. This is generally harmless, but it
results in unnecessary errors being logged to the console.

To address this, promises can use a new function,
Zotero.Promise.check(), to test whether a value is truthy or 0 and
automatically throw a specific error that's ignored by the unhandled
rejection handler if not.

Example usage:

getAsync().tap(() => Zotero.Promise.check(this.win));

If this.win is cleaned up while getAsync() is being resolved, subsequent
lines won't be run, and nothing will be logged to the console.
2015-05-23 04:43:37 -04:00
Dan Stillman
eee0e22bf6 Add 'version' to sync cache primary key
The sync cache will have pristine copies of the existing versions of
local objects for better conflict resolution, but downloads will get
saved to the sync cache first before processing, so the cache needs to
be able to hold more than one version.
2015-05-19 01:25:31 -04:00
Dan Stillman
daad18c1b5 Include running function in current count in ConcurrentCaller log line 2015-05-15 01:47:20 -04:00
Dan Stillman
aa70e60fc6 Add clearTimeout() implementation to Bluebird
Necessary for cancellable promises
2015-05-10 18:30:06 -04:00
Dan Stillman
574f636683 Call next function in finally block in ConcurrentCaller 2015-05-05 02:58:22 -04:00
Dan Stillman
43a2045aec Change computerProgram 'version' to 'versionNumber'
And use 'version' instead of 'itemVersion' for object version for items

Also add deferred foreign key checking to system.sql so that DROP TABLE
commands don't fail mid-transaction
2015-05-04 02:45:53 -04:00
Dan Stillman
90f4996d9d Remove some excessive error logging from Bluebird
And hide errors from DB transaction rollback tests
2015-04-25 03:17:41 -04:00
Dan Stillman
fec43f1f62 Merge branch '4.0' into api_syncing 2015-04-13 02:01:43 -04:00
Dan Stillman
b599aed8ed Fix pasting of non-HTTP URLs into notes from non-note sources
Copying zotero:// and other non-HTTP links from a note itself was fixed
in #452, but copying such links from other sources still stripped the
hrefs. This removes the patch in #452 and just gets the HTML directly
from the clipboard. I'm not sure why TinyMCE doesn't try to do this by
default (it only tries for plaintext), so maybe there's a problem with
this approach, but it seems to work for me (strips bad HTML, etc.).

Fixes #697
2015-04-10 13:08:25 -04:00
Dan Stillman
a9ca6e0857 Support unmodified Xpdf binaries
Use stdout redirection scripts for pdfinfo and, on Windows, a script to
run pdftotext hidden, which together allow for all unmodified binaries
(including, probably, symlinked system ones, though I didn't test that).

On Windows, using a .vbs does cause a brief wait cursor. The stock
pdfinfo needs the redirection script anyway, so that's unavoidable, but
on the async branch I think we'll be able to switch to pdf.js for the
page count, at which point maybe I'll try to remember how I modified the
Windows binaries to be hidden and use a modified version of pdftotext to
avoid VBScript. (We use the stock pdftotext elsewhere already.)
2015-04-01 04:36:21 -04:00
Dan Stillman
4b83b1a630 Bump version and maxVersion 2015-03-27 19:00:25 -04:00
Dan Stillman
b042973751 Merge branch '4.0' into api_syncing 2015-03-22 19:51:29 -04:00
Dan Stillman
d8f3be4bee updateBundledStyles() asyncification and related changes
- Use async DB and OS.File for bundled file updates
- Remove support for translator/style ZIP files -- the two options are
  now non-unpacked XPIs with subfolders or unpacked source installations
- Now that we have async file access, don't store translator code in
  database cache -- just store metadata so that it's available without
  reading each translator file
- Change the (previously partially asyncified) Zotero.Styles/Translators
  APIs a bit -- while the getAll/getVisible methods are asynchronous and
  will wait for loading, the get() methods are synchronous and require
  styles/translators to be initialized before they're called. Most
  places that end up calling get() probably call getAll/getVisible first
  and should therefore be async, but if there's any way to trigger a
  get() first, that will need to be adjusted.
- Asyncify various other style/translator-related code

XPI support is untested, as is style/translator usage, so there are
almost certainly bugs. The latter depends on updated export format
support (#659), since toArray() no longer exists on this branch.

Addresses #529 and #520
2015-03-22 04:27:25 -04:00
Dan Stillman
faed7cd7dd Replace some 'for each..in' instances
There are hundreds more, but these are all the ones that generate warnings in
the console at startup. XPCOM/XBL ones don't seem to do so, so we can ignore
those for now (and hopefully not bother with them on 4.0). Instances in
translators do generate warnings.

Addresses #656
2015-03-17 15:19:45 -04:00
Dan Stillman
bdd69d0a53 Merge branch '4.0' into api_syncing 2015-03-16 23:41:10 -04:00
Dan Stillman
a03772cae7 Merge branch 'master' into api_syncing
Note that this loses conflicting changes to translate_item.js from 849803473a,
so those will need to be reapplied if applicable. /cc @aurimasv, @mtd91429
2015-03-16 15:23:07 -04:00
Simon Kornblith
b4142342a5 Merge remote-tracking branch 'origin/connector' into 4.0 2015-03-14 18:32:54 -04:00