Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
dev:zotero_2.1_and_zotero_standalone_for_developers [2011/02/05 19:52] – simon | dev:zotero_2.1_and_zotero_standalone_for_developers [2011/04/20 10:11] – rmzelle | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | See [[dev/ |
- | + | ||
- | ===== Changes to citation API ===== | + | |
- | + | ||
- | With the introduction of citeproc-js, | + | |
- | developers should use Zotero.Style.csl to acquire a citeproc-js engine instance for citation formatting. < | + | |
- | + | ||
- | ===== Changes to interface-related code ===== | + | |
- | + | ||
- | Zotero as a tab and Zotero Standalone | + | |
- | + | ||
- | < | + | |
- | + | ||
- | ===== Changes to translators ===== | + | |
- | + | ||
- | * Several functions in Zotero.Utilities have been eliminated, as they were essential duplications of built-in JavaScript methods. | + | |
- | + | ||
- | * Zotero.configure() and Zotero.displayOptions() no longer exist. Instead, translators should specify config and display options in the metadata block at the top of the translator, e.g. < | + | |
- | " | + | |
- | [...] | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }</ | + | |
- | + | ||
- | * It is no longer necessary to specify " | + | |
- | + | ||
- | * Import and export translators now show determinate progress bars. By default, Zotero computes progress by the percentage of the file read for import, or the percentage of items retrieved using Zotero.nextItem() for export. Translators can override this by calling Zotero.setProgress(percentage) to set the percentage the progress bar displays, or Zotero.setProgress(null) to show an indeterminate indicator. | + | |
- | + | ||
- | ===== Changes to translate interface ===== | + | |
- | + | ||
- | New code should create new instances of the translate interface using type-specific constructors, | + | |
- | + | ||
- | < | + | |
- | ====== Changes in Zotero Standalone (not yet implemented) ====== | + | |
- | ===== Changes to translators ===== | + | |
- | Zotero Everywhere will soon allow translators to operate outside of Firefox/ | + | |
- | + | ||
- | * Firefox-specific JavaScript must be avoided. This includes | + | |
- | * E4X | + | |
- | * "for each" loops | + | |
- | * array comprehensions | + | |
- | * destructuring assignment | + | |
- | * several other features | + | |
- | + | ||
- | * Zotero.Utilities.retrieveDocument() and Zotero.Utilities.retrieveSource() should be avoided if possible. The former is unlikely to work outside of Firefox, while the latter may freeze the browser interface during operation. Zotero.Utilities.processDocuments() and Zotero.Utilities.HTTP.doGet() will continue to be available. | + | |
- | + | ||
- | * Translate.getTranslatorObject() should now be called with a callback function as an argument, which will receive the translator object when it is available. | + | |
- | + | ||
- | * Zotero.selectItems() should now be called with a callback function as an argument, which will receive the list of selected items when it is available. Translators may still use Zotero.selectItems() synchronously, | + |