mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to Ajax pop-up panel positioning to work in JBossPortal
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -235,23 +235,25 @@ function getContextPath()
|
|||||||
if (elWidth > maxwidth) elWidth = maxwidth;
|
if (elWidth > maxwidth) elWidth = maxwidth;
|
||||||
}
|
}
|
||||||
var docWidth = YAHOO.util.Dom.getDocumentWidth();
|
var docWidth = YAHOO.util.Dom.getDocumentWidth();
|
||||||
if (pos[0] + elWidth < docWidth)
|
//log(" Element X:" + pos[0] + " doc width:" + YAHOO.util.Dom.getDocumentWidth());
|
||||||
|
if (pos[0] + 20 + elWidth < docWidth)
|
||||||
{
|
{
|
||||||
el.style.left = pos[0];
|
el.style.left = (pos[0] + 20) + "px";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
el.style.left = pos[0] - ((pos[0] + elWidth) - docWidth);
|
//log(" Shifting X coord left - overflow");
|
||||||
|
el.style.left = (pos[0] + 20 - ((pos[0] + elWidth) - docWidth)) + "px";
|
||||||
}
|
}
|
||||||
//log(" Element Y:" + pos[1] + " doc height:" + YAHOO.util.Dom.getDocumentHeight());
|
//log(" Element Y:" + pos[1] + " doc height:" + YAHOO.util.Dom.getDocumentHeight());
|
||||||
if (pos[1] + 16 + elHeight < YAHOO.util.Dom.getDocumentHeight())
|
if (pos[1] - 12 + elHeight < YAHOO.util.Dom.getDocumentHeight())
|
||||||
{
|
{
|
||||||
el.style.top = pos[1] + 12;
|
el.style.top = (pos[1] + 12) + "px";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//log(" ***Changing position - will overflow");
|
//log(" Shifting Y coord up - overflow");
|
||||||
el.style.top = pos[1] - elHeight - 4;
|
el.style.top = (pos[1] - elHeight - 4) + "px";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user