dhtmlx tabs

by ecropolis

HTML

<script src="https://googledrive.com/host/0B4bedT44-LokaV9tODJoX29BVFk"></script>
<link rel="stylesheet" href="https://googledrive.com/host/0B4bedT44-LokVFBFUXlaVEthaFE?t=.css">
<div id="levelTabber"></div>

JavaScript

function initializeLevelTabber() {
    tabber = new dhtmlXTabBar({parent:'levelTabber', close_button: false });
    //tabber.setImagePath("<c:url value='/ui/libs/dhtmlx4/imgs/'/>");
    tabber.enableAutoReSize(true);
    console.log('initializeLevelTabber');
    console.log(groups);
    if (groups.length > 0) {
        for (groupCount=0; groupCount<groups.length; groupCount++) {
            var groupLevels = new Array();

            tabber.addTab(groupCount, groups[groupCount].description, "150px");

            var tabTree = tabber.tabs(groupCount).attachGrid();
            console.log('tabTree');
            console.log(tabTree);
            resetLevelRowId();
            console.log('initializeLevelTreeGird('+tabTree+', '+groups[groupCount].children, groupLevels+', '+groupCount+')');
            initializeLevelTreeGird(tabTree, groups[groupCount].children, groupLevels, groupCount);
            groupTabData[groupCount] = groupLevels;
            tabGrids[groupCount] = tabTree;
        }
        console.log(tabGrids)

        tabber.attachEvent("onSelect", function(id, last_id) {
            return onTabSelect(id, last_id);
        });

        tabber.tabs(0).setActive();
    }
}
function resetLevelRowId() {
    levelRowId = 0;
}
function initializeLevelTreeGird(tabGrid, groupChilds, groupLevels, groupId) {
    var colIndex = 0;
    var colTypes = "tree" + gridCommonColTypes;
    var header = "Levels" + periodHeader;

    /* tabGrid.imgURL = "<c:url value='/ui/libs/dhtmlx4/imgs/icons_greenfolders/'/>"; */
    tabGrid.setImagePath("<c:url value='/ui/libs/dhtmlx4/imgs/'/>")
    tabGrid.selMultiRows = true;
    tabGrid.setHeader(header);
    tabGrid.setEditable(true);
    tabGrid.setColTypes(colTypes);
    tabGrid.enableStableSorting(false);
    tabGrid.enableTreeGridLines();
    tabGrid.enableSmartXMLParsing();
    tabGrid.enableColumnAutoSize(true);
    tabGrid.setMathRound(2);
    tabGrid.init();
    tabGrid.attachEvent("onEditCell", function(stage, rId, cInd,...