Commit graph

972 commits

Author SHA1 Message Date
Simon Kornblith
53aae7751c support FirstSearch databases besides WorldCat 2006-08-26 04:59:30 +00:00
Simon Kornblith
f07cb5a5bc adds an InfoTrac OneFile translator
fixes a bug in ingester progress window handling
2006-08-26 03:50:15 +00:00
Simon Kornblith
62ffea9542 closes #209, Scholar does not refresh the item pane when a new collection is clicked
it's possible that this fix will introduce some bugs, but it appears to work fine
2006-08-25 19:15:03 +00:00
Dan Stillman
624faaf110 Closes #202, attachments categorized as notes
"Notes" column changed to "#" and combined with the attachment count. "#" isn't exactly immediately self-explanatory, but "Notes/attachments" would be way too long, and once you realize what it's for (i.e. the first time you create a child item), you really don't want the column taking up any more room than that... If people have a better suggestion, do share.
2006-08-25 08:37:16 +00:00
Dan Stillman
59c00ba6c2 Localized strings for the search dialog box, but not used yet (I'm not sure if XUL in bindings can use DTD strings or need to use properties...) 2006-08-25 08:12:28 +00:00
Dan Stillman
9df93a8e27 Fixes #206, notes/attachment count incorrect after deletion
The notes/attachment count wasn't going down on an attachment deletion because it's not actually a notes/attachment count at all--it's a notes count, and new attachments were incorrectly incrementing it.

This technically either fixes or invalidates #202 ("attachments categorized as notes"), depending on how you look at it, but I'll change that to reflect the desired goal of having a combined notes/attachments count.

Refs #202
2006-08-25 08:01:55 +00:00
Dan Stillman
ebb9122e0a Forgot to remove removed field from attachment item type 2006-08-25 07:38:16 +00:00
Dan Stillman
9a897e15e8 Closes #205, eliminate "source" field, and add "url" field on all item types 2006-08-24 20:33:29 +00:00
Dan Stillman
1bed666f21 Closes #198, smart collection icon is a couple of pixels too high 2006-08-24 19:44:35 +00:00
Dan Stillman
7d6bd8d0af "project"=>"collection" (already "collection" in most places internally) 2006-08-24 19:43:48 +00:00
Simon Kornblith
0e63958f96 - make proquest work better behind proxies
- improved frame support
2006-08-24 18:00:48 +00:00
Simon Kornblith
c5ec34d6ae closes #197 (my fault, not david's) 2006-08-23 03:55:41 +00:00
Dan Stillman
03d8097527 Disable creator add button on previous row when adding a new row (since bad things can happen if we don't) and undo on reverse 2006-08-22 19:52:15 +00:00
Dan Stillman
57f4e43507 OK, I think this should fix both #179 ("adding a new creator then clicking an existing creator makes the creator field disappear") and #190 ("tag issues") -- I caused #190 with my fix to the former, and David rebroke #179 with his revert to fix the latter.
The problem was twofold: 1) onselect="ScholarItemPane.loadPane(this.selectedIndex)" is (for some reason) triggered when clicking off of the "+" creator add button onto the rest of the deck pane (and not just when switching tabs) and 2) the selectedIndex passed into loadPane() from the deck during the non-tab triggers is (for some reason) an empty string rather than the index of the selected tab, which is why the creator problem only used to happen the first time you clicked away from a "+" (before the empty string was stored as a key in the _loaded array). (In short, onselect for decks is pretty broken.)

Now only calling loadPane if (this.selectedIndex!=='') -- can't just test for typeof=='number' because this.selectedIndex on the deck is always a string


refs #179 and #190
2006-08-22 07:01:21 +00:00
Dan Stillman
c4e9e76795 Search (data layer):
- Added 'fulltext' condition as shortcut to add an operator/value against all string-based conditions -- can be used for quicksearch within a view if collectionID/savedSearchID is added as a required condition along with it

Note that the 'fulltext' condition isn't stored internally and addCondition() doesn't return a searchConditionID for it, so it's not really meant to be used for saved searches.

Example:

var search = new Scholar.Search();
search.addCondition('collectionID', 'is', 6856, true);
search.addCondition('fulltext', 'contains', 'wellman');
Scholar.debug(search.search());


