- fixed alert position not being recalculated properly when changing options

bzr-revno: 1789
This commit is contained in:
Andreas Preikschat 2011-10-30 21:58:27 +01:00
commit 89eeeb6340
1 changed files with 14 additions and 1 deletions

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 = """