Syslog: fix resizing

This commit is contained in:
bergware
2023-03-22 12:01:47 +01:00
parent 3f0b49352b
commit 994740259c

View File

@@ -84,7 +84,7 @@ function resize() {
$('pre.up').height(Math.max(window.innerHeight-320,330));
}
<?endif;?>
function showLog(log) {
function showLog(log,init) {
logfile = log;
$('span.label input[type=checkbox]').prop('checked',true);
$('span.label').each(function(){
@@ -96,6 +96,10 @@ function showLog(log) {
clearTimeout(timers.syslog);
$('pre.up').html(data);
$('div.spinner.fixed').hide('slow');
<?if (_var($display,'resize')):?>
resize();
if (init) $(window).bind('resize',function(){resize();});
<?endif;?>
});
}
$(function() {
@@ -107,10 +111,6 @@ $(function() {
}
});
showLog(logfile,true);
<?if (_var($display,'resize')):?>
resize();
$(window).bind('resize',function(){resize();});
<?endif;?>
});
$('.tabs').append("<span class='status'><span class='lite label'>_(Log size)_:&nbsp;&nbsp;<input type='number' id='max' value='' placeholder='<?=$max?>'></span><?=$select?><span class='lite label'><label>_(Text)_<input type='checkbox' class='ctrl' onclick='highlight(!this.checked,\"N\")' checked></label></span><span class='error label'><label>_(Error)_<input type='checkbox' onclick='highlight(this.checked,\"E\")' checked></label></span><span class='warn label'><label>_(Warning)_<input type='checkbox' onclick='highlight(this.checked,\"W\")' checked></label></span><span class='system label'><label>_(System)_<input type='checkbox' onclick='highlight(this.checked,\"S\")' checked></label></span><span class='array label'><label>_(Array)_<input type='checkbox' onclick='highlight(this.checked,\"A\")' checked></label></span><span class='login label'><label>_(Login)_<input type='checkbox' onclick='highlight(this.checked,\"L\")' checked></label></span><span class='lite label'><input type='checkbox' class='ctrl' onclick='toggle(this.checked)' checked></span></span>");
</script>