call waiter css

This commit is contained in:
Yan
2017-12-14 11:51:44 +06:30
parent 4baa273f8e
commit e8c5cd1219
3 changed files with 25 additions and 17 deletions

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,10 +18,10 @@ 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'; }
@@ -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: '<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" style="right: -5px;">×</button>' +
'<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>' +