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

update toggleShellWindow()

parent c31ca3b1
Branches
No related tags found
1 merge request!576561 add winbox
......@@ -42,43 +42,47 @@ function hideModalMessage(){
return false;
}
var aWinBoxes={};
/**
* shellcmd plugin ... toggle output window
* @param {string} idWrapperDiv id of the wrapper
* @param {string} isPluginOutputDiv id of the wrapper
* @param {object} oLink a tag in the navbar with link for toggling window
*/
function toggleShellWindow(idWrapperDiv, oLink){
if(aWinBoxes[idWrapperDiv]){
aWinBoxes[idWrapperDiv].close();
function toggleShellWindow(isPluginOutputDiv, oLink){
if(aWinBoxes[isPluginOutputDiv]){
aWinBoxes[isPluginOutputDiv].close();
} else {
var oWrapper=document.getElementById(idWrapperDiv);
aWinBoxes[idWrapperDiv] = WinBox({
var oWrapper=document.getElementById(isPluginOutputDiv);
aWinBoxes[isPluginOutputDiv] = WinBox({
title: oLink.innerText,
id: 'winbox-'+idWrapperDiv,
id: 'winbox-'+isPluginOutputDiv,
border: 5,
background: "#628",
class: [ "no-min", "no-max", /* "no-full", "no-resize", "no-move"*/ "ciwinbox" ],
// position:
// position + size
x: "center",
y: "center",
width: 10,
height: 10,
// width: oWrapper.clientWidth+'px',
// viewport
top: 70,
right: 20,
bottom: 20,
left: 20,
// take content from existing div
mount: oWrapper,
onclose: function(){
delete aWinBoxes[idWrapperDiv];
delete aWinBoxes[isPluginOutputDiv];
$(oLink).parent().removeClass('active');
}
});
$(oLink).parent().addClass('active');
window.setTimeout("aWinBoxes['"+idWrapperDiv+"'].resize("+(oWrapper.clientWidth+25)+", "+(oWrapper.clientHeight+150)+").move('center', 'center')", 200);
window.setTimeout("aWinBoxes['"+isPluginOutputDiv+"'].resize("+(oWrapper.clientWidth+25)+", "+(oWrapper.clientHeight+150)+").move('center', 'center')", 10);
}
// $('#'+idWrapperDiv).slideToggle(100);
// $(oLink).parent().toggleClass('active');
}
// ----------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment