Commit graph

74 commits

Author SHA1 Message Date
Dan Stillman
fc2be86681 Closes #292, "Delete From Library" context menu option in collections
Library or Saved Search:

"Delete Selected Item From Library..."

Collection:

"Remove Selected Item"
"Delete Selected Item From Library..."
2006-09-22 09:01:25 +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
Simon Kornblith
ecfff1393f - closes #225, ability to cite a specific page/paragraph/etc in Word integration. the output isn't quite right at the moment, but the interface works.
- removes net icons that haven't been used in months
- fixes another date bug (the last one, i hope)
- renames CSL class to Scholar.CSL
2006-09-11 01:05:26 +00:00
Dan Stillman
e2aa1a06db Closes #247, Add interface option for institutional creators in item edit pane
Here's a shot at a single/double creator field toggle switch -- let me know what you think

A few issues:

- There's currently no comma between the last name and first name when in two-field mode -- I removed it to greatly simplify the code, hoping to be able to use the CSS :after pseudo-element, but that seems to not work with XUL -- I'll figure out a clean solution and add it back ( refs #288 ) 

- It's not very smart about switching between single-field mode and two-field mode, as it currently just keeps the last word (even if it's "Jr." or "III") as the last name and puts the rest in the first name field -- not a big deal, but it should at least be a bit smarter about this ( refs #289 )

- There are probably some other bugs
2006-09-08 22:46:49 +00:00
Simon Kornblith
451be4b3a3 closes #242, internationalized date handling 2006-09-06 07:04:02 +00:00
Dan Stillman
697fcedc58 Capitalization typo in new item drop-down 2006-09-06 01:22:06 +00:00
Simon Kornblith
05f56aa489 closes #273, no location asked for in bibliography export (i think)
- improved bibliography (especially Chicago Manual of Style)
- improved error handling for import/export/bibliography
- bibliographic export now ignores notes and standalone attachment (before, they made export silently fail). an error appears if you try to generate a bibliography from only notes or standalone attachments.
2006-09-05 02:03:59 +00:00
Simon Kornblith
e0f6f023d8 various fixes to citation formatting (mostly Chicago Manual of Style) 2006-09-05 01:09:04 +00:00
Simon Kornblith
dd0c537ce1 closes #267, MODS export option uses an rdf extension (should be xml)
thanks to Dan for the idea
2006-09-04 22:57:23 +00:00
Dan Stillman
0515e4cb9e New attachment menu wording 2006-09-01 18:59:54 +00:00
Dan Stillman
41ba29180d Don't disable "View Attachment" button for links, and change the text to "View File" or "View Link" depending on what's selected 2006-08-31 22:14:13 +00:00
Simon Kornblith
2f364432ef oops. actually commit the string changes, and change comments in translate.js 2006-08-31 07:52:28 +00:00
Dan Stillman
146b92585d Fixes #249, User should not be able to try to delete "My Library" 2006-08-31 06:27:02 +00:00
Dan Stillman
433121ec50 Removed 'thesisType' field, replacing with regular 'type' 2006-08-31 06:02:30 +00:00
Simon Kornblith
27617ee152 closes #236, Export windows should offer a default filename with extension
closes #238, present dialog if no import translator is available for a file
closes #240, change XML namespaces
2006-08-30 19:57:23 +00:00
Dan Stillman
6ad69b3a13 Closes #201, new collection (formerly project) naming
Dialog on new collection and cleaner dialog for rename
2006-08-30 19:07:51 +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
Dan Stillman
30e2920c27 Closes #230, Update collection pane context menu for saved searches
Proper labels for saved searches, hiding rather than disabling irrelevant menu options, added "New Saved Search..." to menu, made file and bibliography export work with saved searches, added "Export Library..." option to Library drop-down
2006-08-30 04:09:34 +00:00
Simon Kornblith
498073bc4d MOTH FORMS -> MONTH FORMS (not that it matters) 2006-08-30 04:01:33 +00:00
Simon Kornblith
1c21bddbfc - modifications to citation engine's handling of localized strings
- added the missing integrationDocPrefs.xul file
2006-08-30 04:00:19 +00:00
Dan Stillman
51e7c8fbef Forgot the localized string 2006-08-30 01:20:56 +00:00
Dan Stillman
77f8a4ad30 Closes #235, title of left column 2006-08-30 00:37:42 +00:00
Simon Kornblith
73b5634f62 addresses #215, allow user to select citation style and change citation styles on the fly
addresses #214, add footnote support to word integration

- the third icon on the Zotero Word toolbar is now reserved for "Document Options," which, for now, means on the selection of styles
- the Document Options window will, for now, appear the first time you create a citation. the default style probably belongs in the Scholar preferences window.
- you can now generate citations in both footnote and in-text citation formats. you can't yet switch between them on the fly, but that should be coming soon...
- Ibid is not yet implemented. again, coming soon.
2006-08-29 23:15:13 +00:00
Simon Kornblith
0c24beee3f closes #213, add in-text citation support to citation engine
fixes date and et al. handling bugs in citation engine
permits citation of multiple items in Word integration
2006-08-29 04:24:11 +00:00
Dan Stillman
46368e98dd Closes #176, Customize search operators for itemData fields
Implemented isBefore and isAfter operators and added to date conditions -- currently have to type dates in SQL format, but we'll have a chooser or something by Beta 2 (this should probably be a known issue)

Added isLessThan and isGreaterThan to 'pages', 'section', 'accessionNumber', 'seriesNumber', and 'issue' fields, though somebody should probably check me on that list

Removed JS strict warning on empty search results
2006-08-28 20:49:24 +00:00
Dan Stillman
624faaf110 Closes #202, attachments categorized as notes
"Notes" column changed to "#" and combined with the attachment count. "#" isn't exactly immediately self-explanatory, but "Notes/attachments" would be way too long, and once you realize what it's for (i.e. the first time you create a child item), you really don't want the column taking up any more room than that... If people have a better suggestion, do share.
2006-08-25 08:37:16 +00:00
Dan Stillman
59c00ba6c2 Localized strings for the search dialog box, but not used yet (I'm not sure if XUL in bindings can use DTD strings or need to use properties...) 2006-08-25 08:12:28 +00:00
Dan Stillman
7d6bd8d0af "project"=>"collection" (already "collection" in most places internally) 2006-08-24 19:43:48 +00:00
Dan Stillman
3ac311e85a Search improvements:
Conditions can now offer drop-down menus rather than freeform text fields -- implemented for collections/saved searches and item types

Special handling to combine collections and saved searches into a single "Collection" menu (can we get away with calling them "Smart Collections"?) -- internally, values are stored as C1234 or S5678 in the interface and converted to/from regular collectionID and savedSearchID conditions for search.js

Use localized strings for conditions (tries searchConditions.* first, then itemFields.*)

Alphabetize condition list

Operator menu now fixed length for all conditions
2006-08-21 05:08:11 +00:00
Simon Kornblith
94bd2415da adds short roles to CSL (Ed. instead of Editor)
adds COinS to exported HTML
uses real lists in HTML output
fixes other small citation style issues
2006-08-19 23:14:27 +00:00
Dan Stillman
3a18dcb70f Unsaved creators are no longer saved (e.g. on creator type change) if they don't have a firstName or a lastName
(Also fixes bug from r379 where changing creator type on a blank unsaved creator would actually insert "(first)" and "(last)")

Localized '(first)' and '(last)'


Refs #179, adding a new creator then clicking an existing creator makes the creator field disappear
2006-08-15 03:19:11 +00:00
Simon Kornblith
dac5bbb3f3 closes #183, export bibliography to RTF 2006-08-14 21:54:45 +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
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
Dan Stillman
9e75fc2589 Localized string for website accessDate 2006-08-10 22:46:44 +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
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
Simon Kornblith
6efd6d2cc4 closes #99, add options for export 2006-08-08 23:00:33 +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
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
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
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
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
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
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
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
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
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