Commit graph

253 commits

Author SHA1 Message Date
Dan Stillman
3a058c68ed Use config URL for all repo requests, and move config to separate file 2014-12-09 18:53:53 -05:00
Dan Stillman
d7d542a79c Update version, submodules, and repotime 2014-12-01 02:17:09 -05:00
Dan Stillman
12619273b5 Update submodules and repotime 2014-10-14 03:26:15 -04:00
Dan Stillman
7541106641 Update Bluebird to 2.3.5
Our modifications no longer include a custom yield handler to
automatically call all() on yielded arrays (which maintained Bluebird
1.x behavior). It's now necessary to call all() or similar explicitly.

Also fixed a few incorrect yields hidden by that behavior.
2014-10-09 14:21:10 -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
490d24f43b Merge branch 'master' into async_db 2014-09-09 00:34:18 -04:00
Dan Stillman
3d7a35addc Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2014-09-08 20:24:44 -04:00
Dan Stillman
14a5643f38 Update submodules, repotime, versions 2014-09-01 14:56:01 -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
b7cba469f0 Add pause() method to ConcurrentCaller
Delay running any new functions for the specified time
2014-08-06 22:14:58 -04:00
Dan Stillman
51713c8030 ConcurrentCaller updates 2014-08-06 22:14:58 -04:00
Dan Stillman
36c5dceff4 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/browser.js
	chrome/content/zotero/longTagFixer.js
	chrome/content/zotero/xpcom/schema.js
	chrome/content/zotero/xpcom/utilities.js
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2014-07-15 22:17:27 -04:00
Dan Stillman
9f379c99e0 Update submodules and repotime 2014-06-24 17:48:37 -04:00
Dan Stillman
09e53d85d5 Revert "Revert "Use Q instead of Task.spawn to run processUpdatedXML()""
This reverts commit 4334260865.
2014-06-20 03:47:01 -04:00
Dan Stillman
4334260865 Revert "Use Q instead of Task.spawn to run processUpdatedXML()"
Fixes "Q.async(...)(...) is undefined" sync error

This reverts commit ad8b81f4c7 (which
tried to fix Fx32+ compatibility).
2014-06-20 03:17:03 -04:00
Dan Stillman
b441e2cf9e Update submodules and repotime 2014-06-18 21:12:25 -04:00
Dan Stillman
ad8b81f4c7 Use Q instead of Task.spawn to run processUpdatedXML()
With Task.spawn, regular expressions in Zotero.DB were causing "too much
recursion" errors on Windows with JIT enabled.

This requires a change to Q to allow async() to take a generator instead
of a generator-maker (which is the reason it was using Task.spawn to
begin with).
2014-06-18 05:03:06 -04:00
Dan Stillman
57116fa892 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/collectionTreeView.js
	chrome/content/zotero/xpcom/libraryTreeView.js
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2014-05-08 15:52:31 -04:00
Dan Stillman
ce9a77e688 Update submodules and repotime 2014-04-28 23:59:45 -04:00
Dan Stillman
b47c80912c Update translators and repotime 2014-04-28 18:30:18 -04:00
Dan Stillman
d8ff3aeea9 Merge branch '4.0'
Conflicts:
	install.rdf
	update.rdf
2014-04-26 03:22:38 -04:00
Dan Stillman
6fa3511f33 Update submodules, repotime, maxVersion, and renamed styles 2014-04-26 01:41:32 -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
Dan Stillman
af5e7abb31 Update versions, submodules, and repotime 2014-03-21 04:10:38 -04:00
Dan Stillman
d7c9b7d55d Update translators and repotime 2014-03-19 01:05:14 -04:00
Dan Stillman
53c4ca3e9e Update translators and repotime 2014-03-18 17:00:41 -04:00
Dan Stillman
4b772d4382 Update submodules, renamed styles, and repo time 2014-03-16 00:22:21 -04:00
Joscha Legewie
e4e75da24e fix copy/paste of non-http links in Notes 2014-02-05 19:09:15 +01:00
Dan Stillman
a6ab904cd0 Note link tweaks
- Send modifier keys through to loadURI() when clicking Open Link in notes
- Open link in parent window from external note window
- Don't show both menus on right-click

