Hi
I wanna add a progressbar to a single tab (not the whole layout or a cell).
That didn’t works for me with the following code.
Any ideas to solve my problem ?
Thank you very much !!!
Regards,
Franky
//----------------------------------------------------------------------------
//- create global tabbar
//----------------------------------------------------------------------------
tabbar = layout_main.cells(“b”).attachTabbar();
tabbar.setImagePath(“codebase/imgs/”);
tabbar.setSkin(“dhx_web”);
tabbar.enableTabCloseButton(true);
function view_alert_system_status() {
//check if the tabbar exists
if (check_tab(tabbar.getAllTabs(),“SAS”)) {
tabbar.setTabActive(“SAS”);
}
else {
tabbar.addTab(“SAS”, “Status Alertsystems”, “*”);
tabbar.setTabActive(“SAS”);
}
SASGrid = tabbar.cells("SAS").attachGrid();
SASGrid.setHeader("<B>Systemname</B>,<B>Status</B>");
SASGrid.setInitWidths("100,100");
SASGrid.setColAlign("left,left");
SASGrid.setColTypes("ro,ro");
SASGrid.enableTooltips("false,false");
SASGrid.init();
//progress on
tabbar.cells(“SAS”).progressOn();
tabbar.cells(“SAS”)._progressCover[1].style.backgroundImage = “url(‘style/images/progress_bar.gif’)”;
[b]// if I do it that way the whole cell b where all my tabs are attached is locked
// but I wanna lock only the new created tab
// layout_main.cells(“b”).progressOn();
// layout_main.cells(“b”)._progressCover[1].style.backgroundImage = “url(‘style/images/progress_bar.gif’)”;[/b]
SASGrid.loadXML("scripts/perl_driver.php?func=SAS&str=show_events.pl -h "+sys_name, function(){
SASGrid.forEachRow(function(id){
//color the status
if (SASGrid.cellById(id,1).getValue() == "OK") SASGrid.setCellTextStyle(id,1,"background-color: green");
if (SASGrid.cellById(id,1).getValue() == "ERROR") SASGrid.setCellTextStyle(id,1,"background-color: red");
})
//progress off
tabbar.cells("SAS").progressOff();
// layout_main.cells(“b”).progressOff();
})
}