var testgroup; var filter_req; var showAll = function(err) { // if they cancelled, then just don't change anything: if (err instanceof CancelledError) { return } toggleMessage('none'); var testgroupbox = document.getElementById("testgroup_id"); for (var i=0; i= 0) { if (branchBox.options[branchBox.selectedIndex].value != '' && subgroups[i].branch_id != branchBox.options[branchBox.selectedIndex].value) { continue; } } var optionText = subgroups[i].name + ' (' + subgroups[i].subgroup_id + ')'; selectBoxAll.options[selectBoxAll.length] = new Option(optionText, subgroups[i].subgroup_id); } if (selectBoxAll.options.length == 0) { selectBoxAll.options[selectBoxAll.length] = new Option('-No Subgroups for this Product/Branch-',''); } } catch (e) { // And do what exactly? } toggleMessage('none'); } function resetTestgroup() { if (document.getElementById('editform_testgroup_id').value != '') { populateTestgroup(testgroup); switchToEdit(); } else { switchToAdd(); } } function checkFormContents(f) { return ( checkString(f.name, 'Name') && verifySelected(f.product, 'Product') && verifySelected(f.branch, 'Branch') && verifySelected(f.created_by, "Created By") ); } function previewSubgroup(selectID) { var selectBox = document.getElementById(selectID); if (selectBox) { if (selectBox.selectedIndex >= 0) { if (selectBox.options[selectBox.selectedIndex].value != '') { window.open('manage_subgroups.cgi?subgroup_id=' + selectBox.options[selectBox.selectedIndex].value, 'subgroup_preview'); } } else { toggleMessage('failure','No testgroup 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; } } function disableCloneUpdateFields() { document.getElementById('old_name_regexp').disabled=true; document.getElementById('new_name_regexp').disabled=true; document.getElementById('update_names').setAttribute('class','disabled'); } function enableCloneUpdateFields() { document.getElementById('old_name_regexp').disabled=false; document.getElementById('new_name_regexp').disabled=false; document.getElementById('update_names').setAttribute('class',''); } var manageTestgroupsHelpTitle="Help with Managing Testgroups"; var manageTestgroupsHelpText="

The select box on the left contains all the subgroups for the chosen product, INCLUDING any subgroups already contained in the testgroup. You can use the button to add subgroups to the testgroup, and the button to remove subgroups from the testgroup. NOTE: neither of the actions will alter the list of subgroups on the left.

You can preview any subgroup from the left-hand select box by selecting the subgroup, and then clicking on the 'Preview Subgroup' link below the select box. If more than one subgroup is selected, only the first subgroup will be previewed.

You can change the display order of subgroups within the testgroup using the and buttons to the right of the right-hand select box. Subgroups can be re-ordered singly or in groups by selecting multiple subgroups in the right-hand select box.

";