diff --git a/app/assets/javascripts/addorder.js b/app/assets/javascripts/addorder.js index 0439efcb..aa84b398 100755 --- a/app/assets/javascripts/addorder.js +++ b/app/assets/javascripts/addorder.js @@ -949,7 +949,7 @@ $(function() { $(sub_category).removeClass('hidden'); for(var i in data) { - row = '' ; $(sub_category).append(row); diff --git a/app/assets/javascripts/channels/call_waiter.js b/app/assets/javascripts/channels/call_waiter.js index f0274f91..941a6359 100644 --- a/app/assets/javascripts/channels/call_waiter.js +++ b/app/assets/javascripts/channels/call_waiter.js @@ -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
"+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: '