Commit graph

8625 commits

Author SHA1 Message Date
Dan Stillman
60b2e16746 Fix "Item collection [n] not found" error after deleting collection 2017-02-21 00:38:00 -05:00
Dan Stillman
90603c33b4 Remove unused properties 2017-02-21 00:04:53 -05:00
Dan Stillman
64d73cf2d0 Fix handling of old-style 'condition'/'savedSearch' conditions
Strip library id prefix in addCondition() and _loadConditions(), so the
internal code can always expect just a key.
2017-02-21 00:04:53 -05:00
Dan Stillman
d32f23471e Fix setting of libraryID in createDataObject() support function
When another property was also set, setting libraryID would fail.
2017-02-21 00:04:53 -05:00
Dan Stillman
e465cf058e Allow opening multiple URLs via View Online 2017-02-20 18:49:35 -05:00
Dan Stillman
5c50bb00cf Don't save full-text cache files for linked files to linked directory
Regression from 80f888f374. Not entirely sure what I was trying to fix there.
2017-02-20 17:51:37 -05:00
Dan Stillman
bb0fa73899 Fix old-style 'collection' condition for My Library in saved searches 2017-02-18 14:19:30 -05:00
Dan Stillman
07ea9dae84 Merge pull request #1172 from adomasven/fix/clean-authors
Get a better last name if current guess starts with weird symbols
2017-02-18 12:52:45 -05:00
Adomas Venčkauskas
e8ac639273 Move the common code for word plugin installer to main repo
From https://github.com/zotero/zotero-word-for-mac-integration/blob/master/resource/installer_common.jsm

Removes some very old code to handle Gecko 2.1<
Does not affect existing plugins/installers in any way, but sets us up
to unifiy the installer once word plugins are updated.
2017-02-18 18:17:14 +01:00
Adomas Venčkauskas
bf1c52a5fd Get a better last name if current guess starts with weird symbols 2017-02-18 18:12:24 +01:00
Dan Stillman
058a4b1593 On 404 from ZFS upload, mark attachment item for upload
This shouldn't happen, but reported here:

https://forums.zotero.org/discussion/64386/5-0-beta-persistent-sync-errors

Possibly the same cause as this:

https://forums.zotero.org/discussion/64438/5-0-beta-persistent-sync-error
2017-02-16 20:11:05 -05:00
Dan Stillman
34c90fd156 If parent item is missing remotely, mark as unsynced and add to queue
This shouldn't happen, but there've been some reports of it.
2017-02-16 18:05:48 -05:00
Dan Stillman
cbed716424 Fix format of object data added back to upload queue after failure 2017-02-16 18:00:13 -05:00
Dan Stillman
ddb7d3107d Include 'skipNotifier' in 'skipAll' when saving objects 2017-02-16 17:58:52 -05:00
Dan Stillman
bb665a56b6 Fix firstCreator for unsaved items
Necessary when editing embedded citations that don't exist in library
2017-02-15 23:15:00 -05:00
Dan Stillman
3830aa1125 Mark trashed items as unsynced and update parents (including note list)
Regression from 3a0e0cb088
2017-02-15 14:22:34 -05:00
Dan Stillman
41538ebca6 Update locales from Transifex 2017-02-15 13:13:45 -05:00
Dan Stillman
469d689f37 Fix emptying from trash (broken in 7ede52355d)
Zotero.Items.eraseTx() doesn't exist -- use Zotero.Items.erase() instead
2017-02-10 14:11:10 -05:00
Dan Stillman
12735faa92 Retain style properties when pasting content from Word/Office 2017-02-09 23:40:15 -05:00
Dan Stillman
0570c2edc7 Fix test failure after 27cb099c82
Attachments are now saved before the connector server responds, because they're
no longer started out-of-band in saveItems(). This is necessary to prevent
transaction badness during imports, but it may not be what we want for the
connector, so we may want to revisit this after further testing.
2017-02-09 02:29:24 -05:00
Dan Stillman
3a0e0cb088 Drastically speed up moving items to the trash
E.g., moving 3,600 items to the trash now takes 4 seconds instead of 62

Instead of saving each item, update internal state and database directly
(which is more brittle but worth it). Also avoid unnecessary sorting
after removing an item from the items tree.
2017-02-08 23:42:55 -05:00
Dan Stillman
58edb3143e Update ProgressWindow constructor call after c00db272f 2017-02-08 21:23:36 -05:00
Dan Stillman
ed047f06df Don't select items added via import 2017-02-08 21:19:32 -05:00
Dan Stillman
a4572c9442 Make sure 'collections' passed to Translate is an array 2017-02-08 14:58:03 -05:00
Dan Stillman
27cb099c82 Allow asynchronous item saving in import translators
This allows for imported items to be saved individually instead of being
saved in a batch after processing the entire imported file (which for
large imports would hang the UI, even if the actual saving was
asynchronous). This also fixes the progress meter during asynchronous
saves.

