Lines 1499-1504
Link Here
|
1499 |
} |
1499 |
} |
1500 |
$('#default-circulation-rules td').removeClass('highlighted-row'); |
1500 |
$('#default-circulation-rules td').removeClass('highlighted-row'); |
1501 |
$(this).parent().parent().find("td").each(function (i) { |
1501 |
$(this).parent().parent().find("td").each(function (i) { |
|
|
1502 |
|
1502 |
$(this).addClass('highlighted-row'); |
1503 |
$(this).addClass('highlighted-row'); |
1503 |
itm_code = $(this).data('code'); |
1504 |
itm_code = $(this).data('code'); |
1504 |
itm_text = $(this).text(); |
1505 |
itm_text = $(this).text(); |
Lines 1538-1548
Link Here
|
1538 |
}); |
1539 |
}); |
1539 |
// select the corresponding option |
1540 |
// select the corresponding option |
1540 |
$(current_column).find("select option").each(function(){ |
1541 |
$(current_column).find("select option").each(function(){ |
1541 |
opt = $(this).attr('value'); |
1542 |
// Reset selection status for all options |
1542 |
if ( opt == itm_code ) { |
1543 |
$(this).prop('selected', false); |
1543 |
$(this).attr('selected', 'selected'); |
1544 |
// Declare opt here to ensure it is scoped correctly within the loop |
|
|
1545 |
let opt = $(this).val(); |
1546 |
|
1547 |
// Select the matching option |
1548 |
if (opt == itm_code) { |
1549 |
$(this).prop('selected', true); |
1544 |
} |
1550 |
} |
1545 |
}); |
1551 |
}); |
|
|
1552 |
|
1553 |
// After setting the correct option, update the select to reflect the change |
1554 |
$(current_column).find('select').trigger('change'); |
1546 |
var current_input_id = $(current_column).children('input').first().attr('id'); |
1555 |
var current_input_id = $(current_column).children('input').first().attr('id'); |
1547 |
if ( i == 0 || i == 1 ) { |
1556 |
if ( i == 0 || i == 1 ) { |
1548 |
// Disable the 2 first columns, we cannot update them. |
1557 |
// Disable the 2 first columns, we cannot update them. |
1549 |
- |
|
|