Commit graph

1972 commits

Author SHA1 Message Date
Simon Kornblith
d11e78de0e Save webpage snapshots from connectors when Zotero Standalone is running 2011-07-27 21:01:21 +00:00
Dan Stillman
9ac7efb3f0 Fix "Zotero.Libraries.getGroupIDFromLibraryID" in new code 2011-07-27 14:20:47 +00:00
Dan Stillman
4581923154 Fix "Zotero.Libraries.getGroupIDFromLibraryID" is not a function error 2011-07-27 14:20:04 +00:00
Dan Stillman
455eb68c20 Persist open/close state of source list (libraries, collections, etc.) 2011-07-25 21:27:32 +00:00
Dan Stillman
ca56fbbb2b Fix at least one cause of "'[num]' is not a valid field for type [num]" 2011-07-25 03:45:43 +00:00
Dan Stillman
9dad54702f Fix advanced search 2011-07-25 00:55:14 +00:00
Simon Kornblith
32399b35ed Hide "Remove Selected Item" when in My Library (previously was shown with no label, leading to a blank menu item with ~2px height) 2011-07-24 21:43:02 +00:00
Simon Kornblith
88c6eae730 Kill progress indicator and buttons in add by identifier box. We might want to replace the progress indicator with something else, but the buttons are unnecessary. 2011-07-24 21:32:55 +00:00
Simon Kornblith
f701dd724e Firefox 3.6 fixes (ugh) 2011-07-24 19:16:31 +00:00
Simon Kornblith
617646f0a2 Cancel should close lookup panel 2011-07-24 17:49:16 +00:00
Simon Kornblith
09e07df294 Delete obsolete file 2011-07-24 17:42:29 +00:00
Simon Kornblith
a5cdfc2cef Use arrow panel for "Add Citation by Identifier" 2011-07-24 17:41:48 +00:00
Simon Kornblith
7845588291 Fix handling of errors when no message is returned 2011-07-24 17:41:00 +00:00
Simon Kornblith
ff304bd7be Fix IPC pipe closing on Fx 3.6 (again) 2011-07-24 16:27:42 +00:00
Dan Stillman
ddca12ba26 Match only books by ISBN, since book sections shouldn't be merged 2011-07-22 22:41:42 +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
e945b84b5f Backing out r9930, as it causes serious issues on Windows 2011-07-22 07:09:40 +00:00
Simon Kornblith
68cbef118f Rounded add citation dialog 2011-07-22 07:05:08 +00:00
Simon Kornblith
1650af161a Use ctypes to bring only dialog to foreground, and not the rest of Firefox, on OS X 2011-07-22 01:45:40 +00:00
Simon Kornblith
89fc597aa4 nsIFile.isSpecial() is not implemented on Fx 3.6, but we can still use nsIFile.isFile() to determine whether or not this is a pipe. Ugh. 2011-07-21 23:01:13 +00:00
Simon Kornblith
63db2a4aaa Remove unnecessary lastUpdated optimization in translator regexp, allowing lastUpdated to be anywhere in the JSON in connector too 2011-07-21 19:29:32 +00:00
Dan Stillman
7b469e3d6f Remove unnecessary lastUpdated optimization in translator regexp, allowing lastUpdated to be anywhere in the JSON 2011-07-21 19:16:19 +00:00
Simon Kornblith
491c44c74c Don't append browserSupport when saving if it doesn't exist, since it's unnecessary and screws things up 2011-07-21 18:42:26 +00:00
Simon Kornblith
3611a4ea30 - Show "via Zotero Standalone" in tooltip for translators that use Zotero Standalone
- Don't write out all the charsets while loading the charset menu
2011-07-21 04:08:49 +00:00
Simon Kornblith
6a8be039d0 Revert to throwing parse errors as non-string 2011-07-20 21:55:50 +00:00
Simon Kornblith
936069165b Fix reporting of error line numbers 2011-07-20 21:53:38 +00:00
Simon Kornblith
7a34d09f58 Show actual error message as a string as well 2011-07-20 21:29:21 +00:00
Simon Kornblith
5235dcfa9f Show error messsage on parse error 2011-07-20 21:27:48 +00:00
Simon Kornblith
d502de2981 Eventually clear out defunct "pipes" (which are actually plain files that get polled because of concurrency issues) created by Fx 3.6 2011-07-20 19:25:39 +00:00
Simon Kornblith
cd4f9e7235 Save application/xhtml+xml using WebPageDump
Fixes http://forums.zotero.org/discussion/18808/bug-snapshot-of-page-produces-xml-parsing-error/
2011-07-20 13:31:18 +00:00
Simon Kornblith
94a42524e7 Use "exports" instead of "Export" for exported properties, in line with the CommonJS spec 2011-07-20 04:39:38 +00:00
Simon Kornblith
afcf0ff712 Update to citeproc-js 1.0.195 2011-07-20 04:26:18 +00:00
Simon Kornblith
122eb38d29 Fix charset menu under Zotero Standalone 2011-07-20 04:23:01 +00:00
Simon Kornblith
3e26c36b69 Use Zotero.startupError for connector-related errors and use the DB busy error if Zotero switched to
connector mode and then couldn't contact the connector.
2011-07-20 03:48:17 +00:00
Simon Kornblith
c24aad3af4 Add incompatible version message to Firefox 2011-07-20 03:35:21 +00:00
Simon Kornblith
64b4d3fd47 - Add copyright notice to some files where it was missing
- Move progress window code to separate file
- Merge connector_debug.js and connector.js
2011-07-20 03:22:43 +00:00
Simon Kornblith
bd1d298ee9 Fix a strict mode warning 2011-07-20 03:12:31 +00:00
Simon Kornblith
c6b30b94e4 Fix error on failure to open DB (broken since megacommit) 2011-07-20 03:07:07 +00:00
Simon Kornblith
ea02f39f3e Bring standalone to foreground before issuing incompatible version warning, at least on OS X 2011-07-19 22:23:55 +00:00
Simon Kornblith
4e0da80afc Show incompatible version dialog in Standalone if connector is outdated 2011-07-19 22:21:19 +00:00
Simon Kornblith
4dcaf2907f API version checking 2011-07-19 21:57:32 +00:00
Simon Kornblith
4067a1b820 Fix cookie sandboxing in connector 2011-07-19 03:52:02 +00:00
Simon Kornblith
a4bcc4244c Don't save tests in JSON, since they aren't particularly useful to us 2011-07-18 22:19:43 +00:00
Simon Kornblith
b6c8fb4483 Make debug messages a little nicer 2011-07-18 22:11:40 +00:00
Simon Kornblith
2cd8ac04e2 Stringify invalid objects when saving items 2011-07-18 21:57:15 +00:00
Simon Kornblith
ce1b3e099a Only call callback once 2011-07-18 21:37:38 +00:00
Simon Kornblith
e7d5f31d04 Restore ability to run multiple translator tests simultaneously 2011-07-18 21:33:55 +00:00
Simon Kornblith
9f218caf75 - Ability to serialize and reload translator tests from translator tester (addresses #1842, Translator unit test automation)
- Fix a spacing issue in preferences
2011-07-18 21:14:51 +00:00
Simon Kornblith
59066e40b7 Don't add Access-Control-Allow-Origin headers to Safari 2011-07-18 20:51:14 +00:00
Simon Kornblith
4c9b5935e8 - Improvements to server.js for translation-server
- Optimizations. The biggest of these is to simplify our mechanism of wrapping functions for Fx 4+, which gives us roughly a 3x speed boost in RIS import. However, zotero-node is still ~20% faster than translation-server, and RDF import/export may still be too slow for very large numbers of references. A large part of the RDF overhead seems to come from the number of function calls we make, which numbers in the hundreds of thousands for a 2.5 MB file.
2011-07-16 20:47:17 +00:00
Simon Kornblith
55c331e68b Don't say anything when async processes are incremented or decremented 2011-07-14 19:19:08 +00:00
Simon Kornblith
6fabce1d80 Remove unused code 2011-07-14 15:01:51 +00:00
Dan Stillman
066cae3dbb Include query in db parameter errors 2011-07-14 14:19:16 +00:00
Simon Kornblith
06acd954df No need to notify us that an event listener is being added 2011-07-14 00:01:14 +00:00
Simon Kornblith
9adbf332e3 Streamline browser.js and fix ZoteroItemUpdated event 2011-07-13 23:56:37 +00:00
Simon Kornblith
59459df0ff Don't pop up a message when running conflicting Zotero versions simultaneously 2011-07-13 21:19:15 +00:00
Dan Stillman
70371a868b Work around ellipsis-mangling bug in Firefox 2011-07-13 21:18:32 +00:00
Simon Kornblith
971dd5c69c Don't open a new integration pipe if there is already an integration pipe open. Fixes hangs on shutdown after launching multiple Zotero instances. 2011-07-13 16:41:00 +00:00
Simon Kornblith
ff90005ed2 Fix breakage from r9839 2011-07-13 03:06:00 +00:00
Simon Kornblith
e0a73db0db Fix translation with unsupported translators via Zotero Standalone (broken by r9791) 2011-07-13 01:47:50 +00:00
Dan Stillman
347c86b85a Proper ellipsis in Zotero.Utilities.ellipsize() 2011-07-12 16:40:23 +00:00
Simon Kornblith
289983f486 Some very small modifications for translator test support in zotero-node that are probably never going to get used 2011-07-12 07:41:51 +00:00
Simon Kornblith
3238656ca0 - Zotero.Translate.Import#getTranslators should return translators when they are available
- Add deprecation warning for select handler without a callback
2011-07-12 04:34:06 +00:00
Simon Kornblith
4d307c1865 Move translate_generic.js back to translate_inject.js, since it is no longer used in zotero-node (and should properly only be used for injected scripts) 2011-07-12 02:00:13 +00:00
Simon Kornblith
ec6f894e1a Addresses #1805, Add "Create Item from Current Page" contextual menu item and/or browser button
Adds "Create New Item from Current Page" context menu option. We can add a toolbar button too if we can come up with an icon for it.
2011-07-12 01:38:17 +00:00
Simon Kornblith
ffd671ce7b - Remove references to Zotero.JSON
- Add deprecation warning in case any external code makes use of Zotero.JSON
- Fix some strict mode warnings in zotero.js
2011-07-11 22:37:37 +00:00
Simon Kornblith
4783051f4e - Properly handle multiple item selection in context/locate menu
- Don't show context menu options when >20 items selected
2011-07-11 22:19:10 +00:00
Simon Kornblith
c1ae9f3460 Fix PDF recognition 2011-07-11 17:41:33 +00:00
Simon Kornblith
ba12583b22 - Fix download overlay
- Fix RIS/Refer intercept progress
2011-07-11 17:38:25 +00:00
Simon Kornblith
b1cec43982 Closes #1620, Replace lowercase Transform Text option with sentence case 2011-07-11 17:25:31 +00:00
Simon Kornblith
5e8c9669ea Closes #1863, Add transform -> sentence case option 2011-07-11 17:14:51 +00:00
Simon Kornblith
5197f1e78b - Closes #1793, Add update button to standalone
A "Check for Updates" menu item is now available (under the Zotero menu on OS X, or the Help menu on other platforms). This will currently give a 404 unless you build Zotero Standalone as from the "beta" channel.

- Don't add About menu option to help menu on OS X (only to Zotero menu)
2011-07-11 14:54:51 +00:00
Simon Kornblith
5f536abaeb Missed file from r9815 2011-07-11 05:00:04 +00:00
Simon Kornblith
a4e9775abc update to citeproc-js 1.0.190 2011-07-11 03:36:33 +00:00
Simon Kornblith
07ae9839a6 Fix connector switching on Linux, and decrease the probability of a hang on shutdown 2011-07-11 01:51:02 +00:00
Simon Kornblith
0e820b8eb3 Update to citeproc-js 1.0.189 2011-07-11 00:15:53 +00:00
Simon Kornblith
e58a682107 Fix Zotero Commons bucket creation 2011-07-10 23:28:12 +00:00
Simon Kornblith
f9b074496f Better error for unsupported translator 2011-07-10 22:55:27 +00:00
Simon Kornblith
d47381512e Fix relative URL resolution in Chrome/Safari/Node 2011-07-10 22:51:22 +00:00
Simon Kornblith
bf698c65c6 Register event listener for ZoteroItemUpdated 2011-07-10 22:21:13 +00:00
Simon Kornblith
0b36cc47b9 Fix handling of relative URIs 2011-07-10 21:59:19 +00:00
Simon Kornblith
dde68a51fe Closes #1859, Author misordering in COinS when rft.au and rft.aulast combine
Thanks to Avram for the patch
2011-07-10 21:40:08 +00:00
Simon Kornblith
2900f9dcbe - Don't attempt to use connector when it is not available
- Remove some old debug messages that are no longer necessary
2011-07-10 20:25:16 +00:00
Simon Kornblith
69b53b1583 Closes #1860, Scaffold can't safely test collection creation
Zotero.Translate#translate(false) should no longer create collections. There was already a collectionDone event; it now gets the unprocessed collection object when false is passed to Zotero.Translate#translate.
2011-07-10 18:02:09 +00:00
Simon Kornblith
5aa3189dd1 - Only log translator parse error once
- Fix export (broken by last commit)
- Use init() instead of reset() in Zotero.Translate.IO.Write
- Don't use toSource() in date.js
2011-07-08 07:20:04 +00:00
Simon Kornblith
5cf6a1cff3 - Only call Zotero.wait() in translate.js if it is defined
- Don't try to use Zotero.getString() in strToDate if it is not defined
- Add getBaseIDFromTypeAndField to connector/cachedTypes.js and fix getItemTypeFields
2011-07-08 04:20:05 +00:00
Simon Kornblith
ed3bc7d1f7 Don't send 500 response without logging error 2011-07-08 03:54:29 +00:00
Simon Kornblith
e2993b94a4 - Use jsdom in node.js for unescaping HTML
- Add itemToExportFormat and itemToServerJSON utility functions
- Support asynchronous translator loading (this will only be used in node.js)
- Fix cases where Safari/Chrome code was incorrectly applied in node.js
- Add Zotero.ItemFields.getItemTypeFields() to connector cachedTypes.js
2011-07-08 03:42:26 +00:00
Dan Stillman
167806a5bd Move deleted.txt to translators directory 2011-07-07 18:43:34 +00:00
Dan Stillman
439bca9b3b It shouldn't make a difference, but use the correct post-gzip content type for debug output uploads 2011-07-07 16:20:30 +00:00
Simon Kornblith
599f50455e - Fixes #1855, TypeError: Converting circular structure to JSON in handler 0 for itemSaving
- Rename translate_webkit.js to translate_generic.js, since it's also going to get used for server side translation
2011-07-06 16:34:41 +00:00
Simon Kornblith
8640bbf37b make handling of failure in _loadTranslator consistent 2011-07-06 13:37:18 +00:00
Simon Kornblith
75b354a67e Closes #1854, XML mode import issues 2011-07-06 13:29:06 +00:00
Simon Kornblith
0add2d07e6 Move Zotero.varDump to Zotero.Utilities 2011-07-06 07:39:49 +00:00
Simon Kornblith
c8d5e0b8c6 Complete with error if translator fails to load 2011-07-04 17:29:35 +00:00
Simon Kornblith
81693ca665 Handle single field mode properly (should fix Sean's JSTOR issue) 2011-07-04 17:29:09 +00:00
Simon Kornblith
631dff69b7 Also set capitalizeTitles = false on test creation 2011-07-04 17:07:55 +00:00
Simon Kornblith
fb87bded88 Closes #1852: Test success may depend on capitalizeTitles preference 2011-07-04 17:05:42 +00:00
Simon Kornblith
763d46a565 Don't wrap HTML documents with Zotero.Translate.SandboxManager.Fx5DOMWrapper when performing XPath operations. If we encounter a problem with XML documents at some point, I'll try to figure out how to replace this with a proxy.
Fixes #1851: Voyager translator fails on Newberry catalog in Fx5, Zotero trunk
2011-07-04 16:50:56 +00:00
Simon Kornblith
1774962de9 - Refactor Zotero.Translate save process. There are now itemSaving and itemDone handlers. The itemSaving handler is called as soon as the translator returns an item, but before it's saved to the database. The itemDone handler is called when the item is saved. This allows us to show a grayed-out item icon in the connector while the item is saving to server, and then un-gray it when it is saved to the server.
- Move Zotero.randomString() to Zotero.Utilities
- Fix import of collections (broken by recent commits)
2011-07-04 09:08:49 +00:00