Commit graph

5880 commits

Author SHA1 Message Date
Dan Stillman
0b9b758029 Don't localize "OpenURL" 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
Dan Stillman
10111dbd98 Ensure modified item stays visible
There seems to be a bug here where, if the item is off-screen when
modified, it doesn't become visible, but it now does stay visible when
it's on-screen to begin with.
2017-01-29 09:18:16 -05:00
Dan Stillman
48a81e3b46 Fix 412 after choosing local file on file conflict 2017-01-29 07:50:46 -05:00
Dan Stillman
c00db272fa Add option to Zotero.ProgressWindow to not close on click
ProgressWindow now takes an options object instead of a window (which is now an
available option, along with 'closeOnClick')
2017-01-27 21:05:41 -05:00
Dan Stillman
4d56191f0c Fix importing of files using relative paths 2017-01-27 20:51:12 -05:00
Dan Stillman
22d460312c Make ZFS file syncing always enabled for publications library for now
At least until we have a better interface for setting library-specific
sync settings

Previously, if My Library file syncing was disabled or set to WebDAV, My
Publications files wouldn't be uploaded.
2017-01-27 14:14:33 -05:00
Dan Stillman
27974791b0 Fix error in recursiveCollections mode with huge number of subcollections 2017-01-27 12:00:28 -05:00
Dan Stillman
31ed9bd70b Fix misplaced line in e23452363b 2017-01-26 18:30:18 -05:00
Dan Stillman
aec9b2a531 Automatically use remote version when two items in trash are in conflict 2017-01-26 18:07:01 -05:00
Dan Stillman
e23452363b Handle auto-hyphenated ISBN during item conflict
Always keep the hyphenated version, and don't consider it a visible conflict
2017-01-26 15:08:34 -05:00
Dan Stillman
3a1bec1ab3 Fix "Show in Library" in item context menu 2017-01-26 02:57:14 -05:00
Dan Stillman
3415aae908 Fix error generating reports
9b247ebba7 follow-up
2017-01-24 15:42:28 -05:00
Dan Stillman
50b7dd39a0 Don't show incorrect instructions for adding Locate engines
Not currently possible in 5.0

https://github.com/zotero/zotero-connectors/issues/92
2017-01-24 03:54:30 -05:00
Dan Stillman
cfa15a3e3c Rename "Full Sync" to "Reset Data Sync History", and don't start sync
This allows generating debug output for full sync of a single library.

Also clarify some dialog text
2017-01-24 03:38:21 -05:00
Dan Stillman
c3ba7340c6 Update submodules 2017-01-24 02:51:18 -05:00
Dan Stillman
edb08e179c Fix item key search (broken by a01f2765e4) 2017-01-23 08:46:42 -05:00
Dan Stillman
a01f2765e4 Fix quick search and quick format bar (broken in 9b247ebba7)
As evidenced by majorly failing tests
2017-01-23 08:40:18 -05:00
Dan Stillman
249f9c6495 Temporary prefs buttons to debug slow DB issue 2017-01-23 07:20:36 -05:00
Dan Stillman
41413b1ab2 Fix push sync for group libraries 2017-01-23 07:01:41 -05:00
Dan Stillman
cddc84ffe3 Make sure translator file ends with newline when saving
Fixes https://github.com/zotero/scaffold/issues/37
2017-01-23 05:57:18 -05:00
Dan Stillman
c9694e93b0 Fix file upload error when remote attachment has no stored hash 2017-01-22 15:30:18 -05:00
Dan Stillman
b3c28dc79e Fix item keys in report ids 2017-01-21 06:36:28 -05:00
Dan Stillman
9b247ebba7 Fix error trying to generate report for many items
When adding many search conditions (e.g., when matching many items with the
`key` condition), the query can fail due to either the bound parameter limit or
the expression tree size limit.

To avoid this, add support for an 'inlineFilter' property on search conditions
when using the 'is' or 'isNot' operator. 'inlineFilter' is a function that
returns a quoted value suitable for direct embedding in the SQL statement, or
false if not valid. Multiple consecutive conditions for the same 'inlineFilter'
field are combined into an `IN (x, y, z)` condition.
2017-01-21 03:38:36 -05:00
Dan Stillman
cc516005c0 "Import"/"Import from Clipboard" shortcut key changes
- Add Cmd/Ctrl-Shift-I for "Import…"
- Cmd/Ctrl-Shift-V apparently pastes without formatting, so don't override it.
  Instead, add a shortcut key to the menu option, defaulting to
  Cmd-Option-Shift-I/Ctrl-Alt-Shift-I
