(js) Fix dialogs when partially visible

Fixes #2646, #3378
This commit is contained in:
Francis Lachapelle committed 2015-11-06 09:42:09 -05:00
1 parent 863f182e84
commit 106c6a24ae
2 files changed
+13

No files matched your search

+11
View File
@@ -856,6 +856,11 @@ function onViewEventCallback(http) {
} else
para.hide();
var windowHeight = window.height();
var bottomOffset = windowHeight - div.getDimensions().height - top;
if (bottomOffset < 0)
top += bottomOffset;
div.setStyle({ left: left + "px", top: top + "px" });
div.show();
configureLinks(div);
@@ -3493,6 +3498,12 @@ function onCalendarImport(event) {
var div = $("uploadDialog");
var res = $("uploadResults");
var windowHeight = window.height();
var bottomOffset = windowHeight - div.getDimensions().height - top;
if (bottomOffset < 0)
top += bottomOffset;
res.setStyle({ top: top + "px", left: left + "px" });
div.setStyle({ top: top + "px", left: left + "px" });
div.show();