Commit graph

343 commits

Author SHA1 Message Date
Dan Stillman
255320656f Fix extended characters in reports (since 5236d01791) 2017-01-26 01:53:27 -05:00
Dan Stillman
5236d01791 Fix mangled large reports
https://forums.zotero.org/discussion/64022/5-0-beta-generate-report-is-often-garbled

Records are being truncated, though I'm not sure why. But just read the input
stream into a string for now.
2017-01-21 06:33:36 -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
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
99152d78e5 Fix file handling when Zotero is launched from close on Windows
When opening CSL, BibTeX, etc.
2016-12-26 17:09:29 -05:00
Tom Najdek
d4dc86c975 Remove use of syntax where curly brackets are omitted in function defs 2016-12-21 08:06:17 -05:00
Tom Najdek
54a2126b7d Remove non-standard syntax for conditional exception handling 2016-12-21 08:04:57 -05:00
Tom Najdek
39bc5398c9 Remove use of non-standard list comprehension syntax 2016-12-21 08:04:57 -05:00
Tom Najdek
269e2f8bff Replace legacy syntax for each...in with for...of 2016-12-21 08:04:09 -05:00
Dan Stillman
bba874aa18 Add option to check for updates on Standalone startup error
I think we might have come to regret not having this.
2016-12-16 06:00:28 -05:00
Dan Stillman
2f50b9b848 Fix CSL/file import when Standalone is closed
This is a bit iffy, since at least on macOS the passed file seems to
come in as either -file or -url at different times, but this seems to
work on macOS and Windows. Needs further testing with a packaged version
on Windows.
2016-12-16 03:21:52 -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
1d45f3d008 Show more startup errors in Standalone, with stack 2016-12-06 06:12:54 -05:00
Dan Stillman
2d6a1b3541 Do a better job of displaying startup errors
This helps ensure that the toolbar button opens an alert with the relevant
error instead of opening the Zotero pane with an infinite progress meter.
2016-12-05 05:59:12 -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
c0bf2b91f6 Don't shut down Firefox on startup error (since 693c0286) 2016-11-26 23:09:28 -05:00
Dan Stillman
693c0286ea Slightly better handling of startup errors in Standalone
Run the startup error handler or show an alert with the startup error
string, and then quit Zotero
2016-11-22 18:46:55 -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
6f6ce33377 Remove obsolete code for old Firefox versions 2016-10-08 19:15:49 -04:00
Dan Stillman
8f38b01712 Move search code into separate files in xpcom/data 2016-10-04 23:44:07 -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
Dan Stillman
daf0f8e0b0 Merge branch '4.0' 2016-08-14 17:27:36 -04:00
Dan Stillman
1476d9e71c Fix startup error in Firefox 50+
Closes #1077
2016-08-14 04:18:41 -04:00
Dan Stillman
2d88b07855 Set Zotero.automatedTest flag instead of .noUserInput on Travis
And don't skip alerts in Zotero.alert() during automated tests. (That
was intended to avoid long timeouts after unexpected failures, but,
e.g., PDF metadata lookups (which are currently disabled in automated
tests) should just be mocked so they don't intermittently fail.)
2016-06-24 18:28:32 -04:00
Dan Stillman
6907af86fd Add XPCOM clearTimeout() and remove Zotero.wait()
Properly emulate setTimeout() with support for cancelling timers.
2016-05-17 13:43:11 -04:00
Dan Stillman
b109279a17 Avoid errors for some invalid requests viewing attachments 2016-05-13 15:45:51 -04:00
Dan Stillman
317b1dfa0f Disable connector switching for 5.0 beta
Don't start the connector pipe (Mac/Linux), don't listen for IPC on the
command-line (Windows), and don't try to release Standalone's lock if DB is
busy when Firefox starts.
2016-05-08 22:38:58 -04:00
Dan Stillman
a78f923a72 Sync engine cleanup
- Use custom exception for user-initiated sync cancellations, which can bubble
  up to the sync runner -- this should help with a sync stop button (#915)
- Separate out deletions-downloading code
- Refactor delay generator handling on library version mismatch
- Clearer variable names
2016-05-06 04:31:49 -04:00
Philipp Zumstein
aef8453924 Fix some for each ... in cases (#978) 2016-05-03 17:51:12 -04:00
Dan Stillman
72c8711cd3 String::contains() -> indexOf() for Firefox 48 (and 38) compatibility
.contains() was removed in Firefox 48, but .includes() wasn't available until
40, so use indexOf() for now. We can start using .contains() once we no longer
need to support 38 ESR.
2016-05-03 12:08:38 -04:00
Dan Stillman
9fea9608f6 Disable debug output for AsyncChannel loading 2016-04-16 16:51:51 -04:00
Dan Stillman
1c92fe3268 Fix getFile() deprecation warning for zotero://attachment URLs 2016-04-16 16:50:27 -04:00
Dan Stillman
79504df5f8 Remove "/report.html" in report URLs
Firefox saves as Zotero Report.html (localized) without it, which is
fine.
2016-04-12 18:59:46 -04:00
Dan Stillman
0f7d1c7061 Fix various connector-mode issues for 5.0
Still more to fix
2016-04-04 06:33:15 -04:00
Aurimas Vinckevicius
ca36096bcf Add FeedReader 2016-03-22 03:38:49 -04:00
Dan Stillman
daf4a8fe4d Deasyncification 🔙 😢
While trying to get translation and citing working with asynchronously
generated data, we realized that drag-and-drop support was going to
be...problematic. Firefox only supports synchronous methods for
providing drag data (unlike, it seems, the DataTransferItem interface
supported by Chrome), which means that we'd need to preload all relevant
data on item selection (bounded by export.quickCopy.dragLimit) and keep
the translate/cite methods synchronous (or maintain two separate
versions).

What we're trying instead is doing what I said in #518 we weren't going
to do: loading most object data on startup and leaving many more
functions synchronous. Essentially, this takes the various load*()
methods described in #518, moves them to startup, and makes them operate
on entire libraries rather than individual objects.

The obvious downside here (other than undoing much of the work of the
last many months) is that it increases startup time, potentially quite a
lot for larger libraries. On my laptop, with a 3,000-item library, this
adds about 3 seconds to startup time. I haven't yet tested with larger
libraries. But I'm hoping that we can optimize this further to reduce
that delay. Among other things, this is loading data for all libraries,
when it should be able to load data only for the library being viewed.
But this is also fundamentally just doing some SELECT queries and
storing the results, so it really shouldn't need to be that slow (though
performance may be bounded a bit here by XPCOM overhead).

If we can make this fast enough, it means that third-party plugins
should be able to remain much closer to their current designs. (Some
things, including saving, will still need to be made asynchronous.)
2016-03-07 17:03:58 -05:00
Dan Stillman
ec72dd3909 Fix debug output viewing 2016-01-04 15:48:56 -05:00
Dan Stillman
f6e0b8a8b0 Fix error in Zotero protocol handler when viewing snapshots 2015-12-30 05:14:51 -05:00
Adomas Venčkauskas
2de0ed7871 Recognizes and opens files even without extensions.
Closes #842
Also:
Changes AsyncChannel to be a coroutine.
2015-11-20 16:14:55 +00:00
Dan Stillman
62aeb1da32 Full-text syncing support via API [DB reupgrade] 2015-11-12 02:54:51 -05:00
Dan Stillman
e8a887304e Move Zotero.CollectionTreeRow to separate file 2015-11-03 17:08:55 -05:00
Dan Stillman
73f4d28ab2 ZFS file sync overhaul for API syncing
This mostly gets ZFS file syncing and file conflict resolution working
with the API sync process. WebDAV will need to be updated separately.

Known issues:

- File sync progress is temporarily gone
- File uploads can result in an unnecessary 412 loop on the next data
  sync
- This causes Firefox to crash on one of my computers during tests,
  which would be easier to debug if it produced a crash log.

Also:

- Adds httpd.js for use in tests when FakeXMLHttpRequest can't be used
  (e.g., saveURI()).
- Adds some additional test data files for attachment tests
2015-10-29 04:38:27 -04:00
Aurimas Vinckevicius
88ab129ffb Add Feed and FeedItem
Also:
* _finalizeErase in Zotero.DataObject is now inheritable
* Call _initErase before starting a DB transaction
* removes Zotero.Libraries.add and Zotero.Libraries.remove (doesn't seem like this is used any more)
2015-09-21 17:08:21 -05:00
Dan Stillman
984789d304 API syncing megacommit
There's a lot more to do, and this isn't ready for actual usage, but the
basic functionality is mostly in place and has decent test coverage. It
can successfully upgrade a library last used with classic syncing and
pull down changes via the API. Uploading mostly works but is currently
disabled for safety until it has better test coverage.

Downloaded JSON is first saved to a cache table, which is then used to
populate other tables and later for generating PATCH requests and
automatically resolving conflicts (since it shows what was changed
locally and what was changed remotely). Objects with unmet dependencies
or unknown fields are skipped for now but don't block the rest of the
sync.

Some of the bigger remaining to-dos:

- Tests for uploading
- Re-do the preferences to get an API key
- File sync integration
- Full-text syncing integration
- Manual conflict resolution (though this already includes much smarter
  conflict handling that automatically resolves many conflicts)
2015-07-20 18:16:57 -04:00
Dan Stillman
02cd71ebb5 Allow overriding startup options in Zotero.reinit()
And use it in resetDB() test support function, mainly to allow
skipBundledFiles for resetDB calls. Translator installation and
initialization can take a long time, but tests that need a clean DB
don't necessarily rely on translators. Without this, running resetDB()
in beforeEach() for many tests is prohibitively slow.
2015-07-20 02:12:14 -04:00
Dan Stillman
5c523d8694 Merge branch '4.0' 2015-07-18 07:09:53 -04:00
Aurimas Vinckevicius
bf58de7e62 Update citeproc-js to 1.1.25
And split off Zotero additions
2015-07-09 16:31:57 -05:00
Dan Stillman
99dd1c0697 Merge branch '4.0'
Since modal windows (e.g., the Create Bib window and the Quick Copy site
editor window) can't use yield, style retrieval
(Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a
previous async Zotero.Styles.init(). The translator list is generated in
the prefs window and passed into the Quick Copy site editor, but it's
possible the translators API should be changed to make getTranslators()
synchronous with a prior init() as well.
2015-06-27 16:59:58 -04:00
Dan Stillman
33dedd1753 Tags overhaul [DB reupgrade]
- Simplified schema
- Tags are now added without reloading entire tag selector
  - On my system, adding 400 tags to an item (separately, with the tag
    selector updating each time) went from 59 seconds to 42. (Given that
    it takes only 13 seconds with the tag selector closed, though,
    there's clearly more work to be done.)
- Tag selector now uses HTML flexbox (in identical fashion, for now, but
  with the possibility of fancier changes later, and with streamlined
  logic thanks to the flexbox 'order' property)
- Various async fixes
- Tests
2015-06-23 05:21:58 -04:00
Dan Stillman
dcd7de03b0 Match last name alone for two-field names in search autocomplete
https://forums.zotero.org/discussion/50073/
2015-06-18 00:21:50 -04:00
Dan Stillman
ff7919553c Collections data layer cleanup
Get rid of data_access.js, at long last. Existing calls to
Zotero.getCollections() will need to be replaced with
Zotero.Collections.getByLibrary() or .getByParent().

Also removes Zotero.Collection::getCollections(), which is redundant
with Zotero.Collections.getByLibrary(), and Zotero.Collections.add().
The latter didn't didn't include a libraryID anyway, so code might as
well just use 'new Zotero.Collection' instead.
2015-05-24 04:37:34 -04:00
Dan Stillman
ef57b4e016 Relations fixes and cleanup
Relations need a complete overhaul, but this makes them generally work
again.
2015-05-24 03:08:22 -04:00
Dan Stillman
32abbe7c25 Load groups at startup, and make Zotero.Groups functions synchronous
Groups were already being loaded for the collections list, so we might
as well just store them initially and let Zotero.Libraries.getName() be
a synchronous call.
2015-05-22 04:52:05 -04:00
Dan Stillman
51c7ae6e5c Add -b option to skip translator/style installation in tests
'b' for *b*undled files

Translators and styles take a long time to install and initialize in
source installations, and they're unnecessary for many tests.

This shaves about 10 seconds off each test run for me on one system (and
that's with some help from filesystem caching).
2015-04-16 20:50:15 -04:00
Dan Stillman
293f7c6dd4 Zotero.Search.prototype.addCondition() doesn't need to be async 2015-04-16 20:48:59 -04:00
Dan Stillman
fec43f1f62 Merge branch '4.0' into api_syncing 2015-04-13 02:01:43 -04:00
Aurimas Vinckevicius
164f4e4321 More informative error messages for failed file loads 2015-04-10 19:46:57 -05:00
Aurimas Vinckevicius
f6510419cb Skip test for "recognizePDF without DOI" on Travis-CI
Breaks due to CAPTCHA when tests are run frequently
2015-04-06 23:17:41 -05:00
Dan Stillman
827eb9b32e Change command-line debug flag to -ZoteroDebug for consistency
From -zoterodebug
2015-03-24 03:38:11 -04:00
Dan Stillman
828f3f5024 Fix report generation 2015-03-17 00:05:08 -04:00
Dan Stillman
bdd69d0a53 Merge branch '4.0' into api_syncing 2015-03-16 23:41:10 -04:00
Dan Stillman
1c8abf3841 Change user library from 0 to 1
0 allowed for some accidental behavior due to old code expecting NULL,
and it prevented easy checks (``if (!libraryID)``) for a passed
libraryID. Code now uses Zotero.Libraries.userLibraryID instead of a
hard-coded value (except in schema.js). Functions can still make
libraryID optional, but they should then use
Zotero.Libraries.userLibraryID if that's to mean the user library.

There might be some code that still expects 0 that I missed.
2015-03-16 12:16:05 -04:00
Simon Kornblith
c7c58f8343 Add support function to reset the DB and a test that it works. 2015-03-09 14:25:49 -04:00
Dan Stillman
94b2865149 Fix sorting of tag autocomplete in advanced search 2015-02-25 23:58:54 -05:00
Aurimas Vinckevicius
68e7849fcf Add Zotero.Utilities.Internal.hyphenateISBN
Hyphenates ISBN-10 or ISBN-13 according to data from https://www.isbn-international.org
2015-02-24 22:42:29 -06:00
Dan Stillman
b478d8f204 Fix some errors if pane is opened during initialization 2015-02-24 22:07:30 -05:00
Dan Stillman
e2d3cc3f0d Update zotero://select to use new URLs and wait for items list load
Closes #541
2014-09-23 01:13:38 -04:00
Dan Stillman
755ead2119 Update zotero:// extensions (report, timeline, etc.) for async DB, and more
- Protocol handler extensions can now handle promises and can also make
  data available as it's ready instead of all at once (e.g., reports now
  output one entry at a time)
- zotero:// URL syntaxes are now more consistent and closer to the web
  API (old URLs should work, but some may currently be broken)

Also:

- Code to generate server API, currently available for testing via
  zotero://data URLs but eventually moving to HTTP -- zotero://data URLs match
  web API URLs, with a different prefix for the personal library (/library vs.
  /users/12345)
- Miscellaneous fixes to data objects

Under the hood:

- Extensions now return an AsyncChannel, which is an nsIChannel implementation
  that takes a promise-yielding generator that returns a string,
  nsIAsyncInputStream, or file that will be used for the channel's data
- New function Zotero.Utilities.Internal.getAsyncInputStream() takes a
  generator that yields either promises or strings and returns an async input
  stream filled with the yielded strings
- Zotero.Router parsers URLs and extract parameters
- Zotero.Item.toResponseJSON()
2014-09-09 00:36:29 -04:00
Dan Stillman
c5ee3651fe Don't try to load uncommitted files 2014-09-09 00:35:35 -04:00
Dan Stillman
89833e2da7 Use 'Zotero' object instead of this._zotero in autocomplete 2014-08-10 14:54:41 -04:00
Dan Stillman
00484c5e69 Closes #527, Asyncify autocomplete 2014-08-10 14:52:03 -04:00
Dan Stillman
f5896dbb8d Remove synchronous database methods
This required doing additional caching at startup (e.g., item types and fields)
so that various methods can remain synchronous.

This lets us switch back to using the current Sqlite.jsm. Previously we were
bundling the Fx24 version, which avoided freezes with locking_mode=EXCLUSIVE
with both sync and async queries.

Known broken things:

  - Autocomplete
  - Database backup
  - UDFs (e.g., REGEXP function used in Zotero.DB.getNextName())
2014-08-09 18:10:32 -04:00
Dan Stillman
db0fa3c33e Async DB megacommit
Promise-based rewrite of most of the codebase, with asynchronous database and file access -- see https://github.com/zotero/zotero/issues/518 for details.

WARNING: This includes backwards-incompatible schema changes.

An incomplete list of other changes:

- Schema overhaul
  - Replace main tables with new versions with updated schema
  - Enable real foreign key support and remove previous triggers
  - Don't use NULLs for local libraryID, which broke the UNIQUE index
    preventing object key duplication. All code (Zotero and third-party)
    using NULL for the local library will need to be updated to use 0
    instead (already done for Zotero code)
  - Add 'compatibility' DB version that can be incremented manually to break DB
    compatibility with previous versions. 'userdata' upgrades will no longer
    automatically break compatibility.
  - Demote creators and tags from first-class objects to item properties
- New API syncing properties
  - 'synced'/'version' properties to data objects
  - 'etag' to groups
  - 'version' to libraries
- Create Zotero.DataObject that other objects inherit from
- Consolidate data object loading into Zotero.DataObjects
- Change object reloading so that only the loaded and changed parts of objects are reloaded, instead of reloading all data from the database (with some exceptions, including item primary data)
- Items and collections now have .parentItem and .parentKey properties, replacing item.getSource() and item.getSourceKey()
- New function Zotero.serial(fn), to wrap an async function such that all calls are run serially
- New function Zotero.Utilities.Internal.forEachChunkAsync(arr, chunkSize, func)
- Add tag selector loading message
- Various API and name changes, since everything was breaking anyway

Known broken things:

- Syncing (will be completely rewritten for API syncing)
- Translation architecture (needs promise-based rewrite)
- Duplicates view
- DB integrity check (from schema changes)
- Dragging (may be difficult to fix)

Lots of other big and little things are certainly broken, particularly with the UI, which can be affected by async code in all sorts of subtle ways.
2014-08-06 22:59:37 -04:00
Dan Stillman
4ea5e2d426 Update code to use 0 instead of NULL for libraryID 2014-08-06 22:14:59 -04:00
Dan Stillman
156f4eb160 Allow items to be moved (not copied) between collections w/modifier key
Cmd on OS X, Shift on Windows/Linux

How do I not get to close a ticket for this?

Unfortunately on Windows it doesn't seem possible to set the cursor
effect to arbitrary states (see note in libraryTreeView.js::
_setDropEffect() for the gory details), so this just uses the default
cursor there. On OS X and Linux the cursor reflects the requested
action.
2014-05-03 11:52:38 -04:00
Dan Stillman
60e5ab8124 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/db.js
	chrome/content/zotero/xpcom/fulltext.js
	chrome/content/zotero/xpcom/zotero.js
	chrome/content/zotero/zoteroPane.js
	components/zotero-service.js
	install.rdf
	update.rdf
2014-04-08 18:47:32 -04:00
Simon Kornblith
1ee015317f Don't restart in connector mode on Zotero.init() failure
I broke this in a723c85999
2013-12-11 14:50:48 -05:00
Dan Stillman
6ff0ea6d18 Add -zoterodebug command-line flag to force debug output
This should make it much easier to debug startup errors, particularly in
Standalone.

This also adds a general mechanism to set Zotero initialization options via
command-line flags.
2013-11-30 01:55:48 -05:00
Dan Stillman
5d32fb90ea Merge branch '4.0'
Conflicts:
	chrome/content/zotero/fileInterface.js
	chrome/content/zotero/overlay.js
	chrome/content/zotero/xpcom/schema.js
	chrome/content/zotero/xpcom/zotero.js
	chrome/content/zotero/zoteroPane.js
	install.rdf
	update.rdf
2013-11-24 16:08:46 -05:00
Simon Kornblith
0b92ad0037 Modify behavior on Zotero Standalone launch to account for failure
- Close Zotero pane before database is closed prior to reload, instead
  of waiting until reload is complete
- Show an error message if Zotero Standalone is not accessible when it
  should be
2013-11-05 15:52:40 -05:00
Dan Stillman
d318bca7a4 Allow items to be moved (not copied) between collections w/modifier key
Cmd on OS X, Shift on Windows/Linux

How do I not get to close a ticket for this?

Unfortunately on Windows it doesn't seem possible to set the cursor
effect to arbitrary states (see note in libraryTreeView.js::
_setDropEffect() for the gory details), so this just uses the default
cursor there. On OS X and Linux the cursor reflects the requested
action.
2013-09-06 15:30:37 -04:00
Simon Kornblith
526441c3ca Make translator loading asynchronous
Other changes:
- Factored out Zotero.Translators from Zotero.Translator. The latter
  should be usable in the bookmarklet and connectors without changes.
- configOptions, displayOptions, and hiddenPrefs no longer copy on
  read. I don't think this actually affects any existing code.
- Zotero.Translate._loadTranslator() now returns a promise
2013-08-17 03:15:43 -04:00
Dan Stillman
5787b230f7 Use asynchronous DB and file access for schema checks/updates
This change should improve Firefox startup time. If the Zotero pane is
opened before Zotero has initialized, the pane will be blocked with a
progress bar until it's done. Standalone currently does the same, but it
should be changed to just delay opening the window if possible.

The upgrade wizard has been disabled for schema upgrades, in the hope
that upgrades can be done in a way that won't break compatibility with
earlier versions (or that can at least be done in a way such that we can
put out point releases of the last major version that provide
compatibility during beta/post-upgrade periods).

This patch likely breaks many things, and definitely breaks connector
mode.

This change also removes upgrade steps for databases from Zotero 2.1b2
and earlier. Users with such databases will need to upgrade via Zotero
4.0.x first or delete their data directories and start anew. This should
only affect users who haven't opened Zotero since Nov. 2010.
2013-08-11 21:53:41 -04:00
Simon Kornblith
a723c85999 Return a promise from Zotero.shutdown() 2013-08-09 11:11:01 -04:00
Simon Kornblith
2069b5b396 Fix switching in and out of connector mode
Broken by 9d3f55be51
2013-08-09 10:55:56 -04:00
Dan Stillman
7572eebcd1 Offer autocomplete of same creator for different creator types
If a creator exists on an item but is a different creator type than the
one being entered, show creator in autocomplete list.
2013-08-07 15:25:15 -04:00
Dan Stillman
9d3f55be51 Use async DB for autocomplete
This was probably hanging previously because I was passing a JS function for
onProgress, which apparently isn't allowed.
2013-08-07 11:01:12 -04:00
Dan Stillman
10e9c5e0b7 Restore ZFS quota warning
Possible that this hasn't shown since 4.0?
2013-07-08 20:13:47 -04:00
Dan Stillman
65c7a5988b Limit autocomplete for tags and fields to current library
Not done for advanced search

Should be easy for saved search, but not yet done
2013-04-19 15:10:05 -04:00
Simon Kornblith
946c754ae7 Remove redundant line 2013-03-18 20:33:09 -04:00
Dan Stillman
d2f028d797 Tag colors, synced settings, and (stopgap) silent DB upgrades
- New tag colors support, with the ability to assign colors to up to 6
  tags per library. Tags with colors assigned will show up at the top of
  the tag selector and can be added to (and removed from) selected items
  by pressing the 1-6 keys on the keyboard. The tags will show up as
  color swatches before an item's title in the items list.
- Synced settings, with Notifier triggers when they change and
  accessible via the API (currently restricted on the server to
  'tagColors', but available for other things upon request)
- Silent DB upgrades for backwards-compatible changes. We'll do
  something fancier with async DB queries in 4.0, but this will work for
  changes that can be made without breaking compatibility with older
  clients, like the creation of new tables. The 'userdata' value is
  capped at 76, while further increments go to 'userdata2'.

TODO:

- Try to avoid jitter when redrawing swatches
- Optimize tag color images for retina displays
- Redo attachment dots in flat style?
- Clear all colors from an item with 0 (as in Thunderbird), but I don't
  think we can do this without undo
2013-03-03 06:23:25 -05:00
Dan Stillman
0061ff3ca5 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/preferences/preferences.xul
	chrome/content/zotero/xpcom/data/item.js
	chrome/content/zotero/xpcom/utilities_translate.js
2013-02-04 07:02:38 -05:00
Dan Stillman
46e3e7293e Fix "results.sort is not a function" in tags autocomplete
This occured if there were no autocomplete results for an entered tag
string.
2013-02-04 05:03:12 -05:00
Simon Kornblith
dbf2bc265f Merge branch '3.0'
Conflicts:
	chrome/content/zotero/recognizePDF.js
	chrome/content/zotero/xpcom/utilities.js
2013-01-21 02:01:08 -05:00
Simon Kornblith
94619403ca Tweak loading process 2013-01-21 01:58:01 -05:00
Dan Stillman
596c6da3ee Remove Commons code, which contains E4X
Some items pane code is still in place, since it's a decent example of
dynamic items pane loading.
2013-01-15 03:23:37 -05:00
aurimasv
b1cc6e260e Load XRegExp into Zotero.XRegExp and Zotero.Utilities.XRegExp and make it accessible from translators. 2012-12-19 06:36:08 -06:00
Dan Stillman
bb93f019dc File sync overhaul
- New promise-based architecture
- Library-specific file sync queues, allowing other libraries to
  continue if there's an error in one library
- Library-specific sync errors, with error icons next to each library
- Changed file uploading in on-demand download mode, which had been missing
- On-demand download progress indicator in middle pane
- More accurate progress indicator
- Various tweaks and bug fixes
- Various future tweaks and bug fixes
2012-12-11 15:16:40 -05:00
Dan Stillman
4caae896cf Merge branch '3.0'
Conflicts:
	chrome/content/zotero/xpcom/attachments.js
	chrome/content/zotero/xpcom/translation/translate_item.js
	install.rdf
	update.rdf
2012-11-23 01:49:32 -05:00
Dan Stillman
9665e67042 Fix reports for notes with " " displaying as HTML markup
Reports are now always served as text/html
2012-11-21 19:42:47 -05:00
Simon Kornblith
585e5981f6 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/xpcom/storage/webdav.js
	chrome/content/zotero/xpcom/storage/zfs.js
2012-11-12 16:04:39 -05:00
Simon Kornblith
f6c3f58bc2 Merge commit '920df48d1da4f9bf33bf1a01c60a2131e589d29c' into 3.0 2012-11-12 00:09:23 -05:00
Simon Kornblith
bd367dcd85 Merge branch '3.0' 2012-11-11 17:15:30 -05:00
Simon Kornblith
425b2161cc Fix saving snapshots with Gecko 17 2012-11-11 17:14:05 -05:00
aurimasv
025eed93be Fix CSS url() links when served from zotero:// protocol 2012-11-11 01:50:26 -06:00
Dan Stillman
61c36b0523 Add ZoteroPaneOpen command line argument to open Zotero automatically 2012-11-10 19:38:22 -05:00
Simon Kornblith
57c3d190b4 Merge branch 'kill-e4x'
Conflicts:
	chrome/content/zotero/xpcom/integration.js
2012-06-25 00:42:32 -04:00
Simon Kornblith
66815c118f Kill E4X in Zotero.Style
Also kill enstyle.js, since it no longer works
2012-06-24 23:32:08 -04:00
Simon Kornblith
ac19b0490a Merge branch 'no-new-collection-on-import' 2012-06-10 22:39:41 -04:00
Simon Kornblith
68365e2297 Allow user to control whether files are imported into a new collection.
Adds three new preferences controlling whether a new collection is created upon import:
- extensions.zotero.import.createNewCollection.fromFile
	Controls whether a new collection is created by import from cog menu
- extensions.zotero.import.createNewCollection.fromClipboard
	Controls whether a new collection is created by import from clipboard
- extensions.zotero.import.createNewCollection.fromFileOpenHandler
	Controls whether a new collection is created when import is initiated by
	double-clicking a file or by dragging it over Zotero. This preference applies only to
	Zotero Standalone, and is configurable in the dialog that appears asking the user
	to confirm the import.

Closes #19, [papercuts] (26) Clipboard import into an open collection
2012-06-10 11:05:39 -04:00
Simon Kornblith
4e5d4281f1 Merge branch '3.0' 2012-05-26 18:24:52 -04:00
Dan Stillman
66bfaaae13 Fix sorting of autocomplete tags dropdown (since Fx9 or so) 2012-05-10 18:55:17 -04:00
Simon Kornblith
5894a9511d Tweak RDF loading code 2012-05-05 16:53:00 -04:00
Simon Kornblith
6e3dfc45ee Merge pull request #103 from aurimasv/tabulator
Tabulator v0.8 RDF Parser
2012-05-05 12:35:24 -07:00
Dan Stillman
d456117ebe Merge branch '3.0' 2012-05-03 17:56:32 -04:00
aurimasv
1942fb6762 Remove compatibility hack from rdf.js. Fix Zotero code instead. Move all setup to init.js 2012-04-29 20:30:37 -05:00
aurimasv
ea767e5647 Set up environment for RDF parser 2012-04-26 17:36:35 -05:00
Dan Stillman
5b267b4264 Fix sorting of base-mapped fields in reports 2012-04-26 16:28:55 -04:00
Dan Stillman
f1aa68f82b Simplify the file sync code a bit
Just call Zotero.Sync.Storage.[ZFS/WebDAV] directly

This probably breaks some things.
2012-03-21 19:39:40 -04:00
Simon Kornblith
09813b145d Merge branch '3.0' 2012-02-14 15:00:07 -05:00
Simon Kornblith
a01fcd360f Remove redundant code 2012-02-12 23:35:39 -05:00
Simon Kornblith
703d18ecb9 Remove antiquated code 2012-02-11 00:39:58 -05:00
Simon Kornblith
ef9040c46d Revert "Remove antiquated code"
This reverts commit d5fc04485b.
2012-02-11 00:38:21 -05:00
Simon Kornblith
d5fc04485b Remove antiquated code 2012-02-11 00:34:05 -05:00
Dan Stillman
6c5e155ba7 Merge branch '3.0' 2012-02-09 02:18:15 -05:00
Simon Kornblith
564d27f51c Allow add-ons to be updated via addons.mozilla.org in Zotero Standalone, part 1 2012-02-08 23:06:50 -05:00
Simon Kornblith
a78cd2cf18 Fix WPD leak by loading into a local scope 2012-02-05 18:58:15 -05:00
Simon Kornblith
39c86a791e Use Zotero.debug() instead of dump() in WPD 2012-02-05 18:46:49 -05:00
Dan Stillman
7c4a69b9e1 Merge branch '3.0' 2012-01-17 01:16:47 -05:00
Dan Stillman
2bf4c81a62 Make creator-based report sorting slightly less broken 2012-01-11 19:02:57 -05:00
Dan Stillman
059460a5d2 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/xpcom/storage/webdav.js
	chrome/content/zotero/zoteroPane.js
	chrome/skin/default/zotero/preferences.css
2011-12-17 16:25:58 -05:00
Simon Kornblith
f0bd8beebc Don't load date.js twice. 2011-12-08 04:27:25 -05:00
Dan Stillman
758216638f On-demand download support
Can choose to download files "at sync time" or "as needed"

On-demand defaults to on, but remains off for existing users

To-do:

- Handling of local and remote file changes on on-demand download
  (currently if a file exists it isn't downloaded, which means a
  remotely modified file won't be redownloaded in on-demand mode)
- Additional control over file downloading and retention

Other changes:

- Overhauled entire file syncing architecture
- Replaced numAttachments column with Note and Attachment columns with
  dynamic icons to indicate status
- Double-clicking a parent with a missing best attachment and on-demand
  downloading off no longer loads the parent URL
- Bugs
2011-11-26 03:45:55 -05:00
Simon Kornblith
4666ae972c - Move Zotero.Utilities.Internal and Zotero.Utilities.Translate to separate files
- IE compatibility for translation core
2011-08-31 23:25:48 +00:00
Simon Kornblith
440fc95942 Move startup timing to zotero-service.js 2011-08-24 01:59:56 +00:00
Simon Kornblith
cf0e1e6972 Ask before importing files on double-click 2011-08-18 15:29:13 +00:00
Simon Kornblith
580d0df56d Set toolkit.singletonWindowType pref instead of preventing default command line actions to prevent opening new windows 2011-08-17 08:31:34 +00:00
Simon Kornblith
05f9d2cd6f Open reference formats and CSL files on double-click (currently only on OS X) 2011-08-17 04:51:43 +00:00
Simon Kornblith
bbbc8991f2 - Fix failure to save snapshots, caused by failure to add and remove our request from loadGroup
- Fix a few other issues in ConnectorChannel
2011-08-12 18:10:53 +00:00
Simon Kornblith
b5b3d0a135 Don't package zoteroIntegration typelib after all (reverts r10002) 2011-08-08 17:44:23 +00:00
Simon Kornblith
6b5a3b71f2 Put zoteroIntegration typelib in Zotero trunk. 2011-08-03 23:46:31 +00:00
Dan Stillman
56c7afc47e Duplicate detection:
- Adds a per-library "Duplicate Items" virtual search to the source list -- shows up by default for "My Library" but can be added to and removed from all libraries
- Current matching algorithm is very basic: finds exact title matches (after normalizing case/diacritics/punctuation/spacing) and DOI/ISBN matches (untested)
- In duplicates view, sets are selected automatically; in other views, duplicate items can be selected manually and the merge interface can be brought up with "Merge Items" in the context menu
- Can select a master item and individual fields to merge from other versions
- Word processor integration code will automatically find mapped replacements and update documents with new item keys

Possible future improvements:

- Improved detection algorithms
- UI tweaks
- Currently if any items differ, all available versions will be shown as master item options, even if only one item is different; probably the earliest equivalent item should be shown for each distinct version
- Caching of results for performance
- Confidence scale
- Creator version selection (currently the creators from the chosen master item are kept)
- Merging of matching child items
- Better sorting of duplicates if not clustered together by the selected sort column
- Relation path compression when merging items that are already mapped to previously removed duplicates

Other changes in this commit:

- Don't show Trash in word processor integration windows
- Consider items in trash to be missing in word processor documents
- Selection of special views (Trash, Unfiled, Duplicates) is now restored properly in new windows
- Disabled field transform context menu when item isn't editable
- Left/right arrow now expands/collapses all selected items instead of just the last-selected row
- Relation deletions are now synced
- The same items row is now reselected after item deletion
- (dev) Zotero.Item.getNotes(), Zotero.Item.getAttachments(), and Zotero.Item.getTags() now return empty arrays rather than FALSE if no matches -- tests on those return values in third-party code will need to be changed
- (dev) New function Zotero.Utilities.removeDiacritics(str, lowercaseOnly) -- could be used to generate ASCII BibTeX keys
- (dev) New 'tempTable' search condition can take a table to join against -- useful for implementing virtual source lists
- (dev) Significant UI code cleanup
- (dev) Moved all item pane content into itemPane.xul
- Probably various other things


Needless to say, this needs testing.
2011-07-22 21:24:38 +00:00
Simon Kornblith
c24aad3af4 Add incompatible version message to Firefox 2011-07-20 03:35:21 +00:00
Simon Kornblith
4067a1b820 Fix cookie sandboxing in connector 2011-07-19 03:52:02 +00:00
Simon Kornblith
67c81db102 Fix IPC on Windows by making SendMessage() call return immediately 2011-07-03 03:07:01 +00:00
Simon Kornblith
5710fbc530 Don't initialize Zotero just to figure out if Standalone is running 2011-07-03 00:07:56 +00:00
Simon Kornblith
c40ba095ea Move command line handler to zotero-service.js so that it will have access to zContext even before Zotero is finished initializing. This is necessary for automatic connector switching on Windows. 2011-07-02 22:04:04 +00:00
Simon Kornblith
00fdeb3bf9 Focus window in command line handler 2011-07-02 20:36:44 +00:00
Simon Kornblith
7b41d76b75 Move standalone.xul to separate standalone directory 2011-07-02 04:27:57 +00:00