Commit graph

5837 commits

Author SHA1 Message Date
Dan Stillman
7fc352b9b7 Fix "Add Item by Identifier" (broken by 78b1d2ee3)
And make lookup tests run when not on Travis, though we should still mock the
HTTP requests.
2016-12-13 05:23:21 -05:00
Dan Stillman
69430d74b2 Maybe fix race condition when updating translators manually at startup
If you got the timing just right, you could wipe out all your
translators (though standard ones would be reinstalled on restart).
Hopefully that's fixed?
2016-12-13 02:15:53 -05:00
Adomas Ven
747c11c917 Improves proxy support (#1129)
Improves proxy support

- Automatically detect and dehyphenise https proxies which use EZProxy
  HttpsHyphens
- Web translators now pass around Zotero.Proxy instances which can
  proxify/deproxify urls passed to `translate.setLocation()` before calling
  `translate.getTranslators()`/ translate.detect()`. The proxy passing is
  done within connector background/injected processes and between
  standalone and connectors.
- Proxy protocol unified with connectors. Connectors can now pass
  proxies to `/connector/save_items`. The proxies will be used to resolve
  true item and attachment urls when saving.

Closes zotero/zotero#578, zotero/zotero#721

Relevant zotero/zotero#34, zotero/zotero#556
2016-12-12 14:29:59 +02:00
Dan Stillman
c2ebcc9dbc Fix failures on Travis due to broken isDir 2016-12-12 06:57:42 -05:00
Dan Stillman
80f888f374 Fix replacement of existing item storage directories
- Make Zotero.Attachments.createDirectoryForItem() delete existing
  directory instead of moving it to orphaned-files; also now returns a
  string path instead of an nsIFile
- Use above function during file sync instead of
  _deleteExistingAttachmentFiles(), which was partly broken
- Fix throwing on errors when saving some attachment types
2016-12-12 04:06:01 -05:00
Dan Stillman
60ed6d447e Show "Loading…" in Quick Copy drop-down before list is loaded
Styles and translators have to be loaded before the list is displayed,
so there can be a delay if the prefs are opened right at startup.
2016-12-12 02:05:17 -05:00
Dan Stillman
425838e2ec Fix potential translator initialization problem after 04516af552 2016-12-12 02:04:18 -05:00
Dan Stillman
2ead95b39a Don't include child items in imported-item count 2016-12-11 03:00:10 -05:00
Dan Stillman
4d77977a29 Select items after importing from clipboard
And wait for async switch to My Library if in a non-editable view
2016-12-11 02:30:34 -05:00
Dan Stillman
bb246e5514 Scroll first selected row into view in itemTreeView::selectItems()
Separate out the enhanced ensureRowIsVisible() logic from selectItem()
and call it from selectItems() as well on the first item in the set.
2016-12-11 02:30:34 -05:00
Dan Stillman
142694ca0f Fix opacity of lines in progress popup when using addLines()
Lines default to 50%, but addLines() doesn't provide a mechanism for
updating the opacity, so all the callers that used addLines() showed as
gray. Instead, just default to 100% when using addLines().
2016-12-11 02:30:34 -05:00
Dan Stillman
78b1d2ee35 Import translation improvements
- Don't block the UI with a progress meter during imports. Instead, show
  a popup in the bottom right when the import is done that shows how
  many items were saved.
- Fix hang when importing some files
- Fix various problems with asynchronous operations/transactions
    - Use the save queue for imports instead of creating concurrent
      transactions that can time out
    - Wait for the save to finish before returning from the translate()
      promise. All save modes now use the save queue, so code that
      handled the non-save-queue process can probably be removed.
    - Serialize child attachments instead of running them concurrently.
      This might make multi-attachment saves a little slower, since they
      can't download at the same time, but it avoids problems with
      concurrent transactions. We might be able to improve this to allow
      concurrent downloads, or allow concurrent saves for a limited
      number of items (e.g., from web saving) if not for larger imports.
- Change collection handling during import, since UI is now active
  - Select the root collection at the beginning of the import
  - Assign items and collections to the root during the import instead
    of at the end
  - Don't select other collections
- Change a few ItemSaver functions to use promises and remove
  unnecessary callbacks. (This includes some connector code that needs
  to be tested.)
- Change some `parentID` variables in ItemSaver to `parentItemID` for
  clarity, since collections are now handled in more places

To-do:

- Save items in smaller batches instead of doing all in the same
  transaction
- Show progress meter in a bottom-right popup during the import
2016-12-11 02:30:34 -05:00
Dan Stillman
c61a9dc5f3 Localized plural form support for Zotero.getString()
Zotero.getString() now takes a third parameter, `num` (which should also
appear in `params`) to use when determining which plural form of the
string to use. Localized strings should include all forms in the order
specified in [1], separated by semicolons.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals
2016-12-11 02:30:34 -05:00
Dan Stillman
9836f33d41 Add .collections support to Zotero.Attachments.linkFromURL() 2016-12-09 06:30:39 -05:00
Dan Stillman
0e72ee3305 Sort translators in import filepicker drop-down 2016-12-09 06:30:38 -05:00
Dan Stillman
04516af552 Stop using Zotero.lazy() for Zotero.Translators.init()
It makes things too complicated with some of the logic necessary for bundled
file updating.
2016-12-09 06:30:38 -05:00
Dan Stillman
98720462fe Fix multi-tag insert mode 2016-12-08 06:57:05 -05:00
Adomas Venčkauskas
eaa758870e Octal literals invalid in strict mode, replacing with hexadecimal
Relevant in connectors
2016-12-08 13:28:33 +02:00
Dan Stillman
fbd21bae16 Don't update feeds after syncs during tests
This reverts commit 60befe52e4 and adds a
better fix that leaves the notifier event in place. Feeds just don't
need to update after syncs during tests.
2016-12-08 05:58:46 -05:00
Dan Stillman
2b9ef26c61 Fix renaming linked attachment files 2016-12-08 03:57:49 -05:00
Dan Stillman
021f8e1476 Bypass cache when requesting .prop file from WebDAV
This might not be necessary, but it's an attempt to troubleshoot
https://forums.zotero.org/discussion/63439/attachments-not-syncing,
which might be a caching issue.
2016-12-06 08:40:19 -05:00
Dan Stillman
73e1fd07b0 Fix error exporting standalone notes 2016-12-06 08:17:45 -05:00
Dan Stillman
99cd11e793 Exclude feeds from Quick Format searches
Addresses #1126
2016-12-06 07:14:16 -05:00
Dan Stillman
5866a76312 Fix reading settings from other-app profile 2016-12-06 05:20:55 -05:00
Dan Stillman
c08354eced Don't show migration message in a popup in Standalone
Apparently this was happening sometimes, though I'm not sure how.
2016-12-06 05:10:48 -05:00
Dan Stillman
88096ac76a Fix context menu auto-selection bug
A context-menu entry was being selected automatically when the click
target was near the bottom of the screen.
2016-12-05 21:34:36 -05:00
Dan Stillman
c54af7a5ae Remove redundant _addToolbarIcon() calls at startup 2016-12-05 05:17:03 -05:00
Dan Stillman
d19732ba5f Fix item-not-loaded error resetting data in unloaded library 2016-12-05 05:05:09 -05:00
Dan Stillman
302efb0854 Fix User-Agent header handling for endpoints updated in b5bc18c7ed 2016-12-05 03:05:11 -05:00
Dan Stillman
b5bc18c7ed Add new init(options) signature for server endpoints
An endpoint can now take a single object containing 'method', 'pathname',
'query', 'headers', and 'data' and return an integer, an array containing
[statusCode, contentType, body], or a promise for either. This allows the
handlers to use the HTTP method and headers and removes the need for callbacks
when some handlers already use coroutine().

If init() returns a promise, it now has to use the new single-parameter
signature (because the check is done with Function.length, and combining
promises and callbacks doesn't make sense anyway).
2016-12-05 02:55:32 -05:00
Dan Stillman
57603427e3 Fix clicking Choose to select custom data dir when already set 2016-12-04 14:18:43 -05:00
Dan Stillman
ee798dde16 Fix Firefox connector breakage after 69ab4b0b1
This also makes a few changes to `callMethod`:

- Removes the deprecation warning when a string is passed and removes the
  `httpMethod` `options` property. Any call that passes a string and includes
  `data` can just remain as a POST. If `data` is null or undefined, a `GET`
  will be sent. (If we find ourselves needing other methods, we can reevaluate.)
- Renames `httpHeaders` to `headers` for consistency with other code (and in the
  absence of `httpMethod`)
2016-12-03 05:01:10 -05:00
Dan Stillman
44e06eec08 Update deprecated URL to Console.jsm 2016-12-02 17:32:17 -05:00
Dan Stillman
cbcf9cb3de Color long time intervals red in debug output to terminal
Defaults to 250 ms. The threshold can be changed with
extensions.zotero.debug.slowTime. Set to 0 to disable.
2016-12-02 17:28:39 -05:00
Dan Stillman
f55c2f51ee Remove extensions.zotero.debug.time and always show interval in output 2016-12-02 17:28:39 -05:00
Dan Stillman
f3fd7e7a10 Don't load bundled files in Standalone until UI is ready 2016-12-02 17:28:39 -05:00
Dan Stillman
8c48b2f806 Additional debugging for https://forums.zotero.org/discussion/63363/ 2016-12-01 16:01:35 -05:00
Dan Stillman
6900a5ccf8 Removed unnecessary localized string for style installation error
Would only be used for an external request that didn't pass along a
filename or origin, so "null" (or whatever it shows up as) is fine
2016-11-30 21:23:09 -05:00
Dan Stillman
1472781ce4 Debugging for https://forums.zotero.org/discussion/63363/ 2016-11-30 21:18:31 -05:00
Adomas Venčkauskas
45c944e731 Fix server_connector tests broken in 69ab4b0b
Don't display error prompt in standalone when style install fails.
Fixes an import bug when import input is invalid.
2016-11-30 14:58:43 +02:00
Dan Stillman
1b67ed071e Skip auto data dir migration if target dir exists and is non-empty 2016-11-30 02:09:07 -05:00
Dan Stillman
cba2c0c58b Fix display of extended character in file sync debug output 2016-11-30 02:09:07 -05:00
Adomas Ven
69ab4b0b1d Add server_connector endpoint to import styles and import translatable resources (#1120) 2016-11-29 14:59:58 -05:00
Adomas Venčkauskas
117ce8408b Fix connector saving via standalone 2016-11-29 13:40:12 +02:00
Dan Stillman
8f0ed56ae2 Test fixes after 5bceebf56c 2016-11-29 03:52:07 -05:00
Dan Stillman
c7bbde3c4f Add default pref for quicksearch mode to avoid recreating during tests 2016-11-29 03:28:49 -05:00
Dan Stillman
30d0858ebf Travis debugging 2016-11-29 01:42:15 -05:00
Dan Stillman
66f6ce715b Another Travis isDir workaround 2016-11-28 16:16:54 -05:00
Dan Stillman
a735d5dd41 Remove Travis debugging 2016-11-27 20:02:53 -05:00
Dan Stillman
45a8178fe0 Add another DirectoryIterator entry.isDir workaround for Travis 2016-11-27 20:00:10 -05:00
Dan Stillman
837ae0444d Travis debugging 2016-11-27 19:51:48 -05:00
Dan Stillman
a6cfe6cd9a Remove export charset checkbox in prefs
Instead, just always show the (greatly shortened, after 0609b62a) menu
on export when the translator supports it (which probably fewer
translators actually need to do).

This leaves the pref in place, but it can be removed eventually (and
changing the default for a while I believe will cause the existing pref
line to be removed for anyone who has it set to true already).
2016-11-27 17:11:05 -05:00
Dan Stillman
0ad4598128 Fix DB backup (broken by 5a6f1eef6) 2016-11-27 15:42:07 -05:00
Dan Stillman
0609b62a39 Show only UTF-8, UTF-8 w/o BOM, and Western for export charsets
See https://forums.zotero.org/discussion/comment/263644/#Comment_263644

We might want to consider removing the export charset checkbox in the
prefs and either always showing the charset option for translators or
always showing it for BibTeX (where "Western" really means "ASCII") but
nothing else.

Fixes #1124
2016-11-27 15:41:13 -05:00
Dan Stillman
5a6f1eef63 Update deprecated uses of Zotero.getZoteroDirectory()/getZoteroDatabase()
The Zotero.DataDirectory equivalents return string paths instead of nsIFile
instances, so some of these calls now just use Zotero.File.pathToFile(), which
can be removed when the surrounding code is updated to OS.File,
2016-11-27 00:17:56 -05:00
Dan Stillman
4c0abb6816 Point other profiles to new data dir after migration (+ code reorg)
Look for other profiles, from both apps (Firefox and Standalone), that
point to the data directory being migrated and update prefs.js in those
profiles to point to the new location.

Also reorganize code into Zotero.Profile and Zotero.DataDirectory
namespaces
2016-11-27 00:17:56 -05:00
Dan Stillman
412a7990b1 Don't perform automatic migration if there's an existing pipe
This prevents us from moving the data directory if the other app
(Firefox or Standalone) is running from the same directory.

Also clean up stub code in migration tests
2016-11-26 23:09:24 -05:00
Dan Stillman
678fe77fbb Move auto-migration checks into checkForDataDirectoryMigration() 2016-11-24 01:18:25 -05:00
Dan Stillman
a4ab84eed3 Avoid CustomizableUI errors in test output 2016-11-23 00:41:22 -05:00
Dan Stillman
56d64af186 Remove Travis debugging 2016-11-23 00:41:14 -05:00
Dan Stillman
cb300005cd More Travis debugging 2016-11-22 20:55:27 -05:00
Dan Stillman
84bb61ab7b Fix test timeouts caused by Quick Copy initialization
When an export translator is selected for Quick Copy, Quick Copy
initialization triggers translator initialization a few seconds after
startup, because the translator code needs to be available synchronously
for drag/drop. A Quick Copy test was changing the setting to BibTeX,
which was resulting in random timeouts after subsequent resetDB() calls
due to slow translator loading. This change skips initialization in test
mode. This might actually fix a lot of timeouts on Travis in the second
half of the tests...

This also resets the Quick Copy pref in those tests so that it's left at
the default, though really we should automatically reset all prefs after
all test groups and in resetDB().
2016-11-22 20:31:58 -05:00
Dan Stillman
935d48013b Travis debugging 2016-11-22 19:35:30 -05:00
Dan Stillman
a22d996aab Revert to new default if legacy data dir set in pref is missing 2016-11-22 18:46:55 -05:00
Dan Stillman
a4afb8c0c3 Wrap another showZoteroPaneProgressMeter call in a try/catch for safety 2016-11-22 03:41:15 -05:00
Dan Stillman
8383c5cda8 Ignore failure trying to show data dir migration status message
I saw this once in Standalone but haven't been able to reproduce it. (It
will now manifest as a progress bar without a status message.)
2016-11-22 03:32:16 -05:00
Dan Stillman
ef3e098586 Migrate data directory automatically on macOS and Linux
If data directory is within the profile directory and we can move the
subdirectories instantaneously with /bin/mv, just do it silently at startup.
2016-11-22 02:33:05 -05:00
Dan Stillman
288d0c7c06 Create 'profile' and 'Zotero' directories in temp dir for tests 2016-11-22 01:45:07 -05:00
Dan Stillman
98e3a9addf Allow immediate retry on partial data dir migration failure
A common cause of this on Windows will likely be open attachment files,
so suggest closing those and make retrying the default action.
2016-11-21 05:19:18 -05:00
Adomas Venčkauskas
0668faa584 Update connector ItemSaver constructor and misc refactoring
(should have been updated along with 3fc38d750)
2016-11-21 11:45:34 +02:00
Dan Stillman
e8d8f4a0a3 Use spinner instead of items pane message for search
Fixes #1116, and is generally more pleasant
2016-11-21 02:59:31 -05:00
Dan Stillman
335c3d0b98 Fix error creating context menu for independent save button 2016-11-20 03:04:38 -05:00
Dan Stillman
aeaa0d12c7 Avoid console error if page closed before translators are available
Was showing up in some test runs
2016-11-20 01:31:47 -05:00
Dan Stillman
d89da85606 Fix error when overwriting translation with some filename 2016-11-19 17:15:46 -05:00
Dan Stillman
ebc01db446 Fix "Zotero.Libraries.get(…).filesEditable is not a function"
Since da7da749
2016-11-18 04:54:42 -05:00
Dan Stillman
ef2a403d7b More data dir fixes (after f2163b3433 and bc3386ff9d)
Fixes error creating a new Standalone profile
2016-11-18 01:44:01 -05:00
Dan Stillman
162c7198d3 Fix console error in Standalone trying to load toolbar icon 2016-11-16 12:42:08 -05:00
Dan Stillman
65a39417bf Closes #1112, Show "Upgrading database…" message 2016-11-16 12:41:49 -05:00
Dan Stillman
a1710c3307 Fix hang running tests (since d88cfc6c5f) 2016-11-16 11:07:58 -05:00
Dan Stillman
bc3386ff9d Tweak existing data directory detection
Fixes some issues after f2163b3433
2016-11-16 09:51:46 -05:00
Dan Stillman
4863670104 Display "Migration in progress — do not interrupt…" during migration
Would be nice to have a determinate progress meter on Windows, but that
will require enumerating all files, which maybe would just make things
slower. Might be safer, though, by discouraging people from
force-quitting.
2016-11-16 01:07:26 -05:00
Dan Stillman
062ff18596 Don't clear Zotero pane progress meter message by default
If showZoteroPaneProgressMeter() is called with the first argument
undefined, don't clear any existing message. To clear, pass
null/false/"". The message is also cleared when the progress meter is
hidden.
2016-11-16 01:06:54 -05:00
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
Dan Stillman
30f2ecd75a Move most item field search conditions into submenu
This could be extended to address #118/#145, but for now it makes some of the
more common search conditions (Creator, Collection, etc.) more prominent.
2016-10-09 01:02:44 -04:00
Dan Stillman
10d76a1741 Code cleanup in zoterosearch.xml constructor 2016-10-08 20:33:42 -04:00
Dan Stillman
20fd5dd299 Include installed extensions with Debug ID
Previously only with Report ID
2016-10-08 20:26:54 -04:00
Dan Stillman
c3dcaf9fe0 Fix error calling ZoteroPane.getCollectionTreeRow() if collection view 2016-10-08 19:59:06 -04:00
Dan Stillman
496e289dd9 Fix NSF schema installation/uninstallation
I don't know if this is still used, but now it works on this branch.
2016-10-08 19:57:49 -04:00
Dan Stillman
6f6ce33377 Remove obsolete code for old Firefox versions 2016-10-08 19:15:49 -04:00
Dan Stillman
3bf82a4d4d Hide items pane at startup to avoid showing column lines
Column groups aren't processed until after startup progress meter closes, so
otherwise lines show behind the progress meter for all possible columns.
2016-10-08 18:59:20 -04:00
Dan Stillman
c477d482bf Update citeproc-js to 1.1.137 2016-10-06 01:33:03 -04:00
Dan Stillman
9c52ebdf8b Show saved searches under "Collection" search condition
With icons to identify collections and searches

Also:

- `savedSearch` search condition in general
- Clean up some search window code
- Reorganize search tests
2016-10-06 01:17:06 -04:00
Dan Stillman
8f38b01712 Move search code into separate files in xpcom/data 2016-10-04 23:44:07 -04:00
Dan Stillman
0769a84a00 Fix low-res icons after switching out of Fx connector mode 2016-10-04 03:12:20 -04:00
Dan Stillman
27f348c7af Don't count Quick Start Guide items when checking for empty library 2016-10-04 02:59:53 -04:00
Dan Stillman
cfc1b56ca6 Merge pull request #1104 from adomasven/feature/connector-targetAll-support
Connector targetAll support
2016-10-04 02:59:11 -04:00
Adomas Venčkauskas
a76256c7f7 Connector translator targetAll support changes
Addresses #1021
2016-10-04 09:15:23 +03:00
Dan Stillman
28601a4380 Merge branch '4.0' 2016-09-30 02:58:52 -04:00
Dan Stillman
db8d3fd4b4 Fix dragging of files to the filesystem on macOS (and maybe Linux)
Calling getTransferData('zotero/item') when handling the
application/x-moz-file-promise seems to have stopped working between Fx46 and
Fx47, though I can't get older Nightly builds to run with mozregression
(Sierra?) to find the specific change. Instead, work around this by passing an
array of item ids to the file drag data provider.
2016-09-30 02:47:51 -04:00
Adomas Venčkauskas
d3ca13930d Update http server endpoint 2016-09-29 16:22:21 +03:00
Adomas Venčkauskas
8208ece9df Fix proxy dialog checkboxes disabled state on init 2016-09-29 04:46:25 -04:00
Dan Stillman
753252be77 Merge pull request #1090 from adomasven/feature/iframe-translator-rules
Changes for #1021 to support targetAll translator property.
2016-09-28 11:42:58 -04:00
Dan Stillman
b2152f811a Tweak text in sync-user-change warning 2016-09-28 00:00:02 -04:00
Dan Stillman
6e74110078 10x speedup in tag selector refresh
Using createDocumentFragment() and event delegation

Filtering for a tag could still be sped up quite a lot. Resizing the tag
selector is also very laggy, but that might require switching to clusterize.js
or similar.
2016-09-27 23:58:46 -04:00
Adomas Venčkauskas
5d17ff3f53 Implements #1021 on Z4fx extension 2016-09-27 17:43:56 +03:00
Dan Stillman
ed46414502 Merge branch '4.0' 2016-09-27 02:12:12 -04:00
Dan Stillman
4dc6ef3045 Fix #1100, Deleting collection also deletes items 2016-09-27 02:10:14 -04:00
Dan Stillman
e0b96a873b Update citeproc-js to 1.1.136 2016-09-26 14:02:09 -04:00
Dan Stillman
30f7ef093a Remove Extra field parsing when generating CSL JSON
Now done by the processor in 1.1.133 (#1099)
2016-09-26 01:08:52 -04:00
Dan Stillman
d857a06661 Use OS.File for file reads in Zotero.File.get(Binary)ContentsAsync()
This is the recommended approach (since NetUtil can still do some main-thread
I/O for files) and avoids warnings in the console.

For getContentsAsync(), also sends nsIURIs and string URIs to
Zotero.HTTP.request(), which should be used instead.

This makes getBinaryContentsAsync() much slower (due to the conversion from an
array of bytes to a binary string), but it's only used in tests. For one test
that compares two large files, use MD5 instead.
2016-09-24 06:42:30 -04:00
Dan Stillman
12da3f00dc Fix deregistration of auto-sync listener 2016-09-24 02:29:20 -04:00
Dan Stillman
1adb8d74f0 Properly save search when using "New Saved Search…" menu option 2016-09-23 21:03:00 -04:00
Dan Stillman
a3a9cb9c1e Fix for too-wide item pane after 4.0 upgrade or prefs reset
Regression from stacked layout mode (6bff554976)
2016-09-23 20:15:00 -04:00
Adomas Venčkauskas
3ca5526f29 Fix translator tester on xul extension 2016-09-23 17:37:47 +03:00
Adomas Venčkauskas
353b935c74 Add targetAll translator param for connector iframe detection 2016-09-23 17:37:47 +03:00
Dan Stillman
794b582244 Merge branch '4.0' 2016-09-22 14:33:42 -04:00
Adomas Ven
c157e01208 Closes #1097. Fixes the feed settings being reuploaded after every refresh (#1098) 2016-09-22 04:05:30 -04:00
Dan Stillman
015a13716f Update citeproc-js to 1.1.133 2016-09-22 00:19:02 -04:00
Adomas Venčkauskas
7608e127f1 Fix nested translators that rely on child translator tags 2016-09-21 11:54:56 +03:00
Dan Stillman
e34c9e04e8 Fix global variable 2016-09-21 00:49:33 -04:00
Dan Stillman
6139f7045e Fix automatic syncing when no legacy password 2016-09-21 00:49:33 -04:00
Dan Stillman
610dce7c1f Update citeproc-js to 1.1.131 2016-09-20 18:34:24 -04:00
Dan Stillman
dc0bb68f04 Merge pull request #1091 from adomasven/fix/connector-translation-support
Fixes overriden Zotero object in connector sandboxes
2016-09-20 14:18:07 -04:00
Adomas Venčkauskas
e83bbbad4e Fix getTranslatorCode bugs
- /connector/getTranslatorCode used to respond with empty content
- CodeGetter froze connectors by issuing hundreds of simultanious XHR
  requests
2016-09-20 15:55:58 +03:00
Adomas Venčkauskas
38df733a37 Fixes overriden Zotero object in connector sandboxes
Occurs when not using `with` statement, which is highly discouraged and
unsupported in strict mode.
2016-09-20 15:53:55 +03:00
Dan Stillman
745c67d42f Remove duplicate condition
Fixes #1095
2016-09-19 14:01:13 -04:00
Dan Stillman
520220a69a Fix #1094, dataObjectUtilities.equals() misdescription 2016-09-19 01:01:01 -04:00
Dan Stillman
21d3ca298b Merge branch '4.0' 2016-09-18 18:39:18 -04:00
Dan Stillman
c8dbe26abe Update citeproc-js to 1.1.130 2016-09-17 13:48:30 -04:00
Sebastian Karcher
9101cb487f Parse DOI: prefixed DOI from Extra (#1089) 2016-09-14 01:31:26 +02:00
Dan Stillman
4c64634134 Update citeproc-js to 1.1.121 2016-09-07 18:36:24 -04:00
Dan Stillman
474420620e Add "Manage Styles…" link to Create Bib and Doc Prefs windows
Clicking it cancels the current window, opens the Cite pane of the
prefs, and selects the Styles tab. (This will be more useful once we
have inline style installation from that pane.)
2016-09-06 19:15:01 -04:00
Dan Stillman
0828d4d5e9 openPreferences() updates
- Move openPreferences() to Zotero.Utilities.Internal
- Add support for opening windows when there's no active browser window
- Allow selecting prefpane tab by id via 'tab' property
- openPreferences() now takes an object as its second argument with a
  'tab', 'tabIndex', or 'action' property
2016-09-06 19:13:50 -04:00
Dan Stillman
5bcce8ba82 Merge branch '4.0' 2016-09-06 18:57:05 -04:00
Dan Stillman
5107d40ff5 Update citeproc-js to 1.1.119 2016-09-06 18:51:39 -04:00
Dan Stillman
6dfef4daed Removed another unused undeclared variable
Follow-up to 42ef98bb89
2016-09-06 12:17:42 -04:00
Adomas Venčkauskas
42ef98bb89 Remove unused undeclared variable causing an error in safari 2016-09-06 15:01:05 +03:00
Dan Stillman
ca833f54fc Fix noWait translation mode (broken by e3a9c6779b) 2016-09-06 02:17:20 -04:00
Dan Stillman
3ef9b93573 Fix errors with deferred translator tests
In translation-server, the test timeout is overridden to 30 seconds, which was
also the deferred test delay, so there was a race condition that could cause
deferred tests to fail. This sets the deferred delay to 20 seconds.
2016-09-06 01:37:17 -04:00
Dan Stillman
e3a9c6779b Restore connector mode functionality in Firefox
Non-Zotero for Firefox connector code will probably need to be updated
to handle these changes.
2016-09-05 23:08:08 -04:00
Dan Stillman
b18c580dac Revert "Disable connector switching for 5.0 beta"
This reverts commit 317b1dfa0f.
2016-09-05 19:52:13 -04:00
Adomas Ven
5859dd6956 Compatibility fixes for shared connector code (#1082)
Safari does not support generators yet. Removes coroutines
and removes the requirement for bluebird, which should
improve script injection performance.
2016-09-05 19:49:23 -04:00
Dan Stillman
f68ee60524 Follow-ups to getAPIKey() changes in 008321bb89
Addresses #1086
2016-09-05 04:00:55 -04:00
Dan Stillman
008321bb89 Generate API key during auto-sync after upgrade
Fixes #1086, Sync settings/auto-sync glitch after Standalone upgrade
2016-09-05 03:21:49 -04:00
Dan Stillman
43bd1b7082 Collect incremental results for a run within Zotero_TranslatorTesters
This requires provo and translation-server updates.
2016-09-04 01:37:28 -04:00
Dan Stillman
7f5e57f606 Fix error in translator tester when only one translator is whitelisted 2016-09-02 02:43:25 -04:00
Dan Stillman
88e12f617c Fix document property access errors in translation-server
For some reason, in the Fx48 translation-server, the processor passed to
processDocuments() calls in translators can't access document properties
even when they're on the same domain or even the same document. To get
around that, rewrap them for the sandbox, but there might be a better
fix here.

Addresses https://github.com/zotero/translation-server/issues/36
2016-09-02 02:42:17 -04:00
Dan Stillman
06472a9d3c Add array for debugging specific translators 2016-08-31 02:53:35 -04:00
Dan Stillman
1266c9f1e6 Automatically close rogue dialog boxes
A few sites (e.g., Gallica) were causing alerts to pop up in Standalone during
testing, which breaks testing, so accept them automatically. (Hopefully these
don't happen during manual translation...?)
2016-08-31 02:50:02 -04:00
Dan Stillman
6ad195521b Save test results after every translator
Goes with 0813241150
2016-08-31 02:10:23 -04:00
Dan Stillman
c01fc5d762 Merge branch '4.0' 2016-08-28 03:37:55 -04:00