From 2117745a63e40513c046a832274fcedb40c4de63 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 3 Nov 2008 10:11:47 +0000 Subject: [PATCH] - fix bookmarks mode in OOo plug-in - disable bookmarks mode for note-based styles - display an error when attempting to insert a bookmark into a footnote - closes #1201, Keyboard focus stays in Word when creating or editing a citation --- chrome/content/zotero/bibliography.js | 10 +++++++--- chrome/content/zotero/integrationDocPrefs.xul | 2 +- chrome/locale/en-US/zotero/zotero.dtd | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/bibliography.js b/chrome/content/zotero/bibliography.js index ad88123b2a..292ce38977 100644 --- a/chrome/content/zotero/bibliography.js +++ b/chrome/content/zotero/bibliography.js @@ -142,10 +142,14 @@ var Zotero_File_Interface_Bibliography = new function() { var selectedStyle = selectedItem.getAttribute('value'); - // update status of displayAs box based + // update status of displayAs box based on style class + var isNote = Zotero.Styles.get(selectedStyle).class == "note"; + document.getElementById("displayAs").disabled = !isNote; - var styleClass = Zotero.Styles.get(selectedStyle).class; - document.getElementById("displayAs").disabled = styleClass != "note"; + // update status of formatUsing box based on style class + if(isNote) document.getElementById("formatUsing").selectedIndex = 0; + document.getElementById("bookmarks").disabled = isNote; + document.getElementById("bookmarks-caption").disabled = isNote; } function acceptSelection() { diff --git a/chrome/content/zotero/integrationDocPrefs.xul b/chrome/content/zotero/integrationDocPrefs.xul index 99e4d9f19f..d4af7bc622 100644 --- a/chrome/content/zotero/integrationDocPrefs.xul +++ b/chrome/content/zotero/integrationDocPrefs.xul @@ -39,7 +39,7 @@