- The I in both is now localizable
2017-01-19 15:28:27 -05:00
Dan Stillman
362e18c747 Fix attachment content search
And always convert ids from GROUP_CONCAT() to integers in search code.
2017-01-19 13:32:29 -05:00
Dan Stillman
c95e42240f Fix #1157, Note content lost when typing during sync
Someday, I will say this is fixed and it actually will be fixed.
2017-01-19 12:27:18 -05:00
Dan Stillman
e0d92ecd94 Update submodules 2017-01-19 05:48:46 -05:00
Dan Stillman
318f6656f4 Skip a case of item selection during syncing 2017-01-19 03:47:56 -05:00
Dan Stillman
57b44287f8 Don't allow deleting libraries other than feeds with Cmd/Ctrl-Delete 2017-01-17 21:48:56 -05:00
Dan Stillman
b62139ed0a Fix a couple issues with bundled file timestamps 2017-01-17 21:48:56 -05:00
Dan Stillman
2237c71dcb Fix test for invalid id passed to DataObjects.getAsync() 2017-01-17 04:18:39 -05:00
Dan Stillman
33deefbf74 Limit depth to 1 when outputting data objects
This prevents descending into the global object cache that's accessible
from every data object.
2017-01-17 02:58:47 -05:00
Dan Stillman
1cf2585b41 Add Zotero.isClient
To replace Zotero.isStandalone
2017-01-17 02:58:22 -05:00
Dan Stillman
786f5efa30 Add maxDepth as the third argument to Zotero.debug()
varDump(), which is used by Zotero.debug(), defaults to 5
2017-01-17 02:31:10 -05:00
Dan Stillman
a017fe6666 Fix Zotero.Date methods within translator sandbox
Only a few methods are imported, so some of the changes in 7bdcc17ed
have to be reverted.
2017-01-17 02:23:15 -05:00
Dan Stillman
b00d1366b0 Fix more info link in update prompt 2017-01-17 01:35:03 -05:00
Dan Stillman
aa783878de Fix error refreshing document with item replaced by merge 2017-01-15 16:47:01 -05:00
Dan Stillman
e5ba7612bc About pane updates
- Make version copyable
- Include "What's new" link to changelog
- Update some links and descriptions

To-do:

- Replace dev credits with a nice statement like in the Firefox About pane
2017-01-15 15:29:02 -05:00
Dan Stillman
23f84d796f Fix CSL Preview pane
CSL Editor is being fixed in #1149
2017-01-15 02:46:03 -05:00
Dan Stillman
008bcff8a0 Fix debug output logging (broken by f44264cd4) 2017-01-14 18:39:04 -05:00
Dan Stillman
3d569f1173 Compatibility fixes for Bluebird >=3.4.2
Before 3.4.2, `yield` in a Bluebird `coroutine()` released Zalgo if an
already-resolved promise (e.g., from `Promise.resolve()`) was yielded,
continuing immediately instead of on the next turn of the event loop. We
apparently relied on that broken behavior in a few places, particularly from
`Zotero.DB.waitForTransaction()`. All the transaction-queueing stuff probably
needs to be reevaluated in general, but for now, mirror the previous possibly
ill-advised behavior by checking explicitly for a transaction before yielding
on `waitForTransaction()` (as well as the result of a 'load' event from
`libraryTreeView`).
2017-01-14 18:01:51 -05:00
Dan Stillman
7e30afb2a5 Use coroutine() for Zotero.Schema::_updateSchema() 2017-01-14 17:20:48 -05:00
Dan Stillman
56d9372146 Throw clearer error if invalid type is passed to File.getContentsAsync() 2017-01-14 17:20:48 -05:00
Dan Stillman
f2440eb826 Fix passing file: URI to Zotero.File.getContentsAsync() 2017-01-14 17:20:39 -05:00
Dan Stillman
f44264cd4d Add HTML-based console viewer for easier real-time debug output
Since 1) debug output logging via the prefs isn't necessarily possible
for startup errors in Standalone, 2) real-time output is prohibitively
slow and has a miniscule scrollback buffer on Windows unless you use a
Cygwin or Git terminal, and 3) copying/pasting/emailing was annoying
anyway, make -ZoteroDebug open a popup window that shows errors and
debug output and allows submitting straight to the server with a Debug
ID.

This should replace the existing debug output viewer as well, but that's
less of a priority.

-ZoteroDebugText or the debug.log pref can still be used to dump to the
terminal.
2017-01-14 17:20:12 -05:00
Dan Stillman
12de04607b Don't connect to streaming server until UI is ready 2017-01-13 02:47:47 -05:00
Dan Stillman
bc034089a6 Fix startup error loading Zotero service
https://forums.zotero.org/discussion/63869/5-0-beta-standalone-blank-ui-upon-restart
https://forums.zotero.org/discussion/63865/5-0-beta-library-wont-load

