rem: } var communityenabled_em = document.getElementById('editform_communityenabled') if (testcase.community_enabled == 1) { 
add: enabled_display_em.checked = false; } var communityenabled_em = document.getElementById('editform_communityenabled') var communityenabled_display_em = document.getElementById('community_enabled_display') if (testcase.community_enabled == 1) { 
context: function populateTestcase(data) {  testcase=data;  document.getElementById('editform_testcase_id').value = testcase.testcase_id;  document.getElementById('editform_testcase_id_display').innerHTML = testcase.testcase_id;  document.getElementById('editform_summary').value = testcase.summary;  document.getElementById('editform_steps').value = testcase.steps;  document.getElementById('editform_results').value = testcase.expected_results;  document.getElementById('testcase_id_display').innerHTML = testcase.testcase_id;  document.getElementById('summary_text').innerHTML = testcase.summary;  document.getElementById('steps_text').innerHTML = testcase.steps_formatted;  document.getElementById('results_text').innerHTML = testcase.expected_results_formatted;  var product_box = document.getElementById('product');  var options = product_box.getElementsByTagName('option');    var found_product = 0;  for (var i=0; i<options.length; i++) {    if (options[i].value == testcase.product_id.product_id) {      options[i].selected = true;      document.getElementById('product_text').innerHTML = options[i].text;      found_product=1;    } else {      options[i].selected = false;    }  }  if (found_product == 0 && options[0]) {    options[0].selected = true;  }  changeProduct();  var testgroups_text = "";  var testgroups_link_text = "";  for (var i in testcase.testgroups) {    if (testcase.testgroups[i].name != '') {      testgroups_text = testgroups_text + testcase.testgroups[i].name + ', ';      testgroups_link_text = testgroups_link_text + '<a target="manage_testgroups" href="manage_testgroups.cgi?testgroup_id=' + testcase.testgroups[i].testgroup_id + '">'+ testcase.testgroups[i].name + '</a>, ';    }  }  if (testgroups_text != '') {    testgroups_text = testgroups_text.replace(/, $/g,'');    testgroups_link_text = testgroups_link_text.replace(/, $/g,'');    document.getElementById('testgroups_display').innerHTML = testgroups_text;    document.getElementById('testgroups_link_display').innerHTML = testgroups_link_text;  } else {    document.getElementById('testgroups_display').innerHTML = '<span class="errorHeading">This testcase does not belong to any testgroups that are currently enabled.</span>';    document.getElementById('testgroups_link_display').innerHTML = '<span class="errorHeading">This testcase does not belong to any testgroups that are currently enabled &rArr;&nbsp;<a target="manage_testgroups" href="manage_testgroups.cgi">Jump to Manage Testgroups</a>.</span>';  }  var subgroups_text = "";  var subgroups_link_text = "";  for (var i in testcase.subgroups) {    if (testcase.subgroups[i].name != '') {      subgroups_text = subgroups_text + testcase.subgroups[i].name + ', ';      subgroups_link_text = subgroups_link_text + '<a target="manage_subgroups" href="manage_subgroups.cgi?subgroup_id=' + testcase.subgroups[i].subgroup_id + '">'+ testcase.subgroups[i].name + '</a>, ';    }  }  if (subgroups_text != '') {    subgroups_text = subgroups_text.replace(/, $/g,'');    subgroups_link_text = subgroups_link_text.replace(/, $/g,'');    document.getElementById('subgroups_display').innerHTML = subgroups_text;    document.getElementById('subgroups_link_display').innerHTML = subgroups_link_text;  } else {    document.getElementById('subgroups_display').innerHTML = '<span class="errorHeading">This testcase does not belong to any subgroups that are currently enabled.</span>';    document.getElementById('subgroups_link_display').innerHTML = '<span class="errorHeading">This testcase does not belong to any subgroups that are currently enabled &rArr;&nbsp;<a target="manage_subgroups" href="manage_subgroups.cgi">Jump to Manage Subgroups</a>.</span>';  }  var enabled_em = document.getElementById('editform_enabled')  if (testcase.enabled == 1) {    enabled_em.checked = true;  } else {    enabled_em.checked = false; }  var communityenabled_em = document.getElementById('editform_communityenabled') if (testcase.community_enabled == 1) {    communityenabled_em.checked = true;  } else {    communityenabled_em.checked = false;  }  if (testcase.regression_bug_id) {    document.getElementById('editform_regression_bug_id').value = testcase.regression_bug_id;  } else {    document.getElementById('editform_regression_bug_id').value = "";  }  setAuthor(testcase.author_id.user_id);  document.getElementById('editform_creation_date').innerHTML = testcase.creation_date;  document.getElementById('editform_last_updated').innerHTML = testcase.last_updated;  document.getElementById('editform_litmus_version').innerHTML = testcase.version;  document.getElementById('editform_testrunner_case_id').innerHTML = testcase.testrunner_case_id;  document.getElementById('editform_testrunner_case_version').innerHTML = testcase.testrunner_case_version;  document.getElementById('editform_div').style.display = 'none';  document.getElementById('testcase_display_div').style.display = 'block';  enableModeButtons();  if (firstPassEdit) {    firstPassEdit = 0;    switchToEdit();  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/d4615cb201fc4fbd9e948cce79d17507e004da9f/ManageTestcases.js/buggy/webtools/litmus/js/ManageTestcases.js