Commit graph

8866 commits

Author SHA1 Message Date
Dan Stillman
f3ceb7f66e Load object data when looking up integration items
Item data may not have been loaded for a library when requesting an item
from a document (e.g., for Refresh), so we need to load all data for
requested items to avoid unloaded-data errors. (Data isn't loaded if
it's already been loaded, so hopefully this doesn't slow things down too
much.)
2017-04-19 04:24:34 -04:00
Dan Stillman
ab2bedc0df Clear inPublications in PATCH JSON with false, not empty string 2017-04-19 03:18:05 -04:00
Dan Stillman
c03a0df226 Add settings table flag to auto-repair database on startup
This will allow the DB Repair Tool to only recreate the file and leave
schema knowledge to the client.

Addresses #895
2017-04-19 02:53:39 -04:00
Dan Stillman
698eb3358a Retry library sync on 409 error
Closes #928
2017-04-19 02:53:39 -04:00
Adomas Venčkauskas
ff74e0ff00 Do not return empty string for falsy arguments in Utilities.htmlSpecialChars 2017-04-18 16:21:49 +03:00
Dan Stillman
de7b56b8a1 Don't include items in My Publications in Unfiled Items 2017-04-17 21:34:08 -04:00
Dan Stillman
2160b1cb87 Remove stray console.log() calls in citeproc-js
This is breaking bibliography output for some citations.
2017-04-17 13:56:59 -04:00
Dan Stillman
8a7d405e4d Close #932, Disable file dragging into My Publications
Already disabled for collections pane, now for items pane
2017-04-16 03:35:02 -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
b3277de5ae Update tests after citeproc-js upgrade to match output 2017-04-15 04:35:16 -04:00
Dan Stillman
58f4dc3bb5 Unescape HTML in API upload errors 2017-04-14 23:14:22 -04:00
Dan Stillman
0920e25393 Make 404 handling for uploaded objects permanent
Related to https://github.com/zotero/dataserver/commit/aafda6d835
2017-04-14 23:14:22 -04:00
Dan Stillman
e4bc715dc1 Update locales from Transifex 2017-04-14 23:14:22 -04:00
Dan Stillman
a2f11f5338 Update submodules 2017-04-14 23:14:22 -04:00
Dan Stillman
287a0b587b Update citeproc-js to 1.1.160 2017-04-14 23:14:22 -04:00
Dan Stillman
e397d12d42 Update whitespace chars in cleanISBN/cleanISSN tests for Firefox 52+
Farewell, Mongolian Vowel Separator
2017-04-14 23:14:22 -04:00
Adomas Venčkauskas
de269b3021 Make sure styles are loaded before opening doc-prefs dialog 2017-04-14 14:30:26 +03:00
Adomas Venčkauskas
49001572fd Remove dependency on zoteroIntegration.idl 2017-04-14 14:19:52 +03:00
Adomas Venčkauskas
0de22b132e Move document plugin interface description into integrationTests 2017-04-14 14:19:52 +03:00
Dan Stillman
e1c183b597 Fix link opening in standalone note windows 2017-04-13 05:51:52 -04:00
Dan Stillman
9c91018964 Reduce indentation in waitForWindow() support function 2017-04-13 05:51:52 -04:00
Dan Stillman
18bb18ba51 Update Zotero.Styles initialization to match translators 2017-04-13 05:51:52 -04:00
Dan Stillman
9b53570968 Fix bibliographyTest breakage after d5cf33a798
d5cf33a798 adds a `yield` to bibliography.js, which runs in modal
windows (e.g., Create Bib), but there's a weird interaction between
Bluebird and modal dialogs that can result in hangs -- presumably
something to do with things being queued on the event loop but the modal
dialog preventing other code from running? This was breaking
bibliographyTest, but it seemed to work fine for me in normal usage,
waiting properly for a running styles initialization to finish. It's
possible this problem is limited to tests, but in the past, at least, I
apparently decided that this was a general problem with `yield` in modal
dialogs [1]. (See also: [2].) In any case, calling `yield
Zotero.Styles.init()` from the Create Bib window was hanging the test,
so for now do a synchronous check for style initialization to avoid it,
and we should make sure that `yield` actually works in other contexts.

