Pull from master
This commit is contained in:
@@ -6,8 +6,8 @@ $(function() {
|
||||
|
||||
//click menu sidebar menu category
|
||||
$(".product").on("click", function(){
|
||||
var url = $(this).attr('data-ref');
|
||||
show_product_list(url);
|
||||
// /var url = $(this).attr('data-ref');
|
||||
// /show_product_list(url);
|
||||
});
|
||||
//show menu item list when click menu category
|
||||
function show_product_list(url_item){
|
||||
@@ -24,6 +24,7 @@ $(function() {
|
||||
if (type ==-1 && modify_order == -1){
|
||||
url_item = url_item
|
||||
}
|
||||
console.log(url_item)
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
@@ -56,16 +57,17 @@ $(function() {
|
||||
image_path = "/image/logo.png";
|
||||
}
|
||||
|
||||
row = '<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">'
|
||||
row = '<div class="col-md-3">'
|
||||
+'<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" style="">'
|
||||
+'<div class="col-md-10">'+ product[field].name +'</div>'
|
||||
+"<div class='col-md-2 menu_item_box' data-item-code='"
|
||||
+ product[field].item_code +"' data-instance = '"
|
||||
+JSON.stringify(item_attributes)+"' data-id = '"
|
||||
+JSON.stringify(item_attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(product[field].options)+"'data-opt = '"
|
||||
+JSON.stringify(product[field].options)+"' data-item-sets = '"
|
||||
+JSON.stringify(options)+"'data-opt = '"
|
||||
+JSON.stringify(options)+"' data-item-sets = '"
|
||||
+JSON.stringify(item_attributes)+"' data-image='"+image_path+"' data-toggle='modal' data-target='.sx_item_detailModal'>"
|
||||
+"<i class='fa fa-bars material-icons m-l--10'>"
|
||||
+'view_list</i>'
|
||||
@@ -78,8 +80,8 @@ $(function() {
|
||||
+ product[field].unit_price +"' data-instance-code = '"+ product[field].item_code +"' data-instance = '"
|
||||
+ product[field].name +"' data-promotion-price = '"+ 1 +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ JSON.stringify(product[field].options) +"' data-opt = '"
|
||||
+ JSON.stringify(product[field].options) +"' data-image='"+image_path+"'>"
|
||||
+ JSON.stringify(options) +"' data-opt = '"
|
||||
+ JSON.stringify(options) +"' data-image='"+image_path+"'>"
|
||||
|
||||
// +"<div class='card-block custom-card-block'>"
|
||||
// +"<img id='logo' height='125px' src='"+image_path+"'>"
|
||||
@@ -88,6 +90,7 @@ $(function() {
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
+'<span>'+ product[field].unit_price +'</span>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('.menu_items_list').append(row);
|
||||
}
|
||||
@@ -500,6 +503,7 @@ $(function() {
|
||||
|
||||
//click item row for add order
|
||||
$(document).on('click', '.menu_item_box', function(event){
|
||||
|
||||
$('.attributes-list').empty();
|
||||
$('.options-list').empty();
|
||||
$('#modal_box_img').empty();
|
||||
@@ -515,7 +519,6 @@ $(function() {
|
||||
$('.add_to_order').removeAttr('data-options');
|
||||
|
||||
$('#count').val(1);
|
||||
|
||||
change_qty_plus_minus("count","plus","minus");
|
||||
|
||||
// data = $(this).parent().children().children('.add_icon');
|
||||
|
||||
@@ -168,4 +168,4 @@ function audioPlayBackground(shop_code,audio){
|
||||
audio.play();
|
||||
// },10000);
|
||||
}
|
||||
/* end order reservation function */
|
||||
/* end order reservation function */
|
||||
@@ -1,3 +1,5 @@
|
||||
//= require custom.js
|
||||
|
||||
$(function() {
|
||||
$("#discount").hide();
|
||||
$(".expected_time").hide();
|
||||
@@ -307,8 +309,8 @@ function show_order_detail(url,sr_no){
|
||||
item_price = items[i].unit_price;
|
||||
}
|
||||
var total = items[i].qty * item_price;
|
||||
if(items[i].options!='[]'){
|
||||
row = '<tr>'
|
||||
if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){
|
||||
row = '<tr>'
|
||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||
+' <br>'
|
||||
+' <i><span class="font-12">'+items[i].options+'</span></i><br>'+
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//= require BSBMaterial/turbolink_admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
//= require order_reservation.js
|
||||
|
||||
/* Constant Varaibles */
|
||||
_CREDIT_PAYMENTS_ = "/ CREDIT PAYMENTS";
|
||||
|
||||
Reference in New Issue
Block a user