Commit Graph

48 Commits

Author SHA1 Message Date
Dan Stillman
5dbe732158 Fix error generating reports from top-level notes
Checked in on branch and tag
2007-10-18 19:30:46 +00:00
Dan Stillman
4ab9ee060d Closes #756, add "parent item" info for child notes from letters and interviews
Also:

- Adds two modes to toArray() for including letter/interview titles
- Adds mode to getDisplayTitle() for including author and date
2007-10-18 18:26:59 +00:00
Dan Stillman
97d810fc22 Closes #654, reports need to export child items independently from parent items
Two options currently only available via about:config, combineChildItems and includeAllChildItems (which really means "Include All Child Items If Only Parent Items Are Selected")

Other changes:

- Moved Zotero.Utilities.cleanString() functionality to ZU.trimInternal() and created a regular trim() too that doesn't consolidate internal whitespace.
- Removed Zotero.getAll(), replaced with Zotero.Collection.getChildItems() and a new onlyTopLevel flag to Zotero.Items.getAll(). Also removed unused Zotero.getAttachments.
- Fixed XML parsing error during report generation when a long URL contained a trailing space
2007-09-12 08:59:34 +00:00
Dan Stillman
7feb7995d7 Fixes #694, Problems with zotero://select
- Custom protocol handler extensions like zotero://select can now not return a channel and the request will be automatically cancelled without throwing an error
- Switched Timeline code to use the stringbundle methods to access timeline.properties
- Even though zotero://select now works properly, switched Timeline to access ZoteroPane directly and call selectItem() (calling toggleDisplay() first to open the Zotero pane if necessary)
- Now getting some localized strings from Zotero ("Date Added" and the short month names)
2007-08-15 08:06:33 +00:00
Ben Parr
8e8bd4dc9c Timeline Update:
- HTML title now contains the name of the library / saved search / collection whose items are being displayed in the timeline
- Clearer notes for the changes made to bundle.js, timeline-api.js and timelineControls.js
2007-08-02 21:59:12 +00:00
Ben Parr
3491798be2 Timeline Update:
- Changed the URL format to use query strings in order to make URLs more flexible 
- Changed the "Jump to Year" option...
	 1) goes to the typed year 1 second after a change to the text field or when the user pushes the return key
	 2) deleting everything in the text field returns the timeline to today's date
	 3) removed the "Go..." button
2007-08-02 19:35:55 +00:00
Ben Parr
0f5bd0d1cf Creates a timeline from Zotero items using the Timeline tool from MIT's Simile project. You can create a timeline by clicking the Actions icon in Zotero and then clicking Create Timeline. 2007-07-31 17:08:12 +00:00
Simon Kornblith
f5761d507a Adds support for the revised CSL schema and an APA CSL. Support for the old schema is maintained through the Zotero.CSL.Compat interface.
closes #563, fix defaults issues in CSL parser (now irrelevant)
closes #335, clean up citation code
2007-07-14 23:23:41 +00:00
Dan Stillman
b2f78c11d8 Fix report generation via collection context menu 2007-04-28 16:12:47 +00:00
Dan Stillman
46a5e4b195 Fixes #621, saved search displays child items in black even if only parent item matches search criteria
Addresses #597, Don't iterate Array with for...in

Also fixes child items displaying twice in saved search reports and adds proper collation support in reports
2007-04-21 21:18:05 +00:00
Dan Stillman
2a1658228b Closes #601, Allow Quick Copy to be site-specific
Closes #560, Method for inserting bibliography/export format into text box on current page

