edit addorder loading to oqs_loading
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
$(function(){
|
$(function() {
|
||||||
//click menu sidebar menu category
|
//click menu sidebar menu category
|
||||||
$(".product").on("click", function(){
|
$(".product").on("click", function(){
|
||||||
var url = $(this).attr('data-ref');
|
var url = $(this).attr('data-ref');
|
||||||
show_product_list(url);
|
show_product_list(url);
|
||||||
console.log(url)
|
|
||||||
});
|
});
|
||||||
//show menu item list when click menu category
|
//show menu item list when click menu category
|
||||||
function show_product_list(url_item){
|
function show_product_list(url_item){
|
||||||
@@ -635,8 +634,9 @@ $(function(){
|
|||||||
|
|
||||||
// Pay Discount for Payment
|
// Pay Discount for Payment
|
||||||
$("#create_order").on('click', function(e){
|
$("#create_order").on('click', function(e){
|
||||||
|
$(this).attr('disabled', 'disabled');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$("#loading_wrapper").show();
|
$("#oqs_loading_wrapper").show();
|
||||||
var table_id = $('#table_id').text();
|
var table_id = $('#table_id').text();
|
||||||
var booking_id = $('#booking_id').text();
|
var booking_id = $('#booking_id').text();
|
||||||
if (!booking_id.length > 0) {
|
if (!booking_id.length > 0) {
|
||||||
@@ -651,32 +651,32 @@ $(function(){
|
|||||||
|
|
||||||
var ajax_url = '../addorders/create';
|
var ajax_url = '../addorders/create';
|
||||||
|
|
||||||
|
|
||||||
var params = {'order_source': "cashier", 'order_type': "dine_in",
|
var params = {'order_source': "cashier", 'order_type': "dine_in",
|
||||||
'customer_id': "", 'guest_info': "",
|
'customer_id': "", 'guest_info': "",
|
||||||
'table_id': table_id,
|
'table_id': table_id,
|
||||||
'order_items': order_items };
|
'order_items': order_items };
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: ajax_url,
|
url: ajax_url,
|
||||||
data: params,
|
data: params,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success:function(result){
|
success:function(result){
|
||||||
$("#loading_wrapper").hide();
|
$("#oqs_loading_wrapper").hide();
|
||||||
swal({
|
swal({
|
||||||
title: "Information !",
|
title: "Information !",
|
||||||
text: 'Order has been successfully created',
|
text: 'Order has been successfully created',
|
||||||
confirmButtonColor: "green",
|
confirmButtonColor: "green",
|
||||||
confirmButtonText: "Yes!",
|
confirmButtonText: "Yes!",
|
||||||
closeOnConfirm: false,
|
closeOnConfirm: false,
|
||||||
}, function () {
|
}, function (isConfirm) {
|
||||||
if(table_type == "Table"){
|
if (isConfirm) {
|
||||||
window.location.href = "/origami/table/" + table_id
|
if(table_type == "Table"){
|
||||||
}
|
window.location.href = "/origami/table/" + table_id
|
||||||
else {
|
}
|
||||||
window.location.href = "/origami/room/" + table_id
|
else {
|
||||||
}
|
window.location.href = "/origami/room/" + table_id
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -128,8 +128,7 @@ section.content{
|
|||||||
|
|
||||||
/*Loading gif for payment*/
|
/*Loading gif for payment*/
|
||||||
|
|
||||||
#loading_wrapper{
|
#oqs_loading_wrapper{
|
||||||
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background-color: #C8C8C8 ;
|
background-color: #C8C8C8 ;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -137,9 +136,9 @@ section.content{
|
|||||||
left: 0;
|
left: 0;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 9999999;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
#loading{
|
#oqs_loading{
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -147,9 +146,9 @@ section.content{
|
|||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
z-index: 101;
|
||||||
filter: alpha(opacity=100); /* ie */
|
filter: alpha(opacity=100); /* ie */
|
||||||
-moz-opacity: 1; /* mozilla */
|
-moz-opacity: 1; /* mozilla */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#count ,#set_count{
|
#count ,#set_count{
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<%= stylesheet_link_tag 'addorder', media: 'all', 'data-turbolinks-track': 'reload' %>
|
<%= stylesheet_link_tag 'addorder', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||||
<%= javascript_include_tag 'addorder', 'data-turbolinks-track': 'reload' %>
|
<%= javascript_include_tag 'addorder', 'data-turbolinks-track': 'reload' %>
|
||||||
<div id="loading_wrapper" style="display:none;">
|
<div id="oqs_loading_wrapper" style="display:none;">
|
||||||
<div id="loading"></div>
|
<div id="oqs_loading"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row m-t--20">
|
<div class="row m-t--20">
|
||||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||||
<ul class="nav nav-tabs flex-column" role="tablist" >
|
<ul class="nav nav-tabs flex-column" role="tablist" >
|
||||||
|
|||||||
Reference in New Issue
Block a user