-
Notifications
You must be signed in to change notification settings - Fork 1
/
alert.php
257 lines (236 loc) · 8 KB
/
alert.php
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 3 | Alerts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<?php include 'includes/css.php' ?>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- Navbar -->
<?php include 'includes/navbar.php' ?>
<div class="content-wrapper">
<!-- Page path -->
<?php
$arr = array(
["title" => "Home", "url" => "./"],
["title" => "Alerts", "url" => "#"],
);
pagePath('Alerts', $arr);
?>
<div class="card card-success card-outline">
<div class="card-header">
<h3 class="card-title">
<i class="fas fa-edit"></i>
SweetAlert2 Examples
</h3>
</div>
<div class="card-body">
<button type="button" class="btn btn-success swalDefaultSuccess">
Launch Success Toast
</button>
<button type="button" class="btn btn-info swalDefaultInfo">
Launch Info Toast
</button>
<button type="button" class="btn btn-danger swalDefaultError">
Launch Error Toast
</button>
<button type="button" class="btn btn-warning swalDefaultWarning">
Launch Warning Toast
</button>
<button type="button" class="btn btn-default swalDefaultQuestion">
Launch Question Toast
</button>
<div class="text-muted mt-3">
For more examples look at <a href="https://sweetalert2.github.io/">https://sweetalert2.github.io/</a>
</div>
</div>
</div>
<div class="card card-warning card-outline">
<div class="card-header">
<h3 class="card-title">
<i class="fas fa-edit"></i>
Toastr Examples
</h3>
</div>
<div class="card-body">
<button type="button" class="btn btn-success toastrDefaultSuccess">
Launch Success Toast
</button>
<button type="button" class="btn btn-info toastrDefaultInfo">
Launch Info Toast
</button>
<button type="button" class="btn btn-danger toastrDefaultError">
Launch Error Toast
</button>
<button type="button" class="btn btn-warning toastrDefaultWarning">
Launch Warning Toast
</button>
<div class="text-muted mt-3">
For more examples look at <a
href="https://codeseven.github.io/toastr/">https://codeseven.github.io/toastr/</a>
</div>
</div>
</div>
</div>
<!-- Main Footer -->
<?php include 'includes/footer.php' ?>
</div>
<!-- SCRIPTS -->
<?php include 'includes/js.php' ?>
<script type="text/javascript">
$(function () {
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 3000
});
$('.swalDefaultSuccess').click(function () {
Toast.fire({
icon: 'success',
title: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.swalDefaultInfo').click(function () {
Toast.fire({
icon: 'info',
title: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.swalDefaultError').click(function () {
Toast.fire({
icon: 'error',
title: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.swalDefaultWarning').click(function () {
Toast.fire({
icon: 'warning',
title: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.swalDefaultQuestion').click(function () {
Toast.fire({
icon: 'question',
title: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastrDefaultSuccess').click(function () {
toastr.success('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
});
$('.toastrDefaultInfo').click(function () {
toastr.info('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
});
$('.toastrDefaultError').click(function () {
toastr.error('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
});
$('.toastrDefaultWarning').click(function () {
toastr.warning('Lorem ipsum dolor sit amet, consetetur sadipscing elitr.')
});
$('.toastsDefaultDefault').click(function () {
$(document).Toasts('create', {
title: 'Toast Title',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultTopLeft').click(function () {
$(document).Toasts('create', {
title: 'Toast Title',
position: 'topLeft',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultBottomRight').click(function () {
$(document).Toasts('create', {
title: 'Toast Title',
position: 'bottomRight',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultBottomLeft').click(function () {
$(document).Toasts('create', {
title: 'Toast Title',
position: 'bottomLeft',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultAutohide').click(function () {
$(document).Toasts('create', {
title: 'Toast Title',
autohide: true,
delay: 750,
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultNotFixed').click(function () {
$(document).Toasts('create', {
title: 'Toast Title',
fixed: false,
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultFull').click(function () {
$(document).Toasts('create', {
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.',
title: 'Toast Title',
subtitle: 'Subtitle',
icon: 'fas fa-envelope fa-lg',
})
});
$('.toastsDefaultFullImage').click(function () {
$(document).Toasts('create', {
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.',
title: 'Toast Title',
subtitle: 'Subtitle',
image: 'dist/img/user3-128x128.jpg',
imageAlt: 'User Picture',
})
});
$('.toastsDefaultSuccess').click(function () {
$(document).Toasts('create', {
class: 'bg-success',
title: 'Toast Title',
subtitle: 'Subtitle',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultInfo').click(function () {
$(document).Toasts('create', {
class: 'bg-info',
title: 'Toast Title',
subtitle: 'Subtitle',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultWarning').click(function () {
$(document).Toasts('create', {
class: 'bg-warning',
title: 'Toast Title',
subtitle: 'Subtitle',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultDanger').click(function () {
$(document).Toasts('create', {
class: 'bg-danger',
title: 'Toast Title',
subtitle: 'Subtitle',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
$('.toastsDefaultMaroon').click(function () {
$(document).Toasts('create', {
class: 'bg-maroon',
title: 'Toast Title',
subtitle: 'Subtitle',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
});
</script>
</body>
</html>