Commit Graph

964 Commits

Author SHA1 Message Date
Dan Stillman
f87d29a6b9 Zotero.MIME fixes:
- Don't try to get MIME type from extension if extension is blank
- Add text/css to native text types, even if snapshots add some html tags (why is that?)
- Get rid of extraneous "this." prefixes
2006-12-06 00:08:38 +00:00
Dan Stillman
be5ddb1505 Add support for taking snapshots of files handled by plugins (e.g. Flash, QuickTime, PDFs) with importDocument()
Apparently nsIWebBrowserPersist's nsIWebProgressListener never reaches STOP_STOP and STATE_IS_NETWORK in onStateChange() for plugin-handled files, so the import process wasn't completing. I'm now using onProgressChange() for such files.

Also:

- Moved DB commits out of callbacks so that transactions aren't left open if the progress listener never completes
- Blocked attempts to call snapshots on plugin files with file:// URLs, since they're one case where the listener doesn't work properly 
- Added Zotero.MIME.hasNativeHandler() to be able to distinguish between natively handled files and plugin-handled files.
- Fixed a couple bugs that might have made prevented snapshots from working properly
2006-12-05 23:23:01 +00:00
Dan Stillman
9bc8d1356a Another attachment error recovery improvement 2006-12-05 16:57:12 +00:00
Dan Stillman
023e755eb6 Allow a DB.rollbackTransaction() even if a transaction isn't in progress 2006-12-05 16:50:47 +00:00
Dan Stillman
02f205e919 Fix snapshots of pages without extensions on Linux -- nsIMIMEService::getPrimaryExtension() doesn't work on Linux
Better error recovery in attachment methods
2006-12-05 16:49:31 +00:00
Dan Stillman
a16552cd72 Fixes #423, show/hide keyboard shortcut doesn't work unless Zotero pane is de-selected
I believe this should fix the problem without any ill effects.
2006-12-04 08:17:05 +00:00
Dan Stillman
b92830fb28 Might as well not go out of our way not to work in IE... More CSS fixes coming. 2006-12-01 19:44:59 +00:00
Dan Stillman
d3e29108a8 Addresses #400, Report generation
A work in progress:

- Implemented zotero:// custom protocol handler, which will likely be useful for other things too
- First version of XHTML/CSS detail view -- definitely needs feedback, work, and refinement but is more or less functional
- Added XUL-side interface and context menu options for loading report URLs

Going forward:

- Other formats (RTF, CSV)
- Other views (list view, annotated bibliography, etc.)
- Report options window (let the user which fields to include (with saved templates?))
- Ability to specify custom CSS files?
- Extension of Zotero protocol handler to trigger Zotero events? This would allow more interactive reports with the ability to click to select items in the Z pane, run searches by clicking on tags, etc., but would have to be limited to idempotent actions.

Other changes:

