were being added to references. I think these should work with most
references, but I haven't checked with all possible reference types
(for example books).
Also added a sort key for the bibliography based on the publication
year, but it is really hard to know if this is correct as sorting of
bibliographies in OpenOffice with the plugin seems to have bugs.
Also, added a sort by authors then year to the citation format. I
believe this is correctly done and testing with the openoffice plugin
suggests that it is having some effect, though it isn't working quite
right (sometimes doesn't sort authors correctly - it seems to have
problems with et al. citations).
to be working correctly. This may be incorrect in a strict sense, but in the
current implementation of the openoffice plugin, they are not doing what they
are supposed to. However, turning these off does not appear to affect things
- i.e., name initials continue to appear in citations even after setting
these options to false.
http://www.agu.org/pubs/AuthorRefSheet.pdf . Changes consist of:
1) Changed use of "&" in citations to "and".
2) Citation prefix and suffix are now [ and ].
2) Added italic to author names in citations and to volume in
bibliographic references.
AGU style based on their style guide and experience with AGU
references. Changes consist of:
1) Make it so that all references use initials for author's first
names. I am not sure if this is officially in the style document, but
I have never seen an AGU publication that didn't use initials for
author names.
2) Make it so that et al. is only used in bibliographic references
when you have more than 10 authors and that only the first author name
is used in this case, in accordance with
http://www.agu.org/pubs/AuthorRefSheet.pdf.
3) Set the disambiguate-add-givenname option to false for citations.
This MAY BE INCORRECT (not clear from above mentioned style guide - no
mention of what to do in ambiguous cases), but setting it to true
caused it to add the disambiguation in OpenOffice citations in wierd
places. I think this might be a BUG in Zotero. I am guessing that
upon citation Zotero was using disambiguate with respect to all
references in my database, not just those in the document, AND that
it considered names like John L. Doe and J. L. Doe different (or
something like that), causing it to add initials when it really wasn't
necessary. Turning this off will produce the correct result in the
vaste majority of cases, but will fail in just those cases where
disambiguate is supposed to be used.
Apologies for the massive (and, due to data_access.js splitting, difficult-to-follow) commit. Please note that external code that accesses the data layer may need to be tweaked for compatibility. Here's a comprehensive-as-possible changelog:
- Added server sync functionality (incomplete)
- Overhaul of data layer
- Split data_access.js into separate files (item.js, items.js, creator.js, etc.)
- Made creators and collections first-class objects, similar to items
- Constructors now take id as first parameter, e.g. new Zotero.Item(1234, 'book'), to allow explicit id setting and id changing
- Made various data layer operations (including attachment fields) require a save() rather than making direct DB changes
- Better handling of unsaved objects
- Item.setCreator() now takes creator objects instead of creator ids, and Item.save() will auto-save unsaved creators
- clone() now works on unsaved objects
- Newly created object instances are now disabled after save() to force refetch of globally accessible instance using Zotero.(Items|Creators|etc.).get()
- Added secondary lookup key to data objects
- Deprecated getID() and getItemType() methods in favor of .id and .itemTypeID properties
- toArray() deprecated in favor of serialize(), which has a somewhat modified format
- Added support for multiple creators with identical data -- currently unimplemented in interface and most of data layer
- Added Item.diff() for comparing item metadata
- Database changes
- Added SQLite triggers to enforce foreign key constraints
- Added Zotero.DB.transactionVacuum flag to run a VACUUM after a transaction
- Added Zotero.DB.transactionDate, .transactionDateTime, and transactionTimestamp to retrieve consistent timestamps for entire transaction
- Properly store 64-bit integers
- Set PRAGMA locking_mode=EXCLUSIVE on database
- Set SQLite page size to 4096 on new databases
- Set SQLite page cache to 8MB
- Do some database cleanup and integrity checking on migration from 1.0 branch
- Removed IF NOT EXISTS from userdata.sql CREATE statements -- userdata.sql is now processed only on DB initialization
- Removed itemNoteTitles table and moved titles into itemNotes
- Abstracted metadata edit box and note box into flexible XBL bindings with various modes, including read-only states
- Massive speed-up of item tree view
- Several fixes from 1.0 branch for Fx3 compatibility
- Added Notifier observer to log delete events for syncing
- Zotero.Utilities changes
- New methods getSQLDataType() and md5()
- Removed onError from Zotero.Utilities.HTTP.doGet()
- Don't display more than 1024 characters in doPost() debug output
- Don't display passwords in doPost() debug output
- Added Zotero.Notifier.untrigger() -- currently unused
- Added Zotero.reloadDataObjects() to reset all in-memory objects
- Added |chars| parameter to Zotero.randomString(len, chars)
- Added Zotero.Date.getUnixTimestamp() and Date.toUnixTimestamp(JSDate)
- Adjusted zotero-service.js to simplify file inclusion
Various things (such as tags) are temporarily broken.