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