Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dev:client_coding:changes_in_zotero_2.1 [2011/08/21 04:36] – created simondev:client_coding:changes_in_zotero_2.1 [2017/11/27 05:09] (current) – Remove Zotero 5 warning bwiernik
Line 14: Line 14:
 ===== Changes to translators ===== ===== Changes to translators =====
  
-  * Several functions in Zotero.Utilities have been eliminated, as they were essential duplications of built-in JavaScript methods.+==== Deprecated functions eliminated ==== 
 +Several functions in Zotero.Utilities have been eliminated, as they were essential duplications of built-in JavaScript methods. References to these functions were removed from all translators in the repository
  
-  * 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. <code>{+==== Zotero.configure() and Zotero.displayOptions() replaced by configOptions and displayOptions ==== 
 +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. <code>{
  "translatorID":"32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7",  "translatorID":"32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7",
  [...]  [...]
Line 24: Line 26:
 }</code> }</code>
  
-  * It is no longer necessary to specify "dataMode":"block" or "dataMode":"line". If Zotero.read() is passed a numeric value, it reads a specified number of bytes; otherwise, it reads a full line.+==== "dataMode":"block" and "dataMode":"line" are deprecated ==== 
 +It is no longer necessary to specify "dataMode":"block" or "dataMode":"line". If Zotero.read() is passed a numeric value, it reads a specified number of bytes; otherwise, it reads a full line.
  
-  * 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.+==== Indicating translation progress ==== 
 +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 ===== ===== Changes to translate interface =====
Line 38: Line 42:
 Zotero 2.1b6 and later support extensible locate engines. For further details, see [[dev:creating_locate_engines_using_opensearch|Creating Locate Engines using OpenSearch]]. Zotero 2.1b6 and later support extensible locate engines. For further details, see [[dev:creating_locate_engines_using_opensearch|Creating Locate Engines using OpenSearch]].
  
-====== Changes in Zotero 2.1.9 (not yet released) ======+===== Shorthand syntax ===== 
 +Z is now a shortcut for Zotero in translators, and ZU is a shortcut for Zotero.Utilities.
  
-===== Changes to translators ===== +===== XPath utility functions =====
- +
-  * Z is now a shortcut for Zotero in translators, and ZU is a shortcut for Zotero.Utilities. +
- +
-  * New utility functions:+
     * <code>Zotero.Utilities.xpath(element, xpath[, namespaces])</code> Accepts a DOM element, document, or array of elements or documents and evaluates an XPath, optionally interpreting namespace prefixes using a object whose keys correspond to namespace prefixes and whose values correspond to namespace URIs. The result is an array of nodes matching the XPath.     * <code>Zotero.Utilities.xpath(element, xpath[, namespaces])</code> Accepts a DOM element, document, or array of elements or documents and evaluates an XPath, optionally interpreting namespace prefixes using a object whose keys correspond to namespace prefixes and whose values correspond to namespace URIs. The result is an array of nodes matching the XPath.
     * <code>Zotero.Utilities.xpathText(element, xpath[, namespaces[, delimiter]])</code> Behaves similarly to Zotero.Utilities.xpath, but the result is the textContent of all matching nodes, joined by a delimiter if more than one node matched. If no delimiter is specified, ", " is used.     * <code>Zotero.Utilities.xpathText(element, xpath[, namespaces[, delimiter]])</code> Behaves similarly to Zotero.Utilities.xpath, but the result is the textContent of all matching nodes, joined by a delimiter if more than one node matched. If no delimiter is specified, ", " is used.
dev/client_coding/changes_in_zotero_2.1.1313915794.txt.gz · Last modified: 2011/08/21 04:36 by simon