Adding include.js to hiddenWindow.xul in 66549f9e6d seems to have
created a race condition in which the Zotero service would fail on the
third startup after the JS cache was cleared (e.g., on a new version,
-purgecaches, or other changes in the profile). So, don't do that.

Hopefully this isn't caused by other uses (e.g., in plugins) of
include.js and was only happening because the hidden window is launched
concurrently with standalone.xul on macOS.
2017-01-13 02:47:42 -05:00
Dan Stillman
2011a61223 Don't focus note editor when pressing Shift-Tab on note in middle pane
Reverts redundant code from 7e39e4608 (#1136) and fixes the much earlier
9d7cc849 (#151)
2017-01-12 02:41:21 -05:00
Dan Stillman
740795f249 Expand draggable area of splitters on macOS while preserving 1px width
(Borrowing a technique from Thunderbird.)

This only affects the splitters in standard view. The splitter between the top
and bottom panes in stacked view still has a 1px draggable area.

We can probably do a similar thing to slim down splitters on Windows, as
planned in #367.
2017-01-12 02:22:33 -05:00
Dan Stillman
66549f9e6d Fix opening preferences (broken in cbcfb6b92) 2017-01-11 06:24:17 -05:00
Dan Stillman
cf2318ec5a Move feeds below groups 2017-01-10 23:53:04 -05:00
Dan Stillman
cbcfb6b92e Fix missing Options menu on Windows/Linux 2017-01-10 21:44:03 -05:00
Dan Stillman
c631bc4257 Default to creatorType: "author" if missing
Apparently in 4.0 we defaulted to 'author' if a creatorType wasn't
passed. To avoid lots of errors like the one fixed in
dd0094893a,
add a similar fallback for 5.0 and log a warning (though not with the
translator name, unfortunately).
2017-01-10 18:04:54 -05:00
Dan Stillman
ef1ff8bc42 Fix #64, Non-English month parsing doesn't work in Standalone
Month values from the Firefox language packs are included in a
JSON file used by `Zotero.Date.getMonths()`. `getMonths(true)` includes
English months as well.

The JSON file should be bundled with the connectors as well, and
Zotero.Date.init() should be updated to populate the month data from
that.
2017-01-09 04:47:23 -05:00
Dan Stillman
7bdcc17ed0 Convert some private Zotero.Date methods to privileged 2017-01-09 04:20:10 -05:00
Dan Stillman
5dbe677f25 Fix localization of Edit menu 2017-01-09 03:08:37 -05:00
Adomas Venčkauskas
74d358bd19 Remove tmp-* directories when attachment download fails. Closes #1128 2017-01-09 00:10:55 -05:00
Dan Stillman
43dad62150 Only set browser.dom.window.dump.enabled in client 2017-01-07 17:42:19 -05:00
Tom Najdek
abd3054308 Fix non-standard syntax 2017-01-07 13:51:45 -05:00
Dan Stillman
1b3dfe1aea Update submodules 2017-01-06 03:44:40 -05:00
Adomas Venčkauskas
2682d01016 Remove use of deprecated Date.toLocaleFormat 2017-01-06 09:58:30 +02:00
fbennett
4d8d4bcdbc Preserve formatting on Hide/Show editor 2017-01-04 23:39:35 -05:00
fbennett
2538e258b6 Accept variations in spacing, and single-quoted XML serialization 2017-01-04 23:39:35 -05:00
fbennett
2a2e5e4e39 Preserve format tags and entities in bibliography editor
- Fixes errors in previous commits 55bfe54a and 9431e0de, to wit ...
- Apply unescapeHTML after RTF tag and entity conversions
- Remove high-bit character escape from entity converter,
  and apply separately after remaining HTML entities are
  decoded by unescapeHTML
2017-01-04 23:39:35 -05:00
Dan Stillman
53d2aa43d6 Allow showing the Tools -> Error Console menu option via a pref
If devtools.errorconsole.enabled is true, the option will be shown.
2017-01-04 19:14:07 -05:00
Dan Stillman
56b6a0d021 Set browser.dom.window.dump.enabled to true if debug output enabled
dump() works regardless within XPCOM (which is how Zotero.debug()
works), but not on window objects without this pref
2017-01-04 17:28:46 -05:00
Dan Stillman
612066d749 Allow setting global prefs from Zotero.Prefs.set()
Pass true as third argument
2017-01-04 17:28:18 -05:00
Dan Stillman
42a72fe8aa Don't leave document corrupted if error in doc prefs window
And recover by showing the doc prefs window if it is corrupted (at least
with an empty fieldType, which is what was happening previously)
2017-01-04 01:46:00 -05:00
Dan Stillman
4ff5323acd Increase DB timeout to 30 seconds
Though it would be real nice to avoid situations where this might be necessary
2017-01-03 15:50:33 -05:00
Adomas Venčkauskas
1756b8d242 Make itemPane white on linux 2017-01-03 13:48:28 -05:00
Adomas Venčkauskas
ac959dd6b5 Fix black tab borders on Standalone (regression 53d1bca36)
It appears we do not have ThreeDHighlight in Standalone.
Relevant bug https://bugzilla.mozilla.org/show_bug.cgi?id=1261068
2017-01-03 19:13:40 +02:00
Adomas Venčkauskas
53d1bca36f Fixes a few UI styling issues for Ubuntu 16.10 (GTK 3.20)
- Tabs missing styling
- Preferences: Notes font menulist dropmarker missing (left border still
  missing, could not find any CSS to help that out)
- Preferences: Numberbox background gray

For the tabs styling issue see
https://bugzilla.mozilla.org/show_bug.cgi?id=1306425
2017-01-03 17:54:16 +02:00
Dan Stillman
6096d1ea62 Fix hang on sync restart 2017-01-03 04:40:18 -05:00
Dan Stillman
5d67656ea8 Use Zotero.DBConnection instance everywhere instead of Zotero.DB
Fixes #1141
2017-01-03 04:21:11 -05:00
Dan Stillman
5523dd5c37 Fix pressing "-" and "+" buttons in Styles pane from keyboard 2016-12-30 01:22:58 -05:00
Dan Stillman
0757109c16 Allow direct install from styles page in viewer
When "Get Additional Styles…" is clicked, open a stripped-down version
of the Zotero styles page in a window. When a style is clicked on,
install it and close the window.

I'm going to say that this closes #767, but as Aurimas notes there, if
you know the style you're looking for, being able to just type the name
in a dialog would be faster, so further improvements could be made. But
as it stands, this is much better than clicking through to a browser
(and hoping that it's one with the new connector with style installation
support).
2016-12-30 01:11:06 -05:00
Dan Stillman
c21d6c9700 Allow Cmd-R/Ctrl-R to reload page in basic viewer 2016-12-30 00:58:28 -05:00
Dan Stillman
fb7f9698d3 Move ZoteroStandalone.openInViewer() to Zotero.openInViewer() 2016-12-30 00:56:28 -05:00
Dan Stillman
a076edc836 Update some deprecated function calls 2016-12-29 21:50:33 -05:00
Dan Stillman
2beb2c514c Push-based sync triggering
Immediate sync triggering on remote library change using WebSocket API.
Currently kicks off a normal sync process for the modified library --
actual object data isn't pushed.

(This might not stay enabled for 5.0 Final.)
2016-12-29 21:50:32 -05:00
Dan Stillman
7fd3a8c5d1 Fix New Item MRU list, which apparently has only ever updated on startup 2016-12-29 07:04:12 -05:00
Dan Stillman
8a9986da47 Reduce initial visible creators to 5-7 (from 10-15) 2016-12-29 04:01:00 -05:00
Dan Stillman
9ffab20a09 Add option to Zotero.Utilities.ellipsize() to truncate at word boundary 2016-12-29 04:01:00 -05:00
Dan Stillman
516fedc2fe Fix right alignment of search bar 2016-12-29 04:01:00 -05:00
Dan Stillman
c0f40fac81 Item pane tweaks
- Remove colons after labels
- Non-bold labels
- More padding at top of pane
- Increase space between label and field
2016-12-29 04:01:00 -05:00
Dan Stillman
82292eef77 Hide Actions menu in Standalone
Leave it in place in Firefox for now for development
2016-12-29 04:01:00 -05:00
Dan Stillman
e282a5643f Fix dragging external files onto library root 2016-12-29 04:01:00 -05:00
Adomas Venčkauskas
b01487dccc Make Zotero.Translator shareable with connector 2016-12-28 17:25:38 +02:00
Dan Stillman
4a765aacfa Fix selecting item and scrolling into view when editing a citation 2016-12-26 18:50:08 -05:00
Dan Stillman
5100cd31ed Add collectionTreeView::selectItem()
This moves most selection logic from ZoteroPane.selectItem() into
collectionTreeView::selectItem() so that it can be used in the
edit-citation dialog.

Unlike itemTreeView::selectItem(), which only selects within a given
items tree, this function automatically switches to a library root if
necessary. ZoteroPane.selectItem() remains and does a little bit extra
(unminimizing Zotero, focusing the items pane) in addition to calling
collectionTreeView::selectItem().
2016-12-26 18:44:39 -05:00
Dan Stillman
437c55b286 Object.values() polyfill for <Fx47 after 269e2f8b
Zotero for Windows is still built with Fx45, so we need a polyfill for
Object.values().
2016-12-26 15:26:21 -05:00