Skip to content
Snippets Groups Projects
Commit 222fc094 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

fix size of top output

parent cf20f42d
No related branches found
No related tags found
1 merge request!62V2.0
......@@ -58,6 +58,7 @@ function wb_getdefaults(sId, aOverrides) {
if (_aReturn['y']<_aReturn['top']){
_aReturn['y']=_aReturn['top'];
}
// console.log(_aReturn);
return _aReturn;
}
/**
......@@ -147,7 +148,6 @@ function showIdAsModalMessage(sId, sTitle) {
width: 700,
height: 500,
// take content from existing div
// mount: oWrapper
// mount: document.getElementById(sId).cloneNode(true),
......@@ -174,6 +174,8 @@ function toggleShellWindow(sId, oLink) {
aWinBoxes[sId].close();
} else {
var oWrapper = document.getElementById(sId);
var iDefaultWidth=200;
var iDefaultHeight=200;
var aOptions = wb_getdefaults(sId, {
title: oLink.innerText,
id: 'winbox-' + sId,
......@@ -182,8 +184,8 @@ function toggleShellWindow(sId, oLink) {
// position + size
x: "center",
y: "center",
width: 10,
height: 10,
width: iDefaultWidth,
height: iDefaultHeight,
// take content from existing div
mount: oWrapper,
......@@ -200,7 +202,7 @@ function toggleShellWindow(sId, oLink) {
if (oLink) {
$(oLink).addClass('active');
}
if(aOptions['width']==10){
if(aOptions['width']==iDefaultWidth){
window.setTimeout("aWinBoxes['" + sId + "'].resize(" + (oWrapper.clientWidth + 25) + ", " + (oWrapper.clientHeight + 150) + ").move('center', 'center')", 10);
}
}
......
......@@ -2,6 +2,6 @@
"command": "top -b -n 1 | head -20",
"icon": "fa-solid fa-arrow-up-wide-short",
"interval": 5000,
"window-cols": 50,
"window-cols": 60,
"window-lines": 30
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment