www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit d592d3156e62c898b386763c74789f8420bc3206
parent f3a8cbd993f116db716fd2a4b9c794b5f405bc39
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu,  8 Jul 2010 22:45:42 +0000

Fix translation in Fx4


Diffstat:
Mchrome/content/zotero/xpcom/translate.js | 14+++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js @@ -929,7 +929,16 @@ Zotero.Translate.prototype._generateSandbox = function() { // set up sandbox this._sandbox = new Components.utils.Sandbox(sandboxLocation); - this._sandbox.Zotero = new Object(); + Components.utils.evalInSandbox("var Zotero = {};"+ + "Zotero.Item = function (itemType) {"+ + "this.itemType = itemType;"+ + "this.creators = [];"+ + "this.notes = [];"+ + "this.tags = [];"+ + "this.seeAlso = [];"+ + "this.attachments = [];"+ + "};"+ + "Zotero.Item.prototype.complete = function() { Zotero._itemDone(this); };", this._sandbox) // add utilities this._sandbox.Zotero.Utilities = new Zotero.Utilities.Translate(this); @@ -941,8 +950,7 @@ Zotero.Translate.prototype._generateSandbox = function() { this._sandbox.Zotero.nextCollection = function() { return me._exportGetCollection() } } else { // copy routines to add new items - this._sandbox.Zotero.Item = Zotero.Translate.GenerateZoteroItemClass(); - this._sandbox.Zotero.Item.prototype.complete = function() {me._itemDone(this)}; + this._sandbox.Zotero._itemDone = function(a) {me._itemDone(a)}; if(this.type == "import") { // add routines to add new collections