Commit graph

9734 commits

Author SHA1 Message Date
Dan Stillman
bf122add81 Remove special handling of Cmd-Shift-Z in notes
No longer relevant in standalone app
2018-03-01 22:41:33 -05:00
Dan Stillman
7a15c88972 Symlink TinyMCE directory during build 2018-03-01 22:41:33 -05:00
Dan Stillman
e8403b9679 Update TinyMCE to 4.7.9 2018-03-01 22:41:28 -05:00
Dan Stillman
1f320e1f5d Be more lenient about Extra field values than citeproc-js
Allow fields like "Original Date: 2018" and convert them to
"original-date: 2018" when sending to citeproc-js.

For reference:

http://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html#cheater-syntax-for-odd-fields
2018-03-01 17:05:24 -05:00
Dan Stillman
e1e5178869 Shorten auto-renaming pref
So we now have autoRecognizeFiles and autoRenameFiles.
2018-03-01 04:09:17 -05:00
Dan Stillman
6e4d6a2820 Disable background full-text processing during tests 2018-03-01 03:45:58 -05:00
Dan Stillman
18d0e980d1 Increase Travis test timeout to 15 seconds
Though it probably won't help, since I imagine most timeouts are hangs
caused by race conditions
2018-03-01 03:38:46 -05:00
Dan Stillman
7e290b262c Fix bug in 97661539dc 2018-03-01 03:04:25 -05:00
Dan Stillman
0d4fd26be9 Merge new English string 2018-03-01 02:03:00 -05:00
Dan Stillman
00b2823612 Avoid repeating line in Zotero.Fulltext.indexItems() 2018-03-01 01:28:28 -05:00
Dan Stillman
b50b055e44 Wait for DB transaction to end before indexing string
This might help avoid timeouts during indexing.

Addresses #1284
2018-03-01 01:28:28 -05:00
Dan Stillman
1cfc90186f Serialize attachment indexing
Add newly added attachments to a queue, start processing it after five
seconds have passed since the last attachment was added, and process
another every half second after that unless another is added.

This queue won't survive a restart, so the queue should really be in the
DB, but this should avoid problems when adding multiple attachments at
once.

Addresses #1284
2018-03-01 01:28:28 -05:00
Dan Stillman
26dcaad76a Don't show Reindex button for files that aren't PDFs or text files 2018-03-01 01:28:28 -05:00
Dan Stillman
97661539dc Automatically retrieve metadata when saving PDFs
Applies to dragging to the collections pane or the items pane, adding
via New Item menu, or saving via the connector server

If the renaming pref is enabled, the PDF is renamed after recognition.

Can be disabled in the preferences

