Commit graph

1926 commits

Author SHA1 Message Date
Simon Kornblith
968348a5d1 Add a scraper for Dublin Core metadata embedded in HTML/XHTML META tags 2006-06-20 16:08:13 +00:00
Dan Stillman
a3df0c39e2 - DB parameters can now be bound using the native JS type rather than by specifying the type explicitly (e.g. Scholar.DB.query(sql, [1, 2, "hello"]) -- for use when the data is generated internally and trusted, obviously
- Don't try to display an SQLite error when it's "not an error" (i.e. when the error is in something else)

- Switch to nsIFile instead of nsILocalFile to retrieve the profile directory
2006-06-20 15:42:01 +00:00
Dan Stillman
d239e6e4ba Typo in trigger() call in Collection.addItem() (thanks David) 2006-06-20 15:28:20 +00:00
Dan Stillman
95ca76545f QA testing of extension performance aboard trains
Fix in Collection.erase() -- when the DB methods started returning values in their native type, the collection id became an int rather than a string and "new Array(this._id)" became a length declaration rather than an elements declaration
2006-06-20 15:23:44 +00:00
David Norton
8f38c09c2e Ignore case on sorting. 2006-06-20 14:36:49 +00:00
Simon Kornblith
5af10b1061 - Fix small bug in ingester interface 2006-06-20 14:16:15 +00:00
David Norton
9f1cbf3177 Added back the Add menu with itemTypes.
Minor text changes
2006-06-20 13:59:59 +00:00
Simon Kornblith
c983a8e7e4 - Re-named Scholar.Ingester.Interface to Scholar_Ingester_Interface (since Scholar object is defined in XPCOM and thus global) 2006-06-20 00:52:15 +00:00
David Norton
d87f68e8e8 Double click an item to un-collapse the item pane.
The item pane remembers whether or not it was collapsed.
2006-06-19 18:43:21 +00:00
David Norton
8d50874d6b [interface] You can now change an item's type via menu. 2006-06-19 15:45:32 +00:00
David Norton
c345b90b9a Contextual menus - Collections, Items.
Moved close button to a more sensible place.
On Item Add: Clear search text, and select Info tab.
Minor function renames.
2006-06-19 15:00:13 +00:00
Simon Kornblith
4c34c592da - Better handling of InnoPAC records not returned by searches 2006-06-18 21:00:43 +00:00
Simon Kornblith
20369f41b3 - Move commonly used scraper functions to ingester.js, rather than re-defining them in each scraper. This breaks Piggy Bank compatibility in our scrapers, but we will still be able to export our scrapers in a Piggy Bank compatible form.
- Better handling of scraper RDF to item mapping.
- Improved date handling. All scrapers now return ISO-style dates when possible.
2006-06-18 19:04:32 +00:00
Simon Kornblith
3d881eec13 - Make scrapers return standard ISO-style YYYY-MM-DD dates. Still need to work on journal article scrapers.
- Ingester lets callback function save items, rather than saving them itself.
- Better handling of multiple items in API, although no scrapers currently implement this.
2006-06-17 21:21:15 +00:00
David Norton
953b1f9d20 Lots of little things:
- Fix item modify notify() on 1st row.
 - Ensure that new items are visible when added.
 - New functionality for creating new items (prevents a lot of problems).
 - Number-based fields display properly.
 - Fixed bug when creating and saving the first notes on an item.
 - New notes won't save empty.
2006-06-17 00:57:50 +00:00
Dan Stillman
32ce0da44a Restore the statement.reset() in valueQuery() that I accidentally deleted in r216 2006-06-16 22:17:46 +00:00
Dan Stillman
bfa25cae37 Display SQLite error in exceptions thrown from commitTransaction() and rollbackTransaction() (like the ones on field value updates that I'm trying to figure out at the moment) 2006-06-16 22:15:07 +00:00
Dan Stillman
e8ed4281f9 Change the DB query functions to return values of the actual types they are, rather than to return everything as strings -- this will prevent the need for parseInt on COUNT(*) values, etc. and is generally better
This will temporarily break the display of numeric fields on the interface side
2006-06-16 21:44:41 +00:00
Dan Stillman
936ef86584 Fix Item.numNotes() and Item.getNotes() to work on items not yet in the DB (return 0 and [], respectively) 2006-06-16 21:33:03 +00:00
David Norton
bf0626cb58 [interface] All editing elements that look like labels but provide functionality now offer hover feedback
[fix] You shouldn't lose your changes if you select another item in the middle of editing a field.
[fix] The dropdown menu to select notes doesn't steal the focus
2006-06-16 17:21:30 +00:00
David Norton
380584986a [fix] If you do a sort, modify a note, etc. it does not reload the selected item
[interface/fix] There will always be a secondary sort on date modified. (fixes the infamous Turkle Toggle issue once and for all)
2006-06-16 16:30:03 +00:00
Dan Stillman
4904c04e3e Add dateCreated and dateModified columns to itemNotes
Update itemNotes.dateModified on item update
2006-06-16 16:09:18 +00:00
Dan Stillman
3f27a12b0f Trigger notify('modify', 'item', noteID) on note modify
Added method Item.updateDateModified to just change the date -- used on note updates

Delete item notes on item delete
2006-06-16 15:57:52 +00:00
David Norton
942c6d5da2 [interface] Number of notes column in items tree 2006-06-16 15:27:22 +00:00
Dan Stillman
08a570a38a Item.numNotes() 2006-06-16 15:18:01 +00:00
David Norton
3cdcf3093a [interface] Confirms delete of note
[fix] Minor fix - no more exception on ItemTreeView when you hit the left or right arrow
[ignore] simplified some checking in the note code.
2006-06-16 15:15:42 +00:00
David Norton
8ff6c48001 [interface] Custom textbox binding: multiline and timed together.
[interface] Multiple notes: works like a charm
2006-06-16 14:39:18 +00:00
Dan Stillman
47d59f2dc1 Add note contents to search 2006-06-16 08:04:01 +00:00
Dan Stillman
7ef16e0a38 Reverted sample data to remove notes field (independent notes will need a field for that but we'll deal with that later)
I didn't increment the schema version, since I doubt anyone actual updated in the last 20 minutes... (If so just delete your DB or use SCHOLAR_CONFIG['DB_REBUILD'])
2006-06-16 07:56:24 +00:00
Dan Stillman
7a8ddb1beb Fix logic in _noteToTitle in itemPane.js (if no newline in note the title would be "Untitled Note") -- though it'd be better to do what Stickies do and just find the first bit of text, even if it's not on the
first line (regex is probably easiest)
2006-06-16 07:44:55 +00:00
Dan Stillman
fd85af40f8 Many-to-one item note support in the schema and data layer -- still some issues on (I think) the interface side 2006-06-16 07:32:48 +00:00
David Norton
e417d8e690 [interface] Although commented out, code in place to accept URL drags into collections (waiting on an Ingester.scrapeURL function)
[interface] Multi-notes functionality (waiting on data layer)
[docs] Major internal documentation written for itemTreeView.js and collectionTreeView.js (this actually does work ;-))
2006-06-15 22:35:48 +00:00
Dan Stillman
f635ee7788 Make the retry interval 60 minutes, not 60 seconds 2006-06-15 21:24:04 +00:00
Dan Stillman
8e97675cc9 Added a timer to run repository checks while the browser is up
Added a separate retry interval so that the extension retries sooner after failures (browser offline, request failure, etc.)

Revision 200 -- w00t i am victorious
2006-06-15 21:06:24 +00:00
Dan Stillman
2d20fe717d Added Scholar.HTTP.browserIsOffline() and changed doGet() and doPost() to return false if so 2006-06-15 16:52:46 +00:00
Dan Stillman
11a056ecd4 _getDBVersion() caches the version number, so make sure _updateDBVersion() updates it 2006-06-15 16:28:11 +00:00
Dan Stillman
70216ea2c7 - Added automatic scraper update mechanism (more details on Basecamp: http://chnm.grouphub.com/C2687015)
- Removed localLastUpdated field from scrapers table and renamed centralLastUpdated to lastUpdated; updated scraper queries accordingly

- Added query in scrapers.sql to update version table 'repository' row to prevent immediate downloads of newly installed scrapers

- Get version property from extension manager in Scholar.init() and assign to Scholar.version
2006-06-15 06:13:02 +00:00
David Norton
70be7cf8fd Switched Notes and Info tabs.
The tabbox should always fill the allotted space. Hopefully?
2006-06-14 17:43:02 +00:00
Dan Stillman
8ed37732c1 JS Date() takes months 0-11, for reasons that are far from clear 2006-06-14 16:59:29 +00:00
David Norton
2399f044e1 [Drag and Drop] in the Collections Tree: Now checks to make sure that the correct type is being dragged, and that you aren't dropping a folder into subfolders, etc.
[Drag and Drop] in Items Tree: You can drag items from one window into another, directly into the Items list.
[Editing] Close the edit box and save when you click on its label
2006-06-14 15:51:05 +00:00
Dan Stillman
c8a74e96cd Don't be dumb 2006-06-14 15:41:25 +00:00
David Norton
3e11379c3a Notes now automatically save - no "save" button.
The collections list does not resize randomly now.
The pane on the right stays open all the time - even when 0/multiple items are selected. This is to avoid frequent resizing of the items pane.
Temporarily, if the first "word" of a field's value is more than 29 characters long, it will set it to crop. This is for the long URLs, etc.
2006-06-13 20:45:30 +00:00
Dan Stillman
ba16889bb0 Moved the Scholar.Hash constructor out of the main Scholar constructor, where I had put it for some reason -- ignore 2006-06-13 15:14:22 +00:00
Dan Stillman
ca2045a305 Scholar.Date.sqlToDate(string sqldate) -- function to convert SQL-formatted date (e.g. '2006-06-13 11:03:05' or '2006-06-13') into a JS date object 2006-06-13 15:07:08 +00:00
Dan Stillman
39f9d2c3b3 Wrapper functions for XMLHTTPRequest in scholar.js, stolen and adapted slightly from Simon's ingester code (those override the mime type to text/plain and only use responseText, I assume to conform to the Piggy Bank API, so unfortunately we can't use the same ones elsewhere)
Scholar.HTTP.doGet(url, onStatus, onDone) and Scholar.HTTP.doPost(url, body, onStatus, onDone) -- onStatus and onDone are callbacks to call on non-200 responses and the response body, respectively
2006-06-13 14:53:38 +00:00
Dan Stillman
d42258b168 Changed schema of scrapers table to use single GUID for scraperID
Assigned guids to scrapers, replaced INSERT queries with REPLACE queries, and removed table DELETE query at top -- this will allow scrapers to be updated without deleting any others that may exist (e.g. that someone is developing, third-party, etc.)
2006-06-12 15:43:24 +00:00
David Norton
37c0a61393 [style] collection icons have padding 2006-06-12 13:56:36 +00:00
Dan Stillman
0b1765b549 Move CreatorTypes constructor in code -- ignore 2006-06-12 13:08:36 +00:00
Dan Stillman
c24c148e0b Cache creator type names to prevent repeated DB lookups in CreatorTypes.getTypeName() 2006-06-12 13:05:30 +00:00
Dan Stillman
5a045f5b50 Cache item type names to prevent repeated DB lookups in ItemTypes.getTypeName() 2006-06-12 12:59:25 +00:00