- ZoteroPane.getSortField() and ZoteroPane.getSortDirection() 
- Zotero.Utilities.htmlSpecialChars(str)
- Fixed sort direction in items pane (triangle icon now goes the right direction, though the default direction on clicking a new column is incorrect)
- firstCreator now included in toArray(), though it's not particularly correct (#287, more or less)
- ZoteroPane.getSelectedCollection/SavedSearch/Items now take asIDs parameter to return ids instead of objects
2006-12-01 06:01:26 +00:00
Dan Stillman
ab7f618a3e Allow loading of saved search in constructor 2006-12-01 05:37:21 +00:00
Sean Takats
e0d955afba closes #373 page numbers not captured in PubMed/HubMed 2006-11-29 16:42:09 +00:00
Dan Stillman
412bf73a3c Fix broken tag selector 2006-11-29 05:08:20 +00:00
Dan Stillman
2ccdd3a51d Added prefs extensions.zotero.debug.log and extensions.zotero.debug.level to determine terminal logging, defaulting to off 2006-11-28 19:34:56 +00:00
Dan Stillman
9a7c18ed5e Had to repush some scrapers, since apparently phpMyAdmin on the server replaces \n with \r\n on edits, pushing some over the b2.r2 limit 2006-11-27 22:58:36 +00:00
Sean Takats
e391844acd closes #387 year in date field is truncated. 2006-11-27 14:15:27 +00:00
Dan Stillman
edccbe4ad8 Zotero.safeDebug() -- for displaying objects without worrying about recursion or errors 2006-11-26 23:55:12 +00:00
Dan Stillman
f545e6a884 Setting minVersion for Google Scholar and Embedded RDF to 1.0.0b3.r1 2006-11-26 23:53:47 +00:00
Dan Stillman
24ae82b07f Aleph/arXiv/CrossRef/CiteBase pushed to repo 2006-11-26 23:50:58 +00:00
Dan Stillman
361a1e4bc6 Add minVersion/maxVersion to translators schema and schema update mechanisms (local and remote) -- these aren't really necessary on the client but let us use the same SQL to update the repo, and we probably should include them in error reports (instead of relying on different timestamps to differentiate versions)
Added minVersion and maxVersion times to existing scrapers, setting 1.0.0b3.r1 as minVersion for any >4096 characters; these could theoretically now be added back to the repository without problems, but there's not really much reason to test that theory at the moment
2006-11-26 09:19:07 +00:00
Dan Stillman
79a6950f48 Version numbers to b3.r1 2006-11-26 08:46:36 +00:00
Dan Stillman
c8cecf4b7e Pushed updated NYT and Google Books translators to repo
Refs #409, Google Books translator broken after site update
Refs #380, Archived New York Times articles accessed via TimesSelect aren't detected
2006-11-25 19:59:45 +00:00
Sean Takats
88d8f19ece closes #409, google books translator broken after site update 2006-11-25 19:22:33 +00:00
Sean Takats
fc2be5bf21 closes #380 by updating translator regex to run against select.times.com. note that the example article in #380 still will not display the zotero icon or scrape, since that article does not contain the standard meta tags that we use to scrape nytimes articles. other timesselect content now does scrape, however. 2006-11-25 04:07:50 +00:00
Simon Kornblith
38531da9fa closes #396, accents are lost when scraping multiple items (with InnoPAC) 2006-11-25 03:41:13 +00:00
Simon Kornblith
5caf0d2803 made arXiv/eprintweb translator work with lists of recent articles, etc. 2006-11-25 03:16:33 +00:00
Simon Kornblith
e201c3b580 made arXiv translator work with eprintweb as well 2006-11-25 02:53:38 +00:00
Simon Kornblith
05b3cd8566 - added arXiv.org translator
- added CiteBase OpenURL search translator (although CiteBase COinS still won't work, because you can't look most of them up with the CiteBase resolver; ugh)
- fixed Amazon translator type ID (12 -> 4)
2006-11-25 02:13:17 +00:00
Simon Kornblith
94302bbe1c closes #403, Aleph translator not working
i modified the XPath the Aleph translator uses to something that should work in nearly every case.
2006-11-25 00:01:24 +00:00
Dan Stillman
cc8ef0b93d Fixes #377, Problems scraping from Hubmed/PubMed
Fixes #381, SIRSI scraper no longer working at William & Mary

And new Amazon scraper. And a few COinS errors. And possibly some others.

It turns out Firefox has a bug in which DOM nodeValues greater than 4096 characters are split into multiple nodes, and so any scrapers pulled from the repository with 'code' fields greater than 4K were being truncated. We didn't see it during testing of repo code because most are smaller.

Calling normalize() on the node combines the nodes, so future releases won't have the problem regardless of when it's fixed in Firefox. For existing installs, I managed to get PubMed, COinS, SIRSI 2003+, and, with quite a lot of effort, Amazon, under 4096 characters, hopefully without breaking anything. I removed all other scrapers from the repository for now.
2006-11-24 06:09:17 +00:00
Dan Stillman
7a1339158a Display a warning sign over the Zotero logo in the status bar if there's a startup error 2006-11-22 15:51:55 +00:00
Sean Takats
6ff2168729 Amazon scraper now supports international Amazon sites and retrieves data from Amazon's API 2006-11-21 21:56:13 +00:00
Dan Stillman
a5594cb4dc Added a hidden separator in the actions menu that utilities can unhide and add a menu option after -- this will allow for a section for utility options without having a menuseparator for each one
<menupopup id="zotero-tb-actions-popup">
	<menuseparator id="zotero-tb-actions-utilities-separator" hidden="false"/>
	<menuitem insertafter="zotero-tb-actions-utilities-separator" label="Hello world"/>
</menupopup>
2006-11-21 16:40:44 +00:00
Dan Stillman
5cba06673e Add ids to actions menu for utility overlay hooks 2006-11-21 16:29:25 +00:00
Dan Stillman
c371dd7603 Fix old methods in Notifier 2006-11-21 16:24:33 +00:00
Dan Stillman
c72df62264 Fix saving of gzipped CSS files via nsIWebBrowserPersist -- this will fix some of the pages for which snapshots were losing the CSS, but it doesn't address the @import issue 2006-11-21 16:05:41 +00:00
Simon Kornblith
060e2942a0 actually commit the modified utilities.js this time 2006-11-21 07:46:38 +00:00
Simon Kornblith
445ff98277 - made doGet handle multiple urls, with processor/done style interface (as in processDocuments). this should be backwards compatible
- beginnings of mapping for new item types
- fixes for Word integration (because i was using it to write a paper)
2006-11-21 07:14:27 +00:00
Dan Stillman
3d6bfbe6d5 Fixes #386, Context menu option for creating a new subfolder
Fixes #226, Insert new collections and saved searches in the proper order

