Fixes #1040, Related items broken in 1.0.5

Fixes error in citation windows in Firefox 2 that would've prevented the Windows off-center window fix
This commit is contained in:
Dan Stillman 2008-06-12 17:34:11 +00:00
parent 452cffd90f
commit b17526734f
2 changed files with 5 additions and 7 deletions

View File

@ -139,10 +139,8 @@
<![CDATA[
var io = {dataIn: null, dataOut: null};
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher)
.openWindow(null, 'chrome://zotero/content/selectItemsDialog.xul', '',
'chrome,modal,centerscreen', io);
window.openDialog('chrome://zotero/content/selectItemsDialog.xul', '',
'chrome,dialog=no,modal,centerscreen', io);
if(io.dataOut && this.item)
{

View File

@ -40,10 +40,10 @@ function doLoad()
collectionsView = new Zotero.CollectionTreeView();
document.getElementById('zotero-collections-tree').view = collectionsView;
// Center popup manually after a delay on Windows, since window
// isn't resizable and there might be a persisted position
// Center citation popups manually after a delay on Windows, since windows
// aren't resizable and there might be persisted positions
if (Zotero.isWin &&
window.document.activeElement.id != 'zotero-select-items-dialog') {
window.document.documentURI != 'chrome://zotero/content/selectItemsDialog.xul') {
setTimeout(function () {
window.centerWindowOnScreen();
}, 1);