From 3dc5531176914160c8da02cb1e0d88922e3929a2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 5 Jun 2008 00:38:11 +0000 Subject: [PATCH] - Fix off-center Add Citation window on Windows (for some users since 1.0.4) - Make Related Items window a real window on OS X - Persist position of Related Items window - Allow Escape in empty search field to close Related Items window --- chrome/content/zotero/bibliography.js | 12 +++++++++--- chrome/content/zotero/bindings/relatedbox.xml | 8 ++++++-- chrome/content/zotero/selectItemsDialog.js | 9 +++++++++ chrome/content/zotero/selectItemsDialog.xul | 6 ++++-- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/bibliography.js b/chrome/content/zotero/bibliography.js index 8a77b1d14..a52fb3f4d 100644 --- a/chrome/content/zotero/bibliography.js +++ b/chrome/content/zotero/bibliography.js @@ -110,13 +110,19 @@ var Zotero_File_Interface_Bibliography = new function() { document.getElementById("fields").label = Zotero.getString("integration."+formatOption+".label"); document.getElementById("fields-caption").textContent = Zotero.getString("integration."+formatOption+".caption"); - // add border on Windows if(Zotero.isWin) { + // add border on Windows document.getElementById("zotero-doc-prefs-dialog").style.border = "1px solid black"; } } - window.sizeToContent(); - window.centerWindowOnScreen(); + + // Center popup manually after a delay on Windows, since window + // isn't resizable and there might be a persisted position + if (Zotero.isWin) { + setTimeout(function () { + window.centerWindowOnScreen(); + }, 1); + } } /* diff --git a/chrome/content/zotero/bindings/relatedbox.xml b/chrome/content/zotero/bindings/relatedbox.xml index f1d91adc4..9f0ab20eb 100644 --- a/chrome/content/zotero/bindings/relatedbox.xml +++ b/chrome/content/zotero/bindings/relatedbox.xml @@ -138,8 +138,12 @@ + style="padding:2em" + persist="screenX screenY">