Compare commits
522 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17aea0e4ef | ||
|
|
3b6279ac38 | ||
|
|
087891fdf7 | ||
|
|
82fb5d5f80 | ||
|
|
12c6c12907 | ||
|
|
2ee68002ab | ||
|
|
784eae413d | ||
|
|
0a70c3c89f | ||
|
|
5993872f8b | ||
|
|
ba3bf53809 | ||
|
|
a2df402653 | ||
|
|
4bbf746378 | ||
|
|
a33f74e503 | ||
|
|
6b48a268c5 | ||
|
|
5d10674dc5 | ||
|
|
dfdb0f0665 | ||
|
|
a182ecfa69 | ||
|
|
72ed5c36d4 | ||
|
|
82d6e78508 | ||
|
|
2997df7d63 | ||
|
|
1b6767c07a | ||
|
|
8e19ff2774 | ||
|
|
7966285c3a | ||
|
|
f0c5ef275b | ||
|
|
cb8dcbfd70 | ||
|
|
4f5da1f135 | ||
|
|
8cb546b453 | ||
|
|
0baf962241 | ||
|
|
5b590f4450 | ||
|
|
aab8ff9605 | ||
|
|
218376c64c | ||
|
|
e7d9ce7ec1 | ||
|
|
1f7db49d54 | ||
|
|
f163e3c43b | ||
|
|
fe3bce3398 | ||
|
|
290738e916 | ||
|
|
78a6403f2b | ||
|
|
45cd9f6645 | ||
|
|
865fc053fa | ||
|
|
113a477618 | ||
|
|
98962aeab7 | ||
|
|
fdaedac545 | ||
|
|
16b7b87af4 | ||
|
|
b9e718406b | ||
|
|
81b9131269 | ||
|
|
0c3f82bc58 | ||
|
|
96836c0f85 | ||
|
|
a772df102d | ||
|
|
15e92b4546 | ||
|
|
4b567affcd | ||
|
|
f0f59489f0 | ||
|
|
39f9e9e8a8 | ||
|
|
94867cd6b5 | ||
|
|
c29e2c57c9 | ||
|
|
0d6c6849c9 | ||
|
|
e2a579fd8d | ||
|
|
88b30801f3 | ||
|
|
e00dce43d9 | ||
|
|
c195816e4f | ||
|
|
3f3b153733 | ||
|
|
c58530fa90 | ||
|
|
e75ab5ea33 | ||
|
|
fc1e85f6e3 | ||
|
|
9b38c0d2d5 | ||
|
|
a68023d47d | ||
|
|
4ead90db62 | ||
|
|
5d434cb80f | ||
|
|
4bf3a3ec84 | ||
|
|
d01e1ac22f | ||
|
|
0ec522caa2 | ||
|
|
04d78d238b | ||
|
|
3311b2ca92 | ||
|
|
1b328391c6 | ||
|
|
37a83c86fa | ||
|
|
ee814eb531 | ||
|
|
377a00f0cb | ||
|
|
08151496fc | ||
|
|
89c19af33c | ||
|
|
1871f1d45d | ||
|
|
89dbc4c8de | ||
|
|
0c91826f12 | ||
|
|
fd734c977a | ||
|
|
e8744690ce | ||
|
|
e4bc0c45c9 | ||
|
|
6e26bc3485 | ||
|
|
3876bfdd29 | ||
|
|
24ce21a5c3 | ||
|
|
6eab10b0ba | ||
|
|
ba9cf441cb | ||
|
|
9236727125 | ||
|
|
e8476fa5a4 | ||
|
|
835d48fbb2 | ||
|
|
f7911fe077 | ||
|
|
f1e5aac2a2 | ||
|
|
171c4270c8 | ||
|
|
f59da2129d | ||
|
|
49f2621e6f | ||
|
|
8284cdc1da | ||
|
|
a0e1e81149 | ||
|
|
bd6b7a6d89 | ||
|
|
0f2ba49fae | ||
|
|
7c8f45ebcf | ||
|
|
432be77df0 | ||
|
|
41c9588cb9 | ||
|
|
99a1632731 | ||
|
|
32a760a47d | ||
|
|
06b7deef80 | ||
|
|
ee590b0645 | ||
|
|
209075b504 | ||
|
|
e257bffd0d | ||
|
|
fd07c05d2d | ||
|
|
1058af118a | ||
|
|
0cfe854c71 | ||
|
|
18aeaed0a6 | ||
|
|
b4b92be945 | ||
|
|
3a12dce448 | ||
|
|
5bf7e0346b | ||
|
|
563a91d15a | ||
|
|
349b501c27 | ||
|
|
973377e5df | ||
|
|
b810326bb8 | ||
|
|
a298bab35d | ||
|
|
2cb8bb72a7 | ||
|
|
b62d3b20df | ||
|
|
4ca888e427 | ||
|
|
ec6425d99d | ||
|
|
cc9766d607 | ||
|
|
443bb31418 | ||
|
|
80f96916e0 | ||
|
|
dc00689d30 | ||
|
|
12c4eb90e4 | ||
|
|
6feb219d8b | ||
|
|
45c694fdc4 | ||
|
|
0384c30f8e | ||
|
|
48743c7dee | ||
|
|
444b95ff48 | ||
|
|
e6965ff86a | ||
|
|
758936a97a | ||
|
|
2ad27011ed | ||
|
|
16b4d30d31 | ||
|
|
f7dbbe455e | ||
|
|
7679818fc4 | ||
|
|
7a29690ed3 | ||
|
|
e62d8e8562 | ||
|
|
72ad5e5154 | ||
|
|
0e5d88a095 | ||
|
|
f30cc78d5f | ||
|
|
c33f7a89c2 | ||
|
|
5d3f997288 | ||
|
|
cc40b1fc6b | ||
|
|
f9f1d5b3e2 | ||
|
|
fdf849bab9 | ||
|
|
611e50e969 | ||
|
|
c79452bb22 | ||
|
|
127a1568c7 | ||
|
|
45a51f51b2 | ||
|
|
8facf9fa18 | ||
|
|
346515b5a7 | ||
|
|
46dcb2a43e | ||
|
|
67c15d1389 | ||
|
|
16c24abc3b | ||
|
|
c9ba65fb63 | ||
|
|
731fef74f1 | ||
|
|
be42956a9d | ||
|
|
ac9e60684c | ||
|
|
949f91985f | ||
|
|
240836922c | ||
|
|
50d0035591 | ||
|
|
29537ba540 | ||
|
|
204758c7ff | ||
|
|
216841f578 | ||
|
|
caed140088 | ||
|
|
2df58a35cc | ||
|
|
07b516acc7 | ||
|
|
46927d3259 | ||
|
|
1fc14abea4 | ||
|
|
bafc8e67b8 | ||
|
|
16686958b6 | ||
|
|
2cf8ec813c | ||
|
|
aac8ca32df | ||
|
|
1666fa3a46 | ||
|
|
b48419b23b | ||
|
|
01e00cd43d | ||
|
|
c9603ef5aa | ||
|
|
42a184233e | ||
|
|
bc52b7276e | ||
|
|
702fc09199 | ||
|
|
7d42f7cceb | ||
|
|
738ee83fa8 | ||
|
|
cd6930dd0a | ||
|
|
5132611e0c | ||
|
|
e60dc163e3 | ||
|
|
d143077b0e | ||
|
|
903143a1e1 | ||
|
|
d114eabfe6 | ||
|
|
917e47ea58 | ||
|
|
ffbe945d88 | ||
|
|
3fffe8071f | ||
|
|
186faaaab4 | ||
|
|
d3a552db71 | ||
|
|
9c878bde3a | ||
|
|
c02ab3f0cd | ||
|
|
0aff809e7b | ||
|
|
a1d6efe454 | ||
|
|
89f47f3486 | ||
|
|
fdc400067c | ||
|
|
755df41324 | ||
|
|
9812f8002b | ||
|
|
5b24a7a47d | ||
|
|
45d4759ab0 | ||
|
|
798cf73e45 | ||
|
|
6823a175d2 | ||
|
|
2458663439 | ||
|
|
50a8489e10 | ||
|
|
8e48630aac | ||
|
|
eec4fd768e | ||
|
|
30746618d0 | ||
|
|
00b4aec60a | ||
|
|
5386be7a22 | ||
|
|
c886592bc5 | ||
|
|
57c2dd90c0 | ||
|
|
2545f04bf3 | ||
|
|
bce97813d6 | ||
|
|
fffb131305 | ||
|
|
6a7c491071 | ||
|
|
f94fa978f9 | ||
|
|
4101916d14 | ||
|
|
0a589f61b1 | ||
|
|
515edfa906 | ||
|
|
a8b291a943 | ||
|
|
3f203af04b | ||
|
|
5af47e0398 | ||
|
|
967fdeff31 | ||
|
|
29631025f3 | ||
|
|
3bbde9e7ec | ||
|
|
9dfc8da08a | ||
|
|
500a53be1c | ||
|
|
7f890fd6a2 | ||
|
|
819455f5ec | ||
|
|
e8043b6a25 | ||
|
|
cf2e1b85dc | ||
|
|
18ee4a5421 | ||
|
|
8daa7a8f86 | ||
|
|
06239d3d35 | ||
|
|
9cabb6468d | ||
|
|
b2233260d4 | ||
|
|
a4673ccd1b | ||
|
|
5ed7e97288 | ||
|
|
1f6c5a8181 | ||
|
|
7782373a12 | ||
|
|
6017b241bf | ||
|
|
edc51cc61b | ||
|
|
4bc6c1e8d6 | ||
|
|
ae670b200e | ||
|
|
a3dc358394 | ||
|
|
3cec30427d | ||
|
|
ea21c73666 | ||
|
|
39e9416f8c | ||
|
|
4a31f9986b | ||
|
|
6788552f17 | ||
|
|
695cfb9dd9 | ||
|
|
96946b4fd4 | ||
|
|
2f4a7e0e3e | ||
|
|
5a6a9142fe | ||
|
|
f1ce1758ce | ||
|
|
9f8149a44e | ||
|
|
74cccca8a1 | ||
|
|
e69ca82095 | ||
|
|
ab22cb62c7 | ||
|
|
5a1ae0c35e | ||
|
|
1fbda275a9 | ||
|
|
c4bc2c676c | ||
|
|
c1f87dfbde | ||
|
|
306dd00b98 | ||
|
|
38e74faf55 | ||
|
|
da1fa4eaab | ||
|
|
5ac5edf929 | ||
|
|
97d48edcdf | ||
|
|
15e2a311fa | ||
|
|
0e5d93fb4d | ||
|
|
b4b8d07feb | ||
|
|
29666de051 | ||
|
|
f091c5d510 | ||
|
|
695ca94fde | ||
|
|
e2e4bab687 | ||
|
|
e023103dcf | ||
|
|
312e083fc0 | ||
|
|
85d4b6be05 | ||
|
|
13c857679b | ||
|
|
5167252a55 | ||
|
|
ad11109b2f | ||
|
|
2eec6fe614 | ||
|
|
e848621b32 | ||
|
|
bbfcc0639e | ||
|
|
47e653bfbf | ||
|
|
dee12de0f7 | ||
|
|
2bc9d56f62 | ||
|
|
feb42f852e | ||
|
|
bbb22a16de | ||
|
|
86d5d9b038 | ||
|
|
d331b5f913 | ||
|
|
be58e635f6 | ||
|
|
04981d1770 | ||
|
|
2622f5ce56 | ||
|
|
ad03a31ffb | ||
|
|
be3631930d | ||
|
|
7853dcbd6e | ||
|
|
3478837aab | ||
|
|
cb85af826e | ||
|
|
e56939983d | ||
|
|
187a01a8ee | ||
|
|
3528b6c1f8 | ||
|
|
c8feb99dc2 | ||
|
|
0641a8442d | ||
|
|
023ede7ded | ||
|
|
092028bb49 | ||
|
|
cfe81189f5 | ||
|
|
82b6f062d3 | ||
|
|
0850fd8cb5 | ||
|
|
7a7bea0be9 | ||
|
|
569bddbf4d | ||
|
|
48685382d3 | ||
|
|
c4dae3e269 | ||
|
|
66f8bb1bbd | ||
|
|
1451820057 | ||
|
|
1af43bd9ea | ||
|
|
870df4406d | ||
|
|
a26f303c69 | ||
|
|
6dbfd55091 | ||
|
|
27ff009494 | ||
|
|
5ba59f1454 | ||
|
|
ae1c128e04 | ||
|
|
ffcbdb2029 | ||
|
|
ff66f38cee | ||
|
|
3d87e3c4cb | ||
|
|
24bc6165bc | ||
|
|
8350264bd2 | ||
|
|
bbfae627a2 | ||
|
|
8bc05ad6b0 | ||
|
|
7edd752b6b | ||
|
|
532707221b | ||
|
|
b37e2e1aea | ||
|
|
f1f0ff9776 | ||
|
|
ef0fbe1b50 | ||
|
|
b480c754a4 | ||
|
|
950e6e0dd1 | ||
|
|
7cc5f9b409 | ||
|
|
13ed4d6aca | ||
|
|
c000e77bde | ||
|
|
fa20b2def4 | ||
|
|
10e69015d9 | ||
|
|
44fcb13d47 | ||
|
|
d29b8c222c | ||
|
|
68d4417aad | ||
|
|
2a964189de | ||
|
|
a58c7da1f3 | ||
|
|
71a7ef8831 | ||
|
|
b5e0f8441b | ||
|
|
2eebf1514f | ||
|
|
1d1a3fd075 | ||
|
|
ca8f201737 | ||
|
|
4d2ad43e50 | ||
|
|
bb990bddc5 | ||
|
|
e35ab44603 | ||
|
|
9b79ce4fa3 | ||
|
|
c04f125f46 | ||
|
|
1877ee7431 | ||
|
|
45eae49936 | ||
|
|
8a9808575f | ||
|
|
671be53be1 | ||
|
|
d146750a87 | ||
|
|
cad5566d67 | ||
|
|
c2e77427ba | ||
|
|
da47f23145 | ||
|
|
414d14b2d2 | ||
|
|
6b8b69261f | ||
|
|
66268d5340 | ||
|
|
229600ba4c | ||
|
|
fbe0340eb0 | ||
|
|
4c50b36cbe | ||
|
|
161099e3bc | ||
|
|
cf7daa0159 | ||
|
|
c8b930b290 | ||
|
|
c26ef4e556 | ||
|
|
9f5c6bcfd8 | ||
|
|
d04b8e0eba | ||
|
|
a47b4e0fa0 | ||
|
|
a3604d0c62 | ||
|
|
ae470bec2e | ||
|
|
d5de8efb33 | ||
|
|
dc4054d216 | ||
|
|
eaf5cf449f | ||
|
|
e83e5b183d | ||
|
|
c6ef7cc311 | ||
|
|
e0e5693493 | ||
|
|
d20dd7c13a | ||
|
|
850dc37d6d | ||
|
|
35782815ef | ||
|
|
461a483144 | ||
|
|
26ce58fe28 | ||
|
|
bf2bafa96c | ||
|
|
e7e61f5fbe | ||
|
|
6ffe423c66 | ||
|
|
f1236a7025 | ||
|
|
4723bccf43 | ||
|
|
709c01d450 | ||
|
|
d67c3a0812 | ||
|
|
282ff7f6ce | ||
|
|
533a76538c | ||
|
|
a53971d122 | ||
|
|
459ac7775e | ||
|
|
87b8078d9b | ||
|
|
ae68ffc134 | ||
|
|
b9460ae8ea | ||
|
|
c6b1b4f586 | ||
|
|
67174b5c6b | ||
|
|
683f7bfccf | ||
|
|
ed6ae4dbb2 | ||
|
|
129475db78 | ||
|
|
b6e1529f3d | ||
|
|
0643791d8d | ||
|
|
bc3123cb08 | ||
|
|
14719bdd88 | ||
|
|
21641f7c7c | ||
|
|
76854a2634 | ||
|
|
6934469b38 | ||
|
|
09b89135c7 | ||
|
|
61a58cda9a | ||
|
|
cafc66ae7d | ||
|
|
662b51c9c0 | ||
|
|
b7efadbbca | ||
|
|
533a5917f5 | ||
|
|
9261d762b7 | ||
|
|
f70527b620 | ||
|
|
3551ac8afb | ||
|
|
9baa03ed63 | ||
|
|
27ba2f178e | ||
|
|
6934f4c541 | ||
|
|
3b69d63eb4 | ||
|
|
ede720e2b8 | ||
|
|
4ba150d509 | ||
|
|
187331143f | ||
|
|
ba8f8a8bbc | ||
|
|
a3ede49485 | ||
|
|
f9a40e3b46 | ||
|
|
b1b5ce3cb5 | ||
|
|
771a2d5530 | ||
|
|
4480db7f27 | ||
|
|
0238015f5e | ||
|
|
b1c99c8963 | ||
|
|
4d08d4b577 | ||
|
|
4b2ea27a82 | ||
|
|
ff41f98ea5 | ||
|
|
3f8802e647 | ||
|
|
8a66185901 | ||
|
|
63eb7d2e8d | ||
|
|
64874f04fe | ||
|
|
6800a0235d | ||
|
|
56ec9a3942 | ||
|
|
e73c7f15fa | ||
|
|
0e48302342 | ||
|
|
ce486267c4 | ||
|
|
1ea675c50d | ||
|
|
a4d297de9d | ||
|
|
ffadc3d261 | ||
|
|
1cbf929bcf | ||
|
|
3e236c9ff9 | ||
|
|
6fbbde4883 | ||
|
|
44fac0f65e | ||
|
|
8da329441e | ||
|
|
d68e264e42 | ||
|
|
6c06201930 | ||
|
|
dbe3e80778 | ||
|
|
add29e7168 | ||
|
|
05f23cb8c3 | ||
|
|
56c5319f98 | ||
|
|
7a47aad1e9 | ||
|
|
478cfc1743 | ||
|
|
2473021861 | ||
|
|
22436d9cd2 | ||
|
|
a67b6b8d10 | ||
|
|
72d348d34d | ||
|
|
71d32f8114 | ||
|
|
945fd0c43b | ||
|
|
ebe29fbd24 | ||
|
|
5613006ea7 | ||
|
|
6832bf6937 | ||
|
|
ad3cfdd498 | ||
|
|
0b1372dd0f | ||
|
|
857c3e7e69 | ||
|
|
a324025b67 | ||
|
|
42d4b59808 | ||
|
|
502887c71c | ||
|
|
17a48d70c7 | ||
|
|
d23a8d3d7f | ||
|
|
c27e8738cc | ||
|
|
259d67ef8e | ||
|
|
d327d76ae4 | ||
|
|
5988c4f9db | ||
|
|
29dc8e85fd | ||
|
|
d1f555e679 | ||
|
|
e24c4d01ff | ||
|
|
f5286d6229 | ||
|
|
7e86bd68cb | ||
|
|
2c7229674c | ||
|
|
78325db63a | ||
|
|
a2200f9bde | ||
|
|
6cb3427fb8 | ||
|
|
fb77bcb178 | ||
|
|
bfb74266b7 | ||
|
|
f80e848273 | ||
|
|
1406f85866 | ||
|
|
98c5a988ba | ||
|
|
59417e2a29 | ||
|
|
e100ad119f | ||
|
|
a038600a03 | ||
|
|
0a0b7b5978 | ||
|
|
4754f57ee8 | ||
|
|
f7aa7f36ba | ||
|
|
db50d38af4 | ||
|
|
d17b058db4 | ||
|
|
3348d3a414 |
14
.babelrc
14
.babelrc
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"loose": true,
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-external-helpers"
|
||||
]
|
||||
}
|
||||
13
.babelrc.js
Normal file
13
.babelrc.js
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
loose: true,
|
||||
bugfixes: true,
|
||||
modules: false,
|
||||
exclude: ['transform-typeof-symbol']
|
||||
}
|
||||
]
|
||||
]
|
||||
};
|
||||
@@ -1,13 +1,10 @@
|
||||
# https://github.com/browserslist/browserslist#readme
|
||||
|
||||
>= 1%
|
||||
last 1 major version
|
||||
>= 0.2%
|
||||
last 2 major versions
|
||||
not dead
|
||||
Chrome >= 45
|
||||
Firefox >= 38
|
||||
Edge >= 12
|
||||
Firefox ESR
|
||||
Edge >= 16
|
||||
Explorer >= 10
|
||||
iOS >= 9
|
||||
Safari >= 9
|
||||
Android >= 4.4
|
||||
Opera >= 30
|
||||
|
||||
60
.bundlewatch.config.json
Normal file
60
.bundlewatch.config.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"files": [
|
||||
{
|
||||
"path": "./dist/css/adminlte.css",
|
||||
"maxSize": "82 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/adminlte.min.css",
|
||||
"maxSize": "77.8 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.components.css",
|
||||
"maxSize": "16 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.components.min.css",
|
||||
"maxSize": "15.4 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.core.css",
|
||||
"maxSize": "47 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.core.min.css",
|
||||
"maxSize": "44 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.extra-components.css",
|
||||
"maxSize": "4 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.extra-components.min.css",
|
||||
"maxSize": "4 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.pages.css",
|
||||
"maxSize": "3 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.pages.min.css",
|
||||
"maxSize": "3 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.plugins.css",
|
||||
"maxSize": "17 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.plugins.min.css",
|
||||
"maxSize": "16.6 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/adminlte.js",
|
||||
"maxSize": "15 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/adminlte.min.js",
|
||||
"maxSize": "10.5 kB"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
**/*.min.js
|
||||
**/plugins/*
|
||||
**/dist/*
|
||||
**/build/npm
|
||||
ad.js
|
||||
**/plugins/
|
||||
/dist/js/adminlte.js
|
||||
/docs/
|
||||
/docs_html/
|
||||
|
||||
300
.eslintrc
300
.eslintrc
@@ -1,300 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"amd": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"plugins": [
|
||||
"compat"
|
||||
],
|
||||
"globals": {
|
||||
"jQuery": true
|
||||
},
|
||||
"rules": {
|
||||
// Possible Errors
|
||||
"no-await-in-loop": "error",
|
||||
"no-extra-parens": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"compat/compat": "error",
|
||||
"valid-jsdoc": "error",
|
||||
// Best Practices
|
||||
"accessor-pairs": "error",
|
||||
"array-callback-return": "error",
|
||||
"block-scoped-var": "error",
|
||||
"class-methods-use-this": "off",
|
||||
"complexity": "error",
|
||||
"consistent-return": "error",
|
||||
"curly": "error",
|
||||
"default-case": "error",
|
||||
"dot-location": [
|
||||
"error",
|
||||
"property"
|
||||
],
|
||||
"dot-notation": "error",
|
||||
"eqeqeq": "error",
|
||||
"guard-for-in": "error",
|
||||
"no-alert": "error",
|
||||
"no-caller": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": [
|
||||
"error",
|
||||
{
|
||||
"ignore": [
|
||||
-1,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"ignoreArrayIndexes": true
|
||||
}
|
||||
],
|
||||
"no-multi-spaces": [
|
||||
"error",
|
||||
{
|
||||
"ignoreEOLComments": true,
|
||||
"exceptions": {
|
||||
"AssignmentExpression": true,
|
||||
"ArrowFunctionExpression": true,
|
||||
"CallExpression": true,
|
||||
"VariableDeclarator": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"no-multi-str": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-proto": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "off",
|
||||
"no-with": "error",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"vars-on-top": "error",
|
||||
"wrap-iife": "error",
|
||||
"yoda": "error",
|
||||
// Strict Mode
|
||||
"strict": "error",
|
||||
// Variables
|
||||
"init-declarations": "off",
|
||||
"no-catch-shadow": "error",
|
||||
"no-label-var": "error",
|
||||
"no-restricted-globals": "error",
|
||||
"no-shadow": "off",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "error",
|
||||
"no-use-before-define": "off",
|
||||
// Node.js and CommonJS
|
||||
"callback-return": "off",
|
||||
"global-require": "error",
|
||||
"handle-callback-err": "error",
|
||||
"no-mixed-requires": "error",
|
||||
"no-new-require": "error",
|
||||
"no-path-concat": "error",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-sync": "error",
|
||||
// Stylistic Issues
|
||||
"array-bracket-spacing": "error",
|
||||
"block-spacing": "error",
|
||||
"brace-style": "error",
|
||||
"camelcase": "error",
|
||||
"capitalized-comments": "off",
|
||||
"comma-dangle": "error",
|
||||
"comma-spacing": "error",
|
||||
"comma-style": "error",
|
||||
"computed-property-spacing": "error",
|
||||
"consistent-this": "error",
|
||||
"eol-last": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": "off",
|
||||
"func-style": [
|
||||
"error",
|
||||
"declaration"
|
||||
],
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "off",
|
||||
"keyword-spacing": "error",
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"line-comment-position": "off",
|
||||
"lines-around-comment": "off",
|
||||
"lines-around-directive": "error",
|
||||
"max-depth": [
|
||||
"error",
|
||||
10
|
||||
],
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "error",
|
||||
"multiline-ternary": "off",
|
||||
"new-cap": [
|
||||
"error",
|
||||
{
|
||||
"capIsNewExceptionPattern": "$.*"
|
||||
}
|
||||
],
|
||||
"newline-after-var": "off",
|
||||
"newline-per-chained-call": [
|
||||
"error",
|
||||
{
|
||||
"ignoreChainWithDepth": 5
|
||||
}
|
||||
],
|
||||
"new-parens": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-continue": "off",
|
||||
"no-inline-comments": "off",
|
||||
"no-lonely-if": "error",
|
||||
"no-mixed-operators": "off",
|
||||
"no-multi-assign": "error",
|
||||
"no-multiple-empty-lines": "error",
|
||||
"nonblock-statement-body-position": "error",
|
||||
"no-negated-condition": "off",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new-object": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-tabs": "error",
|
||||
"no-ternary": "off",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"object-curly-newline": [
|
||||
"error",
|
||||
{
|
||||
"minProperties": 1
|
||||
}
|
||||
],
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"object-property-newline": "error",
|
||||
"one-var": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"one-var-declaration-per-line": "error",
|
||||
"operator-assignment": "error",
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"padding-line-between-statements": "off",
|
||||
"quote-props": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"require-jsdoc": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"semi-spacing": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "error",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
{
|
||||
"anonymous": "always",
|
||||
"named": "never"
|
||||
}
|
||||
],
|
||||
"space-in-parens": "error",
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": "error",
|
||||
"wrap-regex": "off",
|
||||
// ECMAScript 6
|
||||
"arrow-body-style": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-parens": "error",
|
||||
"arrow-spacing": "error",
|
||||
"generator-star-spacing": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-const": "error",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"rest-spread-spacing": "error",
|
||||
"sort-imports": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"yield-star-spacing": "error"
|
||||
}
|
||||
}
|
||||
64
.eslintrc.json
Normal file
64
.eslintrc.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"plugin:compat/recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:unicorn/recommended",
|
||||
"xo/esnext",
|
||||
"xo/browser"
|
||||
],
|
||||
"env": {
|
||||
"jquery": true
|
||||
},
|
||||
"rules": {
|
||||
"capitalized-comments": "off",
|
||||
"eqeqeq": "off",
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
{
|
||||
"MemberExpression": "off",
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"multiline-ternary": [
|
||||
"error",
|
||||
"always-multiline"
|
||||
],
|
||||
"new-cap": [
|
||||
"error",
|
||||
{
|
||||
"properties": false
|
||||
}
|
||||
],
|
||||
"no-eq-null": "off",
|
||||
"no-negated-condition": "off",
|
||||
"no-console": "error",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"prefer-template": "error",
|
||||
"prefer-named-capture-group": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"unicorn/filename-case": "off",
|
||||
"unicorn/import-index": "off",
|
||||
"unicorn/no-fn-reference-in-iterator": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-unused-properties": "error",
|
||||
"unicorn/prefer-dataset": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
"unicorn/prefer-node-append": "off",
|
||||
"unicorn/prefer-node-remove": "off",
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-optional-catch-binding": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-set-has": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
}
|
||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Enforce Unix newlines
|
||||
* text=auto eol=lf
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: Bug report for AdminLTE v2.4.x
|
||||
about: Create a report to help us improve AdminLTE v2.4.x
|
||||
title: "[BUG]"
|
||||
labels: Bug, v2
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
- AdminLTE Version: [e.g. v2.4.18]
|
||||
- Operating System: [e.g. macOS Catalina]
|
||||
- Browser (Version): [e.g. Chrome (Latest)]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -2,7 +2,7 @@
|
||||
name: Bug report for AdminLTE v3.x
|
||||
about: Create a report to help us improve AdminLTE v3.x
|
||||
title: "[BUG]"
|
||||
labels: Bug, v3
|
||||
labels: type:bug, version:3.x
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
@@ -24,9 +24,9 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
- AdminLTE Version: [e.g. v3.0.0]
|
||||
- Operating System: [e.g. macOS Catalina]
|
||||
- Browser (Version): [e.g. Chrome (Latest)]
|
||||
- AdminLTE Version: [e.g. v3.0.0]
|
||||
- Operating System: [e.g. macOS Catalina]
|
||||
- Browser (Version): [e.g. Chrome (Latest)]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name: Feature request for AdminLTE v3.x
|
||||
about: Suggest an idea for this project
|
||||
title: "[FEATURE]"
|
||||
labels: Enhancement, v3
|
||||
labels: type:enhancement, version:3.x
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
18
.github/dependabot.yml
vendored
Normal file
18
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "03:00"
|
||||
open-pull-requests-limit: 10
|
||||
versioning-strategy: increase
|
||||
- package-ecosystem: bundler
|
||||
directory: "/docs/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "03:00"
|
||||
open-pull-requests-limit: 10
|
||||
versioning-strategy: increase
|
||||
63
.github/workflows/ci.yml
vendored
Normal file
63
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
env:
|
||||
CI: true
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- "10.x"
|
||||
- "12.x"
|
||||
- "14.x"
|
||||
os:
|
||||
- "ubuntu-latest"
|
||||
- "macos-latest"
|
||||
- "windows-latest"
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.node }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build files
|
||||
run: npm run compile
|
||||
|
||||
- name: Run bundlewatch
|
||||
run: npm run bundlewatch
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.node, '12')
|
||||
env:
|
||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||
78
.github/workflows/docs.yml
vendored
Normal file
78
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
RUBY: 2.6.x
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ env.RUBY }}
|
||||
|
||||
- name: Disable gem docs
|
||||
run: 'echo "gem: --no-document" > ~/.gemrc'
|
||||
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.node }}-
|
||||
|
||||
- name: Set up Ruby cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: docs/vendor/bundle
|
||||
key: ${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('docs/Gemfile') }}-${{ hashFiles('docs/Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('docs/Gemfile') }}-${{ hashFiles('docs/Gemfile.lock') }}
|
||||
${{ runner.os }}-ruby-v${{ env.RUBY }}-
|
||||
|
||||
- name: Set up Bundler
|
||||
run: gem install bundler -v "~> 1.17"
|
||||
|
||||
- run: ruby --version
|
||||
- run: gem --version
|
||||
- run: bundle --version
|
||||
- run: java -version
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install bundler dependencies
|
||||
run: bundle install --gemfile docs/Gemfile --deployment --jobs=4 --retry=3 --clean
|
||||
|
||||
- name: Build docs
|
||||
run: npm run docs-compile
|
||||
|
||||
- name: Run HTML validator
|
||||
run: npm run docs-lint
|
||||
41
.github/workflows/lint.yml
vendored
Normal file
41
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.node }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run lint
|
||||
run: npm run lint
|
||||
61
.gitignore
vendored
61
.gitignore
vendored
@@ -1,38 +1,71 @@
|
||||
// System / Log files
|
||||
# System / Log files
|
||||
*.DS_Store
|
||||
*.log
|
||||
|
||||
// Archives
|
||||
# Archives
|
||||
*.zip
|
||||
|
||||
// Sass Cache
|
||||
# Sass Cache
|
||||
.sass-cache
|
||||
|
||||
// Project files
|
||||
# Project files
|
||||
.idea
|
||||
nbproject
|
||||
nbproject/private
|
||||
.vscode/
|
||||
.vs/
|
||||
|
||||
// Node / Bower
|
||||
# Node / Bower
|
||||
node_modules/
|
||||
bower_components/
|
||||
|
||||
// Plugins
|
||||
/plugins/*/*.md
|
||||
/plugins/*/*.html
|
||||
/plugins/*/package.json
|
||||
# Plugins
|
||||
/plugins/**/*.html
|
||||
/plugins/**/*.less
|
||||
/plugins/**/*.md
|
||||
/plugins/**/*.scss
|
||||
/plugins/**/*.ts
|
||||
/plugins/**/bower.json
|
||||
/plugins/**/package.json
|
||||
/plugins/**/webpack.config.js
|
||||
/plugins/**/demo/
|
||||
/plugins/**/demos/
|
||||
/plugins/**/dev/
|
||||
/plugins/**/example/
|
||||
/plugins/**/examples/
|
||||
/plugins/**/less/
|
||||
/plugins/**/test/
|
||||
/plugins/**/tests/
|
||||
/plugins/daterangepicker/website/
|
||||
/plugins/daterangepicker/drp.png
|
||||
/plugins/daterangepicker/moment.min.js
|
||||
/plugins/daterangepicker/package.js
|
||||
/plugins/daterangepicker/website.css
|
||||
/plugins/daterangepicker/website.js
|
||||
/plugins/jquery-ui/AUTHORS.txt
|
||||
/plugins/jquery-ui/external/jquery/jquery.js
|
||||
/plugins/inputmask/bindings/
|
||||
/plugins/flot/plugins/jquery*.js
|
||||
!/plugins/flot/plugins/jquery.flot.*.js
|
||||
!/plugins/**/LICENSE.md
|
||||
!/plugins/**/LICENSE.txt
|
||||
!/plugins/**/license.md
|
||||
!/plugins/**/license.txt
|
||||
!/plugins/**/LICENSE
|
||||
!/plugins/**/license
|
||||
!/plugins/**/COPYING
|
||||
|
||||
|
||||
// Docs
|
||||
Gemfile.lock
|
||||
docs/_site
|
||||
docs_html/
|
||||
# Docs
|
||||
/docs/_site/
|
||||
/docs/vendor/
|
||||
/docs/.bundle/
|
||||
/docs_html/
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
|
||||
// ETC
|
||||
# ETC
|
||||
TODO
|
||||
test.html
|
||||
ad.js
|
||||
/.cache/
|
||||
|
||||
6
.gitpod.yml
Normal file
6
.gitpod.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
tasks:
|
||||
- init: npm install
|
||||
command: npm run dev
|
||||
ports:
|
||||
- port: 3000
|
||||
onOpen: open-preview
|
||||
15
.lgtm.yml
Normal file
15
.lgtm.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
# https://lgtm.com/help/lgtm/customizing-file-classification
|
||||
path_classifiers:
|
||||
plugins:
|
||||
- plugins/
|
||||
|
||||
extraction:
|
||||
javascript:
|
||||
# https://lgtm.com/help/lgtm/javascript-extraction#customizing-index
|
||||
# The `index` step extracts information from the files in the codebase.
|
||||
index:
|
||||
# Specify a list of files and folders to exclude from extraction.
|
||||
exclude:
|
||||
- bower_components/
|
||||
- docs/assets/js/plugins/
|
||||
- plugins/
|
||||
@@ -1 +1,6 @@
|
||||
!/docs_html/
|
||||
/docs/
|
||||
/docs_html/
|
||||
/plugins/*
|
||||
!/plugins/flot-old/
|
||||
/.github/
|
||||
/.lgtm.yml
|
||||
|
||||
4
.stylelintignore
Normal file
4
.stylelintignore
Normal file
@@ -0,0 +1,4 @@
|
||||
**/*.min.css
|
||||
**/dist/
|
||||
**/docs_html/
|
||||
**/plugins/
|
||||
16
.stylelintrc
Normal file
16
.stylelintrc
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-config-twbs-bootstrap/scss"
|
||||
],
|
||||
"rules": {
|
||||
"declaration-no-important": null,
|
||||
"order/properties-order": null,
|
||||
"selector-max-class": null,
|
||||
"selector-max-combinators": null,
|
||||
"selector-max-compound-selectors": null,
|
||||
"selector-max-id": null,
|
||||
"selector-max-specificity": null,
|
||||
"selector-max-type": null,
|
||||
"selector-no-qualifying-type": null
|
||||
}
|
||||
}
|
||||
21
.travis.yml
21
.travis.yml
@@ -1,21 +0,0 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 8
|
||||
- 10
|
||||
- 11
|
||||
- 12
|
||||
|
||||
env:
|
||||
- INSTALL=yarn
|
||||
- INSTALL=npm
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
install:
|
||||
- if [ "yarn" == $INSTALL ]; then yarn install; fi
|
||||
- if [ "npm" == $INSTALL ]; then npm install; fi
|
||||
|
||||
script:
|
||||
- echo 'Tests must be configured'
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2018 almasaeed2010
|
||||
Copyright (c) 2014-2020 ColorlibHQ
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
166
README.md
166
README.md
@@ -1,104 +1,130 @@
|
||||
Introduction
|
||||
============
|
||||
# Introduction
|
||||
|
||||
**AdminLTE** is a fully responsive administration template. Based on **[Bootstrap 4](https://getbootstrap.com)** framework.
|
||||
[](https://www.npmjs.com/package/admin-lte)
|
||||
[](https://packagist.org/packages/almasaeed2010/adminlte)
|
||||
[](https://cdnjs.com/libraries/admin-lte)
|
||||
[](https://gitpod.io/from-referrer/)
|
||||
|
||||
**AdminLTE** is a fully responsive administration template. Based on **[Bootstrap 4.5](https://getbootstrap.com/)** framework and also the JS/jQuery plugin.
|
||||
Highly customizable and easy to use. Fits many screen resolutions from small mobile devices to large desktops.
|
||||
|
||||
**Preview on [AdminLTE.io](https://adminlte.io/themes/v3)**
|
||||
|
||||
Looking for Premium Templates?
|
||||
------------------------------
|
||||
AdminLTE.io just opened a new premium templates page. Hand picked to insure the best quality and the most affordable
|
||||
prices. Visit https://adminlte.io/premium for more information.
|
||||
## Looking for Premium Templates?
|
||||
|
||||
AdminLTE.io just opened a new premium templates page. Hand picked to ensure the best quality and the most affordable
|
||||
prices. Visit <https://adminlte.io/premium> for more information.
|
||||
|
||||

|
||||
|
||||
**AdminLTE** has been carefully coded with clear comments in all of its JS, SCSS and HTML files.
|
||||
SCSS has been used to increase code customizability.
|
||||
|
||||
Installation
|
||||
------------
|
||||
## Installation
|
||||
|
||||
There are multiple ways to install AdminLTE.
|
||||
|
||||
#### Download:
|
||||
### Download & Changelog:
|
||||
|
||||
Download from [Github releases](https://github.com/ColorlibHQ/AdminLTE/releases).
|
||||
Download from GitHub latest release [AdminLTE 3](https://github.com/ColorlibHQ/AdminLTE/latest).
|
||||
Visit the [releases](https://github.com/ColorlibHQ/AdminLTE/releases) page to view the changelog.
|
||||
Legacy Releases are [AdminLTE 2](https://github.com/ColorlibHQ/AdminLTE/releases/tag/v2.4.18) / [AdminLTE 1](https://github.com/ColorlibHQ/AdminLTE/releases/tag/1.3.1).
|
||||
|
||||
#### Using The Command Line:
|
||||
### Using The Command Line:
|
||||
|
||||
__Via NPM__
|
||||
```bash
|
||||
npm install admin-lte@^3.0 --save
|
||||
```
|
||||
_**Important Note**: To install it via npm/Yarn, you need at least Node.js 10 or higher._
|
||||
|
||||
__Via Yarn__
|
||||
```bash
|
||||
yarn add admin-lte@^3.0
|
||||
```
|
||||
- **Via npm**
|
||||
|
||||
__Via Composer__
|
||||
```bash
|
||||
composer require "almasaeed2010/adminlte=~3.0"
|
||||
```
|
||||
```bash
|
||||
npm install admin-lte@^3.0 --save
|
||||
```
|
||||
|
||||
__Via Git__
|
||||
- Clone to your machine
|
||||
```
|
||||
git clone https://github.com/ColorlibHQ/AdminLTE.git
|
||||
```
|
||||
- **Via Yarn**
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
Visit the [online documentation](https://adminlte.io/docs/3.0/) for the most
|
||||
```bash
|
||||
yarn add admin-lte@^3.0
|
||||
```
|
||||
|
||||
- **Via Composer**
|
||||
|
||||
```bash
|
||||
composer require "almasaeed2010/adminlte=~3.0"
|
||||
```
|
||||
|
||||
- **Via Git**
|
||||
|
||||
Clone to your machine
|
||||
|
||||
```bash
|
||||
git clone https://github.com/ColorlibHQ/AdminLTE.git
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Visit the [online documentation](https://adminlte.io/docs/3.1/) for the most
|
||||
updated guide. Information will be added on a weekly basis.
|
||||
|
||||
Browser Support
|
||||
---------------
|
||||
- IE 10+
|
||||
- Firefox (latest)
|
||||
- Chrome (latest)
|
||||
- Safari (latest)
|
||||
- Opera (latest)
|
||||
## Browsers support
|
||||
|
||||
Contribution
|
||||
------------
|
||||
Contribution are always **welcome and recommended**! Here is how:
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>iOS Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/samsung-internet/samsung-internet_48x48.png" alt="Samsung" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Samsung | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/vivaldi/vivaldi_48x48.png" alt="Vivaldi" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Vivaldi | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Electron |
|
||||
| --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- |
|
||||
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions
|
||||
|
||||
- Fork the repository ([here is the guide](https://help.github.com/articles/fork-a-repo/)).
|
||||
- Clone to your machine ```git clone https://github.com/YOUR_USERNAME/AdminLTE.git```
|
||||
- Create a new branch
|
||||
- Make your changes
|
||||
- Create a pull request
|
||||
## How to Contribute
|
||||
|
||||
#### Contribution Requirements:
|
||||
Contributions are always **welcome and recommended**! Here is how for beginner's: [Get started with open source click here](https://youtu.be/GbqSvJs-6W4)
|
||||
|
||||
- When you contribute, you agree to give a non-exclusive license to AdminLTE.io to use that contribution in any context as we (AdminLTE.io) see appropriate.
|
||||
- If you use content provided by another party, it must be appropriately licensed using an [open source](http://opensource.org/licenses) license.
|
||||
- Contributions are only accepted through Github pull requests.
|
||||
- Finally, contributed code must work in all supported browsers (see above for browser support).
|
||||
1. Contribution Requirements :
|
||||
* When you contribute, you agree to give a non-exclusive license to AdminLTE.io to use that contribution in any context as we (AdminLTE.io) see appropriate.
|
||||
* If you use content provided by another party, it must be appropriately licensed using an [open source](https://opensource.org/licenses) license.
|
||||
* Contributions are only accepted through GitHub pull requests.
|
||||
* Finally, contributed code must work in all supported browsers (see above for browser support).
|
||||
2. Installation :
|
||||
* Fork the repository ([here is the guide](https://help.github.com/articles/fork-a-repo/)).
|
||||
* Clone to your machine
|
||||
|
||||
License
|
||||
-------
|
||||
AdminLTE is an open source project by [AdminLTE.io](https://adminlte.io) that is licensed under [MIT](http://opensource.org/licenses/MIT). AdminLTE.io
|
||||
reserves the right to change the license of future releases.
|
||||
```bash
|
||||
git clone https://github.com/YOUR_USERNAME/AdminLTE.git
|
||||
```
|
||||
* Create a new branch
|
||||
3. Compile dist files (Development) :
|
||||
* To compile the dist files you need Node.js 10 or higher/npm (node package manager)
|
||||
* Delete ./package-lock.json file
|
||||
* `npm install` (install npm deps)
|
||||
* `npm run dev` (developer mode, autocompile with browsersync support for live demo)
|
||||
* Make your changes only in ./buid Folder OR package.json OR ./dist/js/demo.js OR in any html files which nessary to contribute
|
||||
* Do not changes in ./dist/css/ AND ./dist/js/ Because its compiled files
|
||||
* `npm run production` (compile css/js files and test every pages are perfectly working fine, before creating pull request)
|
||||
4. Create a pull request
|
||||
|
||||
Legacy Releases
|
||||
---------------
|
||||
- [AdminLTE 2](https://github.com/ColorlibHQ/AdminLTE/releases/tag/v2.4.18)
|
||||
- [AdminLTE 1](https://github.com/ColorlibHQ/AdminLTE/releases/tag/1.3.1)
|
||||
### Online one-click setup for contributing
|
||||
|
||||
Change log
|
||||
----------
|
||||
Visit the [releases](https://github.com/ColorlibHQ/AdminLTE/releases) page to view the changelog
|
||||
You can use Gitpod(an online IDE which is free for Open Source) for working on issues or making Prs. With a single click it will launch a workspace and automatically:
|
||||
|
||||
Image Credits
|
||||
-------------
|
||||
[Pixeden](http://www.pixeden.com/psd-web-elements/flat-responsive-showcase-psd)
|
||||
- clone the `AdminLTE` repo.
|
||||
- install the dependencies.
|
||||
- run `yarn dev` to start the server.
|
||||
|
||||
[Graphicsfuel](http://www.graphicsfuel.com/2013/02/13-high-resolution-blur-backgrounds/)
|
||||
[](https://gitpod.io/from-referrer/)
|
||||
|
||||
[Pickaface](http://pickaface.net/)
|
||||
### Compile dist files
|
||||
|
||||
[Unsplash](https://unsplash.com/)
|
||||
To compile the dist files you need Node.js/npm, clone/download the repo then:
|
||||
|
||||
[Uifaces](http://uifaces.com/)
|
||||
1. `npm install` (install npm deps)
|
||||
2. _Optional:_ `npm run dev` (developer mode, autocompile with browsersync support for live demo)
|
||||
3. `npm run production` (compile css/js files)
|
||||
|
||||
## License
|
||||
|
||||
AdminLTE is an open source project by [AdminLTE.io](https://adminlte.io) that is licensed under [MIT](https://opensource.org/licenses/MIT).
|
||||
AdminLTE.io reserves the right to change the license of future releases.
|
||||
|
||||
## Image Credits
|
||||
|
||||
- [Pixeden](http://www.pixeden.com/psd-web-elements/flat-responsive-showcase-psd)
|
||||
- [Graphicsfuel](https://www.graphicsfuel.com/2013/02/13-high-resolution-blur-backgrounds/)
|
||||
- [Pickaface](https://pickaface.net/)
|
||||
- [Unsplash](https://unsplash.com/)
|
||||
- [Uifaces](http://uifaces.com/)
|
||||
|
||||
14
build/config/.eslintrc.json
Normal file
14
build/config/.eslintrc.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "script"
|
||||
},
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"strict": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = (ctx) => ({
|
||||
map: ctx.file.dirname.includes('examples') ? false : {
|
||||
module.exports = () => ({
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
|
||||
@@ -1,29 +1,32 @@
|
||||
import babel from 'rollup-plugin-babel'
|
||||
'use strict'
|
||||
|
||||
const pkg = require('../../package')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
|
||||
const pkg = require('../../package')
|
||||
const year = new Date().getFullYear()
|
||||
|
||||
const globals = {
|
||||
jquery: 'jQuery'
|
||||
}
|
||||
|
||||
export default {
|
||||
input : 'build/js/AdminLTE.js',
|
||||
output : {
|
||||
banner: `/*!
|
||||
const banner = `/*!
|
||||
* AdminLTE v${pkg.version} (${pkg.homepage})
|
||||
* Copyright 2014-${year} ${pkg.author}
|
||||
* Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
|
||||
*/`,
|
||||
file : 'dist/js/adminlte.js',
|
||||
*/`
|
||||
|
||||
module.exports = {
|
||||
input: 'build/js/AdminLTE.js',
|
||||
output: {
|
||||
banner,
|
||||
file: 'dist/js/adminlte.js',
|
||||
format: 'umd',
|
||||
globals,
|
||||
name : 'adminlte'
|
||||
globals: {
|
||||
jquery: 'jQuery'
|
||||
},
|
||||
name: 'adminlte'
|
||||
},
|
||||
external: ['jquery'],
|
||||
plugins: [
|
||||
babel({
|
||||
exclude: 'node_modules/**',
|
||||
externalHelpers: true
|
||||
// Include the helpers in the bundle, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
})
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"esnext": true,
|
||||
"verbose": true,
|
||||
"disallowEmptyBlocks": true,
|
||||
"disallowKeywords": ["with"],
|
||||
"disallowMixedSpacesAndTabs": true,
|
||||
"disallowMultipleLineStrings": true,
|
||||
"disallowMultipleVarDecl": true,
|
||||
"disallowQuotedKeysInObjects": "allButReserved",
|
||||
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
|
||||
"disallowSpaceBeforeBinaryOperators": [","],
|
||||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
||||
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
|
||||
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
|
||||
"disallowSpacesInsideArrayBrackets": true,
|
||||
"disallowSpacesInsideParentheses": true,
|
||||
"disallowTrailingComma": true,
|
||||
"disallowTrailingWhitespace": true,
|
||||
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
||||
"requireCapitalizedConstructors": true,
|
||||
"requireCommaBeforeLineBreak": true,
|
||||
"requireDollarBeforejQueryAssignment": true,
|
||||
"requireDotNotation": true,
|
||||
"requireLineFeedAtFileEnd": true,
|
||||
"requirePaddingNewLinesAfterUseStrict": true,
|
||||
"requirePaddingNewLinesBeforeExport": true,
|
||||
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
||||
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
|
||||
"requireSpaceAfterLineComment": true,
|
||||
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
||||
"requireSpaceBetweenArguments": true,
|
||||
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true, "allExcept": ["shorthand"] },
|
||||
"requireSpacesInConditionalExpression": true,
|
||||
"requireSpacesInForStatement": true,
|
||||
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInsideObjectBrackets": "allButNested",
|
||||
"validateAlignedFunctionParameters": true,
|
||||
"validateIndentation": 2,
|
||||
"validateLineBreaks": "LF",
|
||||
"validateNewlineAfterArrayElements": true,
|
||||
"validateQuoteMarks": "'"
|
||||
}
|
||||
@@ -1,23 +1,31 @@
|
||||
import CardRefresh from './CardRefresh'
|
||||
import CardWidget from './CardWidget'
|
||||
import ControlSidebar from './ControlSidebar'
|
||||
import DirectChat from './DirectChat'
|
||||
import Dropdown from './Dropdown'
|
||||
import ExpandableTable from './ExpandableTable'
|
||||
import Fullscreen from './Fullscreen'
|
||||
import IFrame from './IFrame'
|
||||
import Layout from './Layout'
|
||||
import PushMenu from './PushMenu'
|
||||
import Treeview from './Treeview'
|
||||
import DirectChat from './DirectChat'
|
||||
import TodoList from './TodoList'
|
||||
import CardWidget from './CardWidget'
|
||||
import CardRefresh from './CardRefresh'
|
||||
import Dropdown from './Dropdown'
|
||||
import SidebarSearch from './SidebarSearch'
|
||||
import Toasts from './Toasts'
|
||||
import TodoList from './TodoList'
|
||||
import Treeview from './Treeview'
|
||||
|
||||
export {
|
||||
CardRefresh,
|
||||
CardWidget,
|
||||
ControlSidebar,
|
||||
DirectChat,
|
||||
Dropdown,
|
||||
ExpandableTable,
|
||||
Fullscreen,
|
||||
IFrame,
|
||||
Layout,
|
||||
PushMenu,
|
||||
Treeview,
|
||||
DirectChat,
|
||||
SidebarSearch,
|
||||
Toasts,
|
||||
TodoList,
|
||||
CardWidget,
|
||||
CardRefresh,
|
||||
Dropdown,
|
||||
Toasts
|
||||
Treeview
|
||||
}
|
||||
|
||||
@@ -5,160 +5,150 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const CardRefresh = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'CardRefresh'
|
||||
const DATA_KEY = 'lte.cardrefresh'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
LOADED: `loaded${EVENT_KEY}`,
|
||||
OVERLAY_ADDED: `overlay.added${EVENT_KEY}`,
|
||||
OVERLAY_REMOVED: `overlay.removed${EVENT_KEY}`,
|
||||
const NAME = 'CardRefresh'
|
||||
const DATA_KEY = 'lte.cardrefresh'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_LOADED = `loaded${EVENT_KEY}`
|
||||
const EVENT_OVERLAY_ADDED = `overlay.added${EVENT_KEY}`
|
||||
const EVENT_OVERLAY_REMOVED = `overlay.removed${EVENT_KEY}`
|
||||
|
||||
const CLASS_NAME_CARD = 'card'
|
||||
|
||||
const SELECTOR_CARD = `.${CLASS_NAME_CARD}`
|
||||
const SELECTOR_DATA_REFRESH = '[data-card-widget="card-refresh"]'
|
||||
|
||||
const Default = {
|
||||
source: '',
|
||||
sourceSelector: '',
|
||||
params: {},
|
||||
trigger: SELECTOR_DATA_REFRESH,
|
||||
content: '.card-body',
|
||||
loadInContent: true,
|
||||
loadOnInit: true,
|
||||
responseType: '',
|
||||
overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
|
||||
onLoadStart() {
|
||||
},
|
||||
onLoadDone(response) {
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
CARD: 'card',
|
||||
}
|
||||
class CardRefresh {
|
||||
constructor(element, settings) {
|
||||
this._element = element
|
||||
this._parent = element.parents(SELECTOR_CARD).first()
|
||||
this._settings = $.extend({}, Default, settings)
|
||||
this._overlay = $(this._settings.overlayTemplate)
|
||||
|
||||
const Selector = {
|
||||
CARD: `.${ClassName.CARD}`,
|
||||
DATA_REFRESH: '[data-card-widget="card-refresh"]',
|
||||
}
|
||||
if (element.hasClass(CLASS_NAME_CARD)) {
|
||||
this._parent = element
|
||||
}
|
||||
|
||||
const Default = {
|
||||
source: '',
|
||||
sourceSelector: '',
|
||||
params: {},
|
||||
trigger: Selector.DATA_REFRESH,
|
||||
content: '.card-body',
|
||||
loadInContent: true,
|
||||
loadOnInit: true,
|
||||
responseType: '',
|
||||
overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
|
||||
onLoadStart: function () {
|
||||
},
|
||||
onLoadDone: function (response) {
|
||||
return response;
|
||||
if (this._settings.source === '') {
|
||||
throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.')
|
||||
}
|
||||
}
|
||||
|
||||
class CardRefresh {
|
||||
constructor(element, settings) {
|
||||
this._element = element
|
||||
this._parent = element.parents(Selector.CARD).first()
|
||||
this._settings = $.extend({}, Default, settings)
|
||||
this._overlay = $(this._settings.overlayTemplate)
|
||||
load() {
|
||||
this._addOverlay()
|
||||
this._settings.onLoadStart.call($(this))
|
||||
|
||||
if (element.hasClass(ClassName.CARD)) {
|
||||
this._parent = element
|
||||
}
|
||||
|
||||
if (this._settings.source === '') {
|
||||
throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.');
|
||||
}
|
||||
|
||||
this._init();
|
||||
|
||||
if (this._settings.loadOnInit) {
|
||||
this.load();
|
||||
}
|
||||
}
|
||||
|
||||
load() {
|
||||
this._addOverlay()
|
||||
this._settings.onLoadStart.call($(this))
|
||||
|
||||
$.get(this._settings.source, this._settings.params, function (response) {
|
||||
if (this._settings.loadInContent) {
|
||||
if (this._settings.sourceSelector != '') {
|
||||
response = $(response).find(this._settings.sourceSelector).html()
|
||||
}
|
||||
|
||||
this._parent.find(this._settings.content).html(response)
|
||||
$.get(this._settings.source, this._settings.params, response => {
|
||||
if (this._settings.loadInContent) {
|
||||
if (this._settings.sourceSelector !== '') {
|
||||
response = $(response).find(this._settings.sourceSelector).html()
|
||||
}
|
||||
|
||||
this._settings.onLoadDone.call($(this), response)
|
||||
this._removeOverlay();
|
||||
}.bind(this), this._settings.responseType !== '' && this._settings.responseType)
|
||||
|
||||
const loadedEvent = $.Event(Event.LOADED)
|
||||
$(this._element).trigger(loadedEvent)
|
||||
}
|
||||
|
||||
_addOverlay() {
|
||||
this._parent.append(this._overlay)
|
||||
|
||||
const overlayAddedEvent = $.Event(Event.OVERLAY_ADDED)
|
||||
$(this._element).trigger(overlayAddedEvent)
|
||||
};
|
||||
|
||||
_removeOverlay() {
|
||||
this._parent.find(this._overlay).remove()
|
||||
|
||||
const overlayRemovedEvent = $.Event(Event.OVERLAY_REMOVED)
|
||||
$(this._element).trigger(overlayRemovedEvent)
|
||||
};
|
||||
|
||||
|
||||
// Private
|
||||
|
||||
_init(card) {
|
||||
$(this).find(this._settings.trigger).on('click', () => {
|
||||
this.load()
|
||||
})
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let options = $(this).data()
|
||||
|
||||
if (!data) {
|
||||
data = new CardRefresh($(this), options)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data: config)
|
||||
this._parent.find(this._settings.content).html(response)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && config.match(/load/)) {
|
||||
data[config]()
|
||||
} else if (typeof config === 'object') {
|
||||
data._init($(this))
|
||||
}
|
||||
this._settings.onLoadDone.call($(this), response)
|
||||
this._removeOverlay()
|
||||
}, this._settings.responseType !== '' && this._settings.responseType)
|
||||
|
||||
$(this._element).trigger($.Event(EVENT_LOADED))
|
||||
}
|
||||
|
||||
_addOverlay() {
|
||||
this._parent.append(this._overlay)
|
||||
$(this._element).trigger($.Event(EVENT_OVERLAY_ADDED))
|
||||
}
|
||||
|
||||
_removeOverlay() {
|
||||
this._parent.find(this._overlay).remove()
|
||||
$(this._element).trigger($.Event(EVENT_OVERLAY_REMOVED))
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
$(this).find(this._settings.trigger).on('click', () => {
|
||||
this.load()
|
||||
})
|
||||
|
||||
if (this._settings.loadOnInit) {
|
||||
this.load()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
// Static
|
||||
|
||||
$(document).on('click', Selector.DATA_REFRESH, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new CardRefresh($(this), _options)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data : config)
|
||||
}
|
||||
|
||||
CardRefresh._jQueryInterface.call($(this), 'load')
|
||||
if (typeof config === 'string' && config.match(/load/)) {
|
||||
data[config]()
|
||||
} else {
|
||||
data._init($(this))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_REFRESH, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
CardRefresh._jQueryInterface.call($(this), 'load')
|
||||
})
|
||||
|
||||
$(() => {
|
||||
$(SELECTOR_DATA_REFRESH).each(function () {
|
||||
CardRefresh._jQueryInterface.call($(this))
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = CardRefresh._jQueryInterface
|
||||
$.fn[NAME].Constructor = CardRefresh
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return CardRefresh._jQueryInterface
|
||||
}
|
||||
|
||||
return CardRefresh
|
||||
})(jQuery)
|
||||
$.fn[NAME] = CardRefresh._jQueryInterface
|
||||
$.fn[NAME].Constructor = CardRefresh
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return CardRefresh._jQueryInterface
|
||||
}
|
||||
|
||||
export default CardRefresh
|
||||
|
||||
@@ -5,245 +5,234 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const CardWidget = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'CardWidget'
|
||||
const DATA_KEY = 'lte.cardwidget'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
EXPANDED: `expanded${EVENT_KEY}`,
|
||||
COLLAPSED: `collapsed${EVENT_KEY}`,
|
||||
MAXIMIZED: `maximized${EVENT_KEY}`,
|
||||
MINIMIZED: `minimized${EVENT_KEY}`,
|
||||
REMOVED: `removed${EVENT_KEY}`
|
||||
const NAME = 'CardWidget'
|
||||
const DATA_KEY = 'lte.cardwidget'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_EXPANDED = `expanded${EVENT_KEY}`
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
const EVENT_MAXIMIZED = `maximized${EVENT_KEY}`
|
||||
const EVENT_MINIMIZED = `minimized${EVENT_KEY}`
|
||||
const EVENT_REMOVED = `removed${EVENT_KEY}`
|
||||
|
||||
const CLASS_NAME_CARD = 'card'
|
||||
const CLASS_NAME_COLLAPSED = 'collapsed-card'
|
||||
const CLASS_NAME_COLLAPSING = 'collapsing-card'
|
||||
const CLASS_NAME_EXPANDING = 'expanding-card'
|
||||
const CLASS_NAME_WAS_COLLAPSED = 'was-collapsed'
|
||||
const CLASS_NAME_MAXIMIZED = 'maximized-card'
|
||||
|
||||
const SELECTOR_DATA_REMOVE = '[data-card-widget="remove"]'
|
||||
const SELECTOR_DATA_COLLAPSE = '[data-card-widget="collapse"]'
|
||||
const SELECTOR_DATA_MAXIMIZE = '[data-card-widget="maximize"]'
|
||||
const SELECTOR_CARD = `.${CLASS_NAME_CARD}`
|
||||
const SELECTOR_CARD_HEADER = '.card-header'
|
||||
const SELECTOR_CARD_BODY = '.card-body'
|
||||
const SELECTOR_CARD_FOOTER = '.card-footer'
|
||||
|
||||
const Default = {
|
||||
animationSpeed: 'normal',
|
||||
collapseTrigger: SELECTOR_DATA_COLLAPSE,
|
||||
removeTrigger: SELECTOR_DATA_REMOVE,
|
||||
maximizeTrigger: SELECTOR_DATA_MAXIMIZE,
|
||||
collapseIcon: 'fa-minus',
|
||||
expandIcon: 'fa-plus',
|
||||
maximizeIcon: 'fa-expand',
|
||||
minimizeIcon: 'fa-compress'
|
||||
}
|
||||
|
||||
class CardWidget {
|
||||
constructor(element, settings) {
|
||||
this._element = element
|
||||
this._parent = element.parents(SELECTOR_CARD).first()
|
||||
|
||||
if (element.hasClass(CLASS_NAME_CARD)) {
|
||||
this._parent = element
|
||||
}
|
||||
|
||||
this._settings = $.extend({}, Default, settings)
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
CARD: 'card',
|
||||
COLLAPSED: 'collapsed-card',
|
||||
WAS_COLLAPSED: 'was-collapsed',
|
||||
MAXIMIZED: 'maximized-card',
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
DATA_REMOVE: '[data-card-widget="remove"]',
|
||||
DATA_COLLAPSE: '[data-card-widget="collapse"]',
|
||||
DATA_MAXIMIZE: '[data-card-widget="maximize"]',
|
||||
CARD: `.${ClassName.CARD}`,
|
||||
CARD_HEADER: '.card-header',
|
||||
CARD_BODY: '.card-body',
|
||||
CARD_FOOTER: '.card-footer',
|
||||
COLLAPSED: `.${ClassName.COLLAPSED}`,
|
||||
}
|
||||
|
||||
const Default = {
|
||||
animationSpeed: 'normal',
|
||||
collapseTrigger: Selector.DATA_COLLAPSE,
|
||||
removeTrigger: Selector.DATA_REMOVE,
|
||||
maximizeTrigger: Selector.DATA_MAXIMIZE,
|
||||
collapseIcon: 'fa-minus',
|
||||
expandIcon: 'fa-plus',
|
||||
maximizeIcon: 'fa-expand',
|
||||
minimizeIcon: 'fa-compress',
|
||||
}
|
||||
|
||||
class CardWidget {
|
||||
constructor(element, settings) {
|
||||
this._element = element
|
||||
this._parent = element.parents(Selector.CARD).first()
|
||||
|
||||
if (element.hasClass(ClassName.CARD)) {
|
||||
this._parent = element
|
||||
}
|
||||
|
||||
this._settings = $.extend({}, Default, settings)
|
||||
}
|
||||
|
||||
collapse() {
|
||||
this._parent.children(`${Selector.CARD_BODY}, ${Selector.CARD_FOOTER}`)
|
||||
.slideUp(this._settings.animationSpeed, () => {
|
||||
this._parent.addClass(ClassName.COLLAPSED)
|
||||
})
|
||||
this._parent.find(this._settings.collapseTrigger + ' .' + this._settings.collapseIcon)
|
||||
.addClass(this._settings.expandIcon)
|
||||
.removeClass(this._settings.collapseIcon)
|
||||
|
||||
const collapsed = $.Event(Event.COLLAPSED)
|
||||
|
||||
this._element.trigger(collapsed, this._parent)
|
||||
}
|
||||
|
||||
expand() {
|
||||
this._parent.children(`${Selector.CARD_BODY}, ${Selector.CARD_FOOTER}`)
|
||||
.slideDown(this._settings.animationSpeed, () => {
|
||||
this._parent.removeClass(ClassName.COLLAPSED)
|
||||
})
|
||||
|
||||
this._parent.find(this._settings.collapseTrigger + ' .' + this._settings.expandIcon)
|
||||
.addClass(this._settings.collapseIcon)
|
||||
.removeClass(this._settings.expandIcon)
|
||||
|
||||
const expanded = $.Event(Event.EXPANDED)
|
||||
|
||||
this._element.trigger(expanded, this._parent)
|
||||
}
|
||||
|
||||
remove() {
|
||||
this._parent.slideUp()
|
||||
|
||||
const removed = $.Event(Event.REMOVED)
|
||||
|
||||
this._element.trigger(removed, this._parent)
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if (this._parent.hasClass(ClassName.COLLAPSED)) {
|
||||
this.expand()
|
||||
return
|
||||
}
|
||||
|
||||
this.collapse()
|
||||
}
|
||||
|
||||
maximize() {
|
||||
this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.maximizeIcon)
|
||||
.addClass(this._settings.minimizeIcon)
|
||||
.removeClass(this._settings.maximizeIcon)
|
||||
this._parent.css({
|
||||
'height': this._parent.height(),
|
||||
'width': this._parent.width(),
|
||||
'transition': 'all .15s'
|
||||
}).delay(150).queue(function(){
|
||||
$(this).addClass(ClassName.MAXIMIZED)
|
||||
$('html').addClass(ClassName.MAXIMIZED)
|
||||
if ($(this).hasClass(ClassName.COLLAPSED)) {
|
||||
$(this).addClass(ClassName.WAS_COLLAPSED)
|
||||
}
|
||||
$(this).dequeue()
|
||||
collapse() {
|
||||
this._parent.addClass(CLASS_NAME_COLLAPSING).children(`${SELECTOR_CARD_BODY}, ${SELECTOR_CARD_FOOTER}`)
|
||||
.slideUp(this._settings.animationSpeed, () => {
|
||||
this._parent.addClass(CLASS_NAME_COLLAPSED).removeClass(CLASS_NAME_COLLAPSING)
|
||||
})
|
||||
|
||||
const maximized = $.Event(Event.MAXIMIZED)
|
||||
this._parent.find(`> ${SELECTOR_CARD_HEADER} ${this._settings.collapseTrigger} .${this._settings.collapseIcon}`)
|
||||
.addClass(this._settings.expandIcon)
|
||||
.removeClass(this._settings.collapseIcon)
|
||||
|
||||
this._element.trigger(maximized, this._parent)
|
||||
}
|
||||
|
||||
minimize() {
|
||||
this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.minimizeIcon)
|
||||
.addClass(this._settings.maximizeIcon)
|
||||
.removeClass(this._settings.minimizeIcon)
|
||||
this._parent.css('cssText', 'height:' + this._parent[0].style.height + ' !important;' +
|
||||
'width:' + this._parent[0].style.width + ' !important; transition: all .15s;'
|
||||
).delay(10).queue(function(){
|
||||
$(this).removeClass(ClassName.MAXIMIZED)
|
||||
$('html').removeClass(ClassName.MAXIMIZED)
|
||||
$(this).css({
|
||||
'height': 'inherit',
|
||||
'width': 'inherit'
|
||||
})
|
||||
if ($(this).hasClass(ClassName.WAS_COLLAPSED)) {
|
||||
$(this).removeClass(ClassName.WAS_COLLAPSED)
|
||||
}
|
||||
$(this).dequeue()
|
||||
})
|
||||
|
||||
const MINIMIZED = $.Event(Event.MINIMIZED)
|
||||
|
||||
this._element.trigger(MINIMIZED, this._parent)
|
||||
}
|
||||
|
||||
toggleMaximize() {
|
||||
if (this._parent.hasClass(ClassName.MAXIMIZED)) {
|
||||
this.minimize()
|
||||
return
|
||||
}
|
||||
|
||||
this.maximize()
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init(card) {
|
||||
this._parent = card
|
||||
|
||||
$(this).find(this._settings.collapseTrigger).click(() => {
|
||||
this.toggle()
|
||||
})
|
||||
|
||||
$(this).find(this._settings.maximizeTrigger).click(() => {
|
||||
this.toggleMaximize()
|
||||
})
|
||||
|
||||
$(this).find(this._settings.removeTrigger).click(() => {
|
||||
this.remove()
|
||||
})
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new CardWidget($(this), data)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data: config)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) {
|
||||
data[config]()
|
||||
} else if (typeof config === 'object') {
|
||||
data._init($(this))
|
||||
}
|
||||
}
|
||||
this._element.trigger($.Event(EVENT_COLLAPSED), this._parent)
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
expand() {
|
||||
this._parent.addClass(CLASS_NAME_EXPANDING).children(`${SELECTOR_CARD_BODY}, ${SELECTOR_CARD_FOOTER}`)
|
||||
.slideDown(this._settings.animationSpeed, () => {
|
||||
this._parent.removeClass(CLASS_NAME_COLLAPSED).removeClass(CLASS_NAME_EXPANDING)
|
||||
})
|
||||
|
||||
$(document).on('click', Selector.DATA_COLLAPSE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
this._parent.find(`> ${SELECTOR_CARD_HEADER} ${this._settings.collapseTrigger} .${this._settings.expandIcon}`)
|
||||
.addClass(this._settings.collapseIcon)
|
||||
.removeClass(this._settings.expandIcon)
|
||||
|
||||
CardWidget._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
$(document).on('click', Selector.DATA_REMOVE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
CardWidget._jQueryInterface.call($(this), 'remove')
|
||||
})
|
||||
|
||||
$(document).on('click', Selector.DATA_MAXIMIZE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
CardWidget._jQueryInterface.call($(this), 'toggleMaximize')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = CardWidget._jQueryInterface
|
||||
$.fn[NAME].Constructor = CardWidget
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return CardWidget._jQueryInterface
|
||||
this._element.trigger($.Event(EVENT_EXPANDED), this._parent)
|
||||
}
|
||||
|
||||
return CardWidget
|
||||
})(jQuery)
|
||||
remove() {
|
||||
this._parent.slideUp()
|
||||
this._element.trigger($.Event(EVENT_REMOVED), this._parent)
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if (this._parent.hasClass(CLASS_NAME_COLLAPSED)) {
|
||||
this.expand()
|
||||
return
|
||||
}
|
||||
|
||||
this.collapse()
|
||||
}
|
||||
|
||||
maximize() {
|
||||
this._parent.find(`${this._settings.maximizeTrigger} .${this._settings.maximizeIcon}`)
|
||||
.addClass(this._settings.minimizeIcon)
|
||||
.removeClass(this._settings.maximizeIcon)
|
||||
this._parent.css({
|
||||
height: this._parent.height(),
|
||||
width: this._parent.width(),
|
||||
transition: 'all .15s'
|
||||
}).delay(150).queue(function () {
|
||||
const $element = $(this)
|
||||
|
||||
$element.addClass(CLASS_NAME_MAXIMIZED)
|
||||
$('html').addClass(CLASS_NAME_MAXIMIZED)
|
||||
if ($element.hasClass(CLASS_NAME_COLLAPSED)) {
|
||||
$element.addClass(CLASS_NAME_WAS_COLLAPSED)
|
||||
}
|
||||
|
||||
$element.dequeue()
|
||||
})
|
||||
|
||||
this._element.trigger($.Event(EVENT_MAXIMIZED), this._parent)
|
||||
}
|
||||
|
||||
minimize() {
|
||||
this._parent.find(`${this._settings.maximizeTrigger} .${this._settings.minimizeIcon}`)
|
||||
.addClass(this._settings.maximizeIcon)
|
||||
.removeClass(this._settings.minimizeIcon)
|
||||
this._parent.css('cssText', `height: ${this._parent[0].style.height} !important; width: ${this._parent[0].style.width} !important; transition: all .15s;`
|
||||
).delay(10).queue(function () {
|
||||
const $element = $(this)
|
||||
|
||||
$element.removeClass(CLASS_NAME_MAXIMIZED)
|
||||
$('html').removeClass(CLASS_NAME_MAXIMIZED)
|
||||
$element.css({
|
||||
height: 'inherit',
|
||||
width: 'inherit'
|
||||
})
|
||||
if ($element.hasClass(CLASS_NAME_WAS_COLLAPSED)) {
|
||||
$element.removeClass(CLASS_NAME_WAS_COLLAPSED)
|
||||
}
|
||||
|
||||
$element.dequeue()
|
||||
})
|
||||
|
||||
this._element.trigger($.Event(EVENT_MINIMIZED), this._parent)
|
||||
}
|
||||
|
||||
toggleMaximize() {
|
||||
if (this._parent.hasClass(CLASS_NAME_MAXIMIZED)) {
|
||||
this.minimize()
|
||||
return
|
||||
}
|
||||
|
||||
this.maximize()
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init(card) {
|
||||
this._parent = card
|
||||
|
||||
$(this).find(this._settings.collapseTrigger).click(() => {
|
||||
this.toggle()
|
||||
})
|
||||
|
||||
$(this).find(this._settings.maximizeTrigger).click(() => {
|
||||
this.toggleMaximize()
|
||||
})
|
||||
|
||||
$(this).find(this._settings.removeTrigger).click(() => {
|
||||
this.remove()
|
||||
})
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new CardWidget($(this), _options)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data : config)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) {
|
||||
data[config]()
|
||||
} else if (typeof config === 'object') {
|
||||
data._init($(this))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_COLLAPSE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
CardWidget._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_REMOVE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
CardWidget._jQueryInterface.call($(this), 'remove')
|
||||
})
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_MAXIMIZE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
CardWidget._jQueryInterface.call($(this), 'toggleMaximize')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = CardWidget._jQueryInterface
|
||||
$.fn[NAME].Constructor = CardWidget
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return CardWidget._jQueryInterface
|
||||
}
|
||||
|
||||
export default CardWidget
|
||||
|
||||
@@ -5,286 +5,292 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const ControlSidebar = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'ControlSidebar'
|
||||
const DATA_KEY = 'lte.controlsidebar'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const DATA_API_KEY = '.data-api'
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
COLLAPSED: `collapsed${EVENT_KEY}`,
|
||||
EXPANDED: `expanded${EVENT_KEY}`,
|
||||
const NAME = 'ControlSidebar'
|
||||
const DATA_KEY = 'lte.controlsidebar'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
const EVENT_EXPANDED = `expanded${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_CONTROL_SIDEBAR = '.control-sidebar'
|
||||
const SELECTOR_CONTROL_SIDEBAR_CONTENT = '.control-sidebar-content'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="control-sidebar"]'
|
||||
const SELECTOR_HEADER = '.main-header'
|
||||
const SELECTOR_FOOTER = '.main-footer'
|
||||
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_ANIMATE = 'control-sidebar-animate'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_SLIDE = 'control-sidebar-slide-open'
|
||||
const CLASS_NAME_LAYOUT_FIXED = 'layout-fixed'
|
||||
const CLASS_NAME_NAVBAR_FIXED = 'layout-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_SM_FIXED = 'layout-sm-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_MD_FIXED = 'layout-md-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_LG_FIXED = 'layout-lg-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_XL_FIXED = 'layout-xl-navbar-fixed'
|
||||
const CLASS_NAME_FOOTER_FIXED = 'layout-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_SM_FIXED = 'layout-sm-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_MD_FIXED = 'layout-md-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_LG_FIXED = 'layout-lg-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_XL_FIXED = 'layout-xl-footer-fixed'
|
||||
|
||||
const Default = {
|
||||
controlsidebarSlide: true,
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'l'
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class ControlSidebar {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
this._config = config
|
||||
|
||||
this._init()
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
CONTROL_SIDEBAR: '.control-sidebar',
|
||||
CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',
|
||||
DATA_TOGGLE: '[data-widget="control-sidebar"]',
|
||||
CONTENT: '.content-wrapper',
|
||||
HEADER: '.main-header',
|
||||
FOOTER: '.main-footer',
|
||||
}
|
||||
// Public
|
||||
|
||||
const ClassName = {
|
||||
CONTROL_SIDEBAR_ANIMATE: 'control-sidebar-animate',
|
||||
CONTROL_SIDEBAR_OPEN: 'control-sidebar-open',
|
||||
CONTROL_SIDEBAR_SLIDE: 'control-sidebar-slide-open',
|
||||
LAYOUT_FIXED: 'layout-fixed',
|
||||
NAVBAR_FIXED: 'layout-navbar-fixed',
|
||||
NAVBAR_SM_FIXED: 'layout-sm-navbar-fixed',
|
||||
NAVBAR_MD_FIXED: 'layout-md-navbar-fixed',
|
||||
NAVBAR_LG_FIXED: 'layout-lg-navbar-fixed',
|
||||
NAVBAR_XL_FIXED: 'layout-xl-navbar-fixed',
|
||||
FOOTER_FIXED: 'layout-footer-fixed',
|
||||
FOOTER_SM_FIXED: 'layout-sm-footer-fixed',
|
||||
FOOTER_MD_FIXED: 'layout-md-footer-fixed',
|
||||
FOOTER_LG_FIXED: 'layout-lg-footer-fixed',
|
||||
FOOTER_XL_FIXED: 'layout-xl-footer-fixed',
|
||||
}
|
||||
collapse() {
|
||||
const $body = $('body')
|
||||
const $html = $('html')
|
||||
|
||||
const Default = {
|
||||
controlsidebarSlide: true,
|
||||
scrollbarTheme : 'os-theme-light',
|
||||
scrollbarAutoHide: 'l',
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class ControlSidebar {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
this._config = config
|
||||
|
||||
this._init()
|
||||
// Show the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
||||
$(SELECTOR_CONTROL_SIDEBAR).hide()
|
||||
$html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN)
|
||||
}
|
||||
|
||||
// Public
|
||||
$(this._element).trigger($.Event(EVENT_COLLAPSED))
|
||||
}
|
||||
|
||||
show() {
|
||||
// Show the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
|
||||
$(Selector.CONTROL_SIDEBAR).hide()
|
||||
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
show() {
|
||||
const $body = $('body')
|
||||
const $html = $('html')
|
||||
|
||||
// Collapse the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$(SELECTOR_CONTROL_SIDEBAR).show().delay(10).queue(function () {
|
||||
$body.addClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
||||
$html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$('body').removeClass(ClassName.CONTROL_SIDEBAR_OPEN)
|
||||
}
|
||||
|
||||
const expandedEvent = $.Event(Event.EXPANDED)
|
||||
$(this._element).trigger(expandedEvent)
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$body.addClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN)
|
||||
}
|
||||
|
||||
collapse() {
|
||||
// Collapse the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
$(Selector.CONTROL_SIDEBAR).show().delay(10).queue(function(){
|
||||
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
|
||||
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this).dequeue()
|
||||
})
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$('body').addClass(ClassName.CONTROL_SIDEBAR_OPEN)
|
||||
}
|
||||
this._fixHeight()
|
||||
this._fixScrollHeight()
|
||||
|
||||
const collapsedEvent = $.Event(Event.COLLAPSED)
|
||||
$(this._element).trigger(collapsedEvent)
|
||||
$(this._element).trigger($.Event(EVENT_EXPANDED))
|
||||
}
|
||||
|
||||
toggle() {
|
||||
const $body = $('body')
|
||||
const shouldClose = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) ||
|
||||
$body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE)
|
||||
|
||||
if (shouldClose) {
|
||||
// Close the control sidebar
|
||||
this.collapse()
|
||||
} else {
|
||||
// Open the control sidebar
|
||||
this.show()
|
||||
}
|
||||
}
|
||||
|
||||
toggle() {
|
||||
const shouldOpen = $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body')
|
||||
.hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)
|
||||
if (shouldOpen) {
|
||||
// Open the control sidebar
|
||||
this.show()
|
||||
} else {
|
||||
// Close the control sidebar
|
||||
this.collapse()
|
||||
}
|
||||
}
|
||||
// Private
|
||||
|
||||
// Private
|
||||
_init() {
|
||||
this._fixHeight()
|
||||
this._fixScrollHeight()
|
||||
|
||||
_init() {
|
||||
$(window).resize(() => {
|
||||
this._fixHeight()
|
||||
this._fixScrollHeight()
|
||||
})
|
||||
|
||||
$(window).resize(() => {
|
||||
this._fixHeight()
|
||||
$(window).scroll(() => {
|
||||
const $body = $('body')
|
||||
const shouldFixHeight = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) ||
|
||||
$body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE)
|
||||
|
||||
if (shouldFixHeight) {
|
||||
this._fixScrollHeight()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
_fixScrollHeight() {
|
||||
const $body = $('body')
|
||||
|
||||
if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) {
|
||||
return
|
||||
}
|
||||
|
||||
const heights = {
|
||||
scroll: $(document).height(),
|
||||
window: $(window).height(),
|
||||
header: $(SELECTOR_HEADER).outerHeight(),
|
||||
footer: $(SELECTOR_FOOTER).outerHeight()
|
||||
}
|
||||
const positions = {
|
||||
bottom: Math.abs((heights.window + $(window).scrollTop()) - heights.scroll),
|
||||
top: $(window).scrollTop()
|
||||
}
|
||||
|
||||
const navbarFixed = (
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_SM_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_MD_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_LG_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_XL_FIXED)
|
||||
) && $(SELECTOR_HEADER).css('position') === 'fixed'
|
||||
|
||||
const footerFixed = (
|
||||
$body.hasClass(CLASS_NAME_FOOTER_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_SM_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_MD_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_LG_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_XL_FIXED)
|
||||
) && $(SELECTOR_FOOTER).css('position') === 'fixed'
|
||||
|
||||
const $controlSidebar = $(SELECTOR_CONTROL_SIDEBAR)
|
||||
const $controlsidebarContent = $(`${SELECTOR_CONTROL_SIDEBAR}, ${SELECTOR_CONTROL_SIDEBAR} ${SELECTOR_CONTROL_SIDEBAR_CONTENT}`)
|
||||
|
||||
if (positions.top === 0 && positions.bottom === 0) {
|
||||
$controlSidebar.css({
|
||||
bottom: heights.footer,
|
||||
top: heights.header
|
||||
})
|
||||
$controlsidebarContent.css('height', heights.window - (heights.header + heights.footer))
|
||||
} else if (positions.bottom <= heights.footer) {
|
||||
if (footerFixed === false) {
|
||||
const top = heights.header - positions.top
|
||||
$controlSidebar.css('bottom', heights.footer - positions.bottom).css('top', top >= 0 ? top : 0)
|
||||
$controlsidebarContent.css('height', heights.window - (heights.footer - positions.bottom))
|
||||
} else {
|
||||
$controlSidebar.css('bottom', heights.footer)
|
||||
}
|
||||
} else if (positions.top <= heights.header) {
|
||||
if (navbarFixed === false) {
|
||||
$controlSidebar.css('top', heights.header - positions.top)
|
||||
$controlsidebarContent.css('height', heights.window - (heights.header - positions.top))
|
||||
} else {
|
||||
$controlSidebar.css('top', heights.header)
|
||||
}
|
||||
} else if (navbarFixed === false) {
|
||||
$controlSidebar.css('top', 0)
|
||||
$controlsidebarContent.css('height', heights.window)
|
||||
} else {
|
||||
$controlSidebar.css('top', heights.header)
|
||||
}
|
||||
}
|
||||
|
||||
$(window).scroll(() => {
|
||||
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) {
|
||||
this._fixScrollHeight()
|
||||
}
|
||||
})
|
||||
_fixHeight() {
|
||||
const $body = $('body')
|
||||
|
||||
if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) {
|
||||
return
|
||||
}
|
||||
|
||||
_fixScrollHeight() {
|
||||
const heights = {
|
||||
scroll: $(document).height(),
|
||||
window: $(window).height(),
|
||||
header: $(Selector.HEADER).outerHeight(),
|
||||
footer: $(Selector.FOOTER).outerHeight(),
|
||||
}
|
||||
const positions = {
|
||||
bottom: Math.abs((heights.window + $(window).scrollTop()) - heights.scroll),
|
||||
top: $(window).scrollTop(),
|
||||
}
|
||||
const heights = {
|
||||
window: $(window).height(),
|
||||
header: $(SELECTOR_HEADER).outerHeight(),
|
||||
footer: $(SELECTOR_FOOTER).outerHeight()
|
||||
}
|
||||
|
||||
let navbarFixed = false;
|
||||
let footerFixed = false;
|
||||
let sidebarHeight = heights.window - heights.header
|
||||
|
||||
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
||||
if (
|
||||
$('body').hasClass(ClassName.NAVBAR_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_SM_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_MD_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_LG_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_XL_FIXED)
|
||||
) {
|
||||
if ($(Selector.HEADER).css("position") === "fixed") {
|
||||
navbarFixed = true;
|
||||
}
|
||||
}
|
||||
if (
|
||||
$('body').hasClass(ClassName.FOOTER_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_SM_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_MD_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_LG_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_XL_FIXED)
|
||||
) {
|
||||
if ($(Selector.FOOTER).css("position") === "fixed") {
|
||||
footerFixed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (positions.top === 0 && positions.bottom === 0) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer))
|
||||
} else if (positions.bottom <= heights.footer) {
|
||||
if (footerFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer - positions.bottom);
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.footer - positions.bottom))
|
||||
} else {
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
|
||||
}
|
||||
} else if (positions.top <= heights.header) {
|
||||
if (navbarFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header - positions.top);
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header - positions.top))
|
||||
} else {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
||||
}
|
||||
} else {
|
||||
if (navbarFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', 0);
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window)
|
||||
} else {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
||||
}
|
||||
}
|
||||
if (
|
||||
$body.hasClass(CLASS_NAME_FOOTER_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_SM_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_MD_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_LG_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_XL_FIXED)
|
||||
) {
|
||||
if ($(SELECTOR_FOOTER).css('position') === 'fixed') {
|
||||
sidebarHeight = heights.window - heights.header - heights.footer
|
||||
}
|
||||
}
|
||||
|
||||
_fixHeight() {
|
||||
const heights = {
|
||||
window: $(window).height(),
|
||||
header: $(Selector.HEADER).outerHeight(),
|
||||
footer: $(Selector.FOOTER).outerHeight(),
|
||||
}
|
||||
const $controlSidebar = $(`${SELECTOR_CONTROL_SIDEBAR} ${SELECTOR_CONTROL_SIDEBAR_CONTENT}`)
|
||||
$controlSidebar.css('height', sidebarHeight)
|
||||
|
||||
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
||||
let sidebarHeight = heights.window - heights.header;
|
||||
|
||||
if (
|
||||
$('body').hasClass(ClassName.FOOTER_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_SM_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_MD_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_LG_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_XL_FIXED)
|
||||
) {
|
||||
if ($(Selector.FOOTER).css("position") === "fixed") {
|
||||
sidebarHeight = heights.window - heights.header - heights.footer;
|
||||
}
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$controlSidebar.overlayScrollbars({
|
||||
className: this._config.scrollbarTheme,
|
||||
sizeAutoCapable: true,
|
||||
scrollbars: {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling: true
|
||||
}
|
||||
|
||||
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', sidebarHeight)
|
||||
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).overlayScrollbars({
|
||||
className : this._config.scrollbarTheme,
|
||||
sizeAutoCapable : true,
|
||||
scrollbars : {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling : true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new ControlSidebar(this, $(this).data())
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (data[operation] === 'undefined') {
|
||||
throw new Error(`${operation} is not a function`)
|
||||
}
|
||||
|
||||
data[operation]()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Data Api implementation
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault()
|
||||
// Static
|
||||
|
||||
ControlSidebar._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
static _jQueryInterface(operation) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
if (!data) {
|
||||
data = new ControlSidebar(this, _options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
$.fn[NAME] = ControlSidebar._jQueryInterface
|
||||
$.fn[NAME].Constructor = ControlSidebar
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return ControlSidebar._jQueryInterface
|
||||
if (data[operation] === 'undefined') {
|
||||
throw new Error(`${operation} is not a function`)
|
||||
}
|
||||
|
||||
data[operation]()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return ControlSidebar
|
||||
})(jQuery)
|
||||
/**
|
||||
*
|
||||
* Data Api implementation
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault()
|
||||
|
||||
ControlSidebar._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = ControlSidebar._jQueryInterface
|
||||
$.fn[NAME].Constructor = ControlSidebar
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return ControlSidebar._jQueryInterface
|
||||
}
|
||||
|
||||
export default ControlSidebar
|
||||
|
||||
@@ -5,88 +5,80 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const DirectChat = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'DirectChat'
|
||||
const DATA_KEY = 'lte.directchat'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const DATA_API_KEY = '.data-api'
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
TOGGLED: `toggled{EVENT_KEY}`
|
||||
const NAME = 'DirectChat'
|
||||
const DATA_KEY = 'lte.directchat'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_TOGGLED = `toggled${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="chat-pane-toggle"]'
|
||||
const SELECTOR_DIRECT_CHAT = '.direct-chat'
|
||||
|
||||
const CLASS_NAME_DIRECT_CHAT_OPEN = 'direct-chat-contacts-open'
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class DirectChat {
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
DATA_TOGGLE: '[data-widget="chat-pane-toggle"]',
|
||||
DIRECT_CHAT: '.direct-chat'
|
||||
};
|
||||
|
||||
const ClassName = {
|
||||
DIRECT_CHAT_OPEN: 'direct-chat-contacts-open'
|
||||
};
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class DirectChat {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
}
|
||||
|
||||
toggle() {
|
||||
$(this._element).parents(Selector.DIRECT_CHAT).first().toggleClass(ClassName.DIRECT_CHAT_OPEN);
|
||||
|
||||
const toggledEvent = $.Event(Event.TOGGLED)
|
||||
$(this._element).trigger(toggledEvent)
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new DirectChat($(this))
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
})
|
||||
}
|
||||
toggle() {
|
||||
$(this._element).parents(SELECTOR_DIRECT_CHAT).first().toggleClass(CLASS_NAME_DIRECT_CHAT_OPEN)
|
||||
$(this._element).trigger($.Event(EVENT_TOGGLED))
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Data Api implementation
|
||||
* ====================================================
|
||||
*/
|
||||
// Static
|
||||
|
||||
$(document).on('click', Selector.DATA_TOGGLE, function (event) {
|
||||
if (event) event.preventDefault();
|
||||
DirectChat._jQueryInterface.call($(this), 'toggle');
|
||||
});
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
if (!data) {
|
||||
data = new DirectChat($(this))
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
$.fn[NAME] = DirectChat._jQueryInterface
|
||||
$.fn[NAME].Constructor = DirectChat
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return DirectChat._jQueryInterface
|
||||
data[config]()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Data Api implementation
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
return DirectChat
|
||||
})(jQuery)
|
||||
DirectChat._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = DirectChat._jQueryInterface
|
||||
$.fn[NAME].Constructor = DirectChat
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return DirectChat._jQueryInterface
|
||||
}
|
||||
|
||||
export default DirectChat
|
||||
|
||||
@@ -5,108 +5,143 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Dropdown = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'Dropdown'
|
||||
const DATA_KEY = 'lte.dropdown'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Selector = {
|
||||
DROPDOWN_MENU: 'ul.dropdown-menu',
|
||||
DROPDOWN_TOGGLE: '[data-toggle="dropdown"]',
|
||||
const NAME = 'Dropdown'
|
||||
const DATA_KEY = 'lte.dropdown'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_NAVBAR = '.navbar'
|
||||
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu'
|
||||
const SELECTOR_DROPDOWN_MENU_ACTIVE = '.dropdown-menu.show'
|
||||
const SELECTOR_DROPDOWN_TOGGLE = '[data-toggle="dropdown"]'
|
||||
|
||||
const CLASS_NAME_DROPDOWN_RIGHT = 'dropdown-menu-right'
|
||||
const CLASS_NAME_DROPDOWN_SUBMENU = 'dropdown-submenu'
|
||||
|
||||
// TODO: this is unused; should be removed along with the extend?
|
||||
const Default = {
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Dropdown {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
DROPDOWN_HOVER: '.dropdown-hover'
|
||||
}
|
||||
// Public
|
||||
|
||||
const Default = {
|
||||
}
|
||||
toggleSubmenu() {
|
||||
this._element.siblings().show().toggleClass('show')
|
||||
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Dropdown {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
if (!this._element.next().hasClass('show')) {
|
||||
this._element.parents(SELECTOR_DROPDOWN_MENU).first().find('.show').removeClass('show').hide()
|
||||
}
|
||||
|
||||
// Public
|
||||
this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', () => {
|
||||
$('.dropdown-submenu .show').removeClass('show').hide()
|
||||
})
|
||||
}
|
||||
|
||||
toggleSubmenu() {
|
||||
this._element.siblings().show().toggleClass("show");
|
||||
|
||||
if (! this._element.next().hasClass('show')) {
|
||||
this._element.parents('.dropdown-menu').first().find('.show').removeClass("show").hide();
|
||||
}
|
||||
|
||||
this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {
|
||||
$('.dropdown-submenu .show').removeClass("show").hide();
|
||||
});
|
||||
fixPosition() {
|
||||
const $element = $(SELECTOR_DROPDOWN_MENU_ACTIVE)
|
||||
|
||||
if ($element.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
// Static
|
||||
if ($element.hasClass(CLASS_NAME_DROPDOWN_RIGHT)) {
|
||||
$element.css({
|
||||
left: 'inherit',
|
||||
right: 0
|
||||
})
|
||||
} else {
|
||||
$element.css({
|
||||
left: 0,
|
||||
right: 'inherit'
|
||||
})
|
||||
}
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
const offset = $element.offset()
|
||||
const width = $element.width()
|
||||
const visiblePart = $(window).width() - offset.left
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'toggleSubmenu') {
|
||||
data[config]()
|
||||
}
|
||||
if (offset.left < 0) {
|
||||
$element.css({
|
||||
left: 'inherit',
|
||||
right: offset.left - 5
|
||||
})
|
||||
} else if (visiblePart < width) {
|
||||
$element.css({
|
||||
left: 'inherit',
|
||||
right: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
// Static
|
||||
|
||||
$(Selector.DROPDOWN_MENU + ' ' + Selector.DROPDOWN_TOGGLE).on("click", function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
Dropdown._jQueryInterface.call($(this), 'toggleSubmenu')
|
||||
});
|
||||
if (!data) {
|
||||
data = new Dropdown($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
// $(Selector.SIDEBAR + ' a').on('focusin', () => {
|
||||
// $(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED);
|
||||
// })
|
||||
if (config === 'toggleSubmenu' || config === 'fixPosition') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// $(Selector.SIDEBAR + ' a').on('focusout', () => {
|
||||
// $(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED);
|
||||
// })
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
$(`${SELECTOR_DROPDOWN_MENU} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', function (event) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
$.fn[NAME] = Dropdown._jQueryInterface
|
||||
$.fn[NAME].Constructor = Dropdown
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Dropdown._jQueryInterface
|
||||
Dropdown._jQueryInterface.call($(this), 'toggleSubmenu')
|
||||
})
|
||||
|
||||
$(`${SELECTOR_NAVBAR} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', event => {
|
||||
event.preventDefault()
|
||||
|
||||
if ($(event.target).parent().hasClass(CLASS_NAME_DROPDOWN_SUBMENU)) {
|
||||
return
|
||||
}
|
||||
|
||||
return Dropdown
|
||||
})(jQuery)
|
||||
setTimeout(function () {
|
||||
Dropdown._jQueryInterface.call($(this), 'fixPosition')
|
||||
}, 1)
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Dropdown._jQueryInterface
|
||||
$.fn[NAME].Constructor = Dropdown
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Dropdown._jQueryInterface
|
||||
}
|
||||
|
||||
export default Dropdown
|
||||
|
||||
115
build/js/ExpandableTable.js
Normal file
115
build/js/ExpandableTable.js
Normal file
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE ExpandableTable.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'ExpandableTable'
|
||||
const DATA_KEY = 'lte.expandableTable'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_EXPANDED = `expanded${EVENT_KEY}`
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_TABLE = '.expandable-table'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="expandable-table"]'
|
||||
const SELECTOR_ARIA_ATTR = 'aria-expanded'
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
class ExpandableTable {
|
||||
constructor(element, options) {
|
||||
this._options = options
|
||||
this._element = element
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
init() {
|
||||
$(SELECTOR_DATA_TOGGLE).each((_, $header) => {
|
||||
const $type = $($header).attr(SELECTOR_ARIA_ATTR)
|
||||
const $body = $($header).next().children().first().children()
|
||||
if ($type === 'true') {
|
||||
$body.show()
|
||||
} else if ($type === 'false') {
|
||||
$body.hide()
|
||||
$body.parent().parent().addClass('d-none')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
toggleRow() {
|
||||
const $element = this._element
|
||||
const time = 500
|
||||
const $type = $element.attr(SELECTOR_ARIA_ATTR)
|
||||
const $body = $element.next().children().first().children()
|
||||
|
||||
$body.stop()
|
||||
if ($type === 'true') {
|
||||
$body.slideUp(time, () => {
|
||||
$element.next().addClass('d-none')
|
||||
})
|
||||
$element.attr(SELECTOR_ARIA_ATTR, 'false')
|
||||
$element.trigger($.Event(EVENT_COLLAPSED))
|
||||
} else if ($type === 'false') {
|
||||
$element.next().removeClass('d-none')
|
||||
$body.slideDown(time)
|
||||
$element.attr(SELECTOR_ARIA_ATTR, 'true')
|
||||
$element.trigger($.Event(EVENT_EXPANDED))
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new ExpandableTable($(this))
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof operation === 'string' && operation.match(/init|toggleRow/)) {
|
||||
data[operation]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(SELECTOR_TABLE).ready(function () {
|
||||
ExpandableTable._jQueryInterface.call($(this), 'init')
|
||||
})
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE, function () {
|
||||
ExpandableTable._jQueryInterface.call($(this), 'toggleRow')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = ExpandableTable._jQueryInterface
|
||||
$.fn[NAME].Constructor = ExpandableTable
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return ExpandableTable._jQueryInterface
|
||||
}
|
||||
|
||||
export default ExpandableTable
|
||||
117
build/js/Fullscreen.js
Normal file
117
build/js/Fullscreen.js
Normal file
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE Fullscreen.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Fullscreen'
|
||||
const DATA_KEY = 'lte.fullscreen'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_DATA_WIDGET = '[data-widget="fullscreen"]'
|
||||
const SELECTOR_ICON = `${SELECTOR_DATA_WIDGET} i`
|
||||
|
||||
const Default = {
|
||||
minimizeIcon: 'fa-compress-arrows-alt',
|
||||
maximizeIcon: 'fa-expand-arrows-alt'
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Fullscreen {
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = $.extend({}, Default, _options)
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggle() {
|
||||
if (document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.msFullscreenElement) {
|
||||
this.windowed()
|
||||
} else {
|
||||
this.fullscreen()
|
||||
}
|
||||
}
|
||||
|
||||
fullscreen() {
|
||||
if (document.documentElement.requestFullscreen) {
|
||||
document.documentElement.requestFullscreen()
|
||||
} else if (document.documentElement.webkitRequestFullscreen) {
|
||||
document.documentElement.webkitRequestFullscreen()
|
||||
} else if (document.documentElement.msRequestFullscreen) {
|
||||
document.documentElement.msRequestFullscreen()
|
||||
}
|
||||
|
||||
$(SELECTOR_ICON).removeClass(this.options.maximizeIcon).addClass(this.options.minimizeIcon)
|
||||
}
|
||||
|
||||
windowed() {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen()
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen()
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen()
|
||||
}
|
||||
|
||||
$(SELECTOR_ICON).removeClass(this.options.minimizeIcon).addClass(this.options.maximizeIcon)
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = $(this).data()
|
||||
}
|
||||
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
const plugin = new Fullscreen($(this), _options)
|
||||
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : data)
|
||||
|
||||
if (typeof config === 'string' && config.match(/toggle|fullscreen|windowed/)) {
|
||||
plugin[config]()
|
||||
} else {
|
||||
plugin.init()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_DATA_WIDGET, function () {
|
||||
Fullscreen._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Fullscreen._jQueryInterface
|
||||
$.fn[NAME].Constructor = Fullscreen
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Fullscreen._jQueryInterface
|
||||
}
|
||||
|
||||
export default Fullscreen
|
||||
356
build/js/IFrame.js
Normal file
356
build/js/IFrame.js
Normal file
@@ -0,0 +1,356 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE IFrame.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'IFrame'
|
||||
const DATA_KEY = 'lte.iframe'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="iframe"]'
|
||||
const SELECTOR_DATA_TOGGLE_CLOSE = '[data-widget="iframe-close"]'
|
||||
const SELECTOR_DATA_TOGGLE_SCROLL_LEFT = '[data-widget="iframe-scrollleft"]'
|
||||
const SELECTOR_DATA_TOGGLE_SCROLL_RIGHT = '[data-widget="iframe-scrollright"]'
|
||||
const SELECTOR_DATA_TOGGLE_FULLSCREEN = '[data-widget="iframe-fullscreen"]'
|
||||
const SELECTOR_CONTENT_WRAPPER = '.content-wrapper'
|
||||
const SELECTOR_CONTENT_IFRAME = `${SELECTOR_CONTENT_WRAPPER} iframe`
|
||||
const SELECTOR_TAB_NAV = `${SELECTOR_DATA_TOGGLE}.iframe-mode .nav`
|
||||
const SELECTOR_TAB_NAVBAR_NAV = `${SELECTOR_DATA_TOGGLE}.iframe-mode .navbar-nav`
|
||||
const SELECTOR_TAB_NAVBAR_NAV_ITEM = `${SELECTOR_TAB_NAVBAR_NAV} .nav-item`
|
||||
const SELECTOR_TAB_CONTENT = `${SELECTOR_DATA_TOGGLE}.iframe-mode .tab-content`
|
||||
const SELECTOR_TAB_EMPTY = `${SELECTOR_TAB_CONTENT} .tab-empty`
|
||||
const SELECTOR_TAB_LOADING = `${SELECTOR_TAB_CONTENT} .tab-loading`
|
||||
const SELECTOR_SIDEBAR_MENU_ITEM = '.main-sidebar .nav-item > a.nav-link'
|
||||
const SELECTOR_HEADER_MENU_ITEM = '.main-header .nav-item a.nav-link'
|
||||
const SELECTOR_HEADER_DROPDOWN_ITEM = '.main-header a.dropdown-item'
|
||||
const CLASS_NAME_IFRAME_MODE = 'iframe-mode'
|
||||
const CLASS_NAME_FULLSCREEN_MODE = 'iframe-mode-fullscreen'
|
||||
|
||||
const Default = {
|
||||
onTabClick(item) {
|
||||
return item
|
||||
},
|
||||
onTabChanged(item) {
|
||||
return item
|
||||
},
|
||||
onTabCreated(item) {
|
||||
return item
|
||||
},
|
||||
autoIframeMode: true,
|
||||
autoItemActive: true,
|
||||
autoShowNewTab: true,
|
||||
loadingScreen: true,
|
||||
useNavbarItems: true,
|
||||
scrollOffset: 40,
|
||||
scrollBehaviorSwap: false,
|
||||
iconMaximize: 'fa-expand',
|
||||
iconMinimize: 'fa-compress'
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class IFrame {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
onTabClick(item) {
|
||||
this._config.onTabClick(item)
|
||||
}
|
||||
|
||||
onTabChanged(item) {
|
||||
this._config.onTabChanged(item)
|
||||
}
|
||||
|
||||
onTabCreated(item) {
|
||||
this._config.onTabCreated(item)
|
||||
}
|
||||
|
||||
createTab(title, link, uniqueName, autoOpen) {
|
||||
const tabId = `panel-${uniqueName}-${Math.floor(Math.random() * 1000)}`
|
||||
const navId = `tab-${uniqueName}-${Math.floor(Math.random() * 1000)}`
|
||||
|
||||
const newNavItem = `<li class="nav-item" role="presentation"><a class="nav-link" data-toggle="row" id="${navId}" href="#${tabId}" role="tab" aria-controls="${tabId}" aria-selected="false">${title}</a></li>`
|
||||
$(SELECTOR_TAB_NAVBAR_NAV).append(newNavItem)
|
||||
|
||||
const newTabItem = `<div class="tab-pane fade" id="${tabId}" role="tabpanel" aria-labelledby="${navId}"><iframe src="${link}"></iframe></div>`
|
||||
$(SELECTOR_TAB_CONTENT).append(newTabItem)
|
||||
|
||||
if (autoOpen) {
|
||||
if (this._config.loadingScreen) {
|
||||
const $loadingScreen = $(SELECTOR_TAB_LOADING)
|
||||
$loadingScreen.fadeIn()
|
||||
$(`${tabId} iframe`).ready(() => {
|
||||
if (typeof this._config.loadingScreen === 'number') {
|
||||
this.switchTab(`#${navId}`, this._config.loadingScreen)
|
||||
setTimeout(() => {
|
||||
$loadingScreen.fadeOut()
|
||||
}, this._config.loadingScreen)
|
||||
} else {
|
||||
this.switchTab(`#${navId}`, this._config.loadingScreen)
|
||||
$loadingScreen.fadeOut()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.switchTab(`#${navId}`)
|
||||
}
|
||||
}
|
||||
|
||||
this.onTabCreated($(`#${navId}`))
|
||||
}
|
||||
|
||||
openTabSidebar(item, autoOpen = this._config.autoShowNewTab) {
|
||||
let $item = $(item).clone()
|
||||
if ($item.attr('href') === undefined) {
|
||||
$item = $(item).parent('a').clone()
|
||||
}
|
||||
|
||||
$item.find('.right').remove()
|
||||
let title = $item.find('p').text()
|
||||
if (title === '') {
|
||||
title = $item.text()
|
||||
}
|
||||
|
||||
const link = $item.attr('href')
|
||||
if (link === '#' || link === '' || link === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
this.createTab(title, link, link.replace('.html', '').replace('./', '').replaceAll('/', '-'), autoOpen)
|
||||
}
|
||||
|
||||
switchTab(item) {
|
||||
const $item = $(item)
|
||||
const tabId = $item.attr('href')
|
||||
|
||||
$(SELECTOR_TAB_EMPTY).hide()
|
||||
$(`${SELECTOR_TAB_NAVBAR_NAV} .active`).tab('dispose').removeClass('active')
|
||||
this._fixHeight()
|
||||
|
||||
$item.tab('show')
|
||||
$item.parents('li').addClass('active')
|
||||
this.onTabChanged($item)
|
||||
|
||||
if (this._config.autoItemActive) {
|
||||
this._setItemActive($(`${tabId} iframe`).attr('src'))
|
||||
}
|
||||
}
|
||||
|
||||
removeActiveTab() {
|
||||
const $navItem = $(`${SELECTOR_TAB_NAVBAR_NAV_ITEM}.active`)
|
||||
const $navItemParent = $navItem.parent()
|
||||
const navItemIndex = $navItem.index()
|
||||
$navItem.remove()
|
||||
$('.tab-pane.active').remove()
|
||||
|
||||
if ($(SELECTOR_TAB_CONTENT).children().length == $(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).length) {
|
||||
$(SELECTOR_TAB_EMPTY).show()
|
||||
} else {
|
||||
const prevNavItemIndex = navItemIndex - 1
|
||||
this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a'))
|
||||
}
|
||||
}
|
||||
|
||||
toggleFullscreen() {
|
||||
if ($('body').hasClass(CLASS_NAME_FULLSCREEN_MODE)) {
|
||||
$(`${SELECTOR_DATA_TOGGLE_FULLSCREEN} i`).removeClass(this._config.iconMinimize).addClass(this._config.iconMaximize)
|
||||
$('body').removeClass(CLASS_NAME_FULLSCREEN_MODE)
|
||||
$(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).height('auto')
|
||||
$(SELECTOR_CONTENT_WRAPPER).height('auto')
|
||||
$(SELECTOR_CONTENT_IFRAME).height('auto')
|
||||
} else {
|
||||
$(`${SELECTOR_DATA_TOGGLE_FULLSCREEN} i`).removeClass(this._config.iconMaximize).addClass(this._config.iconMinimize)
|
||||
$('body').addClass(CLASS_NAME_FULLSCREEN_MODE)
|
||||
}
|
||||
|
||||
$(window).trigger('resize')
|
||||
this._fixHeight(true)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
if (window.frameElement && this._config.autoIframeMode) {
|
||||
$('body').addClass(CLASS_NAME_IFRAME_MODE)
|
||||
} else if ($(SELECTOR_CONTENT_WRAPPER).hasClass(CLASS_NAME_IFRAME_MODE)) {
|
||||
this._setupListeners()
|
||||
this._fixHeight(true)
|
||||
}
|
||||
}
|
||||
|
||||
_navScroll(offset) {
|
||||
const leftPos = $(SELECTOR_TAB_NAVBAR_NAV).scrollLeft()
|
||||
$(SELECTOR_TAB_NAVBAR_NAV).animate({ scrollLeft: (leftPos + offset) }, 250, 'linear')
|
||||
}
|
||||
|
||||
_setupListeners() {
|
||||
$(window).on('resize', () => {
|
||||
setTimeout(() => {
|
||||
this._fixHeight()
|
||||
}, 1)
|
||||
})
|
||||
$(document).on('click', SELECTOR_SIDEBAR_MENU_ITEM, e => {
|
||||
e.preventDefault()
|
||||
this.openTabSidebar(e.target)
|
||||
})
|
||||
|
||||
if (this._config.useNavbarItems) {
|
||||
$(document).on('click', `${SELECTOR_HEADER_MENU_ITEM}, ${SELECTOR_HEADER_DROPDOWN_ITEM}`, e => {
|
||||
e.preventDefault()
|
||||
this.openTabSidebar(e.target)
|
||||
})
|
||||
}
|
||||
|
||||
$(document).on('click', SELECTOR_TAB_NAVBAR_NAV_ITEM, e => {
|
||||
e.preventDefault()
|
||||
this.onTabClick(e.target)
|
||||
this.switchTab(e.target)
|
||||
})
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE_CLOSE, e => {
|
||||
e.preventDefault()
|
||||
this.removeActiveTab()
|
||||
})
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE_FULLSCREEN, e => {
|
||||
e.preventDefault()
|
||||
this.toggleFullscreen()
|
||||
})
|
||||
let mousedown = false
|
||||
let mousedownInterval = null
|
||||
$(document).on('mousedown', SELECTOR_DATA_TOGGLE_SCROLL_LEFT, e => {
|
||||
e.preventDefault()
|
||||
clearInterval(mousedownInterval)
|
||||
|
||||
let { scrollOffset } = this._config
|
||||
|
||||
if (!this._config.scrollBehaviorSwap) {
|
||||
scrollOffset = -scrollOffset
|
||||
}
|
||||
|
||||
mousedown = true
|
||||
this._navScroll(scrollOffset)
|
||||
|
||||
mousedownInterval = setInterval(() => {
|
||||
this._navScroll(scrollOffset)
|
||||
}, 250)
|
||||
})
|
||||
$(document).on('mousedown', SELECTOR_DATA_TOGGLE_SCROLL_RIGHT, e => {
|
||||
e.preventDefault()
|
||||
clearInterval(mousedownInterval)
|
||||
|
||||
let { scrollOffset } = this._config
|
||||
|
||||
if (this._config.scrollBehaviorSwap) {
|
||||
scrollOffset = -scrollOffset
|
||||
}
|
||||
|
||||
mousedown = true
|
||||
this._navScroll(scrollOffset)
|
||||
|
||||
mousedownInterval = setInterval(() => {
|
||||
this._navScroll(scrollOffset)
|
||||
}, 250)
|
||||
})
|
||||
$(document).on('mouseup', () => {
|
||||
if (mousedown) {
|
||||
mousedown = false
|
||||
clearInterval(mousedownInterval)
|
||||
mousedownInterval = null
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
_setItemActive(href) {
|
||||
$(`${SELECTOR_SIDEBAR_MENU_ITEM}, ${SELECTOR_HEADER_DROPDOWN_ITEM}`).removeClass('active')
|
||||
$(SELECTOR_HEADER_MENU_ITEM).parent().removeClass('active')
|
||||
|
||||
const $headerMenuItem = $(`${SELECTOR_HEADER_MENU_ITEM}[href$="${href}"]`)
|
||||
const $headerDropdownItem = $(`${SELECTOR_HEADER_DROPDOWN_ITEM}[href$="${href}"]`)
|
||||
const $sidebarMenuItem = $(`${SELECTOR_SIDEBAR_MENU_ITEM}[href$="${href}"]`)
|
||||
|
||||
$headerMenuItem.each((i, e) => {
|
||||
$(e).parent().addClass('active')
|
||||
})
|
||||
$headerDropdownItem.each((i, e) => {
|
||||
$(e).addClass('active')
|
||||
})
|
||||
$sidebarMenuItem.each((i, e) => {
|
||||
$(e).addClass('active')
|
||||
$(e).parents('.nav-treeview').prevAll('.nav-link').addClass('active')
|
||||
})
|
||||
}
|
||||
|
||||
_fixHeight(tabEmpty = false) {
|
||||
if ($('body').hasClass(CLASS_NAME_FULLSCREEN_MODE)) {
|
||||
const windowHeight = $(window).height()
|
||||
$(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).height(windowHeight)
|
||||
$(SELECTOR_CONTENT_WRAPPER).height(windowHeight)
|
||||
$(SELECTOR_CONTENT_IFRAME).height(windowHeight)
|
||||
} else {
|
||||
const contentWrapperHeight = parseFloat($(SELECTOR_CONTENT_WRAPPER).css('min-height'))
|
||||
const navbarHeight = $(SELECTOR_TAB_NAV).outerHeight()
|
||||
if (tabEmpty == true) {
|
||||
setTimeout(() => {
|
||||
$(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).height(contentWrapperHeight - navbarHeight)
|
||||
}, 50)
|
||||
} else {
|
||||
$(SELECTOR_CONTENT_IFRAME).height(contentWrapperHeight - navbarHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation, ...args) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new IFrame(this, _options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof operation === 'string' && operation.match(/createTab|openTabSidebar|switchTab|removeActiveTab/)) {
|
||||
data[operation](...args)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(window).on('load', () => {
|
||||
IFrame._jQueryInterface.call($(SELECTOR_DATA_TOGGLE))
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = IFrame._jQueryInterface
|
||||
$.fn[NAME].Constructor = IFrame
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return IFrame._jQueryInterface
|
||||
}
|
||||
|
||||
export default IFrame
|
||||
@@ -5,193 +5,244 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Layout = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'Layout'
|
||||
const DATA_KEY = 'lte.layout'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
SIDEBAR: 'sidebar'
|
||||
const NAME = 'Layout'
|
||||
const DATA_KEY = 'lte.layout'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_HEADER = '.main-header'
|
||||
const SELECTOR_MAIN_SIDEBAR = '.main-sidebar'
|
||||
const SELECTOR_SIDEBAR = '.main-sidebar .sidebar'
|
||||
const SELECTOR_CONTENT = '.content-wrapper'
|
||||
const SELECTOR_CONTROL_SIDEBAR_CONTENT = '.control-sidebar-content'
|
||||
const SELECTOR_CONTROL_SIDEBAR_BTN = '[data-widget="control-sidebar"]'
|
||||
const SELECTOR_FOOTER = '.main-footer'
|
||||
const SELECTOR_PUSHMENU_BTN = '[data-widget="pushmenu"]'
|
||||
const SELECTOR_LOGIN_BOX = '.login-box'
|
||||
const SELECTOR_REGISTER_BOX = '.register-box'
|
||||
|
||||
const CLASS_NAME_SIDEBAR_FOCUSED = 'sidebar-focused'
|
||||
const CLASS_NAME_LAYOUT_FIXED = 'layout-fixed'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN = 'control-sidebar-slide-open'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open'
|
||||
const CLASS_NAME_LAYOUT_TOP_NAV = 'layout-top-nav'
|
||||
|
||||
const Default = {
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'l',
|
||||
panelAutoHeight: true,
|
||||
panelAutoHeightMode: 'min-height',
|
||||
loginRegisterAutoHeight: true
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Layout {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
HEADER : '.main-header',
|
||||
MAIN_SIDEBAR : '.main-sidebar',
|
||||
SIDEBAR : '.main-sidebar .sidebar',
|
||||
CONTENT : '.content-wrapper',
|
||||
BRAND : '.brand-link',
|
||||
CONTENT_HEADER : '.content-header',
|
||||
WRAPPER : '.wrapper',
|
||||
CONTROL_SIDEBAR: '.control-sidebar',
|
||||
LAYOUT_FIXED : '.layout-fixed',
|
||||
FOOTER : '.main-footer',
|
||||
PUSHMENU_BTN : '[data-widget="pushmenu"]',
|
||||
LOGIN_BOX : '.login-box',
|
||||
REGISTER_BOX : '.register-box'
|
||||
}
|
||||
// Public
|
||||
|
||||
const ClassName = {
|
||||
HOLD : 'hold-transition',
|
||||
SIDEBAR : 'main-sidebar',
|
||||
CONTENT_FIXED : 'content-fixed',
|
||||
SIDEBAR_FOCUSED: 'sidebar-focused',
|
||||
LAYOUT_FIXED : 'layout-fixed',
|
||||
NAVBAR_FIXED : 'layout-navbar-fixed',
|
||||
FOOTER_FIXED : 'layout-footer-fixed',
|
||||
LOGIN_PAGE : 'login-page',
|
||||
REGISTER_PAGE : 'register-page',
|
||||
}
|
||||
fixLayoutHeight(extra = null) {
|
||||
const $body = $('body')
|
||||
let controlSidebar = 0
|
||||
|
||||
const Default = {
|
||||
scrollbarTheme : 'os-theme-light',
|
||||
scrollbarAutoHide: 'l'
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Layout {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
if ($body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) || extra === 'control_sidebar') {
|
||||
controlSidebar = $(SELECTOR_CONTROL_SIDEBAR_CONTENT).height()
|
||||
}
|
||||
|
||||
// Public
|
||||
const heights = {
|
||||
window: $(window).height(),
|
||||
header: $(SELECTOR_HEADER).length !== 0 ? $(SELECTOR_HEADER).outerHeight() : 0,
|
||||
footer: $(SELECTOR_FOOTER).length !== 0 ? $(SELECTOR_FOOTER).outerHeight() : 0,
|
||||
sidebar: $(SELECTOR_SIDEBAR).length !== 0 ? $(SELECTOR_SIDEBAR).height() : 0,
|
||||
controlSidebar
|
||||
}
|
||||
|
||||
fixLayoutHeight() {
|
||||
const heights = {
|
||||
window: $(window).height(),
|
||||
header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0,
|
||||
footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0,
|
||||
sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0,
|
||||
}
|
||||
const max = this._max(heights)
|
||||
let offset = this._config.panelAutoHeight
|
||||
|
||||
const max = this._max(heights)
|
||||
if (offset === true) {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
if (max == heights.window) {
|
||||
$(Selector.CONTENT).css('min-height', max - heights.header - heights.footer)
|
||||
} else {
|
||||
$(Selector.CONTENT).css('min-height', max - heights.header)
|
||||
}
|
||||
const $contentSelector = $(SELECTOR_CONTENT)
|
||||
|
||||
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
||||
$(Selector.CONTENT).css('min-height', max - heights.header - heights.footer)
|
||||
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$(Selector.SIDEBAR).overlayScrollbars({
|
||||
className : this._config.scrollbarTheme,
|
||||
sizeAutoCapable : true,
|
||||
scrollbars : {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling : true
|
||||
}
|
||||
})
|
||||
if (offset !== false) {
|
||||
if (max === heights.controlSidebar) {
|
||||
if ($body.hasClass(CLASS_NAME_LAYOUT_TOP_NAV)) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) + heights.header + heights.footer)
|
||||
} else {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
|
||||
}
|
||||
} else if (max === heights.window) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
|
||||
} else {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header)
|
||||
}
|
||||
|
||||
if (this._isFooterFixed()) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, parseFloat($contentSelector.css(this._config.panelAutoHeightMode)) + heights.footer)
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) {
|
||||
return
|
||||
}
|
||||
|
||||
_init() {
|
||||
// Activate layout height watcher
|
||||
this.fixLayoutHeight()
|
||||
$(Selector.SIDEBAR)
|
||||
.on('collapsed.lte.treeview expanded.lte.treeview', () => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
if (offset !== false) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
|
||||
}
|
||||
|
||||
$(Selector.PUSHMENU_BTN)
|
||||
.on('collapsed.lte.pushmenu shown.lte.pushmenu', () => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$(SELECTOR_SIDEBAR).overlayScrollbars({
|
||||
className: this._config.scrollbarTheme,
|
||||
sizeAutoCapable: true,
|
||||
scrollbars: {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling: true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$(window).resize(() => {
|
||||
fixLoginRegisterHeight() {
|
||||
const $body = $('body')
|
||||
const $selector = $(`${SELECTOR_LOGIN_BOX}, ${SELECTOR_REGISTER_BOX}`)
|
||||
|
||||
if ($selector.length === 0) {
|
||||
$body.css('height', 'auto')
|
||||
$('html').css('height', 'auto')
|
||||
} else {
|
||||
const boxHeight = $selector.height()
|
||||
|
||||
if ($body.css(this._config.panelAutoHeightMode) !== boxHeight) {
|
||||
$body.css(this._config.panelAutoHeightMode, boxHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
// Activate layout height watcher
|
||||
this.fixLayoutHeight()
|
||||
|
||||
if (this._config.loginRegisterAutoHeight === true) {
|
||||
this.fixLoginRegisterHeight()
|
||||
} else if (this._config.loginRegisterAutoHeight === parseInt(this._config.loginRegisterAutoHeight, 10)) {
|
||||
setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight)
|
||||
}
|
||||
|
||||
$(SELECTOR_SIDEBAR)
|
||||
.on('collapsed.lte.treeview expanded.lte.treeview', () => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
|
||||
if (!$('body').hasClass(ClassName.LOGIN_PAGE) && !$('body').hasClass(ClassName.REGISTER_PAGE)) {
|
||||
$('body, html').css('height', 'auto')
|
||||
} else if ($('body').hasClass(ClassName.LOGIN_PAGE) || $('body').hasClass(ClassName.REGISTER_PAGE)) {
|
||||
let box_height = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height()
|
||||
$(SELECTOR_PUSHMENU_BTN)
|
||||
.on('collapsed.lte.pushmenu shown.lte.pushmenu', () => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
|
||||
$('body').css('min-height', box_height);
|
||||
$(SELECTOR_CONTROL_SIDEBAR_BTN)
|
||||
.on('collapsed.lte.controlsidebar', () => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
.on('expanded.lte.controlsidebar', () => {
|
||||
this.fixLayoutHeight('control_sidebar')
|
||||
})
|
||||
|
||||
$(window).resize(() => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
|
||||
$(document).ready(() => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
$('body.hold-transition').removeClass('hold-transition')
|
||||
}, 50)
|
||||
}
|
||||
|
||||
_max(numbers) {
|
||||
// Calculate the maximum number in a list
|
||||
let max = 0
|
||||
|
||||
Object.keys(numbers).forEach(key => {
|
||||
if (numbers[key] > max) {
|
||||
max = numbers[key]
|
||||
}
|
||||
})
|
||||
|
||||
return max
|
||||
}
|
||||
|
||||
_isFooterFixed() {
|
||||
return $(SELECTOR_FOOTER).css('position') === 'fixed'
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config = '') {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Layout($(this), _options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
$('body.hold-transition').removeClass('hold-transition')
|
||||
}
|
||||
|
||||
_max(numbers) {
|
||||
// Calculate the maximum number in a list
|
||||
let max = 0
|
||||
|
||||
Object.keys(numbers).forEach((key) => {
|
||||
if (numbers[key] > max) {
|
||||
max = numbers[key]
|
||||
}
|
||||
})
|
||||
|
||||
return max
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Layout($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'init') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
if (config === 'init' || config === '') {
|
||||
data._init()
|
||||
} else if (config === 'fixLayoutHeight' || config === 'fixLoginRegisterHeight') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(window).on('load', () => {
|
||||
Layout._jQueryInterface.call($('body'))
|
||||
})
|
||||
$(window).on('load', () => {
|
||||
Layout._jQueryInterface.call($('body'))
|
||||
})
|
||||
|
||||
$(Selector.SIDEBAR + ' a').on('focusin', () => {
|
||||
$(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED);
|
||||
})
|
||||
$(`${SELECTOR_SIDEBAR} a`).on('focusin', () => {
|
||||
$(SELECTOR_MAIN_SIDEBAR).addClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
||||
})
|
||||
|
||||
$(Selector.SIDEBAR + ' a').on('focusout', () => {
|
||||
$(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED);
|
||||
})
|
||||
$(`${SELECTOR_SIDEBAR} a`).on('focusout', () => {
|
||||
$(SELECTOR_MAIN_SIDEBAR).removeClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Layout._jQueryInterface
|
||||
$.fn[NAME].Constructor = Layout
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Layout._jQueryInterface
|
||||
}
|
||||
|
||||
return Layout
|
||||
})(jQuery)
|
||||
$.fn[NAME] = Layout._jQueryInterface
|
||||
$.fn[NAME].Constructor = Layout
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Layout._jQueryInterface
|
||||
}
|
||||
|
||||
export default Layout
|
||||
|
||||
@@ -5,219 +5,223 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const PushMenu = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'PushMenu'
|
||||
const DATA_KEY = 'lte.pushmenu'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
COLLAPSED: `collapsed${EVENT_KEY}`,
|
||||
SHOWN: `shown${EVENT_KEY}`
|
||||
}
|
||||
const NAME = 'PushMenu'
|
||||
const DATA_KEY = 'lte.pushmenu'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Default = {
|
||||
autoCollapseSize: 992,
|
||||
enableRemember: false,
|
||||
noTransitionAfterReload: true
|
||||
}
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
||||
|
||||
const Selector = {
|
||||
TOGGLE_BUTTON: '[data-widget="pushmenu"]',
|
||||
SIDEBAR_MINI: '.sidebar-mini',
|
||||
SIDEBAR_COLLAPSED: '.sidebar-collapse',
|
||||
BODY: 'body',
|
||||
OVERLAY: '#sidebar-overlay',
|
||||
WRAPPER: '.wrapper'
|
||||
}
|
||||
const SELECTOR_TOGGLE_BUTTON = '[data-widget="pushmenu"]'
|
||||
const SELECTOR_BODY = 'body'
|
||||
const SELECTOR_OVERLAY = '#sidebar-overlay'
|
||||
const SELECTOR_WRAPPER = '.wrapper'
|
||||
|
||||
const ClassName = {
|
||||
SIDEBAR_OPEN: 'sidebar-open',
|
||||
COLLAPSED: 'sidebar-collapse',
|
||||
OPEN: 'sidebar-open'
|
||||
}
|
||||
const CLASS_NAME_COLLAPSED = 'sidebar-collapse'
|
||||
const CLASS_NAME_OPEN = 'sidebar-open'
|
||||
const CLASS_NAME_IS_OPENING = 'sidebar-is-opening'
|
||||
const CLASS_NAME_CLOSED = 'sidebar-closed'
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
const Default = {
|
||||
autoCollapseSize: 992,
|
||||
enableRemember: false,
|
||||
noTransitionAfterReload: true
|
||||
}
|
||||
|
||||
class PushMenu {
|
||||
constructor(element, options) {
|
||||
this._element = element
|
||||
this._options = $.extend({}, Default, options)
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
if (!$(Selector.OVERLAY).length) {
|
||||
this._addOverlay()
|
||||
}
|
||||
class PushMenu {
|
||||
constructor(element, options) {
|
||||
this._element = element
|
||||
this._options = $.extend({}, Default, options)
|
||||
|
||||
this._init()
|
||||
if ($(SELECTOR_OVERLAY).length === 0) {
|
||||
this._addOverlay()
|
||||
}
|
||||
|
||||
// Public
|
||||
this._init()
|
||||
}
|
||||
|
||||
show() {
|
||||
if (this._options.autoCollapseSize) {
|
||||
if ($(window).width() <= this._options.autoCollapseSize) {
|
||||
$(Selector.BODY).addClass(ClassName.OPEN)
|
||||
}
|
||||
// Public
|
||||
|
||||
expand() {
|
||||
const $bodySelector = $(SELECTOR_BODY)
|
||||
|
||||
if (this._options.autoCollapseSize) {
|
||||
if ($(window).width() <= this._options.autoCollapseSize) {
|
||||
$bodySelector.addClass(CLASS_NAME_OPEN)
|
||||
}
|
||||
|
||||
$(Selector.BODY).removeClass(ClassName.COLLAPSED)
|
||||
|
||||
if(this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.OPEN)
|
||||
}
|
||||
|
||||
const shownEvent = $.Event(Event.SHOWN)
|
||||
$(this._element).trigger(shownEvent)
|
||||
}
|
||||
|
||||
collapse() {
|
||||
if (this._options.autoCollapseSize) {
|
||||
if ($(window).width() <= this._options.autoCollapseSize) {
|
||||
$(Selector.BODY).removeClass(ClassName.OPEN)
|
||||
}
|
||||
}
|
||||
$bodySelector.addClass(CLASS_NAME_IS_OPENING).removeClass(`${CLASS_NAME_COLLAPSED} ${CLASS_NAME_CLOSED}`).delay(50).queue(function () {
|
||||
$bodySelector.removeClass(CLASS_NAME_IS_OPENING)
|
||||
$(this).dequeue()
|
||||
})
|
||||
|
||||
$(Selector.BODY).addClass(ClassName.COLLAPSED)
|
||||
|
||||
if(this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.COLLAPSED)
|
||||
}
|
||||
|
||||
const collapsedEvent = $.Event(Event.COLLAPSED)
|
||||
$(this._element).trigger(collapsedEvent)
|
||||
if (this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, CLASS_NAME_OPEN)
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if (!$(Selector.BODY).hasClass(ClassName.COLLAPSED )) {
|
||||
$(this._element).trigger($.Event(EVENT_SHOWN))
|
||||
}
|
||||
|
||||
collapse() {
|
||||
const $bodySelector = $(SELECTOR_BODY)
|
||||
|
||||
if (this._options.autoCollapseSize) {
|
||||
if ($(window).width() <= this._options.autoCollapseSize) {
|
||||
$bodySelector.removeClass(CLASS_NAME_OPEN).addClass(CLASS_NAME_CLOSED)
|
||||
}
|
||||
}
|
||||
|
||||
$bodySelector.addClass(CLASS_NAME_COLLAPSED)
|
||||
|
||||
if (this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, CLASS_NAME_COLLAPSED)
|
||||
}
|
||||
|
||||
$(this._element).trigger($.Event(EVENT_COLLAPSED))
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if ($(SELECTOR_BODY).hasClass(CLASS_NAME_COLLAPSED)) {
|
||||
this.expand()
|
||||
} else {
|
||||
this.collapse()
|
||||
}
|
||||
}
|
||||
|
||||
autoCollapse(resize = false) {
|
||||
if (!this._options.autoCollapseSize) {
|
||||
return
|
||||
}
|
||||
|
||||
const $bodySelector = $(SELECTOR_BODY)
|
||||
|
||||
if ($(window).width() <= this._options.autoCollapseSize) {
|
||||
if (!$bodySelector.hasClass(CLASS_NAME_OPEN)) {
|
||||
this.collapse()
|
||||
}
|
||||
} else if (resize === true) {
|
||||
if ($bodySelector.hasClass(CLASS_NAME_OPEN)) {
|
||||
$bodySelector.removeClass(CLASS_NAME_OPEN)
|
||||
} else if ($bodySelector.hasClass(CLASS_NAME_CLOSED)) {
|
||||
this.expand()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
remember() {
|
||||
if (!this._options.enableRemember) {
|
||||
return
|
||||
}
|
||||
|
||||
const $body = $('body')
|
||||
const toggleState = localStorage.getItem(`remember${EVENT_KEY}`)
|
||||
|
||||
if (toggleState === CLASS_NAME_COLLAPSED) {
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$body.addClass('hold-transition').addClass(CLASS_NAME_COLLAPSED).delay(50).queue(function () {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
this.show()
|
||||
$body.addClass(CLASS_NAME_COLLAPSED)
|
||||
}
|
||||
}
|
||||
|
||||
autoCollapse(resize = false) {
|
||||
if (this._options.autoCollapseSize) {
|
||||
if ($(window).width() <= this._options.autoCollapseSize) {
|
||||
if (!$(Selector.BODY).hasClass(ClassName.OPEN)) {
|
||||
this.collapse()
|
||||
}
|
||||
} else if (resize == true) {
|
||||
if ($(Selector.BODY).hasClass(ClassName.OPEN)) {
|
||||
$(Selector.BODY).removeClass(ClassName.OPEN)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
remember() {
|
||||
if(this._options.enableRemember) {
|
||||
let toggleState = localStorage.getItem(`remember${EVENT_KEY}`)
|
||||
if (toggleState == ClassName.COLLAPSED){
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function() {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$("body").addClass(ClassName.COLLAPSED)
|
||||
}
|
||||
} else {
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$("body").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function() {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$("body").removeClass(ClassName.COLLAPSED)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
this.remember()
|
||||
this.autoCollapse()
|
||||
|
||||
$(window).resize(() => {
|
||||
this.autoCollapse(true)
|
||||
})
|
||||
}
|
||||
|
||||
_addOverlay() {
|
||||
const overlay = $('<div />', {
|
||||
id: 'sidebar-overlay'
|
||||
})
|
||||
|
||||
overlay.on('click', () => {
|
||||
this.collapse()
|
||||
})
|
||||
|
||||
$(Selector.WRAPPER).append(overlay)
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new PushMenu(this, _options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (operation === 'toggle') {
|
||||
data[operation]()
|
||||
}
|
||||
} else if (this._options.noTransitionAfterReload) {
|
||||
$body.addClass('hold-transition').removeClass(CLASS_NAME_COLLAPSED).delay(50).queue(function () {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$body.removeClass(CLASS_NAME_COLLAPSED)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
// Private
|
||||
|
||||
$(document).on('click', Selector.TOGGLE_BUTTON, (event) => {
|
||||
event.preventDefault()
|
||||
_init() {
|
||||
this.remember()
|
||||
this.autoCollapse()
|
||||
|
||||
let button = event.currentTarget
|
||||
|
||||
if ($(button).data('widget') !== 'pushmenu') {
|
||||
button = $(button).closest(Selector.TOGGLE_BUTTON)
|
||||
}
|
||||
|
||||
PushMenu._jQueryInterface.call($(button), 'toggle')
|
||||
})
|
||||
|
||||
$(window).on('load', () => {
|
||||
PushMenu._jQueryInterface.call($(Selector.TOGGLE_BUTTON))
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = PushMenu._jQueryInterface
|
||||
$.fn[NAME].Constructor = PushMenu
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return PushMenu._jQueryInterface
|
||||
$(window).resize(() => {
|
||||
this.autoCollapse(true)
|
||||
})
|
||||
}
|
||||
|
||||
return PushMenu
|
||||
})(jQuery)
|
||||
_addOverlay() {
|
||||
const overlay = $('<div />', {
|
||||
id: 'sidebar-overlay'
|
||||
})
|
||||
|
||||
overlay.on('click', () => {
|
||||
this.collapse()
|
||||
})
|
||||
|
||||
$(SELECTOR_WRAPPER).append(overlay)
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new PushMenu(this, _options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof operation === 'string' && operation.match(/collapse|expand|toggle/)) {
|
||||
data[operation]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(document).on('click', SELECTOR_TOGGLE_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
|
||||
let button = event.currentTarget
|
||||
|
||||
if ($(button).data('widget') !== 'pushmenu') {
|
||||
button = $(button).closest(SELECTOR_TOGGLE_BUTTON)
|
||||
}
|
||||
|
||||
PushMenu._jQueryInterface.call($(button), 'toggle')
|
||||
})
|
||||
|
||||
$(window).on('load', () => {
|
||||
PushMenu._jQueryInterface.call($(SELECTOR_TOGGLE_BUTTON))
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = PushMenu._jQueryInterface
|
||||
$.fn[NAME].Constructor = PushMenu
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return PushMenu._jQueryInterface
|
||||
}
|
||||
|
||||
export default PushMenu
|
||||
|
||||
293
build/js/SidebarSearch.js
Normal file
293
build/js/SidebarSearch.js
Normal file
@@ -0,0 +1,293 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE SidebarSearch.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $, { trim } from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'SidebarSearch'
|
||||
const DATA_KEY = 'lte.sidebar-search'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const CLASS_NAME_OPEN = 'sidebar-search-open'
|
||||
const CLASS_NAME_ICON_SEARCH = 'fa-search'
|
||||
const CLASS_NAME_ICON_CLOSE = 'fa-times'
|
||||
const CLASS_NAME_HEADER = 'nav-header'
|
||||
const CLASS_NAME_SEARCH_RESULTS = 'sidebar-search-results'
|
||||
const CLASS_NAME_LIST_GROUP = 'list-group'
|
||||
|
||||
const SELECTOR_DATA_WIDGET = '[data-widget="sidebar-search"]'
|
||||
const SELECTOR_SIDEBAR = '.main-sidebar .nav-sidebar'
|
||||
const SELECTOR_NAV_LINK = '.nav-link'
|
||||
const SELECTOR_NAV_TREEVIEW = '.nav-treeview'
|
||||
const SELECTOR_SEARCH_INPUT = `${SELECTOR_DATA_WIDGET} .form-control`
|
||||
const SELECTOR_SEARCH_BUTTON = `${SELECTOR_DATA_WIDGET} .btn`
|
||||
const SELECTOR_SEARCH_ICON = `${SELECTOR_SEARCH_BUTTON} i`
|
||||
const SELECTOR_SEARCH_LIST_GROUP = `.${CLASS_NAME_LIST_GROUP}`
|
||||
const SELECTOR_SEARCH_RESULTS = `.${CLASS_NAME_SEARCH_RESULTS}`
|
||||
const SELECTOR_SEARCH_RESULTS_GROUP = `${SELECTOR_SEARCH_RESULTS} .${CLASS_NAME_LIST_GROUP}`
|
||||
|
||||
const Default = {
|
||||
arrowSign: '->',
|
||||
minLength: 3,
|
||||
maxResults: 7,
|
||||
highlightName: true,
|
||||
highlightPath: false,
|
||||
highlightClass: 'text-light',
|
||||
notFoundText: 'No element found!'
|
||||
}
|
||||
|
||||
const SearchItems = []
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class SidebarSearch {
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = $.extend({}, Default, _options)
|
||||
this.items = []
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
init() {
|
||||
if ($(SELECTOR_DATA_WIDGET).length == 0) {
|
||||
return
|
||||
}
|
||||
|
||||
if ($(SELECTOR_DATA_WIDGET).next(SELECTOR_SEARCH_RESULTS).length == 0) {
|
||||
$(SELECTOR_DATA_WIDGET).after(
|
||||
$('<div />', { class: CLASS_NAME_SEARCH_RESULTS })
|
||||
)
|
||||
}
|
||||
|
||||
if ($(SELECTOR_SEARCH_RESULTS).children(SELECTOR_SEARCH_LIST_GROUP).length == 0) {
|
||||
$(SELECTOR_SEARCH_RESULTS).append(
|
||||
$('<div />', { class: CLASS_NAME_LIST_GROUP })
|
||||
)
|
||||
}
|
||||
|
||||
this._addNotFound()
|
||||
|
||||
$(SELECTOR_SIDEBAR).children().each((i, child) => {
|
||||
this._parseItem(child)
|
||||
})
|
||||
}
|
||||
|
||||
search() {
|
||||
const searchValue = $(SELECTOR_SEARCH_INPUT).val().toLowerCase()
|
||||
if (searchValue.length < this.options.minLength) {
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).empty()
|
||||
this._addNotFound()
|
||||
this.close()
|
||||
return
|
||||
}
|
||||
|
||||
const searchResults = SearchItems.filter(item => (item.name).toLowerCase().includes(searchValue))
|
||||
const endResults = $(searchResults.slice(0, this.options.maxResults))
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).empty()
|
||||
|
||||
if (endResults.length === 0) {
|
||||
this._addNotFound()
|
||||
} else {
|
||||
endResults.each((i, result) => {
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).append(this._renderItem(result.name, result.link, result.path))
|
||||
})
|
||||
}
|
||||
|
||||
this.open()
|
||||
}
|
||||
|
||||
open() {
|
||||
$(SELECTOR_DATA_WIDGET).parent().addClass(CLASS_NAME_OPEN)
|
||||
$(SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_SEARCH).addClass(CLASS_NAME_ICON_CLOSE)
|
||||
}
|
||||
|
||||
close() {
|
||||
$(SELECTOR_DATA_WIDGET).parent().removeClass(CLASS_NAME_OPEN)
|
||||
$(SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_CLOSE).addClass(CLASS_NAME_ICON_SEARCH)
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if ($(SELECTOR_DATA_WIDGET).parent().hasClass(CLASS_NAME_OPEN)) {
|
||||
this.close()
|
||||
} else {
|
||||
this.open()
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_parseItem(item, path = []) {
|
||||
if ($(item).hasClass(CLASS_NAME_HEADER)) {
|
||||
return
|
||||
}
|
||||
|
||||
const itemObject = {}
|
||||
const navLink = $(item).clone().find(`> ${SELECTOR_NAV_LINK}`)
|
||||
const navTreeview = $(item).clone().find(`> ${SELECTOR_NAV_TREEVIEW}`)
|
||||
|
||||
const link = navLink.attr('href')
|
||||
const name = navLink.find('p').children().remove().end().text()
|
||||
|
||||
itemObject.name = this._trimText(name)
|
||||
itemObject.link = link
|
||||
itemObject.path = path
|
||||
|
||||
if (navTreeview.length === 0) {
|
||||
SearchItems.push(itemObject)
|
||||
} else {
|
||||
const newPath = itemObject.path.concat([itemObject.name])
|
||||
navTreeview.children().each((i, child) => {
|
||||
this._parseItem(child, newPath)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
_trimText(text) {
|
||||
return trim(text.replace(/(\r\n|\n|\r)/gm, ' '))
|
||||
}
|
||||
|
||||
_renderItem(name, link, path) {
|
||||
path = path.join(` ${this.options.arrowSign} `)
|
||||
|
||||
if (this.options.highlightName || this.options.highlightPath) {
|
||||
const searchValue = $(SELECTOR_SEARCH_INPUT).val().toLowerCase()
|
||||
const regExp = new RegExp(searchValue, 'gi')
|
||||
|
||||
if (this.options.highlightName) {
|
||||
name = name.replace(
|
||||
regExp,
|
||||
str => {
|
||||
return `<b class="${this.options.highlightClass}">${str}</b>`
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (this.options.highlightPath) {
|
||||
path = path.replace(
|
||||
regExp,
|
||||
str => {
|
||||
return `<b class="${this.options.highlightClass}">${str}</b>`
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return `<a href="${link}" class="list-group-item">
|
||||
<div class="search-title">
|
||||
${name}
|
||||
</div>
|
||||
<div class="search-path">
|
||||
${path}
|
||||
</div>
|
||||
</a>`
|
||||
}
|
||||
|
||||
_addNotFound() {
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).append(this._renderItem(this.options.notFoundText, '#', []))
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = $(this).data()
|
||||
}
|
||||
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
const plugin = new SidebarSearch($(this), _options)
|
||||
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : data)
|
||||
|
||||
if (typeof config === 'string' && config.match(/init|toggle|close|open|search/)) {
|
||||
plugin[config]()
|
||||
} else {
|
||||
plugin.init()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_SEARCH_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
|
||||
SidebarSearch._jQueryInterface.call($(SELECTOR_DATA_WIDGET), 'toggle')
|
||||
})
|
||||
|
||||
$(document).on('keyup', SELECTOR_SEARCH_INPUT, event => {
|
||||
if (event.keyCode == 38) {
|
||||
event.preventDefault()
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).children().last().focus()
|
||||
return
|
||||
}
|
||||
|
||||
if (event.keyCode == 40) {
|
||||
event.preventDefault()
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).children().first().focus()
|
||||
return
|
||||
}
|
||||
|
||||
let timer = 0
|
||||
clearTimeout(timer)
|
||||
timer = setTimeout(() => {
|
||||
SidebarSearch._jQueryInterface.call($(SELECTOR_DATA_WIDGET), 'search')
|
||||
}, 100)
|
||||
})
|
||||
|
||||
$(document).on('keydown', SELECTOR_SEARCH_RESULTS_GROUP, event => {
|
||||
const $focused = $(':focus')
|
||||
|
||||
if (event.keyCode == 38) {
|
||||
event.preventDefault()
|
||||
|
||||
if ($focused.is(':first-child')) {
|
||||
$focused.siblings().last().focus()
|
||||
} else {
|
||||
$focused.prev().focus()
|
||||
}
|
||||
}
|
||||
|
||||
if (event.keyCode == 40) {
|
||||
event.preventDefault()
|
||||
|
||||
if ($focused.is(':last-child')) {
|
||||
$focused.siblings().first().focus()
|
||||
} else {
|
||||
$focused.next().focus()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$(window).on('load', () => {
|
||||
SidebarSearch._jQueryInterface.call($(SELECTOR_DATA_WIDGET), 'init')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = SidebarSearch._jQueryInterface
|
||||
$.fn[NAME].Constructor = SidebarSearch
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return SidebarSearch._jQueryInterface
|
||||
}
|
||||
|
||||
export default SidebarSearch
|
||||
@@ -5,123 +5,113 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const SiteSearch = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'SiteSearch'
|
||||
const DATA_KEY = 'lte.site-search'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {}
|
||||
const NAME = 'SiteSearch'
|
||||
const DATA_KEY = 'lte.site-search'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Selector = {
|
||||
TOGGLE_BUTTON : '[data-widget="site-search"]',
|
||||
SEARCH_BLOCK : '.site-search-block',
|
||||
SEARCH_BACKDROP: '.site-search-backdrop',
|
||||
SEARCH_INPUT : '.site-search-block .form-control'
|
||||
const SELECTOR_TOGGLE_BUTTON = '[data-widget="site-search"]'
|
||||
const SELECTOR_SEARCH_BLOCK = '.site-search-block'
|
||||
const SELECTOR_SEARCH_BACKDROP = '.site-search-backdrop'
|
||||
const SELECTOR_SEARCH_INPUT = '.site-search-block .form-control'
|
||||
|
||||
const CLASS_NAME_OPEN = 'site-search-open'
|
||||
|
||||
const Default = {
|
||||
transitionSpeed: 300
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class SiteSearch {
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = $.extend({}, Default, _options)
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
OPEN: 'site-search-open'
|
||||
// Public
|
||||
|
||||
open() {
|
||||
$(SELECTOR_SEARCH_BLOCK).slideDown(this.options.transitionSpeed)
|
||||
$(SELECTOR_SEARCH_BACKDROP).show(0)
|
||||
$(SELECTOR_SEARCH_INPUT).focus()
|
||||
$(SELECTOR_SEARCH_BLOCK).addClass(CLASS_NAME_OPEN)
|
||||
}
|
||||
|
||||
const Default = {
|
||||
transitionSpeed: 300
|
||||
close() {
|
||||
$(SELECTOR_SEARCH_BLOCK).slideUp(this.options.transitionSpeed)
|
||||
$(SELECTOR_SEARCH_BACKDROP).hide(0)
|
||||
$(SELECTOR_SEARCH_BLOCK).removeClass(CLASS_NAME_OPEN)
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class SiteSearch {
|
||||
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = $.extend({}, Default, _options)
|
||||
toggle() {
|
||||
if ($(SELECTOR_SEARCH_BLOCK).hasClass(CLASS_NAME_OPEN)) {
|
||||
this.close()
|
||||
} else {
|
||||
this.open()
|
||||
}
|
||||
}
|
||||
|
||||
// Public
|
||||
// Static
|
||||
|
||||
open() {
|
||||
$(Selector.SEARCH_BLOCK).slideDown(this.options.transitionSpeed)
|
||||
$(Selector.SEARCH_BACKDROP).show(0)
|
||||
$(Selector.SEARCH_INPUT).focus()
|
||||
$(Selector.SEARCH_BLOCK).addClass(ClassName.OPEN)
|
||||
}
|
||||
static _jQueryInterface(options) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
close() {
|
||||
$(Selector.SEARCH_BLOCK).slideUp(this.options.transitionSpeed)
|
||||
$(Selector.SEARCH_BACKDROP).hide(0)
|
||||
$(Selector.SEARCH_BLOCK).removeClass(ClassName.OPEN)
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if ($(Selector.SEARCH_BLOCK).hasClass(ClassName.OPEN)) {
|
||||
this.close()
|
||||
} else {
|
||||
this.open()
|
||||
if (!data) {
|
||||
data = new SiteSearch(this, options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
if (!/toggle|close/.test(options)) {
|
||||
throw new Error(`Undefined method ${options}`)
|
||||
}
|
||||
|
||||
static _jQueryInterface(options) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
data[options]()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new SiteSearch(this, options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_TOGGLE_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
|
||||
if (!/toggle|close/.test(options)) {
|
||||
throw Error(`Undefined method ${options}`)
|
||||
}
|
||||
let button = $(event.currentTarget)
|
||||
|
||||
data[options]()
|
||||
})
|
||||
}
|
||||
if (button.data('widget') !== 'site-search') {
|
||||
button = button.closest(SELECTOR_TOGGLE_BUTTON)
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', Selector.TOGGLE_BUTTON, (event) => {
|
||||
event.preventDefault()
|
||||
SiteSearch._jQueryInterface.call(button, 'toggle')
|
||||
})
|
||||
|
||||
let button = $(event.currentTarget)
|
||||
$(document).on('click', SELECTOR_SEARCH_BACKDROP, event => {
|
||||
const backdrop = $(event.currentTarget)
|
||||
SiteSearch._jQueryInterface.call(backdrop, 'close')
|
||||
})
|
||||
|
||||
if (button.data('widget') !== 'site-search') {
|
||||
button = button.closest(Selector.TOGGLE_BUTTON)
|
||||
}
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
SiteSearch._jQueryInterface.call(button, 'toggle')
|
||||
})
|
||||
|
||||
$(document).on('click', Selector.SEARCH_BACKDROP, (event) => {
|
||||
const backdrop = $(event.currentTarget)
|
||||
SiteSearch._jQueryInterface.call(backdrop, 'close')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = SiteSearch._jQueryInterface
|
||||
$.fn[NAME].Constructor = SiteSearch
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return SiteSearch._jQueryInterface
|
||||
}
|
||||
|
||||
return SiteSearch
|
||||
})(jQuery)
|
||||
$.fn[NAME] = SiteSearch._jQueryInterface
|
||||
$.fn[NAME].Constructor = SiteSearch
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return SiteSearch._jQueryInterface
|
||||
}
|
||||
|
||||
export default SiteSearch
|
||||
|
||||
@@ -5,225 +5,205 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Toasts = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'Toasts'
|
||||
const DATA_KEY = 'lte.toasts'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
INIT: `init${EVENT_KEY}`,
|
||||
CREATED: `created${EVENT_KEY}`,
|
||||
REMOVED: `removed${EVENT_KEY}`,
|
||||
const NAME = 'Toasts'
|
||||
const DATA_KEY = 'lte.toasts'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_INIT = `init${EVENT_KEY}`
|
||||
const EVENT_CREATED = `created${EVENT_KEY}`
|
||||
const EVENT_REMOVED = `removed${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_CONTAINER_TOP_RIGHT = '#toastsContainerTopRight'
|
||||
const SELECTOR_CONTAINER_TOP_LEFT = '#toastsContainerTopLeft'
|
||||
const SELECTOR_CONTAINER_BOTTOM_RIGHT = '#toastsContainerBottomRight'
|
||||
const SELECTOR_CONTAINER_BOTTOM_LEFT = '#toastsContainerBottomLeft'
|
||||
|
||||
const CLASS_NAME_TOP_RIGHT = 'toasts-top-right'
|
||||
const CLASS_NAME_TOP_LEFT = 'toasts-top-left'
|
||||
const CLASS_NAME_BOTTOM_RIGHT = 'toasts-bottom-right'
|
||||
const CLASS_NAME_BOTTOM_LEFT = 'toasts-bottom-left'
|
||||
|
||||
const POSITION_TOP_RIGHT = 'topRight'
|
||||
const POSITION_TOP_LEFT = 'topLeft'
|
||||
const POSITION_BOTTOM_RIGHT = 'bottomRight'
|
||||
const POSITION_BOTTOM_LEFT = 'bottomLeft'
|
||||
|
||||
const Default = {
|
||||
position: POSITION_TOP_RIGHT,
|
||||
fixed: true,
|
||||
autohide: false,
|
||||
autoremove: true,
|
||||
delay: 1000,
|
||||
fade: true,
|
||||
icon: null,
|
||||
image: null,
|
||||
imageAlt: null,
|
||||
imageHeight: '25px',
|
||||
title: null,
|
||||
subtitle: null,
|
||||
close: true,
|
||||
body: null,
|
||||
class: null
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
class Toasts {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._prepareContainer()
|
||||
|
||||
$('body').trigger($.Event(EVENT_INIT))
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
BODY: 'toast-body',
|
||||
CONTAINER_TOP_RIGHT: '#toastsContainerTopRight',
|
||||
CONTAINER_TOP_LEFT: '#toastsContainerTopLeft',
|
||||
CONTAINER_BOTTOM_RIGHT: '#toastsContainerBottomRight',
|
||||
CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft',
|
||||
}
|
||||
// Public
|
||||
|
||||
const ClassName = {
|
||||
TOP_RIGHT: 'toasts-top-right',
|
||||
TOP_LEFT: 'toasts-top-left',
|
||||
BOTTOM_RIGHT: 'toasts-bottom-right',
|
||||
BOTTOM_LEFT: 'toasts-bottom-left',
|
||||
FADE: 'fade',
|
||||
}
|
||||
create() {
|
||||
const toast = $('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>')
|
||||
|
||||
const Position = {
|
||||
TOP_RIGHT: 'topRight',
|
||||
TOP_LEFT: 'topLeft',
|
||||
BOTTOM_RIGHT: 'bottomRight',
|
||||
BOTTOM_LEFT: 'bottomLeft',
|
||||
}
|
||||
toast.data('autohide', this._config.autohide)
|
||||
toast.data('animation', this._config.fade)
|
||||
|
||||
const Id = {
|
||||
CONTAINER_TOP_RIGHT: 'toastsContainerTopRight',
|
||||
CONTAINER_TOP_LEFT: 'toastsContainerTopLeft',
|
||||
CONTAINER_BOTTOM_RIGHT: 'toastsContainerBottomRight',
|
||||
CONTAINER_BOTTOM_LEFT: 'toastsContainerBottomLeft',
|
||||
}
|
||||
|
||||
const Default = {
|
||||
position: Position.TOP_RIGHT,
|
||||
fixed: true,
|
||||
autohide: false,
|
||||
autoremove: true,
|
||||
delay: 1000,
|
||||
fade: true,
|
||||
icon: null,
|
||||
image: null,
|
||||
imageAlt: null,
|
||||
imageHeight: '25px',
|
||||
title: null,
|
||||
subtitle: null,
|
||||
close: true,
|
||||
body: null,
|
||||
class: null,
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
class Toasts {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
|
||||
this._prepareContainer();
|
||||
|
||||
const initEvent = $.Event(Event.INIT)
|
||||
$('body').trigger(initEvent)
|
||||
if (this._config.class) {
|
||||
toast.addClass(this._config.class)
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
create() {
|
||||
var toast = $('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>')
|
||||
|
||||
toast.data('autohide', this._config.autohide)
|
||||
toast.data('animation', this._config.fade)
|
||||
|
||||
if (this._config.class) {
|
||||
toast.addClass(this._config.class)
|
||||
}
|
||||
|
||||
if (this._config.delay && this._config.delay != 500) {
|
||||
toast.data('delay', this._config.delay)
|
||||
}
|
||||
|
||||
var toast_header = $('<div class="toast-header">')
|
||||
|
||||
if (this._config.image != null) {
|
||||
var toast_image = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt)
|
||||
|
||||
if (this._config.imageHeight != null) {
|
||||
toast_image.height(this._config.imageHeight).width('auto')
|
||||
}
|
||||
|
||||
toast_header.append(toast_image)
|
||||
}
|
||||
|
||||
if (this._config.icon != null) {
|
||||
toast_header.append($('<i />').addClass('mr-2').addClass(this._config.icon))
|
||||
}
|
||||
|
||||
if (this._config.title != null) {
|
||||
toast_header.append($('<strong />').addClass('mr-auto').html(this._config.title))
|
||||
}
|
||||
|
||||
if (this._config.subtitle != null) {
|
||||
toast_header.append($('<small />').html(this._config.subtitle))
|
||||
}
|
||||
|
||||
if (this._config.close == true) {
|
||||
var toast_close = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">×</span>')
|
||||
|
||||
if (this._config.title == null) {
|
||||
toast_close.toggleClass('ml-2 ml-auto')
|
||||
}
|
||||
|
||||
toast_header.append(toast_close)
|
||||
}
|
||||
|
||||
toast.append(toast_header)
|
||||
|
||||
if (this._config.body != null) {
|
||||
toast.append($('<div class="toast-body" />').html(this._config.body))
|
||||
}
|
||||
|
||||
$(this._getContainerId()).prepend(toast)
|
||||
|
||||
const createdEvent = $.Event(Event.CREATED)
|
||||
$('body').trigger(createdEvent)
|
||||
|
||||
toast.toast('show')
|
||||
|
||||
|
||||
if (this._config.autoremove) {
|
||||
toast.on('hidden.bs.toast', function () {
|
||||
$(this).delay(200).remove();
|
||||
|
||||
const removedEvent = $.Event(Event.REMOVED)
|
||||
$('body').trigger(removedEvent)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if (this._config.delay && this._config.delay != 500) {
|
||||
toast.data('delay', this._config.delay)
|
||||
}
|
||||
|
||||
// Static
|
||||
const toastHeader = $('<div class="toast-header">')
|
||||
|
||||
_getContainerId() {
|
||||
if (this._config.position == Position.TOP_RIGHT) {
|
||||
return Selector.CONTAINER_TOP_RIGHT;
|
||||
} else if (this._config.position == Position.TOP_LEFT) {
|
||||
return Selector.CONTAINER_TOP_LEFT;
|
||||
} else if (this._config.position == Position.BOTTOM_RIGHT) {
|
||||
return Selector.CONTAINER_BOTTOM_RIGHT;
|
||||
} else if (this._config.position == Position.BOTTOM_LEFT) {
|
||||
return Selector.CONTAINER_BOTTOM_LEFT;
|
||||
if (this._config.image != null) {
|
||||
const toastImage = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt)
|
||||
|
||||
if (this._config.imageHeight != null) {
|
||||
toastImage.height(this._config.imageHeight).width('auto')
|
||||
}
|
||||
|
||||
toastHeader.append(toastImage)
|
||||
}
|
||||
|
||||
_prepareContainer() {
|
||||
if ($(this._getContainerId()).length === 0) {
|
||||
var container = $('<div />').attr('id', this._getContainerId().replace('#', ''))
|
||||
if (this._config.position == Position.TOP_RIGHT) {
|
||||
container.addClass(ClassName.TOP_RIGHT)
|
||||
} else if (this._config.position == Position.TOP_LEFT) {
|
||||
container.addClass(ClassName.TOP_LEFT)
|
||||
} else if (this._config.position == Position.BOTTOM_RIGHT) {
|
||||
container.addClass(ClassName.BOTTOM_RIGHT)
|
||||
} else if (this._config.position == Position.BOTTOM_LEFT) {
|
||||
container.addClass(ClassName.BOTTOM_LEFT)
|
||||
}
|
||||
|
||||
$('body').append(container)
|
||||
}
|
||||
|
||||
if (this._config.fixed) {
|
||||
$(this._getContainerId()).addClass('fixed')
|
||||
} else {
|
||||
$(this._getContainerId()).removeClass('fixed')
|
||||
}
|
||||
if (this._config.icon != null) {
|
||||
toastHeader.append($('<i />').addClass('mr-2').addClass(this._config.icon))
|
||||
}
|
||||
|
||||
// Static
|
||||
if (this._config.title != null) {
|
||||
toastHeader.append($('<strong />').addClass('mr-auto').html(this._config.title))
|
||||
}
|
||||
|
||||
static _jQueryInterface(option, config) {
|
||||
return this.each(function () {
|
||||
const _config = $.extend({}, Default, config)
|
||||
var toast = new Toasts($(this), _config)
|
||||
if (this._config.subtitle != null) {
|
||||
toastHeader.append($('<small />').html(this._config.subtitle))
|
||||
}
|
||||
|
||||
if (option === 'create') {
|
||||
toast[option]()
|
||||
}
|
||||
if (this._config.close == true) {
|
||||
const toastClose = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">×</span>')
|
||||
|
||||
if (this._config.title == null) {
|
||||
toastClose.toggleClass('ml-2 ml-auto')
|
||||
}
|
||||
|
||||
toastHeader.append(toastClose)
|
||||
}
|
||||
|
||||
toast.append(toastHeader)
|
||||
|
||||
if (this._config.body != null) {
|
||||
toast.append($('<div class="toast-body" />').html(this._config.body))
|
||||
}
|
||||
|
||||
$(this._getContainerId()).prepend(toast)
|
||||
|
||||
const $body = $('body')
|
||||
|
||||
$body.trigger($.Event(EVENT_CREATED))
|
||||
toast.toast('show')
|
||||
|
||||
if (this._config.autoremove) {
|
||||
toast.on('hidden.bs.toast', function () {
|
||||
$(this).delay(200).remove()
|
||||
$body.trigger($.Event(EVENT_REMOVED))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
// Static
|
||||
|
||||
$.fn[NAME] = Toasts._jQueryInterface
|
||||
$.fn[NAME].Constructor = Toasts
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Toasts._jQueryInterface
|
||||
_getContainerId() {
|
||||
if (this._config.position == POSITION_TOP_RIGHT) {
|
||||
return SELECTOR_CONTAINER_TOP_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position == POSITION_TOP_LEFT) {
|
||||
return SELECTOR_CONTAINER_TOP_LEFT
|
||||
}
|
||||
|
||||
if (this._config.position == POSITION_BOTTOM_RIGHT) {
|
||||
return SELECTOR_CONTAINER_BOTTOM_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position == POSITION_BOTTOM_LEFT) {
|
||||
return SELECTOR_CONTAINER_BOTTOM_LEFT
|
||||
}
|
||||
}
|
||||
|
||||
return Toasts
|
||||
})(jQuery)
|
||||
_prepareContainer() {
|
||||
if ($(this._getContainerId()).length === 0) {
|
||||
const container = $('<div />').attr('id', this._getContainerId().replace('#', ''))
|
||||
if (this._config.position == POSITION_TOP_RIGHT) {
|
||||
container.addClass(CLASS_NAME_TOP_RIGHT)
|
||||
} else if (this._config.position == POSITION_TOP_LEFT) {
|
||||
container.addClass(CLASS_NAME_TOP_LEFT)
|
||||
} else if (this._config.position == POSITION_BOTTOM_RIGHT) {
|
||||
container.addClass(CLASS_NAME_BOTTOM_RIGHT)
|
||||
} else if (this._config.position == POSITION_BOTTOM_LEFT) {
|
||||
container.addClass(CLASS_NAME_BOTTOM_LEFT)
|
||||
}
|
||||
|
||||
$('body').append(container)
|
||||
}
|
||||
|
||||
if (this._config.fixed) {
|
||||
$(this._getContainerId()).addClass('fixed')
|
||||
} else {
|
||||
$(this._getContainerId()).removeClass('fixed')
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(option, config) {
|
||||
return this.each(function () {
|
||||
const _options = $.extend({}, Default, config)
|
||||
const toast = new Toasts($(this), _options)
|
||||
|
||||
if (option === 'create') {
|
||||
toast[option]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Toasts._jQueryInterface
|
||||
$.fn[NAME].Constructor = Toasts
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Toasts._jQueryInterface
|
||||
}
|
||||
|
||||
export default Toasts
|
||||
|
||||
@@ -5,118 +5,114 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const TodoList = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'TodoList'
|
||||
const DATA_KEY = 'lte.todolist'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Selector = {
|
||||
DATA_TOGGLE: '[data-widget="todo-list"]'
|
||||
const NAME = 'TodoList'
|
||||
const DATA_KEY = 'lte.todolist'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="todo-list"]'
|
||||
const CLASS_NAME_TODO_LIST_DONE = 'done'
|
||||
|
||||
const Default = {
|
||||
onCheck(item) {
|
||||
return item
|
||||
},
|
||||
onUnCheck(item) {
|
||||
return item
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class TodoList {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
TODO_LIST_DONE: 'done'
|
||||
}
|
||||
// Public
|
||||
|
||||
const Default = {
|
||||
onCheck: function (item) {
|
||||
return item;
|
||||
},
|
||||
onUnCheck: function (item) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class TodoList {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
toggle(item) {
|
||||
item.parents('li').toggleClass(CLASS_NAME_TODO_LIST_DONE)
|
||||
if (!$(item).prop('checked')) {
|
||||
this.unCheck($(item))
|
||||
return
|
||||
}
|
||||
|
||||
// Public
|
||||
this.check(item)
|
||||
}
|
||||
|
||||
toggle(item) {
|
||||
item.parents('li').toggleClass(ClassName.TODO_LIST_DONE);
|
||||
if (! $(item).prop('checked')) {
|
||||
this.unCheck($(item));
|
||||
return;
|
||||
check(item) {
|
||||
this._config.onCheck.call(item)
|
||||
}
|
||||
|
||||
unCheck(item) {
|
||||
this._config.onUnCheck.call(item)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
const $toggleSelector = this._element
|
||||
|
||||
$toggleSelector.find('input:checkbox:checked').parents('li').toggleClass(CLASS_NAME_TODO_LIST_DONE)
|
||||
$toggleSelector.on('change', 'input:checkbox', event => {
|
||||
this.toggle($(event.target))
|
||||
})
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = $(this).data()
|
||||
}
|
||||
|
||||
this.check(item);
|
||||
}
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
const plugin = new TodoList($(this), _options)
|
||||
|
||||
check (item) {
|
||||
this._config.onCheck.call(item);
|
||||
}
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : data)
|
||||
|
||||
unCheck (item) {
|
||||
this._config.onUnCheck.call(item);
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
var that = this
|
||||
$(Selector.DATA_TOGGLE).find('input:checkbox:checked').parents('li').toggleClass(ClassName.TODO_LIST_DONE)
|
||||
$(Selector.DATA_TOGGLE).on('change', 'input:checkbox', (event) => {
|
||||
that.toggle($(event.target))
|
||||
})
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new TodoList($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'init') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
if (config === 'init') {
|
||||
plugin[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(window).on('load', () => {
|
||||
TodoList._jQueryInterface.call($(Selector.DATA_TOGGLE))
|
||||
})
|
||||
$(window).on('load', () => {
|
||||
TodoList._jQueryInterface.call($(SELECTOR_DATA_TOGGLE))
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = TodoList._jQueryInterface
|
||||
$.fn[NAME].Constructor = TodoList
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return TodoList._jQueryInterface
|
||||
}
|
||||
|
||||
return TodoList
|
||||
})(jQuery)
|
||||
$.fn[NAME] = TodoList._jQueryInterface
|
||||
$.fn[NAME].Constructor = TodoList
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return TodoList._jQueryInterface
|
||||
}
|
||||
|
||||
export default TodoList
|
||||
|
||||
@@ -5,168 +5,171 @@
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Treeview = (($) => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
|
||||
const NAME = 'Treeview'
|
||||
const DATA_KEY = 'lte.treeview'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const Event = {
|
||||
SELECTED : `selected${EVENT_KEY}`,
|
||||
EXPANDED : `expanded${EVENT_KEY}`,
|
||||
COLLAPSED : `collapsed${EVENT_KEY}`,
|
||||
LOAD_DATA_API: `load${EVENT_KEY}`
|
||||
const NAME = 'Treeview'
|
||||
const DATA_KEY = 'lte.treeview'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_EXPANDED = `expanded${EVENT_KEY}`
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_LI = '.nav-item'
|
||||
const SELECTOR_LINK = '.nav-link'
|
||||
const SELECTOR_TREEVIEW_MENU = '.nav-treeview'
|
||||
const SELECTOR_OPEN = '.menu-open'
|
||||
const SELECTOR_DATA_WIDGET = '[data-widget="treeview"]'
|
||||
|
||||
const CLASS_NAME_OPEN = 'menu-open'
|
||||
const CLASS_NAME_IS_OPENING = 'menu-is-opening'
|
||||
const CLASS_NAME_SIDEBAR_COLLAPSED = 'sidebar-collapse'
|
||||
|
||||
const Default = {
|
||||
trigger: `${SELECTOR_DATA_WIDGET} ${SELECTOR_LINK}`,
|
||||
animationSpeed: 300,
|
||||
accordion: true,
|
||||
expandSidebar: false,
|
||||
sidebarButtonSelector: '[data-widget="pushmenu"]'
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
class Treeview {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
LI : '.nav-item',
|
||||
LINK : '.nav-link',
|
||||
TREEVIEW_MENU: '.nav-treeview',
|
||||
OPEN : '.menu-open',
|
||||
DATA_WIDGET : '[data-widget="treeview"]'
|
||||
// Public
|
||||
|
||||
init() {
|
||||
$(`${SELECTOR_LI}${SELECTOR_OPEN} ${SELECTOR_TREEVIEW_MENU}`).css('display', 'block')
|
||||
this._setupListeners()
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
LI : 'nav-item',
|
||||
LINK : 'nav-link',
|
||||
TREEVIEW_MENU: 'nav-treeview',
|
||||
OPEN : 'menu-open'
|
||||
}
|
||||
expand(treeviewMenu, parentLi) {
|
||||
const expandedEvent = $.Event(EVENT_EXPANDED)
|
||||
|
||||
const Default = {
|
||||
trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`,
|
||||
animationSpeed: 300,
|
||||
accordion : true
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
class Treeview {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
if (this._config.accordion) {
|
||||
const openMenuLi = parentLi.siblings(SELECTOR_OPEN).first()
|
||||
const openTreeview = openMenuLi.find(SELECTOR_TREEVIEW_MENU).first()
|
||||
this.collapse(openTreeview, openMenuLi)
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
init() {
|
||||
this._setupListeners()
|
||||
}
|
||||
|
||||
expand(treeviewMenu, parentLi) {
|
||||
const expandedEvent = $.Event(Event.EXPANDED)
|
||||
|
||||
if (this._config.accordion) {
|
||||
const openMenuLi = parentLi.siblings(Selector.OPEN).first()
|
||||
const openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()
|
||||
this.collapse(openTreeview, openMenuLi)
|
||||
}
|
||||
|
||||
treeviewMenu.stop().slideDown(this._config.animationSpeed, () => {
|
||||
parentLi.addClass(ClassName.OPEN)
|
||||
$(this._element).trigger(expandedEvent)
|
||||
})
|
||||
}
|
||||
|
||||
collapse(treeviewMenu, parentLi) {
|
||||
const collapsedEvent = $.Event(Event.COLLAPSED)
|
||||
|
||||
treeviewMenu.stop().slideUp(this._config.animationSpeed, () => {
|
||||
parentLi.removeClass(ClassName.OPEN)
|
||||
$(this._element).trigger(collapsedEvent)
|
||||
treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp()
|
||||
treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN)
|
||||
})
|
||||
}
|
||||
|
||||
toggle(event) {
|
||||
|
||||
const $relativeTarget = $(event.currentTarget)
|
||||
const $parent = $relativeTarget.parent()
|
||||
|
||||
let treeviewMenu = $parent.find('> ' + Selector.TREEVIEW_MENU)
|
||||
|
||||
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
|
||||
|
||||
if (!$parent.is(Selector.LI)) {
|
||||
treeviewMenu = $parent.parent().find('> ' + Selector.TREEVIEW_MENU)
|
||||
}
|
||||
|
||||
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
event.preventDefault()
|
||||
|
||||
const parentLi = $relativeTarget.parents(Selector.LI).first()
|
||||
const isOpen = parentLi.hasClass(ClassName.OPEN)
|
||||
|
||||
if (isOpen) {
|
||||
this.collapse($(treeviewMenu), parentLi)
|
||||
} else {
|
||||
this.expand($(treeviewMenu), parentLi)
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_setupListeners() {
|
||||
$(document).on('click', this._config.trigger, (event) => {
|
||||
this.toggle(event)
|
||||
})
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Treeview($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'init') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(window).on(Event.LOAD_DATA_API, () => {
|
||||
$(Selector.DATA_WIDGET).each(function () {
|
||||
Treeview._jQueryInterface.call($(this), 'init')
|
||||
parentLi.addClass(CLASS_NAME_IS_OPENING)
|
||||
treeviewMenu.stop().slideDown(this._config.animationSpeed, () => {
|
||||
parentLi.addClass(CLASS_NAME_OPEN)
|
||||
$(this._element).trigger(expandedEvent)
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Treeview._jQueryInterface
|
||||
$.fn[NAME].Constructor = Treeview
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Treeview._jQueryInterface
|
||||
if (this._config.expandSidebar) {
|
||||
this._expandSidebar()
|
||||
}
|
||||
}
|
||||
|
||||
return Treeview
|
||||
})(jQuery)
|
||||
collapse(treeviewMenu, parentLi) {
|
||||
const collapsedEvent = $.Event(EVENT_COLLAPSED)
|
||||
|
||||
parentLi.removeClass(`${CLASS_NAME_IS_OPENING} ${CLASS_NAME_OPEN}`)
|
||||
treeviewMenu.stop().slideUp(this._config.animationSpeed, () => {
|
||||
$(this._element).trigger(collapsedEvent)
|
||||
treeviewMenu.find(`${SELECTOR_OPEN} > ${SELECTOR_TREEVIEW_MENU}`).slideUp()
|
||||
treeviewMenu.find(SELECTOR_OPEN).removeClass(CLASS_NAME_OPEN)
|
||||
})
|
||||
}
|
||||
|
||||
toggle(event) {
|
||||
const $relativeTarget = $(event.currentTarget)
|
||||
const $parent = $relativeTarget.parent()
|
||||
|
||||
let treeviewMenu = $parent.find(`> ${SELECTOR_TREEVIEW_MENU}`)
|
||||
|
||||
if (!treeviewMenu.is(SELECTOR_TREEVIEW_MENU)) {
|
||||
if (!$parent.is(SELECTOR_LI)) {
|
||||
treeviewMenu = $parent.parent().find(`> ${SELECTOR_TREEVIEW_MENU}`)
|
||||
}
|
||||
|
||||
if (!treeviewMenu.is(SELECTOR_TREEVIEW_MENU)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
event.preventDefault()
|
||||
|
||||
const parentLi = $relativeTarget.parents(SELECTOR_LI).first()
|
||||
const isOpen = parentLi.hasClass(CLASS_NAME_OPEN)
|
||||
|
||||
if (isOpen) {
|
||||
this.collapse($(treeviewMenu), parentLi)
|
||||
} else {
|
||||
this.expand($(treeviewMenu), parentLi)
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_setupListeners() {
|
||||
const elementId = this._element.attr('id') !== undefined ? `#${this._element.attr('id')}` : ''
|
||||
$(document).on('click', `${elementId}${this._config.trigger}`, event => {
|
||||
this.toggle(event)
|
||||
})
|
||||
}
|
||||
|
||||
_expandSidebar() {
|
||||
if ($('body').hasClass(CLASS_NAME_SIDEBAR_COLLAPSED)) {
|
||||
$(this._config.sidebarButtonSelector).PushMenu('expand')
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Treeview($(this), _options)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'init') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(window).on(EVENT_LOAD_DATA_API, () => {
|
||||
$(SELECTOR_DATA_WIDGET).each(function () {
|
||||
Treeview._jQueryInterface.call($(this), 'init')
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Treeview._jQueryInterface
|
||||
$.fn[NAME].Constructor = Treeview
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Treeview._jQueryInterface
|
||||
}
|
||||
|
||||
export default Treeview
|
||||
|
||||
14
build/npm/.eslintrc.json
Normal file
14
build/npm/.eslintrc.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "script"
|
||||
},
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"strict": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,47 @@
|
||||
'use strict'
|
||||
|
||||
const Plugins = [
|
||||
// AdminLTE Dist
|
||||
{
|
||||
from: 'dist/css/',
|
||||
to : 'docs/assets/css/'
|
||||
to: 'docs/assets/css/'
|
||||
},
|
||||
{
|
||||
from: 'dist/js/',
|
||||
to : 'docs/assets/js/'
|
||||
to: 'docs/assets/js/'
|
||||
},
|
||||
// jQuery
|
||||
{
|
||||
from: 'node_modules/jquery/dist/',
|
||||
to : 'docs/assets/plugins/jquery/'
|
||||
to: 'docs/assets/plugins/jquery/'
|
||||
},
|
||||
// Popper
|
||||
{
|
||||
from: 'node_modules/popper.js/dist/',
|
||||
to : 'docs/assets/plugins/popper/'
|
||||
to: 'docs/assets/plugins/popper/'
|
||||
},
|
||||
// Bootstrap
|
||||
{
|
||||
from: 'node_modules/bootstrap/dist/js/',
|
||||
to : 'docs/assets/plugins/bootstrap/js/'
|
||||
to: 'docs/assets/plugins/bootstrap/js/'
|
||||
},
|
||||
// Font Awesome
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/css/',
|
||||
to : 'docs/assets/plugins/fontawesome-free/css/'
|
||||
to: 'docs/assets/plugins/fontawesome-free/css/'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/webfonts/',
|
||||
to : 'docs/assets/plugins/fontawesome-free/webfonts/'
|
||||
to: 'docs/assets/plugins/fontawesome-free/webfonts/'
|
||||
},
|
||||
// overlayScrollbars
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/js/',
|
||||
to : 'docs/assets/plugins/overlayScrollbars/js/'
|
||||
to: 'docs/assets/plugins/overlayScrollbars/js/'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/css/',
|
||||
to : 'docs/assets/plugins/overlayScrollbars/css/'
|
||||
to: 'docs/assets/plugins/overlayScrollbars/css/'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const fse = require('fs-extra')
|
||||
const Plugins = require('./DocsPlugins')
|
||||
const fse = require('fs-extra')
|
||||
|
||||
class Publish {
|
||||
constructor() {
|
||||
@@ -12,7 +17,7 @@ class Publish {
|
||||
|
||||
getArguments() {
|
||||
if (process.argv.length > 2) {
|
||||
let arg = process.argv[2]
|
||||
const arg = process.argv[2]
|
||||
switch (arg) {
|
||||
case '-v':
|
||||
case '--verbose':
|
||||
@@ -26,15 +31,20 @@ class Publish {
|
||||
|
||||
run() {
|
||||
// Publish files
|
||||
Plugins.forEach((module) => {
|
||||
Plugins.forEach(module => {
|
||||
try {
|
||||
fse.copySync(module.from, module.to)
|
||||
fse.copySync(module.from, module.to, {
|
||||
// Skip copying dot files
|
||||
filter(src) {
|
||||
return !path.basename(src).startsWith('.')
|
||||
}
|
||||
})
|
||||
|
||||
if (this.options.verbose) {
|
||||
console.log(`Copied ${module.from} to ${module.to}`)
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Error: ${err}`)
|
||||
} catch (error) {
|
||||
console.error(`Error: ${error}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,102 +1,108 @@
|
||||
'use strict'
|
||||
|
||||
const Plugins = [
|
||||
// jQuery
|
||||
{
|
||||
from: 'node_modules/jquery/dist',
|
||||
to : 'plugins/jquery'
|
||||
to: 'plugins/jquery'
|
||||
},
|
||||
// Popper
|
||||
{
|
||||
from: 'node_modules/popper.js/dist',
|
||||
to : 'plugins/popper'
|
||||
to: 'plugins/popper'
|
||||
},
|
||||
// Bootstrap
|
||||
{
|
||||
from: 'node_modules/bootstrap/dist/js',
|
||||
to : 'plugins/bootstrap/js'
|
||||
to: 'plugins/bootstrap/js'
|
||||
},
|
||||
// Font Awesome
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/css',
|
||||
to : 'plugins/fontawesome-free/css'
|
||||
to: 'plugins/fontawesome-free/css'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/webfonts',
|
||||
to : 'plugins/fontawesome-free/webfonts'
|
||||
to: 'plugins/fontawesome-free/webfonts'
|
||||
},
|
||||
// overlayScrollbars
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/js',
|
||||
to : 'plugins/overlayScrollbars/js'
|
||||
to: 'plugins/overlayScrollbars/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/css',
|
||||
to : 'plugins/overlayScrollbars/css'
|
||||
to: 'plugins/overlayScrollbars/css'
|
||||
},
|
||||
// Chart.js
|
||||
{
|
||||
from: 'node_modules/chart.js/dist/',
|
||||
to : 'plugins/chart.js'
|
||||
to: 'plugins/chart.js'
|
||||
},
|
||||
// jQuery UI
|
||||
{
|
||||
from: 'node_modules/jquery-ui-dist/',
|
||||
to : 'plugins/jquery-ui'
|
||||
to: 'plugins/jquery-ui'
|
||||
},
|
||||
// Flot
|
||||
{
|
||||
from: 'node_modules/flot/dist/es5/',
|
||||
to : 'plugins/flot'
|
||||
to: 'plugins/flot'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/flot/source/',
|
||||
to: 'plugins/flot/plugins'
|
||||
},
|
||||
// Summernote
|
||||
{
|
||||
from: 'node_modules/summernote/dist/',
|
||||
to : 'plugins/summernote'
|
||||
to: 'plugins/summernote'
|
||||
},
|
||||
// Bootstrap Slider
|
||||
{
|
||||
from: 'node_modules/bootstrap-slider/dist/',
|
||||
to : 'plugins/bootstrap-slider'
|
||||
to: 'plugins/bootstrap-slider'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/bootstrap-slider/dist/css',
|
||||
to : 'plugins/bootstrap-slider/css'
|
||||
to: 'plugins/bootstrap-slider/css'
|
||||
},
|
||||
// Bootstrap Colorpicker
|
||||
{
|
||||
from: 'node_modules/bootstrap-colorpicker/dist/js',
|
||||
to : 'plugins/bootstrap-colorpicker/js'
|
||||
to: 'plugins/bootstrap-colorpicker/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/bootstrap-colorpicker/dist/css',
|
||||
to : 'plugins/bootstrap-colorpicker/css'
|
||||
to: 'plugins/bootstrap-colorpicker/css'
|
||||
},
|
||||
// Tempusdominus Bootstrap 4
|
||||
{
|
||||
from: 'node_modules/tempusdominus-bootstrap-4/build/js',
|
||||
to : 'plugins/tempusdominus-bootstrap-4/js'
|
||||
to: 'plugins/tempusdominus-bootstrap-4/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/tempusdominus-bootstrap-4/build/css',
|
||||
to : 'plugins/tempusdominus-bootstrap-4/css'
|
||||
to: 'plugins/tempusdominus-bootstrap-4/css'
|
||||
},
|
||||
// Moment
|
||||
{
|
||||
from: 'node_modules/moment/min',
|
||||
to : 'plugins/moment'
|
||||
to: 'plugins/moment'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/moment/locale',
|
||||
to : 'plugins/moment/locale'
|
||||
to: 'plugins/moment/locale'
|
||||
},
|
||||
// FastClick
|
||||
{
|
||||
from: 'node_modules/fastclick/lib',
|
||||
to : 'plugins/fastclick'
|
||||
to: 'plugins/fastclick'
|
||||
},
|
||||
// Date Range Picker
|
||||
{
|
||||
from: 'node_modules/daterangepicker/',
|
||||
to : 'plugins/daterangepicker'
|
||||
to: 'plugins/daterangepicker'
|
||||
},
|
||||
// DataTables
|
||||
{
|
||||
@@ -239,6 +245,18 @@ const Plugins = [
|
||||
from: 'node_modules/datatables.net-scroller-bs4/css',
|
||||
to: 'plugins/datatables-scroller/css'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/datatables.net-searchpanes/js',
|
||||
to: 'plugins/datatables-searchpanes/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/datatables.net-searchpanes-bs4/js',
|
||||
to: 'plugins/datatables-searchpanes/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/datatables.net-searchpanes-bs4/css',
|
||||
to: 'plugins/datatables-searchpanes/css'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/datatables.net-select/js',
|
||||
to: 'plugins/datatables-select/js'
|
||||
@@ -254,97 +272,81 @@ const Plugins = [
|
||||
|
||||
// Fullcalendar
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/core/',
|
||||
to : 'plugins/fullcalendar'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/bootstrap/',
|
||||
to : 'plugins/fullcalendar-bootstrap'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/daygrid/',
|
||||
to : 'plugins/fullcalendar-daygrid'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/timegrid/',
|
||||
to : 'plugins/fullcalendar-timegrid'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/interaction/',
|
||||
to : 'plugins/fullcalendar-interaction'
|
||||
from: 'node_modules/fullcalendar/',
|
||||
to: 'plugins/fullcalendar'
|
||||
},
|
||||
// icheck bootstrap
|
||||
{
|
||||
from: 'node_modules/icheck-bootstrap/',
|
||||
to : 'plugins/icheck-bootstrap'
|
||||
to: 'plugins/icheck-bootstrap'
|
||||
},
|
||||
// inputmask
|
||||
{
|
||||
from: 'node_modules/inputmask/dist/',
|
||||
to : 'plugins/inputmask'
|
||||
to: 'plugins/inputmask'
|
||||
},
|
||||
// ion-rangeslider
|
||||
{
|
||||
from: 'node_modules/ion-rangeslider/',
|
||||
to : 'plugins/ion-rangeslider'
|
||||
to: 'plugins/ion-rangeslider'
|
||||
},
|
||||
// JQVMap (jqvmap-novulnerability)
|
||||
{
|
||||
from: 'node_modules/jqvmap-novulnerability/dist/',
|
||||
to : 'plugins/jqvmap'
|
||||
to: 'plugins/jqvmap'
|
||||
},
|
||||
// jQuery Mapael
|
||||
{
|
||||
from: 'node_modules/jquery-mapael/js/',
|
||||
to : 'plugins/jquery-mapael'
|
||||
to: 'plugins/jquery-mapael'
|
||||
},
|
||||
// Raphael
|
||||
{
|
||||
from: 'node_modules/raphael/',
|
||||
to : 'plugins/raphael'
|
||||
to: 'plugins/raphael'
|
||||
},
|
||||
// jQuery Mousewheel
|
||||
{
|
||||
from: 'node_modules/jquery-mousewheel/',
|
||||
to : 'plugins/jquery-mousewheel'
|
||||
to: 'plugins/jquery-mousewheel'
|
||||
},
|
||||
// jQuery Knob
|
||||
{
|
||||
from: 'node_modules/jquery-knob-chif/dist/',
|
||||
to : 'plugins/jquery-knob'
|
||||
to: 'plugins/jquery-knob'
|
||||
},
|
||||
// pace-progress
|
||||
{
|
||||
from: 'node_modules/@lgaitan/pace-progress/dist/',
|
||||
to : 'plugins/pace-progress'
|
||||
to: 'plugins/pace-progress'
|
||||
},
|
||||
// Select2
|
||||
{
|
||||
from: 'node_modules/select2/dist/',
|
||||
to : 'plugins/select2'
|
||||
to: 'plugins/select2'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@ttskch/select2-bootstrap4-theme/dist/',
|
||||
to : 'plugins/select2-bootstrap4-theme'
|
||||
to: 'plugins/select2-bootstrap4-theme'
|
||||
},
|
||||
// Sparklines
|
||||
{
|
||||
from: 'node_modules/sparklines/source/',
|
||||
to : 'plugins/sparklines'
|
||||
to: 'plugins/sparklines'
|
||||
},
|
||||
// SweetAlert2
|
||||
{
|
||||
from: 'node_modules/sweetalert2/dist/',
|
||||
to : 'plugins/sweetalert2'
|
||||
to: 'plugins/sweetalert2'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@sweetalert2/theme-bootstrap-4/',
|
||||
to : 'plugins/sweetalert2-theme-bootstrap-4'
|
||||
to: 'plugins/sweetalert2-theme-bootstrap-4'
|
||||
},
|
||||
// Toastr
|
||||
{
|
||||
from: 'node_modules/toastr/build/',
|
||||
to : 'plugins/toastr'
|
||||
to: 'plugins/toastr'
|
||||
},
|
||||
// jsGrid
|
||||
{
|
||||
@@ -352,8 +354,8 @@ const Plugins = [
|
||||
to: 'plugins/jsgrid'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/jsgrid/demos/',
|
||||
to: 'plugins/jsgrid/demos'
|
||||
from: 'node_modules/jsgrid/demos/db.js',
|
||||
to: 'plugins/jsgrid/demos/db.js'
|
||||
},
|
||||
// flag-icon-css
|
||||
{
|
||||
@@ -387,13 +389,49 @@ const Plugins = [
|
||||
// jQuery Validate
|
||||
{
|
||||
from: 'node_modules/jquery-validation/dist/',
|
||||
to : 'plugins/jquery-validation'
|
||||
to: 'plugins/jquery-validation'
|
||||
},
|
||||
// bs-custom-file-input
|
||||
{
|
||||
from: 'node_modules/bs-custom-file-input/dist/',
|
||||
to : 'plugins/bs-custom-file-input'
|
||||
to: 'plugins/bs-custom-file-input'
|
||||
},
|
||||
// bs-stepper
|
||||
{
|
||||
from: 'node_modules/bs-stepper/dist/',
|
||||
to: 'plugins/bs-stepper'
|
||||
},
|
||||
// CodeMirror
|
||||
{
|
||||
from: 'node_modules/codemirror/lib/',
|
||||
to: 'plugins/codemirror'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/codemirror/addon/',
|
||||
to: 'plugins/codemirror/addon'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/codemirror/keymap/',
|
||||
to: 'plugins/codemirror/keymap'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/codemirror/mode/',
|
||||
to: 'plugins/codemirror/mode'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/codemirror/theme/',
|
||||
to: 'plugins/codemirror/theme'
|
||||
},
|
||||
// dropzonejs
|
||||
{
|
||||
from: 'node_modules/dropzone/dist/',
|
||||
to: 'plugins/dropzone'
|
||||
},
|
||||
// uPlot
|
||||
{
|
||||
from: 'node_modules/uplot/dist/',
|
||||
to: 'plugins/uplot'
|
||||
}
|
||||
]
|
||||
|
||||
module.exports = Plugins
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const fse = require('fs-extra')
|
||||
const Plugins = require('./Plugins')
|
||||
const fse = require('fs-extra')
|
||||
|
||||
class Publish {
|
||||
constructor() {
|
||||
@@ -12,7 +17,7 @@ class Publish {
|
||||
|
||||
getArguments() {
|
||||
if (process.argv.length > 2) {
|
||||
let arg = process.argv[2]
|
||||
const arg = process.argv[2]
|
||||
switch (arg) {
|
||||
case '-v':
|
||||
case '--verbose':
|
||||
@@ -26,19 +31,26 @@ class Publish {
|
||||
|
||||
run() {
|
||||
// Publish files
|
||||
Plugins.forEach((module) => {
|
||||
Plugins.forEach(module => {
|
||||
const fseOptions = {
|
||||
// Skip copying dot files
|
||||
filter(src) {
|
||||
return !path.basename(src).startsWith('.')
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (fse.existsSync(module.from)) {
|
||||
fse.copySync(module.from, module.to)
|
||||
fse.copySync(module.from, module.to, fseOptions)
|
||||
} else {
|
||||
fse.copySync(module.from.replace('node_modules/', '../'), module.to)
|
||||
fse.copySync(module.from.replace('node_modules/', '../'), module.to, fseOptions)
|
||||
}
|
||||
|
||||
if (this.options.verbose) {
|
||||
console.log(`Copied ${module.from} to ${module.to}`)
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Error: ${err}`)
|
||||
} catch (error) {
|
||||
console.error(`Error: ${error}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
55
build/npm/vnu-jar.js
Normal file
55
build/npm/vnu-jar.js
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/*!
|
||||
* Script to run vnu-jar if Java is available.
|
||||
* Copyright 2017-2020 The Bootstrap Authors
|
||||
* Copyright 2017-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const childProcess = require('child_process')
|
||||
const vnu = require('vnu-jar')
|
||||
|
||||
childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error('Skipping vnu-jar test; Java is missing.')
|
||||
return
|
||||
}
|
||||
|
||||
const is32bitJava = !/64-Bit/.test(stderr)
|
||||
|
||||
// vnu-jar accepts multiple ignores joined with a `|`.
|
||||
// Also note that the ignores are regular expressions.
|
||||
const ignores = [
|
||||
// "autocomplete" is included in <button> and checkboxes and radio <input>s due to
|
||||
// Firefox's non-standard autocomplete behavior - see https://bugzilla.mozilla.org/show_bug.cgi?id=654072
|
||||
'Attribute “autocomplete” is only allowed when the input type is.*'
|
||||
].join('|')
|
||||
|
||||
const args = [
|
||||
'-jar',
|
||||
vnu,
|
||||
'--asciiquotes',
|
||||
'--skip-non-html',
|
||||
// Ignore the language code warnings
|
||||
'--no-langdetect',
|
||||
'--Werror',
|
||||
`--filterpattern "${ignores}"`,
|
||||
'./*.html',
|
||||
'docs_html/',
|
||||
'pages/'
|
||||
]
|
||||
|
||||
// For the 32-bit Java we need to pass `-Xss512k`
|
||||
if (is32bitJava) {
|
||||
args.splice(0, 0, '-Xss512k')
|
||||
}
|
||||
|
||||
return childProcess.spawn('java', args, {
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
})
|
||||
.on('exit', process.exit)
|
||||
})
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"adjoining-classes": false,
|
||||
"box-sizing": false,
|
||||
"box-model": false,
|
||||
"compatible-vendor-prefixes": false,
|
||||
"floats": false,
|
||||
"font-sizes": false,
|
||||
"gradients": false,
|
||||
"important": false,
|
||||
"known-properties": false,
|
||||
"outline-none": false,
|
||||
"qualified-headings": false,
|
||||
"regex-selectors": false,
|
||||
"shorthand": false,
|
||||
"text-indent": false,
|
||||
"unique-headings": false,
|
||||
"universal-selector": false,
|
||||
"unqualified-attributes": false,
|
||||
"ids": false,
|
||||
"fallback-colors": false,
|
||||
"vendor-prefix": false,
|
||||
"import": false
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/*!
|
||||
* AdminLTE v3.0.0
|
||||
* Only Components
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <http://adminlte.io>
|
||||
* License: Open source - MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
// Bootstrap
|
||||
// ---------------------------------------------------
|
||||
@import '~bootstrap/scss/functions';
|
||||
@import 'bootstrap-variables';
|
||||
@import '~bootstrap/scss/mixins';
|
||||
// @import '~bootstrap/scss/bootstrap';
|
||||
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import 'variables';
|
||||
@import 'mixins';
|
||||
|
||||
@import 'parts/components';
|
||||
@@ -1,20 +0,0 @@
|
||||
/*!
|
||||
* AdminLTE v3.0.0
|
||||
* Only Core
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <http://adminlte.io>
|
||||
* License: Open source - MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
// Bootstrap
|
||||
// ---------------------------------------------------
|
||||
@import '~bootstrap/scss/functions';
|
||||
@import 'bootstrap-variables';
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import 'variables';
|
||||
@import 'mixins';
|
||||
|
||||
@import 'parts/core';
|
||||
@import 'parts/miscellaneous';
|
||||
@@ -1,20 +0,0 @@
|
||||
/*!
|
||||
* AdminLTE v3.0.0
|
||||
* Only Extra Components
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <http://adminlte.io>
|
||||
* License: Open source - MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
// Bootstrap
|
||||
// ---------------------------------------------------
|
||||
@import '~bootstrap/scss/functions';
|
||||
@import 'bootstrap-variables';
|
||||
@import '~bootstrap/scss/mixins';
|
||||
// @import '~bootstrap/scss/bootstrap';
|
||||
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import 'variables';
|
||||
@import 'mixins';
|
||||
|
||||
@import 'parts/extra-components';
|
||||
@@ -1,20 +0,0 @@
|
||||
/*!
|
||||
* AdminLTE v3.0.0
|
||||
* Only Pages
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <http://adminlte.io>
|
||||
* License: Open source - MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
// Bootstrap
|
||||
// ---------------------------------------------------
|
||||
@import '~bootstrap/scss/functions';
|
||||
@import 'bootstrap-variables';
|
||||
@import '~bootstrap/scss/mixins';
|
||||
@import '~bootstrap/scss/close';
|
||||
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import 'variables';
|
||||
@import 'mixins';
|
||||
|
||||
@import 'parts/pages';
|
||||
@@ -1,20 +0,0 @@
|
||||
/*!
|
||||
* AdminLTE v3.0.0
|
||||
* Only Plugins
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <http://adminlte.io>
|
||||
* License: Open source - MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
// Bootstrap
|
||||
// ---------------------------------------------------
|
||||
@import '~bootstrap/scss/functions';
|
||||
@import 'bootstrap-variables';
|
||||
@import '~bootstrap/scss/mixins';
|
||||
// @import '~bootstrap/scss/bootstrap';
|
||||
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import 'variables';
|
||||
@import 'mixins';
|
||||
|
||||
@import 'parts/plugins';
|
||||
@@ -1,24 +0,0 @@
|
||||
/*!
|
||||
* AdminLTE v3.0.0
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <http://adminlte.io>
|
||||
* License: Open source - MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
// Bootstrap
|
||||
// ---------------------------------------------------
|
||||
@import '~bootstrap/scss/functions';
|
||||
@import 'bootstrap-variables';
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import 'variables';
|
||||
@import 'mixins';
|
||||
|
||||
@import 'parts/core';
|
||||
@import 'parts/components';
|
||||
@import 'parts/extra-components';
|
||||
@import 'parts/pages';
|
||||
@import 'parts/plugins';
|
||||
@import 'parts/miscellaneous';
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/*!
|
||||
* AdminLTE v3.0.0
|
||||
* AdminLTE v3.1.0-rc
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <http://adminlte.io>
|
||||
* License: Open source - MIT <http://opensource.org/licenses/MIT>
|
||||
* Website: AdminLTE.io <https://adminlte.io>
|
||||
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|
||||
*/
|
||||
|
||||
//
|
||||
// ------------------------------------------------------------------
|
||||
// This file is to be included in your custom SCSS. Before importing
|
||||
@@ -12,16 +13,17 @@
|
||||
// ok to import this file without custom variables too!
|
||||
// NOTE: be sure to keep the license notice in the generated css.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import 'bootstrap-variables';
|
||||
@import 'variables';
|
||||
@import 'mixins';
|
||||
@import "bootstrap-variables";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
@import 'parts/core';
|
||||
@import 'parts/components';
|
||||
@import 'parts/extra-components';
|
||||
@import 'parts/pages';
|
||||
@import 'parts/plugins';
|
||||
@import 'parts/miscellaneous';
|
||||
@import "parts/core";
|
||||
@import "parts/components";
|
||||
@import "parts/extra-components";
|
||||
@import "parts/pages";
|
||||
@import "parts/plugins";
|
||||
@import "parts/miscellaneous";
|
||||
@@ -26,7 +26,7 @@
|
||||
@each $color, $value in $theme-colors {
|
||||
.alert-#{$color} {
|
||||
color: color-yiq($value);
|
||||
background: $value;
|
||||
background-color: $value;
|
||||
border-color: darken($value, 5%);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//
|
||||
|
||||
// stylelint-disable
|
||||
$white: #ffffff !default;
|
||||
$white: #fff !default;
|
||||
$gray-100: #f8f9fa !default;
|
||||
$gray-200: #e9ecef !default;
|
||||
$gray-300: #dee2e6 !default;
|
||||
@@ -23,15 +23,15 @@ $black: #000 !default;
|
||||
|
||||
$grays: () !default;
|
||||
$grays: map-merge((
|
||||
"100": $gray-100,
|
||||
"200": $gray-200,
|
||||
"300": $gray-300,
|
||||
"400": $gray-400,
|
||||
"500": $gray-500,
|
||||
"600": $gray-600,
|
||||
"700": $gray-700,
|
||||
"800": $gray-800,
|
||||
"900": $gray-900
|
||||
"100": $gray-100,
|
||||
"200": $gray-200,
|
||||
"300": $gray-300,
|
||||
"400": $gray-400,
|
||||
"500": $gray-500,
|
||||
"600": $gray-600,
|
||||
"700": $gray-700,
|
||||
"800": $gray-800,
|
||||
"900": $gray-900
|
||||
), $grays);
|
||||
|
||||
$blue: #007bff !default;
|
||||
@@ -47,19 +47,19 @@ $cyan: #17a2b8 !default;
|
||||
|
||||
$colors: () !default;
|
||||
$colors: map-merge((
|
||||
"blue": $blue,
|
||||
"indigo": $indigo,
|
||||
"purple": $purple,
|
||||
"pink": $pink,
|
||||
"red": $red,
|
||||
"orange": $orange,
|
||||
"yellow": $yellow,
|
||||
"green": $green,
|
||||
"teal": $teal,
|
||||
"cyan": $cyan,
|
||||
"white": $white,
|
||||
"gray": $gray-600,
|
||||
"gray-dark": $gray-800
|
||||
"blue": $blue,
|
||||
"indigo": $indigo,
|
||||
"purple": $purple,
|
||||
"pink": $pink,
|
||||
"red": $red,
|
||||
"orange": $orange,
|
||||
"yellow": $yellow,
|
||||
"green": $green,
|
||||
"teal": $teal,
|
||||
"cyan": $cyan,
|
||||
"white": $white,
|
||||
"gray": $gray-600,
|
||||
"gray-dark": $gray-800
|
||||
), $colors);
|
||||
|
||||
$primary: $blue !default;
|
||||
@@ -73,14 +73,14 @@ $dark: $gray-800 !default;
|
||||
|
||||
$theme-colors: () !default;
|
||||
$theme-colors: map-merge((
|
||||
"primary": $primary,
|
||||
"secondary": $secondary,
|
||||
"success": $success,
|
||||
"info": $info,
|
||||
"warning": $warning,
|
||||
"danger": $danger,
|
||||
"light": $light,
|
||||
"dark": $dark
|
||||
"primary": $primary,
|
||||
"secondary": $secondary,
|
||||
"success": $success,
|
||||
"info": $info,
|
||||
"warning": $warning,
|
||||
"danger": $danger,
|
||||
"light": $light,
|
||||
"dark": $dark
|
||||
), $theme-colors);
|
||||
// stylelint-enable
|
||||
|
||||
@@ -91,7 +91,7 @@ $theme-color-interval: 8% !default;
|
||||
$yiq-contrasted-threshold: 150 !default;
|
||||
|
||||
// Customize the light and dark text colors for use in our YIQ color contrast function.
|
||||
$yiq-text-dark: #1F2D3D !default;
|
||||
$yiq-text-dark: #1f2d3d !default;
|
||||
$yiq-text-light: $white !default;
|
||||
|
||||
// Options
|
||||
@@ -122,21 +122,21 @@ $enable-deprecation-messages: true !default;
|
||||
$spacer: 1rem !default;
|
||||
$spacers: () !default;
|
||||
$spacers: map-merge((
|
||||
0: 0,
|
||||
1: ($spacer * .25),
|
||||
2: ($spacer * .5),
|
||||
3: $spacer,
|
||||
4: ($spacer * 1.5),
|
||||
5: ($spacer * 3)
|
||||
0: 0,
|
||||
1: ($spacer * .25),
|
||||
2: ($spacer * .5),
|
||||
3: $spacer,
|
||||
4: ($spacer * 1.5),
|
||||
5: ($spacer * 3)
|
||||
), $spacers);
|
||||
|
||||
// This variable affects the `.h-*` and `.w-*` classes.
|
||||
$sizes: () !default;
|
||||
$sizes: map-merge((
|
||||
25: 25%,
|
||||
50: 50%,
|
||||
75: 75%,
|
||||
100: 100%
|
||||
25: 25%,
|
||||
50: 50%,
|
||||
75: 75%,
|
||||
100: 100%
|
||||
), $sizes);
|
||||
// stylelint-enable
|
||||
|
||||
@@ -169,11 +169,11 @@ $paragraph-margin-bottom: 1rem !default;
|
||||
// adapting to different screen sizes, for use in media queries.
|
||||
|
||||
$grid-breakpoints: (
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1200px
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1200px
|
||||
) !default;
|
||||
|
||||
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
|
||||
@@ -185,10 +185,10 @@ $grid-breakpoints: (
|
||||
// Define the maximum width of `.container` for different screen sizes.
|
||||
|
||||
$container-max-widths: (
|
||||
sm: 540px,
|
||||
md: 720px,
|
||||
lg: 960px,
|
||||
xl: 1140px
|
||||
sm: 540px,
|
||||
md: 720px,
|
||||
lg: 960px,
|
||||
xl: 1140px
|
||||
) !default;
|
||||
|
||||
@include _assert-ascending($container-max-widths, "$container-max-widths");
|
||||
@@ -447,7 +447,7 @@ $input-group-addon-color: $input-color !default;
|
||||
$input-group-addon-bg: $gray-200 !default;
|
||||
$input-group-addon-border-color: $input-border-color !default;
|
||||
|
||||
$custom-control-gutter: 1.5rem !default;
|
||||
$custom-control-gutter: .5rem !default;
|
||||
$custom-control-spacer-x: 1rem !default;
|
||||
|
||||
$custom-control-indicator-size: 1rem !default;
|
||||
@@ -521,7 +521,7 @@ $custom-file-box-shadow: $custom-select-focus-box-shadow !default;
|
||||
$custom-file-button-color: $custom-file-color !default;
|
||||
$custom-file-button-bg: $input-group-addon-bg !default;
|
||||
$custom-file-text: (
|
||||
en: "Browse"
|
||||
en: "Browse"
|
||||
) !default;
|
||||
|
||||
$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;
|
||||
|
||||
@@ -20,14 +20,40 @@
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
[class*='sidebar-dark'] & {
|
||||
[class*="sidebar-dark"] & {
|
||||
border-bottom: 1px solid lighten($dark, 10%);
|
||||
color: rgba($white, .8);
|
||||
|
||||
&,
|
||||
.pushmenu {
|
||||
color: rgba($white, .8);
|
||||
|
||||
&:hover {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[class*='sidebar-light'] & {
|
||||
[class*="sidebar-light"] & {
|
||||
border-bottom: 1px solid $gray-300;
|
||||
color: rgba($black, .8);
|
||||
|
||||
&,
|
||||
.pushmenu {
|
||||
color: rgba($black, .8);
|
||||
|
||||
&:hover {
|
||||
color: $black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pushmenu {
|
||||
margin-right: $sidebar-padding-x;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.brand-link {
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.brand-image {
|
||||
@@ -52,6 +78,10 @@
|
||||
line-height: .8;
|
||||
max-height: 40px;
|
||||
width: auto;
|
||||
|
||||
&.single {
|
||||
margin-top: -.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.text-sm,
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
> input[type='file'] {
|
||||
background: $white;
|
||||
> input[type="file"] {
|
||||
background-color: $white;
|
||||
cursor: inherit;
|
||||
display: block;
|
||||
font-size: 100px;
|
||||
@@ -74,21 +74,27 @@
|
||||
> .fas,
|
||||
> .far,
|
||||
> .fab,
|
||||
> .glyphicon,
|
||||
> .fal,
|
||||
> .fad,
|
||||
> .svg-inline--fa,
|
||||
> .ion {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
> .svg-inline--fa {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $button-default-background-color;
|
||||
background-color: $button-default-background-color;
|
||||
border-color: darken($button-default-border-color, 20%);
|
||||
color: $button-default-color;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&:focus {
|
||||
@include box-shadow(inset 0 3px 5px rgba($black, 0.125));
|
||||
@include box-shadow(inset 0 3px 5px rgba($black, .125));
|
||||
}
|
||||
|
||||
// The badge
|
||||
@@ -106,3 +112,31 @@
|
||||
.btn-xs {
|
||||
@include button-size($button-padding-y-xs, $button-padding-x-xs, $button-font-size-xs, $button-line-height-xs, $button-border-radius-xs);
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.btn-default,
|
||||
.btn-app {
|
||||
background-color: lighten($dark, 2.5%);
|
||||
color: $white;
|
||||
border-color: $gray-600;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: lighten($dark, 5%);
|
||||
color: $gray-300;
|
||||
border-color: lighten($gray-600, 2.5%);
|
||||
}
|
||||
}
|
||||
.btn-light {
|
||||
background-color: lighten($dark, 7.5%);
|
||||
color: $white;
|
||||
border-color: $gray-600;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: lighten($dark, 10%);
|
||||
color: $gray-300;
|
||||
border-color: lighten($gray-600, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,18 +34,24 @@
|
||||
|
||||
// Themes for different contexts
|
||||
&.callout-danger {
|
||||
border-left-color: darken(theme-color('danger'), 10%);
|
||||
border-left-color: darken(theme-color("danger"), 10%);
|
||||
}
|
||||
|
||||
&.callout-warning {
|
||||
border-left-color: darken(theme-color('warning'), 10%);
|
||||
border-left-color: darken(theme-color("warning"), 10%);
|
||||
}
|
||||
|
||||
&.callout-info {
|
||||
border-left-color: darken(theme-color('info'), 10%);
|
||||
border-left-color: darken(theme-color("info"), 10%);
|
||||
}
|
||||
|
||||
&.callout-success {
|
||||
border-left-color: darken(theme-color('success'), 10%);
|
||||
border-left-color: darken(theme-color("success"), 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.callout {
|
||||
background-color: lighten($dark, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
// Component: Cards
|
||||
//
|
||||
|
||||
// Color variants
|
||||
@each $name, $color in $theme-colors {
|
||||
@include cards-variant($name, $color);
|
||||
}
|
||||
|
||||
@each $name, $color in $colors {
|
||||
@include cards-variant($name, $color);
|
||||
}
|
||||
|
||||
.card {
|
||||
@include box-shadow($card-shadow);
|
||||
margin-bottom: map-get($spacers, 3);
|
||||
@@ -25,13 +34,17 @@
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100% !important;
|
||||
z-index: 9999;
|
||||
z-index: $zindex-modal-backdrop;
|
||||
|
||||
&.was-collapsed .card-body {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
[data-widget='collapse'] {
|
||||
.card-body {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
[data-widget="collapse"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -78,12 +91,12 @@
|
||||
|
||||
&.card-tabs {
|
||||
&:not(.card-outline) {
|
||||
& .card-header {
|
||||
> .card-header {
|
||||
border-bottom: 0;
|
||||
|
||||
.nav-item {
|
||||
&:first-child .nav-link {
|
||||
margin-left: -1px;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,6 +112,34 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-tools {
|
||||
margin: .3rem .5rem;
|
||||
}
|
||||
|
||||
&:not(.expanding-card).collapsed-card {
|
||||
.card-header {
|
||||
border-bottom: 0;
|
||||
|
||||
.nav-tabs {
|
||||
border-bottom: 0;
|
||||
|
||||
.nav-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.expanding-card {
|
||||
.card-header {
|
||||
.nav-tabs {
|
||||
.nav-item {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.card-outline-tabs {
|
||||
@@ -126,6 +167,32 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-tools {
|
||||
margin: .5rem .5rem .3rem;
|
||||
}
|
||||
|
||||
&:not(.expanding-card).collapsed-card .card-header {
|
||||
border-bottom: 0;
|
||||
|
||||
.nav-tabs {
|
||||
border-bottom: 0;
|
||||
|
||||
.nav-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.expanding-card {
|
||||
.card-header {
|
||||
.nav-tabs {
|
||||
.nav-item {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -139,7 +206,7 @@ html.maximized-card {
|
||||
.card-header,
|
||||
.card-body,
|
||||
.card-footer {
|
||||
@include clearfix;
|
||||
@include clearfix ();
|
||||
}
|
||||
|
||||
// Box header
|
||||
@@ -168,7 +235,7 @@ html.maximized-card {
|
||||
margin-top: -$card-spacer-y / 2.5;
|
||||
}
|
||||
|
||||
[data-toggle='tooltip'] {
|
||||
[data-toggle="tooltip"] {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
@@ -188,7 +255,7 @@ html.maximized-card {
|
||||
|
||||
// Box Tools Buttons
|
||||
.btn-tool {
|
||||
background: transparent;
|
||||
background-color: transparent;
|
||||
color: $gray-500;
|
||||
font-size: $font-size-sm;
|
||||
margin: -(($card-spacer-y / 2) * 2) 0;
|
||||
@@ -211,7 +278,7 @@ html.maximized-card {
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: $card-nav-link-padding-sm-y $card-nav-link-padding-sm-x;
|
||||
padding: $card-nav-link-padding-sm-y $card-nav-link-padding-sm-x;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +314,7 @@ html.maximized-card {
|
||||
}
|
||||
|
||||
.chart-legend {
|
||||
@include list-unstyled;
|
||||
@include list-unstyled ();
|
||||
margin: 10px 0;
|
||||
|
||||
> li {
|
||||
@@ -260,10 +327,10 @@ html.maximized-card {
|
||||
|
||||
// Comment Box
|
||||
.card-comments {
|
||||
background: $gray-100;
|
||||
background-color: $gray-100;
|
||||
|
||||
.card-comment {
|
||||
@include clearfix;
|
||||
@include clearfix ();
|
||||
border-bottom: 1px solid $gray-200;
|
||||
padding: 8px 0;
|
||||
|
||||
@@ -312,7 +379,7 @@ html.maximized-card {
|
||||
// Todo list element
|
||||
> li {
|
||||
@include border-radius(2px);
|
||||
background: $gray-100;
|
||||
background-color: $gray-100;
|
||||
border-left: 2px solid $gray-200;
|
||||
color: $gray-700;
|
||||
margin-bottom: 2px;
|
||||
@@ -322,7 +389,7 @@ html.maximized-card {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
> input[type='checkbox'] {
|
||||
> input[type="checkbox"] {
|
||||
margin: 0 10px 0 5px;
|
||||
}
|
||||
|
||||
@@ -340,7 +407,7 @@ html.maximized-card {
|
||||
|
||||
// Tools and options box
|
||||
.tools {
|
||||
color: theme-color('danger');
|
||||
color: theme-color("danger");
|
||||
display: none;
|
||||
float: right;
|
||||
|
||||
@@ -349,7 +416,9 @@ html.maximized-card {
|
||||
> .fas,
|
||||
> .far,
|
||||
> .fab,
|
||||
> .glyphicon,
|
||||
> .fal,
|
||||
> .fad,
|
||||
> .svg-inline--fa,
|
||||
> .ion {
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
@@ -369,7 +438,7 @@ html.maximized-card {
|
||||
}
|
||||
|
||||
.badge {
|
||||
background: $gray-500 !important;
|
||||
background-color: $gray-500 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -401,16 +470,6 @@ html.maximized-card {
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
// Color variants
|
||||
@each $name, $color in $theme-colors {
|
||||
@include cards-variant($name, $color);
|
||||
}
|
||||
|
||||
@each $name, $color in $colors {
|
||||
@include cards-variant($name, $color);
|
||||
}
|
||||
|
||||
|
||||
// Nav Tabs override
|
||||
.card-default {
|
||||
.nav-item {
|
||||
@@ -419,3 +478,44 @@ html.maximized-card {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
|
||||
.card {
|
||||
background-color: $dark;
|
||||
color: $white;
|
||||
|
||||
.card {
|
||||
background-color: lighten($dark, 5%);
|
||||
color: $white;
|
||||
}
|
||||
.nav.flex-column > li {
|
||||
border-bottom-color: $gray-600;
|
||||
}
|
||||
.card-footer {
|
||||
background-color: rgba($black, .1);
|
||||
}
|
||||
&.card-outline-tabs .card-header a:hover {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
&:not(.card-outline) > .card-header a.active {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.card-comments {
|
||||
background-color: lighten($dark, 1.25%);
|
||||
.username {
|
||||
color: $gray-400;
|
||||
}
|
||||
.card-comment {
|
||||
border-bottom-color: lighten($dark, 7.5%);
|
||||
}
|
||||
}
|
||||
|
||||
.todo-list > li {
|
||||
background-color: lighten($dark, 5%);
|
||||
border-color: lighten($dark, 7.5%);
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,17 +2,21 @@
|
||||
// Component: Carousel
|
||||
//
|
||||
|
||||
.carousel-control {
|
||||
&.left,
|
||||
&.right {
|
||||
background-image: none;
|
||||
.carousel-control-custom-icon {
|
||||
.carousel-control-prev & {
|
||||
margin-left: -20px;
|
||||
}
|
||||
.carousel-control-next & {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
> .fa,
|
||||
> .fas,
|
||||
> .far,
|
||||
> .fab,
|
||||
> .glyphicon,
|
||||
> .fal,
|
||||
> .fad,
|
||||
> .svg-inline--fa,
|
||||
> .ion {
|
||||
display: inline-block;
|
||||
font-size: 40px;
|
||||
|
||||
44
build/scss/_close.scss
Normal file
44
build/scss/_close.scss
Normal file
@@ -0,0 +1,44 @@
|
||||
.close {
|
||||
float: right;
|
||||
@include font-size($close-font-size);
|
||||
font-weight: $close-font-weight;
|
||||
line-height: 1;
|
||||
color: $close-color;
|
||||
text-shadow: $close-text-shadow;
|
||||
opacity: .5;
|
||||
|
||||
// Override <a>'s hover style
|
||||
@include hover() {
|
||||
color: $close-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled) {
|
||||
@include hover-focus() {
|
||||
opacity: .75;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Additional properties for button version
|
||||
// iOS requires the button element instead of an anchor tag.
|
||||
// If you want the anchor version, it requires `href="#"`.
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
||||
|
||||
// stylelint-disable-next-line selector-no-qualifying-type
|
||||
button.close {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
// Future-proof disabling of clicks on `<a>` elements
|
||||
|
||||
// stylelint-disable-next-line selector-no-qualifying-type
|
||||
a.close.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -43,7 +43,7 @@
|
||||
}
|
||||
|
||||
// Backgrund Color Disabled
|
||||
[class^='bg-'].disabled {
|
||||
[class^="bg-"].disabled {
|
||||
opacity: .65;
|
||||
}
|
||||
|
||||
@@ -80,3 +80,25 @@ a.text-muted:hover {
|
||||
@each $name, $color in $colors {
|
||||
@include accent-variant($name, $color);
|
||||
}
|
||||
|
||||
// Accent button override fix
|
||||
[class*="accent-"] {
|
||||
@each $name, $color in $theme-colors {
|
||||
a.btn-#{$name} {
|
||||
color: color-yiq($color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.bg-light {
|
||||
background-color: lighten($dark, 7.5%) !important;
|
||||
color: $white !important;
|
||||
}
|
||||
.text-black,
|
||||
.text-dark,
|
||||
.link-black,
|
||||
.link-dark {
|
||||
color: $gray-400;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Component: Control Sidebar
|
||||
//
|
||||
|
||||
|
||||
html.control-sidebar-animate {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
@@ -11,7 +11,7 @@ html.control-sidebar-animate {
|
||||
position: absolute;
|
||||
top: $main-header-height;
|
||||
z-index: $zindex-control-sidebar;
|
||||
|
||||
|
||||
&,
|
||||
&::before {
|
||||
bottom: $main-footer-height;
|
||||
@@ -22,7 +22,7 @@ html.control-sidebar-animate {
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
content: "";
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -46,11 +46,11 @@ body.text-sm {
|
||||
}
|
||||
|
||||
.control-sidebar-push-slide {
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
@include transition(margin-right $transition-speed $transition-fn);
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
@include transition(margin-right $transition-speed $transition-fn);
|
||||
}
|
||||
}
|
||||
|
||||
// Control sidebar open state
|
||||
.control-sidebar-open {
|
||||
@@ -95,17 +95,14 @@ body.text-sm {
|
||||
|
||||
// Dark skin
|
||||
.control-sidebar-dark {
|
||||
background-color: $sidebar-dark-bg;
|
||||
|
||||
&,
|
||||
a,
|
||||
.nav-link {
|
||||
color: $sidebar-dark-color;
|
||||
}
|
||||
|
||||
// Background
|
||||
& {
|
||||
background: $sidebar-dark-bg;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: $sidebar-dark-hover-color;
|
||||
}
|
||||
@@ -171,8 +168,6 @@ body.text-sm {
|
||||
color: lighten($sidebar-light-color, 10%);
|
||||
|
||||
// Background
|
||||
& {
|
||||
background: $sidebar-light-bg;
|
||||
border-left: $main-header-bottom-border;
|
||||
}
|
||||
background-color: $sidebar-light-bg;
|
||||
border-left: $main-header-bottom-border;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Component: Direct Chat
|
||||
//
|
||||
|
||||
|
||||
.direct-chat {
|
||||
.card-body {
|
||||
overflow-x: hidden;
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
.direct-chat-msg {
|
||||
@include clearfix;
|
||||
@include clearfix ();
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
@include border-radius($border-radius-lg);
|
||||
}
|
||||
|
||||
background: $direct-chat-default-msg-bg;
|
||||
background-color: $direct-chat-default-msg-bg;
|
||||
border: 1px solid $direct-chat-default-msg-border-color;
|
||||
color: $direct-chat-default-font-color;
|
||||
margin: 5px 0 0 50px;
|
||||
@@ -68,7 +68,7 @@
|
||||
&::before {
|
||||
border: solid transparent;
|
||||
border-right-color: $direct-chat-default-msg-border-color;
|
||||
content: ' ';
|
||||
content: " ";
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
.direct-chat-contacts {
|
||||
@include translate(101%, 0);
|
||||
background: $dark;
|
||||
background-color: $dark;
|
||||
bottom: 0;
|
||||
color: $white;
|
||||
height: 250px;
|
||||
@@ -146,7 +146,7 @@
|
||||
}
|
||||
|
||||
.direct-chat-contacts-light {
|
||||
background: $light;
|
||||
background-color: $light;
|
||||
|
||||
.contacts-list-name {
|
||||
color: $gray-700;
|
||||
@@ -163,11 +163,11 @@
|
||||
|
||||
//Contacts list -- for displaying contacts in direct chat contacts pane
|
||||
.contacts-list {
|
||||
@include list-unstyled;
|
||||
@include list-unstyled ();
|
||||
|
||||
> li {
|
||||
@include clearfix;
|
||||
border-bottom: 1px solid rgba($black, 0.2);
|
||||
@include clearfix ();
|
||||
border-bottom: 1px solid rgba($black, .2);
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
.contacts-list-date {
|
||||
color: $gray-400;
|
||||
font-weight: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.contacts-list-msg {
|
||||
@@ -222,3 +222,25 @@
|
||||
@include direct-chat-variant($color);
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.direct-chat-text {
|
||||
background-color: lighten($dark, 7.5%);
|
||||
border-color: lighten($dark, 10%);
|
||||
color: $white;
|
||||
|
||||
&::after,
|
||||
&::before {
|
||||
border-right-color: lighten($dark, 10%);
|
||||
}
|
||||
}
|
||||
.direct-chat-timestamp {
|
||||
color: $gray-500;
|
||||
}
|
||||
.right > .direct-chat-text {
|
||||
&::after,
|
||||
&::before {
|
||||
border-right-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
.dropdown-toggle::after {
|
||||
vertical-align: .2rem
|
||||
vertical-align: .2rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,17 +57,17 @@
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
|
||||
& > a:after {
|
||||
@include caret-right;
|
||||
> a::after {
|
||||
@include caret-right ();
|
||||
float: right;
|
||||
margin-left: .5rem;
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
& > .dropdown-menu {
|
||||
> .dropdown-menu {
|
||||
left: 100%;
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Dropdown Sizes
|
||||
.dropdown-menu-xl {
|
||||
max-width: 420px;
|
||||
@@ -115,7 +114,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
// Add fade animation to dropdown menus by appending
|
||||
// Add fade animation to dropdown menus by appending
|
||||
// the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)
|
||||
.open:not(.dropup) > .animated-dropdown-menu {
|
||||
@include animation(flipInX .7s both);
|
||||
@@ -170,7 +169,7 @@
|
||||
right: 5%;
|
||||
left: auto;
|
||||
border: 1px solid #ddd;
|
||||
background: $white;
|
||||
background-color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,14 +177,13 @@
|
||||
|
||||
// User Menu
|
||||
.navbar-nav > .user-menu {
|
||||
> .nav-link:after {
|
||||
content:none;
|
||||
> .nav-link::after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
> .dropdown-menu {
|
||||
@include border-top-radius(0);
|
||||
padding: 0;
|
||||
border-top-width: 0;
|
||||
width: 280px;
|
||||
|
||||
&,
|
||||
@@ -206,7 +204,7 @@
|
||||
width: 90px;
|
||||
border: 3px solid;
|
||||
border-color: transparent;
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
border-color: rgba(255, 255, 255, .2);
|
||||
}
|
||||
|
||||
> p {
|
||||
@@ -224,14 +222,14 @@
|
||||
|
||||
// Menu Body
|
||||
> .user-body {
|
||||
@include clearfix;
|
||||
@include clearfix ();
|
||||
border-bottom: 1px solid $gray-700;
|
||||
border-top: 1px solid $gray-300;
|
||||
padding: 15px;
|
||||
|
||||
a {
|
||||
@include media-breakpoint-up(sm) {
|
||||
background: $white !important;
|
||||
background-color: $white !important;
|
||||
color: $gray-700 !important;
|
||||
}
|
||||
}
|
||||
@@ -239,7 +237,7 @@
|
||||
|
||||
// Menu Footer
|
||||
> .user-footer {
|
||||
@include clearfix;
|
||||
@include clearfix ();
|
||||
background-color: $gray-100;
|
||||
padding: 10px;
|
||||
|
||||
@@ -271,3 +269,53 @@
|
||||
width: $sidebar-user-image-width;
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.dropdown-menu {
|
||||
background-color: $dark;
|
||||
color: $white;
|
||||
}
|
||||
.dropdown-item {
|
||||
color: $white;
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
background-color: lighten($dark, 5%);
|
||||
}
|
||||
}
|
||||
.dropdown-divider {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
|
||||
.navbar-nav > .user-menu > .dropdown-menu {
|
||||
> .user-footer {
|
||||
background-color: lighten($dark, 2.5%);
|
||||
color: $white;
|
||||
|
||||
.btn-default {
|
||||
color: $white;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: lighten($dark, 5%);
|
||||
color: $gray-300;
|
||||
}
|
||||
&:focus {
|
||||
background-color: lighten($dark, 7.5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
> .user-body {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
> .user-body a {
|
||||
background-color: transparent !important;
|
||||
color: $white !important;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $gray-400 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Component: Forms
|
||||
//
|
||||
|
||||
|
||||
.form-group {
|
||||
&.has-icon {
|
||||
position: relative;
|
||||
@@ -40,19 +40,23 @@
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.svg-inline--fa,
|
||||
&.ion {
|
||||
line-height: $input-height;
|
||||
}
|
||||
}
|
||||
|
||||
.input-lg + .form-control-feedback,
|
||||
.input-lg + .form-control-feedback,
|
||||
.input-group-lg + .form-control-feedback {
|
||||
&.fa,
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.svg-inline--fa,
|
||||
&.ion {
|
||||
line-height: $input-height-lg;
|
||||
}
|
||||
@@ -64,20 +68,24 @@
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.svg-inline--fa,
|
||||
&.ion {
|
||||
line-height: $input-height-lg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-sm + .form-control-feedback,
|
||||
.input-sm + .form-control-feedback,
|
||||
.input-group-sm + .form-control-feedback {
|
||||
&.fa,
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.svg-inline--fa,
|
||||
&.ion {
|
||||
line-height: $input-height-sm;
|
||||
}
|
||||
@@ -89,20 +97,22 @@
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.svg-inline--fa,
|
||||
&.ion {
|
||||
line-height: $input-height-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label:not(.form-check-label, .custom-file-label) {
|
||||
label:not(.form-check-label):not(.custom-file-label) {
|
||||
font-weight: $font-weight-bold;
|
||||
}
|
||||
|
||||
.warning-feedback {
|
||||
@include font-size($form-feedback-font-size);
|
||||
color: theme-color('warning');
|
||||
color: theme-color("warning");
|
||||
display: none;
|
||||
margin-top: $form-feedback-margin-top;
|
||||
width: 100%;
|
||||
@@ -111,8 +121,8 @@ label:not(.form-check-label, .custom-file-label) {
|
||||
.warning-tooltip {
|
||||
@include border-radius($form-feedback-tooltip-border-radius);
|
||||
@include font-size($form-feedback-tooltip-font-size);
|
||||
background-color: rgba(theme-color('warning'), $form-feedback-tooltip-opacity);
|
||||
color: color-yiq(theme-color('warning'));
|
||||
background-color: rgba(theme-color("warning"), $form-feedback-tooltip-opacity);
|
||||
color: color-yiq(theme-color("warning"));
|
||||
display: none;
|
||||
line-height: $form-feedback-tooltip-line-height;
|
||||
margin-top: .1rem;
|
||||
@@ -125,7 +135,7 @@ label:not(.form-check-label, .custom-file-label) {
|
||||
|
||||
.form-control {
|
||||
&.is-warning {
|
||||
border-color: theme-color('warning');
|
||||
border-color: theme-color("warning");
|
||||
|
||||
@if $enable-validation-icons {
|
||||
// padding-right: $input-height-inner;
|
||||
@@ -136,8 +146,8 @@ label:not(.form-check-label, .custom-file-label) {
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: theme-color('warning');
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color('warning'), .25);
|
||||
border-color: theme-color("warning");
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color("warning"), .25);
|
||||
}
|
||||
|
||||
~ .warning-feedback,
|
||||
@@ -159,7 +169,7 @@ textarea.form-control {
|
||||
|
||||
.custom-select {
|
||||
&.is-warning {
|
||||
border-color: theme-color('warning');
|
||||
border-color: theme-color("warning");
|
||||
|
||||
@if $enable-validation-icons {
|
||||
// padding-right: $custom-select-feedback-icon-padding-right;
|
||||
@@ -167,8 +177,8 @@ textarea.form-control {
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: theme-color('warning');
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color('warning'), .25);
|
||||
border-color: theme-color("warning");
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color("warning"), .25);
|
||||
}
|
||||
|
||||
~ .warning-feedback,
|
||||
@@ -191,7 +201,7 @@ textarea.form-control {
|
||||
.form-check-input {
|
||||
&.is-warning {
|
||||
~ .form-check-label {
|
||||
color: theme-color('warning');
|
||||
color: theme-color("warning");
|
||||
}
|
||||
|
||||
~ .warning-feedback,
|
||||
@@ -203,10 +213,10 @@ textarea.form-control {
|
||||
|
||||
.custom-control-input.is-warning {
|
||||
~ .custom-control-label {
|
||||
color: theme-color('warning');
|
||||
color: theme-color("warning");
|
||||
|
||||
&::before {
|
||||
border-color: theme-color('warning');
|
||||
border-color: theme-color("warning");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,18 +227,18 @@ textarea.form-control {
|
||||
|
||||
&:checked {
|
||||
~ .custom-control-label::before {
|
||||
@include gradient-bg(lighten(theme-color('warning'), 10%));
|
||||
border-color: lighten(theme-color('warning'), 10%);
|
||||
@include gradient-bg(lighten(theme-color("warning"), 10%));
|
||||
border-color: lighten(theme-color("warning"), 10%);
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
~ .custom-control-label::before {
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color('warning'), .25);
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color("warning"), .25);
|
||||
}
|
||||
|
||||
&:not(:checked) ~ .custom-control-label::before {
|
||||
border-color: theme-color('warning');
|
||||
border-color: theme-color("warning");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +247,7 @@ textarea.form-control {
|
||||
.custom-file-input {
|
||||
&.is-warning {
|
||||
~ .custom-file-label {
|
||||
border-color: theme-color('warning');
|
||||
border-color: theme-color("warning");
|
||||
}
|
||||
|
||||
~ .warning-feedback,
|
||||
@@ -247,13 +257,39 @@ textarea.form-control {
|
||||
|
||||
&:focus {
|
||||
~ .custom-file-label {
|
||||
border-color: theme-color('warning');
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color('warning'), .25);
|
||||
border-color: theme-color("warning");
|
||||
box-shadow: 0 0 0 $input-focus-width rgba(theme-color("warning"), .25);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// body.text-sm support
|
||||
body.text-sm {
|
||||
.input-group-text {
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
}
|
||||
|
||||
// custom .form-control styles
|
||||
.form-control,
|
||||
.custom-select {
|
||||
&.form-control-border {
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: inherit;
|
||||
|
||||
&.border-width-2 {
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
&.border-width-3 {
|
||||
border-bottom-width: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// custom switch color variations
|
||||
.custom-switch {
|
||||
@each $name, $color in $theme-colors {
|
||||
@@ -275,3 +311,91 @@ textarea.form-control {
|
||||
@include custom-range-variant($name, $color);
|
||||
}
|
||||
}
|
||||
|
||||
// custom control input variations
|
||||
@each $name, $color in $theme-colors {
|
||||
@include custom-control-input-variant($name, $color);
|
||||
}
|
||||
|
||||
@each $name, $color in $colors {
|
||||
@include custom-control-input-variant($name, $color);
|
||||
}
|
||||
|
||||
.custom-control-input-outline {
|
||||
~ .custom-control-label::before {
|
||||
background-color: transparent !important;
|
||||
box-shadow: none;
|
||||
}
|
||||
&:checked ~ .custom-control-label::before {
|
||||
@include gradient-bg(transparent);
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.form-control,
|
||||
.custom-select,
|
||||
.custom-file-label,
|
||||
.custom-file-label::after,
|
||||
.custom-control-label::before,
|
||||
.input-group-text {
|
||||
background-color: $dark;
|
||||
color: $white;
|
||||
}
|
||||
.form-control:not(.form-control-navbar):not(.is-invalid):not(:focus) {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
select {
|
||||
background-color: $dark;
|
||||
color: $white;
|
||||
border-color: $gray-600;
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
|
||||
.custom-control-input:disabled ~ .custom-control-label::before,
|
||||
.custom-control-input[disabled] ~ .custom-control-label::before {
|
||||
background-color: lighten($dark, 5%);
|
||||
border-color: $gray-600;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
.custom-range {
|
||||
&::-webkit-slider-runnable-track {
|
||||
background-color: lighten($dark, 7.5%);
|
||||
}
|
||||
&::-moz-range-track {
|
||||
background-color: lighten($dark, 7.5%);
|
||||
}
|
||||
&::-ms-track {
|
||||
background-color: lighten($dark, 7.5%);
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-dark {
|
||||
.btn-navbar,
|
||||
.form-control-navbar {
|
||||
background-color: $dark;
|
||||
border: $input-border-width solid $gray-600;
|
||||
}
|
||||
.btn-navbar {
|
||||
&:hover {
|
||||
background-color: lighten($sidebar-dark-bg, 7.5%);
|
||||
}
|
||||
&:focus {
|
||||
background-color: lighten($sidebar-dark-bg, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.form-control-navbar + .input-group-prepend,
|
||||
.form-control-navbar + .input-group-append {
|
||||
> .btn-navbar {
|
||||
background-color: lighten($dark, 5%);
|
||||
color: $white;
|
||||
border: $input-border-width solid $gray-600;
|
||||
border-left: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
//
|
||||
// Component: Info Box
|
||||
//
|
||||
|
||||
|
||||
.info-box {
|
||||
@include box-shadow($card-shadow);
|
||||
@include border-radius($border-radius);
|
||||
|
||||
background: $white;
|
||||
background-color: $white;
|
||||
display: flex;
|
||||
margin-bottom: map-get($spacers, 3);
|
||||
min-height: 80px;
|
||||
padding: .5rem;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.progress {
|
||||
background-color: rgba($black, .125);
|
||||
@@ -41,12 +42,17 @@
|
||||
}
|
||||
|
||||
.info-box-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
line-height: 1.8;
|
||||
flex: 1;
|
||||
padding: 5px 10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.info-box-number {
|
||||
display: block;
|
||||
margin-top: .25rem;
|
||||
font-weight: $font-weight-bold;
|
||||
}
|
||||
|
||||
@@ -138,3 +144,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.info-box {
|
||||
background-color: $dark;
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Core: Layout
|
||||
//
|
||||
|
||||
html {
|
||||
html.scroll-smooth {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ body,
|
||||
.wrapper {
|
||||
position: relative;
|
||||
|
||||
& .content-wrapper {
|
||||
.content-wrapper {
|
||||
min-height: calc(100vh - #{$main-header-height} - #{$main-footer-height});
|
||||
}
|
||||
|
||||
@@ -28,11 +28,20 @@ body,
|
||||
max-width: $boxed-layout-max-width;
|
||||
}
|
||||
|
||||
& .main-sidebar {
|
||||
.main-sidebar {
|
||||
left: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@supports not (-webkit-touch-callout: none) {
|
||||
.layout-fixed & .sidebar {
|
||||
height: calc(100vh - (#{$main-header-height-inner} + #{$main-header-bottom-border-width}));
|
||||
}
|
||||
.layout-fixed.text-sm & .sidebar {
|
||||
height: calc(100vh - (#{$main-header-height-sm-inner} + #{$main-header-bottom-border-width}));
|
||||
}
|
||||
}
|
||||
|
||||
.layout-navbar-fixed.layout-fixed & {
|
||||
.control-sidebar {
|
||||
top: $main-header-height;
|
||||
@@ -61,7 +70,8 @@ body,
|
||||
}
|
||||
}
|
||||
|
||||
.layout-navbar-fixed.sidebar-collapse & {
|
||||
.layout-navbar-fixed.sidebar-mini.sidebar-collapse &,
|
||||
.layout-navbar-fixed.sidebar-mini-md.sidebar-collapse & {
|
||||
.brand-link {
|
||||
height: $main-header-height;
|
||||
width: $sidebar-mini-width;
|
||||
@@ -72,12 +82,33 @@ body,
|
||||
}
|
||||
}
|
||||
|
||||
.layout-navbar-fixed.sidebar-collapse.text-sm & {
|
||||
.layout-navbar-fixed.sidebar-mini.sidebar-collapse.text-sm &,
|
||||
.layout-navbar-fixed.sidebar-mini-md.sidebar-collapse.text-sm & {
|
||||
.brand-link {
|
||||
height: $main-header-height-sm;
|
||||
}
|
||||
}
|
||||
|
||||
body:not(.layout-fixed).layout-navbar-fixed & {
|
||||
.main-sidebar {
|
||||
// margin-top: calc(#{$main-header-height} / -1);
|
||||
|
||||
// .sidebar {
|
||||
// margin-top: $main-header-height;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
body:not(.layout-fixed).layout-navbar-fixed.text-sm & {
|
||||
.main-sidebar {
|
||||
margin-top: calc(#{$main-header-height-sm} / -1);
|
||||
|
||||
.sidebar {
|
||||
margin-top: $main-header-height-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.layout-navbar-fixed & {
|
||||
.control-sidebar {
|
||||
top: 0;
|
||||
@@ -269,6 +300,26 @@ body,
|
||||
}
|
||||
}
|
||||
|
||||
body:not(.layout-fixed).layout#{$infix}-navbar-fixed & {
|
||||
// .main-sidebar {
|
||||
// margin-top: calc(#{$main-header-height} / -1);
|
||||
|
||||
// .sidebar {
|
||||
// margin-top: $main-header-height;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
body:not(.layout-fixed).layout#{$infix}-navbar-fixed.text-sm & {
|
||||
.main-sidebar {
|
||||
margin-top: calc(#{$main-header-height-sm} / -1);
|
||||
|
||||
.sidebar {
|
||||
margin-top: $main-header-height-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.layout#{$infix}-navbar-not-fixed & {
|
||||
.brand-link {
|
||||
position: static;
|
||||
@@ -296,9 +347,7 @@ body,
|
||||
.control-sidebar {
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.layout-footer-fixed & {
|
||||
.main-footer {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -325,9 +374,7 @@ body,
|
||||
.control-sidebar {
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.layout#{$infix}-footer-fixed & {
|
||||
.main-footer {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -337,7 +384,7 @@ body,
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
margin-bottom: $main-footer-height;
|
||||
padding-bottom: $main-footer-height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,34 +399,39 @@ body,
|
||||
.layout-top-nav & {
|
||||
margin-left: 0;
|
||||
|
||||
& .text-sm {
|
||||
.main-header {
|
||||
.brand-image {
|
||||
margin-top: -.5rem;
|
||||
margin-right: .2rem;
|
||||
height: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
& .main-sidebar {
|
||||
.main-sidebar {
|
||||
bottom: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.brand-image {
|
||||
height: 33px;
|
||||
}
|
||||
|
||||
& .main-sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
& .content-wrapper,
|
||||
& .main-header,
|
||||
& .main-footer {
|
||||
.content-wrapper,
|
||||
.main-header,
|
||||
.main-footer {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
body.sidebar-collapse:not(.sidebar-mini-md):not(.sidebar-mini) {
|
||||
.content-wrapper,
|
||||
.main-footer,
|
||||
.main-header {
|
||||
&,
|
||||
&::before {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body:not(.sidebar-mini-md) {
|
||||
.content-wrapper,
|
||||
.main-footer,
|
||||
@@ -427,7 +479,7 @@ body:not(.sidebar-mini-md) {
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
background: $main-bg;
|
||||
background-color: $main-bg;
|
||||
|
||||
> .content {
|
||||
padding: $content-padding-y $content-padding-x;
|
||||
@@ -442,6 +494,13 @@ body:not(.sidebar-mini-md) {
|
||||
width: $sidebar-width;
|
||||
}
|
||||
|
||||
.sidebar-collapse:not(.sidebar-mini):not(.sidebar-mini-md) & {
|
||||
&,
|
||||
&::before {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-collapse & {
|
||||
&,
|
||||
&::before {
|
||||
@@ -505,8 +564,16 @@ body:not(.sidebar-mini-md) {
|
||||
}
|
||||
}
|
||||
|
||||
@supports (-webkit-touch-callout: none) {
|
||||
.layout-fixed {
|
||||
.main-sidebar {
|
||||
height: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
background: $main-footer-bg;
|
||||
background-color: $main-footer-bg;
|
||||
border-top: $main-footer-border-top;
|
||||
color: lighten($gray-700, 25%);
|
||||
padding: $main-footer-padding;
|
||||
@@ -534,7 +601,7 @@ body:not(.sidebar-mini-md) {
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
background: transparent;
|
||||
background-color: transparent;
|
||||
line-height: 1.8rem;
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
@@ -546,7 +613,6 @@ body:not(.sidebar-mini-md) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
.hold-transition {
|
||||
.content-wrapper,
|
||||
.main-header,
|
||||
@@ -556,5 +622,30 @@ body:not(.sidebar-mini-md) {
|
||||
.control-sidebar *,
|
||||
.main-footer {
|
||||
transition: none !important;
|
||||
animation-duration: 0s !important;
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
background-color: lighten($dark, 7.5%) !important;
|
||||
color: $white;
|
||||
|
||||
.breadcrumb-item {
|
||||
&.active,
|
||||
+ .breadcrumb-item::before {
|
||||
color: $gray-500;
|
||||
}
|
||||
}
|
||||
.main-footer {
|
||||
background-color: $dark;
|
||||
border-color: lighten($dark, 10%);
|
||||
}
|
||||
.content-wrapper {
|
||||
background-color: lighten($dark, 7.5%);
|
||||
color: $white;
|
||||
|
||||
.content-header {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Component: Main Header
|
||||
//
|
||||
|
||||
|
||||
.main-header {
|
||||
border-bottom: $main-header-bottom-border;
|
||||
z-index: $zindex-main-header;
|
||||
@@ -21,7 +21,9 @@
|
||||
> .fas,
|
||||
> .far,
|
||||
> .fab,
|
||||
> .glyphicon,
|
||||
> .fal,
|
||||
> .fad,
|
||||
> .svg-inline--fa,
|
||||
> .ion {
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
@@ -34,7 +36,7 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&[class*='-right'] {
|
||||
&[class*="-right"] {
|
||||
.dropdown-menu {
|
||||
left: auto;
|
||||
margin-top: -3px;
|
||||
@@ -47,6 +49,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.dropdown-legacy .dropdown-menu {
|
||||
top: $nav-link-height + $navbar-padding-y;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Add this class to images within a nav-link
|
||||
@@ -73,7 +80,7 @@
|
||||
.form-control-navbar {
|
||||
border-right-width: 0;
|
||||
|
||||
& + .input-group-append {
|
||||
+ .input-group-append {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
@@ -101,7 +108,7 @@
|
||||
|
||||
&:focus {
|
||||
&,
|
||||
& + .input-group-append .btn-navbar {
|
||||
+ .input-group-append .btn-navbar {
|
||||
background-color: $main-header-dark-form-control-focused-bg;
|
||||
border: $main-header-dark-form-control-focused-border !important;
|
||||
color: $main-header-dark-form-control-focused-color;
|
||||
@@ -128,7 +135,7 @@
|
||||
|
||||
&:focus {
|
||||
&,
|
||||
& + .input-group-append .btn-navbar {
|
||||
+ .input-group-append .btn-navbar {
|
||||
background-color: $main-header-light-form-control-focused-bg;
|
||||
border: $main-header-light-form-control-focused-border !important;
|
||||
color: $main-header-light-form-control-focused-color;
|
||||
|
||||
@@ -6,11 +6,20 @@
|
||||
height: 100vh;
|
||||
overflow-y: hidden;
|
||||
z-index: $zindex-main-sidebar;
|
||||
|
||||
// Remove Firefox Focusring
|
||||
a {
|
||||
&:-moz-focusring {
|
||||
border: 0;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
height: calc(100% - 4rem);
|
||||
overflow-y: auto;
|
||||
height: calc(100% - (#{$main-header-height-inner} + #{$main-header-bottom-border-width}));
|
||||
overflow-y: initial;
|
||||
padding-bottom: $sidebar-padding-y;
|
||||
padding-left: $sidebar-padding-x;
|
||||
padding-right: $sidebar-padding-x;
|
||||
@@ -21,11 +30,11 @@
|
||||
.user-panel {
|
||||
position: relative;
|
||||
|
||||
[class*='sidebar-dark'] & {
|
||||
[class*="sidebar-dark"] & {
|
||||
border-bottom: 1px solid lighten($dark, 12%);
|
||||
}
|
||||
|
||||
[class*='sidebar-light'] & {
|
||||
[class*="sidebar-light"] & {
|
||||
border-bottom: 1px solid $gray-300;
|
||||
}
|
||||
|
||||
@@ -89,7 +98,10 @@
|
||||
> .nav-treeview {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-open,
|
||||
.menu-is-opening {
|
||||
> .nav-link {
|
||||
i.right {
|
||||
@include rotate(-90deg);
|
||||
@@ -102,6 +114,7 @@
|
||||
margin-bottom: 0;
|
||||
|
||||
.nav-icon {
|
||||
margin-left: .05rem;
|
||||
font-size: 1.2rem;
|
||||
margin-right: .2rem;
|
||||
text-align: center;
|
||||
@@ -111,7 +124,9 @@
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.svg-inline--fa,
|
||||
&.ion {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
@@ -141,6 +156,24 @@
|
||||
.nav-treeview {
|
||||
transition: padding $transition-speed $transition-fn;
|
||||
padding-left: 1rem;
|
||||
|
||||
.text-sm & {
|
||||
padding-left: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.nav-legacy {
|
||||
.nav-treeview {
|
||||
.nav-treeview {
|
||||
padding-left: 2rem;
|
||||
margin-left: -1rem;
|
||||
|
||||
.text-sm & {
|
||||
padding-left: 1rem;
|
||||
margin-left: -.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +192,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-is-opening .nav-sidebar {
|
||||
.nav-link p {
|
||||
animation-name: fadeIn;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
}
|
||||
|
||||
#sidebar-overlay {
|
||||
@include media-breakpoint-down(md) {
|
||||
.sidebar-open & {
|
||||
@@ -166,7 +207,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
background-color: rgba($black, 0.1);
|
||||
background-color: rgba($black, .1);
|
||||
bottom: 0;
|
||||
display: none;
|
||||
left: 0;
|
||||
@@ -176,7 +217,7 @@
|
||||
z-index: $zindex-main-sidebar - 1;
|
||||
}
|
||||
|
||||
[class*='sidebar-light-'] {
|
||||
[class*="sidebar-light-"] {
|
||||
// Sidebar background color
|
||||
background-color: $sidebar-light-bg;
|
||||
|
||||
@@ -187,13 +228,13 @@
|
||||
}
|
||||
|
||||
.status {
|
||||
background: $sidebar-light-hover-bg;
|
||||
background-color: $sidebar-light-hover-bg;
|
||||
color: $sidebar-light-color;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: darken($sidebar-light-hover-bg, 3%);
|
||||
background-color: darken($sidebar-light-hover-bg, 3%);
|
||||
color: $sidebar-light-hover-color;
|
||||
}
|
||||
}
|
||||
@@ -236,13 +277,13 @@
|
||||
|
||||
// First Level Submenu
|
||||
> .nav-treeview {
|
||||
background: $sidebar-light-submenu-bg;
|
||||
background-color: $sidebar-light-submenu-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Section Heading
|
||||
.nav-header {
|
||||
background: inherit;
|
||||
background-color: inherit;
|
||||
color: darken($sidebar-light-color, 5%);
|
||||
}
|
||||
|
||||
@@ -282,7 +323,7 @@
|
||||
.nav-flat {
|
||||
.nav-item {
|
||||
.nav-treeview {
|
||||
.nav-treeview {
|
||||
.nav-treeview {
|
||||
border-color: $sidebar-light-submenu-active-bg;
|
||||
}
|
||||
|
||||
@@ -299,7 +340,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
[class*='sidebar-dark-'] {
|
||||
[class*="sidebar-dark-"] {
|
||||
// Sidebar background color
|
||||
background-color: $sidebar-dark-bg;
|
||||
|
||||
@@ -310,13 +351,13 @@
|
||||
}
|
||||
|
||||
.status {
|
||||
background: $sidebar-dark-hover-bg;
|
||||
background-color: $sidebar-dark-hover-bg;
|
||||
color: $sidebar-dark-color;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: darken($sidebar-dark-hover-bg, 3%);
|
||||
background-color: darken($sidebar-dark-hover-bg, 3%);
|
||||
color: $sidebar-dark-hover-color;
|
||||
}
|
||||
}
|
||||
@@ -344,7 +385,7 @@
|
||||
// Hover and active states
|
||||
&.menu-open > .nav-link,
|
||||
&:hover > .nav-link,
|
||||
& > .nav-link:focus {
|
||||
> .nav-link:focus {
|
||||
background-color: $sidebar-dark-hover-bg;
|
||||
color: $sidebar-dark-hover-color;
|
||||
}
|
||||
@@ -359,13 +400,13 @@
|
||||
|
||||
// First Level Submenu
|
||||
> .nav-treeview {
|
||||
background: $sidebar-dark-submenu-bg;
|
||||
background-color: $sidebar-dark-submenu-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Section Heading
|
||||
.nav-header {
|
||||
background: inherit; //darken($sidebar-dark-bg, 3%);
|
||||
background-color: inherit; //darken($sidebar-dark-bg, 3%);
|
||||
color: lighten($sidebar-dark-color, 5%);
|
||||
}
|
||||
|
||||
@@ -409,7 +450,7 @@
|
||||
.nav-flat {
|
||||
.nav-item {
|
||||
.nav-treeview {
|
||||
.nav-treeview {
|
||||
.nav-treeview {
|
||||
border-color: $sidebar-dark-submenu-active-bg;
|
||||
}
|
||||
|
||||
@@ -430,35 +471,166 @@
|
||||
@each $name, $color in $theme-colors {
|
||||
.sidebar-dark-#{$name},
|
||||
.sidebar-light-#{$name} {
|
||||
@include sidebar-color($color)
|
||||
@include sidebar-color($color);
|
||||
}
|
||||
}
|
||||
|
||||
@each $name, $color in $colors {
|
||||
.sidebar-dark-#{$name},
|
||||
.sidebar-light-#{$name} {
|
||||
@include sidebar-color($color)
|
||||
@include sidebar-color($color);
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini .main-sidebar:not(.sidebar-no-expand),
|
||||
.sidebar-mini-md .main-sidebar:not(.sidebar-no-expand),
|
||||
.sidebar-mini .main-sidebar:not(.sidebar-no-expand):hover,
|
||||
.sidebar-mini-md .main-sidebar:not(.sidebar-no-expand):hover,
|
||||
.sidebar-mini .main-sidebar.sidebar-focused,
|
||||
.sidebar-mini-md .main-sidebar.sidebar-focused {
|
||||
.nav-compact.nav-sidebar.nav-child-indent:not(.nav-flat) .nav-treeview {
|
||||
padding-left: 1rem;
|
||||
margin-left: -.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Nav Flat
|
||||
.nav-flat {
|
||||
margin: (-$sidebar-padding-x/2) (-$sidebar-padding-x) 0;
|
||||
|
||||
&.nav-child-indent {
|
||||
.nav-treeview {
|
||||
padding-left: 0 !important;
|
||||
|
||||
.nav-treeview {
|
||||
border-left: .2rem solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
margin: (-$sidebar-padding-x / 2) (-$sidebar-padding-x) 0;
|
||||
|
||||
.nav-item {
|
||||
> .nav-link {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
> .nav-icon {
|
||||
margin-left: .55rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.nav-child-indent) {
|
||||
.nav-treeview {
|
||||
.nav-item {
|
||||
> .nav-link {
|
||||
> .nav-icon {
|
||||
margin-left: .4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.nav-child-indent {
|
||||
.nav-treeview {
|
||||
padding-left: 0;
|
||||
|
||||
.nav-icon {
|
||||
margin-left: .85rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
border-left: .2rem solid;
|
||||
|
||||
.nav-icon {
|
||||
margin-left: 1.15rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: 1.45rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: 1.75rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: 2.05rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-collapse &.nav-child-indent {
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: .55rem;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding-left: calc(#{$nav-link-padding-x} - .2rem);
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: .35rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: .15rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: -.15rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: -.35rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini .main-sidebar:not(.sidebar-no-expand):hover &,
|
||||
.sidebar-mini-md .main-sidebar:not(.sidebar-no-expand):hover &,
|
||||
.sidebar-mini .main-sidebar.sidebar-focused &,
|
||||
.sidebar-mini-md .main-sidebar.sidebar-focused & {
|
||||
&.nav-compact.nav-sidebar .nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: .4rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.nav-sidebar.nav-child-indent .nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: .85rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: 1.15rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: 1.45rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: 1.75rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: 2.05rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,22 +644,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-collapse & {
|
||||
.nav-icon {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: .3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.nav-sidebar > .nav-item {
|
||||
.nav-treeview,
|
||||
> .nav-treeview {
|
||||
background: rgba($white, .05);
|
||||
background-color: rgba($white, .05);
|
||||
|
||||
.nav-item {
|
||||
> .nav-link {
|
||||
@@ -499,34 +659,134 @@
|
||||
}
|
||||
|
||||
.nav-legacy {
|
||||
margin: (-$sidebar-padding-x/2) (-$sidebar-padding-x) 0;
|
||||
margin: (-$sidebar-padding-x / 2) (-$sidebar-padding-x) 0;
|
||||
|
||||
&.nav-sidebar .nav-item {
|
||||
> .nav-link {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
> .nav-icon {
|
||||
margin-left: .55rem;
|
||||
|
||||
.text-sm & {
|
||||
margin-left: .75rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.nav-sidebar > .nav-item {
|
||||
> .nav-link {
|
||||
&.active {
|
||||
background: inherit;
|
||||
background-color: inherit;
|
||||
border-left: 3px solid transparent;
|
||||
box-shadow: none;
|
||||
|
||||
> .nav-icon {
|
||||
margin-left: -3px;
|
||||
margin-left: calc(.55rem - 3px);
|
||||
|
||||
.text-sm & {
|
||||
margin-left: calc(.75rem - 3px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[class*='sidebar-dark'] & {
|
||||
.text-sm &.nav-sidebar.nav-flat .nav-treeview {
|
||||
.nav-item {
|
||||
> .nav-link {
|
||||
> .nav-icon {
|
||||
margin-left: calc(.75rem - 3px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini &,
|
||||
.sidebar-mini-md & {
|
||||
> .nav-item .nav-link {
|
||||
.nav-icon {
|
||||
@include transition(margin-left $transition-fn $transition-speed);
|
||||
margin-left: .75rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused &.nav-child-indent,
|
||||
.sidebar-mini.sidebar-collapse .main-sidebar:hover &.nav-child-indent,
|
||||
.sidebar-mini-md.sidebar-collapse .main-sidebar.sidebar-focused &.nav-child-indent,
|
||||
.sidebar-mini-md.sidebar-collapse .main-sidebar:hover &.nav-child-indent {
|
||||
.nav-treeview {
|
||||
padding-left: 1rem;
|
||||
|
||||
.nav-treeview {
|
||||
padding-left: 2rem;
|
||||
margin-left: -1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini.sidebar-collapse.text-sm .main-sidebar.sidebar-focused &.nav-child-indent,
|
||||
.sidebar-mini.sidebar-collapse.text-sm .main-sidebar:hover &.nav-child-indent,
|
||||
.sidebar-mini-md.sidebar-collapse.text-sm .main-sidebar.sidebar-focused &.nav-child-indent,
|
||||
.sidebar-mini-md.sidebar-collapse.text-sm .main-sidebar:hover &.nav-child-indent {
|
||||
.nav-treeview {
|
||||
padding-left: .5rem;
|
||||
|
||||
.nav-treeview {
|
||||
padding-left: 1rem;
|
||||
margin-left: -.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini.sidebar-collapse &,
|
||||
.sidebar-mini-md.sidebar-collapse & {
|
||||
> .nav-item > .nav-link {
|
||||
.nav-icon {
|
||||
margin-left: .55rem;
|
||||
}
|
||||
|
||||
&.active {
|
||||
> .nav-icon{
|
||||
margin-left: .36rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.nav-child-indent {
|
||||
.nav-treeview {
|
||||
.nav-treeview {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sidebar-mini.sidebar-collapse.text-sm &,
|
||||
.sidebar-mini-md.sidebar-collapse.text-sm & {
|
||||
> .nav-item > .nav-link {
|
||||
.nav-icon {
|
||||
margin-left: .75rem;
|
||||
}
|
||||
|
||||
&.active {
|
||||
> .nav-icon{
|
||||
margin-left: calc(.75rem - 3px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[class*="sidebar-dark"] & {
|
||||
&.nav-sidebar > .nav-item {
|
||||
.nav-treeview,
|
||||
> .nav-treeview {
|
||||
background: rgba($white, .05);
|
||||
background-color: rgba($white, .05);
|
||||
}
|
||||
|
||||
> .nav-link.active {
|
||||
@@ -538,17 +798,17 @@
|
||||
&.active,
|
||||
&:focus,
|
||||
&:hover {
|
||||
background: none;
|
||||
background-color: transparent;
|
||||
color: $sidebar-dark-active-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[class*='sidebar-light'] & {
|
||||
[class*="sidebar-light"] & {
|
||||
&.nav-sidebar > .nav-item {
|
||||
.nav-treeview,
|
||||
> .nav-treeview {
|
||||
background: rgba($black, .05);
|
||||
background-color: rgba($black, .05);
|
||||
}
|
||||
|
||||
> .nav-link.active {
|
||||
@@ -560,7 +820,7 @@
|
||||
&.active,
|
||||
&:focus,
|
||||
&:hover {
|
||||
background: none;
|
||||
background-color: transparent;
|
||||
color: $sidebar-light-active-color;
|
||||
}
|
||||
}
|
||||
@@ -571,21 +831,29 @@
|
||||
.nav-collapse-hide-child {
|
||||
.menu-open > .nav-treeview {
|
||||
max-height: min-content;
|
||||
opacity: 1;
|
||||
animation-name: fadeIn;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.sidebar-collapse & {
|
||||
.menu-open > .nav-treeview {
|
||||
max-height: 0;
|
||||
opacity: 0;
|
||||
animation-name: fadeOut;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused &,
|
||||
.sidebar-mini.sidebar-collapse .main-sidebar:hover & {
|
||||
.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover &,
|
||||
.sidebar-mini-md.sidebar-collapse .main-sidebar.sidebar-focused &,
|
||||
.sidebar-mini-md.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover & {
|
||||
.menu-open > .nav-treeview {
|
||||
max-height: min-content;
|
||||
opacity: 1;
|
||||
animation-name: fadeIn;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -594,29 +862,33 @@
|
||||
.nav-compact {
|
||||
.nav-link,
|
||||
.nav-header {
|
||||
padding: ($nav-link-padding-y / 2) ($nav-link-padding-x / 2);
|
||||
padding-top: ($nav-link-padding-y / 2);
|
||||
padding-bottom: ($nav-link-padding-y / 2);
|
||||
}
|
||||
|
||||
.nav-header:not(:first-of-type) {
|
||||
padding: ($nav-link-padding-y * 1.5) ($nav-link-padding-x / 2) ($nav-link-padding-y / 2);
|
||||
padding-top: ($nav-link-padding-y * 1.5);
|
||||
padding-bottom: ($nav-link-padding-y / 2);
|
||||
}
|
||||
|
||||
.nav-link > .right,
|
||||
.nav-link > p > .right {
|
||||
top: .5rem;
|
||||
right: .5rem;
|
||||
top: .465rem;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
right: 1.6rem;
|
||||
.text-sm & {
|
||||
.nav-link > .right,
|
||||
.nav-link > p > .right {
|
||||
top: .7rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sidebar Form Control
|
||||
[class*='sidebar-dark'] {
|
||||
[class*="sidebar-dark"] {
|
||||
.form-control-sidebar,
|
||||
.btn-sidebar {
|
||||
background: lighten($sidebar-dark-bg, 5%);
|
||||
background-color: lighten($sidebar-dark-bg, 5%);
|
||||
border: 1px solid lighten($sidebar-dark-bg, 15%);
|
||||
color: lighten(color-yiq(lighten($sidebar-dark-bg, 5%)), 15%);
|
||||
}
|
||||
@@ -627,18 +899,36 @@
|
||||
}
|
||||
|
||||
.btn-sidebar:hover {
|
||||
background: lighten($sidebar-dark-bg, 7.5%);
|
||||
background-color: lighten($sidebar-dark-bg, 7.5%);
|
||||
}
|
||||
|
||||
.btn-sidebar:focus {
|
||||
background: lighten($sidebar-dark-bg, 10%);
|
||||
background-color: lighten($sidebar-dark-bg, 10%);
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
background-color: lighten($sidebar-dark-bg, 7.5%);
|
||||
border-color: lighten($sidebar-dark-bg, 15%);
|
||||
color: $sidebar-dark-color;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($sidebar-dark-bg, 10%);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: lighten($sidebar-dark-bg, 12.5%);
|
||||
}
|
||||
|
||||
.search-path {
|
||||
color: $gray-500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[class*='sidebar-light'] {
|
||||
[class*="sidebar-light"] {
|
||||
.form-control-sidebar,
|
||||
.btn-sidebar {
|
||||
background: darken($sidebar-light-bg, 5%);
|
||||
background-color: darken($sidebar-light-bg, 5%);
|
||||
border: 1px solid darken($sidebar-light-bg, 15%);
|
||||
color: color-yiq(darken($sidebar-light-bg, 5%));
|
||||
}
|
||||
@@ -649,10 +939,187 @@
|
||||
}
|
||||
|
||||
.btn-sidebar:hover {
|
||||
background: darken($sidebar-light-bg, 7.5%);
|
||||
background-color: darken($sidebar-light-bg, 7.5%);
|
||||
}
|
||||
|
||||
.btn-sidebar:focus {
|
||||
background: darken($sidebar-light-bg, 10%);
|
||||
background-color: darken($sidebar-light-bg, 10%);
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
border-color: darken($sidebar-light-bg, 15%);
|
||||
|
||||
&:hover {
|
||||
background-color: darken($sidebar-light-bg, 7.5%);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: darken($sidebar-light-bg, 10%);
|
||||
}
|
||||
|
||||
.search-path {
|
||||
color: $gray-600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sidebar inline input-group fix
|
||||
.sidebar .form-inline .input-group {
|
||||
width: 100%;
|
||||
}
|
||||
.sidebar nav .form-inline {
|
||||
margin-bottom: .2rem;
|
||||
}
|
||||
|
||||
// Sidebar Collapse on Layout Boxed
|
||||
.layout-boxed:not(.sidebar-mini):not(.sidebar-mini-md) {
|
||||
&.sidebar-collapse .main-sidebar {
|
||||
margin-left: 0;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-header,
|
||||
.main-footer {
|
||||
z-index: 9999;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
// Sidebar Search
|
||||
.sidebar-collapse {
|
||||
.form-control-sidebar,
|
||||
.form-control-sidebar ~ .input-group-append,
|
||||
.sidebar-search-results {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
[data-widget="sidebar-search"] {
|
||||
input[type="search"] {
|
||||
&::-ms-clear,
|
||||
&::-ms-reveal {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
&::-webkit-search-cancel-button,
|
||||
&::-webkit-search-decoration,
|
||||
&::-webkit-search-results-button,
|
||||
&::-webkit-search-results-decoration {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-search-results {
|
||||
position: relative;
|
||||
display: none;
|
||||
width: 100%;
|
||||
|
||||
.sidebar-search-open & {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.search-title {
|
||||
margin-bottom: -.1rem;
|
||||
}
|
||||
|
||||
.list-group {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: $zindex-main-sidebar + 1;
|
||||
|
||||
> .list-group-item {
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
|
||||
&:-moz-focusring {
|
||||
margin-top: 0;
|
||||
border-left: 1px solid transparent;
|
||||
border-top: 0;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
border-top: 0;
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-search-results .search-path {
|
||||
font-size: $small-font-size;
|
||||
}
|
||||
|
||||
.sidebar-search-open {
|
||||
.btn,
|
||||
.form-control {
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Custom Area
|
||||
.sidebar-custom {
|
||||
[class*="sidebar-dark"] & {
|
||||
border-top: 1px solid lighten($dark, 12%);
|
||||
}
|
||||
|
||||
[class*="sidebar-light"] & {
|
||||
border-top: 1px solid $gray-300;
|
||||
}
|
||||
}
|
||||
|
||||
.layout-fixed {
|
||||
&.sidebar-collapse {
|
||||
.hide-on-collapse {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.sidebar-collapse:hover {
|
||||
.hide-on-collapse {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.main-sidebar-custom {
|
||||
.sidebar {
|
||||
height: calc(100% - ((#{$main-header-height-inner} + #{$sidebar-custom-height}) + #{$main-header-bottom-border-width}));
|
||||
}
|
||||
|
||||
.sidebar-custom {
|
||||
height: $sidebar-custom-height;
|
||||
padding: $sidebar-custom-padding-x $sidebar-custom-padding-y;
|
||||
}
|
||||
}
|
||||
|
||||
.main-sidebar-custom-lg {
|
||||
.sidebar {
|
||||
height: calc(100% - ((#{$main-header-height-inner} + #{$sidebar-custom-height-lg}) + #{$main-header-bottom-border-width}));
|
||||
}
|
||||
|
||||
.sidebar-custom {
|
||||
height: $sidebar-custom-height-lg;
|
||||
}
|
||||
}
|
||||
|
||||
.main-sidebar-custom-xl {
|
||||
.sidebar {
|
||||
height: calc(100% - ((#{$main-header-height-inner} + #{$sidebar-custom-height-xl}) + #{$main-header-bottom-border-width}));
|
||||
}
|
||||
|
||||
.sidebar-custom {
|
||||
height: $sidebar-custom-height-xl;
|
||||
}
|
||||
}
|
||||
|
||||
.main-sidebar-custom,
|
||||
.main-sidebar-custom-lg,
|
||||
.main-sidebar-custom-xl {
|
||||
.pos-right {
|
||||
position: absolute;
|
||||
right: .5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
.list-header {
|
||||
color: $gray-600;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
font-weight: 700;
|
||||
padding: 10px 4px;
|
||||
}
|
||||
|
||||
.list-seperator {
|
||||
background: $card-border-color;
|
||||
background-color: $card-border-color;
|
||||
height: 1px;
|
||||
margin: 15px 0 9px;
|
||||
}
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
// Rounded and Circle Images
|
||||
.img-rounded {
|
||||
@include border-radius($border-radius)
|
||||
@include border-radius($border-radius);
|
||||
}
|
||||
|
||||
.img-circle {
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
// General attachemnt block
|
||||
.attachment-block {
|
||||
background: $gray-100;
|
||||
background-color: $gray-100;
|
||||
border: 1px solid $card-border-color;
|
||||
margin-bottom: 10px;
|
||||
padding: 5px;
|
||||
@@ -259,7 +259,7 @@
|
||||
.overlay {
|
||||
@include border-radius($border-radius);
|
||||
align-items: center;
|
||||
background: rgba($white, 0.7);
|
||||
background-color: rgba($white, .7);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
z-index: 50;
|
||||
@@ -268,19 +268,23 @@
|
||||
> .fas,
|
||||
> .far,
|
||||
> .fab,
|
||||
> .glyphicon,
|
||||
> .fal,
|
||||
> .fad,
|
||||
> .svg-inline--fa,
|
||||
> .ion {
|
||||
color: $gray-800;
|
||||
}
|
||||
|
||||
&.dark {
|
||||
background: rgba($black, 0.5);
|
||||
background-color: rgba($black, .5);
|
||||
|
||||
> .fa,
|
||||
> .fas,
|
||||
> .far,
|
||||
> .fab,
|
||||
> .glyphicon,
|
||||
> .fal,
|
||||
> .fad,
|
||||
> .svg-inline--fa,
|
||||
> .ion {
|
||||
color: $gray-400;
|
||||
}
|
||||
@@ -288,6 +292,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tab-pane {
|
||||
// Box overlay for LOADING STATE effect on Tab Panels
|
||||
> .overlay-wrapper {
|
||||
position: relative;
|
||||
> .overlay {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
flex-direction: column;
|
||||
margin-top: -$card-spacer-x;
|
||||
margin-left: -$card-spacer-x;
|
||||
height: calc(100% + 2 * #{$card-spacer-x});
|
||||
width: calc(100% + 2 * #{$card-spacer-x});
|
||||
|
||||
&.dark {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ribbon
|
||||
.ribbon-wrapper {
|
||||
height: $ribbon-wrapper-size;
|
||||
@@ -340,7 +364,7 @@
|
||||
border-right: $ribbon-border-size solid transparent;
|
||||
border-top: $ribbon-border-size solid #9e9e9e;
|
||||
bottom: -$ribbon-border-size;
|
||||
content: '';
|
||||
content: "";
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@@ -373,13 +397,13 @@ pre {
|
||||
|
||||
// Blockquotes styles
|
||||
blockquote {
|
||||
background: $white;
|
||||
background-color: $white;
|
||||
border-left: .7rem solid $primary;
|
||||
margin: 1.5em .7rem;
|
||||
padding: 0.5em .7rem;
|
||||
padding: .5em .7rem;
|
||||
|
||||
.box & {
|
||||
background: $gray-200;
|
||||
background-color: $gray-200;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
@@ -445,12 +469,43 @@ blockquote {
|
||||
padding-bottom: .5rem;
|
||||
}
|
||||
|
||||
// Remove Firefox Focusring
|
||||
a,
|
||||
button,
|
||||
input.btn {
|
||||
&:-moz-focusring {
|
||||
border: 0;
|
||||
outline: none;
|
||||
|
||||
// Badge BTN Style
|
||||
.badge-btn {
|
||||
border-radius: $button-border-radius-xs;
|
||||
font-size: $button-font-size-xs;
|
||||
font-weight: 400;
|
||||
padding: $button-padding-y-xs * 2 $button-padding-x-xs * 2;
|
||||
}
|
||||
|
||||
.badge-btn.badge-pill {
|
||||
padding: .375rem .6rem;
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
a:not(.btn):hover {
|
||||
color: lighten($link-color, 10%);
|
||||
}
|
||||
.attachment-block {
|
||||
background-color: lighten($dark, 3.75%);
|
||||
|
||||
.attachment-text {
|
||||
color: $gray-400;
|
||||
}
|
||||
}
|
||||
blockquote {
|
||||
background-color: lighten($dark, 5%);
|
||||
}
|
||||
.close,
|
||||
.mailbox-attachment-close {
|
||||
color: $gray-500;
|
||||
text-shadow: 0 1px 0 $gray-700;
|
||||
}
|
||||
.tab-custom-content {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
.list-group-item {
|
||||
background-color: $dark;
|
||||
border-color: $gray-600;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// General: Mixins
|
||||
//
|
||||
|
||||
@import 'mixins/cards';
|
||||
@import 'mixins/sidebar';
|
||||
@import 'mixins/navbar';
|
||||
@import 'mixins/accent';
|
||||
@import 'mixins/custom-forms';
|
||||
@import 'mixins/backgrounds';
|
||||
@import 'mixins/direct-chat';
|
||||
@import 'mixins/toasts';
|
||||
@import 'mixins/miscellaneous';
|
||||
@import "mixins/cards";
|
||||
@import "mixins/sidebar";
|
||||
@import "mixins/navbar";
|
||||
@import "mixins/accent";
|
||||
@import "mixins/custom-forms";
|
||||
@import "mixins/backgrounds";
|
||||
@import "mixins/direct-chat";
|
||||
@import "mixins/toasts";
|
||||
@import "mixins/miscellaneous";
|
||||
|
||||
@@ -34,7 +34,39 @@
|
||||
&.bg-success, {
|
||||
.close {
|
||||
color: $white;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
text-shadow: 0 1px 0 $black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
.modal-content {
|
||||
background-color: $dark;
|
||||
|
||||
&.bg-warning {
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
.close {
|
||||
color: $dark !important;
|
||||
text-shadow: 0 1px 0 $gray-700 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.bg-primary,
|
||||
&.bg-secondary,
|
||||
&.bg-info,
|
||||
&.bg-danger,
|
||||
&.bg-success {
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
border-color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
color: $gray-600;
|
||||
|
||||
&:not(.active):hover {
|
||||
color: theme-color('primary');
|
||||
color: theme-color("primary");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
border-top-right-radius: 0;
|
||||
margin-right: -$nav-tabs-border-width;
|
||||
|
||||
@include hover-focus {
|
||||
@include hover-focus () {
|
||||
border-color: $gray-200 transparent $gray-200 $gray-200;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@
|
||||
border-top-right-radius: $nav-tabs-border-radius;
|
||||
margin-left: -$nav-tabs-border-width;
|
||||
|
||||
@include hover-focus {
|
||||
@include hover-focus () {
|
||||
border-color: $gray-200 $gray-200 $gray-200 transparent;
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,10 @@
|
||||
padding-left: $navbar-nav-link-padding-x;
|
||||
padding-right: $navbar-nav-link-padding-x;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
// Color variants
|
||||
@@ -77,6 +81,9 @@
|
||||
@if $color == dark or $color == light {
|
||||
.navbar-#{$color} {
|
||||
background-color: $value;
|
||||
@if $color == dark {
|
||||
border-color: lighten($dark, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,3 +101,49 @@
|
||||
background-color: $value;
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.nav-pills .nav-link {
|
||||
color: $gray-400;
|
||||
}
|
||||
.nav-tabs {
|
||||
border-color: lighten($dark, 15%);
|
||||
|
||||
.nav-link:focus,
|
||||
.nav-link:hover {
|
||||
border-color: lighten($dark, 15%);
|
||||
}
|
||||
|
||||
.nav-item.show .nav-link,
|
||||
.nav-link.active {
|
||||
background-color: $dark;
|
||||
border-color: lighten($dark, 15%) lighten($dark, 15%) transparent lighten($dark, 15%);
|
||||
color: $white;
|
||||
}
|
||||
|
||||
&.flex-column {
|
||||
.nav-item.show .nav-link,
|
||||
.nav-link {
|
||||
&.active,
|
||||
&:focus,
|
||||
&:hover {
|
||||
border-color: lighten($dark, 15%) transparent lighten($dark, 15%) lighten($dark, 15%);
|
||||
}
|
||||
&:focus,
|
||||
&:hover {
|
||||
background-color: lighten($dark, 5%);
|
||||
}
|
||||
}
|
||||
&.nav-tabs-right {
|
||||
border-color: lighten($dark, 15%);
|
||||
.nav-link {
|
||||
&.active,
|
||||
&:focus,
|
||||
&:hover {
|
||||
border-color: lighten($dark, 15%) lighten($dark, 15%) lighten($dark, 15%) transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
73
build/scss/_pagination.scss
Normal file
73
build/scss/_pagination.scss
Normal file
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// Component: Pagination
|
||||
//
|
||||
|
||||
.pagination-month {
|
||||
.page-item {
|
||||
justify-self: stretch;
|
||||
|
||||
.page-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-shadow: none;
|
||||
}
|
||||
&:first-child,
|
||||
&:last-child {
|
||||
.page-link {
|
||||
height: 100%;
|
||||
font-size: $font-size-lg;
|
||||
}
|
||||
}
|
||||
.page-month {
|
||||
margin-bottom: 0;
|
||||
font-size: $font-size-lg;
|
||||
font-weight: $font-weight-bold;
|
||||
}
|
||||
.page-year {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.pagination-lg {
|
||||
.page-month {
|
||||
font-size: ($font-size-lg * 1.25);
|
||||
}
|
||||
}
|
||||
&.pagination-sm {
|
||||
.page-month {
|
||||
font-size: ($font-size-base);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.page-item {
|
||||
&.disabled .page-link {
|
||||
background-color: lighten($dark, 2.5%);
|
||||
border-color: $gray-600;
|
||||
color: $gray-600;
|
||||
}
|
||||
&.active {
|
||||
.page-link {
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $gray-400;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:not(.active) {
|
||||
.page-link {
|
||||
background-color: $dark;
|
||||
border-color: $gray-600;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: lighten($primary, 5%);
|
||||
background-color: lighten($dark, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,14 +8,15 @@
|
||||
padding: 0;
|
||||
|
||||
> .item {
|
||||
@include clearfix;
|
||||
@include clearfix ();
|
||||
|
||||
@if $enable-rounded {
|
||||
@include border-radius($border-radius);
|
||||
}
|
||||
|
||||
background: $white;
|
||||
background-color: $white;
|
||||
padding: 10px 0;
|
||||
|
||||
}
|
||||
|
||||
.product-img {
|
||||
@@ -52,3 +53,16 @@
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.dark-mode {
|
||||
.products-list > .item {
|
||||
background-color: $dark;
|
||||
color: $white;
|
||||
border-bottom-color: $gray-600;
|
||||
}
|
||||
|
||||
.product-description {
|
||||
color: $gray-400;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,3 +64,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.progress {
|
||||
background: lighten($dark, 7.5%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
.brand-link {
|
||||
&.logo-switch {
|
||||
&::before {
|
||||
content: '\00a0';
|
||||
content: "\00a0";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,21 +41,62 @@
|
||||
// Add sidebar-mini class to the body tag to activate this feature
|
||||
.sidebar-mini {
|
||||
@include media-breakpoint-up(lg) {
|
||||
@include sidebar-mini-breakpoint;
|
||||
@include sidebar-mini-breakpoint ();
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-down(md) {
|
||||
.sidebar-mini.sidebar-collapse .main-sidebar {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mini-md {
|
||||
@include media-breakpoint-up(md) {
|
||||
@include sidebar-mini-breakpoint;
|
||||
@include sidebar-mini-breakpoint ();
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-down(sm) {
|
||||
.sidebar-mini-md.sidebar-collapse .main-sidebar {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOut {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-collapse {
|
||||
.main-sidebar.sidebar-focused,
|
||||
.main-sidebar:hover {
|
||||
.nav-header {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-no-expand.main-sidebar.sidebar-focused,
|
||||
.sidebar-no-expand.main-sidebar:hover {
|
||||
width: $sidebar-mini-width;
|
||||
|
||||
.nav-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.brand-link {
|
||||
width: $sidebar-mini-width !important;
|
||||
}
|
||||
@@ -65,12 +106,16 @@
|
||||
}
|
||||
|
||||
.logo-xs {
|
||||
opacity: 1;
|
||||
animation-name: fadeIn;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.logo-xl {
|
||||
opacity: 0;
|
||||
animation-name: fadeOut;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@@ -82,7 +127,9 @@
|
||||
.user-panel > .info,
|
||||
.nav-sidebar .nav-link p {
|
||||
margin-left: -10px;
|
||||
opacity: 0;
|
||||
animation-name: fadeOut;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
}
|
||||
@@ -90,18 +137,6 @@
|
||||
.nav-sidebar > .nav-item .nav-icon {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.nav-flat {
|
||||
.nav-icon {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
|
||||
.nav-treeview {
|
||||
.nav-icon {
|
||||
margin-left: .3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,5 +170,5 @@
|
||||
.main-sidebar .logo-xs,
|
||||
.main-sidebar .logo-xl,
|
||||
.sidebar .user-panel .info {
|
||||
@include transition(margin-left $transition-speed linear, opacity $transition-speed ease, visibility $transition-speed ease)
|
||||
@include transition(margin-left $transition-speed linear, opacity $transition-speed ease, visibility $transition-speed ease);
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
|
||||
> .small-box-footer {
|
||||
background: rgba($black, 0.1);
|
||||
color: rgba($white, 0.8);
|
||||
background-color: rgba($black, .1);
|
||||
color: rgba($white, .8);
|
||||
display: block;
|
||||
padding: 3px 0;
|
||||
position: relative;
|
||||
@@ -26,15 +26,15 @@
|
||||
z-index: 10;
|
||||
|
||||
&:hover {
|
||||
background: rgba($black, 0.15);
|
||||
background-color: rgba($black, .15);
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
@include font-size(2.2rem);
|
||||
font-weight: bold;
|
||||
margin: 0 0 10px 0;
|
||||
font-weight: 700;
|
||||
margin: 0 0 10px;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -81,7 +81,7 @@
|
||||
> small {
|
||||
color: $gray-100;
|
||||
display: block;
|
||||
font-size: 0.9rem;
|
||||
font-size: .9rem;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
// the icon
|
||||
.icon {
|
||||
color: rgba($black, 0.15);
|
||||
color: rgba($black, .15);
|
||||
z-index: 0;
|
||||
|
||||
> i {
|
||||
@@ -101,19 +101,27 @@
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 15px;
|
||||
transition: all $transition-speed linear;
|
||||
transition: transform $transition-speed linear;
|
||||
|
||||
&.fa,
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.ion {
|
||||
font-size: 70px;
|
||||
top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
svg {
|
||||
font-size: 70px;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 15px;
|
||||
transition: transform $transition-speed linear;
|
||||
}
|
||||
}
|
||||
|
||||
// Small box hover state
|
||||
@@ -121,16 +129,21 @@
|
||||
text-decoration: none;
|
||||
|
||||
// Animate icons on small box hover
|
||||
.icon > i {
|
||||
font-size: 95px;
|
||||
|
||||
&.fa,
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.glyphicon,
|
||||
&.ion {
|
||||
font-size: 75px;
|
||||
.icon {
|
||||
> i {
|
||||
&,
|
||||
&.fa,
|
||||
&.fas,
|
||||
&.far,
|
||||
&.fab,
|
||||
&.fal,
|
||||
&.fad,
|
||||
&.ion {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
> svg {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
font-weight: 300;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
text-shadow: 0 1px 1px rgba($black, 0.2);
|
||||
text-shadow: 0 1px 1px rgba($black, .2);
|
||||
}
|
||||
|
||||
//User single line description
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
thead tr:nth-child(1) th {
|
||||
background-color: $white;
|
||||
border-bottom: 0;
|
||||
box-shadow: inset 0 1px 0 $table-border-color,
|
||||
inset 0 -1px 0 $table-border-color;
|
||||
box-shadow: inset 0 1px 0 $table-border-color, inset 0 -1px 0 $table-border-color;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
@@ -23,8 +22,7 @@
|
||||
thead tr {
|
||||
&:nth-child(1) th {
|
||||
background-color: $table-dark-bg;
|
||||
box-shadow: inset 0 1px 0 $table-dark-border-color,
|
||||
inset 0 -1px 0 $table-dark-border-color;
|
||||
box-shadow: inset 0 1px 0 $table-dark-border-color, inset 0 -1px 0 $table-dark-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,6 +58,8 @@
|
||||
.card-body.p-0 & {
|
||||
thead > tr > th,
|
||||
thead > tr > td,
|
||||
tfoot > tr > th,
|
||||
tfoot > tr > td,
|
||||
tbody > tr > th,
|
||||
tbody > tr > td {
|
||||
&:first-of-type {
|
||||
@@ -72,3 +72,84 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Expandable Table
|
||||
|
||||
.table-hover tbody tr.expandable-body:hover {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
|
||||
[data-widget="expandable-table"] {
|
||||
cursor: pointer;
|
||||
|
||||
i {
|
||||
transition: transform $transition-speed linear;
|
||||
}
|
||||
&[aria-expanded="true"] {
|
||||
td > i {
|
||||
// stylelint-disable selector-max-attribute
|
||||
&[class*="right"] {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
&[class*="left"] {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
// stylelint-enable selector-max-attribute
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.expandable-body {
|
||||
> td {
|
||||
padding: 0 !important;
|
||||
width: 100%;
|
||||
|
||||
> div,
|
||||
> p {
|
||||
padding: $table-cell-padding;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
width: calc(100% - #{$table-cell-padding});
|
||||
margin: 0 0 0 $table-cell-padding;
|
||||
|
||||
tr:first-child {
|
||||
td,
|
||||
th {
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.table-bordered {
|
||||
&,
|
||||
td,
|
||||
th {
|
||||
border-color: $gray-600;
|
||||
}
|
||||
}
|
||||
.table-hover {
|
||||
tbody tr:hover {
|
||||
color: $gray-300;
|
||||
background-color: lighten($dark, 2.5%);
|
||||
border-color: $gray-600;
|
||||
}
|
||||
}
|
||||
.table {
|
||||
thead th {
|
||||
border-bottom-color: $gray-600;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
border-top-color: $gray-600;
|
||||
}
|
||||
&.table-head-fixed {
|
||||
thead tr:nth-child(1) th {
|
||||
background-color: lighten($dark, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
// text modification
|
||||
.text-bold {
|
||||
&, &.table td, &.table th {
|
||||
&,
|
||||
&.table td,
|
||||
&.table th {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
@@ -32,6 +34,12 @@
|
||||
// text color variations
|
||||
@each $name, $color in $colors {
|
||||
.text-#{$name} {
|
||||
color: #{$color};
|
||||
color: #{$color} !important;
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.text-muted {
|
||||
color: $gray-500 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
// The line
|
||||
&::before {
|
||||
@include border-radius($border-radius);
|
||||
background: $gray-300;
|
||||
background-color: $gray-300;
|
||||
bottom: 0;
|
||||
content: '';
|
||||
content: "";
|
||||
left: 31px;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
@@ -33,7 +33,7 @@
|
||||
> .timeline-item {
|
||||
@include box-shadow($card-shadow);
|
||||
@include border-radius($border-radius);
|
||||
background: $white;
|
||||
background-color: $white;
|
||||
color: $gray-700;
|
||||
margin-left: 60px;
|
||||
margin-right: 15px;
|
||||
@@ -70,7 +70,9 @@
|
||||
> img {
|
||||
margin: 10px;
|
||||
}
|
||||
> dl, ol, ul {
|
||||
> dl,
|
||||
ol,
|
||||
ul {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -86,11 +88,13 @@
|
||||
> .fas,
|
||||
> .far,
|
||||
> .fab,
|
||||
> .glyphicon,
|
||||
> .fal,
|
||||
> .fad,
|
||||
> .svg-inline--fa,
|
||||
> .ion {
|
||||
background: $gray-500;
|
||||
background-color: $gray-500;
|
||||
border-radius: 50%;
|
||||
font-size: 15px;
|
||||
font-size: 16px;
|
||||
height: 30px;
|
||||
left: 18px;
|
||||
line-height: 30px;
|
||||
@@ -99,6 +103,9 @@
|
||||
top: 0;
|
||||
width: 30px;
|
||||
}
|
||||
> .svg-inline--fa {
|
||||
padding: 7px;
|
||||
}
|
||||
}
|
||||
// Time label
|
||||
> .time-label {
|
||||
@@ -116,7 +123,7 @@
|
||||
> div {
|
||||
> .timeline-item {
|
||||
@include box-shadow(none);
|
||||
background: $gray-100;
|
||||
background-color: $gray-100;
|
||||
border: 1px solid $gray-300;
|
||||
|
||||
> .timeline-header {
|
||||
@@ -125,3 +132,24 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.timeline {
|
||||
&::before {
|
||||
background-color: $gray-600;
|
||||
}
|
||||
> div > .timeline-item {
|
||||
background-color: $dark;
|
||||
color: $white;
|
||||
border-color: $gray-600;
|
||||
|
||||
> .timeline-header {
|
||||
color: $gray-400;
|
||||
border-color: $gray-600;
|
||||
}
|
||||
> .time {
|
||||
color: $gray-400;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.toast {
|
||||
background-color: rgba($dark, .85);
|
||||
color: $white;
|
||||
|
||||
.toast-header {
|
||||
background-color: rgba($dark, .7);
|
||||
color: $gray-100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toast {
|
||||
@each $name, $color in $theme-colors {
|
||||
@include toast-variant($name, $color);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
.users-list {
|
||||
@include list-unstyled;
|
||||
@include list-unstyled ();
|
||||
|
||||
> li {
|
||||
float: left;
|
||||
@@ -43,3 +43,12 @@
|
||||
color: darken($gray-500, 20%);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.users-list-name {
|
||||
color: $gray-400;
|
||||
}
|
||||
.users-list-date {
|
||||
color: $gray-500;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// COLORS
|
||||
// --------------------------------------------------------
|
||||
$blue: #0073b7 !default;
|
||||
$lightblue: #3c8dbc !default;
|
||||
$navy: #001f3f !default;
|
||||
$teal: #39cccc !default;
|
||||
$olive: #3d9970 !default;
|
||||
@@ -16,13 +17,17 @@ $maroon: #d81b60 !default;
|
||||
$black: #111 !default;
|
||||
$gray-x-light: #d2d6de !default;
|
||||
|
||||
$colors: map-merge((
|
||||
'navy': $navy,
|
||||
'olive': $olive,
|
||||
'lime': $lime,
|
||||
'fuchsia': $fuchsia,
|
||||
'maroon': $maroon,
|
||||
), $colors);
|
||||
$colors: map-merge(
|
||||
(
|
||||
"lightblue": $lightblue,
|
||||
"navy": $navy,
|
||||
"olive": $olive,
|
||||
"lime": $lime,
|
||||
"fuchsia": $fuchsia,
|
||||
"maroon": $maroon,
|
||||
),
|
||||
$colors
|
||||
);
|
||||
|
||||
// LAYOUT
|
||||
// --------------------------------------------------------
|
||||
@@ -31,8 +36,13 @@ $font-size-root: 1rem !default;
|
||||
|
||||
// Sidebar
|
||||
$sidebar-width: 250px !default;
|
||||
$sidebar-padding-x: 0.5rem !default;
|
||||
$sidebar-padding-x: .5rem !default;
|
||||
$sidebar-padding-y: 0 !default;
|
||||
$sidebar-custom-height: 4rem !default;
|
||||
$sidebar-custom-height-lg: 6rem !default;
|
||||
$sidebar-custom-height-xl: 8rem !default;
|
||||
$sidebar-custom-padding-x: .85rem !default;
|
||||
$sidebar-custom-padding-y: .5rem !default;
|
||||
|
||||
// Boxed layout maximum width
|
||||
$boxed-layout-max-width: 1250px !default;
|
||||
@@ -72,19 +82,19 @@ $main-header-height-sm: calc(#{$main-header-height-sm-inner} + #{$main-header-bo
|
||||
|
||||
|
||||
// Main header skins
|
||||
$main-header-dark-form-control-bg: hsla(100, 100%, 100%, 0.2) !default;
|
||||
$main-header-dark-form-control-focused-bg: hsla(100, 100%, 100%, 0.6) !default;
|
||||
$main-header-dark-form-control-bg: rgba(255, 255, 255, .2) !default;
|
||||
$main-header-dark-form-control-focused-bg: rgba(255, 255, 255, .6) !default;
|
||||
$main-header-dark-form-control-focused-color: $gray-800 !default;
|
||||
$main-header-dark-form-control-border: 0 !default;
|
||||
$main-header-dark-form-control-focused-border: 0 !default;
|
||||
$main-header-dark-placeholder-color: hsla(100, 100%, 100%, 0.6) !default;
|
||||
$main-header-dark-placeholder-color: rgba(255, 255, 255, .6) !default;
|
||||
|
||||
$main-header-light-form-control-bg: darken($gray-100, 2%) !default;
|
||||
$main-header-light-form-control-focused-bg: $gray-200 !default;
|
||||
$main-header-light-form-control-focused-color: $gray-800 !default;
|
||||
$main-header-light-form-control-border: 0 !default;
|
||||
$main-header-light-form-control-focused-border: 0 !default;
|
||||
$main-header-light-placeholder-color: hsla(0, 0%, 0%, 0.6) !default;
|
||||
$main-header-light-placeholder-color: rgba(0, 0, 0, .6) !default;
|
||||
|
||||
// MAIN FOOTER
|
||||
// --------------------------------------------------------
|
||||
@@ -97,23 +107,23 @@ $main-footer-height-inner: (($font-size-root * $line-height-base) + ($main-foote
|
||||
$main-footer-height: calc(#{$main-footer-height-inner} + #{$main-footer-border-top-width}) !default;
|
||||
$main-footer-height-sm-inner: (($font-size-sm * $line-height-base) + ($main-footer-padding-sm * 2)) !default;
|
||||
$main-footer-height-sm: calc(#{$main-footer-height-sm-inner} + #{$main-footer-border-top-width}) !default;
|
||||
$main-footer-bg: $white;
|
||||
$main-footer-bg: $white !default;
|
||||
|
||||
// SIDEBAR SKINS
|
||||
// --------------------------------------------------------
|
||||
|
||||
// Dark sidebar
|
||||
$sidebar-dark-bg: $dark !default;
|
||||
$sidebar-dark-hover-bg: hsla(100, 100%, 100%, 0.1) !default;
|
||||
$sidebar-dark-color: #C2C7D0 !default;
|
||||
$sidebar-dark-hover-bg: rgba(255, 255, 255, .1) !default;
|
||||
$sidebar-dark-color: #c2c7d0 !default;
|
||||
$sidebar-dark-hover-color: $white !default;
|
||||
$sidebar-dark-active-color: $white !default;
|
||||
$sidebar-dark-submenu-bg: transparent !default;
|
||||
$sidebar-dark-submenu-color: #C2C7D0 !default;
|
||||
$sidebar-dark-submenu-color: #c2c7d0 !default;
|
||||
$sidebar-dark-submenu-hover-color: $white !default;
|
||||
$sidebar-dark-submenu-hover-bg: $sidebar-dark-hover-bg !default;
|
||||
$sidebar-dark-submenu-active-color: $sidebar-dark-bg !default;
|
||||
$sidebar-dark-submenu-active-bg: hsla(100, 100%, 100%, 0.9) !default;
|
||||
$sidebar-dark-submenu-active-bg: rgba(255, 255, 255, .9) !default;
|
||||
$sidebar-dark-header-color: $white !default;
|
||||
|
||||
// Light sidebar
|
||||
@@ -182,7 +192,7 @@ $zindex-toasts: $zindex-main-sidebar + 2 !default;
|
||||
// --------------------------------------------------------
|
||||
|
||||
// Transition global options
|
||||
$transition-speed: 0.3s !default;
|
||||
$transition-speed: .3s !default;
|
||||
$transition-fn: ease-in-out !default;
|
||||
|
||||
// TEXT
|
||||
@@ -203,18 +213,21 @@ $button-line-height-xs: $line-height-sm !default;
|
||||
$button-font-size-xs: ($font-size-base * .75) !default;
|
||||
$button-border-radius-xs: .15rem !default;
|
||||
|
||||
|
||||
|
||||
// ELEVATION
|
||||
// --------------------------------------------------------
|
||||
$elevations: ();
|
||||
$elevations: map-merge((
|
||||
1: unquote('0 1px 3px ' + rgba($black, 0.12) + ', 0 1px 2px ' + rgba($black, 0.24)),
|
||||
2: unquote('0 3px 6px ' + rgba($black, 0.16) + ', 0 3px 6px ' + rgba($black, 0.23)),
|
||||
3: unquote('0 10px 20px ' + rgba($black, 0.19) + ', 0 6px 6px ' + rgba($black, 0.23)),
|
||||
4: unquote('0 14px 28px ' + rgba($black, 0.25) + ', 0 10px 10px ' + rgba($black, 0.22)),
|
||||
5: unquote('0 19px 38px ' + rgba($black, 0.30) + ', 0 15px 12px ' + rgba($black, 0.22)),
|
||||
), $elevations);
|
||||
|
||||
$elevations: map-merge(
|
||||
(
|
||||
1: unquote("0 1px 3px " + rgba($black, .12) + ", 0 1px 2px " + rgba($black, .24)),
|
||||
2: unquote("0 3px 6px " + rgba($black, .16) + ", 0 3px 6px " + rgba($black, .23)),
|
||||
3: unquote("0 10px 20px " + rgba($black, .19) + ", 0 6px 6px " + rgba($black, .23)),
|
||||
4: unquote("0 14px 28px " + rgba($black, .25) + ", 0 10px 10px " + rgba($black, .22)),
|
||||
5: unquote("0 19px 38px " + rgba($black, .3) + ", 0 15px 12px " + rgba($black, .22)),
|
||||
),
|
||||
$elevations
|
||||
);
|
||||
|
||||
// RIBBON
|
||||
// --------------------------------------------------------
|
||||
$ribbon-border-size: 3px !default;
|
||||
@@ -228,7 +241,7 @@ $ribbon-right: -2px !default;
|
||||
$ribbon-lg-wrapper-size: 120px !default;
|
||||
$ribbon-lg-width: 160px !default;
|
||||
$ribbon-lg-top: 26px !default;
|
||||
$ribbon-lg-right: 0px !default;
|
||||
$ribbon-lg-right: 0 !default;
|
||||
$ribbon-xl-wrapper-size: 180px !default;
|
||||
$ribbon-xl-width: 240px !default;
|
||||
$ribbon-xl-top: 47px !default;
|
||||
|
||||
24
build/scss/adminlte.scss
Normal file
24
build/scss/adminlte.scss
Normal file
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* AdminLTE v3.1.0-rc
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <https://adminlte.io>
|
||||
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|
||||
*/
|
||||
|
||||
// Bootstrap
|
||||
// ---------------------------------------------------
|
||||
@import "~bootstrap/scss/functions";
|
||||
@import "bootstrap-variables";
|
||||
@import "~bootstrap/scss/bootstrap";
|
||||
|
||||
// Variables and Mixins
|
||||
// ---------------------------------------------------
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
@import "parts/core";
|
||||
@import "parts/components";
|
||||
@import "parts/extra-components";
|
||||
@import "parts/pages";
|
||||
@import "parts/plugins";
|
||||
@import "parts/miscellaneous";
|
||||
@@ -4,31 +4,100 @@
|
||||
|
||||
// Accent Variant
|
||||
@mixin accent-variant($name, $color) {
|
||||
$link-color: $color;
|
||||
.accent-#{$name} {
|
||||
$link-color: $color;
|
||||
$link-hover-color: darken($color, 15%);
|
||||
$pagination-active-bg: $color;
|
||||
$pagination-active-border-color: $color;
|
||||
|
||||
a {
|
||||
.btn-link,
|
||||
a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.btn) {
|
||||
color: $link-color;
|
||||
|
||||
@include hover {
|
||||
@include hover () {
|
||||
color: $link-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: $color;
|
||||
color: color-yiq($color);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::before {
|
||||
background-color: $color;
|
||||
border-color: darken($color, 20%);
|
||||
}
|
||||
|
||||
&::after {
|
||||
$new-color: color-yiq($color);
|
||||
background-image: str-replace($custom-checkbox-indicator-icon-checked, str-replace(#{$custom-control-indicator-checked-color}, "#", "%23"), str-replace(#{$new-color}, "#", "%23"));
|
||||
}
|
||||
}
|
||||
|
||||
.form-control:focus:not(.is-invalid):not(.is-warning):not(.is-valid),
|
||||
.custom-select:focus,
|
||||
.custom-control-input:focus:not(:checked) ~ .custom-control-label::before,
|
||||
.custom-file-input:focus ~ .custom-file-label {
|
||||
border-color: lighten($color, 25%);
|
||||
}
|
||||
|
||||
.page-item {
|
||||
.page-link {
|
||||
color: $link-color;
|
||||
}
|
||||
|
||||
&.active a,
|
||||
&.active .page-link {
|
||||
background-color: $pagination-active-bg;
|
||||
border-color: $pagination-active-border-color;
|
||||
color: $pagination-active-color;
|
||||
}
|
||||
|
||||
&.disabled a,
|
||||
&.disabled .page-link {
|
||||
background-color: $pagination-disabled-bg;
|
||||
border-color: $pagination-disabled-border-color;
|
||||
color: $pagination-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
[class*="sidebar-dark-"] {
|
||||
.sidebar {
|
||||
a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
|
||||
color: $sidebar-dark-color;
|
||||
|
||||
@include hover () {
|
||||
color: $sidebar-dark-hover-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[class*="sidebar-light-"] {
|
||||
.sidebar {
|
||||
a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
|
||||
color: $sidebar-light-color;
|
||||
|
||||
@include hover () {
|
||||
color: $sidebar-light-hover-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.dark-mode.accent-#{$name} {
|
||||
.page-item {
|
||||
.page-link {
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: lighten($link-color, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
// Background Gradient Variant
|
||||
@mixin background-gradient-variant($name, $color) {
|
||||
.bg-gradient-#{$name} {
|
||||
@include bg-gradient-variant('&', $color);
|
||||
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
|
||||
color: color-yiq($color);
|
||||
|
||||
&.btn {
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@include bg-gradient-variant('&', darken($color, 7.5%));
|
||||
background: $color linear-gradient(180deg, mix($body-bg, darken($color, 7.5%), 15%), darken($color, 7.5%)) repeat-x !important;
|
||||
border-color: darken($color, 10%);
|
||||
color: darken(color-yiq($color), 7.5%);
|
||||
}
|
||||
@@ -55,7 +55,7 @@
|
||||
&:not(:disabled):not(.disabled).active,
|
||||
&:active,
|
||||
&.active {
|
||||
@include bg-gradient-variant('&', darken($color, 10%));
|
||||
background: $color linear-gradient(180deg, mix($body-bg, darken($color, 10%), 15%), darken($color, 10%)) repeat-x !important;
|
||||
border-color: darken($color, 12.5%);
|
||||
color: color-yiq(darken($color, 10%));
|
||||
}
|
||||
|
||||
@@ -4,29 +4,27 @@
|
||||
|
||||
@mixin cards-variant($name, $color) {
|
||||
.card-#{$name} {
|
||||
&.card-tabs {
|
||||
&:not(.card-outline) {
|
||||
.card-header {
|
||||
background-color: $color;
|
||||
&:not(.card-outline) {
|
||||
> .card-header {
|
||||
background-color: $color;
|
||||
|
||||
&,
|
||||
a {
|
||||
color: color-yiq($color);
|
||||
}
|
||||
|
||||
a.active {
|
||||
color: color-yiq($white);
|
||||
}
|
||||
&,
|
||||
a {
|
||||
color: color-yiq($color);
|
||||
}
|
||||
}
|
||||
|
||||
&.card-outline {
|
||||
border-top: 3px solid $color;
|
||||
a.active {
|
||||
color: color-yiq($white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.card-outline {
|
||||
border-top: 3px solid $color;
|
||||
}
|
||||
|
||||
&.card-outline-tabs {
|
||||
.card-header {
|
||||
> .card-header {
|
||||
a {
|
||||
&:hover {
|
||||
border-top: 3px solid $nav-tabs-border-color;
|
||||
@@ -44,7 +42,7 @@
|
||||
.bg-gradient-#{$name},
|
||||
.card-#{$name}:not(.card-outline) {
|
||||
.btn-tool {
|
||||
color: rgba(color-yiq($color), 0.8);
|
||||
color: rgba(color-yiq($color), .8);
|
||||
|
||||
&:hover {
|
||||
color: color-yiq($color);
|
||||
@@ -65,7 +63,7 @@
|
||||
table td.hour:hover,
|
||||
table td.minute:hover,
|
||||
table td.second:hover {
|
||||
background: darken($color, 8%);
|
||||
background-color: darken($color, 8%);
|
||||
color: color-yiq($color);
|
||||
}
|
||||
|
||||
@@ -75,7 +73,7 @@
|
||||
|
||||
table td.active,
|
||||
table td.active:hover {
|
||||
background: lighten($color, 10%);
|
||||
background-color: lighten($color, 10%);
|
||||
color: color-yiq($color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,32 +5,32 @@
|
||||
// Custom Switch Variant
|
||||
@mixin custom-switch-variant($name, $color) {
|
||||
&.custom-switch-off-#{$name} {
|
||||
& .custom-control-input ~ .custom-control-label::before {
|
||||
background: #{$color};
|
||||
.custom-control-input ~ .custom-control-label::before {
|
||||
background-color: #{$color};
|
||||
border-color: darken($color, 20%);
|
||||
}
|
||||
|
||||
& .custom-control-input:focus ~ .custom-control-label::before {
|
||||
.custom-control-input:focus ~ .custom-control-label::before {
|
||||
box-shadow: 0 0 0 1px $body-bg, 0 0 0 2px rgba($color, .25);
|
||||
}
|
||||
|
||||
& .custom-control-input ~ .custom-control-label::after {
|
||||
background: darken($color, 25%);
|
||||
.custom-control-input ~ .custom-control-label::after {
|
||||
background-color: darken($color, 25%);
|
||||
}
|
||||
}
|
||||
|
||||
&.custom-switch-on-#{$name} {
|
||||
& .custom-control-input:checked ~ .custom-control-label::before {
|
||||
background: #{$color};
|
||||
.custom-control-input:checked ~ .custom-control-label::before {
|
||||
background-color: #{$color};
|
||||
border-color: darken($color, 20%);
|
||||
}
|
||||
|
||||
& .custom-control-input:checked:focus ~ .custom-control-label::before {
|
||||
.custom-control-input:checked:focus ~ .custom-control-label::before {
|
||||
box-shadow: 0 0 0 1px $body-bg, 0 0 0 2px rgba($color, .25);
|
||||
}
|
||||
|
||||
& .custom-control-input:checked ~ .custom-control-label::after {
|
||||
background: lighten($color, 30%);
|
||||
.custom-control-input:checked ~ .custom-control-label::after {
|
||||
background-color: lighten($color, 30%);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,3 +79,45 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Custom Control Input Variant
|
||||
@mixin custom-control-input-variant($name, $color) {
|
||||
$custom-control-indicator-checked-color: $color;
|
||||
$custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23");
|
||||
$custom-radio-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23");
|
||||
|
||||
.custom-control-input-#{$name} {
|
||||
&:checked ~ .custom-control-label::before {
|
||||
border-color: $color;
|
||||
@include gradient-bg($color);
|
||||
}
|
||||
|
||||
&.custom-control-input-outline:checked {
|
||||
&[type="checkbox"] ~ .custom-control-label::after {
|
||||
background-image: $custom-checkbox-indicator-icon-checked !important;
|
||||
}
|
||||
&[type="radio"] ~ .custom-control-label::after {
|
||||
background-image: $custom-radio-indicator-icon-checked !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus ~ .custom-control-label::before {
|
||||
// the mixin is not used here to make sure there is feedback
|
||||
@if $enable-shadows {
|
||||
box-shadow: $input-box-shadow, 0 0 0 $input-btn-focus-width rgba($color, .25);
|
||||
} @else {
|
||||
box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .25);
|
||||
}
|
||||
}
|
||||
|
||||
&:focus:not(:checked) ~ .custom-control-label::before {
|
||||
border-color: lighten($color, 25%);
|
||||
}
|
||||
|
||||
&:not(:disabled):active ~ .custom-control-label::before {
|
||||
background-color: lighten($color, 35%);
|
||||
border-color: lighten($color, 35%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
//
|
||||
|
||||
// Direct Chat Variant
|
||||
@mixin direct-chat-variant($bg-color, $color: #fff) {
|
||||
@mixin direct-chat-variant($bg-color, $color: $white) {
|
||||
.right > .direct-chat-text {
|
||||
background: $bg-color;
|
||||
background-color: $bg-color;
|
||||
border-color: $bg-color;
|
||||
color: color-yiq($bg-color);
|
||||
|
||||
|
||||
@@ -25,11 +25,8 @@
|
||||
}
|
||||
|
||||
// Gradient background
|
||||
@mixin gradient($color: #F5F5F5, $start: #EEE, $stop: #FFF) {
|
||||
background: $color;
|
||||
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, $start), color-stop(1, $stop));
|
||||
background: -ms-linear-gradient(bottom, $start, $stop);
|
||||
background: -moz-linear-gradient(center bottom, $start 0%, $stop 100%);
|
||||
background: -o-linear-gradient($stop, $start);
|
||||
@mixin gradient($color: #f5f5f5, $start: #eee, $stop: $white) {
|
||||
background-color: $color;
|
||||
background-image: gradient(linear, left bottom, left top, color-stop(0, $start), color-stop(1, $stop));
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
// Navbar Variant
|
||||
@mixin navbar-variant($color, $font-color: rgba(255, 255, 255, 0.8), $hover-color: #f6f6f6, $hover-bg: rgba(0, 0, 0, 0.1)) {
|
||||
@mixin navbar-variant($color, $font-color: rgba(255, 255, 255, .8), $hover-color: #f6f6f6, $hover-bg: rgba(0, 0, 0, .1)) {
|
||||
background-color: $color;
|
||||
|
||||
.nav > li > a {
|
||||
@@ -17,7 +17,7 @@
|
||||
.nav .open > a:hover,
|
||||
.nav .open > a:focus,
|
||||
.nav > .active > a {
|
||||
background: $hover-bg;
|
||||
background-color: $hover-bg;
|
||||
color: $hover-color;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: $hover-bg;
|
||||
background-color: $hover-bg;
|
||||
color: $hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user