Commit graph

4000 commits

Author SHA1 Message Date
Dan Stillman
8e52dcca42 Tweak the text a bit in #410 2013-11-13 00:31:45 -05:00
Dan Stillman
0d7e14bb6b Update versions, submodules, and repotime 2013-11-12 00:33:19 -05:00
Dan Stillman
86afad9b35 Fix "columns itemID, tagID are not unique" sync error
I'm not sure what's causing this, but it will quite likely go away in
4.1 regardless.
2013-11-11 23:03:06 -05:00
aurimasv
e21fa7290d Move import.charset preference element to the correct prefpane 2013-11-11 04:37:46 -06:00
Dan Stillman
6d73bd3256 Merge pull request #412 from aurimasv/webdav-sec
Check network errors against SEC error set as well
2013-11-08 00:38:31 -08:00
aurimasv
d9ab469bc8 Check network errors against SEC error set as well 2013-11-08 02:33:20 -06:00
Dan Stillman
f7fe9ab64b Better fix for merging items in unsynced libraries
Addresses a79872436
2013-11-08 03:09:34 -05:00
Dan Stillman
a798724366 Fix error merging items with relations in unsynced library 2013-11-08 03:08:03 -05:00
Dan Stillman
76da3e67fb Tweak the tree row height a bit on Windows 2013-11-08 02:57:09 -05:00
Dan Stillman
5079158772 Remove unnecessary 'return;' 2013-11-08 02:14:52 -05:00
aurimasv
e9f011ab57 Do not show SSL error message for other network errors 2013-11-07 23:48:55 -06:00
aurimasv
8c3cf11df1 Open update wizard in Standalone 2013-11-07 20:56:40 -06:00
aurimasv
8994961c85 Add "Check for Update" button to error alert when DB version is newer 2013-11-07 20:56:40 -06:00
Dan Stillman
331ef4ac34 Apply Fx25 tree-row fix to Windows only, and fix spacing there too
"height: auto" (from another extension's fix for this) actually caused
the bottoms of tree rows to be cut off on Windows (and at least on one
Linux installation with Chinese characters).
2013-11-07 03:23:55 -05:00
Simon Kornblith
77669b5c17 Update to citeproc-js 1.0.502 2013-11-06 12:10:29 -05:00
Dan Stillman
31c36c528c Don't send full-text content in read-only libraries 2013-11-06 11:32:23 -05:00
Dan Stillman
3c16eb2fb3 Update versions 2013-11-06 11:23:03 -05:00
Dan Stillman
92ef3d6c81 Fix error dragging items from My Library to group library 2013-11-06 11:16:58 -05:00
Simon Kornblith
48a852fb32 Bind fulltext shutdown listener to this 2013-11-05 23:22:28 -05:00
Dan Stillman
342e631beb Don't reindex downloaded full-text content if already up to date 2013-11-05 17:20:29 -05:00
Dan Stillman
21546cab88 Update versions, repotime, and submodules 2013-11-05 16:44:50 -05:00
Dan Stillman
9161237e90 Merge branch '4.0_fulltext_sync' into 4.0 2013-11-05 16:21:11 -05:00
Dan Stillman
a47bd95903 Localize full-text sync strings 2013-11-05 16:16:31 -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
Simon Kornblith
dd8c0ecf37 Make sure we broadcast lockReleased on shutdown
Previously a startup error could result in the database being opened
and closed with no lockReleased message
2013-11-05 15:20:48 -05:00
Dan Stillman
d1ef5431ac Back up database before disabling downgrade 2013-11-05 14:34:36 -05:00
Dan Stillman
0ac20d64a0 Cache Zotero.userID and Zotero.libraryID 2013-11-05 13:36:56 -05:00
Dan Stillman
91940e11ad "other computers" => "other linked devices" 2013-11-05 12:43:05 -05:00
Dan Stillman
95a880991d Blacklist some more messages from error reports 2013-11-05 12:41:37 -05:00
Dan Stillman
a3a7a1d0cf Add pref to disable full-text syncing, and prompt existing users on sync
FT sync is enabled by default for new users and configurable in the Sync
prefs.

Also disable downgrades once full-text sync is enabled, since otherwise
someone switching back and forth between old and new versions could miss
full-text content updates.
2013-11-05 05:04:51 -05:00
Simon Kornblith
d927d4148d Don't delete collection on partial import 2013-11-04 23:23:47 -05:00
Simon Kornblith
4ee5ab3453 Remove Zotero.wait() from Zotero.Collection.addItems
Since this is inside a transaction, it could potentially cause more
state check errors
2013-11-04 23:23:47 -05:00
Simon Kornblith
d842779cae Close transaction before updating progress indicator
Should fix #230
2013-11-04 23:23:47 -05:00
Aurimas Vinckevicius
3d1df82836 Don't attempt to select items that are not in the item tree 2013-11-04 14:15:57 -06:00
Dan Stillman
571dfc551c Fix colored tags in group libraries
Pressing the number keys was pulling in colored tags from "My Library".
2013-11-04 05:23:03 -05:00
Dan Stillman
0c3529170f Order by clientDateModified DESC when getting content to upload
This way content from newly added/modified items will get uploaded
before content from older items.
2013-11-04 04:36:39 -05:00
Dan Stillman
a89388e77a Better handling of maxLength and HTML
- Don't truncate before HTML conversion
- Correctly calculate indexed chars and total chars
- Move HTML conversion code into one function
2013-11-04 04:34:51 -05:00
Dan Stillman
0abd903917 Fix index rebuild 2013-11-04 01:53:29 -05:00
Dan Stillman
ccf2a05c49 Don't truncate HTML file content in full-text sync
Also write a cache file for HTML files at index time
2013-11-04 01:44:16 -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
Dan Stillman
afd14ae4b9 Fix PDF tools prompt on pref window open if Search pane not yet loaded 2013-11-03 16:21:10 -05:00
Dan Stillman
6ea0ac2345 Don't try to index non-text files when importing from document
Also call the callback when importing PDFs from the document. I'm not
sure why this wasn't called before, but it seems like it should be.
2013-11-03 14:05:51 -05:00
Dan Stillman
05fef08a63 Store inter-group linked-item relations with target, not source, library
User may not have write access to source library
2013-10-28 23:35:28 -04:00
Simon Kornblith
d76a395a38 Merge pull request #396 from aurimasv/cleanISSN
Fix cleanISSN
2013-10-21 22:37:55 -07:00
Simon Kornblith
645ce6d623 Tweaks to #384
- Prefer btitle to title for OpenURL 1.0
- Remove unnecessary institution mapping (base-field mapped to publisher)
- Formatting fixes
2013-10-22 01:36:26 -04:00
adam3smith
9a39f6a203 add report to COinS export and add some import support 2013-10-22 01:34:44 -04:00
Dan Stillman
f44a56848e Fix "Open Documentation" button in WebDAV verification cert error dialog 2013-10-19 05:56:03 -04:00
Dan Stillman
52b95bfc03 Read 200 bytes instead of 128 in Zotero.File.getSample()
This allows Zotero to detect PDFs with more gibberish at the beginning.

https://forums.zotero.org/discussion/32550
2013-10-18 16:41:04 -04:00
Dan Stillman
1089856622 Closes #397, Support authenticated PAC setups in Standalone
Trigger a proxy authentication prompt at startup if a PAC file is
installed and one of a few randomly chosen big sites requires a proxy.

This also improves general proxy detection by not making a request
to S3 unless it would actually be proxied.
2013-10-17 20:03:06 -04:00
aurimasv
3ad2b4924d Fix cleanISSN 2013-10-14 23:51:08 -05:00
Dan Stillman
db43af33ac Fix "req is not defined" error message (which indicates a WebDAV error) 2013-10-12 02:54:28 -04:00
Dan Stillman
e457e5bdfe Show patents by issue date in timeline view 2013-10-06 23:57:40 -04:00
Dan Stillman
df9439f9a2 Don't fail during file upload if file doesn't yet exist 2013-10-06 23:48:49 -04:00
Simon Kornblith
94b50ca697 Abbreviate word pairs (e.g. New York -> N. Y.) 2013-09-19 23:33:07 -04:00
Aurimas Vinckevicius
84b6d8c5ee If abbreviation is same as key, it's still valid
See http://forums.zotero.org/discussion/32000/overriding-automatic-abbreviations/
2013-09-19 14:06:44 -05:00
Aurimas Vinckevicius
b680bcf375 Abbreviate plural forms of words same as singular 2013-09-18 00:47:28 -05:00
Aurimas Vinckevicius
7f7d78603a Use the longest abbreviation possible.
E.g. Fictional journal "Journal of Annunc Materials" (obviously annunc is not a real word)
Use "annunc-":"annunc." substitution instead of "annu-":"annu." resulting in "J. Annunc Mater." instead of "J. Annu. Mater."
2013-09-17 22:57:28 -05:00
Aurimas Vinckevicius
a55f9b624e Don't drop last word when abbreviating journal names 2013-09-17 21:52:10 -05:00
Aurimas Vinckevicius
6393c3bfe2 Look for abbreviations for longest possible match first 2013-09-17 21:41:34 -05:00
Dan Stillman
f510bd9d64 Debugging for failed file downloads 2013-09-09 16:47:15 -04:00
Dan Stillman
261c17ff51 Lock cursor on 'move' for collection drag on Windows 2013-09-06 16:02:52 -04:00
Dan Stillman
48a94c6716 Force 'move' action for collection drag 2013-09-06 15:52:59 -04: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
Dan Stillman
ea97c3d956 Get rid of Task.spawn in checkForUpdatedFiles(), since no yields are left 2013-09-06 15:23:22 -04:00
Dan Stillman
992f08b8b3 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/storage.js
2013-09-06 14:29:17 -04:00
Dan Stillman
6c0be3426b Use async storage mtime checking in Fx24 on Windows
https://bugzilla.mozilla.org/show_bug.cgi?id=899436 was backported to 24
2013-09-05 16:36:15 -04:00
Dan Stillman
840790926b Fix merging of tags during sync conflict
If an item was added to a tag on one computer and another item was added
to the tag on a different computer, and then they both synced one of the
tags could be removed on the second computer to sync.
2013-09-04 17:53:11 -04:00
Dan Stillman
6eb354bf36 Fix cursor feedback for file drag-in on Linux, where we can set it 2013-09-03 04:49:02 -04:00
Dan Stillman
82769f0b9c Allow moving (instead of copying) files into Zotero
Cmd-drag on OS X, Shift on Windows and Linux

As requested in
https://forums.zotero.org/discussion/31717/delete-source-file-on-import/

Unfortunately due to https://bugzilla.mozilla.org/show_bug.cgi?id=911918
(and another issue on Windows) we can't show proper cursor feedback for
external file drags.
2013-09-03 04:25:35 -04:00
FMB
e262cfa0d5 z's bill session mapped to csl's chapter-number
Following : 59e31879fa (commitcomment-3989222)
2013-08-31 21:59:19 +02:00
FMB
0876d52b2c Update Zotero-to-CSL mapping for legal entries (statute and bill) 2013-08-31 20:17:47 +02:00
Dan Stillman
4d4d074ad9 Fix saving advanced search with no name
Addresses #379
2013-08-31 04:58:16 -04:00
Dan Stillman
94233108ae Fix saving advanced search
Fixes #379
2013-08-31 04:47:39 -04:00
Simon Kornblith
2f275a187c Fix path for translators/styles directories in symlinked dev Standalone build 2013-08-29 11:46:30 -04:00
Simon Kornblith
a5bc68bc17 Fix updating translators and styles from unpacked build 2013-08-28 22:06:28 -04:00
Dan Stillman
5a6e8cb65b Fix secondary function name 2013-08-27 17:13:50 -04:00
Simon Kornblith
ba32544c87 Don't call done handler multiple times on import
Broken by ff0f649a4d
2013-08-27 16:01:40 -04:00
Dan Stillman
ce62e7f29b Fix "Invalid sync state '4'" error 2013-08-27 14:26:29 -04:00
Dan Stillman
976696772d Use SQLite.jsm from Fx24 to fix hang in Fx25+ 2013-08-22 13:08:35 -04:00
Dan Stillman
5d42f06707 Add Zotero.File.deleteIfExists(path) and iterateDirectory(path, gen) 2013-08-21 01:05:04 -04:00
Dan Stillman
b13b46c641 Use consistent style for promises 2013-08-20 16:55:01 -04:00
Dan Stillman
93411a3dac Fix incorrect variables 2013-08-20 16:52:53 -04:00
Dan Stillman
74c679e6d2 Remove non-OS.File storage code, now that last mtime works on Win in Fx24 2013-08-20 12:54:36 -04:00
Dan Stillman
ccc18dd41e Return the promise in Zotero.Translators.loadFromDisk() 2013-08-20 12:43:39 -04:00
Dan Stillman
c1211b0357 Correct variable name 2013-08-20 12:43:09 -04:00
Dan Stillman
8fe02d8b71 Handle input streams and other sources in Zotero.File.getContentsAsync() 2013-08-20 12:42:07 -04:00
Dan Stillman
1be8cf743e Merge pull request #375 from gracile-fr/4.0
4.0 - Localization
2013-08-18 00:54:52 -07:00
Simon Kornblith
0c431e07ef Fix unnecessary reloading of session data
See https://forums.zotero.org/discussion/30740?page=1#Item_16
2013-08-17 17:43:39 -04:00
Simon Kornblith
0490886f28 Merge branch 'async-translators' 2013-08-17 03:47:20 -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
Simon Kornblith
efc4455476 Fix connector server changes for async getTranslators() 2013-08-17 01:23:50 -04:00
Simon Kornblith
f397b0e3d1 Fix Zotero.Translator.save() 2013-08-17 01:18:48 -04:00
Simon Kornblith
8b13d473c7 Import OS.File into Zotero global scope 2013-08-17 01:17:39 -04:00
Simon Kornblith
67e5388598 Fix getTranslatorObject() 2013-08-17 01:11:10 -04:00
Simon Kornblith
b16bfc80e1 Update mimeTypeHandler for asynchronous getTranslators 2013-08-17 00:32:50 -04:00
Simon Kornblith
f58a5ed298 Fix returning translators from Zotero.Translate.getTranslators() 2013-08-17 00:32:29 -04:00
Dan Stillman
4384a8ecc2 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/schema.js
2013-08-16 18:16:59 -04:00
Dan Stillman
2d7d72fb2a Upgrade Q, and change allResolved() to allSettled()
Not fully tested
2013-08-16 18:15:00 -04:00
Simon Kornblith
ba0c33545f More typos 2013-08-16 17:56:10 -04:00
Simon Kornblith
70f04c3d8b Fix typos (thanks @aurimasv) 2013-08-16 17:53:36 -04:00
Dan Stillman
8e2de92ca8 Fix the Quick Copy site editor window 2013-08-16 16:28:23 -04:00
Dan Stillman
e85eaf218a Update quickCopy.js and preferences_export.js for async getTranslators() 2013-08-16 16:27:17 -04:00
Simon Kornblith
540a54515e Async Zotero.Translators.get* and Zotero.Translate.getTranslators
This mostly works, but there is still much to be done:

- getTranslators() calls in preferences_export.js and quickCopy.js need
  to be made asynchronous
- getTranslators() calls in mimeTypeHandler.js need to be made
  asynchronous. This looks hard, since there is a synchronous Mozilla
  API involved
- I need to test lookup, the connector server, and export more to make
  sure that they actually work
- This API needs to be implemented for the connector and bookmarklet
- Translators should be read off the disk using async IO
2013-08-16 13:48:59 -04:00
Dan Stillman
81e94b4475 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/schema.js
2013-08-15 23:32:32 -04:00
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
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
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
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
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
Dan Stillman
4af73f4a52 Fix file sync error in Fx23+ for empty attachment paths
And fix reporting of non-OS.File file sync errors
2013-08-08 13:41:34 -04:00