Follow-up from #450
2014-02-04 21:02:05 -05:00
Joscha Legewie
2f9c7fd839 TinyMCE Improvements: Open links from note window with popup and auto-create links 2014-02-04 20:58:51 -05:00
Dan Stillman
2cd0d5988f Update submodules and repotime 2014-01-31 18:12:54 -05:00
Dan Stillman
fb5d0b8d1d Bundle log4moz.js, which is needed by Fx24 Sqlite.jsm and was removed from Fx 2014-01-14 19:24:32 -05:00
Dan Stillman
111115a100 Update translators and repotime 2013-12-17 23:41:12 -05:00
Dan Stillman
b82728aeea Update submodules, versions, and repotime 2013-12-13 18:23:04 -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
Dan Stillman
322755e745 Update repotime, submodules, and versions 2013-11-19 01:39:52 -05:00
Dan Stillman
0d7e14bb6b Update versions, submodules, and repotime 2013-11-12 00:33:19 -05:00
Dan Stillman
21546cab88 Update versions, repotime, and submodules 2013-11-05 16:44:50 -05:00
Dan Stillman
62840f3b93 Full-text content syncing
Full-text content is now synced to the server and other clients. Up to
~500K of content is transferred with each sync, so multiple syncs may be
necessary. Downloaded content is written to temporary files and
processed on idle (currently 5 seconds), so synced content may not be
immediately available.

Performance will improve with API syncing and async DB in 4.1.

This also includes some other full-text tweaks, such as storing
text converted from HTML in cache files, which may speed up phrase
searching.
2013-11-03 19:14:10 -05:00
Simon Kornblith
c4158a5339 Fix name on abbreviations list 2013-09-19 23:48:20 -04:00
Simon Kornblith
55fd7edfaf Update abbreviations.json
Remove overrides for titles we now abbreviate correctly, and don't
delete potential prepositions that are rarely used as such in journal
titles ("hyphen", "midst", "minus", "modulo", outside", "pace", "past",
"plus", "round", "save", "til", "till", "times", "vice", "worth")
2013-09-19 23:33:38 -04:00
Florian Martin-Bariteau
38580e2366 Update renamed-styles.json
Updates from https://github.com/citation-style-language/styles/blob/master/renamed-styles.json
2013-09-16 20:26:30 -04:00
Florian Martin-Bariteau
cb62bdbb86 Update renamed-styles.json
Updates from https://github.com/citation-style-language/styles/blob/master/renamed-styles.json
2013-09-16 20:15:23 +02:00
Dan Stillman
976696772d Use SQLite.jsm from Fx24 to fix hang in Fx25+ 2013-08-22 13:08:35 -04:00
Dan Stillman
fae742c94e Remove errant letter 2013-08-21 01:03:10 -04:00
Dan Stillman
89c5690899 Revert q.js change that broke Q.async(function() { var x = yield y }); 2013-08-18 03:29:39 -04:00
Dan Stillman
2d7d72fb2a Upgrade Q, and change allResolved() to allSettled()
Not fully tested
2013-08-16 18:15:00 -04:00
Dan Stillman
28ca0a3599 Fix DB initialization with async DB access
Also fix the initial repository check to trigger after initialization is
complete instead of waiting
2013-08-15 17:35:16 -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
Dan Stillman
ece36438e3 Revert "Disable spellchecking in notes until it can be supported for real"
This reverts commit b82876253c.

We can just leave this alone until we have a proper fix.
2013-08-09 11:44:34 -04:00
Dan Stillman
b82876253c Disable spellchecking in notes until it can be supported for real
https://forums.zotero.org/discussion/19771/workaround-to-disable-spell-checker/