- Fixed isNot/doesNotContain for items table fields and collectionID
2006-08-22 04:23:01 +00:00
Dan Stillman
61c18639fe Operator selection bug in search interface (need to keep track of selected operator now that onConditionSelected() is called after loading in a condition) 2006-08-22 04:15:36 +00:00
David Norton
d38e94dd27 Fixes #190, tag issues.
- This was a problem with more than just tags. I reverted a change from r483 that shouldn't affect anything else.
2006-08-22 03:15:42 +00:00
David Norton
ee943c0d2c Closes #169, add OpenURL interface hooks
- Added menu, uses OCLC database. (someone should test from GMU or another institution)
2006-08-21 21:10:40 +00:00
Dan Stillman
3ac311e85a Search improvements:
Conditions can now offer drop-down menus rather than freeform text fields -- implemented for collections/saved searches and item types

Special handling to combine collections and saved searches into a single "Collection" menu (can we get away with calling them "Smart Collections"?) -- internally, values are stored as C1234 or S5678 in the interface and converted to/from regular collectionID and savedSearchID conditions for search.js

Use localized strings for conditions (tries searchConditions.* first, then itemFields.*)

Alphabetize condition list

Operator menu now fixed length for all conditions
2006-08-21 05:08:11 +00:00
Dan Stillman
b79937d134 Show proper operators for new and loaded conditions (before clicking on the menu) in search window 2006-08-20 08:22:07 +00:00
Dan Stillman
d193afe740 Items without rows in the applicable table didn't show up for searches with isNot or doesNotContain conditions 2006-08-20 07:34:37 +00:00
Simon Kornblith
04d05548b2 closes #103, figure out how to store captured pages in native export format
fixes ampersands in citation COinS
fixes tags and seeAlso in import/export (should now work for all items)
2006-08-20 04:35:04 +00:00
Dan Stillman
217636ad14 - Proper handling of saved search renaming and erasing (via Notifier)
- Support for multiple id collection/search remove/modify notifications

- New method Scholar.Searches.get(id) to get 'id' and 'name' for a particular savedSearchID
2006-08-20 03:27:25 +00:00
Dan Stillman
d6214b3f86 Fix some JS strict warnings in data methods 2006-08-20 02:03:57 +00:00
Dan Stillman
bfbea6474e Fixes #196, Error: Scholar.File.getMIMETypeFromFile is not a function (line 1957) when adding new files
My bad
2006-08-20 01:40:39 +00:00
Dan Stillman
6a994a25a2 Closes #193, need a function to add snapshots from folders
Scholar.Attachments.importSnapshotFromFile(file, url, title, mimeType, charset, sourceItemID)

file is primary file within directory -- file.parent is copied into the storage directory
url is the original URL associated with the snapshot
2006-08-19 23:28:49 +00:00
Simon Kornblith
a55b035761 update scrapers.sql version (oops) 2006-08-19 23:15:38 +00:00
Simon Kornblith
94bd2415da adds short roles to CSL (Ed. instead of Editor)
adds COinS to exported HTML
uses real lists in HTML output
fixes other small citation style issues
2006-08-19 23:14:27 +00:00
Dan Stillman
89acdf101c Fix #191, calling Scholar.Attachments.importFromURL on a PDF without PDF plug-in installed results in a prompt to save the file to the disk
Attachments.importFromURL() now first does a HEAD request to get the MIME type and passes that through Scholar.MIME.hasInternalHandler() (now abstracted from Scholar.File, along with the other MIME functions) -- if it can handle the MIME type, it uses a hidden browser; otherwise, it use a remote web page persist to save the file directly
2006-08-19 20:51:01 +00:00
Dan Stillman
3ce672756c Fix Utilities.HTTP.doHead() brokenness 2006-08-19 20:45:27 +00:00
Simon Kornblith
26668a6e73 closes #194, EBSCO translator
closes #160, cache regular expressions
closes #188, rewrite MARC handling functions

