Commit graph

6200 commits

Author SHA1 Message Date
Dan Stillman
5040fba8bb Use async DB for Zotero.Translators.init()
Zotero.Translators.init() now returns a promise. This will temporarily break
all the Zotero.Translators.get* calls.
2013-08-15 23:21:57 -04:00
Dan Stillman
a901b47d87 Use async file access for saving translators and styles 2013-08-15 22:30:33 -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
gracile-fr
f3137099bc Localize et al. in the middle pane
(Heromyth's PR #358, #360, #361)
2013-08-15 23:15:02 +02:00
gracile-fr
723e8a4e30 Localize Ctrl/Cmd-Shift in Prefs 2013-08-15 22:53:56 +02:00
gracile-fr
355b1fbc57 Localize Ctrl/Cmd-Shift in Prefs 2013-08-15 22:45:04 +02:00
Simon Kornblith
ff0f649a4d Call done handler after saving
Broken by dde09c54a2
2013-08-15 15:50:44 -04:00
Simon Kornblith
e35f254fa1 Use API v2 in connector, part 1 2013-08-15 15:43:24 -04:00
Simon Kornblith
71e7fde327 Return multiple items from Zotero.Utilities.itemToServerJSON() 2013-08-15 15:43:22 -04:00
Simon Kornblith
52a544850a Rename Zotero.ID.getKey() to Zotero.Utilites.generateObjectKey()
(To make it accessible to the connector)
2013-08-15 14:32:15 -04:00
Simon Kornblith
2e4f75a9f0 Rename Zotero.ID.getKey() to Zotero.Utilites.generateObjectKey()
(To make it accessible to the connector)
2013-08-15 14:31:03 -04:00
Simon Kornblith
14192059ce Fix innocuous "itemProgress is not defined" error 2013-08-15 13:59:43 -04:00
Simon Kornblith
dde09c54a2 Fix handling of errors when saving items to data store asynchronously 2013-08-15 13:47:03 -04:00
Dan Stillman
d543936307 Merge pull request #374 from simonster/lazy
Add Zotero.lazy() and use in _getConnectionAsync
2013-08-14 22:00:32 -07:00
Simon Kornblith
857fcfa31d Add Zotero.lazy() and use in _getConnectionAsync
I tried to describe what this function does earlier today and failed.
Hopefully the code is clearer.
2013-08-14 22:17:36 -04:00
Simon Kornblith
c95223724d Create README.md 2013-08-14 16:31:19 -04:00
Dan Stillman
318e5b2dd6 Enable debug line for file sync 2013-08-14 10:51:05 -04:00
Dan Stillman
d4da5fec68 Check the right version when checking for old database 2013-08-13 20:01:47 -04:00
Dan Stillman
9f24dcdb44 Use async DB query for collections-containing-an-item 2013-08-12 16:31:28 -04:00
Dan Stillman
a29f8ea852 Return empty array instead of FALSE for async DB query methods
The exception is valueQueryAsync(), which continues to return FALSE if
there's no result.

Note that this is different from the synchronous query methods.
2013-08-12 16:28:22 -04:00
Dan Stillman
d05c5094c7 Doesn't matter, but cast repo check timestamp to int 2013-08-12 04:12:23 -04:00
Dan Stillman
0ac7a77381 Show bound parameters for async queries 2013-08-12 04:12:10 -04:00
Dan Stillman
995369bc9b Remove unnecessary catch() 2013-08-12 03:57:00 -04:00
Dan Stillman
7135b9f5a7 Remove unnecessary import 2013-08-12 03:55:39 -04:00
Dan Stillman
73a9eb2709 Remove ancient DB_REBUILD config option 2013-08-12 03:52:50 -04:00
Dan Stillman
7780560c1b Move Zotero.Fulltext initialization 2013-08-12 03:10:22 -04:00
Dan Stillman
bf0de6e02f Tidy up some debug messages at startup 2013-08-12 03:10:09 -04:00
Dan Stillman
4a861ef5ea Use promise to get addon version, and remove ZOTERO_CONFIG.VERSION
(This patch is small without whitespace changes.)
2013-08-12 03:06:54 -04:00
Dan Stillman
391b2085b3 Tie bundled files update to initialization rather than timeout 2013-08-12 02:49:26 -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
2b4de89aaf Add Zotero.File.getContentsFromURLAsync(url) for local text files 2013-08-11 20:49:18 -04:00
Dan Stillman
43978624de Better error messages for async DB 2013-08-11 20:48:10 -04:00
Dan Stillman
9e2d872900 Support nested async DB transactions 2013-08-11 20:47:53 -04:00
Dan Stillman
a2816a10ca Return a Q promise from all async DB methods
With send() removed from Q, we can yield Q promises within
executeTransaction() instead of Mozilla promises.
2013-08-10 04:17:34 -04:00
Dan Stillman
957b649fa8 Remove another <Fx23 test 2013-08-10 00:02:57 -04:00
Dan Stillman
2c424c2b58 Take out unnecessary <Fx23 test 2013-08-10 00:00:05 -04:00
Dan Stillman
79d55a32ce Update minVersion/maxVersion 2013-08-09 12:50:25 -04:00
Dan Stillman
b2d46ee2fe Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/db.js
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2013-08-09 12:48:44 -04:00
Dan Stillman
2dc8fc6912 Update versions 2013-08-09 11:50:10 -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
Simon Kornblith
a723c85999 Return a promise from Zotero.shutdown() 2013-08-09 11:11:01 -04:00
Simon Kornblith
8a8093028d Check if callback exists before calling 2013-08-09 11:00:55 -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
8f0dac0eb4 Update version and styles 2013-08-08 15:24:47 -04:00
Dan Stillman
a954d94027 Add missing semicolon 2013-08-08 15:21:11 -04:00
Dan Stillman
d5fcde0612 Disable OS.File for file syncs on Windows <Fx25
stat.lastModificationDate returns the last access date
instead of the modification date due to bug
https://bugzilla.mozilla.org/show_bug.cgi?id=899436
2013-08-08 15:19:37 -04:00
Dan Stillman
84c5a1bffa Tweak error message for OS.File errors during file sync 2013-08-08 14:32:54 -04:00
Dan Stillman
c29720743a Fix file sync error in Gecko 23+ if local file path is too long 2013-08-08 14:31:53 -04:00
Dan Stillman
610017e4df Fix file sync error on Windows 2013-08-08 14:15:41 -04:00