- fix runaway JS from double product setting
This commit is contained in:
ccooper%deadsquid.com 2006-12-13 20:04:36 +00:00
Родитель 447dd0b8bb
Коммит 0530db5cad
2 изменённых файлов: 1 добавлений и 16 удалений

Просмотреть файл

@ -1,14 +1,3 @@
function populateProductSelect(selectID) {
if (products) {
var selectBox = document.getElementById(selectID)
selectBox.options.length = 0;
selectBox.options[0] = new Option('-Product-','');
for (var i=0; i<products.length; i++) {
selectBox.options[i+1] = new Option(products[i].name,products[i].product_id);
}
}
}
function changeProduct(productSelectBox) {
if (productSelectBox.selectedIndex &&
productSelectBox.options[productSelectBox.selectedIndex].value != '') {

Просмотреть файл

@ -32,11 +32,8 @@
[% title="View Testcase" %]
[% PROCESS global/selects.none.tmpl %]
[% includeselects=1 %]
[% INCLUDE global/html_header.tmpl js_files=['js/Help.js','js/SelectBoxes.js','js/FormValidation.js','js/FormPersist.js','js/ViewTestcase.js'] %]
[% INCLUDE global/html_header.tmpl js_files=['js/FormValidation.js','js/MochiKit/MochiKit.js','js/json.js','js/Help.js','js/SelectBoxes.js','js/FormPersist.js','js/ViewTestcase.js'] %]
[% INCLUDE global/litmus_header.tmpl %]
<script type="text/javascript">
@ -45,7 +42,6 @@ var testgroups=[% testgroups_js %];
var subgroups=[% subgroups_js %];
function init() {
populateProductSelect("product_id");
[% IF searchType == "by_category" %]
productBox = document.getElementById('product_id');
testgroupBox = document.getElementById('testgroup_id');