MARC-based translators should now produce item types besides "book." right now, artwork, film, and manuscript are available. MARC also has codes for various types of audio (speech, music, etc.) and maps.
the EBSCO translator does not yet produce attachments. i sent them an email because their RIS export is invalid (the URLs come after the "end of record" field) and i'm waiting to see if they'll fix it before i try to fix it myself.
the EBSCO translator is unfortunately a bit slow, because it has to make 5 requests in order to get RIS export. the alternative (scraping individual item pages) would be even slower.
regular expression caching can be turned off by disabling extensions.scholar.cacheTranslatorData in about:config. if you leave it on, you'll have to restart Firefox after updating translators.
2006-08-19 18:58:09 +00:00
Dan Stillman
85929cd27d Fixes #195, ISBNs should not become INTs
The ISBNs were actually stored fine in the database--it was just that the DB methods were using getInt32() to retrieve them. Using getInt64() instead.
2006-08-18 19:24:46 +00:00
Dan Stillman
73cc7b8707 Fixes #192, double-clicking webpage snapshots sometimes brings up a save dialog
On Simon's suggestion, appending .html to all text/html files--I can't reproduce the problem, and I'm not sure what's causing the ExternalHelperAppService to get confused, but this should at least avoid the issue...
2006-08-18 07:06:01 +00:00
Simon Kornblith
20486d5053 addresses #103, figure out how to store captured pages in native export format
import/export of file data should work for all file types _except_ snapshots (in this situation, export is working, but import is not yet complete; see #193)
also, fixes a potential security issue that could have allowed malicious web translators to post local data to remote sites (although, given we maintain the central repository and there's no easy way to install a translator, the risk would have been minimal to begin with).
2006-08-18 05:58:14 +00:00
Simon Kornblith
10ba568ee8 closes #39, auto-ingest of associated files (as recognizable)
closes #3, Overflow metadata dumps into "extra" field

add "extra" data where such data is useful and conveniently accessible (not available for XML-based export or MARC formats yet)
add links to permanent URLs
download associated files from full text sources (if extensions.scholar.downloadAssociatedFiles preference is enabled)
fix WorldCat translator
improve InnoPAC translator (it now works on Georgetown search results pages, albeit slowly, because it must first realize the catalog is misconfigured)
tag items from SIRSI and WorldCat
return to putting the full lengths of books into "pages," because some citation styles require it
fix COinS (broken a few revisions ago)
2006-08-17 07:56:01 +00:00
Simon Kornblith
410e090ecd closes #104, speed up multiple item adds 2006-08-15 23:03:11 +00:00
Dan Stillman
f9ffbd12dd Notifier.isEnabled() 2006-08-15 21:31:08 +00:00
Dan Stillman
fccc822063 Like the last commit, just functional 2006-08-15 21:24:21 +00:00
Dan Stillman
d456255b94 Allow multiple ids in notifier add/item events on interface side
(I didn't actually test this...)
2006-08-15 21:11:52 +00:00
Dan Stillman
844fcc0ee9 Run _loadChildItems() in Collection.loadFromRow() so that _childItems.length is calculated properly 2006-08-15 20:38:20 +00:00
Dan Stillman
7f13072ef4 Added Scholar.Notifier.enable() and disable() to turn on and off trigger() notifications (enabled at startup)
Changed 'smartcollection' notifier type to 'search' and reduced hash length to 2
2006-08-15 19:59:17 +00:00
Simon Kornblith
51108446e3 closes #187, make berkeley's library work
closes #186, stop translators from hanging

when a document loads inside a frameset, we now check whether we can scrape each individual frame.
all functions involving tabs have been vastly simplified, because in the process of figuring this out, i discovered Firefox 2's new tab events.
if a translator throws an exception inside loadDocument(), doGet(), doPost(), or processDocuments(), a translate error message will appear, and the translator will not hang
2006-08-15 19:46:42 +00:00
Dan Stillman
009a4ad520 Fix search brokenness from r453 2006-08-15 04:59:09 +00:00
Dan Stillman
3a18dcb70f Unsaved creators are no longer saved (e.g. on creator type change) if they don't have a firstName or a lastName
(Also fixes bug from r379 where changing creator type on a blank unsaved creator would actually insert "(first)" and "(last)")

Localized '(first)' and '(last)'


Refs #179, adding a new creator then clicking an existing creator makes the creator field disappear
2006-08-15 03:19:11 +00:00
Simon Kornblith
b35ba91c15 closes #185, Citations shouldn't add a period to reference titles that already end with punctuation marks 2006-08-15 01:26:14 +00:00
Simon Kornblith
37a6684546 write "?" if a character cannot be converted to UTF-8 (although i'm not sure how this would ever happen) 2006-08-15 01:09:06 +00:00
Simon Kornblith
52fe187328 closes #184, support non-ASCII characters in HTML and RTF. since we use the unicode features of RTF 1.5, this requires Word 97 or later on a PC (or presumably Word 98 or later on a Mac) to read.
fixes one last strict mode bug
2006-08-15 01:05:20 +00:00
Simon Kornblith
c18f75d667 show fewer warnings in strict mode 2006-08-14 22:28:22 +00:00
Simon Kornblith
ba1a383aa1 don't throw an error trying to make a bibliography with an item with no date (thanks Dan) 2006-08-14 22:05:58 +00:00
Simon Kornblith
dac5bbb3f3 closes #183, export bibliography to RTF 2006-08-14 21:54:45 +00:00