Also:

- Only display "New Collection..." and "New Saved Search..." in Library drop-down
- Sort collections and saved searches case-insensitively
2006-11-18 19:48:33 +00:00
Dan Stillman
fb220f6b7b Fixes #74, Add an "Update Now" button in the prefs to manually query the repository for updated scrapers 2006-11-17 23:49:39 +00:00
Dan Stillman
67f68194af Add overflow: hidden to z-pane, which isn't a great solution to anything but will help prevent overflowing the status bar
Reduce minimum tags selector height

Removed html:div in tags selector and just add display:block to vbox
2006-11-15 15:48:18 +00:00
Dan Stillman
4a8150203a Fix for startup error when trying to rebuild the fulltext index with a text file that doesn't have a charset (which shouldn't happen, but apparently it can if there's some undetermined error in the attaching process) 2006-11-11 19:17:16 +00:00
Dan Stillman
8090e04318 Deprecated Notifier.(un)register(Item|Collection)Observer() in favor of a single (un)registerObserver() method -- observers can still be limited to specific types by passing an array of types (or a single type as a string) as the second parameters to registerObserver()
e.g. registerObserver(callback, ['collection', 'search'])
2006-11-10 09:26:54 +00:00
Dan Stillman
54790c13d8 Purge tags on item delete 2006-11-10 09:23:33 +00:00
Dan Stillman
300c2f1f0f Tag conditions from tag selector should be required (though an option to find the union of selected tags might be worthwhile) 2006-11-10 05:18:28 +00:00
Dan Stillman
3f59f808e3 Tag Selector pane -- filter the current items view by one or many tags
Will be getting a lot more functionality (e.g. renaming, deleting, maybe assigning of tags from the pane), some UI changes, and possibly some modified behavior (e.g. should it only show the available tags for the items that you're viewing, show all and let you use the interface to assign tags (say, by batch drag and drop), or have a checkbox to toggle between the two modes)

Other notes:

- Implemented as XBL binding, so should be reusable elsewhere if necessary
- Needs a better icon and possibly different icon placement
- Doesn't handle live updating of modified tags yet -- will need a Notifier target
- New methods Tags.getAll() and Tags.search()
- I really wish I'd created a ticket for this so I could check it off
2006-11-09 13:33:49 +00:00
Dan Stillman
7bb4091110 Added 'noChildren' search condition and switched main items view to always use a search rather than getItems(), for reasons that will become clear soon 2006-11-09 11:12:53 +00:00
Dan Stillman
a871f8977a Error when repository can't be contacted 2006-11-08 04:30:51 +00:00
Dan Stillman
de3dd85016 Fix error when linking to plaintext file (caused wait cursor to stay active on Linux) 2006-11-08 04:30:23 +00:00
Dan Stillman
cdbe354b0b Don't show Add Note/Attach Snapshot options in context menu when multiple items are selected 2006-11-08 04:29:54 +00:00
Dan Stillman
d0d3f80a61 Much improved date handling in searches and autocomplete
Fixes #338, Dates in search window should be converted to UTC before searching
Addresses #220, Add a more friendly way to enter dates in search window and accessDate field

- Unless passed a full datetime, the search system automatically parses the string with strToDate(), so one can search for an accessDate, etc., using a freeform phrase. It will use the SQL parts where available and also search for remaining words individually, so "November 6, 2006" will find '2006-10-06 Nov. 6 2006' and "Summer 2006" will find '2006-00-00 Summer 2006". It will also properly handle SQL parts, so "August 2006" in the is/isNot operator will use "LIKE '2006-08-__'" (underscore being the single-character wildcard) and isBefore will use '2006-08-00'

- Stored UTC dates are converted to localtime in the search system when searching on just a date part, since otherwise searching for a local date with a UTC timestamp after midnight would be unsuccessful

- Date field autocomplete is now disabled in the search dialog, but on the off-chance that it's used somewhere, the autocomplete will now return just the user part of a multipart date field

- Access date autocomplete only returns date, not datetime

- Fix for Date Added and Date Modified showing as UTC

- Date.isSQLDateTime()


Known issues:

- accessDate field in metadata pane still requires SQL format

- Proper parsing of search dates with no years (e.g. searching for "August 25") depends on #389, "Date.strToDate() should return available parts even if no year"
2006-11-06 12:05:57 +00:00
Dan Stillman
d52a302bc0 A few more tiny glitches with search date age mode 2006-11-05 09:46:56 +00:00