Commit graph

198 commits

Author SHA1 Message Date
Simon Kornblith
076ee0fad2 Add PubMed scraper, fix a few other small bugs 2006-06-08 01:26:40 +00:00
Dan Stillman
393d19ca85 Fix SQL error on middle creator remove
Added creatorTypeID to the PK in itemCreators, because a creator could conceivably have two roles on an item

Throw an error if attempt to save() an item with two identical creator/creatorTypeID combinations, since, assuming this shouldn't be allowed (i.e. we don't have a four-column PK), there's really no way to handle this elegantly on my end -- interface code can use new method Item.creatorExists(firstName, lastName, creatorTypeID, skipIndex), with skipIndex set to the current index, to make sure this isn't done
2006-06-08 00:16:35 +00:00
David Norton
8fc4a02814 [interface] You can resize the view/edit pane on the right.
[interface] You can press 'escape' on editing a field to cancel changes.
[style] The add/remove creator buttons provide rollover feedback.
2006-06-07 18:20:45 +00:00
David Norton
eba82e2ac6 ItemTreeView remembers the selection on notify().
MetadataPane editing updated a lot -- creator support added.

Source column is hidden on default.
2006-06-07 16:19:56 +00:00
Dan Stillman
393807b152 This isn't quite done (I'm discussing changing the scrapers schema with Simon to better handle scraper updates) but in the interest of getting the scrapers in for testing, I'll commit this now.
Integrated the scrapers with the schema update mechanism. Changed a bunch of schema methods to handle both schema.sql and scrapers.sql (or others, if need be) and altered the version table to track mu
ltiple versions for different files. This theoretically should detect that the version table has changed and force a reinitialization of the DB--let me know if there are problems.
2006-06-07 15:27:21 +00:00
Dan Stillman
882a96ee40 Fixed brokenness on schema reinitialization 2006-06-07 14:35:04 +00:00
Dan Stillman
448fde9ff1 Made the schema update system moderately less convoluted
- Broke schema functions into separate object and got rid of DB_VERSION config constant in favor of a toVersion variable in the _migrateSchema command (which isn't technically necessary either, since the version number at the top of schema.sql is now always compared to the DB version at startup) but will help reduce the chance that someone will update the schema file without adding migration steps)

- Removed Amazon scraper from schema.sql, as it will be loaded with the rest of the scrapers
2006-06-07 01:02:59 +00:00
David Norton
098e90fea9 Search field now searches only selection Library/Project.
- Sort stays
 - Selection remembered

New functions: saveSelection(), rememberSelection() on ItemTreeView
2006-06-06 22:43:58 +00:00
Simon Kornblith
0753d78910 - Add VLTS scraper
- Fix loadDocument/processDocuments (broken by r145)
2006-06-06 21:35:23 +00:00
Dan Stillman
9bcaad5946 Added optional second param to Items.search() to restrict search to a particular collectionID 2006-06-06 20:46:08 +00:00
David Norton
2513c829a6 Simple, yet inefficient, searching from upper right-hand corner. 2006-06-06 20:33:49 +00:00
Dan Stillman
c807d335e9 Changed Items.get() to return a regularly indexed array instead of one indexed by itemID--nothing actually used the keyed array, and this way it can be used for building trees directly (e.g. Scholar.Items.get(Scholar.Items.search('barnes'))) 2006-06-06 20:15:50 +00:00
David Norton
b65a56b4d9 Fairly major metadatapane reworking. It is now nextdoor to the items list.
-  Lots of work to be done. For example, the present way of showing a textbox is sort of a hack - taking a label, assigning certain properties to a textbox, then removing the label and placing the textbox in its place. I will be looking into our options.
   -  Also, I need to figure out adding/editing/deleting creators.
   -  When the textbox loses focus, it updates and saves the item (like iCal).

Date: removed Scholare.Date functions, as they are overkill. We can use the built-in Date.toLocaleString()
2006-06-06 19:53:27 +00:00
Dan Stillman
3aae8d3f89 Fix Scholar.getItems() to not trigger an SQL query for every item 2006-06-06 19:06:40 +00:00
Simon Kornblith
152c9bf9e7 - Small changes to MARC record support
- Implemented loadDocument API, for loading and parsing the DOMs of HTML documents in the background
- Added scraper code to SVN repository (now includes 12 scrapers, see Writeboard for details)

To update to the latest versions of all scrapers, ensure you have an up-to-date version of sqlite3, then run:
sqlite3 ~/Library/Application\ Support/Firefox/Profiles/profileName/scholar.sqlite < scrapers.sql
2006-06-06 18:25:45 +00:00
Dan Stillman
6c55e63eab Add ' et al.' to firstCreator field when more than one creator 2006-06-06 17:37:52 +00:00
Dan Stillman
60f7c8fccd Scholar.Items.search(text) -- (extremely) simple fulltext search on all fields -- returns an array of ids of matching items
The real search function will be considerably more advanced/flexible, but this should work as a placeholder for the moment. Probably quick enough for FAYT, at least with a ~0.5 second delay to avoid unnecessary calls while people are typing (which is probably a good idea anyway). This search doesn't use indexes at all, so if more speed is needed, one option would be to maintain a manual FULLTEXT-type index (using triggers, ideally) that could be quickly searched, but we'd lose intra-word filtering, which people would probably expect...
2006-06-06 08:02:29 +00:00
Dan Stillman
9675ac9d01 New function Scholar.Collection.changeParent([parentCollectionID]) -- move a collection into another collection in the DB
parentCollectionID is optional and defaults to moving item to root

Returns true on success, false on attempt to move collection into its existing parent, itself or a descendent collection; throws exception on invalid parentCollectionID

Sends a columnTree notify() with previous parent ID, id of collection itself, and new parent ID (unless the previous or new are the root, in which case it's omitted) -- that may or may not make sense for the interface code and can be changed if needed
2006-06-05 21:58:01 +00:00
Dan Stillman
b31be7af7e Put square brackets around ids in notifier debug output if multiple ids passed 2006-06-05 21:51:21 +00:00
David Norton
3796741911 Changed all references of 'folder' to 'collection' in code to correspond to database / dataacess nomenclature. 2006-06-05 18:01:53 +00:00
David Norton
560864ad6b Converted interface strings into localized entities/properties.
Fixed: New Item shows the metadata pane if it is not already shown.
2006-06-05 17:47:36 +00:00
David Norton
0a234c9f70 Implemented Scholar.Date, a group of functions for handling date formatting, etc. 2006-06-05 16:19:11 +00:00
David Norton
5411d4b67f Sorting on a colum: Much, much, much, better. (hope)fully implemented! 2006-06-05 15:49:11 +00:00
David Norton
56b1e37c13 New items are properly displayed on a notify()
New items are automatically selected.

When adding a new item, or editing an item without a creator, display an empty creator box.

Edit button changed from toggling to Save/Cancel buttons.
Simple "Do you want to save changes?" dialog if you select a different item while in edit mode.
2006-06-05 13:56:59 +00:00
David Norton
adfcc5cd73 Collection rename works (presently, using a somewhat awkward "rename collection" button)
Scholar Toolbar split into two (you can't really see much difference) - one for collections, one for items.
Scholar Toolbar moved above lists.
2006-06-05 13:08:16 +00:00
David Norton
c4d2e77b27 Interface: Add Collections (debugged to view properly)
Interface: Delete collection now reselects correctly.
2006-06-05 11:58:16 +00:00
Dan Stillman
d22d77fedf More helpful exceptions in itemFields methods when given an invalid fieldID or a fieldID with no associated itemTypes (neither should actually happen once things are set up right) 2006-06-04 19:37:03 +00:00
Dan Stillman
1d9fa85c15 Missing association of ISSN with journalArticle type -- added to sample data (thanks Simon) 2006-06-04 18:53:22 +00:00
Simon Kornblith
85d8153024 Add library, hooks for scraping MARC records. 2006-06-03 22:26:01 +00:00
Dan Stillman
bd840a4c58 Collection names must be non-empty -- interface side might follow iTunes behavior ('untitled playlist') here 2006-06-03 20:51:48 +00:00
Dan Stillman
e2c9ee0387 - Collection.rename(name) -- renames collection in DB
- Collection.add( name [, parentCollectionID] ) -- saves new collection in DB and returns new Collection object; defaults to root if parent not provided

	Currently some exceptions in folderTreeView.js when notified on collection add

- Added back Item.isCollection() and Collection.isCollection(), as they seem to still be used

- Collection._load() now takes optional ids for loading new collections
2006-06-03 20:41:23 +00:00
Dan Stillman
d01ff389d4 Use the Hash datatype in Notifier to store observers and improve debug output to display how many we have registered when trigger() is called 2006-06-03 20:26:31 +00:00
Dan Stillman
98f42001cc New function Scholar.getRandomID( table, column [, max] ) for getting unique random keys in a DB table, because auto_increments make me feel dirty -- max is optional and defaults to 16383 (which should store in 2 bytes in SQLite), but increases automatically if a unique id can't be found after 10 tries 2006-06-03 20:23:19 +00:00
Dan Stillman
bbbb243315 Accept 'null':true as bound parameter type 2006-06-03 20:06:57 +00:00
Simon Kornblith
93652a137c Fix issues with asynchronous scraping and XMLHttpRequest 2006-06-02 23:53:42 +00:00
David Norton
c42991a5bf Metadata now is much more compact when not being edited.
Close buttons on the Metadata and Notes.

The Collections list no longer throws an exception when the header is clicked.
More minor interface improvements.
2006-06-02 23:05:24 +00:00
Dan Stillman
c561ca129e Reverting r111 change to bound parameters for Item.erase() (minus the exception fix) -- bound parameters/multiple statements/no can do
Item deleting should work properly now
2006-06-02 21:11:14 +00:00
Dan Stillman
338bb54fdc Adjust flattenArguments() to properly handle scalar values -- so now it can be passed pretty much anything and just return a flattened array
Fixed typo in notifier debug() statement
2006-06-02 20:51:34 +00:00
Dan Stillman
013af36855 Fixed some issues with object reloading -- because of the way JS closures work, simply overwriting the old object doesn't work, since the interface code retains a reference to the old object -- in other words, a memory leak and stale data. Existing item objects now reload in place instead. Same change made to collections, though I'll have to test that after I add Collection editing and save().
This behavior of JS has some implications for how interface code handles things like deletes. The following won't do what one might expect/desire (and my apologies if this is obvious or redundant, but I figure it's worth pointing out):

var item = Scholar.Items.get(1);
Scholar.debug(item);
Scholar.DB.query("DELETE FROM items WHERE itemID=1");
Scholar.Items.reloadAll();
Scholar.debug(item);

The last line will still display the old object, even though _items[1] has been deleted inside Scholar.Items. The following does work, however:

var item = Scholar.Items.get(1);
Scholar.debug(item);
Scholar.DB.query("DELETE FROM items WHERE itemID=1");
Scholar.Items.reloadAll();
var item = Scholar.Items.get(1);
Scholar.debug(item);

Now item is properly undefined. Moral of the story: object references need to be deleted manually after receiving delete notifications, for if external code still has references to deleted data objects, the data layer can't do much about it.
2006-06-02 19:48:22 +00:00
Simon Kornblith
bb57e6ba7d Provide visual feedback for scraping 2006-06-02 18:22:34 +00:00
Dan Stillman
8f34487205 Fixed error in new item itemData insert (trying to bind across multiple statements) (yes we need unit tests)
Missing parens in Items._load() causing it to load all items in !all mode

Show type in debug output when binding params
2006-06-02 16:37:17 +00:00
Dan Stillman
60ada26e8d Delete from the right array when unregistered itemTrees 2006-06-02 15:41:11 +00:00
David Norton
f37ab47b39 Revised the way the ItemTreeView handles multiple-selection deletes.
Revised the way the dateAdded and dateModified columns are displayed.
Views are now unregistered on window close.

A few functions in overlay.js were renamed.
Began better commenting of the interface code.
2006-06-02 15:27:52 +00:00
David Norton
2a117168a9 Interface code for delete selected collection. (doesn't the function deleteCollectionSelection just sound great?)
Although I do not yet have interface code for it, collections do not have any sort of setName(), save() functions.
Collections list now implements notify()
2006-06-02 14:11:23 +00:00
David Norton
fdd8245eec Some experimentation with drag and drop (doesn't work yet)
Made some fixes on itemTreeView to allow for notify() on multiple deletes
	(shifts the row identifier up 1 for each previous delete, etc.)
	One more thing -- this might not happen because the tree calls each Item.erase() or Collection.removeItem() individually.
Bug fix on notifier.js so that register*Tree() actually returns the hash. :-)
	Unfortunately, unregister*Tree() does not seem to actually work, there is still an object at _observers['itemTree'][hash]
(temporary): When you select an item Scholar no longer loads a page into the browser.
	The javascript bugs on those HTML pages were frustrating the debugger.
2006-06-02 12:59:58 +00:00
Dan Stillman
bebf0f223a Fix exception when erasing items and switch to bound parameter 2006-06-02 07:11:54 +00:00
Dan Stillman
daa1a6e8a5 Fix debug message in Notifier to properly handle int or array for ids 2006-06-02 07:04:13 +00:00
Dan Stillman
a7d5685da7 Updated Item.save() to use bound parameters for most queries so that values are properly escaped (and for somewhat cleaner code) 2006-06-02 07:03:24 +00:00
Simon Kornblith
639a006efb XPCOM-ize ingester, fix swapped first and last name in ingested info, stop ingesting pages field (this should be for pages of the source used, not the total number of pages, right?) 2006-06-02 03:19:12 +00:00
Dan Stillman
864fa537b5 Last of the update triggers, I think 2006-06-02 01:17:44 +00:00
Dan Stillman
70630a2e70 - Change: Scholar.Notifier.trigger() can be passed an array of ids in some cases rather than a single id -- trees that implement notify() should use Scholar.flattenArguments(ids) to get an array either way
- Added Notifier triggers to Item.erase() (which only runs if not in a nested transaction) and Collections.erase()

- notify() in ItemTreeView updated with example of taking multiple ids, though it doesn't actually work (and notify() implementations may decide just to refresh the whole tree when ids.length>1 rather than dealing with changes individually)

- When deleting collections, use DB tables that actually exist
2006-06-01 22:19:21 +00:00
Dan Stillman
4e0dbb3885 DB.transactionInProgress() -- this generally shouldn't be needed externally, but due to nested transactions there can be cases where it's unavoidable 2006-06-01 22:04:09 +00:00
Dan Stillman
38d87463af Item.inCollection(collectionID) -- test if an item belongs to a given collection (currently uses a DB call--I'll optimize that later)
Scholar.Notifier framework to handle update notifications between data layer and interface

 - Notifier.registerColumnTree(ref) and Notifier.registerItemTree(ref) pass back a unique hash that can be used to unregister the tree later with unregister*(hash) (and must be, lest we leak treeViews and probably entire browser windows if the browser window is closed without unregistering the treeView)

 - Data layer calls Scholar.Notify.trigger(event, type, id) after various events (only two calls in the data layer at the moment--more coming later)

 - Notify.trigger() calls notify(event, type, id) on all registered trees of the appropriate type -- the data layer usually knows what collection the action pertains to, but we decided that it's cleaner to just let the tree decide what it wants to do rather than add all that logic into the data layer)

 (Note: Item collection adds appear to be buggy on the interface side, but removes seem to be working)
2006-06-01 20:03:53 +00:00
Dan Stillman
0d27815694 Scholar.randomString( [int len] ) -- generate a random string 2006-06-01 19:46:57 +00:00
David Norton
c2c0f0f614 "New Item..." fixed for new Metadatapane overlay.
Minor interface improvements.

(Revision 100!!!!!!!!!!!!!!!!!!)
2006-06-01 18:50:16 +00:00
Dan Stillman
024e1f78e3 Call varDump automatically in Scholar.debug() on non-strings -- no more nesting varDump() 2006-06-01 18:43:44 +00:00
David Norton
d65bf82e0e ItemTreeView now has support for receiving change events. (needs support on the data layer, and probably bug fixes).
(+ some cosmetic changes)
2006-06-01 17:54:41 +00:00
David Norton
c1241b608a Removed organizeWindow.xul/js (All this functionality is in overlay)
Removed view.xul/js/css (see above)
Enabled deletion (exception when deleting from library)
2006-06-01 16:40:43 +00:00
Dan Stillman
b9a5c7dc38 Fixed creators not getting inserted into itemCreators on new item save() 2006-06-01 07:29:39 +00:00
Simon Kornblith
551582eb7e Still getting the hang of Subversion...the rest of the ingester code 2006-06-01 06:53:39 +00:00
Dan Stillman
db1b85881c Scrapers table and sample scraper from Simon 2006-06-01 06:35:33 +00:00
David Norton
2be758e488 Updated trees to work with new setup. Some New Item functionality. etc. 2006-06-01 03:50:34 +00:00
Dan Stillman
03637a6c63 Updated schema for new collections ("projects"?) model and updated sample data accordingly; added a couple extra indexes; made 'rights' and 'source' regular metadata fields so that items can be used for things like notes
Overhauled data access layer to support new model:

	- Changed Item.getParent to Item.getCollections() to get ids of parent collections
	- Removed Item.setPosition() -- item positions are set internally when items are added to and deleted from collections, but the orderIndex is not currently used or manipulatable externally
	- Item constructor/Items.getNewItemByType()/Items.add() no longer take folderID and orderIndex as parameters
	- Split getTreeRows() into Scholar.getCollections(parent) and Scholar.getItems(parent), which return root collections or all library items, respectively, if no parent given
	- All references to folders in object/method/property names changed to collections
	- New methods Collection.addItem(itemID), Collection.hasItem(itemID), Collection.removeItem(itemID)
	- Collection.erase() takes optional deleteItems parameter to delete items from DB -- otherwise just removes association and leaves item in library (does, however, delete all descendent collections from DB regardless)

* Note: This will break displaying of items until interface code is updated. *
2006-06-01 00:22:18 +00:00
David Norton
041e607dd7 Some toggling options for the Scholar pane (persists). 2006-05-31 22:01:31 +00:00
David Norton
7f1d3edf69 Editing metadata works.
The metadata and notes panes are aligned along the right side of view.
The CSS and XUL for view.xul are now better structured.
2006-05-31 21:06:16 +00:00
David Norton
22cd938ecc Some new CSS placeholders once the designers start making this look good.
Scholar.TreeView is now Scholar.FolderTreeView (SourcesTreeView later? depends)
Some changes to the way FolderTreeView works.
New Scholar.ItemGroup -- used by FolderTreeView and ItemTreeView.
the root folder is not currently displayed -- doesn't really matter because we are changing the way it all works.
(note: the Scholar.Items.getAll() function does not seem to be working correctly -- try clicking on the library)
2006-05-31 20:29:46 +00:00
David Norton
a1ae5c13c9 View item interface prototype (click View, Metadata, Notes, to toggle.) Styles need a lot of work. 2006-05-31 17:50:33 +00:00
David Norton
233a2414e7 Some temporary viewing in-browser. 2006-05-30 22:06:33 +00:00
Dan Stillman
a4a1f9bd2b Looks like the name@domain format is indeed the recommended format for extension ids rather than GUIDs (thanks David). My bad.
Switching to scholar@chnm.gmu.edu -- SVN folks should rename the text file in their FF profile directories. (Used to be scholar@chnm, so you need to make the change even if you hadn't changed to the GUID yet.) Anyone who's tried the XPI yet will need to reinstall just once from the URL (http://chnm.gmu.edu/firefoxscholar/download/scholar-dev.xpi), as the old version won't find updates with its id.
2006-05-30 21:01:34 +00:00
David Norton
b7f78aa189 Drag and drop column reorder on items tree.
Some basic editing capabilities. (interface needs work, fixing).
2006-05-30 19:24:57 +00:00
David Norton
1910eb32f9 Renamed the main window from scholar.xul, .js to organizeWindow.xul, js 2006-05-30 16:46:19 +00:00
David Norton
126baf5e58 * Cleaned up the scholar.dtd file to look better, added some more column names.
* Renamed treeView.js to folderTreeView.js (more changes on this file forthcoming) -- this will soon be specifically for folders.
* Added itemTreeView.js, with new Scholar.ItemTreeView class -- specifically for items.
* The items list now supports 3 additional columns: rights, date added, and date modified.
* For now, selecting an item loads the "I'm Feeling Lucky" result of a Google search on the item title.
2006-05-30 16:37:51 +00:00
Dan Stillman
b135f92ef9 Updated install.rdf format to current template from Mozilla.org and updated some values (extension is now version 0.1pre1)
Added update.rdf for auto-update mechanism (which will get moved out of the extension root by the build system but should stay with a particular tree)

Assigned a new GUID to extension

*** Important: The extension GUID has changed, so you should rename the scholar@chnm text file in your Firefox profile exensions directory to our new GUID "{e007c81c-eb2a-4e1d-b381-d25a45cd11ed}" and restart Firefox ***
2006-05-30 04:28:38 +00:00
Dan Stillman
bc0463774f Move XPCOM-included files into subdirectory to keep separate from chrome files and rename overlay.js to scholar.js 2006-05-27 00:44:24 +00:00
Dan Stillman
f09def19f7 - Implemented singleton XPCOM component to store core Scholar objects
More details coming on Basecamp: http://chnm.grouphub.com/W161222

*** Important note: after checking out this code, be sure to delete the compreg.dat and xpti.dat files in your FF profile directory or else the extension will not load. They'll be regenerated when you start FF again, and you won't have to do it again unless we add interfaces or other components. Once I set up the XPI packaging system, this step won't be necessary. ***

- Localization properties are now loaded directly via nsIStringBundleService and available via Scholar.getString(name) -- removed stringbundle from XUL

- Updated status line in bottom right to reflect whether Scholar is loaded correctly or not (temporary, obviously)
2006-05-27 00:20:27 +00:00
David Norton
a531966a2c More UI experimentation 2006-05-24 18:43:49 +00:00
David Norton
4a7412560e Upgraded Scholar window to work more correctly (thanks Mozilla Bookmarks Manager!)
Removed sidebar, editpane for now.
2006-05-24 16:03:24 +00:00
David Norton
a78715cf5c Added some selection handlers... 2006-05-24 13:31:39 +00:00
David Norton
cc195532c0 Took out singular ('item' and 'folder') from getTreeRows().
Basic tree traversal in single-window mode.
2006-05-23 21:59:31 +00:00
Dan Stillman
6918757b8b Accept singular or plural ('item'/'items' or 'folder'/'folders') for type parameter in getTreeRows() 2006-05-23 21:39:23 +00:00
Dan Stillman
e5b25a966b Items.getTreeRows() now takes an optional second param, type, which can (for the moment) be 'folders' or 'items' to limit the results
New methods: Folder.hasChildFolders() and Folder.hasChildItems()
2006-05-23 20:53:09 +00:00
David Norton
edb653cad4 completed move to overlay.xul. Main interface will now be in scholar.xul. Next move: move functionality from sidebar.xul, editpane.xul to scholar.xul 2006-05-23 19:12:53 +00:00
David Norton
139fc8ca99 step 2 of moving scholar.xul to overlay.xul 2006-05-23 19:10:03 +00:00
David Norton
bfcd391da6 2006-05-23 19:06:11 +00:00
David Norton
22d6e93478 Edit pane is now at the top of the window.
Hash map is created to keep track of rows by item ID.
2006-05-23 15:04:25 +00:00
Dan Stillman
74e2d5a842 New methods:
Scholar.Folder.erase() -- deletes a folder and all descendent folders and items

Scholar.Folder._getDescendents() - returns an array of descendent folders and items (rows of 'id' and 'isFolder') ("private" for now--could be useful as public later)

Scholar.Folders.unload() - clear folder from internal cache (used by Scholar.Folder.erase())
2006-05-23 14:54:10 +00:00
Dan Stillman
b56dcf5fbe Added more helpful error messages in DB class
DB transactions are now automatically nested if beginTransaction() is called when one is already in progress -- the queries aren't committed until the outermost commitTransaction() is called, which is handy for calling methods with their own transactions inside others when the entire process should be a transaction (e.g. Folder.erase() calling Item.erase() for the folder's descendents). Rollbacks are a little trickier -- currently, a rollback in a nested transaction flags the entire transaction for rollback when the outermost commit is reached, which for our purposes will probably be fine.
2006-05-23 14:50:58 +00:00
Dan Stillman
05d1fba368 Fixed SQL error in creator update query in Item.save() 2006-05-23 13:08:19 +00:00
David Norton
6c62115669 Creator editing and deleting should be fully working from the interface side (exceptions thrown on data access side, usually with deletes) 2006-05-23 12:53:06 +00:00
David Norton
3ad618f6df New editing pane. Lots of smaller bugs.
ScholarLocalizedStrings moved out of sidebar.js and into Scholar.LocalizedStrings

Rudimentary creator adding/editing. lots of things to work on, because it doesn't work.
2006-05-22 18:51:22 +00:00
Dan Stillman
deea149235 Moved creatorTypeID into itemCreators and changed code accordingly; updated sample data
Added Scholar.CreatorTypes with methods getTypes() (multi-dim array with 'id' and 'name') and getTypeName(creatorTypeID)

Fixed bug in Scholar.Creators.purge() causing SQL error when deleting a non-existent creator

Fixed incorrect field order for itemCreators INSERT queries in save()

Changed setCreator() to take empty creator names (causing DELETE in itemCreators but without shifting up creators below it (or down and above, depending on your perspective) like removeCreators())
2006-05-20 15:18:36 +00:00
David Norton
a75fb2ddb6 Added items show without refreshing.
The title column is by default the only one visible.
2006-05-19 18:21:27 +00:00
David Norton
72a2dd9216 Folders deletion logic added (needs Folder.erase() which should recursively delete children as well) 2006-05-19 15:26:54 +00:00
David Norton
0fa7c008aa fixed delete functionality -- for now (still need to work out folders) 2006-05-19 14:59:36 +00:00
David Norton
782d049dcd The properties file is now better realigned.
The selection no longer lost or moved on folder opening/closing.
The erase functionality works, on Mac (Windows) use the delete (backspace) or forward delete (delete) keys.
	unfortunately there are sometimes exceptions so I am not calling erase() on each item until we figure out what the problem is.
view._deleteItem() and view._insertItem() are now view._hideItem() and view._showItem() to better reflect functionality.
2006-05-19 13:53:37 +00:00
Dan Stillman
be6c2f2862 Once will be enough 2006-05-19 12:21:13 +00:00
Dan Stillman
c8b3863b9c Delete old tables 2006-05-19 11:37:33 +00:00
Dan Stillman
c726b3ba77 Added Scholar.Items.erase(id) and Scholar.Item.erase() -- can be used externally with the former or internally with the latter
Fixed bug in Scholar.Creators._getHash()
2006-05-19 11:31:45 +00:00
Dan Stillman
7800f7a39b Fix saving of new items
Added Scholar.Folders.reloadAll(), used after saving a new item or moving one to refresh isEmpty

Fixed bug where items without creators wouldn't show
2006-05-18 21:55:43 +00:00
David Norton
d398339997 New... button menu loads from DB, localizes.
I think the functionality for adding a new item works on the interface end, Dan do you want to take a look?
2006-05-18 21:15:02 +00:00