diff --git a/chrome/chromeFiles/content/scholar/ingester/browser.js b/chrome/chromeFiles/content/scholar/ingester/browser.js index ccf7e0e1a..9d0fd359b 100644 --- a/chrome/chromeFiles/content/scholar/ingester/browser.js +++ b/chrome/chromeFiles/content/scholar/ingester/browser.js @@ -61,7 +61,7 @@ Scholar_Ingester_Interface.chromeUnload = function() { Scholar_Ingester_Interface.scrapeThisPage = function() { var documentObject = Scholar_Ingester_Interface._getDocument(Scholar_Ingester_Interface.tabBrowser.selectedBrowser); if(documentObject.scraper) { - Scholar_Ingester_Interface.scrapeProgress = new Scholar_Ingester_Interface.Progress(window, Scholar_Ingester_Interface.tabBrowser.selectedBrowser.contentDocument, Scholar.getString("ingester.scraping")); + Scholar_Ingester_Interface.scrapeProgress = new Scholar_Ingester_Interface.Progress(window); documentObject.scrapePage(Scholar_Ingester_Interface._finishScraping); } } @@ -79,7 +79,6 @@ Scholar_Ingester_Interface.updateStatus = function() { } else { Scholar_Ingester_Interface.statusImage.src = "chrome://scholar/skin/treeitem-"+documentObject.type+".png"; } - Scholar.debug("status image is "+Scholar_Ingester_Interface.statusImage.src); Scholar_Ingester_Interface.statusImage.hidden = false; } else { Scholar_Ingester_Interface.statusImage.hidden = true; @@ -159,8 +158,13 @@ Scholar_Ingester_Interface.Listener.onLocationChange = function(progressObject) Scholar_Ingester_Interface._deleteDocument(browser); } } - - Scholar_Ingester_Interface.updateStatus(); + Scholar_Ingester_Interface.updateStatus(); + + // Make sure scrape progress is gone + try { + Scholar_Ingester_Interface.scrapeProgress.kill(); + } catch(ex) { + } } ////////////////////////////////////////////////////////////////////////////// @@ -228,51 +232,33 @@ Scholar_Ingester_Interface._deleteDocument = function(browser) { */ Scholar_Ingester_Interface._finishScraping = function(obj, returnValue) { if(obj.items.length) { - try { // Encased in a try block to fix a as-of-yet unresolved issue - var item1 = obj.items[0]; + try { // Encased in a try block to fix a as-of-yet unresolved issue Scholar_Ingester_Interface.scrapeProgress.changeHeadline(Scholar.getString("ingester.scrapeComplete")); - var fields = Scholar.ItemFields.getItemTypeFields(item1.getField("itemTypeID")); - // Display title and creators - var titleLabel = Scholar.getString("itemFields.title") + ":" - Scholar_Ingester_Interface.scrapeProgress.addResult(titleLabel, item1.getField("title")); - var creators = item1.numCreators(); - if(creators) { - for(var i=0; i + + + + + + + + + + + + + + diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties index d0bb585ff..a296a159b 100644 --- a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties +++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties @@ -64,7 +64,7 @@ creatorTypes.author = Author creatorTypes.contributor = Contributor creatorTypes.editor = Editor -ingester.scraping = Scraping Page... -ingester.scrapeComplete = Scraping Complete -ingester.scrapeError = Could Not Scrape -ingester.scrapeErrorDescription = An error occurred while scraping this page. Please try again. If this error persists, contact the scraper author. \ No newline at end of file +ingester.scraping = Saving Item... +ingester.scrapeComplete = Item Saved. +ingester.scrapeError = Could Not Save Item. +ingester.scrapeErrorDescription = An error occurred while saving this item. Please try again. If this error persists, contact the translator author. \ No newline at end of file diff --git a/chrome/chromeFiles/skin/default/scholar/scholar.css b/chrome/chromeFiles/skin/default/scholar/scholar.css index e31bd297a..038a78a10 100644 --- a/chrome/chromeFiles/skin/default/scholar/scholar.css +++ b/chrome/chromeFiles/skin/default/scholar/scholar.css @@ -1,4 +1,36 @@ textbox[multiline="true"][type="timed"] { -moz-binding: url('chrome://scholar/content/customControls.xml#timed-textarea'); +} + +#scholar-progress-box +{ + border: 2px solid #7a0000; + margin: 0; + min-height: 50px; + width: 250px; + padding-bottom: 3px; +} + +.scholar-progress-item-icon +{ + width: 16px; + height: 16px; +} + +.scholar-progress-item-hbox +{ + padding-left: 5px; + margin-top: 3px; + margin-bottom: 3px; +} + +.scholar-progress-item-label +{ + width: 220px; +} + +.scholar-progress-description +{ + width: 220px; } \ No newline at end of file diff --git a/scrapers.sql b/scrapers.sql index 1c6e0c8f5..4d148ccbc 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -1,7 +1,7 @@ --- 27 +-- 28 -- Set the following timestamp to the most recent scraper update date -REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-06-26 16:41:00')); +REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-06-26 21:40:00')); REPLACE INTO "scrapers" VALUES('96b9f483-c44d-5784-cdad-ce21b984fe01', '2006-06-26 16:01:00', 'Amazon.com Scraper', 'Simon Kornblith', '^http://www\.amazon\.com/(?:gp/(?:product|search)/|exec/obidos/search-handle-url/)', 'if(doc.title.indexOf("search") >= 0) { @@ -270,7 +270,7 @@ utilities.HTTPUtilities.doPost(newUri, ''exportselect=''+exportselect+''&exportt }) wait();'); -REPLACE INTO "scrapers" VALUES('88915634-1af6-c134-0171-56fd198235ed', '2006-06-26 16:01:00', 'LOC/Voyager WebVoyage Scraper', 'Simon Kornblith', 'Pwebrecon\.cgi', +REPLACE INTO "scrapers" VALUES('88915634-1af6-c134-0171-56fd198235ed', '2006-06-26 21:40:00', 'LOC/Voyager WebVoyage Scraper', 'Simon Kornblith', 'Pwebrecon\.cgi', 'var export_options = doc.forms.namedItem(''frm'').elements.namedItem(''RD'').options; for(i in export_options) { if(export_options[i].text == ''Latin1 MARC'' @@ -280,9 +280,9 @@ for(i in export_options) { || export_options[i].text == ''MARC (non-Unicode/MARC-8)'') { // We have an exportable single record if(doc.forms.namedItem(''frm'').elements.namedItem(''RC'')) { - return "book"; - } else { return "multiple"; + } else { + return "book"; } } }