Commit graph

7629 commits

Author SHA1 Message Date
Dan Stillman
de4aa4c240 Update locales from Transifex 2018-03-05 18:08:22 -05:00
Dan Stillman
23bbb5a1e5 Make atob() available in translator sandbox
Addresses zotero/translators#1576
2018-03-05 18:08:22 -05:00
Dan Stillman
87efe75e24 Fix blue toolbar background on Windows with DWM compositor
Applies to Windows 7 with Aero effects and later Windows versions
2018-03-05 17:18:12 -05:00
Adomas Venčkauskas
381351b433 Fix an error being logged when window to activate is gone on Linux 2018-03-05 14:28:07 +02:00
Adomas Venčkauskas
13766e1f6c Show delayed citations checkbox in doc prefs dialog after initialization
Closes #1458
2018-03-05 14:26:57 +02:00
Adomas Venčkauskas
5a1cf3ab02 Fix dead integration field object function calls 2018-03-05 13:46:59 +02:00
Dan Stillman
3f905be77e Reduce delayed-citations timeout to 3 seconds
5 seconds is too long
2018-03-05 02:16:55 -05:00
Dan Stillman
44632e2218 Make the Windows UI somewhat less unpleasant
- Get rid of the hideous blue effect in the menubar and toolbar
- Slim down splitters
- Get rid of awful grippies except when collapsed (and make them
  slightly less ugly in the collapsed state)
- Reduce spacing of tags in tag selector
- Tweak twisty spacing
- Get rid of stray line to the right of item pane tabs

We may still want to get rid of the menubar (#366), and we can do better
than the ugly gray backgrounds (#365), but this is a start.

I'm not sure if everything will look the same on all Windows versions,
so this will need a little testing.

Closes #367
2018-03-02 20:28:51 -05:00
Dan Stillman
724329d948 Prevent Undo from clearing existing note
When loading the first note of a session in the right-hand pane or when
loading a note in the separate window, if you made a change and then
pressed Undo twice (or maybe only once in some situations), it could
undo to empty (though you could usually Redo to restore it).
2018-03-01 22:41:33 -05:00
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
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
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
153ed728cb Update citeproc-js to 1.1.190 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
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