fixed alert position not being recalculated properly when changing options

This commit is contained in:
Andreas Preikschat 2011-10-30 21:24:04 +01:00
parent e4c5a2d6e7
commit 0ed66b6a9c

View File

@ -71,11 +71,24 @@ JAVASCRIPT = """
function update_css(align, font, size, color, bgcolor){
var text = document.getElementById('alert');
text.style.verticalAlign = align;
text.style.fontSize = size + "pt";
text.style.fontFamily = font;
text.style.color = color;
text.style.backgroundColor = bgcolor;
switch(align)
{
case 'top':
text.style.top = '0px';
break;
case 'middle':
text.style.top = ((window.innerHeight - text.clientHeight) / 2)
+ 'px';
break;
case 'bottom':
text.style.top = (window.innerHeight - text.clientHeight)
+ 'px';
break;
}
}
"""
CSS = """