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) { ...@@ -58,6 +58,7 @@ function wb_getdefaults(sId, aOverrides) {
if (_aReturn['y']<_aReturn['top']){ if (_aReturn['y']<_aReturn['top']){
_aReturn['y']=_aReturn['top']; _aReturn['y']=_aReturn['top'];
} }
// console.log(_aReturn);
return _aReturn; return _aReturn;
} }
/** /**
...@@ -147,7 +148,6 @@ function showIdAsModalMessage(sId, sTitle) { ...@@ -147,7 +148,6 @@ function showIdAsModalMessage(sId, sTitle) {
width: 700, width: 700,
height: 500, height: 500,
// take content from existing div // take content from existing div
// mount: oWrapper // mount: oWrapper
// mount: document.getElementById(sId).cloneNode(true), // mount: document.getElementById(sId).cloneNode(true),
...@@ -174,6 +174,8 @@ function toggleShellWindow(sId, oLink) { ...@@ -174,6 +174,8 @@ function toggleShellWindow(sId, oLink) {
aWinBoxes[sId].close(); aWinBoxes[sId].close();
} else { } else {
var oWrapper = document.getElementById(sId); var oWrapper = document.getElementById(sId);
var iDefaultWidth=200;
var iDefaultHeight=200;
var aOptions = wb_getdefaults(sId, { var aOptions = wb_getdefaults(sId, {
title: oLink.innerText, title: oLink.innerText,
id: 'winbox-' + sId, id: 'winbox-' + sId,
...@@ -182,8 +184,8 @@ function toggleShellWindow(sId, oLink) { ...@@ -182,8 +184,8 @@ function toggleShellWindow(sId, oLink) {
// position + size // position + size
x: "center", x: "center",
y: "center", y: "center",
width: 10, width: iDefaultWidth,
height: 10, height: iDefaultHeight,
// take content from existing div // take content from existing div
mount: oWrapper, mount: oWrapper,
...@@ -200,7 +202,7 @@ function toggleShellWindow(sId, oLink) { ...@@ -200,7 +202,7 @@ function toggleShellWindow(sId, oLink) {
if (oLink) { if (oLink) {
$(oLink).addClass('active'); $(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); window.setTimeout("aWinBoxes['" + sId + "'].resize(" + (oWrapper.clientWidth + 25) + ", " + (oWrapper.clientHeight + 150) + ").move('center', 'center')", 10);
} }
} }
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
"command": "top -b -n 1 | head -20", "command": "top -b -n 1 | head -20",
"icon": "fa-solid fa-arrow-up-wide-short", "icon": "fa-solid fa-arrow-up-wide-short",
"interval": 5000, "interval": 5000,
"window-cols": 50, "window-cols": 60,
"window-lines": 30 "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