[gen] Nice rendering of popups within popups.
This commit is contained in:
parent
c5fbb7ce8b
commit
5c6952537e
|
@ -102,9 +102,8 @@ input.buttonFixed { width:110px; padding: 0 0 0 10px }
|
||||||
td.search { padding-top: 8px }
|
td.search { padding-top: 8px }
|
||||||
.searchFields { width: 100%; margin-bottom: 8px }
|
.searchFields { width: 100%; margin-bottom: 8px }
|
||||||
.content { padding: 9px; background-color: #fbfbfb }
|
.content { padding: 9px; background-color: #fbfbfb }
|
||||||
.popup { display: none; position: absolute; top: 30%; left: 35%;
|
.popup { display: none; position: absolute; z-index : 100; background: white;
|
||||||
width: 350px; z-index : 100; background: white; padding: 8px;
|
padding: 8px; border: 1px solid grey; box-shadow: 2px 2px 2px #888888}
|
||||||
border: 1px solid grey; box-shadow: 2px 2px 2px #888888}
|
|
||||||
.dropdown { display:none; position: absolute; top: 12px; left: 1px;
|
.dropdown { display:none; position: absolute; top: 12px; left: 1px;
|
||||||
border: 1px solid #cccccc; background-color: white;
|
border: 1px solid #cccccc; background-color: white;
|
||||||
padding: 3px 4px 3px; font-size: 8pt; font-weight: normal;
|
padding: 3px 4px 3px; font-size: 8pt; font-weight: normal;
|
||||||
|
|
|
@ -894,20 +894,21 @@ function openPopup(popupId, msg, width, height, back) {
|
||||||
// Open the popup
|
// Open the popup
|
||||||
var popup = document.getElementById(popupId);
|
var popup = document.getElementById(popupId);
|
||||||
// Put it at the right place on the screen and give it the right dimensions
|
// Put it at the right place on the screen and give it the right dimensions
|
||||||
|
if (!width) {
|
||||||
|
width = (popupId == 'iframePopup')? window.innerWidth-200: 350;
|
||||||
|
}
|
||||||
var scrollTop = document.documentElement.scrollTop || window.pageYOffset || 0;
|
var scrollTop = document.documentElement.scrollTop || window.pageYOffset || 0;
|
||||||
popup.style.top = (scrollTop + 150) + 'px';
|
popup.style.top = (scrollTop + 150) + 'px';
|
||||||
if (width) popup.style.width = width + 'px';
|
popup.style.width = width + 'px';
|
||||||
|
popup.style.left = ((window.innerWidth - width) / 2).toFixed() + 'px';
|
||||||
if (height) popup.style.height = height + 'px';
|
if (height) popup.style.height = height + 'px';
|
||||||
if (popupId == 'iframePopup') {
|
if (popupId == 'iframePopup') {
|
||||||
// Initialize iframe's width
|
// Initialize iframe's width
|
||||||
var iframe = document.getElementById('appyIFrame');
|
var iframe = document.getElementById('appyIFrame');
|
||||||
if (!width) width = window.innerWidth - 200;
|
|
||||||
if (!height) {
|
if (!height) {
|
||||||
height = window.innerHeight - 200;
|
height = window.innerHeight - 200;
|
||||||
popup.style.top = ((window.innerHeight - height) / 2).toFixed() + 'px';
|
popup.style.top = ((window.innerHeight - height) / 2).toFixed() + 'px';
|
||||||
}
|
}
|
||||||
popup.style.left = ((window.innerWidth - width) / 2).toFixed() + 'px';
|
|
||||||
popup.style.width = width + 'px';
|
|
||||||
iframe.style.width = (width-20) + 'px';
|
iframe.style.width = (width-20) + 'px';
|
||||||
popup.style.height = height + 'px';
|
popup.style.height = height + 'px';
|
||||||
iframe.style.height = (height-20) + 'px';
|
iframe.style.height = (height-20) + 'px';
|
||||||
|
|
Loading…
Reference in a new issue