Right now you can't iteract with it (to add/ignore words) or change the
language (which is probably only English in Standalone) or disable it
(without going to about:config).
2013-08-09 11:37:29 -04:00
Dan Stillman
5b09b1e2be Update submodules, repotime, and versions 2013-08-06 15:23:04 -04:00
Dan Stillman
55f044f87a Disable send() method in Q promise for Mozilla Task.jsm compatibility
Task.jsm allows not only generators but also iterators to be yielded,
using ``typeof yielded == 'Function'`` as the test for an iterator, but
since the Q promise includes a send() method, yielding a Q promise
instead of a Mozilla promise results in an infinite loop. To fix this,
we disable Q's send() method, which is just an outdated synonym for
invoke() anyway.

This will have to be done every time we update Q until send() is
removed, Task.jsm is changed, or we stop using Task.jsm with Q promises.
2013-07-22 20:27:53 -04:00
Dan Stillman
112b6f629e Update submodules and repotime 2013-07-22 02:29:17 -04:00
Dan Stillman
59550167a7 Move TinyMCE into resource://
This fixes CSS in popups and probably other things.
2013-07-12 00:40:03 -04:00
Dan Stillman
7ec7039a9a Update repotime, submodules, renamed styles, and versions 2013-07-11 23:21:28 -04:00
Simon Kornblith
6ef9a061f3 Only use Components.utils.methodjit when supported
As Boris Zbarsky pointed out in
https://bugzilla.mozilla.org/show_bug.cgi?id=878679,
the setTimeout() hack doesn't help in Firefox 23 and later. For now we
use the useMethodjit hack when available, so that performance won't
regress for Firefox 23, and cross our fingers that
https://bugzilla.mozilla.org/show_bug.cgi?id=776798 is fixed for
Firefox 24.
2013-06-06 19:38:48 -04:00
Simon Kornblith
1cee348f51 Revert "Remove use of Components.utils.methodjit"
This reverts commit 53a4d987b6.
2013-06-06 19:31:09 -04:00
Simon Kornblith
53a4d987b6 Remove use of Components.utils.methodjit
It appears that this flag can no longer be set in new-ish Nightlies.
This patch switches code that used nsITimers with the
Components.utils.methodjit hack to use setTimeout on the hidden DOM
window instead, so that we still get the JIT. (See
https://bugzilla.mozilla.org/show_bug.cgi?id=776798)

This might also mean that callbacks from doGet etc. no longer get JITed.
At some point, we should test this with the JIT profiler.
2013-06-05 18:12:52 -04:00
Dan Stillman
35f1720b08 Add missing index to creatorData table
It's amazing what you can find when you actually have a profiler.
2013-05-01 18:00:28 -04:00
Dan Stillman
e442279210 Update submodules and repotime 2013-05-01 01:11:34 -04:00
Dan Stillman
0c11af4361 Update renamed-styles.json 2013-04-27 04:52:18 -04:00
Dan Stillman
6b3c5fcc33 Update renamed-styles.json and translator submodule 2013-04-22 01:52:00 -04:00
Dan Stillman
d17c34e093 Update submodules and repotime 2013-04-22 01:43:22 -04:00
Dan Stillman
9b1b4803dc Update submodules and repotime 2013-04-15 22:26:36 -04:00
Dan Stillman
c2ddecc8a3 Update renamed styles list 2013-04-15 22:25:03 -04:00
Dan Stillman
4f6fbf364d Use renamed-styles.json and flag from repo to replace renamed styles
Currently updating renamed-styles.json is a manual process.
2013-04-15 02:56:32 -04:00
Dan Stillman
3054a554be Update translators and repotime 2013-04-07 19:45:47 -04:00
Dan Stillman
cb05744207 Update submodules and repotime 2013-04-04 01:09:37 -04:00
Dan Stillman
bb563570f3 Update submodules and repotime 2013-04-01 02:39:40 -04:00
Dan Stillman
fa8b11c46c Update submodules and repotime 2013-03-29 03:39:28 -04:00
Dan Stillman
09bd70230f Update translators and repotime 2013-03-26 13:36:40 -04:00
Dan Stillman
7fbfdce00e ConcurrentCaller -- run a fixed number of concurrent async functions
If the functions return promises, the caller will wait until they're
fulfilled and slots open to start new functions.
2013-03-26 02:50:00 -04:00
Simon Kornblith
253c22f58c Use latest csl-validator 2013-03-23 17:30:34 -04:00
Dan Stillman
f5d33a3a0c Update submodules and versions 2013-03-22 02:34:12 -04:00
Dan Stillman
83cd3c49b0 Update submodules 2013-03-20 22:55:41 -04:00
Dan Stillman
e68f87fc83 Update translators and repotime 2013-03-14 02:42:01 -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
f92ed125b6 Merge branch '3.0' into 3.1
Conflicts:
	chrome/content/zotero/tinymce/note.html
	chrome/content/zotero/tinymce/noteview.html
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2013-02-25 12:46:43 -05:00
Simon Kornblith
4d2cee7824 Support journal abbreviations
Currently disabled by default
2013-02-24 05:57:28 -05:00
Dan Stillman
1575cfa84a Update Q library 2013-02-18 02:33:12 -05:00
Dan Stillman
ee16d96f92 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/preferences/preferences.xul
	chrome/content/zotero/xpcom/storage/webdav.js
	chrome/locale/gl-ES/zotero/zotero.dtd
	chrome/locale/gl-ES/zotero/zotero.properties
	chrome/locale/zh-CN/zotero/zotero.dtd
	chrome/locale/zh-CN/zotero/zotero.properties
	install.rdf
	update.rdf
2013-02-16 05:07:59 -05:00
Dan Stillman
0b89ccadf9 Update Q library 2012-12-11 03:30:47 -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
ac195d2a5e Merge branch '3.0'
Conflicts:
	chrome/content/zotero/integration/quickFormat.js
	chrome/content/zotero/xpcom/attachments.js
	chrome/content/zotero/xpcom/utilities.js
	install.rdf
	styles
	update.rdf
2012-11-20 03:22:49 -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
bd367dcd85 Merge branch '3.0' 2012-11-11 17:15:30 -05:00
Simon Kornblith
73f775950d Merge branch '3.0'
Conflicts:
	chrome/content/zotero/xpcom/cite.js
2012-11-08 09:40:18 -05:00
Simon Kornblith
bdfbfc10b2 Use methodjit... 2012-07-30 02:37:39 -04:00
Simon Kornblith
f3ca563f9b Add license to csl-validator.js 2012-07-10 20:00:16 -04:00
Simon Kornblith
a35461e2fc Rename q.jsm to q.js, and use a version of q that's closer to the original and allows use in script tags as well 2012-07-10 15:27:38 -04:00
Simon Kornblith
06825c4767 Validate CSL styles on installation, and restructure Zotero.Styles.install() to use Q.
Closes https://www.zotero.org/trac/ticket/1681, automatic CSL validation
2012-07-10 02:46:57 -04:00
Simon Kornblith
34a2239fa1 Update q from upstream 2012-07-09 21:01:29 -04:00
Simon Kornblith
723213f11f Merge branch '3.0'
Conflicts:
	chrome/content/zotero/xpcom/translation/translate_firefox.js
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2012-07-04 18:24:17 -04:00
Simon Kornblith
c4cb783317 Add q promise library (as jsm) 2012-06-03 00:43:42 -04:00
Simon Kornblith
4e5d4281f1 Merge branch '3.0' 2012-05-26 18:24:52 -04:00
Dan Stillman
d456117ebe Merge branch '3.0' 2012-05-03 17:56:32 -04:00
Dan Stillman
17e9c466d0 Merge branch '3.0' 2012-02-17 04:26:58 -05:00
Simon Kornblith
09813b145d Merge branch '3.0' 2012-02-14 15:00:07 -05:00
Simon Kornblith
e29c87c77b Merge branch '3.0' 2012-02-11 00:41:24 -05:00
Dan Stillman
3a4401a995 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/xpcom/integration.js
	chrome/content/zotero/xpcom/storage/webdav.js
	chrome/content/zotero/xpcom/storage/zfs.js
	install.rdf
	update.rdf
2012-02-09 02:13:02 -05:00
Simon Kornblith
be38be66f7 Don't unpack xpi 2012-01-29 15:15:23 -05:00