Closes #917
2018-03-01 01:28: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
3cc92fe1e9 Fix PDF recognition within collection (broken by f8b41c971c) 2018-03-01 01:20:29 -05:00
Dan Stillman
f99038fd37 Fix recognizer dialog with multiple tests
Do cleanup on 'unload' rather than 'close' (which is limited to a click
on the close button and doesn't get called for win.close()) and clear
the queue after each test.
2018-03-01 01:20:29 -05:00
Dan Stillman
757709cf43 Fix auto-rename after PDF recognition (wrong pref in f8b41c971) 2018-03-01 01:20:29 -05:00
Dan Stillman
da49f9900f Add 'window' getter to CollectionTreeView and ItemTreeView 2018-03-01 01:20:29 -05:00
Dan Stillman
aff2bef3f5 Fix scope of Zotero_RecognizePDF_Dialog
When Window is accessed from another scope (e.g., ItemTreeView), the
`let` somehow prevents Zotero_RecognizePDF_Dialog from showing up on the
Window object like all the other objects loaded via <script>.
2018-03-01 01:19:30 -05:00
Dan Stillman
16f228b2a3 Update renamed styles 2018-02-28 04:31:22 -05:00
Dan Stillman
153ed728cb Update citeproc-js to 1.1.190 2018-02-28 04:31:22 -05:00
Dan Stillman
7210653c0b Update version 2018-02-28 04:31:22 -05:00
Dan Stillman
e03ecfae98 Update locales from Transifex and merge new English strings 2018-02-28 02:52:52 -05:00
Dan Stillman
1d367f0165 Fix await->yield in f8b41c971 2018-02-27 19:24:28 -05:00
Dan Stillman
f8b41c971c Automatic attachment file renaming changes
Automatic renaming is now done for dragging of an external file onto an
item (as added in 7cb95f41) as well as dragging as a linked file,
dragging a non-native (not text or HTML) URL, "Attach Link to File…",
"Attach Stored Copy of File…", and "Retrieve Metadata for PDF". It only
applies if a single file is being added and if the parent item has no
non-HTML attachments. By default, the renaming only applies to PDFs, but
this can be changed with the renameAttachmentFiles.automatic.fileTypes
hidden pref.

A new General pref, "Automatically rename attachment files using parent
metadata", controls whether the renaming happens.

Files saved via web translators are renamed regardless of this pref,
because they would often be gibberish otherwise.

Closes #113
2018-02-27 18:45:03 -05:00
Dan Stillman
68879a0ffc Replace some nsIWindowMediator getService() calls with Services.wm 2018-02-27 18:44:51 -05:00
Dan Stillman
b0d9a9c82e Don't use hidden browser to download images 2018-02-27 16:05:35 -05:00
Dan Stillman
f5b1ee44f3 Add Zotero.File.rename() (extracted from Zotero.Item::renameAttachmentFile()) 2018-02-27 14:24:26 -05:00
Dan Stillman
b5cc0f918a Remove Fx54 test from Travis config 2018-02-25 21:54:23 -05:00
Dan Stillman
c0b63e5928 Better handling of 403 for attachment metadata upload
Check file-editing access for the group from the API before offering to
reset, update the filesEditable setting properly, and restart the sync
automatically after resetting.
2018-02-23 17:59:32 -05:00
Dan Stillman
5ed10c6ba2 Make Esc in PDF recognizer window close rather than minimize if done 2018-02-23 02:38:01 -05:00
Dan Stillman
7c64666167 Use separate subdomain for recognizer requests for now 2018-02-22 02:01:05 -05:00
Dan Stillman
c28c8c820b Improved PDF recognizer and 1x PDF icons 2018-02-22 01:04:11 -05:00
Dan Stillman
3fbb4633a6 Update locales from Transifex and merge new English strings 2018-02-22 01:04:07 -05:00
Dan Stillman
9ce9502b76 Tweak recognizer strings 2018-02-22 01:04:00 -05:00
Dan Stillman
a8312acfe0
Merge pull request #1420 from mrtcode/recognizer
New PDF recognizer
2018-02-21 13:59:50 -05:00
Dan Stillman
9cb2b8167d Throw actual error if file open fails in md5Async() 2018-02-21 10:22:59 -05:00
Dan Stillman
164fea0cec Updated journal article icon with fixed transparency 2018-02-20 12:19:43 -05:00
Martynas Bagdonas
991a50d090 New PDF recognizer 2018-02-20 09:32:06 +02:00
Dan Stillman
ce0dd5cc5e Update citeproc-js to 1.1.186 2018-02-19 07:23:38 -05:00
Dan Stillman
55b30dd08c Update locales from Transifex and merge new English strings 2018-02-18 16:11:07 -05:00
Dan Stillman
7fed34fa30 Hide Accessed row in attachment box when provided
If, say, a link without an access date is created via an import
2018-02-18 15:24:28 -05:00
Dan Stillman
30b59ebc95 Show full URL in tooltip when hovering over attachment URL 2018-02-18 15:24:08 -05:00
Dan Stillman
2200badef2 Nicer, localized messages for various field-too-long sync errors
Closes #351
Closes #1177
2018-02-18 15:21:13 -05:00
Dan Stillman
63f206c80e Hard-code strings and tweak styling for disabled word processor plugins
This will hopefully be both temporary and rare, so let's not bother
localizing htem.
2018-02-16 06:43:48 -05:00
Adomas Venčkauskas
628bc536a0 Add a button in preferences to enable word plugins if some are disabled 2018-02-16 11:39:48 +02:00
Adomas Venčkauskas
00e52ae62b Improves citation processing speed
Prevents from unnecesarily sending the same citation to citeproc
multiple times
2018-02-15 12:26:50 +02:00
Dan Stillman
bb925723fd Automatically set Referer for external attachment downloads
Rather than requiring translators to explicitly set a referrer, as
proposed in #772 and #1375, this simply sets it to the URL where the
save button was triggered. This fixes the Project Euclid example
in #772. It's possible it won't fix all cases, since the translator might
build the URL manually or via an intermediate page, but hopefully it
will fix the majority of cases.

I guess there's a possibility that this would break something that
currently works, but it's hard to imagine a site would block based on
the wrong referrer from the right site and not block on no referrer.

Unlike #1375, this doesn't bother with the referrer for native downloads
(e.g., snapshots or images). The former probably don't need it, and the
latter should probably be switched to use `saveURI()` anyway.

This might also fix zotero/translators#523 (SSRN) if the translator
allowed it.

Closes #1375
2018-02-15 02:13:49 -05:00
Sean Takats
081f6bc77d
New tag selector colors. 2018-02-14 13:59:37 +01:00