-
Notifications
You must be signed in to change notification settings - Fork 988
/
notify.js
103 lines (60 loc) · 2.07 KB
/
notify.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
$(document).on('ready pjax:complete', function(){
if($('.side-body').length){
$('#notif-container .alert').attr('style', 'margin-top: 20px');
if($('#vue-app-main-container').length>0)
{
//$('#notif-container .alert').prependTo('.side-body');
//$('#notif-container .alert').before('#vue-app-main-container');
}
else
{
$('#notif-container .alert').prependTo('.side-body');
}
}
if($('.login-content').length){
$('#notif-container .alert').prependTo('.login-content-form');
}
$('#update-alert').on('closed.bs.alert', function ()
{
if (!$(this).hasClass("unstable-update"))
{
$('.update-small-notification').removeClass('hidden');
}
$.ajax({
url: $(this).attr('data-url-notification-state'),
type: 'GET',
success: function(html) {
},
error : function(html, statut){
},
});
});
if($('#absolute_notification').length){
$('#update-container').css({
'margin-top': '0px',
});
}
});
/*
$(document).on('ready pjax:complete', function(){
if($('.side-body').length){
//$('#update-container').removeClass();
$('#notif-container .alert').attr('style', 'margin-top: 20px');
if($('#breadcrumb-container').length>0)
{
//$('#notif-container .alert').prependTo('.side-body');
console.log('#breadcrumb-container');
$('#notif-container .alert').after('#breadcrumb-container');
}
else
{
console.log('#breadcrumb-container');
$('#notif-container .alert').prependTo('.side-body');
}
}
if($('.login-content').length){
$('#notif-container .alert').prependTo('.login-content-form');
}
// window.setTimeout(function() { $("#notif-container .alert").alert('close'); }, 2000);
});
*/