From bc87ddf90a3976621b3f2f20f5f49aff922ecb8b Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 25 Aug 2009 06:24:29 +0000 Subject: [PATCH] Remove obsolete popup code --- chrome/content/zotero/addCitationDialog.js | 9 --------- chrome/content/zotero/bibliography.js | 9 --------- chrome/content/zotero/editBibliographyDialog.js | 9 --------- chrome/content/zotero/xpcom/integration.js | 9 +++------ 4 files changed, 3 insertions(+), 33 deletions(-) diff --git a/chrome/content/zotero/addCitationDialog.js b/chrome/content/zotero/addCitationDialog.js index f1ef9e9a6..d50194572 100644 --- a/chrome/content/zotero/addCitationDialog.js +++ b/chrome/content/zotero/addCitationDialog.js @@ -132,15 +132,6 @@ var Zotero_Citation_Dialog = new function () { _updateAccept(); } - - // Center citation popups manually after a delay when using a popup, since - // popups aren't resizable and there might be persisted positions - if (Zotero.Integration.usePopup) { - document.getElementsByTagName("dialog")[0].style.border = "1px solid black"; - setTimeout(function () { - window.centerWindowOnScreen(); - }, 1); - } } /* diff --git a/chrome/content/zotero/bibliography.js b/chrome/content/zotero/bibliography.js index 47c0f825f..d543a433f 100644 --- a/chrome/content/zotero/bibliography.js +++ b/chrome/content/zotero/bibliography.js @@ -113,15 +113,6 @@ 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"); } - - // Center citation popups manually after a delay when using a popup, since - // popups aren't resizable and there might be persisted positions - if (Zotero.Integration.usePopup) { - document.getElementsByTagName("dialog")[0].style.border = "1px solid black"; - setTimeout(function () { - window.centerWindowOnScreen(); - }, 1); - } } /* diff --git a/chrome/content/zotero/editBibliographyDialog.js b/chrome/content/zotero/editBibliographyDialog.js index 7d0d71c31..c6178945f 100644 --- a/chrome/content/zotero/editBibliographyDialog.js +++ b/chrome/content/zotero/editBibliographyDialog.js @@ -47,15 +47,6 @@ var Zotero_Bibliography_Dialog = new function () { // load bibliography entires _loadItems(); - - // Center citation popups manually after a delay when using a popup, since - // popups aren't resizable and there might be persisted positions - if (Zotero.Integration.usePopup) { - document.getElementsByTagName("dialog")[0].style.border = "1px solid black"; - setTimeout(function () { - window.centerWindowOnScreen(); - }, 1); - } } /* diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 8a2b14008..134f34326 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -30,7 +30,6 @@ Zotero.Integration = new function() { var _fifoFile, _osascriptFile; this.sessions = {}; - this.usePopup = false; /** * Initializes the pipe used for integration on non-Windows platforms. @@ -774,7 +773,7 @@ Zotero.Integration.Session.prototype.reselectItem = function(exception) { Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher) .openWindow(null,'chrome://zotero/content/selectItemsDialog.xul', '', - 'chrome,modal,centerscreen,resizable=yes' + (Zotero.isWin ? ',popup' : ''), io, true); + 'chrome,modal,centerscreen,resizable=yes', io, true); if(io.dataOut && io.dataOut.length) { var itemID = io.dataOut[0]; @@ -1114,8 +1113,7 @@ Zotero.Integration.Session.prototype.editCitation = function(index, noteIndex, c .getService(Components.interfaces.nsIWindowWatcher) .openWindow( null, 'chrome://zotero/content/addCitationDialog.xul', '', - 'chrome,modal,centerscreen,resizable=yes' - + (Zotero.Integration.usePopup ? ',popup' : ''), + 'chrome,modal,centerscreen,resizable=yes', io ); @@ -1276,8 +1274,7 @@ Zotero.Integration.Session.prototype.editBibliography = function() { .getService(Components.interfaces.nsIWindowWatcher) .openWindow( null, 'chrome://zotero/content/editBibliographyDialog.xul', '', - 'chrome,modal,centerscreen,resizable=yes' - + (Zotero.Integration.usePopup ? ',popup' : ''), + 'chrome,modal,centerscreen,resizable=yes', io, true );