To take advantage of this, import translators will need to return a
promise when available (using the native Promise object) from doImport()
and wait for optional promises from item.complete().

The logic here can probably be streamlined further. (E.g., we might be
able to say that item.complete() always returns a promise.) It's
complicated by the fact that, at the moment, Promise isn't available in
child sandboxes, though this can probably be fixed.

Tests forthcoming, but they require a translator that supports this,
which needs to be committed separately.

View with -w for a cleaner diff.
2017-02-08 14:56:44 -05:00
Dan Stillman
3e35764405 Allow altering text in a ProgressWindow line in OO mode
And fix progress meter display
2017-02-08 14:32:07 -05:00
Dan Stillman
12ad749087 Fix additional file sync error with no remote stored hash
Follow-up to c9694e93b0
2017-02-08 14:12:16 -05:00
Dan Stillman
1ea80c4352 Fix handling of some old-style URLs in zotero:// protocol handler 2017-02-08 00:20:52 -05:00
Dan Stillman
fe063faf00 Add text color buttons to notes, and move direction to context menu
And reduce button spacing slightly to accommodate

Closes #1151
2017-02-03 15:33:05 -05:00
Dan Stillman
55e9a0ee35 Update empty state of parent collection when deleting subcollection 2017-02-03 01:18:00 -05:00
Dan Stillman
a57ea28d42 Fix csledit
Closes #1149

(There's an additional change in #1149, but as far as I can tell it's
not necessary for csledit.xul.)
2017-02-03 00:53:43 -05:00
Dan Stillman
3a2fb2938d Remove temporary debugging buttons in prefs 2017-02-03 00:07:16 -05:00
Dan Stillman
1a49018bdc Fix moving items between collections
`mozSourceNode` seems to no longer be set in `dataTransfer` objects
during drags, so we now store it in `Zotero.DragDrop`.
2017-02-03 00:07:16 -05:00
Dan Stillman
76bc61e882 Don't unload object on save error if not new 2017-02-03 00:07:16 -05:00
Dan Stillman
79a07cad9e Return array copy in ItemFields.getItemTypeFields()/getTypeFieldsFromBase() 2017-02-03 00:07:16 -05:00
Dan Stillman
7ede52355d Require DB transaction in Zotero.Collection.prototype.removeItems()
For consistency with Zotero.Collection.prototype.addItems()
2017-02-03 00:07:16 -05:00
Dan Stillman
f98de97e4d Don't select last item in list when item is removed from collection 2017-02-03 00:07:16 -05:00
Adomas Venčkauskas
9ecfc31fd4 Fix translation error reporting in connectors
Closes zotero/zotero-connectors#101
2017-02-02 16:16:22 -03:00
Dan Stillman
0998c1d1da Update TinyMCE to 4.5.2 2017-02-02 02:01:06 -05:00
Dan Stillman
0b9b758029 Don't localize "OpenURL" 2017-02-02 02:01:06 -05:00
Dan Stillman
bd8debb2df Use entity_encoding: 'raw' in notes
This (and some other things) will help avoid changes in uploaded notes, which
cause loss of cursor position and other problems after local notes are updated
with the server version.

A side effect is that multiple spaces won't be converted to `&nbsp;`, so
anything consuming note content will have to use `white-space: pre`.

(Notes in reports appear to be substituting `&nbsp;` as necessary,
though I'm not sure where that's happening.)
2017-02-02 02:01:06 -05:00
Adomas Venčkauskas
ef0d9afe8e Address debug reporting in connector (zotero/zotero-connectors#97) 2017-01-31 19:46:20 -03:00
Adomas Venčkauskas
21a7a49a1b Fix broken date class (regression 38b0fb2) 2017-01-31 19:02:30 -03:00
Adomas Venčkauskas
38b0fb2650 Zotero.Promise.coroutine not supported in connector shared code (broken ef1ff8b) 2017-01-31 19:00:15 -03:00
Adomas Venčkauskas
c4d39ba79f Update translate error report with promisified info (broken c3dcaf9) 2017-01-31 18:23:19 -03:00
Dan Stillman
26eebcfc44 More report note fixes
Restore handling of plaintext notes from before 835003dd6d, and search
for a wider set of HTML indicators to avoid showing markup when no <p>
tags.
2017-01-31 13:56:45 -05:00
Dan Stillman
4871374673 Don't modify options object passed to DataObject.save() 2017-01-31 01:25:51 -05:00
Dan Stillman
835003dd6d Parse note content in reports as HTML instead of XML
And remove raw-markup fallback when not XML
2017-01-31 01:25:51 -05:00
Dan Stillman
ae47ae28bd Fix #1163, Unable to open zotero urls from tinymce 2017-01-30 14:01:04 -05:00
Dan Stillman
b073c3e680 Fix mangled output from Zotero.Utilities.getAsyncInputStream()
Proper fix (as opposed to 5236d01791) for
https://forums.zotero.org/discussion/64022/5-0-beta-generate-report-is-often-garbled
2017-01-30 13:33:23 -05:00