Commit graph

7992 commits

Author SHA1 Message Date
Dan Stillman
fdd90b04d3 Save to My Library via connector when read-only library is selected
(Or My Publications, which is editable but shouldn't allow direct saving)

Also switches to My Library
2016-06-09 02:47:29 -04:00
Dan Stillman
de19d2fee5 Update locales from Transifex 2016-06-09 02:43:37 -04:00
Dan Stillman
0cf102b0e6 Fix missing word in string 2016-06-07 12:36:27 -04:00
Dan Stillman
b59edceec2 Fix some title casing of UI labels 2016-06-06 21:30:32 -04:00
Dan Stillman
cf2a673e2b Don't split out "Items First" in feed prefs 2016-06-06 17:58:51 -04:00
Dan Stillman
80f31abc30 Merge new English strings for 5.0 2016-06-06 16:43: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
2928e1fda1 Update locales from Transifex 2016-06-06 16:10:30 -04:00
Dan Stillman
8be22b84d1 Merge pull request #1012 from adomasven/fix/hide-list-cols-for-feeds
Closes #1008. Omit certain item list columns in feed views
2016-06-06 15:48:59 -04:00
Dan Stillman
a2fbf04682 Fix handling of unexpected status code for repository update request 2016-06-05 19:08:08 -04:00
Adomas Venčkauskas
60c4262d1e Closes #1008. Omit certain item list columns in feed views 2016-06-03 15:48:46 +01:00
Dan Stillman
19714d5b9b Avoid logged error after server_connector saveSnapshot tests
Indexing currently happens a second after the 201 is returned to the
connector, so we have to wait for that before continuing tests, or else
a DB clear in a later test (e.g., storageLocal) will cause an error to
be logged when the indexing kicks off.
2016-06-02 16:47:27 -04:00
Dan Stillman
b5b8f2cd2f Update test for fcb6e0c06 2016-06-02 16:37:26 -04:00
Dan Stillman
7f339af104 Remove debug output during file sync 2016-06-02 16:14:30 -04:00
Dan Stillman
b0b9e84650 Clarify debug output for Zotero.DataObjects.prototype._loadDataTypeInLibrary() 2016-06-02 16:14:30 -04:00
Dan Stillman
3fb2dfe9ac Log error from NetUtil.asyncFetch in Zotero.File.putContentsAsync() 2016-06-02 16:14:30 -04:00
Dan Stillman
0d008b4704 Use OS.File.removeDir() to delete existing attachment files during sync 2016-06-02 16:14:30 -04:00
Dan Stillman
88a43fea31 Handle subdirectories when extracting attachment ZIP files 2016-06-02 16:14:30 -04:00
Dan Stillman
fc4d7fa4bf Fix infinite loop in Zotero.File.zipDirectory() on subdirectory
But subdirectories shouldn't actually be used yet, because they won't
extract properly on 4.0.
2016-06-02 16:14:30 -04:00
Dan Stillman
37063f639f Be sure to clean up temp attachment storage dir in importFromDocument() 2016-06-02 16:14:29 -04:00
Dan Stillman
fcb6e0c068 Save snapshots via nsIWebBrowserPersist instead of WebPageDump
WPD code hasn't been updated in many years, and there was an issue with
document permissions in 5.0. We'll need to replace nsIWBP in Electron,
but this will do for now.

Attachments are opened using file:// URIs instead of
zotero://attachment, which is what Standalone does anyway. Ancient HTML
annotations and highlights won't be displayed anymore, but I'm not sure
they worked anyway, and it hasn't been possible to create them in years.
We might be able to write out existing annotations to notes.

iframes are skipped during saving, in an attempt to reduce the number of
junk ad files. JS can still cause problems with viewing, so we might
still want to either disable scripts or force the viewed page offline
(if such a thing is possible).

There might be issues with auxiliary filename length/characters during
cross-platform file syncing. (We modified the WPD code to shorten/clean
them.)
2016-06-02 16:14:29 -04:00
Dan Stillman
26b161fce2 Merge pull request #1017 from jlegewie/patch-1
Allow string path as argument to Zotero.launchFile()
2016-05-30 13:26:14 -04:00
Joscha Legewie
00497eda3b Allow string path as argument to Zotero.launchFile()
Not sure whether this is desired but it helps to reduce the use of nsIFile to a minimum. `file.launch()` and `file.reveal()` are two of the few things that are not possible with OS.File/OS.Path. When that changes, Zotero.launchFile is the only function that needs to be modified if it works with string paths.
2016-05-30 09:02:40 -04:00
LinuxMercedes
6bff554976 Add a second horizontal layout to Zotero for small screens (#1010) 2016-05-27 20:57:29 -04:00
Dan Stillman
849d206f87 Fix error running tests in translation-server 2016-05-27 04:37:48 -04:00
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