diff --git a/app/assets/javascripts/channels/call_waiter.js b/app/assets/javascripts/channels/call_waiter.js index a623fb10..f0274f91 100644 --- a/app/assets/javascripts/channels/call_waiter.js +++ b/app/assets/javascripts/channels/call_waiter.js @@ -6,56 +6,54 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { disconnected: function() {}, received: function(data) { - console.log(data.table); - console.log(data.time); - table = data.table + table = data.table + // for Notificaiotn message - var placementFrom = "top"; - var placementAlign = "center"; - var animateEnter = ""; - var animateExit = ""; - var colorName = "alert-warning"; - var text = " Calling Waiter
"+table.name ; + var placementFrom = "top"; + var placementAlign = "center"; + var animateEnter = ""; + var animateExit = ""; + var colorName = "alert-warning"; + var text = " Calling Waiter
"+table.name ; - if (text != null || colorName != null){ + if (text != null || colorName != null){ showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit); - } + } - function showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit) { + function showNotification(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 + message: text }, - { - type: colorName, - newest_on_top: true, - allow_dismiss: allowDismiss, - newest_on_top: true, - timer: 200000000000000, - placement: { - from: placementFrom, - align: placementAlign - }, - animate: { - enter: animateEnter, - exit: animateExit - }, - template: '' - }); - } + { + type: colorName, + allow_dismiss: allowDismiss, + newest_on_top: true, + timer: 200000000000000, + placement: { + from: placementFrom, + align: placementAlign + }, + animate: { + enter: animateEnter, + exit: animateExit + }, + template: '' + }); + } //end Notificaiotn message - } +} }); diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 6e938777..3400a4a1 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -380,7 +380,7 @@ }); $('#pay').click(function() { - $('#pay').text("Processing, Please wait!") + // $('#pay').text("Processing, Please wait!") $( "#loading_wrapper" ).show();