update addorder
This commit is contained in:
@@ -51,7 +51,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Large modal -->
|
<!-- Large modal -->
|
||||||
<button class="btn btn-primary" data-toggle="modal" data-target=".sx_item_detailModal">Large modal</button>
|
|
||||||
|
|
||||||
<div class="modal fade sx_item_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
<div class="modal fade sx_item_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
@@ -68,11 +67,11 @@
|
|||||||
<br><br>
|
<br><br>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<h4 class="col-md-12">Quantity</h4>
|
<h4 class="col-md-12">Quantity</h4>
|
||||||
<input type="number" name="qty" class="form-control col-md-12 input-number" id="modal-qty" value="" min="1" max="100">
|
<input type="number" name="qty" class="form-control col-md-12 input-number change_qty" id="modal-qty" value="" min="1" max="100">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<h4 class="col-md-6">Total</h4>
|
<h4 class="col-md-6">Total</h4>
|
||||||
<h4 class="col-md-6" id="total_price"> 2500 Ks</h4>
|
<h4 class="col-md-6" id="total_price"> Ks</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
@@ -141,6 +140,13 @@ $(function(){
|
|||||||
show_menu_item_list(url);
|
show_menu_item_list(url);
|
||||||
});
|
});
|
||||||
//End menu category Click
|
//End menu category Click
|
||||||
|
|
||||||
|
$(".change_qty").change(function(){
|
||||||
|
qty = $(this).val();
|
||||||
|
price = $("#total_price").text();
|
||||||
|
$("#total_price").text(qty*price);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
//show menu item list when click menu category
|
//show menu item list when click menu category
|
||||||
function show_menu_item_list(url_item){
|
function show_menu_item_list(url_item){
|
||||||
@@ -270,7 +276,7 @@ $(function(){
|
|||||||
|
|
||||||
data = $(this).parent().children().children('.add_icon');
|
data = $(this).parent().children().children('.add_icon');
|
||||||
$('#title_name').text(data.attr('data-name'));
|
$('#title_name').text(data.attr('data-name'));
|
||||||
console.log(data);
|
$('#total_price').text(data.attr('data-price'));
|
||||||
});
|
});
|
||||||
|
|
||||||
//click remove buttom in modal box
|
//click remove buttom in modal box
|
||||||
|
|||||||
Reference in New Issue
Block a user