Commit graph

5605 commits

Author SHA1 Message Date
Dan Stillman
06ad369368 Create database when new data dir location is set in pref
Regression from new data directory handling
2016-11-16 00:38:58 -05:00
Dan Stillman
d88cfc6c5f Make Zotero.Styles/Translators.init() wait until bundled files are updated
Fixes #1123, Quick Copy error in console with new data directory
2016-11-15 03:38:27 -05:00
Dan Stillman
c6a2057340 Fixes to hasAttachments column
- Fix #1121, sorting of hasAttachments column -- doesn't work if
  hasAttachments is the active sort column on startup, since file states
  have to be cached, but works for subsequent clicks on the column
- Don't sort linked URL attachments as missing
- Use hiDPI icon in all cases
2016-11-14 03:08:41 -05:00
Dan Stillman
d70ebce108 Show Styles tab before Word Processors in Cite preferences 2016-11-14 02:23:52 -05:00
Dan Stillman
62177e208d Check DB lock before checking for restore-from-server marker 2016-11-13 04:55:51 -05:00
Dan Stillman
ce6a0ecb01 Tell connector to reinit after moving data directory 2016-11-13 04:55:51 -05:00
Dan Stillman
cfc7f36829 Don't send lockReleased on Standalone restart
This prevents Zotero for Firefox from starting up and shutting down when
Standalone is just restarting.
2016-11-13 04:55:51 -05:00
Dan Stillman
79700969e1 Data directory migration
This adds a new button to the Advanced prefs to migrate the data directory to
$HOME/Zotero. The button only appears if the data directory is set to the
default location within a profile directory (including the other program from
the one running, even though that's technically stored as a custom data
directory).

