Commit graph

8216 commits

Author SHA1 Message Date
Dan Stillman
e573ad886f Update recognizePDF tests
- Add test for recogning within a collection (follow-up from #1015)
- Update/remove some outdated code

These tests are still skipped by default, since we don't want to actually do
lookups on every test run.
2016-05-27 01:33:34 -04:00
Dan Stillman
3ef3d943b0 Merge pull request #1015 from LinuxMercedes/recognize-pdf-transaction
Add items from RecognizePDF in a DB transaction
2016-05-27 00:36:05 -04:00
LinuxMercedes
aeb0d7599a Thread skipNotify through addItem 2016-05-26 23:28:10 -05:00
LinuxMercedes
5c9fce9a9d Add items from RecognizePDF in a DB transaction 2016-05-26 23:28:10 -05:00
Dan Stillman
34208f92f7 Fix startup error in translation-server 2016-05-26 22:44:22 -04:00
Dan Stillman
d7e38d960e Fix error in console on feed update before pane open 2016-05-26 00:35:04 -04:00
Dan Stillman
e4bc4c028d Don't fail if processDocuments() processor returns undefined
Follow up to 157b8deda9
2016-05-26 00:35:04 -04:00
Dan Stillman
2f47eae3ff Allow string path to be passed to Zotero.File.getExtension() 2016-05-26 00:35:04 -04:00
Dan Stillman
47b934f67e Fix direct saving of PDFs via connector 2016-05-25 17:34:26 -04:00
Dan Stillman
6a97de8911 Update outdated Libraries.setVersion() calls in syncEngine tests 2016-05-23 01:28:50 -04:00
Dan Stillman
7b5b2dc89e Close browser window in server connector tests 2016-05-23 01:19:44 -04:00
Dan Stillman
6b0be91bf4 Clear lastViewedFolder pref when resetting DB during tests 2016-05-23 00:59:16 -04:00
Dan Stillman
3905c98f93 Don't save note if it hasn't been changed by user
After uploading a note to the API, the local version may be overwritten with
the sanitized version in the API write response. This commit prevents the note
from being resaved when the note is clicked, reformatted by TinyMCE, and
clicked away from, which would result in an endless resync cycle. Instead, the
note is only resaved (and marked for syncing) when the user manually makes a
change.

 Please enter the commit message for your changes. Lines starting
2016-05-22 23:09:41 -04:00
Joscha Legewie
0ae070970a Support String for options.file in Zotero.Attachments.linkFromFile (#1005) 2016-05-22 13:42:39 -04:00
Dan Stillman
e21a914a1f Clarify comment for local object version updating behavior 2016-05-21 16:52:27 -04:00
Dan Stillman
4c46ebcf96 loadAllData() no longer necessary before fromJSON()
Post-deasyncification
2016-05-21 16:33:46 -04:00
Dan Stillman
f8716fbe88 Don't change Date Modified when updating local item after upload
If the API returns a modified item after an upload (e.g., to strip invalid
characters), don't update the Date Modified field when saving those changes to
the local version (though it would still be good to avoid API-side changes as
much as possible).
2016-05-21 16:33:46 -04:00
Dan Stillman
56e40c485b A couple libraryTreeView tests 2016-05-21 16:33:46 -04:00
Dan Stillman
8b4a5936a3 Fix checking for file sync downloads at sync time 2016-05-21 16:33:45 -04:00
Dan Stillman
99eb39e288 Always include 'contentType'/'charset'/'filename' in attachment JSON
And omit in ZFS file sync requests

The API previously didn't allow these properties to be set for group items,
because they were set atomically during the file upload process, but 1) that's
not really necessary (makes a little sense for 'filename', but not really a big
deal if an old file is renamed on another computer before the new file is
synced down) and 2) skipping them results in the properties getting erased
after items are uploaded and the empty values returned by the server overwrite
the local values.
2016-05-21 16:33:35 -04:00
Dan Stillman
4ffd35dff2 Fix syntax error in itemTest.js 2016-05-20 23:30:21 -04:00
Dan Stillman
f5812852cb Default to My Library if pane not yet open saving snapshot from connector 2016-05-20 16:22:28 -04:00
Dan Stillman
0be2796500 Fix webpage/snapshot saving from connector 2016-05-20 15:51:54 -04:00
Dan Stillman
157b8deda9 Allow processor passed to Zotero.HTTP.processDocuments to return a promise
If a promise is returned, it's waited for before continuing with the next
document.
2016-05-20 15:51:01 -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
b9bbf007f0 Don't bother opening browser window for syncLocal::checkUser() tests
The window is passed to nsIPromptService, which handles finding a parent window
(hidden or otherwise) automatically if necessary.
2016-05-18 02:31:41 -04:00
Dan Stillman
2c18968c3a Fix Quick Format dialog for search results in unloaded libraries
Since the search might return items in libraries that haven't yet been loaded,
we have to get those items asynchronously and load their data explicitly. Need
to test this with a large document to make sure it still properly populates the
list with search results and then adds matching cited items.
2016-05-17 13:43:11 -04:00
Dan Stillman
7192929ac3 Add Zotero.DataObjects.prototype.loadDataTypes(objects, dataTypes)
Bulk-loads data for objects that are potentially in different libraries. This
would generally be used to load necessary data for cross-library search
results, since those results might include objects in libraries that haven't
yet been loaded.
2016-05-17 13:43:11 -04:00
Dan Stillman
dd9cc40c16 Cancel pending feed update check on Zotero shutdown
This avoids errors for a missing 'feeds' table during tests, when the callback
started in Zotero.Feeds.init() runs but the Zotero object has been torn down
and the database hasn't yet been reinitialized.
2016-05-17 13:43:11 -04:00
Dan Stillman
6907af86fd Add XPCOM clearTimeout() and remove Zotero.wait()
Properly emulate setTimeout() with support for cancelling timers.
2016-05-17 13:43:11 -04:00
Dan Stillman
a285e97815 Remove pumpGenerator/promiseGenerator
And update integration code to use ES6 generators and Bluebird's .each()
instead.
2016-05-17 13:43:11 -04:00
Dan Stillman
0cc9926309 Fix test from d8025be67 2016-05-17 02:44:00 -04:00
Dan Stillman
d8025be676 Ignore sanitization changes when comparing notes in conflict
Until we have a consistent way of sanitizing HTML on client and server, account
for differences manually. More differences between HTMLPurifier and TinyMCE
should be added as necessary.
2016-05-17 02:33:53 -04:00
Dan Stillman
6f04b34d59 Close #945, Optimize bulk reload on multi-item changes 2016-05-16 18:25:35 -04:00
Dan Stillman
56dcd6da26 Add file sync info/link to File Not Found dialog 2016-05-15 04:24:00 -04:00
Dan Stillman
427234917d Properly test whether file syncing is enabled for a library 2016-05-15 04:22:24 -04:00
Dan Stillman
a8ea8656d2 Fix sync error after changing child item to top-level 2016-05-15 03:34:06 -04:00
Dan Stillman
a7ea92fd52 Mark items with missing full-text cache files as unsynced for full text
Fixes #954, Full-text content processor tries to process missing cache
files on every idle
2016-05-15 01:30:35 -04:00
Dan Stillman
82d00a4e7a Change some instances of attachmentMIMEType to attachmentContentType 2016-05-13 15:56:35 -04:00
Dan Stillman
b109279a17 Avoid errors for some invalid requests viewing attachments 2016-05-13 15:45:51 -04:00
Dan Stillman
eb400587e8 Fix various bugs saving from connector and add test 2016-05-13 15:00:54 -04:00
Dan Stillman
55c60a69ac Delay feed fetching 5 seconds at startup
Would be better not to start until after the initial library's items had
been loaded, but that's a little awkward to do from non-window code.
Might make more sense when there's only Standalone.
2016-05-13 02:26:46 -04:00
Dan Stillman
5a54466099 Disable Firefox beta in Travis tests until unbranded build is available
Mozilla removed support for xpinstall.signatures.required in Fx47 Beta
before making an unbranded build available, so a source installation
won't currently run.
2016-05-12 17:09:28 -04:00
Dan Stillman
ed312b2c89 Tweak text in empty-library sync warning dialog 2016-05-12 17:00:28 -04:00
Dan Stillman
59c0c7fcad Don't include file properties for ZFS-synced libraries
They're disallowed by the API in group libraries and not necessary in personal
libraries, because they're set atomically with the file upload.
2016-05-12 17:00:28 -04:00
Adomas Ven
ddd1455aab Stub out feed updates for importFromOPML() tests
No need to do network requests
2016-05-12 16:46:30 -04:00
Dan Stillman
0f45569ccd Default to NC for My Publications CC license, and reorder SA option 2016-05-12 14:31:57 -04:00
Dan Stillman
62ef910631 Better debug output for full sync 2016-05-12 03:02:50 -04:00
Dan Stillman
92ec1324dc Add a debug flag to prompt or throw on an attempted sync upload
extensions.zotero.sync.debugUploadPolicy = {1, 2}

1 to prompt, 2 to throw

This can be used to test sync functionality without altering the server
state unexpectedly. When prompting, the request body, if any, is logged
to debug output.
2016-05-12 03:02:50 -04:00
Dan Stillman
98cd96eb01 Make DELETE a write method in Zotero.HTTP.isWriteMethod() 2016-05-12 03:02:26 -04:00