Commit graph

454 commits

Author SHA1 Message Date
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
9234aa8b9b Addresses #45, reorder item fields -- but this time in reality, not just in my mind
Schema version not changed -- reset manually if you upgraded in the last few minutes
2006-07-31 04:41:46 +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
0a9d6d5684 Changing _Scholar for Firefox_ in the extensions window to the less redundant _Scholar_, per a conversation with Dan -- will show on reinstall 2006-07-27 14:59:40 +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
David Norton
aff9cd5708 ScholarPane.getSelectedItem() is now ScholarPane.getSelectedItems(), and returns an array of selected items. 2006-07-26 15:09:06 +00:00
David Norton
b9f577da91 Closes #125, Separate customControls.xml into multiple files 2006-07-26 14:46:27 +00:00
David Norton
dd4bc6f5e8 Fixes #113, "New Note" should put note in currently selected project 2006-07-26 14:30:38 +00:00
David Norton
a08bbe5347 Fixes #120, Scholar preference for Above Content breaks display.
Changes the edit pane to look a lot better (uses groupbox).
Individual tabs don't load their content unless selected.
2006-07-26 14:03:54 +00:00
David Norton
16a995df86 Closes #121, functions to get selected project and items in Scholar pane.
- ScholarPane.getSelectedCollection() returns collection object, or null if Library is selected.
 - ScholarPane.getSelectedItem() returns selected item/note/item-like-thing, or null if no item is selected.
2006-07-24 22:12:25 +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
David Norton
0cf2101019 SelectItemsDialog (for See Also) unregisters tree views on close.
Fixes minor display problems with Tags, See Also.
2006-07-20 23:57:53 +00:00
David Norton
7103fd4f1d Fixes #23, "see also" part of note.
Also, metadata looks better. See Also and Tags and Items.
2006-07-20 23:19:31 +00:00