On Mac/Linux, directories within the data directory are moved with /bin/mv.  On
Windows, or if that fails, they're copied recursively using OS.File.move()
(which annoyingly doesn't reliably support directory moving). The former should
be instantaneous on most systems (unless the data directory or 'storage' were
on a different filesystem from $HOME).

If the database fails to transfer, migration fails and the data directory
setting remains on the old directory. If the database transfers but other files
fail, the data directory setting is updated. In both cases, the user is
encouraged to migrate remaining files manually with a button that reveals the
directories and quits the program.

This isn't yet tested on Linux or Windows, and migration isn't yet suggested
automatically.

Adds Zotero.File.reveal(), Zotero.File.directoryIsEmpty(), and
Zotero.File.moveDirectory().
2016-11-13 04:55:51 -05:00
Dan Stillman
cfe76a6f83 Add Zotero.test, which is true during tests
(Zotero.automatedTest is only true in Travis)
2016-11-13 04:54:57 -05:00
Dan Stillman
4082ff9e8c Simplify assignment of init options 2016-11-13 04:52:58 -05:00
Dan Stillman
0f19e5c89b Use coroutine() on Zotero.init() 2016-11-12 16:55:55 -05:00
Dan Stillman
b22850efed Update data dir prefs for new default location
- Show "Default (<path>)" for default option unless set to profile directory
- Don't try to restart on selection if location hasn't changed
2016-11-12 16:44:34 -05:00
Dan Stillman
a5b222edac Convert dataDir pref to string path and remove lastDataDir
.persistentDescriptor now appears to return (and parse) a string path anyway on
macOS, which is the only place where it didn't use a string path to begin with,
so this will only affect earlier users.
2016-11-12 16:44:34 -05:00
Dan Stillman
f2163b3433 New data directory handling
- Use $HOME/Zotero if zotero.sqlite exists, and set it as a custom data
  directory so that 4.0 uses it if loaded (resulting in a
  newer-db-version error instead of an empty database)
- Don't prompt whether to use data directory from the other version's
  profile directory (i.e., Firefox or Standalone) -- just do it
2016-11-12 16:44:34 -05:00
Dan Stillman
f00a50bf5a Better handling of startup errors
- Show toolbar icon on startup error (fixes #742)
- Don't show DB upgrade error message for other startup errors
- Fix some cases of a startup error not being logged/presented
- Show actual error in error dialog for more errors
2016-11-10 02:20:13 -05:00
Dan Stillman
2ad537e4c6 Fix console error trying to add toolbar icon more than once
This was appearing a lot in tests.
2016-11-10 02:20:13 -05:00
Adomas Venčkauskas
091c5c279c Pass the import url over to the standalone on /connector/saveItems.
Should address some issues related to translating via a proxy like this one
https://forums.zotero.org/discussion/63057/zotero-not-downloading-pdfs

Addresses zotero/zotero-connectors#3
2016-11-09 11:57:11 +02:00
Dan Stillman
1ae71c3830 Merge branch '4.0' 2016-11-03 17:40:58 -04:00
Dan Stillman
fabf801fdb Fix some locate engines (e.g., Google Scholar) 2016-11-03 17:35:21 -04:00
Dan Stillman
6e21bb4b57 Update citeproc-js to 1.1.139 2016-11-03 10:11:54 -04:00
Adomas Venčkauskas
7179712909 Change padding-left to margin-left property for hanging indent
Intended to fix at least Google Docs. Even the newest versions of MS Office
appear to ignore both padding and margin properties
2016-11-03 13:54:42 +02:00
Dan Stillman
2c014a9af1 Debugging for https://forums.zotero.org/discussion/62942/ 2016-10-31 02:29:53 -04:00
Dan Stillman
da7da74986 Update some deprecated function calls 2016-10-26 02:27:31 -04:00
Dan Stillman
ff9e822bd3 Fix errors filtering filenames of synced file downloads 2016-10-26 02:15:56 -04:00
Dan Stillman
a2b7f086d7 Restore diagnostic info in error reports (broken by 59f534d56) 2016-10-25 03:15:32 -04:00
Dan Stillman
fb15c9a37c Allow file drag to web targets (e.g., Gmail) and Linux filesystem
Closes #67
Closes #465
2016-10-25 03:02:07 -04:00
Dan Stillman
341d3d69b3 Fix export failure on missing file attachments
This relies on synchronous file access, but making it async would require
rewriting all export translators that save files.
2016-10-25 02:36:13 -04:00
Adomas Venčkauskas
44e48700ef Fix connector debug script syntax errors from 24709a9c 2016-10-24 12:40:28 +03:00
Adomas Venčkauskas
24709a9c4b Remove coroutines from connector-shared code 2016-10-24 11:45:35 +03:00
Adomas Venčkauskas
96e3c2e81c Remove object with quoted properties syntax in server_connector.js 2016-10-24 10:59:41 +03:00
Adomas Venčkauskas
0d205e8377 Connector server endpoint for reverse dns 2016-10-24 10:56:14 +03:00
Dan Stillman
a3f5ead987 Fix file renaming and same-dir relinking (broken by 79baac3158) 2016-10-22 15:24:05 -04:00
Dan Stillman
f0bc0274f1 Fix renaming and deleting tags in tag selector 2016-10-22 15:11:12 -04:00
Dan Stillman
79baac3158 Fix relinking of imported attachment with external file 2016-10-22 15:11:12 -04:00
Dan Stillman
0016c5ecf8 Fix editing of saved search in a group 2016-10-20 22:55:42 -04:00
Dan Stillman
8a915beaaa Fix bug in relations upgrade fix 2016-10-20 22:48:20 -04:00
Dan Stillman
fb6cf4f9a9 Fix upgrade error on duplicate creatorData rows 2016-10-20 20:07:21 -04:00
Dan Stillman
0ce45103bb Fix style installation from file 2016-10-20 15:41:08 -04:00
Dan Stillman
ba1285fdef Fix upgrade error if no related items 2016-10-16 12:13:59 -04:00
Adomas Venčkauskas
40abd18895 Add a zoteroPane progress window and use for feed translation 2016-10-16 00:26:07 +03:00
Dan Stillman
0eacbc939b Fix tag selector context menu 2016-10-15 16:12:42 -04:00
Dan Stillman
63ab9da467 Fix incorrect related items upgrade
https://forums.zotero.org/discussion/62779/zotero-5-0-relations-made-in-4-0-disappeared
2016-10-15 16:04:08 -04:00
Adomas Venčkauskas
0d2794531a Better progress window handling for feed item scraping 2016-10-14 15:46:23 +03:00
Adomas Venčkauskas
32ea7cfbb5 Fix tag selector errors due to unloaded feed synced settings 2016-10-14 12:10:15 +03:00
Adomas Venčkauskas
897b3993b4 Fix feed item translation in standalone
Broken due to non-existing progress window in standalone Zotero_Browser
2016-10-14 11:13:00 +03:00
Dan Stillman
b2d580f3c9 Fix Host check regexp from 10ad4c337
(And don't allow 127.0.0.1.evil.com)
2016-10-13 01:20:15 -04:00
Dan Stillman
10ad4c3379 Check Host header in connector server to prevent DNS rebinding attack
https://twitter.com/FredericJacobs/status/786314822526742528

(The worst an attack could do at the moment is save items to the library, but
the connector server will likely do more in future.)
2016-10-13 00:58:00 -04:00
Dan Stillman
51a3687123 Merge branch '4.0' 2016-10-12 19:29:32 -04:00
Dan Stillman
775d39f93a Update citeproc-js to 1.1.138 2016-10-12 13:22:15 -04:00
Dan Stillman
bc47b6b171 Reset Collection search condition menu on library change
Reported here:
https://github.com/zotero/zotero/issues/145#issuecomment-252678872
2016-10-11 23:55:17 -04:00