var test_run; var filter_req; var showAllTestRuns = function(err) { // if they cancelled, then just don't change anything: if (err instanceof CancelledError) { return } toggleMessage('none'); var testbox = document.getElementById("test_run_id"); for (var i=0; i= 0) { var found_branch = 0; for (var j=0; j 2) tbl.deleteRow(lastRow - 1); } function resetTable(tblName) { var tbl = document.getElementById(tblName); var lastRow = tbl.rows.length; while (tbl.rows.length > 1) { tbl.deleteRow(tbl.rows.length - 1); } } function checkFormContents(f) { if ( checkString(f.name, 'Name') && verifySelected(f.product, 'Product') && verifySelected(f.branch, 'Branch') && checkTimestamp(f.start_timestamp, 'Start Timestamp') && checkTimestamp(f.finish_timestamp, 'Finish Timestamp') && verifySelected(f.author_id, 'Author')) { // Verify that at least one testgroup is selected if this test run is // going to be enabled. if (f.enabled.checked) { return verifySelectNotEmpty(f.test_run_testgroups,"In order to enable a Test Run, at least one testgroup must be selected."); } return true; } return false; } function previewTestgroup(selectID) { var selectBox = document.getElementById(selectID); if (selectBox) { if (selectBox.selectedIndex >= 0) { if (selectBox.options[selectBox.selectedIndex].value != '') { window.open('manage_testgroups.cgi?testgroup_id=' + selectBox.options[selectBox.selectedIndex].value, 'testgroup_preview'); } } else { toggleMessage('failure','No test run selected!'); } } } function updatePersistVars() { var productBox = document.getElementById('product_filter'); var branchBox = document.getElementById('branch_filter'); if (productBox.selectedIndex) { var productPersist = document.getElementById('product_persist'); productPersist.value = productBox.options[productBox.selectedIndex].value; } if (branchBox.selectedIndex) { var branchPersist = document.getElementById('branch_persist'); branchPersist.value = branchBox.options[branchBox.selectedIndex].value; } }