Dragging items to external text apps is also possible now (the one oddity being that the format has to be set at the beginning of the drag session, so if the window's current page matches a site-specific setting, the dragged references will use that format even the if the text is dropped into an external app or another window)
2007-04-06 15:54:03 +00:00
Dan Stillman
2e2fa0dcfa *As always, but in particular this time, do not test this commit with valuable data -- but please do test.*
- Massive optimization of data layer -- with ~11,000-item test library on a Mac Pro, decreased initial Zotero pane loading from several minutes to ~10 seconds. This included some small API changes and new methods (e.g. Items.cacheFiles()) in the data layer, but most of it was changing the way loading and caching of data worked internally.

- Moved unique itemData values out to separate itemDataValues table for better normalization

- Updated itemTreeView.sort() to be able to sort a single row into the items list for performance reasons -- itemTreeView.notify() now only sorts a single row when possible (and sometimes doesn't need to sort anything). This should make general interface use dramatically less sluggish with large libraries.

- Consolidated purging on item deletes, which should speed up multi-item deletes quite a bit -- clients should use Items.erase() instead of Item.erase(), since the former calls the new Items.purge() method (which calls the various other purge() methods) automatically

- Notifier no longer throws errors in notify() callbacks and instead just logs them to the Error Console -- this way a misbehaving utility (or Zotero itself) won't keep other observers from receiving change notifications

- Better handling of database corruption -- if an SQL query throws a file corruption error, Zotero adds a marker file to the storage directory and displays a message prompting the user to restart to attempt auto-repair--and, most importantly, no longer copies the corrupt file over the last backup.

- A "Loading items list..." message appears over the items list (at least, sometimes) while data is loading -- useful for large libraries, but may need to be fine-tuned to not be annoying for smaller ones.

- Note titles are now cached in itemNoteTitles table

- orderIndex values are no longer consolidated when removing items from collections -- it just leaves gaps

- Fixed shameful bug in getRandomID() that could result in an item with itemID 0, which wouldn't display correctly and would be impossible to remove

- Fixed autocomplete and search for new location of 'title' field

- Added proper multipart date support for type-specific 'date' fields

- Made the pre-modification array passed to Notifier observers on item updates actually be pre-modification

- New method Zotero.ItemFields.isFieldOfBase(field, baseField) -- for example, isFieldOfBase('label', 'publisher') returns true, as does isFieldOfBase('publisher', 'publisher')

- Restored ability to drag child items in collections into top-level items in those collections

- Disabled unresponsive script message when opening Zotero pane (necessary for large libraries, or at least was before the optimizations)

- Collections in background windows didn't update on item changes

- Modifying an item would cause it to appear incorrectly in other collections in background windows

- Fixed an error when dragging, hovering to open, and dropping a note or attachment on another item

- Removed deprecated Notifier methods registerCollectionObserver(), registerItemObserver(), unregisterCollectionObserver(), and unregisterItemObserver()

- Loading of Zotero core object can be cancelled on error with Zotero.skipLoading

- Removed old disabled DebugLogger code

- New method Zotero.log(message, type, sourceName, sourceLine, lineNumber, columnNumber, category) to log to Error Console -- wrapper for nsIConsoleService.logMessage(nsIScriptError)

- New method Zotero.getErrors(), currently unused, to return array of error strings that have occurred since startup, excluding CSS and content JS errors -- will enable an upcoming Talkback-like feature

- Fixed some JS strict warnings in Zotero.Date.strToMultipart()
2007-03-16 16:28:50 +00:00
Simon Kornblith
70d06e02f2 closes #440, In-page highlighting of snapshots
closes #441, In-page annotations of snapshots

testers: please check pages containing both annotations and highlights to make sure everything works correctly
2007-01-03 02:21:26 +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
d0d3f80a61 Much improved date handling in searches and autocomplete
Fixes #338, Dates in search window should be converted to UTC before searching
Addresses #220, Add a more friendly way to enter dates in search window and accessDate field

- Unless passed a full datetime, the search system automatically parses the string with strToDate(), so one can search for an accessDate, etc., using a freeform phrase. It will use the SQL parts where available and also search for remaining words individually, so "November 6, 2006" will find '2006-10-06 Nov. 6 2006' and "Summer 2006" will find '2006-00-00 Summer 2006". It will also properly handle SQL parts, so "August 2006" in the is/isNot operator will use "LIKE '2006-08-__'" (underscore being the single-character wildcard) and isBefore will use '2006-08-00'

- Stored UTC dates are converted to localtime in the search system when searching on just a date part, since otherwise searching for a local date with a UTC timestamp after midnight would be unsuccessful

- Date field autocomplete is now disabled in the search dialog, but on the off-chance that it's used somewhere, the autocomplete will now return just the user part of a multipart date field

- Access date autocomplete only returns date, not datetime

- Fix for Date Added and Date Modified showing as UTC

- Date.isSQLDateTime()


Known issues:

- accessDate field in metadata pane still requires SQL format

- Proper parsing of search dates with no years (e.g. searching for "August 25") depends on #389, "Date.strToDate() should return available parts even if no year"
2006-11-06 12:05:57 +00:00
Dan Stillman
c83a4e3762 And use the correct new component name ourselves... 2006-10-10 23:14:30 +00:00
Dan Stillman
9dc5280576 More appropriate names for the component files 2006-10-10 17:02:18 +00:00
Dan Stillman
b6cb874610 Renamed the contract ID for the Zotero from "@chnm.gmu.edu/Zotero;1" to "@zotero.org/Zotero;1" -- this is a little dumb, since it means that utilities will have to be changed for Beta 3, but since this line will end up being copied all over the place in perpetuity, it's probably better for it to be zotero.org. (And actually, it may not come up much--anyone working within the main overlay will already have the Zotero object and in other windows people can just include chrome://zotero/content/include.js in their XUL file and not worry about it...)
Removed ECL from chnmIZoteroService.js, since most of it is boilerplate from Mozilla anyway
2006-10-10 16:53:47 +00:00
Dan Stillman
cd26267afe Closes #340, Change isInstitution to fieldMode everywhere
Including in the DB, which it turns out isn't really all that bad (thanks, among other things, to SQLite's ability to DROP tables within transactions without autocommitting (which MySQL can't do))
2006-10-05 00:59:26 +00:00
Dan Stillman
026b37169a Closes #63, Add ECL license info to source code
Added on all non-trivial files -- be sure to copy over XML or JS version as appropriate for new files
2006-10-04 17:16:56 +00:00
Dan Stillman
9f959bf3e0 Display and save multiple-field selections in the creator autocomplete
In other words, show both "Shakespeare" and "Shakespeare, William" in the drop-down, and if the latter is chosen, save both fields

One issue is that since the autocomplete is by default limited to the width of the textbox, longer entries get truncated (though you can see them with a mouseover), and that may not be easy to fix.
2006-10-03 08:38:49 +00:00
Dan Stillman
c97b4b0bc0 OK, this might be it, assuming I got the build script right 2006-10-03 00:29:42 +00:00
Dan Stillman
1cd51be497 Sorry, it was now or never, and now is better:
Changed "Scholar" to "Zotero", everywhere

Apologies to anyone with working copy changes, but there are probably the fewer at this moment than there will be again.

Hopefully this won't break anything, though existing prefs will be lost. I avoided scholar.google.com--if you know any other legitimate "scholar"s in the code, be sure to fix them once I'm done here.

This is a multi-commit change--there's at least one more coming. *Do not update to this version! It won't work!*
2006-10-02 23:15:27 +00:00
Dan Stillman
ace0d17ccb Moving Scholar.Attachments to its own file 2006-10-02 21:41:38 +00:00
Dan Stillman
2682ac0ee3 A rather important part of the last commit
Refs #260
2006-10-01 09:47:00 +00:00
Dan Stillman
da5e74a06a Autocomplete for creators in item pane
Differentiates between single and double fields for the search, but there's a problem in the current implementation in that only one field is editable at once, so displaying two-field names in a drop-down is a little problematic. While I could display the full names, comma-delimited, and get the discrete parts (which is what Scholar.Utilities.AutoComplete.getResultComment(), included in this commit, is for--the creatorID for the row would be hidden in the autocomplete drop-down comment field), it's a bit unclear what should happen when a user selects a comma-separated name from the drop-down of one of the fields. One option would be to have a row for the last name (in case that's all they want to complete) and other rows for "last, first" matches, and selecting one of the two-part names would replace whatever's in the opposite name field with the appropriate text (and save it to the DB, I'm afraid, unless I change how the creator fields work), keeping the focus in the current textbox for easy tabbing. Not great, but it might work.

Other ideas?
2006-09-25 06:38:47 +00:00
Dan Stillman
237db5ed58 Copied out scraping progress window for general use -- I'll use this for fulltext indexing notification, and ideally the scraper will use this instead now (Simon, let me know if there's any problem with that)
Example usage:

var windowWatcher = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].
					getService(Components.interfaces.nsIWindowWatcher);
var progress = new Scholar.ProgressWindow(windowWatcher.activeWindow);
progress.changeHeadline('Indexing item...');
progress.addLines(['All About Foo'], ['chrome://scholar/skin/treeitem-book.png']);
progress.addDescription('Bar bar bar bar bar');
progress.show();
progress.fade();
2006-09-21 07:54:18 +00:00
Dan Stillman
ab13c3980a Fulltext search support
There are currently two types of fulltext searching: an SQL-based word index and a file scanner. They each have their advantages and drawbacks.

The word index is very fast to search and is currently used for the find-as-you-type quicksearch. However, indexing files takes some time, so we should probably offer a preference to turn it off ("Index attachment content for quicksearch" or something). There's also an issue with Chinese characters (which are indexed by character rather than word, since there are no spaces to go by, so a search for a word with common characters could produce erroneous results). The quicksearch doesn't use a left-bound index (since that would probably upset German speakers searching for "musik" in "nachtmusik," though I don't know for sure how they think of words) but still seems pretty fast.

* Note: There will be a potentially long delay when you start Firefox with this revision as it builds a fulltext word index of your existing items. We obviously need a notification/option for this. *

The file scanner, used in the Attachment Content condition of the search dialog, offers phrase searching as well as regex support (both case-sensitive and not, and defaulting to multiline). It doesn't require an index, though it should probably be optimized to use the word index, if available, for narrowing the results when not in regex mode. (It does only scan files that pass all the other search conditions, which speeds it up considerably for multi-condition searches, and skips non-text files unless instructed otherwise, but it's still relatively slow.)

Both convert HTML to text before searching (with the exception of the binary file scanning mode).

There are some issues with which files get indexed and which don't that we can't do much about and that will probably confuse users immensely. Dan C. suggested some sort of indicator (say, a green dot) to show which files are indexed.

Also added (very ugly) charset detection (anybody want to figure out getCharsetFromString(str)?), a setTimeout() replacement in the XPCOM service, an arrayToHash() method, and a new header to timedtextarea.xml, since it's really not copyright CHNM (it's really just a few lines off from the toolkit timed-textbox binding--I tried to change it to extend timed-textbox and just ignore Return keypress events so that we didn't need to duplicate the Mozilla code, but timed-textbox's reliance on html:input instead of html:textarea made things rather difficult).

To do:

- Pref/buttons to disable/clear/rebuild fulltext index
- Hidden prefs to set maximum file size to index/scan
- Don't index words of fewer than 3 non-Asian characters
- MRU cache for saved searches
- Use word index if available to narrow search scope of fulltext scanner
- Cache attachment info methods
- Show content excerpt in search results (at least in advanced search window, when it exists)
- Notification window (a la scraping) to show when indexing
- Indicator of indexed status
- Context menu option to index
- Indicator that a file scanning search is in progress, if possible
- Find other ways to make it index the NYT front page in under 10 seconds
- Probably fix lots of bugs, which you will likely start telling me about...now.
2006-09-21 00:10:29 +00:00
Dan Stillman
14b24f3638 Closes #259, auto-complete of tags
Addresses #260, Add auto-complete to search window

- New XPCOM autocomplete component for Zotero data -- can be used by setting the autocompletesearch attribute of a textbox to 'zotero' and passing a search scope with the autocompletesearchparam attribute. Additional parameters can be passed by appending them to the autocompletesearchparam value with a '/', e.g. 'tag/2732' (to exclude tags that show up in item 2732)

- Tag entry now uses more or less the same interface as metadata -- no more popup window -- note that tab isn't working properly yet, and there's no way to quickly enter multiple tags (though it's now considerably quicker than it was before)

- Autocomplete for tags, excluding any tags already set for the current item

- Standalone note windows now register with the Notifier (since tags needed item modification notifications to work properly), which will help with #282, "Notes opened in separate windows need item notification"

- Tags are now retrieved in alphabetical order

- Scholar.Item.replaceTag(oldTagID, newTag), with a single notify

- Scholar.getAncestorByTagName(elem, tagName) -- walk up the DOM tree from an element until an element with the specified tag name is found (also checks with 'xul:' prefix, for use in XBL), or false if not found -- probably shouldn't be used too widely, since it's doing string comparisons, but better than specifying, say, nine '.parentNode' properties, and makes for more resilient code


A few notes:

- Autocomplete in Minefield seems to self-destruct after using it in the same field a few times, taking down saving of the field with it -- this may or may not be my fault, but it makes Zotero more or less unusable in 3.0 at the moment. Sorry. (I use 3.0 myself for development, so I'll work on it.)

- This would have been much, much easier if having an autocomplete textbox (which uses an XBL-generated popup for the suggestions) within a popup (as it is in the independent note edit panes) didn't introduce all sorts of crazy bugs that had to be defeated with annoying hackery -- one side effect of this is that at the moment you can't close the tags popup with the Escape key

- Independent note windows now need to pull in itemPane.js to function properly, which is a bit messy and not ideal, but less messy and more ideal than duplicating all the dual-state editor and tabindex logic would be

- Hitting tab in a tag field not only doesn't work but also breaks things until the next window refresh.

- There are undoubtedly other bugs.
2006-09-07 08:07:48 +00:00
Dan Stillman
19763cc78a - Updated outward-facing "Scholar" references to "Zotero", along with a few of the internal ones that could be problematic to change later (DB, directory, GUID) -- let me know if I missed any
- About panel now gets version number automatically

- Change version from 1.0a1 to 1.0b1


* Important: If you're on an SVN install, you need to rename the scholar@chnm.gmu.edu text file in your profile extension directory to zotero@chnm.gmu.edu *

XPI installs will (I think) update automatically, since I kept an entry in updates.rdf with the old GUID
2006-08-30 07:05:57 +00:00
Simon Kornblith
c2c82e3c54 add basic Word integration. to see it in action, copy Zotero.dot to Microsoft Office 2004/Office/Startup/Word. if the gods are with you, you should see a new toolbar the next time you open Word.
not yet implemented:
- formatted in-text citations, rather than placeholders
- footnotes
- selection of citation style (for now, only APA is available)
- support for non-ASCII characters
- exclusion of notes from select items window
- Windows support (although it shouldn't be difficult)
- probably much more...
2006-08-28 05:38:37 +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
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
794238c23f - Added file.js to chnmIScholarService.js
- Fixed bug in File.hasInternalHandler() (no access to navigator from XPCOM)

- Changed "View Attachment" action to check File.hasInternalHandler() and use window.loadURI() for internally handled files and nsIFile.launch() for external -- this prevents the user from getting a helper app dialog when they try to view external files. I basically had to duplicate most of Mozilla's content detection logic and "guess" whether or not it will be able to handle the file internally, which seems a little silly, but, while I feel there are probably better ways to do various parts of this, what's here seems to do the trick. Let me know if you notice it guessing incorrectly (i.e. you get a helper app dialog rather than having a file just open or it launches a file that should've just been loaded into the window). Also look for text files that should be launched rather than opened, especially XML-based data files, as this is a chance for Scholar to be smarter than Firefox itself--for example, OmniGraffle files, which are actually just XML files, normally open up in Firefox as an XML tree, but Scholar will launch them instead. (I imagine the same will need to be done for OmniOutliner, among other things...)
2006-08-12 03:45:57 +00:00
Dan Stillman
d67d96c321 Closes #7, Add advanced search functionality to data layer
Implemented advanced/saved search architecture -- to use, you create a new search with var search = new Scholar.Search(), add conditions to it with addCondition(condition, operator, value), and run it with search(). The standard conditions with their respective operators can be retrieved with Scholar.SearchConditions.getStandardConditions(). Others are for special search flags and can be specified as follows (condition, operator, value):

'context', null, collectionIDToSearchWithin
'recursive', 'true'|'false' (as strings!--defaults to false if not specified, though, so should probably just be removed if not wanted), null
'joinMode', 'any'|'all', null

For standard conditions, currently only 'title' and the itemData fields are supported -- more coming soon.

Localized strings created for the standard search operators


API:

search.setName(name) -- must be called before save() on new searches
search.load(savedSearchID)
search.save() -- saves search to DB and returns a savedSearchID
search.addCondition(condition, operator, value)
search.updateCondition(searchConditionID, condition, operator, value)
search.removeCondition(searchConditionID)
search.getSearchCondition(searchConditionID) -- returns a specific search condition used in the search
search.getSearchConditions() -- returns search conditions used in the search
search.search() -- runs search and returns an array of item ids for results
search.getSQL() -- will be used by Dan for search-within-search

Scholar.Searches.getAll() -- returns an array of saved searches with 'id' and 'name', in alphabetical order
Scholar.Searches.erase(savedSearchID) -- deletes a given saved search from the DB

Scholar.SearchConditions.get(condition) -- get condition data (operators, etc.)
Scholar.SearchConditions.getStandardConditions() -- retrieve conditions for use in drop-down menu (as opposed to special search flags)
Scholar.SearchConditions.hasOperator() -- used by Dan for error-checking
2006-08-08 02:04:02 +00:00
Simon Kornblith
cbe3611182 references #110, implement CSL for citation styling
add Scholar.Cite and Scholar.CSL for parsing items into a bibliography using CSL. unfortunately, the output is not very good at the moment, and the format likely needs some changes, but I'm working with a few other people on getting it to that point.
2006-07-22 01:25:46 +00:00
Simon Kornblith
c64e5c841f closes #78, figure out import/export architecture
closes #100, migrate ingester to Scholar.Translate
closes #88, migrate scrapers away from RDF
closes #9, pull out LC subject heading tags
references #87, add fromArray() and toArray() methods to item objects

API changes:
all translation (import/export/web) now goes through Scholar.Translate
all Scholar-specific functions in scrapers start with "Scholar." rather than the jumbled up piggy bank un-namespaced confusion
scrapers now longer specify items through RDF (the beginning of an item.fromArray()-like function exists in Scholar.Translate.prototype._itemDone())
scrapers can be any combination of import, export, and web (type is the sum of 1/2/4 respectively)
scrapers now contain functions (doImport, doExport, doWeb) rather than loose code
scrapers can call functions in other scrapers or just call the function to translate itself
export accesses items item-by-item, rather than accepting a huge array of items
MARC functions are now in the MARC import translator, and accessed by the web translators

new features:
import now works
rudimentary RDF (unqualified dublin core only), RIS, and MARC import translators are implemented (although they are a little picky with respect to file extensions at the moment)
items appear as they are scraped
MARC import translator pulls out tags, although this seems to slow things down
no icon appears next to a the URL when Scholar hasn't detected metadata, since this seemed somewhat confusing

apologizes for the size of this diff. i figured if i was going to re-write the API, i might as well do it all at once and get everything working right.
2006-07-17 04:06:58 +00:00
Simon Kornblith
45b9234996 addresses #78, figure out import/export architecture
- changes scrapers table to translators table; all import/export/web translators now belong in this table
- adds Scholar.Translate to handle translation issues. eventually, Scholar.Ingester.Document will become part of this interface
- adds Scholar_File_Interface (in fileInterface.js) to handle UI for export and eventually import. (David, when you have time, please connect Scholar_File_Interface.exportFile to a button.)
- adds an export translator for MODS. all of our metadata, but not our hierarchy (projects, etc.) translates directly and unambiguously into valid MODS. eventually, we can use RDF or another format to handle hierarchy.
- adds utilities.getVersion() and utilities.inArray() for simplified scraper coding
- fixes minor interface issues with the nifty chrome scraping status window
2006-06-29 00:56:50 +00:00
Simon Kornblith
7148852955 make generic Scholar.Utilities class and HTTP-dependent Scholar.Utilities.Ingester and Scholar.Utilities.HTTP classes in preparation for import/export filters; split off into separate javascript file 2006-06-26 14:46:57 +00:00
Dan Stillman
97940c7470 Replaced all instances of "Firefox Scholar" (not counting the repository URL) with "Scholar for Firefox" for now 2006-06-24 09:08:12 +00:00
Dan Stillman
726364d091 Scholar.History -- i.e. undo/redo functionality
Partially integrated into data layer, but I'm waiting to commit that part until I'm sure it won't break everything
2006-06-22 14:01:54 +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
Simon Kornblith
85d8153024 Add library, hooks for scraping MARC records. 2006-06-03 22:26:01 +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
d323df4a2d window.confirm() replacement for XPCOM 2006-06-01 21:57:12 +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
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