[1] https://github.com/zotero/zotero/commit/99dd1c069776
[2] https://github.com/zotero/zotero/commit/c2dd531cec4
2017-04-13 05:20:36 -04:00
Dan Stillman
ed3b18ba8c NodeList doesn't have forEach in Firefox 45 2017-04-13 01:21:36 -04:00
Dan Stillman
b7aab8b8d2 Don't break Zotero 2017-04-13 00:21:16 -04:00
Dan Stillman
6d18b46165 Fix test breakage after 5ff2a59f87
And remove all instances of `publicationsLibraryID`
2017-04-13 00:15:05 -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
e311279947 Remove obsolete quicksearch refresh in ItemTreeView::notify() 2017-04-12 19:26:58 -04:00
Dan Stillman
3c3ff32854 Better debug output when setting .synced on an item 2017-04-12 19:26:58 -04:00
Dan Stillman
4da0c4c1fc Remove unused laststoragesync response from test 2017-04-12 05:37:15 -04:00
Dan Stillman
b0140686f3 Add .regularOnly and .expandAll flags to ItemTreeView 2017-04-12 05:37:15 -04:00
Dan Stillman
6c1ba0aeee Don't wait for transaction when selecting item 2017-04-12 05:37:15 -04:00
Adomas Venčkauskas
7657c9044d Add Document.addEditBibliography to integration.js
See zotero/zotero-word-for-windows-integration#28 for background
2017-04-12 11:59:38 +03:00
Adomas Ven
2a5dbaa204 Merge pull request #1202 from adomasven/fix/doc-pref-window-unloaded-styles
Fix document preferences dialog failing when styles unloaded.
2017-04-12 11:52:58 +03:00
Adomas Venčkauskas
ea535bceb0 Add tests for style from untrusted source prompt 2017-04-12 11:48:06 +03:00
Adomas Venčkauskas
3e69da7e4c Prompt if style in document is not from official source 2017-04-12 11:47:57 +03:00
Adomas Venčkauskas
02c43c3643 Add integrationTests.js
Contains a dummy doc plugin, which is useful for:
- Testing integration.js functionality
- Serving as succint documentation for development of new integration
  plugins
2017-04-12 11:45:10 +03:00
Dan Stillman
747290be38 Don't show response text on HTTP error if empty 2017-04-11 04:18:10 -04:00
Dan Stillman
5d6478e507 429 and Retry-After support for API requests 2017-04-11 04:17:16 -04:00
Adomas Venčkauskas
269a250b4f Fetch a style if it is not installed on document preferences load 2017-04-10 11:24:22 +03:00
Adomas Venčkauskas
d5cf33a798 Fix document preferences dialog failing when styles unloaded.
Closes #1084
2017-04-10 11:24:22 +03:00
Dan Stillman
64414e49be Show UnexpectedStatusException response without prefix during sync 2017-04-07 23:36:06 -04:00
Dan Stillman
a64c6808e5 Always include server response in Zotero.HTTP.request() errors 2017-04-07 23:36:05 -04:00
Dan Stillman
3df66ccbe4 Fix duplicated error message when logging UnexpectedStatusException
Not sure what's causing this. (Bluebird?)

Also add stack to custom HTTP exceptions.
2017-04-07 23:36:05 -04:00
Dan Stillman
c0a2ec8a47 Promise cleanup in Zotero.Attachment.importFromURL()
Use `new Zotero.Promise` instead of `defer()` and `coroutine()` instead
of chained promises
2017-04-07 23:36:05 -04:00
Dan Stillman
4540edb622 Fix breakage from 406f50a3 2017-04-07 23:11:39 -04:00
Adomas Venčkauskas
5818935a32 Address file import bugs
I don't know why why, but wbp.saveDocument() destroys the
document object which is passed into it. This means that further access
of the document is impossible and raises errors, which we were not
handling properly and not returning on attachment saving.

I've added error handling and changed removed code which tries to access
the document after the Zotero.Utilities.Internal.saveDocument() call.

Addresses https://forums.zotero.org/discussion/64745/5-0-beta-apparently-stuck-at-saving-to
2017-04-07 14:35:49 +03:00
Adomas Venčkauskas
406f50a3fd Restore progress for attachments indication in connectors
78b1d2e regression
2017-04-07 13:25:20 +03:00
Dan Stillman
d8fed09578 Mark local collection as unsynced if missing remotely in item request
We should figure out when this happens, but in the meantime, recover
from it if it does.
2017-04-07 00:57:50 -04:00
Dan Stillman
172f36d050 Fix dragging in links on Linux 2017-04-05 14:25:04 -04:00