merge with master

This commit is contained in:
Yan
2017-12-15 10:36:43 +06:30
30 changed files with 218 additions and 99 deletions

View File

@@ -949,7 +949,7 @@ $(function() {
$(sub_category).removeClass('hidden');
for(var i in data) {
row = '<li class="menu_category" data-id="'+data[i].id+'">'
row = '<li class="menu_category fadeInTop animated" data-id="'+data[i].id+'">'
+'<a class="nav-link" data-toggle="tab" href="" role="tab">'+ data[i].name+'</a>'
+'</li>' ;
$(sub_category).append(row);

View File

@@ -5,10 +5,15 @@ App.order = App.cable.subscriptions.create('BillChannel', {
disconnected: function() {},
received: function(data) {
$('.table_'+data.table.id).removeClass('blue');
$('.table_'+data.table.id).addClass('red');
$('.new_text_'+data.table.id).removeClass('hide')
received: function(data) {
if($('.table_'+data.table.id).hasClass('blue')){
$('.table_'+data.table.id).removeClass('blue');
$('.table_'+data.table.id).addClass('red');
}else{
$('.table_'+data.table.id).removeClass('orange');
$('.table_'+data.table.id).addClass('red');
}
$('.new_text_'+data.table.id).removeClass('hide');
}
});

View File

@@ -9,6 +9,7 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', {
table = data.table
// for Notificaiotn message
var element = "#notify-wrapper"
var placementFrom = "top";
var placementAlign = "center";
var animateEnter = "";
@@ -17,21 +18,22 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', {
var text = " Calling Waiter <br> "+table.name ;
if (text != null || colorName != null){
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
showNotification(element, colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
}
function showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit) {
function showNotification(element, colorName, text, placementFrom, placementAlign, animateEnter, animateExit) {
if (colorName === null || colorName === '') { colorName = 'bg-black'; }
if (animateEnter === null || animateEnter === '') { animateEnter = 'animated fadeInDown'; }
if (animateExit === null || animateExit === '') { animateExit = 'animated fadeOutUp'; }
var allowDismiss = true;
$.notify({
message: text
},
{
element: element,
type: colorName,
allow_dismiss: allowDismiss,
newest_on_top: true,
timer: 200000000000000,
placement: {
from: placementFrom,
@@ -41,8 +43,8 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', {
enter: animateEnter,
exit: animateExit
},
template: '<div data-notify="container" style="max-width: 180px !important;" class="bootstrap-notify-container alert alert-dismissible {0} ' + (allowDismiss ? "p-r-30" : "") + '" role="alert">' +
'<button type="button" aria-hidden="true" class="close float-right m-l-20 m-t--5" data-notify="dismiss" style="right: -5px;">×</button>' +
template: '<div data-notify="container" style="width:180px !important;" class="bootstrap-notify-container alert alert-dismissible {0} ' + (allowDismiss ? "p-r-30" : "") + '" role="alert">' +
'<button type="button" aria-hidden="true" class="close notify-close float-right m-l-5 m-t--5" data-notify="dismiss">×</button>' +
'<span data-notify="icon"></span> ' +
'<span data-notify="title">{1}</span> ' +
'<span data-notify="message">{2}</span>' +

View File

@@ -0,0 +1,14 @@
App.checkin = App.cable.subscriptions.create('CheckInBookingChannel', {
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
connected: function() {},
disconnected: function() {},
received: function(data) {
$('.table_'+data.table.id).removeClass('green');
$('.table_'+data.table.id).addClass('blue');
$('.new_text_'+data.table.id).removeClass('hide')
}
});

View File

@@ -5,21 +5,22 @@ App.order = App.cable.subscriptions.create('CheckinChannel', {
disconnected: function() {},
received: function(data) {
if((data.table != undefined) && (data.table.length > 0)){
$.each(data.table,function(key,value){
if($('.table_'+value.table_id).hasClass('blue')){
$('.table_'+value.table_id).removeClass('blue');
$('.table_'+value.table_id).addClass('orange');
}
else if($('.table_'+value.table_id).hasClass('red')){
$('.table_'+value.table_id).removeClass('red');
$('.table_'+value.table_id).addClass('orange');
}
$('.new_text_'+value.table_id).removeClass('hide');
});
}
received: function(data) {
$.each(data.table,function(key,value){
if($('.table_'+value.table_id).hasClass('blue')){
$('.table_'+value.table_id).removeClass('blue');
$('.table_'+value.table_id).addClass('orange');
}
else if($('.table_'+value.table_id).hasClass('red')){
$('.table_'+value.table_id).removeClass('red');
$('.table_'+value.table_id).addClass('orange');
}
else {
$('.table_'+value.table_id).removeClass('green');
$('.table_'+value.table_id).addClass('orange');
}
$('.new_text_'+value.table_id).removeClass('hide');
});
}
});

View File

@@ -362,8 +362,31 @@ tr.discount-item-row:hover {
/* End Payment Page */
/*Logout Icon*/
/* Logout Icon */
i.logout_icon{
position: relative;
top: 5px;
}
}
/* End Logout Icon */
/* Notify */
#notify-wrapper {
position: absolute;
top: 55px;
left: 10px;
z-index: 9999;
opacity: 0.8;
}
[data-notify="container"] {
margin-bottom: 5px !important;
margin-left:5px !important;
position:relative !important;
top: 25% !important;
width: 100% !important;
}
/* End Notify */