From e8c5cd121901187f90f0fa7512823192c55e7445 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 14 Dec 2017 11:51:44 +0630 Subject: [PATCH] call waiter css --- .../javascripts/channels/call_waiter.js | 8 +++-- app/assets/stylesheets/origami.scss | 30 ++++++++++--------- app/views/layouts/origami.html.erb | 4 +++ 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/app/assets/javascripts/channels/call_waiter.js b/app/assets/javascripts/channels/call_waiter.js index f45748a9..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,10 +18,10 @@ 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'; } @@ -30,6 +31,7 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { message: text }, { + element: element, type: colorName, allow_dismiss: allowDismiss, timer: 200000000000000, @@ -42,7 +44,7 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { exit: animateExit }, template: '