resources/dbdocs/index/AL_ADDRESS_PK/report.js
/*
 * Modifies the UI by showing the selected main report and hiding the rest.
 */
Modifies the UI by showing the selected main report and hiding the rest.
Modifies the UI by showing the selected main report and hiding the rest .
function showMain(newMainIndex) {
    if (newMainIndex != mainIndex) {
        var newMainId = "Master." + newMainIndex;
        var mainElements = document.getElementById("masterreports").children;
        for (var m = 0;m < mainElements.length;m++) {
            var mainElement = mainElements[m];
            if (mainElement.id == newMainId) {
                mainElement.children[0].className = "currentmasterreport";
                var childReportElement = document.getElementById("ChildReports." + newMainIndex);
                if (childReportElement != null) {
                    var childElements = childReportElement.children;
                    for (var c = 0;c < childElements.length;c++) {
                        var childElement = childElements[c];
                        if (childElement.children[0].className == "currentchildreport") {
                            var childReportId = childElement.id;
                            var firstDot = childReportId.indexOf(".");
                            var secondDot = childReportId.indexOf(".", firstDot + 1);
                            var thirdDot = childReportId.indexOf(".", secondDot + 1);
                            selectedChildReport = childElement;
                            rowIndex = parseInt(childReportId.substring(secondDot + 1, thirdDot));
                            childIndex = parseInt(childReportId.substring(firstDot + 1, secondDot));
                        }
                    }
                }
                mainIndex = newMainIndex;
            }
            else {
                var firstChildElement = mainElement.children[0];
                if (firstChildElement.className == "currentmasterreport") {
                    firstChildElement.className = "masterreport";
                }
            }
        }
    }
}
function showMain ( newMainIndex ) { if ( newMainIndex != mainIndex ) { var newMainId = "Master." + newMainIndex ; var mainElements = document . getElementById ( "masterreports" ) . children ; for ( var m = 0 ; m < mainElements . length ; m ++ ) { var mainElement = mainElements [ m ] ; if ( mainElement . id == newMainId ) { mainElement . children [ 0 ] . className = "currentmasterreport" ; var childReportElement = document . getElementById ( "ChildReports." + newMainIndex ) ; if ( childReportElement != null ) { var childElements = childReportElement . children ; for ( var c = 0 ; c < childElements . length ; c ++ ) { var childElement = childElements [ c ] ; if ( childElement . children [ 0 ] . className == "currentchildreport" ) { var childReportId = childElement . id ; var firstDot = childReportId . indexOf ( "." ) ; var secondDot = childReportId . indexOf ( "." , firstDot + 1 ) ; var thirdDot = childReportId . indexOf ( "." , secondDot + 1 ) ; selectedChildReport = childElement ; rowIndex = parseInt ( childReportId . substring ( secondDot + 1 , thirdDot ) ) ; childIndex = parseInt ( childReportId . substring ( firstDot + 1 , secondDot ) ) ; } } } mainIndex = newMainIndex ; } else { var firstChildElement = mainElement . children [ 0 ] ; if ( firstChildElement . className == "currentmasterreport" ) { firstChildElement . className = "masterreport" ; } } } } }
Modifies the UI by showing the selected main report and hiding the rest.
Modifies the UI by showing the selected main report and hiding the rest .