From fa602e49849b96a56b5e75bd771a89b840f67263 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Fri, 5 Aug 2011 18:20:08 +0000 Subject: [PATCH] Closes #1086, Some way to carry metadata inside or along with Word documents --- chrome/content/zotero/bibliography.js | 6 + .../integration/integrationDocPrefs.xul | 6 +- chrome/content/zotero/xpcom/cite.js | 23 ++- chrome/content/zotero/xpcom/integration.js | 154 ++++++++++++++---- chrome/locale/en-US/zotero/zotero.dtd | 3 + 5 files changed, 155 insertions(+), 37 deletions(-) diff --git a/chrome/content/zotero/bibliography.js b/chrome/content/zotero/bibliography.js index 53a2f9ef1..eefc5f498 100644 --- a/chrome/content/zotero/bibliography.js +++ b/chrome/content/zotero/bibliography.js @@ -110,6 +110,11 @@ var Zotero_File_Interface_Bibliography = new function() { document.getElementById("fields-file-format-notice").textContent = Zotero.getString("integration."+formatOption+".fileFormatNotice"); document.getElementById("bookmarks-file-format-notice").textContent = Zotero.getString("integration.fields.fileFormatNotice"); } + if(document.getElementById("storeReferences")) { + if(_io.storeReferences || _io.storeReferences === undefined) { + document.getElementById("storeReferences").checked = true; + } + } // set style to false, in case this is cancelled _io.style = false; @@ -157,6 +162,7 @@ var Zotero_File_Interface_Bibliography = new function() { if(document.getElementById("displayAs")) { _io.useEndnotes = document.getElementById("displayAs").selectedIndex; _io.fieldType = (document.getElementById("formatUsing").selectedIndex == 0 ? _io.primaryFieldType : _io.secondaryFieldType); + _io.storeReferences = document.getElementById("storeReferences").checked; } // save style (this happens only for "Export Bibliography," or Word diff --git a/chrome/content/zotero/integration/integrationDocPrefs.xul b/chrome/content/zotero/integration/integrationDocPrefs.xul index c7bc04fcc..f80ee1a13 100644 --- a/chrome/content/zotero/integration/integrationDocPrefs.xul +++ b/chrome/content/zotero/integration/integrationDocPrefs.xul @@ -36,7 +36,8 @@ onload="Zotero_File_Interface_Bibliography.init();" ondialogaccept="Zotero_File_Interface_Bibliography.acceptSelection();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" - persist="screenX screenY"> + persist="screenX screenY" + style="width: 600px">