|
Lines 153-170
$(document).ready(function () {
Link Here
|
| 153 |
|
153 |
|
| 154 |
$(document).on("click", ".delete", function (e) { |
154 |
$(document).on("click", ".delete", function (e) { |
| 155 |
e.preventDefault(); |
155 |
e.preventDefault(); |
| 156 |
if (confirmDelete(MSG_CONFIRM_DELETE_ITEM)) { |
156 |
var itemnumber = $(this).data("itemnumber"); |
| 157 |
var itemnumber = $(this).data("itemnumber"); |
157 |
var hasSerialItem = $(this).data("has-serial-item"); |
| 158 |
var hasSerialItem = $(this).data("has-serial-item"); |
|
|
| 159 |
|
158 |
|
| 160 |
$("#delete-item-itemnumber").val(itemnumber); |
159 |
$("#delete-item-itemnumber").val(itemnumber); |
| 161 |
$("#delete_associated_serial_issues").attr("checked", false); |
160 |
$("#delete_associated_serial_issues").attr("checked", false); |
| 162 |
$("#delete-item-modal-btn-submit").data("item", itemnumber); |
161 |
$("#delete-item-modal-btn-submit").data("item", itemnumber); |
| 163 |
if (!hasSerialItem) { |
162 |
if (!hasSerialItem) { |
| 164 |
$(".form-group").hide(); |
163 |
$(".form-group").hide(); |
| 165 |
} |
|
|
| 166 |
$("#delete-item-modal").modal("show"); |
| 167 |
} |
164 |
} |
|
|
165 |
$("#delete-item-modal").modal("show"); |
| 168 |
}); |
166 |
}); |
| 169 |
$(document).on("click", "#delete-item-modal-btn-submit", function (e) { |
167 |
$(document).on("click", "#delete-item-modal-btn-submit", function (e) { |
| 170 |
e.preventDefault(); |
168 |
e.preventDefault(); |
| 171 |
- |
|
|