commit fef0970dcef744d0a424351f8bd0bb6feaceae01
parent ec43117edf1f68fde12699f3fa7c77eac09b3c13
Author: Simon Kornblith <simon@simonster.com>
Date: Fri, 27 Jul 2012 18:47:51 -0400
Merge branch '3.0'
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js
@@ -677,6 +677,11 @@ Zotero.Translate.Sandbox = {
* @borrows Zotero.Translate.Sandbox.Web._itemDone as this._itemDone
*/
"_itemDone":function(translate, item) {
+ // Always set library catalog, even if we have a parent translator
+ if(item.libraryCatalog === undefined) {
+ item.libraryCatalog = translate.translator[0].label;
+ }
+
Zotero.Translate.Sandbox.Web._itemDone(translate, item);
}
}
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js
@@ -975,6 +975,11 @@ Zotero.Utilities = {
}
try {
+ if(!rootDoc.evaluate && typeof installXPathIfNecessary !== undefined) {
+ // For IE: element.ownerDocument will not have an evaluate property,
+ // since this is provided by JavaScript-XPath
+ installXPathIfNecessary('defaultView' in rootDoc ? rootDoc.defaultView : rootDoc.parentWindow);
+ }
var xpathObject = rootDoc.evaluate(xpath, element, nsResolver, 5, // 5 = ORDERED_NODE_ITERATOR_TYPE
null);
} catch(e) {