Lines 1512-1522
Link Here
|
1512 |
itm_text = $(this).text(); |
1512 |
itm_text = $(this).text(); |
1513 |
itm_text = itm_text.replace(/^\s*|\s*$/g,''); |
1513 |
itm_text = itm_text.replace(/^\s*|\s*$/g,''); |
1514 |
var current_column = $("#edit_row td:eq("+i+")"); |
1514 |
var current_column = $("#edit_row td:eq("+i+")"); |
1515 |
if ( i == 3 ) { |
1515 |
var current_input_id = $(current_column).children('input').first().attr('id'); |
|
|
1516 |
if ( current_input_id === "note" ) { |
1516 |
// specific processing for the Note column |
1517 |
// specific processing for the Note column |
1517 |
var note = $(this).find("a[id='viewnote']").data("content"); |
1518 |
var note = $(this).find("a[id='viewnote']").data("content"); |
1518 |
$(current_column).find("input[type='text']").val(note); |
1519 |
$(current_column).find("input[type='text']").val(note); |
1519 |
} else if ( i == 9 ) { |
1520 |
} else if ( current_input_id === "hardduedatecompare" ) { |
1520 |
// specific processing for Hard due date |
1521 |
// specific processing for Hard due date |
1521 |
$(current_column).find("select").val(itm_code); |
1522 |
$(current_column).find("select").val(itm_code); |
1522 |
var hardduedate = $(this).data('duedate'); |
1523 |
var hardduedate = $(this).data('duedate'); |
Lines 1525-1531
Link Here
|
1525 |
hardduedate = fp.parseDate( hardduedate, flatpickr_dateformat_string ); |
1526 |
hardduedate = fp.parseDate( hardduedate, flatpickr_dateformat_string ); |
1526 |
if( hardduedate) fp.setDate( hardduedate, 1 ); |
1527 |
if( hardduedate) fp.setDate( hardduedate, 1 ); |
1527 |
} |
1528 |
} |
1528 |
} else if ( i == 25 ) { |
1529 |
} else if ( current_input_id === "no_auto_renewal_after_hard_limit" ) { |
1529 |
// specific processing for No automatic renewal after (hard limit) |
1530 |
// specific processing for No automatic renewal after (hard limit) |
1530 |
var renewdate = itm_text; |
1531 |
var renewdate = itm_text; |
1531 |
if (renewdate) { |
1532 |
if (renewdate) { |
Lines 1533-1539
Link Here
|
1533 |
renewdate = fp.parseDate( renewdate, flatpickr_dateformat_string ); |
1534 |
renewdate = fp.parseDate( renewdate, flatpickr_dateformat_string ); |
1534 |
if( renewdate) fp.setDate( renewdate, 1 ); |
1535 |
if( renewdate) fp.setDate( renewdate, 1 ); |
1535 |
} |
1536 |
} |
1536 |
} else if ( i == 16 ) { |
1537 |
} else if ( current_input_id === "cap_fine_to_replacement_price" ) { |
1537 |
// specific processing for cap_fine_to_replacement_price |
1538 |
// specific processing for cap_fine_to_replacement_price |
1538 |
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); |
1539 |
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); |
1539 |
$('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') ); |
1540 |
$('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') ); |
Lines 1559-1565
Link Here
|
1559 |
|
1560 |
|
1560 |
// After setting the correct option, update the select to reflect the change |
1561 |
// After setting the correct option, update the select to reflect the change |
1561 |
$(current_column).find('select').trigger('change'); |
1562 |
$(current_column).find('select').trigger('change'); |
1562 |
var current_input_id = $(current_column).children('input').first().attr('id'); |
|
|
1563 |
if ( i == 0 || i == 1 ) { |
1563 |
if ( i == 0 || i == 1 ) { |
1564 |
// Disable the 2 first columns, we cannot update them. |
1564 |
// Disable the 2 first columns, we cannot update them. |
1565 |
var val = $(current_column).find("select option:selected").val(); |
1565 |
var val = $(current_column).find("select option:selected").val(); |
Lines 1570-1576
Link Here
|
1570 |
// Remove potential previous input added |
1570 |
// Remove potential previous input added |
1571 |
$(current_column).find("input").remove(); |
1571 |
$(current_column).find("input").remove(); |
1572 |
$(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />"); |
1572 |
$(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />"); |
1573 |
} else if ( i == 5 || i == 6 || i == 26 || i == 27 || i == 28 || current_input_id === "holds_pickup_period" ) { |
1573 |
} else if ( current_input_id === "maxissueqty" || current_input_id === "maxonsiteissueqty" || current_input_id === "reservesallowed" || current_input_id === "holds_per_day" || current_input_id === "holds_per_record" || current_input_id === "holds_pickup_period" ) { |
1574 |
// If the value is not an integer for |
1574 |
// If the value is not an integer for |
1575 |
// - "Current checkouts allowed" |
1575 |
// - "Current checkouts allowed" |
1576 |
// - "Current on-site checkouts allowed" |
1576 |
// - "Current on-site checkouts allowed" |
1577 |
- |
|
|