Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #162 from hardingadonis/nghia-fix-bug-161
Browse files Browse the repository at this point in the history
Fix bug #161
  • Loading branch information
bakaqc authored Mar 7, 2024
2 parents bb409f1 + a75ec2d commit e0b901f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/webapp/view/assets/js/alert-timeout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$(document).ready(function() {
setTimeout(function() {
$(".alert").fadeOut('slow');
}, 3000);
}, 1500);
});


9 changes: 6 additions & 3 deletions src/main/webapp/view/jsp/management/order/add-order.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<td>${quantity}</td>
<td><fmt:formatNumber type="currency" value="${product.price * quantity}" currencySymbol="" pattern="#,##0 ¤" /></td>
<td>
<button class="btn btn-danger btn-sm" type="button" id="delete-button">
<button class="btn btn-danger btn-sm delete-button" type="button" data-product-id="${product.ID}">
<i class="la la-trash"></i>
</button>
</td>
Expand Down Expand Up @@ -268,9 +268,12 @@
</script>

<script>
$("#delete-button").click(function(event) {
$(document).on("click", ".delete-button", function (event) {
event.preventDefault();
confirmDelete(${productId}, ${customerId});
var productId = $(this).data("product-id");
confirmDelete(productId, ${customerId});
});
$("#save-button").click(function(event) {
Expand Down

0 comments on commit e0b901f

Please sign in to comment.