2017-01-02 10:25:47 +01:00
|
|
|
//App.messages = App.cable.subscriptions.create('NotificationsChannel', {
|
|
|
|
// received: function (data) {
|
|
|
|
// if (window.location.href.indexOf('backoffice') !== -1) {
|
|
|
|
// $("#notification_alert").html(data['message']);
|
|
|
|
//
|
|
|
|
// slideIn_notification_alert();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//});
|
2016-12-22 22:27:02 +01:00
|
|
|
|
|
|
|
function slideIn_notification_alert (){
|
|
|
|
$("#notification_alert").animate({
|
|
|
|
right: '20px'
|
|
|
|
}, 250);
|
|
|
|
|
|
|
|
setTimeout(slideOut_notification_alert, 3500);
|
|
|
|
}
|
|
|
|
|
|
|
|
function slideOut_notification_alert (){
|
|
|
|
$("#notification_alert").animate({
|
|
|
|
right: '-250px'
|
|
|
|
}, 200);
|
|
|
|
}
|