-
Notifications
You must be signed in to change notification settings - Fork 0
/
alert-box.html
493 lines (462 loc) · 36.6 KB
/
alert-box.html
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<!DOCTYPE html>
<html class="rd-template-admin">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Alert box | Rundiz template for admin</title>
<link rel="stylesheet" href="assets/css/sanitize/sanitize.css?npm-v=github%3Acsstools%2Fsanitize.css%23main">
<link rel="stylesheet" href="assets/css/sanitize/typography.css?npm-v=github%3Acsstools%2Fsanitize.css%23main">
<link rel="stylesheet" href="assets/css/sanitize/forms.css?npm-v=github%3Acsstools%2Fsanitize.css%23main">
<link rel="stylesheet" href="assets/font-awesome/css/all.min.css?npm-v=6.0.0">
<link rel="stylesheet" href="assets/css/smartmenus/sm-core-css.css?npm-v=1.1.1">
<link rel="stylesheet" href="assets/css/smartmenus/sm-rdta/sm-rdta.css?v=3ef227ffe8516995345c01c6f1a9b9a2">
<link rel="stylesheet" href="assets/css/rdta/typo-and-form/typo-and-form.css?v=782df4c386eb481a46cf4c87aeeb7d40">
<link rel="stylesheet" href="assets/css/rdta/rundiz-template-admin.css?v=c4af81a435d9eb76bbce005b24a0154d">
<link rel="stylesheet" href="assets/css/rdta-demo-pages.css?v=5c5a3502c8c15fba309fc170b49e4583">
<link class="exclude-preview" rel="stylesheet" href="assets/css-preview/view-source.css?v=856c7087abf9e79c34c08320f05131ce"><!-- preview source css excluded. -->
</head>
<body>
<header class="rd-navbar">
<button class="rd-sidebar-toggler" data-target=".rd-page-wrapper" title="Toggle side bar menu"><i class="fa-solid fa-bars fa-fw"></i><span class="screen-reader-only" aria-hidden="true">Toggle side bar menu</span></button>
<div class="rd-site-brand"><a href="./">Admin Dashboard</a></div><!--.rd-site-brand-->
<nav class="nav-right">
<ul class="sm sm-rdta navbar">
<li><a href="#" onclick="return false;"><i class="fa-solid fa-globe fa-fw"></i></a>
<ul>
<li><a href="javascript:alert('link clicked');">Thai</a></li>
<li class="is-active"><a href="javascript:alert('link clicked');">English</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;"><i class="fa-solid fa-bell fa-fw"></i> <span class="rd-notification-badge tiny">3</span></a>
<ul>
<li><a href="#" onclick="return false;">Approve new comments</a></li>
<li><a href="#" onclick="return false;">Approve new posts</a></li>
<li><a href="#" onclick="return false;">There are new contact messages</a></li>
</ul>
</li>
<li class="user"><a href="#" onclick="return false;"><i class="fa-regular fa-circle-user"></i></a>
<ul>
<li><a>Hello, user name</a></li>
<li><a href="#" onclick="return false;">Edit your account</a></li>
<li><a href="#" onclick="return false;">Logout</a></li>
</ul>
</li>
</ul>
</nav><!--.nav-right-->
</header><!--.rd-navbar-->
<div class="rd-page-wrapper">
<div class="rd-sidebar-back"></div>
<section class="rd-sidebar">
<h2 class="screen-reader-only">Sidebar menus</h2>
<div class="rd-sidebar-inner">
<ul class="rd-sidebar-item-list sm sm-vertical sm-rdta">
<li><a href="#" onclick="return false;" title="Admin home"><i class="sidebar-icon fa-solid fa-gauge-high fa-fw"></i> <span class="rd-sidebar-menu-text">Admin home</span></a>
<ul>
<li><a href="./">Admin dashboard</a></li>
<li><a href="javascript:alert('link clicked');">Update</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;" title="Components"><i class="sidebar-icon fa-solid fa-boxes-stacked fa-fw"></i> <span class="rd-sidebar-menu-text">Components</span></a>
<ul>
<li class="sub-menu-heading"><a>Typography & getting started</a></li>
<li><a href="typography.html">Typography & reset</a></li>
<li><a href="basic-layout.html">Basic layout (getting started)</a></li>
<li class="divider"></li>
<li class="sub-menu-heading"><a>More components</a></li>
<li><a href="accordion.html">Accordion</a></li>
<li><a href="alert-box.html">Alert box</a></li>
<li><a href="alert-dialog.html">Alert dialog</a></li>
<li><a href="badge.html">Badge</a></li>
<li><a href="button.html">Button</a></li>
<li><a href="columns-flex.html">Columns flex</a></li>
<li><a href="datatable.html">Data table</a></li>
<li><a href="datatables-js.html">DataTables JS</a></li>
<li><a href="dialog.html">Dialog</a></li>
<li><a href="embeds.html">Embeds</a></li>
<li><a href="form.html">Form</a></li>
<li><a href="helpers.html">Helpers</a></li>
<li><a href="pagination.html">Pagination</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="text.html">Text</a></li>
<li><a href="tooltips.html">Tooltips</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;" title="Examples"><i class="sidebar-icon fa-solid fa-laptop-code"></i> <span class="rd-sidebar-menu-text">Examples</span></a>
<ul>
<li><a href="example-login.html">Login page</a></li>
<li><a href="example-logout.html">Logout page</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;" title="Tools & guide"><i class="sidebar-icon fa-solid fa-code fa-fw"></i> <span class="rd-sidebar-menu-text">Tools & guide</span></a>
<ul>
<li><a href="credits.html">Credits</a></li>
<li><a href="https://css-tricks.com/snippets/css/complete-guide-grid/" target="tools_cssgrid">CSS grid</a></li>
<li><a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="tools_cssflex">CSS flex box</a></li>
<li><a href="https://www.w3.org/wiki/HTML_structural_elements" target="tools_html5structural">HTML 5 structural elements</a></li>
<li><a href="http://pxtoem.com/" target="pxtoemconverter">Pixel / <code>em</code> converter</a></li>
</ul>
</li>
<li class="divider"></li>
<li class="sub-menu-heading"><a onclick="return false;" title="Experiments"><i class="sidebar-icon fa-solid fa-vial fa-fw"></i> <span class="rd-sidebar-menu-text">Experiments</span></a></li>
<li><a href="#" onclick="return false;" title="Sticky menu"><i class="sidebar-icon fa-solid fa-thumbtack fa-fw"></i> <span class="rd-sidebar-menu-text">Stickey menu</span></a>
<ul>
<li><a href="stickymenu-long-content.html">Sticky menu (long content)</a></li>
<li><a href="stickymenu-long-menu.html">Sticky menu (long menu)</a></li>
<li><a href="stickymenu-long-content-menu.html">Sticky menu (long content & menu)</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;" title="Sub menus"><i class="sidebar-icon fa-solid fa-folder-tree fa-fw"></i> <span class="rd-sidebar-menu-text">Sub menus</span></a>
<ul>
<li><a href="javascript:alert('link clicked');">1</a>
<ul>
<li><a href="javascript:alert('link clicked');">1.1</a>
<ul>
<li><a href="javascript:alert('link clicked');">1.1.1</a>
<ul>
<li><a href="javascript:alert('link clicked');">1.1.1.1</a></li>
<li><a href="#" onclick="return false;">1.1.1.2</a></li>
<li><a href="#" onclick="return false;">1.1.1.3</a></li>
<li><a href="#" onclick="return false;">1.1.1.4</a></li>
<li><a href="#" onclick="return false;">1.1.1.5</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">1.1.2</a></li>
<li><a href="#" onclick="return false;">1.1.3</a></li>
<li><a href="#" onclick="return false;">1.1.4</a></li>
<li><a href="#" onclick="return false;">1.1.5</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">1.2</a></li>
<li><a href="#" onclick="return false;">1.3</a></li>
<li><a href="#" onclick="return false;">1.4</a></li>
<li><a href="#" onclick="return false;">1.5</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">2 (Deep sub menus)</a>
<ul>
<li><a href="#" onclick="return false;">2.1</a></li>
<li><a href="#" onclick="return false;">2.2</a>
<ul>
<li><a href="#" onclick="return false;">2.2.1</a></li>
<li><a href="#" onclick="return false;">2.2.2</a>
<ul>
<li><a href="#" onclick="return false;">2.2.2.1</a></li>
<li><a href="#" onclick="return false;">2.2.2.2</a>
<ul>
<li><a href="#" onclick="return false;">2.2.2.2.1</a></li>
<li><a href="#" onclick="return false;">2.2.2.2.2</a>
<ul>
<li><a href="#" onclick="return false;">2.2.2.2.2.1</a></li>
<li><a href="#" onclick="return false;">2.2.2.2.2.2</a></li>
<li><a href="#" onclick="return false;">2.2.2.2.2.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">2.2.2.2.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">2.2.2.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">2.2.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">2.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">3 (Very long sub menus)</a>
<ul>
<!-- it is recommended that you should not have more than 15 items per sub menu, or you have to modify options in `rdtaSidebarSmartMenus()` function -->
<li><a href="#" onclick="return false;">3.1</a></li>
<li><a href="#" onclick="return false;">3.2</a></li>
<li><a href="#" onclick="return false;">3.3</a></li>
<li><a href="#" onclick="return false;">3.4</a></li>
<li><a href="#" onclick="return false;">3.5</a></li>
<li><a href="#" onclick="return false;">3.6</a></li>
<li><a href="#" onclick="return false;">3.7</a></li>
<li><a href="#" onclick="return false;">3.8</a></li>
<li><a href="#" onclick="return false;">3.9</a></li>
<li><a href="#" onclick="return false;">3.10</a></li>
<li><a href="#" onclick="return false;">3.11</a></li>
<li><a href="#" onclick="return false;">3.12</a></li>
<li><a href="#" onclick="return false;">3.13</a></li>
<li><a href="#" onclick="return false;">3.14</a></li>
<li><a href="#" onclick="return false;">3.15</a></li>
<li><a href="#" onclick="return false;">3.16</a></li>
<li><a href="#" onclick="return false;">3.17</a></li>
<li><a href="#" onclick="return false;">3.18</a></li>
<li><a href="#" onclick="return false;">3.19</a></li>
<li><a href="#" onclick="return false;">3.20</a></li>
<li><a href="#" onclick="return false;">3.21</a></li>
<li><a href="#" onclick="return false;">3.22</a></li>
<li><a href="#" onclick="return false;">3.23</a></li>
<li><a href="#" onclick="return false;">3.24</a></li>
<li><a href="#" onclick="return false;">3.25</a></li>
<li><a href="#" onclick="return false;">3.26</a></li>
<li><a href="#" onclick="return false;">3.27</a></li>
<li><a href="#" onclick="return false;">3.28</a></li>
<li><a href="#" onclick="return false;">3.29</a></li>
<li><a href="#" onclick="return false;">3.30</a></li>
<li><a href="#" onclick="return false;">3.31</a></li>
<li><a href="#" onclick="return false;">3.32</a></li>
<li><a href="#" onclick="return false;">3.33</a></li>
<li><a href="#" onclick="return false;">3.34</a></li>
<li><a href="#" onclick="return false;">3.35</a></li>
<li><a href="#" onclick="return false;">3.36</a></li>
<li><a href="#" onclick="return false;">3.37</a></li>
<li><a href="#" onclick="return false;">3.38</a></li>
<li><a href="#" onclick="return false;">3.39</a></li>
<li><a href="#" onclick="return false;">3.40</a></li>
<li><a href="#" onclick="return false;">3.41</a></li>
<li><a href="#" onclick="return false;">3.42</a></li>
<li><a href="#" onclick="return false;">3.43</a></li>
<li><a href="#" onclick="return false;">3.44</a></li>
<li><a href="#" onclick="return false;">3.45</a></li>
<li><a href="#" onclick="return false;">3.46</a></li>
<li><a href="#" onclick="return false;">3.47</a></li>
<li><a href="#" onclick="return false;">3.48</a></li>
<li><a href="#" onclick="return false;">3.49</a></li>
<li><a href="#" onclick="return false;">3.50</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">4</a></li>
<li><a href="#" onclick="return false;">5</a></li>
<li><a href="#" onclick="return false;">6</a></li>
<li><a href="#" onclick="return false;">7</a></li>
<li><a href="#" onclick="return false;">8</a></li>
<li class="divider"><a href="#" onclick="alert('Nothing works here!'); return false;">Nothing here will be display.</a></li>
<li><a href="#" onclick="return false;">The above is <code>li.divider</code></a></li>
<li class="sub-menu-heading"><a href="#" onclick="return false;">This is <code>li.sub-menu-heading</code></a></li>
<li><a href="#" onclick="return false;">9 (Sub menu components)</a>
<ul>
<li><a href="#" onclick="return false;">1</a></li>
<li><a href="#" onclick="return false;">2</a></li>
<li><a href="#" onclick="return false;">3</a></li>
<li class="divider"><a href="#" onclick="alert('Nothing works here!'); return false;">Nothing here will be display.</a></li>
<li><a href="#" onclick="return false;">Divider in sub menus</a></li>
<li class="sub-menu-heading"><a>Deeper sub menu heading</a></li>
<li><a href="#" onclick="return false;">4</a></li>
<li><a href="#" onclick="return false;">5</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">10</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;" title="Long menu text"><i class="sidebar-icon fa-solid fa-greater-than-equal fa-fw"></i> <span class="rd-sidebar-menu-text">Longggggggggggggggggg menu text</span></a>
<ul>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 1</a>
<ul>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 1.1</a></li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 1.2</a></li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 1.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 2</a>
<ul>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 2.1</a>
<ul>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 2.1.1</a></li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 2.1.2</a></li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 2.1.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 2.2</a></li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 2.3</a></li>
</ul>
</li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 3</a></li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 4</a></li>
<li><a href="#" onclick="return false;">longggggggggggggggggggggggggggggggggggggggggggg submenu item 5</a></li>
</ul>
</li>
</ul>
<ul class="rd-sidebar-item-list rd-sidebar-expand-collapse-controls">
<li>
<a data-target=".rd-page-wrapper" title="Expane/collapse menu"><i class="sidebar-icon faicon fa-solid fa-chevron-left fa-fw" data-toggle-icon="fa-chevron-left fa-chevron-right"></i> <span class="screen-reader-only" aria-hidden="true">Expane/collapse menu</span></a>
<hr>
</li>
</ul>
</div><!--.rd-sidebar-inner-->
</section><!--.rd-sidebar-->
<main>
<nav>
<ul class="rd-breadcrumb">
<li><a href="./">Home</a></li>
<li class="current"><a href="#" onclick="return false;">Alert box</a></li>
</ul>
</nav>
<div class="rd-page-content">
<h1>Alert box</h1>
<p>The alert box with notification message.</p>
<hr>
<h2>Examples</h2>
<div class="rd-alertbox rd-alertbox-sample-1">
Default alert box. Example <a href="#" onclick="return false">link</a> inside alert box.
</div>
<h3>Source</h3>
<pre class="preview-source" data-target-src=".rd-alertbox-sample-1" data-target-src-remove-first-space="20"></pre>
<div class="rd-alertbox alert-info">
Info alert box by add <code>.alert-info</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div><div class="rd-alertbox alert-danger">
Danger alert box by add <code>.alert-danger</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div><div class="rd-alertbox alert-warning">
Warning alert box by add <code>.alert-warning</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div><div class="rd-alertbox alert-success">
Success alert box by add <code>.alert-success</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div>
<h3>Dismissable</h3>
<div class="rd-alertbox is-dismissable rd-alertbox-sample-dismissable">
<button class="close" type="button" aria-label="Close" onclick="return RundizTemplateAdmin.closeAlertbox(this);"><span aria-hidden="true">×</span></button>
Default alert box. Example <a href="#" onclick="return false">link</a> inside alert box.
</div>
<h4>Source</h4>
<pre class="preview-source" data-target-src=".rd-alertbox-sample-dismissable" data-target-src-remove-first-space="20"></pre>
<div class="rd-alertbox alert-info is-dismissable">
<button class="close" type="button" aria-label="Close" onclick="return RundizTemplateAdmin.closeAlertbox(this);"><span aria-hidden="true">×</span></button>
Info alert box by add <code>.alert-info</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div><div class="rd-alertbox alert-danger is-dismissable">
<button class="close" type="button" aria-label="Close" onclick="return RundizTemplateAdmin.closeAlertbox(this);"><span aria-hidden="true">×</span></button>
Danger alert box by add <code>.alert-danger</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div><div class="rd-alertbox alert-warning is-dismissable">
<button class="close" type="button" aria-label="Close" onclick="return RundizTemplateAdmin.closeAlertbox(this);"><span aria-hidden="true">×</span></button>
Warning alert box by add <code>.alert-warning</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div><div class="rd-alertbox alert-success is-dismissable">
<button class="close" type="button" aria-label="Close" onclick="return RundizTemplateAdmin.closeAlertbox(this);"><span aria-hidden="true">×</span></button>
Success alert box by add <code>.alert-success</code> class into alert box element. Example <a href="#" onclick="return false">link</a> inside alert box.
</div>
<h3>Alert with more content</h3>
<div class="rd-alertbox alert-warning">
<h4>Warning!</h4>
<p>This is the warning text.</p>
</div>
<div class="rd-alertbox alert-danger">
<ul class="rd-alert-list">
<li>Username field is required.</li>
<li>Email field is invalid.</li>
</ul>
</div>
<div class="rd-alertbox alert-info">
<p>Please follow instruction.</p>
<ol class="rd-alert-list">
<li>Press <kbd>F5</kbd></li>
<li>Read this message</li>
</ol>
</div>
<h3>Placement</h3>
<div class="rdta-demopage-debugbox rd-block-level-margin-bottom">
<p>The alert box in default position (no fixed).</p>
<div class="rd-alertbox alert-info">
Info alert box.
</div>
</div>
<div class="rdta-demopage-debugbox">
<p>The alert box that will always stay at the top.</p>
<div class="rd-alertbox alert-info fixed-top rd-alertbox-sample-fixedtop">
Info alert box.
</div>
</div>
<h4>Source</h4>
<pre class="preview-source" data-target-src=".rd-alertbox-sample-fixedtop" data-target-src-remove-first-space="24"></pre>
<div class="rdta-demopage-debugbox">
<p>The alert box that will always stay at the bottom.</p>
<div class="rd-alertbox alert-info fixed-bottom code-sample-fixedbottom">
Info alert box.
</div>
</div>
<h4>Source</h4>
<pre class="preview-source" data-target-src=".code-sample-fixedbottom" data-target-src-remove-first-space="24"></pre>
<p>To see it in action, please click on the link below.</p>
<p>Show alert box fixed top for:
<a href="#" onclick="return rdtaDemoShowAlertboxFixed('info', 'top');">info</a> <a href="#" onclick="return rdtaDemoShowAlertboxFixed('danger', 'top');">danger</a> <a href="#" onclick="return rdtaDemoShowAlertboxFixed('warning', 'top');">warning</a> <a href="#" onclick="return rdtaDemoShowAlertboxFixed('success', 'top');">success</a> </p>
<p>Show alert box fixed bottom for:
<a href="#" onclick="return rdtaDemoShowAlertboxFixed('info');">info</a> <a href="#" onclick="return rdtaDemoShowAlertboxFixed('danger');">danger</a> <a href="#" onclick="return rdtaDemoShowAlertboxFixed('warning');">warning</a> <a href="#" onclick="return rdtaDemoShowAlertboxFixed('success');">success</a> </p>
<div class="rdta-demopage-debugbox">
<p>The alert box that will always stay at the bottom (float).</p>
<div class="rd-alertbox alert-info float-bottom code-sample-floatbottom">
Info alert box.
</div>
</div>
<h4>Source</h4>
<pre class="preview-source" data-target-src=".code-sample-floatbottom" data-target-src-remove-first-space="24"></pre>
<p>To see it in action, please click on the link below.</p>
<p>Show alert box float top for:
<a href="#" onclick="return rdtaDemoShowAlertboxFloat('info', 'top');">info</a> <a href="#" onclick="return rdtaDemoShowAlertboxFloat('danger', 'top');">danger</a> <a href="#" onclick="return rdtaDemoShowAlertboxFloat('warning', 'top');">warning</a> <a href="#" onclick="return rdtaDemoShowAlertboxFloat('success', 'top');">success</a> </p>
<p>Show alert box float bottom for:
<a href="#" onclick="return rdtaDemoShowAlertboxFloat('info');">info</a> <a href="#" onclick="return rdtaDemoShowAlertboxFloat('danger');">danger</a> <a href="#" onclick="return rdtaDemoShowAlertboxFloat('warning');">warning</a> <a href="#" onclick="return rdtaDemoShowAlertboxFloat('success');">success</a> </p>
</div><!--.rd-page-content-->
</main>
<footer>
<div class="rd-page-footer-left"><a href="http://rundiz.com" target="_blank">Rundiz</a> template for admin</div>
<div class="rd-page-footer-right">My app version n.n.</div>
</footer>
</div><!--.rd-page-wrapper-->
<script src="//code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="assets/js/smartmenus/jquery.smartmenus.min.js?npm-v=1.1.1"></script>
<script src="assets/js/popper.js/umd/popper.min.js?npm-v=2.11.2"></script>
<script src="assets/js/sticky-sidebar/jquery.sticky-sidebar.min.js?npm-v=3.3.1"></script>
<script src="assets/js/resize-sensor/ResizeSensor.js?v=8652505c23e8fdc8016445c5e13bee64"></script><!-- use with sticky sidebar js, manual update. -->
<script src="assets/js/rdta/rundiz-template-admin.js?v=da4ea17f9a3341bc37d653a0fa05aaed"></script>
<script class="exclude-preview" src="assets/js-preview/view-target-source.js?v=5d8e14607272d449d23384736d9e83c0"></script>
<script class="exclude-preview" src="assets/js-preview/view-source.js?v=8921f78eb4b62617fff7cd24b9329802"></script>
<script>
var timeout1, timeout2, timeout3, timeout4;
function rdtaDemoShowAlertboxFixed(alertName, fixedPosition) {
if (fixedPosition !== 'top') {
fixedPosition = 'bottom';
}
let alertboxHtml = '<div class="rd-alertbox alert-' + alertName + ' fixed-' + fixedPosition + ' is-dismissable alertbox-fixed-position-demo rd-animation fade">' +
'<button class="close" type="button" aria-label="Close" onclick="return RundizTemplateAdmin.closeAlertbox(this);"><span aria-hidden="true">×</span></button>' +
'This is alert box ' + alertName + '. This alert box will be disappear after few seconds with custom JS function.' +
'</div>';
// remove previous alert box demo.
if (document.querySelector('.alertbox-fixed-position-demo')) {
document.querySelector('.alertbox-fixed-position-demo').remove();
}
document.body.insertAdjacentHTML('beforeEnd', alertboxHtml);
clearTimeout(timeout1);
clearTimeout(timeout2);
// make alert box demo disappear after few seconds.
timeout1 = setTimeout(function() {
if (document.querySelector('.alertbox-fixed-position-demo')) {
document.querySelector('.alertbox-fixed-position-demo').classList.add('fade-out');
}
}, 5000);
// also remove alert box demo after disappeared.
timeout2 = setTimeout(function() {
if (document.querySelector('.alertbox-fixed-position-demo')) {
document.querySelector('.alertbox-fixed-position-demo').remove();
}
}, 5400);
return false;
}// rdtaDemoShowAlertboxFixed
function rdtaDemoShowAlertboxFloat(alertName, floatPosition) {
if (floatPosition !== 'top') {
floatPosition = 'bottom';
}
let alertboxHtml = '<div class="rd-alertbox alert-' + alertName + ' float-' + floatPosition + ' is-dismissable alertbox-float-position-demo rd-animation fade">' +
'<button class="close" type="button" aria-label="Close" onclick="return RundizTemplateAdmin.closeAlertbox(this);"><span aria-hidden="true">×</span></button>' +
'This is alert box ' + alertName + '. This alert box will be disappear after few seconds with custom JS function.' +
'</div>';
// remove previous alert box demo.
if (document.querySelector('.alertbox-float-position-demo')) {
document.querySelector('.alertbox-float-position-demo').remove();
}
document.body.insertAdjacentHTML('beforeEnd', alertboxHtml);
clearTimeout(timeout3);
clearTimeout(timeout4);
// make alert box demo disappear after few seconds.
timeout3 = setTimeout(function() {
if (document.querySelector('.alertbox-float-position-demo')) {
document.querySelector('.alertbox-float-position-demo').classList.add('fade-out');
}
}, 5000);
// also remove alert box demo after disappeared.
timeout4 = setTimeout(function() {
if (document.querySelector('.alertbox-float-position-demo')) {
document.querySelector('.alertbox-float-position-demo').remove();
}
}, 5400);
return false;
}// rdtaDemoShowAlertboxFloat
</script>
</body>
</html>