Commit graph

472 commits

Author SHA1 Message Date
Simon Kornblith
dac5bbb3f3 closes #183, export bibliography to RTF 2006-08-14 21:54:45 +00:00
Simon Kornblith
feff0aa531 closes #53, export to footnote or bibliography
closes #180, make all contextual menu export/create bibliography options work right

also:
- add Chicago Note style output
- unregister RDF data sources from cache after import
2006-08-14 20:34:13 +00:00
Dan Stillman
46fa6484a5 Fix last unhelpful debug message in db.js 2006-08-14 18:44:28 +00:00
Dan Stillman
c92faace52 Fixes #179, adding a new creator then clicking an existing creator makes the creator field disappear
Fixed a number of creator-editing-related issues (mostly interface-side, with a little help from the data layer):

- New row no longer disappears when clicking "+" and then clicking the existing or new creator (removed onselect="ScholarItemPane.loadPane(this.selectedIndex)" on the <deck> (from r371, with changelog "Individual tabs don't load their content unless selected"), which doesn't seem to be necessary as far as I can tell)

- New row no longer disappears when changing creator before editing names (setting the creator type now triggers an Item.save() with an otherwise blank creator (now allowed by the data layer), which isn't entirely ideal but is probably OK for now)

- Clicking the minus button on an unsaved row (i.e. one just created with the plus button) no longer throws an error (new method Item.hasCreatorAt(pos), and ScholarItemPane.removeCreator() just deletes the label directly, since it doesn't get a notify() event to reload the pane)

- The plus button is disabled on unsaved rows, since allowing the user to create multiple unsaved rows and then edit one in the middle is problematic (and the other alternatives have their own problems); the minus button is also disabled on the default row that shows when there are no creators

- Creator type is no longer reset when editing a name field

- Name field is no longer erased when clicking directly on creator type popup and changing creator type without blurring textbox

- Comma is appended to last name when switching from <textbox> to <label> without saving changes (before it was just appended to labels when the pane was loaded)
2006-08-14 10:02:00 +00:00
Simon Kornblith
3195a1c382 closes #112, ingested items should be automatically added to selected project
references #178, changes to various date fields

- updates CSL to work with the latest schema. we can now (almost) generate completely valid APA style. the only issue is that there's no syntax for specifying short forms for page and creator type labels.
- updates scrapers to use date field rather than year field.
- removes now-unnecessary translation engine code pertaining to year field.
2006-08-14 05:12:28 +00:00
Dan Stillman
1ea0e14ad3 Fixes #182, Date Added/Modified is in UTC
Added isUTC parameter to Scholar.Date.sqlToDate() and now run the two columns through that

Side effect: now using toLocaleString() to format the date strings
2006-08-14 03:19:01 +00:00
Dan Stillman
496daebd8e Oops 2006-08-13 22:30:25 +00:00
Dan Stillman
cfc13ee9ac Closes #178, various changes to date fields
Closes #111, minor modifications to field list schema

Changes per above tickets and comments at http://chnm.grouphub.com/projects/310105/msg/cat/2333974/2995041/comments

- date, year and lastModified merged into date
- added date field to journalArticle
- added series, seriesTitle and seriesText to journalArticle
- added seriesNumber (along with series) to book and bookSection
2006-08-13 20:31:11 +00:00
Simon Kornblith
1ada4ddc00 add localized strings for CSL
closes #110, implement CSL for citation styling
2006-08-12 23:28:39 +00:00
Simon Kornblith
05edc2a08b rewrote citation support to support new version of CSL schema. bibliographic output is much improved. 2006-08-12 23:23:56 +00:00
Dan Stillman
bf96eca337 Use alternate method of differentiating between no network connection and invalid repository response in _updateScrapersRemoteCallback(), since xmlhttp.noNetwork property is no longer available
(xmlhttp.status seems to turn into a very large integer when there's a network error--I can't imagine this a fairly reliable test, but, then, neither was the previous one, and at least at the moment we're not actually using the test for anything other than an appropriate debug message)
2006-08-12 04:44:58 +00:00
Simon Kornblith
ddb4fc872c remove the doStatus argument from Scholar.Utilities.HTTP 2006-08-12 04:27:49 +00:00
Dan Stillman
7e1a678f9b Addresses #136, Detect mime type and character set of local files when importing
Use new MIME type detection tricks when linking and importing files -- now for charset detection...
2006-08-12 03:54:13 +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
d0d1ed8c1d Scholar.File -- some methods to help with MIME type detection of local files (might be abstracted into MIME class later)
Methods:

getExtension(ext)
isExternalTextExtension(ext)
getSample(nsIFile)
sniffForMIMEType(nsIFile)
sniffForBinary(nsIFile)
getMIMETypeFromFile(nsIFile)
hasInternalHandler(nsIFile)
2006-08-12 01:41:48 +00:00
Dan Stillman
f07ff9ac2a Renamed "Files" to "Attachments" -- since Files could be links as well as actually files (or both, for web page snapshots), things were getting just about as confusing as when Items were called Objects.
If you have attachments to the old terminology, feel free to file a complaint.

Changed interface code too, since David is gone (or at the very least has more important things to do with his remaining time)
2006-08-12 00:18:20 +00:00
Simon Kornblith
36a402713c rename Scholar.Utilities.Ingester.HTTPUtilities to Scholar.Utilities.Ingester.HTTP for consistency 2006-08-11 16:34:22 +00:00
David Norton
e56abbc5f4 Closes #138, Ability to view files
Some minor fixes to editing creators.
2006-08-11 15:48:26 +00:00
Dan Stillman
1447b3be92 Item.getLocalFileURL() -- Return a file:/// URL path to files and snapshots 2006-08-11 15:34:06 +00:00
Simon Kornblith
064ecd17db removes unnecessary pieces of piggy bank API from utilities and updates translators to abide by current translator guidelines 2006-08-11 15:28:18 +00:00
Dan Stillman
1e8aa81c02 Fixes #108, Delay repository check by a few seconds if DB transaction is already in progress 2006-08-11 05:51:55 +00:00
Dan Stillman
9c7f33e21a Extended itemCreators primary key to include orderIndex and removed artificial restriction on adding the same creator/creatorType more than once for the same source -- who knows, maybe they just have the same name...
Properly ignore firstName for institutional creators in Item.setCreator() and Item.creatorExists() (which is now unused)
2006-08-11 05:15:56 +00:00
Dan Stillman
957b220cd3 Closes #56, add "institution" field in creators table to deal with institutional authors
- 'isInstitution' parameter added to Item.setCreator(), Creators.getID(), Creators.add()

- 'isInstitution' property added to return from Creators.get() and Item.getCreator()


var obj = Scholar.Items.getNewItemByType(1);
obj.setField('title', 'Digital History for Dummies');
obj.setCreator(0, '', 'Center for History and New Media', 1, true); // true == institutional creator
var id = obj.save();


Note: 'firstName' field is ignored when 'isInstitution' is true
2006-08-11 04:36:44 +00:00
Dan Stillman
9e75fc2589 Localized string for website accessDate 2006-08-10 22:46:44 +00:00
Dan Stillman
97628b0d2c More helpful debug error output in DB parameter handling and Notifier.trigger() 2006-08-10 22:46:00 +00:00
Dan Stillman
892478be2e Fixed bug that was breaking Scholar.Files.getFile() 2006-08-10 22:44:45 +00:00
David Norton
d815154efa Removing a saved search removes the item in the left pane.
Search dialog:
 - should work now.
 - Any/All control
 - All 8 operators
Add search button uses an icon
2006-08-10 22:39:21 +00:00
Dan Stillman
7d48fdbeda Closes #175, Add ability to specify certain conditions as required in an ANY search
Conditions in ANY queries can be made required by passing 'true' as an extra parameter to addCondition() and updateCondition() -- this can be used for limiting ANY queries to particular collections (in place of the removed 'context' condition), but if there was an elegant way to expose it to the user for all ANY queries, it's something users might find very useful.
2006-08-10 21:05:28 +00:00
Dan Stillman
3a410c5acd Addresses #171, Add more conditions to advanced search architecture
- Implemented 'collectionID' and 'savedSearchID' conditions (a.k.a. search within a search) and removed special 'context' condition. Per my conversation with Dan, the 'recursive' flag is now a global flag that applies to all specified collectionIDs, which is less than ideal but probably better than the alternatives (e.g. having condition-specific recursive checkboxes). It does mean, however, that a "Search subfolders" checkbox is irrelevant if there are no collectionID conditions and should probably be greyed out until applicable.

Another side effect is that it's no longer possible to do an ANY search and return results only within a specific folder (though it can now be done by putting the ANY conditions in a subsearch). Since ANY searches are always annoying in this regard, what I might do is add a way to mark particular conditions as required even in ANY mode, which would allow for quite a lot of flexibility...

Note also that while 'collectionID' and 'savedSearchID' are standard conditions, they should probably be combined into a single condition on the interface side (like playlists and smart playlists under just 'Playlist' in iTunes).

- Now skips invalid/obsolete saved conditions in load()
2006-08-10 09:44:08 +00:00
Dan Stillman
4fe960d190 Search updates:
- Remaining searchConditionIDs are no longer affected by removeCondition() (i.e. they now act like autoincrements), which should make interface code simpler

- Changed default join mode to ALL

- Fixed loading of saved searches with no search conditions
2006-08-10 04:32:36 +00:00
Dan Stillman
0061a8d0df Fix problem with addCondition() overwriting existing search conditions (thanks David) 2006-08-10 02:52:29 +00:00
Simon Kornblith
3a1ffb6174 make LOC/WebVoyage scraper and other scrapers using Scholar.loadTranslator work again 2006-08-09 18:59:38 +00:00
Dan Stillman
f3a66085f5 Closes #173, Try to detect content type of linked pages without loading entire file
Closes #174, Don't load images and attached files when detecting content type in linkFromURL()

If mime type not provided, Scholar.Files.linkFromURL() now uses XMLHTTPRequest HEAD request to get the content type without loading file (thanks Simon for the idea)

If title not provided, try to figure it out from URL, though not particularly intelligently (last slash)

Note that order of title and mimeType parameters is now swapped

This code should be a bit smarter about unexpected conditions
2006-08-09 18:37:34 +00:00
Simon Kornblith
cde7170868 references #169, add OpenURL interface hooks
Scholar.OpenURL.discoverResolvers() now returns an array of {name, url, version} objects
2006-08-09 16:58:54 +00:00
Dan Stillman
36af25b3e9 Cache file link mode 2006-08-09 16:25:28 +00:00
David Norton
6877d33e61 Closes #172, add preference for EndNote MIME type stealing feature
Addresses #169, add OpenURL interface hooks
Addresses #170, Put "Link" option before "Import" in drop-down menu

Fixes some advanced search flaws (there are still bugs)
2006-08-09 15:44:11 +00:00
David Norton
8d5f1e62b6 Closes #47, advanced search
Closes #152, Saved Searches (interface layer)

For now, advanced search IS a saved search.

There are still bugs. The 'search' icon is ugly. I wanted to get it out there, however.
2006-08-09 11:43:33 +00:00
Dan Stillman
d7990b0e03 Updated Scholar.Files.linkFromURL() to take title and mime type as parameters, to prevent loading huge external PDFs just to get the content type when the ingester already knows it (though that will hopefully be alleviated by #173 and #174 later) 2006-08-09 06:32:16 +00:00
Dan Stillman
318cf3194f Addresses #171, Add more conditions to advanced search architecture
Added conditions 'tagID', 'tag' (text), 'creator' (concats first and last before comparing), and 'note'
2006-08-08 23:08:52 +00:00
Simon Kornblith
6efd6d2cc4 closes #99, add options for export 2006-08-08 23:00:33 +00:00
Simon Kornblith
af080fe384 allow EndNote MIME handler to be unregistered without restarting Firefox 2006-08-08 21:40:33 +00:00
Simon Kornblith
3edb6e0286 closes #86, steal EndNote download links
Scholar should now attempt to process citation information from EndNote download links (MIME types application/x-endnote-refer and application/x-research-info-systems). in situations where Scholar cannot process the information, a standard helper app dialog will appear. this behavior is controlled by the preference extensions.scholar.parseEndNoteMIMETypes.
2006-08-08 21:17:07 +00:00
Dan Stillman
9f57379415 Make searchConditionIDs a little easier to work with--now accessible by with the .id property of search conditions in addition to index 2006-08-08 15:40:42 +00:00
Dan Stillman
f8739ee6c5 Closes #135, Associate MIME types with abstract file types and implement Scholar.FileTypes.getIDFromMIMEType()
MIME type prefixes are handled using wildcards (e.g. audio/foobar will return the audio file type since it matches 'audio/%')
2006-08-08 08:23:23 +00:00
Dan Stillman
1de9007608 Take two 2006-08-08 07:05:39 +00:00
Dan Stillman
b5cb0e3a92 Fixed repeat single-file loading with Files.importFromURL() and Files.linkFromURL() (have to use the "pageload" event rather than "load" -- thanks Simon) 2006-08-08 07:05:05 +00:00
Dan Stillman
425d806307 Closes #158, Add linkFromURL() and importFromURL() functions to Scholar.Files 2006-08-08 06:08:21 +00:00
Dan Stillman
d7ed7c256c Fix the startup trouble the search code was causing (moved DB call into init() function rather than constructor) -- sorry about that 2006-08-08 05:26:51 +00:00
Simon Kornblith
504ebf8996 closes #162, do sniffing for import formats
import should now work regardless of file extensions. this should make #86 (steal EndNote download links) fairly easy to implement.
2006-08-08 02:46:52 +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
216f0c7581 closes #83, figure out how to implement OpenURL
closes #76, implement extensible search/retrieval architecture for obtaining metadata

OpenURL COinS lookup is now implemented using a real search architecture system. at the moment, it works with Open WorldCat for books, CrossRef for journal articles (provided the COinS object contains a DOI or an ISSN), and PubMed when a PMID is available.
2006-08-08 01:06:33 +00:00
David Norton
9e5c15423a Fixes #164, On item delete, if "Erase Files" is not checked, it still shows files and notes being deleted.
If you are simple removing an item from a project, it won't ask you if you want to delete files and notes.

ItemTreeView:
 - notify() now works with multiple ids for action=modify.
 - saveSelection() returns an array of selected IDs instead of saving it to a class variable
 - rememberSelection(selection) takes an array of IDs.
2006-08-07 15:25:29 +00:00
Simon Kornblith
6626eba844 addresses #83, figure out how to implement OpenURL
OpenURL lookup now works for books. this means that all that's necessary to add scrapable book metadata to a page is an ISBN, as shown below:

<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info:ofi/fmt:kev:mtx:book&amp;rft.isbn=1579550088"></span>

also, we can now scrape Open WorldCat and Wikipedia Book Sources pages with no specialized code involved.

i'm still looking for a better way of looking up journal article metadata. it's currently implemented with CrossRef, but CrossRef simply will not work without a DOI, and is also incomplete (only holds the last name of the first author).
2006-08-07 05:15:30 +00:00
Simon Kornblith
56769079b0 addresses #83, figure out how to implement OpenURL
Scholar.OpenURL.resolve(item) returns the URL that retrieves an item from the user's OpenURL resolver. this means we can implement a "find in my library" feature.
Scholar.OpenURL.discoverResolvers() returns a list of available resolvers for the user's current location (by IP address).
2006-08-06 21:59:50 +00:00
Dan Stillman
d4acec8a77 Addresses #111, minor modifications to field list schema, and http://chnm.grouphub.com/P2995041
Still some outstanding questions on Basecamp, though
2006-08-06 16:10:28 +00:00
Simon Kornblith
fc589a37cf closes #131, make import/export symmetrical
all 4 import/export formats currently supported (MODS, Hybrid RDF, Unqualified Dublin Core, and RIS) now work as both import and export translators
2006-08-06 09:34:51 +00:00
Simon Kornblith
9144b56772 addresses #131, make import/export symmetrical
closes #163, make translator API allow creator types besides author

import and export in the multi-ontology RDF format should now work properly. collections, notes, and see also are all preserved. more extensive testing will be necessary later.
2006-08-05 20:58:45 +00:00
Dan Stillman
1ce4de835b Fixes #167, Item note cache is not set on new note creation 2006-08-05 07:42:32 +00:00
Dan Stillman
8dd972dea1 Make Collection.getDescendents() a[n officially] public method and add second param to limit results to 'collection' or 'item' 2006-08-05 06:39:15 +00:00
Dan Stillman
701762a11f Fixes #166, Scholar.ItemTypes.getID("journalArticle") throws "Invalid item type journalarticle"
Fixed ignoreCase logic (and also set all but CharacterSets to false, since there's no reason for them to be true)

Also made CachedTypes.getID() and getName() return false and '', respectively, on unknown types rather than letting them hit the error (there's still the 'invalid * type' debug message)
2006-08-04 19:39:53 +00:00
David Norton
0b552c5fdb Closes #153, When deleting an item, don't give option to erase attached notes and files when there are none
Also, the default option (when applicable) is to delete attached notes and files.
2006-08-04 14:36:04 +00:00
David Norton
85815dad49 Closes #159, "Snapshot to Current Page" and "Link to Current Page" should save page as item
-   We might want to do this for regular files as well? I think we need a discussion on how Citation will be presented to the user, and if that will save the web page, and all that jazz.
2006-08-04 14:23:44 +00:00
Dan Stillman
9d58fac7e0 Abstracted the Scholar.*Types logic to a base function that can be extended and added singletons for the various types -- rock the JS prototype model 2006-08-04 04:34:16 +00:00
Simon Kornblith
b4c8dbe700 closes #157, add database infrastructure for different CSL styles
CSL is stored in a new "csl" table. only metadata relevant to updates and selection (ID, date updated, and title) is stored in columns.
2006-08-03 04:54:16 +00:00
Simon Kornblith
30af2c89df - closes #130, add progress bar for import/export
- eliminates "unresponsive script" message on import/export

i tried to make a progress bar that actually provides useful information, but for some reason, XUL interface updates are done asynchronously, and thus don't actually happen as long as the import/export operation continues. the code is there, but disabled, if there's some solution to this issue, but i searched and couldn't find one.
2006-08-02 21:06:58 +00:00
David Norton
6ad7acf4d8 Addressed #155, Localize strings 2006-08-02 17:57:16 +00:00
David Norton
e30a1b717a Addresses #63, Add GPL license info to source code.
License file added.
	Header added to David's interface files -- add header to your own files.
2006-08-02 16:49:19 +00:00
David Norton
04ce48ae64 Closes #156, Double-clicking a note in the item list should open it in a popup window 2006-08-02 16:08:19 +00:00
David Norton
b79420e75b Closes #154, Clicking an item in Related should display that item.
Cancel Search ('x') button now uses a custom image.
Fixes problem with items list freezing on item add
2006-08-02 15:13:31 +00:00
Simon Kornblith
f6c12d3d81 closes #112, ingested items should be automatically added to selected project 2006-08-02 14:17:16 +00:00
Dan Stillman
5c6d9de4b8 Addresses #77, maintain database backups
Temporarily added in a check of the backup file on startup, since I'm not entirely convinced that the backup mechanism on shutdown couldn't create a corrupt file under certain conditions

If you run with debug output on and notice the "Backup file was corrupt" message, let me know.
2006-08-01 23:32:18 +00:00
Dan Stillman
d3bc693dab Closes #77, maintain database backups
The Scholar database is backed up on browser close. On startup, if the main database is damaged, the extension saves a copy of the damaged file and tries to restore from the last automatic backup. If it fails, it creates a new database file.

New methods:

Scholar.getScholarDatabase(string [ext])
Scholar.backupDatabase()
Scholar.moveToUnique(file, newFile) -- find a unique filename using the leafName of newFile as the suggested name (using the built-in Mozilla functionality) and move the file there
Scholar.Date.getFileDateString(file)
Scholar.Date.getFileTimeString(file)
2006-08-01 23:10:31 +00:00
Dan Stillman
9a0457b43e Register shutdown handler to call Scholar.shutdown() on exit 2006-08-01 18:01:56 +00:00
David Norton
635d2e48b9 Closes #151, Show "X" in search box to cancel search.
- I had to make the textbox taller, but it seems to be working right.
Fixed problem with note editor in right pane not updating correctly.
2006-08-01 18:01:48 +00:00
David Norton
3414004cb0 Closes #45, reorder item fields 2006-07-31 22:35:14 +00:00
David Norton
cd4dd3bd92 Closes #148, Files should display a different icon for each type (file & snapshot, linked & unlinked)
Clicking a file or note in the rightmost pane displays it in the middle pane.
2006-07-31 20:35:22 +00:00
David Norton
0632cbf5e4 Closes #91, Add dialog to delete child notes when a source is deleted
Closes #146, ScholarPane.selectItem(id)
Closes #147, "Edit in a Separate Window" on a note should select the note's parent item.
Addresses #143, Scholar toolbar button to save current page as an independent file in the selected project.
 - Standalone Files are now added to the current Project.
Files added to an item are now actually attached to the item.
2006-07-31 19:14:06 +00:00
David Norton
426b839e5f Changed Add button to a single button, with a dropdown menu. 2006-07-31 17:05:41 +00:00
David Norton
4757d21b20 Fixes #143, Scholar toolbar button to save current page as an independent file in the selected project. 2006-07-31 16:58:14 +00:00
Dan Stillman
40ef9f669d Closes #90, Add flag to delete child notes when a source is deleted
Item.erase(true) deletes child items as well instead of just unlinking
2006-07-31 06:05:19 +00:00
Dan Stillman
526d368aaf Closes #117, permit dashes and commas in "pages" field
Closes #118, add "translator" creator type
Closes #122, add DOI and abbreviated journal title fields
Addresses #45, reorder item fields -- source/rights moved down to bottom; date fields not yet moved
2006-07-31 04:31:44 +00:00
Dan Stillman
9da1c210a0 Change repository check time back to once a day 2006-07-31 03:38:02 +00:00
Dan Stillman
1adeb840bf Closes #98, Cache note content to avoid repeated DB calls 2006-07-30 21:49:34 +00:00
Dan Stillman
6ab7fd1e18 Closes #119, When Item.isNote(), Item.getField('title') should return first line of note
Returns the first 80 characters of the note content as the title

Also changed setField() to use the loadIn parameter for primary fields so it can be used instead of this._data without affected _changedItems
2006-07-30 21:01:23 +00:00
David Norton
331a608a1e Closes #139, Ability to link to files, webpages
Buttons under Files tab are icons, so that they can fit horizontally.
2006-07-28 19:56:49 +00:00
David Norton
29fcb08083 The fullscreen button is now an image. It looks different depending on whether the pane is on top or bottom, and changes background when activated. 2006-07-28 16:49:19 +00:00
Dan Stillman
82106afc95 JavaScript, how I love thee.
Fixes URL not being stored with saved web pages.
2006-07-28 16:20:48 +00:00
David Norton
1ff56d8650 Add File (from current page) uses the correct document now. (thanks Dan) 2006-07-28 16:11:44 +00:00
David Norton
81a980e4db Fixes Select All on Windows. But more importantly, uses the correct command structure for Select All, Delete, and provides the structure for future commands. 2006-07-28 13:28:50 +00:00
Simon Kornblith
a663966c4f closes #2, clipboard export
for the moment, this feature is disabled on the mac, since firefox can't handle HTML on the clipboard (and thus we can't copy the fully formatted bibliography). i can re-enable it if it would be useful regardless.
2006-07-28 04:09:40 +00:00
Simon Kornblith
6305e4cada closes #55, export bibliography to printable version
closes #4, Make printable version

- moves functions for creating and deleting hidden browser objects to scholar.js (from ingester.js), since these are necessary for printing as well
- allows saving bibliography in HTML or printing bibliography. style support is not yet complete (pending finalization of 0.9 version of CSL specification).
2006-07-27 23:01:55 +00:00
David Norton
1d03bf6b71 Fixes #16, select all does not work in items list 2006-07-27 21:18:42 +00:00
David Norton
49d1eec9e8 Closes #127, Display files under files tab
Closes #128, Display files as children of item in items list

Fixes #132, On Full-screen mode, browser content disappears but Scholar content does not stretch.
Fixes #133, When Scholar on top, pane automatically resizes depending on item info height.
2006-07-27 18:08:09 +00:00
Dan Stillman
441696767a Don't return non-independent file items in Scholar.getItems() (thanks David) 2006-07-27 15:55:03 +00:00
Dan Stillman
c093e7b62b Item.isRegularItem() = !(Item.isNote() || Item.isFile()) 2006-07-27 15:04:22 +00:00
Dan Stillman
c50dedc90a Addresses #17, add filesystem/ability to store files
Not finished, but enough to give David something to work with

No BLOBs -- just linking/importing of files and loaded documents


New Scholar.Item methods:

incrementFileCount() (used internally)
decrementFileCount() (used internally)
isFile()
numFiles()
getFile() -- returns nsILocalFile or false if associated file doesn't exist (note: always returns false for items with LINK_MODE_LINKED_URL, since they have no files -- use getFileURL() instead)
getFileURL() -- returns URL string
getFileLinkMode() -- compare to Scholar.Files.LINK_MODE_* constants: LINKED_FILE, IMPORTED_FILE, LINKED_URL, IMPORTED_URL
getFileMimeType() -- mime type of file (e.g. text/plain)
getFileCharset() -- charsetID of file
getFiles() -- array of file itemIDs this file is a source for

New Scholar.Files methods:

importFromFile(nsIFile file [, int sourceItemID])
linkFromFile(nsIFile file [, int sourceItemID])
importFromDocument(nsIDOMDocument document [, int sourceItemID])
linkFromDocument(nsIDOMDocument document [, int sourceItemID])

New class Scholar.FileTypes -- partially implemented, not yet used

New class  Scholar.CharacterSets -- same as other *Types classes:
getID(idOrName)
getName(idOrName)
getTypes() (aliased to getAll(), which I'll probably change the others to as well)

Charsets table with all official character sets (copied from Mozilla source)

Renamed Item.setNoteSource() to setSource() and Item.getNoteSource() to getSource() and adjusted to handle both notes and files
2006-07-27 09:16:02 +00:00
Dan Stillman
4959535aff Scholar DB now stored in scholar subfolder of profile directory
New methods for retrieving profile directory, scholar subdirectory and scholar/storage subsubdirectory
2006-07-27 08:45:48 +00:00
David Norton
46f77ec8ab Set icon for extension (visible on Add-Ons window. You'll have to reinstall Scholar to see).
NOTE: The icon is temporary, just a placeholder. We are waiting on somebody that has real design skills to create a real icon.
2006-07-26 17:48:27 +00:00
David Norton
a47bf41eb6 Created Scholar toolbar button (use Customize Toolbar... option) 2006-07-26 16:42:26 +00:00
David Norton
dc2751b85c Fixes #129, add menu/contextual menu items for export/bibliography
(currently just in contextual menu).
2006-07-26 15:28:31 +00:00