Skip to content

Commit 66f15c4

Browse files
committed
added notification plugins aka toasts (sweetalert2 & toastr)
- added sweetalert2 & toastr to package.json & build/npm/Plugins.js - added plugin related scss fixes and created files per plugin - updated "Modals" demo page to "Modals & Alerts" & renamed link on all demo files - rebuild dist files
1 parent 0b96c5c commit 66f15c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7603
-40
lines changed

build/npm/Plugins.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,21 @@ const Plugins = [
182182
from: 'node_modules/select2/dist/',
183183
to : 'plugins/select2'
184184
},
185-
// Select2
185+
// Sparklines
186186
{
187187
from: 'node_modules/sparklines/source/',
188188
to : 'plugins/sparklines'
189189
},
190+
// SweetAlert2
191+
{
192+
from: 'node_modules/sweetalert2/dist/',
193+
to : 'plugins/sweetalert2'
194+
},
195+
// Toastr
196+
{
197+
from: 'node_modules/toastr/build/',
198+
to : 'plugins/toastr'
199+
},
190200

191201

192202
// // Doc Assets

build/scss/AdminLTE.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
@import "plugins/icheck-bootstrap";
5959
@import "plugins/mapael";
6060
@import "plugins/jqvmap";
61+
@import "plugins/sweetalert2";
62+
@import "plugins/toastr";
6163
// Miscellaneous
6264
// ---------------------------------------------------
6365
@import "miscellaneous";
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Plugin: SweetAlert2
3+
* ---------------
4+
*/
5+
6+
// Icon Colors
7+
.swal2-icon {
8+
&.swal2-info {
9+
color: $info;
10+
border-color: ligthen($info, 20%);
11+
}
12+
&.swal2-warning {
13+
color: $warning;
14+
border-color: ligthen($warning, 20%);
15+
}
16+
&.swal2-error {
17+
color: $danger;
18+
border-color: ligthen($danger, 20%);
19+
}
20+
&.swal2-question {
21+
color: $secondary;
22+
border-color: ligthen($secondary, 20%);
23+
}
24+
&.swal2-success {
25+
color: $success;
26+
border-color: ligthen($success, 20%);
27+
28+
.swal2-success-ring {
29+
border-color: ligthen($success, 20%);
30+
}
31+
[class^="swal2-success-line"] {
32+
background-color: $success;
33+
}
34+
}
35+
36+
}

build/scss/plugins/_toastr.scss

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Plugin: Toastr
3+
* ---------------
4+
*/
5+
6+
// Background to FontAwesome Icons
7+
// #toast-container > .toast {
8+
// background-image: none !important;
9+
// }
10+
// #toast-container > .toast .toast-message:before {
11+
// font-family: 'Font Awesome 5 Free';
12+
// font-size: 24px;
13+
// font-weight: 900;
14+
// line-height: 18px;
15+
// float: left;
16+
// color: #FFF;
17+
// padding-right: 0.5em;
18+
// margin: auto 0.5em auto -1.5em;
19+
// }
20+
// #toast-container > .toast-warning .toast-message:before {
21+
// content: "\f06a";
22+
// }
23+
// #toast-container > .toast-error .toast-message:before {
24+
// content: "\f071";
25+
// }
26+
// #toast-container > .toast-info .toast-message:before {
27+
// content: "\f05a";
28+
// }
29+
// #toast-container > .toast-success .toast-message:before {
30+
// content: "\f058";
31+
// }
32+
33+
34+
// Background color
35+
.toast {
36+
background-color: $primary;
37+
}
38+
.toast-success {
39+
background-color: $success;
40+
}
41+
.toast-error {
42+
background-color: $danger;
43+
}
44+
.toast-info {
45+
background-color: $info;
46+
}
47+
.toast-warning {
48+
background-color: $warning;
49+
}

dist/css/adminlte.css

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/adminlte.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/adminlte.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/adminlte.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ <h3 class="dropdown-item-title">
330330
<li class="nav-item">
331331
<a href="pages/UI/modals.html" class="nav-link">
332332
<i class="far fa-circle nav-icon"></i>
333-
<p>Modals</p>
333+
<p>Modals & Alerts</p>
334334
</a>
335335
</li>
336336
</ul>

index2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ <h3 class="dropdown-item-title">
317317
<li class="nav-item">
318318
<a href="pages/UI/modals.html" class="nav-link">
319319
<i class="far fa-circle nav-icon"></i>
320-
<p>Modals</p>
320+
<p>Modals & Alerts</p>
321321
</a>
322322
</li>
323323
</ul>

0 commit comments

Comments
 (0)