Fix for attachment/note tag popup not displaying in Firefox 3 if there wouldn't be enough space on screen -- now auto-adjusts, though possibly with some artifacts after closing on OS X

This commit is contained in:
Dan Stillman 2008-12-17 10:14:12 +00:00
parent 0f990781f1
commit dbb07937f0

View file

@ -389,7 +389,15 @@
<body>
<![CDATA[
this.id('tags').reload();
this.id('tagsPopup').showPopup(this.id('tagsLabel'),-1,-1,'popup');
if (this.id('tagsPopup').openPopupAtScreen) {
var x = this.boxObject.screenX;
var y = this.boxObject.screenY;
this.id('tagsPopup').openPopupAtScreen(x, y, false);
}
// Deprecated method for Firefox 2
else {
this.id('tagsPopup').showPopup(this.id('tagsLabel'), -1, -1, 'popup');
}
]]>
</body>
</method>
@ -402,7 +410,7 @@
if (!v || v == "") {
v = "[" + Zotero.getString('pane.item.noteEditor.clickHere') + "]";
}
this.id('tagsLabel').value = Zotero.getString('pane.item.tags') + " " + v;
]]>
</body>
@ -412,7 +420,15 @@
<![CDATA[
var relatedList = this.item.relatedItemsBidirectional;
if (relatedList.length > 0) {
this.id('seeAlsoPopup').showPopup(this.id('seeAlsoLabel'),-1,-1,'popup',0,0);
if (this.id('seeAlsoPopup').openPopupAtScreen) {
var x = this.boxObject.screenX;
var y = this.boxObject.screenY;
this.id('seeAlsoPopup').openPopupAtScreen(x, y, false);
}
// Deprecated method for Firefox 2
else {
this.id('seeAlsoPopup').showPopup(this.id('seeAlsoLabel'), -1, -1, 'popup');
}
}
else {
this.id('seeAlso').add();