Commit Graph

883 Commits

Author SHA1 Message Date
Simon Kornblith
0c2ee5d449 closes #406, Incorrect "et al" handling for APA style 2006-12-11 20:59:40 +00:00
Simon Kornblith
6c80c879da - closes #407, error in EBSCOhost translator
- closes #430, Amazon translator causing utilities.js to throw exception
- officially deprecated Zotero.Utilities.getNodeString() (use doc.evaluate and nodeValue or textContent instead, or access attributes directly; these options take the nearly the same amount of code, should be faster, and don't unnecessarily bloat our utilities)
- updated word integration to the latest version
2006-12-11 20:54:22 +00:00
Simon Kornblith
654f9c205d attempt to be better about preserving EZProxy URL. unfortunately, this won't fix everything, since if the domain of the saved URL is different from the domain of the accessed URL, there is no way to map the proxy. as far as I know, this only happens with JSTOR (where the stable URL domain is links.jstor.org instead of jstor.org). 2006-12-11 16:12:12 +00:00
Dan Stillman
a9cb13710c Fix error changing item type when fields don't exist in new type 2006-12-11 01:49:49 +00:00
Dan Stillman
58466ef656 BibTeX patch from Patrick Wagstrom on dev list
His note:

1. adds the conference paper item type (currently only exported to BibTeX as inproceedings)
2. Fixes bug with editor names in BibTeX export
3. Provides more intelligent naming for entities in BibTeX exports.  Previously items would be named something like Wagstrom2006, Wagstrom2006-1, etc.  However, I noticed that this ordering could get changed around pretty easily in the export process, resulting in bad references in articles.  We can't really be having that now can we?  The keys are now take the first word of the title, stripping out a few common words.  For example, If I had a paper called "Zoteros impact on time to author scholarly papers", it would have a key of "wagstrom_zotero_2006", which is much more constant. 


There was still an editor field bug after Patrick's patch that I corrected, and author and editor fields seem to be handled properly now.


Also addresses #384, option to prevent escaping of curly brackets in BibTeX output

I believe this patch actually now prevents escaping of curly braces by default, however (according to Simon) it should still be based on a pref or option of some kind
2006-12-09 23:09:14 +00:00
Dan Stillman
77b631f04e Closes #299, Method for viewing a child item that shows up in a search in its hierarchical context
Right-click option "Show in Library" for items in collections and saved searches

Other changes:

- Fixed error when focusing a collection with no items
- selectItem() now takes an inLibrary option to always use the Library even if the item is in the current collection
- Reworked buildCollectionContextMenu() to be much easier to change (will do the same for buildItemContextMenu() eventually) -- this required moving some DTD strings to properties, which I only did for en-US now, but I'll do it for the other locales we have as well
2006-12-09 22:33:45 +00:00
Dan Stillman
5ad86d2f50 Add conference paper item type 2006-12-09 17:29:00 +00:00
Dan Stillman
fe92dd2cf0 Addresses #401, Add keyboard shortcuts
Improves tabbing between UI panes, including into metadata fields

Still some quirks and things that don't work but should (e.g. ctrl-tab to cycle through tabs in metadata pane and ability to add new creators via the keyboard), but better
2006-12-09 02:46:25 +00:00
Dan Stillman
1395432f87 Move CSS for item pane into separate file 2006-12-08 21:53:53 +00:00
Dan Stillman
8520125d6e Taking advantage of the new Notifier queuing, group item deletes into a single Notifier event queue -- this makes multi-item deletes much, much faster
I'm doing this manually with Notifier.begin(true)/commit(unlock) instead of putting them all in a DB transaction since Item.erase() erases files too, so rolling back previous deletes would be bad

Notice the finally {...} block -- this ensures that the event queue is unlocked even if there's an error deleting (or else notifications would break until Firefox was restarted)

Other changes:

- Zotero.Items.erase() now supports multiple items and the recursive flag to erase children
- Fixed a few JS strict warnings in the items view
2006-12-08 19:50:44 +00:00
Dan Stillman
b7b5ff2933 Closes #431, Add Notifier trigger hook to DB.commitTransaction() and queue notifications during transactions
unlock = Zotero.Notifier.begin(lock)
Zotero.Notifier.commit(unlock)
Zotero.Notifier.reset()
Zotero.DB.addCallback(type, callback)

begin(), commit() and reset() are added to beginTransaction(), commitTransaction() and rollbackTransaction(), respectively, on startup, so notifications are now automatically queued during DB transactions -- this has the potential to make complex operations dramatically faster

begin() can also be called manually -- pass true to indicate that intermediate commit()'s (e.g. called from commitTransaction()) shouldn't run the event queue, and pass the value returned to the matching commit() call. (The return value of commit() will be true if it is the first begin() to request a lock and false otherwise -- this allows multiple begin(true) calls to be nested without the nested ones triggering notification.

This does make trigger() order a bit less predictable, but I'm ordering events and types (e.g. calling modify events after add and before delete) in an attempt to avoid problems. We'll see if this works or we need a more sophisticated ordering/grouping scheme.
2006-12-08 19:40:54 +00:00
Dan Stillman
4bf390341a JS strict warning 2006-12-08 18:24:33 +00:00
Dan Stillman
a26bc9728d Workaround for nsIFile.launch() and reveal() not working on Linux/Unix
For launch(), we just send the file through the Firefox's external helper app dialog. For reveal(), we display the path pre-selected in a window so the user can quickly copy it into another window (e.g. a terminal).
2006-12-07 16:46:13 +00:00
Dan Stillman
b383fb6aa7 More snapshot-related tweaks:
- Only use saveDocument() for text/html snapshots

- Add 'application/xhtml+xml' and 'application/xml' as native MIME types

- When loading attachment, check recorded MIME type first before detecting
2006-12-07 14:12:00 +00:00
Dan Stillman
0d145cd47b Closes #416, Right-click to add attachment
Added "Save Link As Zotero Snapshot" and "Save Image As Zotero Snapshot" options to the browser content context menu where appropriate


Other fixes:

- Implemented standalone image and plugin snapshots the right way (as opposed to the fairly broken way from yesterday)
- Only natively handled files are loaded into a hidden browser when using importFromURL() -- plugin files are now saved directly with saveURI()
- indexDocument() doesn't try to index non-text files


Notes:

- There's no feedback when saving large files, which will likely be a bit confusing for users -- one option would be to put the transfer into the downloads window, though that's a little weird.

- I suspect this will fix the reported JSTOR PDF download issue (http://forums.zotero.org/discussion/217/), though I don't currently have a way of testing it.
2006-12-07 13:39:30 +00:00
Sean Takats
507efb4758 Replaces SIRSI -2003 and SIRSI 2003+ translators with single SIRSI translator. Handles WebCat, iLink, and iBistro interfaces. Ready for Emory test XPI but needs some refinement to handle other library view preferences as noted in #381 2006-12-07 04:22:57 +00:00
Dan Stillman
afaa22d169 Fixes #429, Fails to build new db
Sorry about that
2006-12-07 03:41:23 +00:00
Dan Stillman
64e4fc0a57 Refs #362, Support abstracts
Forget changed userdata schema
2006-12-07 00:46:30 +00:00
Dan Stillman
5876debd36 Closes #362, Support abstracts
N.B.: Some changes from plan on ticket

New methods:

Item.setAbstract(true|false) -- make a note an abstract (and clear existing abstract if there is one for source item) or clear abstract status
Item.isAbstract() -- returns true if note is an abstract, false if not
Item.getAbstract() - get itemID of child abstract note or false if none
ZoteroPane.toggleAbstractForSelectedItem()

Changed methods:

Item.updateNoteCache(text, isAbstract)
Notes.add(note, sourceItemID, isAbstract)
Item.setSource() -- moving abstract note to another source with an existing abstract or setting as an independent note will make note not abstract

Other changes:

- Context menu options in items pane: "Set note as abstract" and "Unset note as abstract"
- Child notes are now displayed before child attachments so that abstract will be first
2006-12-07 00:45:41 +00:00
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