public/debug/phpunitwebui/js/functions.js
/**
 * Shows or hides a suite result
 *
 * @param string name of the suite
 */
Shows or hides a suite result
@param string name of the suite
Shows or hides a suite result @param string name of the suite
function toggleSuite(name)
{
    var a = document.getElementById('a_' + name);
    if (typeof(a) != 'object')
        return;
    var tests = document.getElementById('suite_' + name);
    if (typeof(tests) != 'object')
        return;
    var hidden = document.getElementById('keepOpen');
    if (typeof(hidden) != 'object' || !(hidden.tagName == 'INPUT' || hidden.tagName == 'input')) {
        return;
    }
    var keepOpen = hidden.value.split(' ');
    if (a.innerHTML.valueOf() == '+') {
        tests.style.display = 'block';
        a.innerHTML = '-';
        keepOpen[keepOpen.length] = name;
    } else {
        tests.style.display = 'none';
        a.innerHTML = '+';
        var tmp_array = new Array();
        for (i in keepOpen) {
            if (keepOpen[i].valueOf() == name || keepOpen[i].valueOf() == '')
                continue;
            tmp_array[i] = keepOpen[i];
        }
        keepOpen = tmp_array;
    }
    hidden.value = keepOpen.join(' ');
}
function toggleSuite ( name ) { var a = document . getElementById ( 'a_' + name ) ; if ( typeof ( a ) != 'object' ) return ; var tests = document . getElementById ( 'suite_' + name ) ; if ( typeof ( tests ) != 'object' ) return ; var hidden = document . getElementById ( 'keepOpen' ) ; if ( typeof ( hidden ) != 'object' || ! ( hidden . tagName == 'INPUT' || hidden . tagName == 'input' ) ) { return ; } var keepOpen = hidden . value . split ( ' ' ) ; if ( a . innerHTML . valueOf ( ) == '+' ) { tests . style . display = 'block' ; a . innerHTML = '-' ; keepOpen [ keepOpen . length ] = name ; } else { tests . style . display = 'none' ; a . innerHTML = '+' ; var tmp_array = new Array ( ) ; for ( i in keepOpen ) { if ( keepOpen [ i ] . valueOf ( ) == name || keepOpen [ i ] . valueOf ( ) == '' ) continue ; tmp_array [ i ] = keepOpen [ i ] ; } keepOpen = tmp_array ; } hidden . value = keepOpen . join ( ' ' ) ; }
Shows or hides a suite result
 @param string name of the suite
Shows or hides a suite result @param string name of the suite