Compare commits
558 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e029f329eb | ||
|
|
47de9a752c | ||
|
|
51c9aa2887 | ||
|
|
82499a53d4 | ||
|
|
df15302f2c | ||
|
|
039b51262d | ||
|
|
465add46d4 | ||
|
|
bce965b402 | ||
|
|
95ce293169 | ||
|
|
5d604c2cad | ||
|
|
ed2d3ca277 | ||
|
|
0478f40d02 | ||
|
|
a4be73da3b | ||
|
|
762192518f | ||
|
|
fa51df192d | ||
|
|
1a5cc02097 | ||
|
|
a07f54ca33 | ||
|
|
6a8cbe92a9 | ||
|
|
16d9376ec9 | ||
|
|
4356f5c72a | ||
|
|
076dc94292 | ||
|
|
fbc527010a | ||
|
|
5b4a22276d | ||
|
|
b55a563fce | ||
|
|
2a701a6dfe | ||
|
|
8931fb4758 | ||
|
|
2124165319 | ||
|
|
0d701129a0 | ||
|
|
ebd8625e1e | ||
|
|
b68ca67386 | ||
|
|
17a7019c60 | ||
|
|
54af92251c | ||
|
|
d9edeb747d | ||
|
|
b69b722a37 | ||
|
|
669c23ea09 | ||
|
|
2b3ba8e7fa | ||
|
|
9a761e7d30 | ||
|
|
9d00e052f0 | ||
|
|
7c159e97de | ||
|
|
ba8e4ff33c | ||
|
|
9b067a437c | ||
|
|
aba39d06bf | ||
|
|
469d22a833 | ||
|
|
43bd49ce5b | ||
|
|
79dc190ccc | ||
|
|
495659e9cd | ||
|
|
2fec2c9e4c | ||
|
|
9cba66634d | ||
|
|
b2f63bf231 | ||
|
|
9c9ef22730 | ||
|
|
5d84ec3be2 | ||
|
|
2150961d27 | ||
|
|
53bca5a3d3 | ||
|
|
cd3938eb33 | ||
|
|
eb0b88bfcf | ||
|
|
b9bbf8bbca | ||
|
|
65b3d0c0de | ||
|
|
93b8f32f68 | ||
|
|
28bb164e8e | ||
|
|
4911cc76a3 | ||
|
|
26ac539bc4 | ||
|
|
75ae6b16a4 | ||
|
|
2835b1d28f | ||
|
|
748aad16d7 | ||
|
|
2c2fbb8583 | ||
|
|
20edcbf7fa | ||
|
|
db81dc39ba | ||
|
|
c3b0aef1ef | ||
|
|
50e29efdfe | ||
|
|
285e41bc88 | ||
|
|
ea9d0fc449 | ||
|
|
9cdd2eef81 | ||
|
|
2f8833236a | ||
|
|
2b680eeb6d | ||
|
|
809f120db0 | ||
|
|
6d9ef8bbc3 | ||
|
|
a26d6ec6bb | ||
|
|
2d26ced3fc | ||
|
|
d74cd4bf24 | ||
|
|
f040d897a7 | ||
|
|
ed2f87f57b | ||
|
|
9b9e31f54c | ||
|
|
b3cfcf660e | ||
|
|
e5bcd1f94e | ||
|
|
2b6fa769f7 | ||
|
|
3ccc82f343 | ||
|
|
f4273cafb6 | ||
|
|
59d63f61d9 | ||
|
|
9d9103a83b | ||
|
|
0b085b6d03 | ||
|
|
f77538f179 | ||
|
|
f7810f7f95 | ||
|
|
4d28e4603f | ||
|
|
8b787e4ae0 | ||
|
|
f5ba168172 | ||
|
|
1df6dadbdd | ||
|
|
3dc29144a3 | ||
|
|
951167ce17 | ||
|
|
906e4055d8 | ||
|
|
2f5526388a | ||
|
|
82341642f4 | ||
|
|
c96b1eb09d | ||
|
|
f5bfa67c69 | ||
|
|
47797ffcd4 | ||
|
|
a73053e380 | ||
|
|
bc042fead7 | ||
|
|
ed6779e937 | ||
|
|
ee7ca68f87 | ||
|
|
32693b6378 | ||
|
|
984e5588c8 | ||
|
|
a42a1af867 | ||
|
|
03de680915 | ||
|
|
8c6e142314 | ||
|
|
b12bde4f79 | ||
|
|
1120aa3841 | ||
|
|
652ca73126 | ||
|
|
8706e72f6a | ||
|
|
319d521773 | ||
|
|
d9474cdcc5 | ||
|
|
e49a34177a | ||
|
|
67d203e011 | ||
|
|
0d38b3de16 | ||
|
|
38116a14f3 | ||
|
|
b28f0b65f0 | ||
|
|
13ab4a9363 | ||
|
|
7cb7783a34 | ||
|
|
d1a13dad38 | ||
|
|
b4e06dea99 | ||
|
|
0f92dc0fdf | ||
|
|
6a58895d37 | ||
|
|
1709a2b7df | ||
|
|
febb3da0c1 | ||
|
|
552a428985 | ||
|
|
38e04bd42a | ||
|
|
8f0ba5ba4f | ||
|
|
c67aedceb1 | ||
|
|
b3a7fbd9b5 | ||
|
|
29522428de | ||
|
|
77bd52b2ae | ||
|
|
d8112e7628 | ||
|
|
ffa208e73f | ||
|
|
61ead15c38 | ||
|
|
407e2ae481 | ||
|
|
5fb16edf43 | ||
|
|
8eb5c475bb | ||
|
|
84090310f7 | ||
|
|
fc98e2f052 | ||
|
|
bedcfa9520 | ||
|
|
bb152b590b | ||
|
|
3623732cf7 | ||
|
|
05ba89f164 | ||
|
|
cb5053476d | ||
|
|
cee656a053 | ||
|
|
cfc7d529e1 | ||
|
|
a93dc68e6c | ||
|
|
2d91cfd3db | ||
|
|
36e81f44cb | ||
|
|
cb0e65337f | ||
|
|
1c627f4649 | ||
|
|
16cbfed20b | ||
|
|
f6a3bc57e2 | ||
|
|
594443d1dc | ||
|
|
c3378e1653 | ||
|
|
bc57dd650c | ||
|
|
311a8c6fa3 | ||
|
|
bdb43c0e9e | ||
|
|
8033b47596 | ||
|
|
9d5052cc68 | ||
|
|
f4c9dc8a5f | ||
|
|
a3f0a78df0 | ||
|
|
b70363e005 | ||
|
|
65eab801e8 | ||
|
|
9e764248d3 | ||
|
|
a660a1c44b | ||
|
|
33458c1bdb | ||
|
|
e5530182cd | ||
|
|
9ecabc3faf | ||
|
|
8b58f6b861 | ||
|
|
9e41bf529d | ||
|
|
36398fe958 | ||
|
|
69cfbea5f3 | ||
|
|
1e1e3beca6 | ||
|
|
a726154b1d | ||
|
|
c2ccb51ef5 | ||
|
|
a1d7062b1f | ||
|
|
2e1e3f8409 | ||
|
|
885604ef06 | ||
|
|
cb8a5504f6 | ||
|
|
325fa19e46 | ||
|
|
06b684c899 | ||
|
|
363d1b07ca | ||
|
|
663b9a610a | ||
|
|
f598d5046e | ||
|
|
ae381f7762 | ||
|
|
acc18b8d68 | ||
|
|
6f33d29a51 | ||
|
|
be82e64add | ||
|
|
3ee000ed7d | ||
|
|
0f338edacd | ||
|
|
085d937946 | ||
|
|
0cbc4b9546 | ||
|
|
9e1c4b1a88 | ||
|
|
b47f542df7 | ||
|
|
baed101ef1 | ||
|
|
c9ee6e3af9 | ||
|
|
8ed7688277 | ||
|
|
27716d080f | ||
|
|
4311d12603 | ||
|
|
6aa786698e | ||
|
|
b0eb98c667 | ||
|
|
955b69a9bf | ||
|
|
5f5bfa864d | ||
|
|
6ec6c69dba | ||
|
|
19f3286a82 | ||
|
|
36a3cae9c2 | ||
|
|
86215c34be | ||
|
|
4ad421d4d0 | ||
|
|
e79f6d5617 | ||
|
|
baf44a97b4 | ||
|
|
c14053a199 | ||
|
|
1e5153d69e | ||
|
|
fed38bd046 | ||
|
|
89d298ea65 | ||
|
|
cd35fa1802 | ||
|
|
150453bff3 | ||
|
|
49833b3c51 | ||
|
|
4a0f0238b0 | ||
|
|
83b97111a0 | ||
|
|
43bbf32098 | ||
|
|
a70817f421 | ||
|
|
9ae441b75a | ||
|
|
21fcbd85d8 | ||
|
|
e1b61214b7 | ||
|
|
2d10b0748c | ||
|
|
f4e719749a | ||
|
|
600bca7e8b | ||
|
|
a3a62b1d94 | ||
|
|
dbe783d31d | ||
|
|
f0d8492b66 | ||
|
|
7587eb9ac2 | ||
|
|
fe2fdafbb1 | ||
|
|
e50c77d8c6 | ||
|
|
81f9f52353 | ||
|
|
6e5b02d326 | ||
|
|
d09c7b13b3 | ||
|
|
ff532a5c6c | ||
|
|
698275633f | ||
|
|
c5dff312e1 | ||
|
|
972412e712 | ||
|
|
453c46df00 | ||
|
|
f001e19728 | ||
|
|
3da8cc1e7f | ||
|
|
68d124ff04 | ||
|
|
4921458782 | ||
|
|
86aa21a8bb | ||
|
|
65de742f96 | ||
|
|
4043398e01 | ||
|
|
7be651f5cf | ||
|
|
5ddd4d045e | ||
|
|
1cc7e8725d | ||
|
|
6fe115fd0d | ||
|
|
d58dfec5ea | ||
|
|
3e6f5ac70e | ||
|
|
a1821fabf9 | ||
|
|
b6461f4f9e | ||
|
|
0781018e4e | ||
|
|
2f8e768c5c | ||
|
|
1622b0fa29 | ||
|
|
e147ce9039 | ||
|
|
2aa059a170 | ||
|
|
ae60b21375 | ||
|
|
03faebe776 | ||
|
|
f66afc4cae | ||
|
|
b327413bfa | ||
|
|
54776e2712 | ||
|
|
4b8d4488d7 | ||
|
|
a2a1b66fc3 | ||
|
|
d2bdb597f6 | ||
|
|
85a7819469 | ||
|
|
5689dfd3e3 | ||
|
|
3c76ead1ab | ||
|
|
be7fbdf5d8 | ||
|
|
fc21f043ae | ||
|
|
11659df89d | ||
|
|
2bfa770f60 | ||
|
|
4679121115 | ||
|
|
3ecc90d21a | ||
|
|
fd587fe108 | ||
|
|
0f851ec2a3 | ||
|
|
4d057a1c5e | ||
|
|
c8b13ff5e1 | ||
|
|
545dd08535 | ||
|
|
c0a5a8d775 | ||
|
|
d462ebe8e5 | ||
|
|
5d7ba8cf14 | ||
|
|
af9786f149 | ||
|
|
6b990ee78a | ||
|
|
f87102ccc7 | ||
|
|
63398089cd | ||
|
|
89694b5069 | ||
|
|
4f8a5211f8 | ||
|
|
b45df26fdc | ||
|
|
c0b0181475 | ||
|
|
62600a450a | ||
|
|
4be41336b3 | ||
|
|
3abea4ad3c | ||
|
|
b2304992e5 | ||
|
|
f9825410dc | ||
|
|
24205dc86e | ||
|
|
9fcd0da83d | ||
|
|
e99bc73e46 | ||
|
|
d8ad9adabd | ||
|
|
11aa7d0140 | ||
|
|
6f97173b00 | ||
|
|
54a7367fb6 | ||
|
|
51a12099e4 | ||
|
|
00c0c96b1b | ||
|
|
0aa2537d1e | ||
|
|
14489e1db9 | ||
|
|
bff4eaba56 | ||
|
|
4a5d2f8502 | ||
|
|
72af2fa281 | ||
|
|
cf70b3e989 | ||
|
|
7ebd74a54a | ||
|
|
9a650b5cd6 | ||
|
|
ffa1331802 | ||
|
|
dacb4ea7d6 | ||
|
|
ae5889dbac | ||
|
|
7b169e9439 | ||
|
|
541d2904d3 | ||
|
|
2080bbcbca | ||
|
|
f4c38008a1 | ||
|
|
2d38b15f1b | ||
|
|
13257b9f86 | ||
|
|
22f106b357 | ||
|
|
352b5aadba | ||
|
|
f86c9ea947 | ||
|
|
2f5f0ba1e1 | ||
|
|
6a72923182 | ||
|
|
d62f7b2a5f | ||
|
|
8ca6255ff3 | ||
|
|
d3b3afd593 | ||
|
|
57cb5ff6cf | ||
|
|
39f3da6cde | ||
|
|
5a236c9357 | ||
|
|
4b0eab57a8 | ||
|
|
74a232630a | ||
|
|
71d023ab77 | ||
|
|
786a374233 | ||
|
|
41899872cd | ||
|
|
076659db52 | ||
|
|
8f665622d6 | ||
|
|
5cc6e0b172 | ||
|
|
bff22900cb | ||
|
|
5e79c9fd62 | ||
|
|
92f55c254c | ||
|
|
39034e38f6 | ||
|
|
3c7b9558fe | ||
|
|
c8f7f40b46 | ||
|
|
2a764cf190 | ||
|
|
ba6ef4d629 | ||
|
|
67d3505733 | ||
|
|
252145cf58 | ||
|
|
dbc62542ef | ||
|
|
005829ab72 | ||
|
|
448c8b0e8a | ||
|
|
ff0e724ee5 | ||
|
|
568e4a5ee8 | ||
|
|
fbf4a524c1 | ||
|
|
29db2e958f | ||
|
|
cc7bcbf9d5 | ||
|
|
98d4484e6c | ||
|
|
0b126278f9 | ||
|
|
cc919415bb | ||
|
|
a3f398390c | ||
|
|
5ae89368f1 | ||
|
|
c8f1cb0a0a | ||
|
|
f783b08b78 | ||
|
|
85e0c6d3cd | ||
|
|
2259a96058 | ||
|
|
afed5841e7 | ||
|
|
52361cd505 | ||
|
|
b743cca7bc | ||
|
|
1d01d0bff1 | ||
|
|
c45a488962 | ||
|
|
6731c44541 | ||
|
|
b04ed83963 | ||
|
|
c35b79e642 | ||
|
|
ed8c7c1052 | ||
|
|
498a074222 | ||
|
|
3fe6db4d42 | ||
|
|
6e5cd82dfb | ||
|
|
cbf3488de9 | ||
|
|
c72314fb71 | ||
|
|
c4af6feb92 | ||
|
|
08537c1d69 | ||
|
|
425da82f5f | ||
|
|
2cfbf7c39a | ||
|
|
d4eed9f8fd | ||
|
|
fe10170826 | ||
|
|
8dc3b0b250 | ||
|
|
75da1220af | ||
|
|
37a2c3c631 | ||
|
|
5c5722714d | ||
|
|
2ba529f9e3 | ||
|
|
fd760ff015 | ||
|
|
daab1d917b | ||
|
|
4c3a63a7e1 | ||
|
|
7cc58b84da | ||
|
|
2bac4ac1a7 | ||
|
|
c5b2b86786 | ||
|
|
5652a2b6c2 | ||
|
|
bd19f543a2 | ||
|
|
cc1e888227 | ||
|
|
d73e379dcf | ||
|
|
0569abd00d | ||
|
|
7f5d9bec87 | ||
|
|
b39e7bbb6d | ||
|
|
70270a8e3b | ||
|
|
efdc050a28 | ||
|
|
e8a65df7f0 | ||
|
|
59628a72fb | ||
|
|
a4d6c6c0d8 | ||
|
|
bea82c6640 | ||
|
|
1ba3bdfbda | ||
|
|
98b4000bc0 | ||
|
|
14f6824931 | ||
|
|
795d7d0a93 | ||
|
|
673fa2b556 | ||
|
|
0e2504fc78 | ||
|
|
2afca9f2b4 | ||
|
|
464d2a541d | ||
|
|
fa8c5e0982 | ||
|
|
5e15884d8f | ||
|
|
b5e9ff3b4e | ||
|
|
fed7d4cc34 | ||
|
|
d7ab066ff8 | ||
|
|
4100917016 | ||
|
|
5d2c1ffb88 | ||
|
|
ddb0f198a9 | ||
|
|
13438e3e25 | ||
|
|
05a410b327 | ||
|
|
23fa64d289 | ||
|
|
1920c9b7e3 | ||
|
|
eedd0d9c07 | ||
|
|
9ef389d335 | ||
|
|
6542997520 | ||
|
|
a58b2e2038 | ||
|
|
6860e348dc | ||
|
|
5e094e7597 | ||
|
|
2f2cb8386b | ||
|
|
965fd170bd | ||
|
|
2610d29b60 | ||
|
|
064131c842 | ||
|
|
00b6bf8394 | ||
|
|
2a885d709d | ||
|
|
5bed46c0aa | ||
|
|
8b27c7e01a | ||
|
|
177902a286 | ||
|
|
48b0f7dc27 | ||
|
|
d5f4a1a48a | ||
|
|
de9f60aa7f | ||
|
|
c93b65b299 | ||
|
|
3c6a6cdc5b | ||
|
|
b669f3d715 | ||
|
|
f663fac220 | ||
|
|
bc42e79bb5 | ||
|
|
ca29333cd0 | ||
|
|
f9f478e100 | ||
|
|
97c414d1ad | ||
|
|
7afbd98d17 | ||
|
|
1f5c60588e | ||
|
|
284ab45a17 | ||
|
|
eab6365af9 | ||
|
|
de86516a0a | ||
|
|
3e50e11933 | ||
|
|
e2ac8be451 | ||
|
|
0e53252a27 | ||
|
|
b1ecff3d10 | ||
|
|
0fee4fee2a | ||
|
|
66282d817c | ||
|
|
932c93e573 | ||
|
|
71d30af582 | ||
|
|
1c8428c3ea | ||
|
|
e38e98d9e7 | ||
|
|
85b3f081bf | ||
|
|
3926d97fc6 | ||
|
|
13ac8f2ea4 | ||
|
|
d94f991ab5 | ||
|
|
d476d2e96a | ||
|
|
635bf364ac | ||
|
|
e1c7a37f62 | ||
|
|
9d780701f5 | ||
|
|
0bd40405b5 | ||
|
|
25c2f95e48 | ||
|
|
5d738e58eb | ||
|
|
70325f9247 | ||
|
|
38c9c5a6ea | ||
|
|
c90dd147bb | ||
|
|
322f106e75 | ||
|
|
91a5529438 | ||
|
|
8f7dd2df6a | ||
|
|
2fcd55eb60 | ||
|
|
9359567a8a | ||
|
|
42bfacfb19 | ||
|
|
71131c699e | ||
|
|
6ebfc516a6 | ||
|
|
5c952b1d86 | ||
|
|
1d9a4e0b99 | ||
|
|
ebae628d8d | ||
|
|
9865460fe5 | ||
|
|
39884b71fe | ||
|
|
82b7128c04 | ||
|
|
16756ddb8c | ||
|
|
877002961f | ||
|
|
7e9e68ecd8 | ||
|
|
6419190272 | ||
|
|
ac42563c5e | ||
|
|
98c1063e07 | ||
|
|
a4dfc57cbe | ||
|
|
db543b8912 | ||
|
|
49fb4540a2 | ||
|
|
e2120393a2 | ||
|
|
0b301fff3f | ||
|
|
eeb351e991 | ||
|
|
1095e29b4d | ||
|
|
be058eaff7 | ||
|
|
f409dda2ef | ||
|
|
f409cdda8f | ||
|
|
9cd6396c35 | ||
|
|
ee754ea533 | ||
|
|
36de20dd75 | ||
|
|
a957e8eb4f | ||
|
|
14a90d84ec | ||
|
|
fae9bc618a | ||
|
|
3248e6500e | ||
|
|
c17bf79d79 | ||
|
|
1ff1270bfa | ||
|
|
b1a2cf33d8 | ||
|
|
b2292e98c1 | ||
|
|
4d156a8911 | ||
|
|
7193b6518b | ||
|
|
cff6b44109 | ||
|
|
fb7ad9438e | ||
|
|
afc265a188 | ||
|
|
01fe7bf612 | ||
|
|
1cb75bd053 | ||
|
|
0eaea4d011 | ||
|
|
67377a2561 | ||
|
|
a8aae9f1f5 | ||
|
|
a9ce92decb | ||
|
|
c19162295a | ||
|
|
58796c45ed | ||
|
|
d94b348780 | ||
|
|
95f92bd292 | ||
|
|
bc52ac3559 | ||
|
|
8bbc6a6611 | ||
|
|
0873beaed2 |
6
.gitignore
vendored
@@ -15,6 +15,7 @@
|
|||||||
version.lock
|
version.lock
|
||||||
logs/*
|
logs/*
|
||||||
cache/*
|
cache/*
|
||||||
|
*.mmdb
|
||||||
|
|
||||||
# HTTPS Cert/Key #
|
# HTTPS Cert/Key #
|
||||||
##################
|
##################
|
||||||
@@ -23,6 +24,9 @@ cache/*
|
|||||||
*.csr
|
*.csr
|
||||||
*.pem
|
*.pem
|
||||||
|
|
||||||
|
# Mergetool
|
||||||
|
*.orgin
|
||||||
|
|
||||||
# OS generated files #
|
# OS generated files #
|
||||||
######################
|
######################
|
||||||
.DS_Store?
|
.DS_Store?
|
||||||
@@ -32,7 +36,7 @@ Icon?
|
|||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
#Ignore files generated by PyCharm
|
#Ignore files generated by PyCharm
|
||||||
.idea/*
|
*.idea/*
|
||||||
|
|
||||||
#Ignore files generated by vi
|
#Ignore files generated by vi
|
||||||
*.swp
|
*.swp
|
||||||
|
|||||||
380
CHANGELOG.md
@@ -1,5 +1,355 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.4.12 (2016-09-18)
|
||||||
|
|
||||||
|
* Fix: PMS update check not working for MacOSX.
|
||||||
|
* Fix: Square covers for music stats on homepage.
|
||||||
|
* Fix: Card width on the homepage for iPhone 6/7 Plus. (Thanks @XusBadia)
|
||||||
|
* Fix: Check for running PID when starting PlexPy. (Thanks @spolyack)
|
||||||
|
* Fix: FreeBSD service script not stopping PlexPy properly.
|
||||||
|
* Fix: Some web UI cleanup.
|
||||||
|
* Change: GitHub repostitory moved.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.11 (2016-09-02)
|
||||||
|
|
||||||
|
* Fix: PlexWatch and Plexivity import errors.
|
||||||
|
* Fix: Searching in history datatables.
|
||||||
|
* Fix: Notifications not sending for Local user.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.10 (2016-08-15)
|
||||||
|
|
||||||
|
* Fix: Missing python ipaddress module preventing PlexPy from starting.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.9 (2016-08-14)
|
||||||
|
|
||||||
|
* New: Option to include current activity in the history tables.
|
||||||
|
* New: ISP lookup info in the IP address modal.
|
||||||
|
* New: Option to disable web page previews for Telegram notifications.
|
||||||
|
* Fix: Send correct JSON header for Slack/Mattermost notifications.
|
||||||
|
* Fix: Twitter and Facebook test notifications incorrectly showing as "failed".
|
||||||
|
* Fix: Current activity progress bars extending past 100%.
|
||||||
|
* Fix: Typo in the setup wizard. (Thanks @wopian)
|
||||||
|
* Fix: Update PMS server version before checking for a new update.
|
||||||
|
* Change: Compare distro and build when checking for server updates.
|
||||||
|
* Change: Nicer y-axis intervals when viewing "Play Duration" graphs.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.8 (2016-07-16)
|
||||||
|
|
||||||
|
* New: Setting to specify PlexPy backup interval.
|
||||||
|
* Fix: User Concurrent Streams Notifications by IP Address checkbox not working.
|
||||||
|
* Fix: Substitute {update_version} in fallback PMS update notification text.
|
||||||
|
* Fix: Check version for automatic IP logging setting.
|
||||||
|
* Fix: Use library refresh interval.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.7 (2016-07-14)
|
||||||
|
|
||||||
|
* New: Use MaxMind GeoLite2 for IP address lookup.
|
||||||
|
* Note: The GeoLite2 database must be installed from the settings page.
|
||||||
|
* New: Check for Plex updates using plex.tv downloads instead of the server API.
|
||||||
|
* Note: Check for Plex updates has been disabled and must be re-enabled in the settings.
|
||||||
|
* New: More notification options for Plex updates.
|
||||||
|
* New: Notifications for concurrent streams by a single user.
|
||||||
|
* New: Notifications for user streaming from a new device.
|
||||||
|
* New: HipChat notification agent. (Thanks @aboron)
|
||||||
|
* Fix: Username showing as blank when friendly name is blank.
|
||||||
|
* Fix: Direct stream count wrong in the current activity header.
|
||||||
|
* Fix: Current activity reporting direct stream when reducing the stream quality switches to transcoding.
|
||||||
|
* Fix: Apostophe in an Arnold quote causing the shutdown/restart page to crash.
|
||||||
|
* Fix: Disable refreshing posters in guest mode.
|
||||||
|
* Fix: PlexWatch/Plexivity import unable to select the "grouped" database table.
|
||||||
|
* Change: Updated Facebook notification instructions.
|
||||||
|
* Change: Subject line optional for Join notifications.
|
||||||
|
* Change: Line break between subject and body text instead of a colon for Facebook, Slack, Twitter, and Telegram.
|
||||||
|
* Change: Allow Mattermost notifications using the Slack config.
|
||||||
|
* Change: Better formatting for Slack poster notifications.
|
||||||
|
* Change: Telegram only notifies once instead of twice when posters are enabled.
|
||||||
|
* Change: Host Open Sans font locally instead of querying Google Fonts.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.6 (2016-06-11)
|
||||||
|
|
||||||
|
* New: Added User and Library statistics to the API.
|
||||||
|
* New: Ability to refresh individual poster images without clearing the entire cache. (Thanks @Hellowlol)
|
||||||
|
* New: Added {added_date}, {updated_date}, and {last_viewed_date} to metadata notification options.
|
||||||
|
* New: Log level filter for Plex logs. (Thanks @sanderploegsma)
|
||||||
|
* New: Log level filter for PlexPy logs.
|
||||||
|
* New: Button to download Plex logs directly from the web interface.
|
||||||
|
* New: Advanced setting in the config file to change the number of Plex log lines retrieved.
|
||||||
|
* Fix: FreeBSD and FreeNAS init scripts to reflect the path in the installation guide. (Thanks @nortron)
|
||||||
|
* Fix: Monitoring crashing when failed to retrieve current activity.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.5 (2016-05-25)
|
||||||
|
|
||||||
|
* Fix: PlexPy unable to start if failed to get shared libraries for a user.
|
||||||
|
* Fix: Matching port number when retrieving the PMS url.
|
||||||
|
* Fix: Extract mapped IPv4 address in Plexivity import.
|
||||||
|
* Change: Revert back to internal url when retrieving PMS images.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.4 (2016-05-24)
|
||||||
|
|
||||||
|
* Fix: Image queries crashing the PMS when playing clips from channels.
|
||||||
|
* Fix: Plexivity import if IP address is missing.
|
||||||
|
* Fix: Tooltips shown behind the datatable headers.
|
||||||
|
* Fix: Current activity instances rendered in a random order causing them to jump around.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.3 (2016-05-22)
|
||||||
|
|
||||||
|
* Fix: PlexPy not starting without any authentication method.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.2 (2016-05-22)
|
||||||
|
|
||||||
|
* New: Option to use HTTP basic authentication instead of the HTML login form.
|
||||||
|
* Fix: Unable to save settings when enabling the HTTP proxy setting.
|
||||||
|
* Change: Match the PMS port when retrieving the PMS url.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.1 (2016-05-20)
|
||||||
|
|
||||||
|
* New: HTTP Proxy checkbox in the settings. Enable this if using an SSL enabled reverse proxy in front of PlexPy.
|
||||||
|
* Fix: Check for blank username/password on login.
|
||||||
|
* Fix: Persist current activity artwork blur across refreshes when transcoding details are visible.
|
||||||
|
* Fix: Send notifications to multiple XBMC/Plex Home Theater devices.
|
||||||
|
* Fix: Reset PMS identifier when clicking verify server button in settings.
|
||||||
|
* Fix: Crash when trying to group current activity session in database.
|
||||||
|
* Fix: Check current activity returns sessions when refreshing.
|
||||||
|
* Fix: Logs sorted out of order.
|
||||||
|
* Fix: Resolution reported incorrectly in the stream info modal.
|
||||||
|
* Fix: PlexPy crashing when hashing password in the config file.
|
||||||
|
* Fix: CherryPy doubling the port number when accessing PlexPy locally with http_proxy enabled.
|
||||||
|
* Change: Sort by most recent for ties in watch statistics.
|
||||||
|
* Change: Refresh Join devices when changing the API key.
|
||||||
|
* Change: Format the Join device IDs.
|
||||||
|
* Change: Join notifications now sent with Python Requests module.
|
||||||
|
* Change: Add paging for recently added in the API.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.0 (2016-05-15)
|
||||||
|
|
||||||
|
* New: An HTML form login page with sessions support.
|
||||||
|
* New: Guest access control for shared users using Plex.tv authentication.
|
||||||
|
* Enable the option in the settings and toggle guest access per user from Users > Edit mode.
|
||||||
|
* Guests can only view their own user data. Other user info is removed/masked.
|
||||||
|
* Guests can only view media from libraries that are shared with them (content rating and label filters are respected). Other libraries are removed/masked.
|
||||||
|
* All settings and admin controls are restricted from guests.
|
||||||
|
* All current activity on the server is shown, but with masked user/metadata info.
|
||||||
|
* New: Login logs table on the User and Logs pages.
|
||||||
|
* New: Filter the history table by user.
|
||||||
|
* New: Filter the graphs by user. (Thanks @Otger)
|
||||||
|
* New: Option to hash the admin passowrd in the config file.
|
||||||
|
* New: Options to enable/disable/rearrange each section on the homepage
|
||||||
|
* New: Toggle media types for recently added items on the homepage.
|
||||||
|
* New: Option to enter an Imgur API client ID for uploading posters.
|
||||||
|
* Note: The shared Imgur client id will be removed in a future PlexPy update! Please enter your own client id in the settings to continue uploading posters!
|
||||||
|
* New: HTML support for Email.
|
||||||
|
* New: Posters and HTML support for Telegram.
|
||||||
|
* New: Poster support for Slack.
|
||||||
|
* New: Poster support for Twitter.
|
||||||
|
* New: Re-added Plex Home Theater notification agent.
|
||||||
|
* New: Browser notification agent (experimental).
|
||||||
|
* New: Added {plex_url} as a notification option.
|
||||||
|
* New: Added transcode decision to the activity header.
|
||||||
|
* New: Documentation for APIv2 (see API.md for details).
|
||||||
|
* New: Import a Plexivity database into PlexPy.
|
||||||
|
* New: Prettier fallback image for art/episodes.
|
||||||
|
* New: Prettier confirm modal dialogues.
|
||||||
|
* New: Cache images to reduce Plex API calls. This can be disabled in the under Settings > Extra Settings. (Thanks @Hellowlol)
|
||||||
|
* New: Scheduled backups of the config file.
|
||||||
|
* New: Button to clear the PlexPy cache/images in the settings.
|
||||||
|
* New: Button to manually backup the PlexPy database/config in the settings.
|
||||||
|
* New: Button to clear the PlexPy logs in the settings.
|
||||||
|
* New: Button to download PlexPy log file on the Logs tab.
|
||||||
|
* New: Advanced setting in config file to change the Plex API timeout value.
|
||||||
|
* Fix: Mixed content HTTP request in settings (for reverse proxies with SSL).
|
||||||
|
* Fix: Rename recently "watched" music to "played".
|
||||||
|
* Change: Current activity details now persists across refreshes.
|
||||||
|
* Change: Smoother transitions between preview thumbnails in current activity.
|
||||||
|
* Change: Datatables now display all columns and scroll horizontally on smaller screens.
|
||||||
|
* Change: Ability to change the base URL for reverse proxies in the web interface.
|
||||||
|
* Change: Added a "Verify Server" button in the settings.
|
||||||
|
* Change: Added request status code in the logs for notifer errors.
|
||||||
|
* Change: Remove in-memory logs and read lines from log file instead. (Thanks @Hellowlol)
|
||||||
|
* Change: Limit number of failed attempts to write sessions to history. Default is 5 attempts.
|
||||||
|
* Change: A bunch of UI updates.
|
||||||
|
* Change: A bunch of backend code cleanup.
|
||||||
|
* Removed: All unused Python packages.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.16 (2016-05-01)
|
||||||
|
|
||||||
|
* Fix: Viewing photos crashing PlexPy.
|
||||||
|
* Fix: Persist Users > Edit mode on datatable page change.
|
||||||
|
* Fix: PMS update notifications broken.
|
||||||
|
* Change: Cache notifications poster with thread ID to avoid overwritting images.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.15 (2016-04-18)
|
||||||
|
|
||||||
|
* Fix: Slack notifications failing when using and icon URL.
|
||||||
|
* Fix: 127.0.0.1 showing as an external IP address on the history tables.
|
||||||
|
* Fix: Regression file sizes not shown in the media info table footer.
|
||||||
|
* Fix: Retrieving proper PMS URL when multiple connections are published to plex.tv.
|
||||||
|
* Fix: Some typos in the logger.
|
||||||
|
* Fix: Some other typos in the WebUI. (Thanks @xtjoeytx)
|
||||||
|
* Change: Optimized mobile web app icons and spash screens. (Thanks @alotufo)
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.14 (2016-03-29)
|
||||||
|
|
||||||
|
* Fix: Regression for missing notify_action for script notifications.
|
||||||
|
* Fix: Typo for home stats cards in the settings.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.13 (2016-03-27)
|
||||||
|
|
||||||
|
* Fix: Only mask strings longer than 5 characters in logs.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.12 (2016-03-27)
|
||||||
|
|
||||||
|
* Fix: "Check GitHub for updates" not rescheduling when toggling setting.
|
||||||
|
* Fix: Bug where notifications would fail if metadata is not found.
|
||||||
|
* Fix: Bug where notifications would fail if unable to upload poster to Imgur.
|
||||||
|
* Fix: PlexPy will now start properly for different Python environment variables.
|
||||||
|
* New: Feature requests moved to FeatHub.
|
||||||
|
* New: Ability to specify a GitHub API token for updates (optional).
|
||||||
|
* New: Mask out sensitive information from the logs.
|
||||||
|
* New: New and updated Arnold quotes. (Thanks @Vilsol & @Chrisophogus)
|
||||||
|
* New: "First" and "Last" page buttons to datatables.
|
||||||
|
* New: Access log file from the "Help & Info" page.
|
||||||
|
* New: CherryPy environment options (for development). (Thanks @codedecay)
|
||||||
|
* New: PlexPy development environment (for development only).
|
||||||
|
* Change: Facebook posts with a posters now include a summary.
|
||||||
|
* Change: Facebook posts now use a default poster if the poster is not found or unable to upload to Imgur.
|
||||||
|
* Change: IFTTT events can be fromatted with the {action} name.
|
||||||
|
* Change: Logs now use ISO date format to avoid locale encoding errors. (Thanks @alshain)
|
||||||
|
* Remove: Non-functioning Plex notification agent.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.11 (2016-03-15)
|
||||||
|
|
||||||
|
* Fix: Typo preventing history logging for websockets.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.10 (2016-03-12)
|
||||||
|
|
||||||
|
* Fix: Actually allow HTML tags for Pushover.
|
||||||
|
* Fix: PlexPy not restarting on Windows if there is a space in the folder path.
|
||||||
|
* Fix: Reconnect websocket when changing PMS SSL setting.
|
||||||
|
* Fix: Datatables not loading when view_offset or duration is blank.
|
||||||
|
* Fix: Bug when checking the PMS version in the settings.
|
||||||
|
* Fix: Auto-refreshing of log tables.
|
||||||
|
* Fix: Logging of IPv6 addresses. (PMS version >0.9.14 only.)
|
||||||
|
* Fix: Hide days selection from the Play Totals graph page.
|
||||||
|
* Fix: PlexPy overwriting user's own SSL certificate/key.
|
||||||
|
* Fix: Multiple watched notifications when using websocket.
|
||||||
|
* Fix: Some missing python library imports.
|
||||||
|
* Fix: Some typos in settings and PlexWatch importer.
|
||||||
|
* New: Ability to get notified of PMS updates.
|
||||||
|
* New: Ability to disable the link to Plex Web with Facebook notifications and use IMDB, TVDB, TMDb, or Last.fm instead.
|
||||||
|
* New: Ability to reset Imgur poster url from the info page if the poster is changed.
|
||||||
|
* New: Tooltips on the current activity progress bars.
|
||||||
|
* New: Side scrolling of Recently Added/Recently Played items.
|
||||||
|
* New: Document all date/time format options.
|
||||||
|
* New: Button to clear notification logs.
|
||||||
|
* New: Customizable backup, cache, and log directories.
|
||||||
|
* Change: Retry writing sessions to history if it fails, so sessions don't get lost. (Activity pinger only, not availble for websocket.)
|
||||||
|
* Change: Save any unknown sessions to the "Local" user.
|
||||||
|
* Change: History table modal is filtered depending on which graph series is clicked.
|
||||||
|
* Change: Revert back to saving the state of datatables (search, sorting, entries per page, etc.).
|
||||||
|
* Change: Newlines are not longer stripped from notification text which allows for finer control of how notifications look.
|
||||||
|
* Change: Updated FreeNAS/FreeBSD init scripts. (Must have updated jails.) (Thanks @chiviak)
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.9 (2016-02-21)
|
||||||
|
|
||||||
|
* Fix: Recently added notification not sent to all notification agents.
|
||||||
|
* New: Pushover HTML support. (Thanks @elseym)
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.8 (2016-02-21)
|
||||||
|
|
||||||
|
* Fix: Regression unable to clear HTTP password.
|
||||||
|
* Fix: Remove media tags from script arguments for server notifications.
|
||||||
|
* Fix: Encode poster titles to UTF-8 for Imgur upload.
|
||||||
|
* Fix: Allow notifications to send without poster if Imgur upload fails.
|
||||||
|
* New: Notification Logs table in the Logs tab.
|
||||||
|
* New: Toggle in settings to enable posters in notifications. (Disabled by default.)
|
||||||
|
* Change: Save Imgur poster URL to database so upload is not needed every time.
|
||||||
|
* Change: Notify log in database to log each event as a separate entry.
|
||||||
|
* Change: Monitor remote access is unchecked if remote access is disabled on server.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.7 (2016-02-20)
|
||||||
|
|
||||||
|
* Fix: Verifying server with SSL enabled.
|
||||||
|
* Fix: Regression where {stream_duration} reported as 0.
|
||||||
|
* Fix: Video metadata flags showing up for track info.
|
||||||
|
* Fix: Custom library icons not applied to Library Statistics.
|
||||||
|
* Fix: Typos in the Web UI.
|
||||||
|
* New: ETA to Current Activity overlay.
|
||||||
|
* New: Total duration to Libraries and Users tables.
|
||||||
|
* New: {machine_id} to notification options.
|
||||||
|
* New: IMDB, TVDB, TMDb, Last.fm, and Trackt IDs/URLs to notification options.
|
||||||
|
* New: {poster_url} to notification options using Imgur.
|
||||||
|
* New: Poster and link for Facebook notifications.
|
||||||
|
* New: Log javascript errors from the Web UI.
|
||||||
|
* New: Configuration and Scheduler info to the settings page.
|
||||||
|
* New: Schedule background task to backup the PlexPy database.
|
||||||
|
* New: URL anonymizer for external links.
|
||||||
|
* New: Plex Media Scanner log file to Log viewer.
|
||||||
|
* New: API v2 (sill very experimental). (Thanks @Hellowlol)
|
||||||
|
* Change: Allow secure websocket connections.
|
||||||
|
* Change: History grouping now accounts for the view offset.
|
||||||
|
* Change: Subject line can be toggled off for Facebook, Slack, Telegram, and Twitter.
|
||||||
|
* Change: Create self-signed SSL certificates when enabling HTTPS.
|
||||||
|
* Change: Revert homepage "Last Played" to "Last Watched".
|
||||||
|
* Change: Disable monitor remote access checkbox if remote access is not enabled on the PMS.
|
||||||
|
* Change: Disable IP logging checkbox if PMS version is 0.9.14 or greater.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.6 (2016-02-03)
|
||||||
|
|
||||||
|
* Fix: Regression where {duration} not reported in minutes.
|
||||||
|
* Fix: Proper daemonizing in FreeBSD and FreeNAS init scripts.
|
||||||
|
* Change: Update readme documentation.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.5 (2016-02-02)
|
||||||
|
|
||||||
|
* Fix: Removing unique constraints from database.
|
||||||
|
* Fix: Unable to expand media info table when missing "Added At" date.
|
||||||
|
* Fix: Server verification for unpublished servers.
|
||||||
|
* Fix: Updating PMS identifier for server change.
|
||||||
|
* New: {stream_time}, {remaining_time}, and {progress_time} to notification options.
|
||||||
|
* New: Powershell script support. (Thanks @Hellowlol)
|
||||||
|
* New: Method to delete duplicate libraries.
|
||||||
|
* Change: Daemonize before running start up tasks.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.3.4 (2016-01-29)
|
||||||
|
|
||||||
|
* Fix: Activity checker not starting with library update (history not logging).
|
||||||
|
* Fix: Libraries duplicated in database.
|
||||||
|
* Fix: Buffer notifications even when disabled when using websockets.
|
||||||
|
* Fix: Libraries and Users lists not refreshing.
|
||||||
|
* Fix: Server verification in settings.
|
||||||
|
* Fix: Empty libraries not added to database.
|
||||||
|
* New: Unique identifiers to notification options.
|
||||||
|
* Remove: Requirement of media type toggles for recently added notifications.
|
||||||
|
* Remove: Built in Twitter key and secret.
|
||||||
|
* Change: Unnecessary quoting of script arguments.
|
||||||
|
* Change: Facebook notification instructions.
|
||||||
|
|
||||||
|
|
||||||
## v1.3.3 (2016-01-26)
|
## v1.3.3 (2016-01-26)
|
||||||
|
|
||||||
* Fix: Plays by Month graph not loading.
|
* Fix: Plays by Month graph not loading.
|
||||||
@@ -26,21 +376,21 @@
|
|||||||
|
|
||||||
## v1.3.0 (2016-01-23)
|
## v1.3.0 (2016-01-23)
|
||||||
|
|
||||||
* Add: Brand new Libraries section.
|
* New: Brand new Libraries section.
|
||||||
* Add: Lots of new library statistics.
|
* New: Lots of new library statistics.
|
||||||
* Add: Media info table for libraries.
|
* New: Media info table for libraries.
|
||||||
* Add: Web app for Android and iOS. (Thanks @zobe123)
|
* New: Web app for Android and iOS. (Thanks @zobe123)
|
||||||
* Add: Slack notification agent. (Thanks @richipargo)
|
* New: Slack notification agent. (Thanks @richipargo)
|
||||||
* Add: Facebook notification agent.
|
* New: Facebook notification agent.
|
||||||
* Add: Custom script notification agent. (Thanks @Hellowlol)
|
* New: Custom script notification agent. (Thanks @Hellowlol)
|
||||||
* Add: Custom "From Name" to email notification agent.
|
* New: Custom "From Name" to email notification agent.
|
||||||
* Add: Ability to test notifications / send custom one-off notifications.
|
* New: Ability to test notifications / send custom one-off notifications.
|
||||||
* Add: 'datestamp' and 'timestamp' notification options.
|
* New: 'datestamp' and 'timestamp' notification options.
|
||||||
* Add: More concurrent stream statistics.
|
* New: More concurrent stream statistics.
|
||||||
* Add: Media info flags on the info pages.
|
* New: Media info flags on the info pages.
|
||||||
* Add: Ability to fix broken metadata if the item has been moved in Plex.
|
* New: Ability to fix broken metadata if the item has been moved in Plex.
|
||||||
* Add: Ability to rearrange the homepage statistics cards.
|
* New: Ability to rearrange the homepage statistics cards.
|
||||||
* Add: CentOS startup script (Thanks @PHoSawyer)
|
* New: CentOS startup script (Thanks @PHoSawyer)
|
||||||
* Fix: Server name blank after first run wizard.
|
* Fix: Server name blank after first run wizard.
|
||||||
* Fix: Incorrect duration for grouped home stats.
|
* Fix: Incorrect duration for grouped home stats.
|
||||||
* Fix: Allow SSL when verifying server in settings.
|
* Fix: Allow SSL when verifying server in settings.
|
||||||
|
|||||||
@@ -1,12 +1,45 @@
|
|||||||
# Contributing to PlexPy
|
# Contributing to PlexPy
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
In case you read this because you are posting an issue, please take a minute and conside the things below. The issue tracker is not a support forum. It is primarily intended to submit bugs, improvements or feature requests. However, we are glad to help you, and make sure the problem is not caused by PlexPy, but don't expect step-by-step answers.
|
In case you read this because you are posting an issue, please take a minute and conside the things below. The issue tracker is not a support forum. It is primarily intended to submit bugs. However, we are glad to help you, and make sure the problem is not caused by PlexPy, but don't expect step-by-step answers.
|
||||||
|
|
||||||
* Use the search function. Chances are that your problem is already discussed. Do not append to (closed) issues if your problem does not fit the discussion.
|
##### Many issues can simply be solved by:
|
||||||
* Visit the [Troubleshooting](../../wiki/TroubleShooting) wiki first.
|
|
||||||
* Use [proper formatting](https://help.github.com/articles/github-flavored-markdown/). Paste your logs in code blocks.
|
- Making sure you update to the latest version.
|
||||||
* Close your issue if you resolved it.
|
- Turning your device off and on again.
|
||||||
|
- Analyzing your logs, you just might find the solution yourself!
|
||||||
|
- Using the **search** function to see if this issue has already been reported/solved.
|
||||||
|
- Checking the [Wiki](https://github.com/JonnyWong16/plexpy/wiki) for
|
||||||
|
[ [Installation] ](https://github.com/JonnyWong16/plexpy/wiki/Installation) and
|
||||||
|
[ [FAQs] ](https://github.com/JonnyWong16/plexpy/wiki/Frequently-Asked-Questions-(FAQ)).
|
||||||
|
- For basic questions try asking on [Gitter](https://gitter.im/plexpy/general) or the [Plex Forums](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program) first before opening an issue.
|
||||||
|
|
||||||
|
##### If nothing has worked:
|
||||||
|
|
||||||
|
1. Open a new issue on the GitHub [issue tracker](http://github.com/JonnyWong16/plexpy/issues).
|
||||||
|
2. Provide a clear title to easily help identify your problem.
|
||||||
|
3. Use proper [markdown syntax](https://help.github.com/articles/github-flavored-markdown) to structure your post (i.e. code/log in code blocks).
|
||||||
|
4. Make sure you provide the following information:
|
||||||
|
- [ ] Version
|
||||||
|
- [ ] Branch
|
||||||
|
- [ ] Commit hash
|
||||||
|
- [ ] Operating system
|
||||||
|
- [ ] Python version
|
||||||
|
- [ ] What you did?
|
||||||
|
- [ ] What happened?
|
||||||
|
- [ ] What you expected?
|
||||||
|
- [ ] How can we reproduce your issue?
|
||||||
|
- [ ] What are your (relevant) settings?
|
||||||
|
- [ ] Include a link to your **FULL** (not just a few lines!) log file that has the error. Please use [Gist](http://gist.github.com) or [Pastebin](http://pastebin.com/).
|
||||||
|
5. Close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.
|
||||||
|
|
||||||
|
## Feature Requests
|
||||||
|
|
||||||
|
Feature requests are handled on [FeatHub](http://feathub.com/drzoidberg33/plexpy).
|
||||||
|
|
||||||
|
1. Search the existing requests to see if your suggestion has already been submitted.
|
||||||
|
2. If a similar request exists, give it a thumbs up (+1), or add additional comments to the request.
|
||||||
|
3. If no similar requests exist, you can create a new one. Make sure to provide a clear title to easily identify the feature request.
|
||||||
|
|
||||||
## Pull Requests
|
## Pull Requests
|
||||||
If you think you can contribute code to the PlexPy repository, do not hesitate to submit a pull request.
|
If you think you can contribute code to the PlexPy repository, do not hesitate to submit a pull request.
|
||||||
|
|||||||
41
ISSUE_TEMPLATE.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<!---
|
||||||
|
Reporting Issues:
|
||||||
|
* To ensure that a developer has enough information to work with please include all of the information below.
|
||||||
|
Please provide as much detail as possible. Screenshots can be very useful to see the problem.
|
||||||
|
* Use proper markdown syntax to structure your post (i.e. code/log in code blocks).
|
||||||
|
See: https://help.github.com/articles/basic-writing-and-formatting-syntax/
|
||||||
|
* Include a link to your **FULL** log file that has the error(not just a few lines!).
|
||||||
|
Please use [Gist](http://gist.github.com) or [Pastebin](http://pastebin.com/).
|
||||||
|
|
||||||
|
Feature Requests:
|
||||||
|
* Feature requests are handled on FeatHub: http://feathub.com/drzoidberg33/plexpy
|
||||||
|
* Do not post them on the GitHub issues tracker.
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Version:**
|
||||||
|
|
||||||
|
**Branch:**
|
||||||
|
|
||||||
|
**Commit hash:**
|
||||||
|
|
||||||
|
**Operating system:**
|
||||||
|
|
||||||
|
**Python version:**
|
||||||
|
|
||||||
|
**What you did?**
|
||||||
|
|
||||||
|
**What happened?**
|
||||||
|
|
||||||
|
**What you expected?**
|
||||||
|
|
||||||
|
**How can we reproduce your issue?**
|
||||||
|
<!-- Provide a detailed step-by-step. -->
|
||||||
|
|
||||||
|
**What are your (relevant) settings?**
|
||||||
|
|
||||||
|
**Link to logs:**
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.
|
||||||
|
-->
|
||||||
82
PlexPy.py
@@ -1,4 +1,9 @@
|
|||||||
#!/usr/bin/env python
|
#!/bin/sh
|
||||||
|
''''which python >/dev/null 2>&1 && exec python "$0" "$@" # '''
|
||||||
|
''''which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" # '''
|
||||||
|
''''which python2.7 >/dev/null 2>&1 && exec python2.7 "$0" "$@" # '''
|
||||||
|
''''exec echo "Error: Python not found!" # '''
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# This file is part of PlexPy.
|
# This file is part of PlexPy.
|
||||||
@@ -22,13 +27,14 @@ import sys
|
|||||||
# Ensure lib added to path, before any other imports
|
# Ensure lib added to path, before any other imports
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib/'))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib/'))
|
||||||
|
|
||||||
from plexpy import webstart, logger, web_socket
|
|
||||||
|
|
||||||
import locale
|
|
||||||
import time
|
|
||||||
import signal
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import locale
|
||||||
|
import signal
|
||||||
|
import time
|
||||||
|
|
||||||
import plexpy
|
import plexpy
|
||||||
|
from plexpy import config, database, logger, web_socket, webstart
|
||||||
|
|
||||||
|
|
||||||
# Register signals, such as CTRL + C
|
# Register signals, such as CTRL + C
|
||||||
signal.signal(signal.SIGINT, plexpy.sig_handler)
|
signal.signal(signal.SIGINT, plexpy.sig_handler)
|
||||||
@@ -76,11 +82,14 @@ def main():
|
|||||||
'-d', '--daemon', action='store_true', help='Run as a daemon')
|
'-d', '--daemon', action='store_true', help='Run as a daemon')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-p', '--port', type=int, help='Force PlexPy to run on a specified port')
|
'-p', '--port', type=int, help='Force PlexPy to run on a specified port')
|
||||||
|
parser.add_argument(
|
||||||
|
'--dev', action='store_true', help='Start PlexPy in the development environment')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--datadir', help='Specify a directory where to store your data files')
|
'--datadir', help='Specify a directory where to store your data files')
|
||||||
parser.add_argument('--config', help='Specify a config file to use')
|
parser.add_argument(
|
||||||
parser.add_argument('--nolaunch', action='store_true',
|
'--config', help='Specify a config file to use')
|
||||||
help='Prevent browser from launching on startup')
|
parser.add_argument(
|
||||||
|
'--nolaunch', action='store_true', help='Prevent browser from launching on startup')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--pidfile', help='Create a pid file (only relevant when running as a daemon)')
|
'--pidfile', help='Create a pid file (only relevant when running as a daemon)')
|
||||||
|
|
||||||
@@ -95,6 +104,10 @@ def main():
|
|||||||
logger.initLogger(console=not plexpy.QUIET, log_dir=False,
|
logger.initLogger(console=not plexpy.QUIET, log_dir=False,
|
||||||
verbose=plexpy.VERBOSE)
|
verbose=plexpy.VERBOSE)
|
||||||
|
|
||||||
|
if args.dev:
|
||||||
|
plexpy.DEV = True
|
||||||
|
logger.debug(u"PlexPy is running in the dev environment.")
|
||||||
|
|
||||||
if args.daemon:
|
if args.daemon:
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
@@ -109,6 +122,19 @@ def main():
|
|||||||
# If the pidfile already exists, plexpy may still be running, so
|
# If the pidfile already exists, plexpy may still be running, so
|
||||||
# exit
|
# exit
|
||||||
if os.path.exists(plexpy.PIDFILE):
|
if os.path.exists(plexpy.PIDFILE):
|
||||||
|
try:
|
||||||
|
with open(plexpy.PIDFILE, 'r') as fp:
|
||||||
|
pid = int(fp.read())
|
||||||
|
os.kill(pid, 0)
|
||||||
|
except IOError as e:
|
||||||
|
raise SystemExit("Unable to read PID file: %s", e)
|
||||||
|
except OSError:
|
||||||
|
logger.warn("PID file '%s' already exists, but PID %d is " \
|
||||||
|
"not running. Ignoring PID file." %
|
||||||
|
(plexpy.PIDFILE, pid))
|
||||||
|
else:
|
||||||
|
# The pidfile exists and points to a live PID. plexpy may
|
||||||
|
# still be running, so exit.
|
||||||
raise SystemExit("PID file '%s' already exists. Exiting." %
|
raise SystemExit("PID file '%s' already exists. Exiting." %
|
||||||
plexpy.PIDFILE)
|
plexpy.PIDFILE)
|
||||||
|
|
||||||
@@ -135,7 +161,7 @@ def main():
|
|||||||
if args.config:
|
if args.config:
|
||||||
config_file = args.config
|
config_file = args.config
|
||||||
else:
|
else:
|
||||||
config_file = os.path.join(plexpy.DATA_DIR, 'config.ini')
|
config_file = os.path.join(plexpy.DATA_DIR, config.FILENAME)
|
||||||
|
|
||||||
# Try to create the DATA_DIR if it doesn't exist
|
# Try to create the DATA_DIR if it doesn't exist
|
||||||
if not os.path.exists(plexpy.DATA_DIR):
|
if not os.path.exists(plexpy.DATA_DIR):
|
||||||
@@ -151,13 +177,26 @@ def main():
|
|||||||
'Cannot write to the data directory: ' + plexpy.DATA_DIR + '. Exiting...')
|
'Cannot write to the data directory: ' + plexpy.DATA_DIR + '. Exiting...')
|
||||||
|
|
||||||
# Put the database in the DATA_DIR
|
# Put the database in the DATA_DIR
|
||||||
plexpy.DB_FILE = os.path.join(plexpy.DATA_DIR, 'plexpy.db')
|
plexpy.DB_FILE = os.path.join(plexpy.DATA_DIR, database.FILENAME)
|
||||||
|
|
||||||
|
if plexpy.DAEMON:
|
||||||
|
plexpy.daemonize()
|
||||||
|
|
||||||
# Read config and start logging
|
# Read config and start logging
|
||||||
plexpy.initialize(config_file)
|
plexpy.initialize(config_file)
|
||||||
|
|
||||||
if plexpy.DAEMON:
|
# Start the background threads
|
||||||
plexpy.daemonize()
|
plexpy.start()
|
||||||
|
|
||||||
|
# Open connection for websocket
|
||||||
|
if plexpy.CONFIG.MONITORING_USE_WEBSOCKET:
|
||||||
|
try:
|
||||||
|
web_socket.start_thread()
|
||||||
|
except:
|
||||||
|
logger.warn(u"Websocket :: Unable to open connection.")
|
||||||
|
# Fallback to polling
|
||||||
|
plexpy.POLLING_FAILOVER = True
|
||||||
|
plexpy.initialize_scheduler()
|
||||||
|
|
||||||
# Force the http port if neccessary
|
# Force the http port if neccessary
|
||||||
if args.port:
|
if args.port:
|
||||||
@@ -181,30 +220,19 @@ def main():
|
|||||||
'http_port': http_port,
|
'http_port': http_port,
|
||||||
'http_host': plexpy.CONFIG.HTTP_HOST,
|
'http_host': plexpy.CONFIG.HTTP_HOST,
|
||||||
'http_root': plexpy.CONFIG.HTTP_ROOT,
|
'http_root': plexpy.CONFIG.HTTP_ROOT,
|
||||||
|
'http_environment': plexpy.CONFIG.HTTP_ENVIRONMENT,
|
||||||
'http_proxy': plexpy.CONFIG.HTTP_PROXY,
|
'http_proxy': plexpy.CONFIG.HTTP_PROXY,
|
||||||
'enable_https': plexpy.CONFIG.ENABLE_HTTPS,
|
'enable_https': plexpy.CONFIG.ENABLE_HTTPS,
|
||||||
'https_cert': plexpy.CONFIG.HTTPS_CERT,
|
'https_cert': plexpy.CONFIG.HTTPS_CERT,
|
||||||
'https_key': plexpy.CONFIG.HTTPS_KEY,
|
'https_key': plexpy.CONFIG.HTTPS_KEY,
|
||||||
'http_username': plexpy.CONFIG.HTTP_USERNAME,
|
'http_username': plexpy.CONFIG.HTTP_USERNAME,
|
||||||
'http_password': plexpy.CONFIG.HTTP_PASSWORD,
|
'http_password': plexpy.CONFIG.HTTP_PASSWORD,
|
||||||
|
'http_basic_auth': plexpy.CONFIG.HTTP_BASIC_AUTH
|
||||||
}
|
}
|
||||||
webstart.initialize(web_config)
|
webstart.initialize(web_config)
|
||||||
|
|
||||||
# Start the background threads
|
|
||||||
plexpy.start()
|
|
||||||
|
|
||||||
# Open connection for websocket
|
|
||||||
if plexpy.CONFIG.MONITORING_USE_WEBSOCKET:
|
|
||||||
try:
|
|
||||||
web_socket.start_thread()
|
|
||||||
except:
|
|
||||||
logger.warn(u"Websocket :: Unable to open connection.")
|
|
||||||
# Fallback to polling
|
|
||||||
plexpy.POLLING_FAILOVER = True
|
|
||||||
plexpy.initialize_scheduler()
|
|
||||||
|
|
||||||
# Open webbrowser
|
# Open webbrowser
|
||||||
if plexpy.CONFIG.LAUNCH_BROWSER and not args.nolaunch:
|
if plexpy.CONFIG.LAUNCH_BROWSER and not args.nolaunch and not plexpy.DEV:
|
||||||
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, http_port,
|
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, http_port,
|
||||||
plexpy.CONFIG.HTTP_ROOT)
|
plexpy.CONFIG.HTTP_ROOT)
|
||||||
|
|
||||||
|
|||||||
170
README.md
@@ -1,121 +1,87 @@
|
|||||||
# PlexPy
|
# PlexPy
|
||||||
|
|
||||||
[](https://gitter.im/drzoidberg33/plexpy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/plexpy/general?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
A python based web application for monitoring, analytics and notifications for Plex Media Server (www.plex.tv).
|
A python based web application for monitoring, analytics and notifications for [Plex Media Server](https://plex.tv).
|
||||||
|
|
||||||
This project is based on code from Headphones (https://github.com/rembo10/headphones) and PlexWatchWeb (https://github.com/ecleese/plexWatchWeb).
|
This project is based on code from [Headphones](https://github.com/rembo10/headphones) and [PlexWatchWeb](https://github.com/ecleese/plexWatchWeb).
|
||||||
|
|
||||||
* PlexPy forum thread: https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program
|
* [Plex forum thread](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program)
|
||||||
|
* [Gitter chat](https://gitter.im/plexpy/general)
|
||||||
|
* [/r/Plex Discord server](https://discord.gg/011TFFWSuNFI02EKr) | [PlexPy Discord server](https://discord.gg/36ggawe)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
###Support
|
* Responsive web design viewable on desktop, tablet and mobile web browsers.
|
||||||
-----------
|
* Themed to complement Plex/Web.
|
||||||
* PlexPy Wiki: https://github.com/drzoidberg33/plexpy/wiki
|
* Easy configuration setup (no separate web server required).
|
||||||
|
* Monitor current Plex Media Server activity.
|
||||||
|
* Fully customizable notifications for stream activity and recently added media.
|
||||||
|
* Top statistics on home page with configurable duration and measurement metric.
|
||||||
|
* Global watching history with search/filtering & dynamic column sorting.
|
||||||
|
* Full user list with general information and comparison stats.
|
||||||
|
* Individual user information including devices IP addresses.
|
||||||
|
* Complete library statistics and media file information.
|
||||||
|
* Rich analytics presented using Highcharts graphing.
|
||||||
|
* Beautiful content information pages.
|
||||||
|
* Full sync list data on all users syncing items from your library.
|
||||||
|
* And many more!!
|
||||||
|
|
||||||
|
## Preview
|
||||||
|
|
||||||
###Features
|
* [Full preview gallery on Imgur](https://imgur.com/a/RwQPM)
|
||||||
-----------
|
|
||||||
* Responsive web design viewable on desktop, tablet and mobile web browsers
|
|
||||||
|
|
||||||
* Themed to complement Plex/Web
|

|
||||||
|
|
||||||
* Easy configuration setup via html form
|
## Installation and Support
|
||||||
|
|
||||||
* Current Plex Media Server viewing activity including:
|
* [Installation Guides](https://github.com/JonnyWong16/plexpy/wiki/Installation) shows you how to install PlexPy.
|
||||||
* number of current users
|
* [FAQs](https://github.com/JonnyWong16/plexpy/wiki/Frequently-Asked-Questions-(FAQ)) in the wiki can help you with common problems.
|
||||||
* title
|
|
||||||
* progress
|
|
||||||
* platform
|
|
||||||
* user
|
|
||||||
* state (playing, paused, buffering, etc)
|
|
||||||
* stream type (direct, transcoded)
|
|
||||||
* video type & resolution
|
|
||||||
* audio type & channel count.
|
|
||||||
|
|
||||||
* Top statistics on home page with configurable duration and measurement metric:
|
|
||||||
* Most watched TV
|
|
||||||
* Most popular TV
|
|
||||||
* Most watched Movie
|
|
||||||
* Most popular Movie
|
|
||||||
* Most active user
|
|
||||||
* Most active platform
|
|
||||||
|
|
||||||
* Recently added media and how long ago it was added
|
|
||||||
|
|
||||||
* Global watching history with search/filtering & dynamic column sorting
|
|
||||||
* date
|
|
||||||
* user
|
|
||||||
* platform
|
|
||||||
* ip address
|
|
||||||
* title
|
|
||||||
* stream information details
|
|
||||||
* start time
|
|
||||||
* paused duration length
|
|
||||||
* stop time
|
|
||||||
* duration length
|
|
||||||
* watched progress
|
|
||||||
* show/hide columns
|
|
||||||
* delete mode - allows deletion of specific history items
|
|
||||||
|
|
||||||
* Full user list with general information and comparison stats
|
|
||||||
|
|
||||||
* Individual user information
|
|
||||||
* username and gravatar (if available)
|
|
||||||
* daily, weekly, monthly, all time stats for play count and duration length
|
|
||||||
* individual platform stats for each user
|
|
||||||
* public ip address history with last seen date and geo tag location
|
|
||||||
* recently watched content
|
|
||||||
* watching history
|
|
||||||
* synced items
|
|
||||||
* assign users custom friendly names within PlexPy
|
|
||||||
* assign users custom avatar URL within PlexPy
|
|
||||||
* disable history logging per user
|
|
||||||
* disable notifications per user
|
|
||||||
* option to purge all history per user.
|
|
||||||
|
|
||||||
* Rich analytics presented using Highcharts graphing
|
|
||||||
* user-selectable time periods of 30, 90 or 365 days
|
|
||||||
* daily watch count and duration
|
|
||||||
* totals by day of week and hours of the day
|
|
||||||
* totals by top 10 platform
|
|
||||||
* totals by top 10 users
|
|
||||||
* detailed breakdown by transcode decision
|
|
||||||
* source and stream resolutions
|
|
||||||
* transcode decision counts by user and platform
|
|
||||||
* total monthly counts
|
|
||||||
|
|
||||||
* Content information pages
|
|
||||||
* movies (includes watching history)
|
|
||||||
* tv shows (includes watching history)
|
|
||||||
* tv seasons
|
|
||||||
* tv episodes (includes watching history)
|
|
||||||
|
|
||||||
* Full sync list data on all users syncing items from your library
|
|
||||||
|
|
||||||
## Installation and Notes
|
|
||||||
|
|
||||||
* [Installation page](../../wiki/Installation) shows you how to install PlexPy.
|
|
||||||
* [Usage guide](../../wiki/Usage-guide) introduces you to PlexPy.
|
|
||||||
* [Troubleshooting page](../../wiki/TroubleShooting) in the wiki can help you with common problems.
|
|
||||||
|
|
||||||
**Issues** can be reported on the GitHub issue tracker considering these rules:
|
|
||||||
|
|
||||||
1. Analyze your log, you just might find the solution yourself!
|
|
||||||
2. You read the wiki and searched existing issues, but this is not solving your problem.
|
|
||||||
3. Post the issue with a clear title, description and the HP log and use [proper markdown syntax](https://help.github.com/articles/github-flavored-markdown) to structure your text (code/log in code blocks).
|
|
||||||
4. Close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.
|
|
||||||
|
|
||||||
**Feature requests** can be reported on the GitHub issue tracker too:
|
|
||||||
|
|
||||||
1. Search for similar existing 'issues', feature requests can be recognized by the label 'Request'.
|
|
||||||
2. If a similar Request exists, post a comment (+1, or add a new idea to the existing request), otherwise you can create a new one.
|
|
||||||
|
|
||||||
If you **comply with these rules** you can [post your request/issue](http://github.com/drzoidberg33/plexpy/issues).
|
|
||||||
|
|
||||||
**Support** the project by implementing new features, solving support tickets and provide bug fixes.
|
**Support** the project by implementing new features, solving support tickets and provide bug fixes.
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
|
##### Many issues can simply be solved by:
|
||||||
|
|
||||||
|
- Making sure you update to the latest version.
|
||||||
|
- Turning your device off and on again.
|
||||||
|
- Analyzing your logs, you just might find the solution yourself!
|
||||||
|
- Using the **search** function to see if this issue has already been reported/solved.
|
||||||
|
- Checking the [Wiki](https://github.com/JonnyWong16/plexpy/wiki) for
|
||||||
|
[ [Installation] ](https://github.com/JonnyWong16/plexpy/wiki/Installation) and
|
||||||
|
[ [FAQs] ](https://github.com/JonnyWong16/plexpy/wiki/Frequently-Asked-Questions-(FAQ)).
|
||||||
|
- For basic questions try asking on [Gitter](https://gitter.im/plexpy/general) or the [Plex Forums](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program) first before opening an issue.
|
||||||
|
|
||||||
|
##### If nothing has worked:
|
||||||
|
|
||||||
|
1. Open a new issue on the GitHub [issue tracker](http://github.com/JonnyWong16/plexpy/issues).
|
||||||
|
2. Provide a clear title to easily help identify your problem.
|
||||||
|
3. Use proper [markdown syntax](https://help.github.com/articles/github-flavored-markdown) to structure your post (i.e. code/log in code blocks).
|
||||||
|
4. Make sure you provide the following information:
|
||||||
|
- [ ] Version
|
||||||
|
- [ ] Branch
|
||||||
|
- [ ] Commit hash
|
||||||
|
- [ ] Operating system
|
||||||
|
- [ ] Python version
|
||||||
|
- [ ] What you did?
|
||||||
|
- [ ] What happened?
|
||||||
|
- [ ] What you expected?
|
||||||
|
- [ ] How can we reproduce your issue?
|
||||||
|
- [ ] What are your (relevant) settings?
|
||||||
|
- [ ] Include a link to your **FULL** (not just a few lines!) log file that has the error. Please use [Gist](http://gist.github.com) or [Pastebin](http://pastebin.com/).
|
||||||
|
5. Close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.
|
||||||
|
|
||||||
|
## Feature Requests
|
||||||
|
|
||||||
|
Feature requests are handled on [FeatHub](http://feathub.com/drzoidberg33/plexpy).
|
||||||
|
|
||||||
|
1. Search the existing requests to see if your suggestion has already been submitted.
|
||||||
|
2. If a similar request exists, give it a thumbs up (+1), or add additional comments to the request.
|
||||||
|
3. If no similar requests exist, you can create a new one. Make sure to provide a clear title to easily identify the feature request.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This is free software under the GPL v3 open source license. Feel free to do with it what you wish, but any modification must be open sourced. A copy of the license is included.
|
This is free software under the GPL v3 open source license. Feel free to do with it what you wish, but any modification must be open sourced. A copy of the license is included.
|
||||||
|
|
||||||
This software includes Highsoft software libraries which you may freely distribute for non-commercial use. Commerical users must licence this software, for more information visit https://shop.highsoft.com/faq/non-commercial#non-commercial-redistribution.
|
This software includes Highsoft software libraries which you may freely distribute for non-commercial use. Commerical users must licence this software, for more information visit https://shop.highsoft.com/faq/non-commercial#non-commercial-redistribution.
|
||||||
@@ -2,11 +2,18 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||||
<h4 class="modal-title">Import PlexWatch Database</h4>
|
<h4 class="modal-title">Import ${app} Database</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="modal-text">
|
<div class="modal-body" id="modal-text">
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
Please ensure your PlexWatch database is at version 0.3.2 or higher.
|
<%
|
||||||
|
v = ''
|
||||||
|
if app == 'PlexWatch':
|
||||||
|
v = '0.3.2'
|
||||||
|
elif app == 'Plexivity':
|
||||||
|
v = '0.9.8'
|
||||||
|
%>
|
||||||
|
<strong>Please ensure your ${app} database is at version ${v} or higher.</strong>
|
||||||
</p>
|
</p>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="db_location">Database Location</label>
|
<label for="db_location">Database Location</label>
|
||||||
@@ -15,7 +22,7 @@
|
|||||||
<input type="text" class="form-control" id="db_location" name="db_location" value="" required>
|
<input type="text" class="form-control" id="db_location" name="db_location" value="" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block">Enter the path and file name for the PlexWatch database you wish to import.</p>
|
<p class="help-block">Enter the path and file name for the ${app} database you wish to import.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="table_name">Table Name</label>
|
<label for="table_name">Table Name</label>
|
||||||
@@ -23,7 +30,7 @@
|
|||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<select id="table_name" class="form-control" name="table_name">
|
<select id="table_name" class="form-control" name="table_name">
|
||||||
<option value="processed">processed</option>
|
<option value="processed">processed</option>
|
||||||
<option value="processed">grouped</option>
|
<option value="grouped">grouped</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div>
|
<div>
|
||||||
<span id="status-message"></span>
|
<span id="status-message" style="padding-right: 25px;"></span>
|
||||||
<input type="button" id="import_db" class="btn btn-bright" value="Import">
|
<input type="button" id="import_db" class="btn btn-bright" value="Import">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,8 +61,13 @@
|
|||||||
var table_name = $("#table_name").val();
|
var table_name = $("#table_name").val();
|
||||||
var import_ignore_interval = $("#import_ignore_interval").val();
|
var import_ignore_interval = $("#import_ignore_interval").val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_plexwatch_export_data',
|
url: 'import_database',
|
||||||
data: {database_path: database_path, table_name:table_name, import_ignore_interval:import_ignore_interval},
|
data: {
|
||||||
|
app: "${app}",
|
||||||
|
database_path: database_path,
|
||||||
|
table_name: table_name,
|
||||||
|
import_ignore_interval: import_ignore_interval
|
||||||
|
},
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<%
|
<%
|
||||||
import plexpy
|
import plexpy
|
||||||
from plexpy import version
|
from plexpy import version
|
||||||
|
from plexpy.helpers import anon_url
|
||||||
%>
|
%>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
|
||||||
@@ -11,14 +12,15 @@ from plexpy import version
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<link href="interfaces/default/css/bootstrap3/bootstrap.css" rel="stylesheet">
|
<link href="${http_root}css/bootstrap3/bootstrap.css" rel="stylesheet">
|
||||||
<link href="interfaces/default/css/plexpy.css" rel="stylesheet">
|
<link href="${http_root}css/pnotify.custom.min.css" rel="stylesheet" />
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
|
<link href="${http_root}css/plexpy.css" rel="stylesheet">
|
||||||
<link href="interfaces/default/css/font-awesome.min.css" rel="stylesheet">
|
<link href="${http_root}css/opensans.min.css" rel="stylesheet">
|
||||||
|
<link href="${http_root}css/font-awesome.min.css" rel="stylesheet">
|
||||||
${next.headIncludes()}
|
${next.headIncludes()}
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="interfaces/default/images/favicon.ico"/>
|
<link rel="icon" type="image/x-icon" href="${http_root}images/favicon.ico"/>
|
||||||
<link rel="shortcut icon" href="interfaces/default/images/favicon.png">
|
<link rel="shortcut icon" href="${http_root}images/favicon.png">
|
||||||
|
|
||||||
<!-- Allow web app to be run in full-screen mode. -->
|
<!-- Allow web app to be run in full-screen mode. -->
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
@@ -32,99 +34,99 @@ from plexpy import version
|
|||||||
<!-- ICONS -->
|
<!-- ICONS -->
|
||||||
<!-- IE10 icon -->
|
<!-- IE10 icon -->
|
||||||
<meta name="application-name" content="PlexPy" />
|
<meta name="application-name" content="PlexPy" />
|
||||||
<meta name="msapplication-config" content="interfaces/default/xml/IEconfig.xml"/>
|
<meta name="msapplication-config" content="${http_root}xml/IEconfig.xml"/>
|
||||||
<!-- Android >M39 icon -->
|
<!-- Android >M39 icon -->
|
||||||
<link rel="manifest" href="interfaces/default/json/Android-manifest.json">
|
<link rel="manifest" href="${http_root}json/Android-manifest.json">
|
||||||
<!-- iPad retina icon -->
|
<!-- iPad retina icon -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-76@2x.png" sizes="152x152" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-76@2x.png" sizes="152x152" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPad retina icon (iOS < 7) -->
|
<!-- iPad retina icon (iOS < 7) -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-72@2x.png" sizes="144x144" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-72@2x.png" sizes="144x144" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPad non-retina icon -->
|
<!-- iPad non-retina icon -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-76.png" sizes="76x76" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-76.png" sizes="76x76" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPad non-retina icon (iOS < 7) -->
|
<!-- iPad non-retina icon (iOS < 7) -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-72.png" sizes="72x72" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-72.png" sizes="72x72" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPhone 6 Plus icon -->
|
<!-- iPhone 6 Plus icon -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-60@2x.png" sizes="120x120" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-60@2x.png" sizes="120x120" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPhone retina icon (iOS < 7) -->
|
<!-- iPhone retina icon (iOS < 7) -->
|
||||||
<link href="interfaces/default/images/res/ios/icon@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPhone non-retina icon (iOS < 7) -->
|
<!-- iPhone non-retina icon (iOS < 7) -->
|
||||||
<link href="interfaces/default/images/res/ios/icon.png" sizes="57x57" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon.png" sizes="57x57" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPhone / iPod Touch -->
|
<!-- iPhone / iPod Touch -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-60@3x.png" sizes="180x180" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-60@3x.png" sizes="180x180" rel="apple-touch-icon-precomposed">
|
||||||
<link href="interfaces/default/images/res/ios/icon-60.png" sizes="60x60" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-60.png" sizes="60x60" rel="apple-touch-icon-precomposed">
|
||||||
<!-- Spotlight Icon -->
|
<!-- Spotlight Icon -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-40.png" sizes="40x40" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-40.png" sizes="40x40" rel="apple-touch-icon-precomposed">
|
||||||
<link href="interfaces/default/images/res/ios/icon-40@2x.png" sizes="80x80" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-40@2x.png" sizes="80x80" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPhone Spotlight and Settings Icon -->
|
<!-- iPhone Spotlight and Settings Icon -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-small.png" sizes="29x29" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-small.png" sizes="29x29" rel="apple-touch-icon-precomposed">
|
||||||
<link href="interfaces/default/images/res/ios/icon-small@2x.png" sizes="58x58" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-small@2x.png" sizes="58x58" rel="apple-touch-icon-precomposed">
|
||||||
<!-- iPad Spotlight and Settings Icon -->
|
<!-- iPad Spotlight and Settings Icon -->
|
||||||
<link href="interfaces/default/images/res/ios/icon-50.png" sizes="50x50" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-50.png" sizes="50x50" rel="apple-touch-icon-precomposed">
|
||||||
<link href="interfaces/default/images/res/ios/icon-50@2x.png" sizes="100x100" rel="apple-touch-icon-precomposed">
|
<link href="${http_root}images/res/ios/icon-50@2x.png" sizes="100x100" rel="apple-touch-icon-precomposed">
|
||||||
|
|
||||||
<!-- STARTUP IMAGES -->
|
<!-- STARTUP IMAGES -->
|
||||||
<!-- iPad retina portrait startup image -->
|
<!-- iPad retina portrait startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-Portrait@2x~ipad.png"
|
<link href="${http_root}images/res/screen/ios/Default-Portrait@2x~ipad.png"
|
||||||
media="(device-width: 768px) and (device-height: 1024px)
|
media="(device-width: 768px) and (device-height: 1024px)
|
||||||
and (-webkit-device-pixel-ratio: 2)
|
and (-webkit-device-pixel-ratio: 2)
|
||||||
and (orientation: portrait)"
|
and (orientation: portrait)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPad retina landscape startup image -->
|
<!-- iPad retina landscape startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-Landscape@2x~ipad.png"
|
<link href="${http_root}images/res/screen/ios/Default-Landscape@2x~ipad.png"
|
||||||
media="(device-width: 768px) and (device-height: 1024px)
|
media="(device-width: 768px) and (device-height: 1024px)
|
||||||
and (-webkit-device-pixel-ratio: 2)
|
and (-webkit-device-pixel-ratio: 2)
|
||||||
and (orientation: landscape)"
|
and (orientation: landscape)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPad non-retina portrait startup image -->
|
<!-- iPad non-retina portrait startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-Portrait~ipad.png"
|
<link href="${http_root}images/res/screen/ios/Default-Portrait~ipad.png"
|
||||||
media="(device-width: 768px) and (device-height: 1024px)
|
media="(device-width: 768px) and (device-height: 1024px)
|
||||||
and (-webkit-device-pixel-ratio: 1)
|
and (-webkit-device-pixel-ratio: 1)
|
||||||
and (orientation: portrait)"
|
and (orientation: portrait)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPad non-retina landscape startup image -->
|
<!-- iPad non-retina landscape startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-Landscape~ipad.png"
|
<link href="${http_root}images/res/screen/ios/Default-Landscape~ipad.png"
|
||||||
media="(device-width: 768px) and (device-height: 1024px)
|
media="(device-width: 768px) and (device-height: 1024px)
|
||||||
and (-webkit-device-pixel-ratio: 1)
|
and (-webkit-device-pixel-ratio: 1)
|
||||||
and (orientation: landscape)"
|
and (orientation: landscape)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPhone 6 Plus portrait startup image -->
|
<!-- iPhone 6 Plus portrait startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-736h.png"
|
<link href="${http_root}images/res/screen/ios/Default-736h.png"
|
||||||
media="(device-width: 414px) and (device-height: 736px)
|
media="(device-width: 414px) and (device-height: 736px)
|
||||||
and (-webkit-device-pixel-ratio: 3)
|
and (-webkit-device-pixel-ratio: 3)
|
||||||
and (orientation: portrait)"
|
and (orientation: portrait)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPhone 6 Plus landscape startup image -->
|
<!-- iPhone 6 Plus landscape startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-Landscape-736h.png"
|
<link href="${http_root}images/res/screen/ios/Default-Landscape-736h.png"
|
||||||
media="(device-width: 414px) and (device-height: 736px)
|
media="(device-width: 414px) and (device-height: 736px)
|
||||||
and (-webkit-device-pixel-ratio: 3)
|
and (-webkit-device-pixel-ratio: 3)
|
||||||
and (orientation: landscape)"
|
and (orientation: landscape)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPhone 6 startup image -->
|
<!-- iPhone 6 startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-667h.png"
|
<link href="${http_root}images/res/screen/ios/Default-667h.png"
|
||||||
media="(device-width: 375px) and (device-height: 667px)
|
media="(device-width: 375px) and (device-height: 667px)
|
||||||
and (-webkit-device-pixel-ratio: 2)"
|
and (-webkit-device-pixel-ratio: 2)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPhone 5 startup image -->
|
<!-- iPhone 5 startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default-568h@2x~iphone5.jpg"
|
<link href="${http_root}images/res/screen/ios/Default-568h@2x~iphone5.jpg"
|
||||||
media="(device-width: 320px) and (device-height: 568px)
|
media="(device-width: 320px) and (device-height: 568px)
|
||||||
and (-webkit-device-pixel-ratio: 2)"
|
and (-webkit-device-pixel-ratio: 2)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPhone < 5 retina startup image -->
|
<!-- iPhone < 5 retina startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default@2x~iphone.png"
|
<link href="${http_root}images/res/screen/ios/Default@2x~iphone.png"
|
||||||
media="(device-width: 320px) and (device-height: 480px)
|
media="(device-width: 320px) and (device-height: 480px)
|
||||||
and (-webkit-device-pixel-ratio: 2)"
|
and (-webkit-device-pixel-ratio: 2)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
<!-- iPhone < 5 non-retina startup image -->
|
<!-- iPhone < 5 non-retina startup image -->
|
||||||
<link href="interfaces/default/images/res/screen/ios/Default~iphone.png"
|
<link href="${http_root}images/res/screen/ios/Default~iphone.png"
|
||||||
media="(device-width: 320px) and (device-height: 480px)
|
media="(device-width: 320px) and (device-height: 480px)
|
||||||
and (-webkit-device-pixel-ratio: 1)"
|
and (-webkit-device-pixel-ratio: 1)"
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
@@ -134,19 +136,21 @@ from plexpy import version
|
|||||||
<body class="content">
|
<body class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="ajaxMsg" class="ajaxMsg"></div>
|
<div id="ajaxMsg" class="ajaxMsg"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
% if plexpy.CONFIG.CHECK_GITHUB and not plexpy.CURRENT_VERSION:
|
% if plexpy.CONFIG.CHECK_GITHUB and not plexpy.CURRENT_VERSION:
|
||||||
<div id="updatebar" style="display: none;">
|
<div id="updatebar" style="display: none;">
|
||||||
You're running an unknown version of PlexPy. <a href="update">Update</a> or
|
You're running an unknown version of PlexPy.<br />
|
||||||
<a href="#" id="updateDismiss">Close</a>
|
<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>
|
||||||
</div>
|
</div>
|
||||||
% elif plexpy.CONFIG.CHECK_GITHUB and plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and plexpy.COMMITS_BEHIND > 0 and plexpy.INSTALL_TYPE != 'win':
|
% elif plexpy.CONFIG.CHECK_GITHUB and plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and plexpy.COMMITS_BEHIND > 0 and plexpy.INSTALL_TYPE != 'win':
|
||||||
<div id="updatebar" style="display: none;">
|
<div id="updatebar" style="display: none;">
|
||||||
A <a
|
A <a href="${anon_url('https://github.com/%s/plexpy/compare/%s...%s' % (plexpy.CONFIG.GIT_USER, plexpy.CURRENT_VERSION, plexpy.LATEST_VERSION))}" target="_blank">
|
||||||
href="https://github.com/${plexpy.CONFIG.GIT_USER}/plexpy/compare/${plexpy.CURRENT_VERSION}...${plexpy.LATEST_VERSION}" target="_blank">
|
newer version</a> is available.<br />
|
||||||
newer version</a> is available. You're ${plexpy.COMMITS_BEHIND} commits behind. <a href="update">Update</a> or
|
You're ${plexpy.COMMITS_BEHIND} commits behind.<br />
|
||||||
<a href="#" id="updateDismiss">Close</a>
|
<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
|
% endif
|
||||||
<nav class="navbar navbar-fixed-top">
|
<nav class="navbar navbar-fixed-top">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
@@ -157,7 +161,7 @@ from plexpy import version
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="home">
|
<a class="navbar-brand" href="home">
|
||||||
<img alt="PlexPy" src="interfaces/default/images/logo-plexpy@2x.png" height="40">
|
<img alt="PlexPy" src="${http_root}images/logo-plexpy@2x.png" height="40">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse navbar-collapse navbar-right" id="navbar-collapse-1">
|
<div class="collapse navbar-collapse navbar-right" id="navbar-collapse-1">
|
||||||
@@ -166,7 +170,7 @@ from plexpy import version
|
|||||||
<form action="search" method="post" class="form" id="search_form">
|
<form action="search" method="post" class="form" id="search_form">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-textbox">
|
<span class="input-textbox">
|
||||||
<input type="text" class="form-control" name="query" id="query" aria-label="Search" placeholder="Search..."/>
|
<input type="text" class="form-control" name="query" id="query" aria-label="Search" placeholder="Search Plex library..."/>
|
||||||
</span>
|
</span>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-dark btn-inactive" type="submit" id="search_button"><i class="fa fa-search"></i></button>
|
<button class="btn btn-dark btn-inactive" type="submit" id="search_button"><i class="fa fa-search"></i></button>
|
||||||
@@ -204,31 +208,120 @@ from plexpy import version
|
|||||||
% else:
|
% else:
|
||||||
<li><a href="sync">Synced Items</a></li>
|
<li><a href="sync">Synced Items</a></li>
|
||||||
% endif
|
% endif
|
||||||
% if title == "Log":
|
|
||||||
<li class="active"><a href="logs">Logs</a></li>
|
|
||||||
% else:
|
|
||||||
<li><a href="logs">Logs</a></li>
|
|
||||||
% endif
|
|
||||||
% if title == "Settings":
|
% if title == "Settings":
|
||||||
<li class="active"><a href="settings">Settings</a></li>
|
<li class="dropdown active">
|
||||||
% else:
|
% else:
|
||||||
<li><a href="settings">Settings</a></li>
|
<li class="dropdown">
|
||||||
% endif
|
% endif
|
||||||
|
<% href = 'settings' if _session['user_group'] == 'admin' else '#' %>
|
||||||
|
<a href="#" class="dropdown-toggle" aria-haspopup="true" data-toggle="dropdown" data-hover="dropdown" data-href="${href}"><i class="fa fa-lg fa-cogs"></i> <span class="caret"></span></a>
|
||||||
|
<ul class="dropdown-menu" id="settings-dropdown-menu">
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<li><a href="settings"><i class="fa fa-fw fa-cogs"></i> Settings</a></li>
|
||||||
|
<li role="separator" class="divider"></li>
|
||||||
|
<li><a href="logs"><i class="fa fa-fw fa-list-alt"></i> View Logs</a></li>
|
||||||
|
<li><a href="${anon_url('https://github.com/%s/plexpy/wiki/Frequently-Asked-Questions-(FAQ)' % plexpy.CONFIG.GIT_USER)}" target="_blank"><i class="fa fa-fw fa-question-circle"></i> FAQ</a></li>
|
||||||
|
<li><a href="settings?support=true"><i class="fa fa-fw fa-comment"></i> Support</a></li>
|
||||||
|
<li role="separator" class="divider"></li>
|
||||||
|
<li><a href="${anon_url('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DG783BMSCU3V4')}" target="_blank"><i class="fa fa-fw fa-paypal"></i> Paypal</a></li>
|
||||||
|
<li><a href="${anon_url('http://swiftpanda16.tip.me/')}" target="_blank"><i class="fa fa-fw fa-btc"></i> Bitcoin</a></li>
|
||||||
|
<li role="separator" class="divider"></li>
|
||||||
|
% if plexpy.CONFIG.CHECK_GITHUB:
|
||||||
|
<li><a href="#" id="nav-update"><i class="fa fa-fw fa-arrow-circle-up"></i> Check for Updates</a></li>
|
||||||
|
% endif
|
||||||
|
<li><a href="#" id="nav-restart"><i class="fa fa-fw fa-refresh"></i> Restart</a></li>
|
||||||
|
<li><a href="#" id="nav-shutdown"><i class="fa fa-fw fa-power-off"></i> Shutdown</a></li>
|
||||||
|
% else:
|
||||||
|
<li><a href="#" data-target="#admin-login-modal" data-toggle="modal"><i class="fa fa-fw fa-lock"></i> Admin Login</a></li>
|
||||||
|
<li role="separator" class="divider"></li>
|
||||||
|
% endif
|
||||||
|
% if _session['expiry']:
|
||||||
|
<li><a href="${http_root}auth/logout"><i class="fa fa-fw fa-sign-out"></i> Sign Out</a></li>
|
||||||
|
% endif
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="confirm-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||||
|
<h4 class="modal-title">Confirm</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id="confirm-message" style="text-align: center; margin-top: 20px; margin-bottom: 20px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-dark" data-dismiss="modal">Cancel</button>
|
||||||
|
<button type="button" class="btn btn-danger btn-ok" data-dismiss="modal" id="confirm-button">Confirm</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
% if _session['user_group'] != 'admin':
|
||||||
|
<div id="admin-login-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="admin-login-modal">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<form action="${http_root}auth/login" method="post">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||||
|
<h4 class="modal-title">Admin Login</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="col-md-6" style="margin: auto;">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="username" class="control-label">
|
||||||
|
Username
|
||||||
|
</label>
|
||||||
|
<input type="text" id="username" name="username" class="form-control" autocorrect="off" autocapitalize="off">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password" class="control-label">
|
||||||
|
Password
|
||||||
|
</label>
|
||||||
|
<input type="password" id="password" name="password" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="form-footer">
|
||||||
|
<div class="remember-group">
|
||||||
|
<label class="control-label">
|
||||||
|
<input type="checkbox" id="remember_me" name="remember_me" title="for 30 days" value="1" checked="checked" /> Remember me
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" class="btn btn-bright login-button"><i class="fa fa-sign-in"></i> Sign In</button>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" id="admin_login" name="admin_login" value="1" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
|
||||||
${next.headerIncludes()}
|
${next.headerIncludes()}
|
||||||
<div class="body-container">
|
<div class="body-container">
|
||||||
${next.body()}
|
${next.body()}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="interfaces/default/js/jquery-2.1.4.min.js"></script>
|
<script src="${http_root}js/jquery-2.1.4.min.js"></script>
|
||||||
<script src="interfaces/default/js/bootstrap3/bootstrap.min.js"></script>
|
<script src="${http_root}js/bootstrap.min.js"></script>
|
||||||
<script src="interfaces/default/js/script.js"></script>
|
<script src="${http_root}js/bootstrap-hover-dropdown.min.js"></script>
|
||||||
|
<script src="${http_root}js/pnotify.custom.min.js"></script>
|
||||||
|
<script src="${http_root}js/script.js"></script>
|
||||||
|
% if _session['user_group'] == 'admin' and plexpy.CONFIG.BROWSER_ENABLED:
|
||||||
|
<script src="${http_root}js/ajaxNotifications.js"></script>
|
||||||
|
% endif
|
||||||
<script>
|
<script>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
$('#updateDismiss').click(function() {
|
$('#updateDismiss').click(function() {
|
||||||
$('#updatebar').slideUp('slow');
|
$('#updatebar').slideUp('slow');
|
||||||
// Set cookie to remember dismiss decision for 1 hour.
|
// Set cookie to remember dismiss decision for 1 hour.
|
||||||
@@ -238,8 +331,37 @@ ${next.headerIncludes()}
|
|||||||
if (!getCookie('updateDismiss')) {
|
if (!getCookie('updateDismiss')) {
|
||||||
$('#updatebar').show();
|
$('#updatebar').show();
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
<script>
|
$("#nav-shutdown").click(function() {
|
||||||
|
$("#confirm-message").text("Are you sure you want to shutdown PlexPy?");
|
||||||
|
$('#confirm-modal').modal();
|
||||||
|
$('#confirm-modal').one('click', '#confirm-button', function () {
|
||||||
|
window.location.href = "shutdown";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#nav-restart").click(function() {
|
||||||
|
$("#confirm-message").text("Are you sure you want to restart PlexPy?");
|
||||||
|
$('#confirm-modal').modal();
|
||||||
|
$('#confirm-modal').one('click', '#confirm-button', function () {
|
||||||
|
window.location.href = "restart";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#nav-update").first().one("click", function () {
|
||||||
|
// Allow the update bar to show again if previously dismissed.
|
||||||
|
setCookie('updateDismiss', 'true', 0);
|
||||||
|
$(this).html('<i class="fa fa-spin fa-refresh"></i> Checking');
|
||||||
|
window.location.href = "checkGithub";
|
||||||
|
});
|
||||||
|
% endif
|
||||||
|
|
||||||
|
$('.dropdown-toggle').click(function (e) {
|
||||||
|
if (!(('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0))) {
|
||||||
|
window.location.href = $(this).data('href');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('#search_form').submit(function (e) {
|
$('#search_form').submit(function (e) {
|
||||||
if ($('#query').hasClass('active') && $('#query').val().trim() != '') {
|
if ($('#query').hasClass('active') && $('#query').val().trim() != '') {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -260,10 +382,9 @@ ${next.headerIncludes()}
|
|||||||
}).removeClass('active');
|
}).removeClass('active');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
// Work around for iOS web app links opening in Safari
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
// Work around for iOS web app links opening in Safari
|
||||||
if (("standalone" in window.navigator) && window.navigator.standalone) {
|
if (("standalone" in window.navigator) && window.navigator.standalone) {
|
||||||
// For iOS Apps
|
// For iOS Apps
|
||||||
$('a').on('click', function (e) {
|
$('a').on('click', function (e) {
|
||||||
@@ -275,6 +396,12 @@ ${next.headerIncludes()}
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
% if _session['user_group'] != 'admin':
|
||||||
|
$('#admin-login-modal').on('shown.bs.modal', function () {
|
||||||
|
$('#admin-login-modal #username').focus()
|
||||||
|
})
|
||||||
|
% endif
|
||||||
</script>
|
</script>
|
||||||
${next.javascriptIncludes()}
|
${next.javascriptIncludes()}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
172
data/interfaces/default/configuration_table.html
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
<%doc>
|
||||||
|
USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
|
||||||
|
|
||||||
|
For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
|
||||||
|
|
||||||
|
Filename: configuration_table.html
|
||||||
|
Version: 0.1
|
||||||
|
|
||||||
|
DOCUMENTATION :: END
|
||||||
|
</%doc>
|
||||||
|
|
||||||
|
<%!
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import plexpy
|
||||||
|
from plexpy import common, logger
|
||||||
|
from plexpy.helpers import anon_url
|
||||||
|
%>
|
||||||
|
|
||||||
|
<table class="config-info-table small-muted">
|
||||||
|
<tbody>
|
||||||
|
% if plexpy.CURRENT_VERSION:
|
||||||
|
<tr>
|
||||||
|
<td>Git Branch:</td>
|
||||||
|
<td><a class="no-highlight" href="${anon_url('https://github.com/%s/plexpy/tree/%s' % (plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_BRANCH))}">${plexpy.CONFIG.GIT_BRANCH}</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Git Commit Hash:</td>
|
||||||
|
<td><a class="no-highlight" href="${anon_url('https://github.com/%s/plexpy/commit/%s' % (plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_BRANCH))}">${plexpy.CURRENT_VERSION}</a></td>
|
||||||
|
</tr>
|
||||||
|
% endif
|
||||||
|
<tr>
|
||||||
|
<td>Configuration File:</td>
|
||||||
|
<td>${plexpy.CONFIG_FILE}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Database File:</td>
|
||||||
|
<td>${plexpy.DB_FILE}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Log File:</td>
|
||||||
|
<td><a class="no-highlight" href="logFile" target="_blank">${os.path.join(plexpy.CONFIG.LOG_DIR, logger.FILENAME)}</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Backup Directory:</td>
|
||||||
|
<td>${plexpy.CONFIG.BACKUP_DIR}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cache Directory:</td>
|
||||||
|
<td>${plexpy.CONFIG.CACHE_DIR}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>GeoLite2 Database:</td>
|
||||||
|
% if plexpy.CONFIG.GEOIP_DB:
|
||||||
|
<td>${plexpy.CONFIG.GEOIP_DB} | <a class="no-highlight" href="#" id="reinstall_geoip_db">Reinstall / Update</a> | <a class="no-highlight" href="#" id="uninstall_geoip_db">Uninstall</a></td>
|
||||||
|
% else:
|
||||||
|
<td><a class="no-highlight" href="#" id="install_geoip_db">Click here to install the GeoLite2 database.</a></td>
|
||||||
|
% endif
|
||||||
|
</tr>
|
||||||
|
% if plexpy.ARGS:
|
||||||
|
<tr>
|
||||||
|
<td>Arguments:</td>
|
||||||
|
<td>${plexpy.ARGS}</td>
|
||||||
|
</tr>
|
||||||
|
% endif
|
||||||
|
<tr>
|
||||||
|
<td>Platform:</td>
|
||||||
|
<td>${common.PLATFORM} ${common.PLATFORM_VERSION}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Python Version:</td>
|
||||||
|
<td>${sys.version}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="top-line">Resources:</td>
|
||||||
|
<td class="top-line">
|
||||||
|
<a id="source-link" class="no-highlight" href="${anon_url('https://github.com/%s/plexpy' % plexpy.CONFIG.GIT_USER)}" target="_blank">GitHub Source</a> |
|
||||||
|
<a class="no-highlight guidelines-modal-link" href="${anon_url('https://github.com/%s/plexpy/issues' % plexpy.CONFIG.GIT_USER)}" data-id="issue">GitHub Issues</a> |
|
||||||
|
<a class="no-highlight guidelines-modal-link" href="${anon_url('http://feathub.com/%s/plexpy' % plexpy.CONFIG.GIT_USER)}" data-id="feature request">FeatHub Feature Requests</a> |
|
||||||
|
<a class="no-highlight" href="${anon_url('https://github.com/%s/plexpy/wiki' % plexpy.CONFIG.GIT_USER)}" target="_blank">PlexPy Wiki</a> |
|
||||||
|
<a id="faq-source-link" class="no-highlight" href="${anon_url('https://github.com/%s/plexpy/wiki/Frequently-Asked-Questions-(FAQ)' % plexpy.CONFIG.GIT_USER)}" target="_blank">PlexPy FAQ</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Support:</td>
|
||||||
|
<td>
|
||||||
|
<a class="no-highlight support-modal-link" href="${anon_url('https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program')}" target="_blank">Plex Forums</a> |
|
||||||
|
<a class="no-highlight support-modal-link" href="${anon_url('https://gitter.im/plexpy/general')}" target="_blank">PlexPy Gitter Chat</a> |
|
||||||
|
<a id="best-support-link" class="no-highlight support-modal-link" href="${anon_url('https://discord.gg/011TFFWSuNFI02EKr')}" target="_blank">/r/Plex Discord Server</a> |
|
||||||
|
<a class="no-highlight support-modal-link" href="${anon_url('https://discord.gg/36ggawe')}" target="_blank">PlexPy Discord Server</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="guidelines-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="guidelines-modal">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||||
|
<h4 class="modal-title">Guidelines</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div style="text-align: center; margin-top: 20px; margin-bottom: 20px;">
|
||||||
|
<strong>Please read the <a href="#" target="_blank" id="guidelines-link">guidelines</a> in the README document <br />before submitting a new <span id="guidelines-type"></span>!</strong>
|
||||||
|
<br /><br />
|
||||||
|
Your post may be removed for failure to follow the guidelines.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a href="#" target="_blank" id="guidelines-continue" class="btn btn-bright">Continue</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="support-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="support-modal">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||||
|
<h4 class="modal-title">Support</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div style="text-align: center; margin-top: 20px; margin-bottom: 20px;">
|
||||||
|
<strong>Please read the <a href="#" target="_blank" id="faq-link">FAQ</a> before asking for help!</strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a href="#" target="_blank" id="support-continue" class="btn btn-bright">Continue</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
$("#install_geoip_db, #reinstall_geoip_db").click(function () {
|
||||||
|
var msg = 'Are you sure you want to install the GeoLite2 database?<br /><br />' +
|
||||||
|
'The database is used to lookup IP address geolocation info.<br />' +
|
||||||
|
'The database will be downloaded from <a href="${anon_url("https://dev.maxmind.com/geoip/geoip2/geolite2/")}" target="_blank">MaxMind</a>, <br />' +
|
||||||
|
'and requires <strong>100MB</strong> of free space to install in your PlexPy directory.<br />'
|
||||||
|
var url = 'install_geoip_db';
|
||||||
|
confirmAjaxCall(url, msg, 'Installing GeoLite2 database.', getConfigurationTable);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#uninstall_geoip_db").click(function () {
|
||||||
|
var msg = 'Are you sure you want to uninstall the GeoLite2 database?<br /><br />' +
|
||||||
|
'You will not be able to lookup IP address geolocation info.';
|
||||||
|
var url = 'uninstall_geoip_db';
|
||||||
|
confirmAjaxCall(url, msg, 'Uninstalling GeoLite2 database.', getConfigurationTable);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.guidelines-modal-link').on('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$('#guidelines-link').attr('href', $('#source-link').attr('href'));
|
||||||
|
$('#guidelines-type').text($(this).data('id'))
|
||||||
|
$('#guidelines-modal').modal();
|
||||||
|
$('#guidelines-continue').attr('href', $(this).attr('href')).on('click', function () {
|
||||||
|
$('#guidelines-modal').modal('hide');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.support-modal-link').on('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$('#faq-link').attr('href', $('#faq-source-link').attr('href'));
|
||||||
|
$('#support-modal').modal();
|
||||||
|
$('#support-continue').attr('href', $(this).attr('href')).on('click', function () {
|
||||||
|
$('#support-modal').modal('hide');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
1
data/interfaces/default/css/opensans.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@font-face{font-family:'Open Sans';font-weight:400;font-style:normal;src:url(../fonts/Open-Sans-regular/Open-Sans-regular.eot);src:url(../fonts/Open-Sans-regular/Open-Sans-regular.eot?#iefix) format('embedded-opentype'),local('Open Sans'),local('Open-Sans-regular'),url(../fonts/Open-Sans-regular/Open-Sans-regular.woff2) format('woff2'),url(../fonts/Open-Sans-regular/Open-Sans-regular.woff) format('woff'),url(../fonts/Open-Sans-regular/Open-Sans-regular.ttf) format('truetype'),url(../fonts/Open-Sans-regular/Open-Sans-regular.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-weight:600;font-style:normal;src:url(../fonts/Open-Sans-600/Open-Sans-600.eot);src:url(../fonts/Open-Sans-600/Open-Sans-600.eot?#iefix) format('embedded-opentype'),local('Open Sans Semibold'),local('Open-Sans-600'),url(../fonts/Open-Sans-600/Open-Sans-600.woff2) format('woff2'),url(../fonts/Open-Sans-600/Open-Sans-600.woff) format('woff'),url(../fonts/Open-Sans-600/Open-Sans-600.ttf) format('truetype'),url(../fonts/Open-Sans-600/Open-Sans-600.svg#OpenSans) format('svg')}
|
||||||
1
data/interfaces/default/css/pnotify.custom.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.ui-pnotify{top:36px;right:36px;position:absolute;height:auto;z-index:2}body>.ui-pnotify{position:fixed;z-index:100040}.ui-pnotify-modal-overlay{background-color:rgba(0,0,0,.4);top:0;left:0;position:absolute;height:100%;width:100%;z-index:1}body>.ui-pnotify-modal-overlay{position:fixed;z-index:100039}.ui-pnotify.ui-pnotify-in{display:block!important}.ui-pnotify.ui-pnotify-move{transition:left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-slow{transition:opacity .6s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-slow.ui-pnotify.ui-pnotify-move{transition:opacity .6s linear,left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-normal{transition:opacity .4s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-normal.ui-pnotify.ui-pnotify-move{transition:opacity .4s linear,left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-fast{transition:opacity .2s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-fast.ui-pnotify.ui-pnotify-move{transition:opacity .2s linear,left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-in{opacity:1}.ui-pnotify .ui-pnotify-shadow{-webkit-box-shadow:0 6px 28px 0 rgba(0,0,0,.1);-moz-box-shadow:0 6px 28px 0 rgba(0,0,0,.1);box-shadow:0 6px 28px 0 rgba(0,0,0,.1)}.ui-pnotify-container{background-position:0 0;padding:.8em;height:100%;margin:0}.ui-pnotify-container:after{content:" ";visibility:hidden;display:block;height:0;clear:both}.ui-pnotify-container.ui-pnotify-sharp{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ui-pnotify-title{display:block;margin-bottom:.4em;margin-top:0}.ui-pnotify-text{display:block}.ui-pnotify-icon,.ui-pnotify-icon span{display:block;float:left;margin-right:.2em}.ui-pnotify.stack-bottomleft,.ui-pnotify.stack-topleft{left:25px;right:auto}.ui-pnotify.stack-bottomleft,.ui-pnotify.stack-bottomright{bottom:25px;top:auto}.ui-pnotify.stack-modal{left:50%;right:auto;margin-left:-150px}.ui-pnotify-closer,.ui-pnotify-sticker{float:right;margin-left:.2em}.ui-pnotify-container{position:relative;left:0}@media (max-width:480px){.ui-pnotify-mobile-able.ui-pnotify{position:fixed;top:0;right:0;left:0;width:auto!important;font-size:1.2em;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;-ms-font-smoothing:antialiased;font-smoothing:antialiased}.ui-pnotify-mobile-able.ui-pnotify .ui-pnotify-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-bottom-width:5px}.ui-pnotify-mobile-able .ui-pnotify-container{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ui-pnotify-mobile-able.ui-pnotify.stack-bottomleft,.ui-pnotify-mobile-able.ui-pnotify.stack-topleft{left:0;right:0}.ui-pnotify-mobile-able.ui-pnotify.stack-bottomleft,.ui-pnotify-mobile-able.ui-pnotify.stack-bottomright{left:0;right:0;bottom:0;top:auto}.ui-pnotify-mobile-able.ui-pnotify.stack-bottomleft .ui-pnotify-shadow,.ui-pnotify-mobile-able.ui-pnotify.stack-bottomright .ui-pnotify-shadow{border-top-width:5px;border-bottom-width:1px}}
|
||||||
@@ -68,20 +68,23 @@ DOCUMENTATION :: END
|
|||||||
% if data['stream_count'] != '0':
|
% if data['stream_count'] != '0':
|
||||||
% for a in data['sessions']:
|
% for a in data['sessions']:
|
||||||
<div class="dashboard-instance" id="instance-${a['session_key']}">
|
<div class="dashboard-instance" id="instance-${a['session_key']}">
|
||||||
% if a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track':
|
% if (a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track') and a['rating_key']:
|
||||||
<a href="info?rating_key=${a['rating_key']}">
|
<a href="info?rating_key=${a['rating_key']}">
|
||||||
|
% else:
|
||||||
|
<a href="#">
|
||||||
% endif
|
% endif
|
||||||
<div class="dashboard-activity-poster">
|
<div class="dashboard-activity-poster">
|
||||||
|
% if not a['art'].startswith('interfaces') or not a['thumb'].startswith('interfaces'):
|
||||||
% if (a['media_type'] == 'movie' and not a['indexes']) or (a['indexes'] and not a['view_offset']):
|
% if (a['media_type'] == 'movie' and not a['indexes']) or (a['indexes'] and not a['view_offset']):
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280);"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280&fallback=art);"></div>
|
||||||
% elif (a['media_type'] == 'episode' and not a['indexes']) or (a['indexes'] and not a['view_offset']):
|
% elif (a['media_type'] == 'episode' and not a['indexes']) or (a['indexes'] and not a['view_offset']):
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280);"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280&fallback=art);"></div>
|
||||||
% elif a['indexes']:
|
% elif a['indexes']:
|
||||||
<div class="dashboard-activity-poster-face bif" style="background-image: url(pms_image_proxy?img=${a['bif_thumb']}&width=500&height=280); display: none;"></div>
|
<div class="dashboard-activity-poster-face bif" style="background-image: url(pms_image_proxy?img=${a['bif_thumb']}&width=500&height=280&fallback=art); display: none;"></div>
|
||||||
% else:
|
% else:
|
||||||
% if a['media_type'] == 'track':
|
% if a['media_type'] == 'track':
|
||||||
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300);"></div>
|
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300);"></div>
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
% elif a['media_type'] == 'clip':
|
% elif a['media_type'] == 'clip':
|
||||||
% if a['art'][:4] == 'http':
|
% if a['art'][:4] == 'http':
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(${a['art']});"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(${a['art']});"></div>
|
||||||
@@ -89,17 +92,23 @@ DOCUMENTATION :: END
|
|||||||
<div class="dashboard-activity-poster-face" style="background-image: url(${a['thumb']});"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(${a['thumb']});"></div>
|
||||||
% else:
|
% else:
|
||||||
% if a['art']:
|
% if a['art']:
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280);"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280&fallback=art);"></div>
|
||||||
% else:
|
% else:
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=500&height=280);"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=500&height=280&fallback=art);"></div>
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
% elif a['media_type'] == 'photo':
|
% elif a['media_type'] == 'photo':
|
||||||
<div class="dashboard-activity-poster-face bif" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=500&height=500);"></div>
|
<div class="dashboard-activity-poster-face bif" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=500&height=500&fallback=cover);"></div>
|
||||||
% else:
|
% else:
|
||||||
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300&fallback=cover);"></div>
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
|
% else:
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(${a['art']});"></div>
|
||||||
|
% endif
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
<div class="dashboard-activity-button-info">
|
<div class="dashboard-activity-button-info">
|
||||||
<button type="button" class="btn btn-activity-info btn-lg" data-target="#stream-${a['session_key']}">
|
<button type="button" class="btn btn-activity-info btn-lg" data-target="#stream-${a['session_key']}">
|
||||||
<i class="fa fa-info-circle"></i>
|
<i class="fa fa-info-circle"></i>
|
||||||
@@ -198,6 +207,13 @@ DOCUMENTATION :: END
|
|||||||
% else:
|
% else:
|
||||||
<span>IP: N/A</span>
|
<span>IP: N/A</span>
|
||||||
% endif
|
% endif
|
||||||
|
<br />
|
||||||
|
ETA:
|
||||||
|
<span id="stream-eta-${a['session_key']}">
|
||||||
|
<script>
|
||||||
|
$("#stream-eta-${a['session_key']}").html(moment().add(parseInt(${a['duration']}) - parseInt(${a['view_offset']}), 'milliseconds').format(time_format));
|
||||||
|
</script>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-activity-poster-info-time">
|
<div class="dashboard-activity-poster-info-time">
|
||||||
<span class="progress_time">${a['view_offset']}</span>/<span class="progress_time">${a['duration']}</span>
|
<span class="progress_time">${a['view_offset']}</span>/<span class="progress_time">${a['duration']}</span>
|
||||||
@@ -205,19 +221,25 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% if a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track':
|
% if (a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track') and a['rating_key']:
|
||||||
|
</a>
|
||||||
|
% else:
|
||||||
</a>
|
</a>
|
||||||
% endif
|
% endif
|
||||||
<div class="dashboard-activity-progress">
|
<div class="dashboard-activity-progress">
|
||||||
<div class="dashboard-activity-progress-bar">
|
<div class="dashboard-activity-progress-bar">
|
||||||
<div class="bufferbar" style="width: ${a['transcode_progress']}%">${a['transcode_progress']}%</div>
|
<div class="bufferbar" style="width: ${a['transcode_progress']}%" data-toggle="tooltip" title="Transcoder Progress">${a['transcode_progress']}%</div>
|
||||||
<div class="bar" style="width: ${a['progress_percent']}%">${a['progress_percent']}%</div>
|
<div class="bar" style="width: ${a['progress_percent']}%" data-toggle="tooltip" title="Stream Progress">${a['progress_percent']}%</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-activity-metadata-wrapper">
|
<div class="dashboard-activity-metadata-wrapper">
|
||||||
|
% if a['user_id']:
|
||||||
<a href="user?user_id=${a['user_id']}">
|
<a href="user?user_id=${a['user_id']}">
|
||||||
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${a['user_thumb']});"></div>
|
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${a['user_thumb']});"></div>
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${a['user_thumb']});"></div>
|
||||||
|
% endif
|
||||||
<div class="dashboard-activity-metadata-title">
|
<div class="dashboard-activity-metadata-title">
|
||||||
% if a['state'] == 'playing':
|
% if a['state'] == 'playing':
|
||||||
<i class="fa fa-play"></i>
|
<i class="fa fa-play"></i>
|
||||||
@@ -226,6 +248,7 @@ DOCUMENTATION :: END
|
|||||||
% elif a['state'] == 'buffering':
|
% elif a['state'] == 'buffering':
|
||||||
<i class="fa fa-spinner"></i>
|
<i class="fa fa-spinner"></i>
|
||||||
% endif
|
% endif
|
||||||
|
% if a['rating_key']:
|
||||||
% if a['media_type'] == 'episode':
|
% if a['media_type'] == 'episode':
|
||||||
<a href="info?rating_key=${a['rating_key']}" title="${a['grandparent_title']} - ${a['title']}">${a['grandparent_title']} - ${a['title']}</a>
|
<a href="info?rating_key=${a['rating_key']}" title="${a['grandparent_title']} - ${a['title']}">${a['grandparent_title']} - ${a['title']}</a>
|
||||||
% elif a['media_type'] == 'movie':
|
% elif a['media_type'] == 'movie':
|
||||||
@@ -239,8 +262,12 @@ DOCUMENTATION :: END
|
|||||||
% else:
|
% else:
|
||||||
<span title="${a['title']}">${a['title']}</span>
|
<span title="${a['title']}">${a['title']}</span>
|
||||||
% endif
|
% endif
|
||||||
|
% else:
|
||||||
|
${a['title']}
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-activity-metadata-subtitle">
|
<div class="dashboard-activity-metadata-subtitle">
|
||||||
|
% if a['rating_key']:
|
||||||
% if a['media_type'] == 'episode':
|
% if a['media_type'] == 'episode':
|
||||||
<span title="S${a['parent_media_index']} · E${a['media_index']}">S${a['parent_media_index']} · E${a['media_index']}</span>
|
<span title="S${a['parent_media_index']} · E${a['media_index']}">S${a['parent_media_index']} · E${a['media_index']}</span>
|
||||||
% elif a['media_type'] == 'movie':
|
% elif a['media_type'] == 'movie':
|
||||||
@@ -252,12 +279,13 @@ DOCUMENTATION :: END
|
|||||||
% else:
|
% else:
|
||||||
<span title="${a['year']}">${a['year']}</span>
|
<span title="${a['year']}">${a['year']}</span>
|
||||||
% endif
|
% endif
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-activity-metadata-user">
|
<div class="dashboard-activity-metadata-user">
|
||||||
% if a['user_id']:
|
% if a['user_id']:
|
||||||
<a href="user?user_id=${a['user_id']}" title="${a['friendly_name']}">${a['friendly_name']}</a>
|
<a href="user?user_id=${a['user_id']}" title="${a['friendly_name']}">${a['friendly_name']}</a>
|
||||||
% else:
|
% else:
|
||||||
<a href="user?user=${a['user']}" title="${a['friendly_name']}">${a['friendly_name']}</a>
|
${a['friendly_name']}
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -282,11 +310,13 @@ DOCUMENTATION :: END
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Add hover class to dashboard-instance
|
// Add hover class to dashboard-instance
|
||||||
$('.dashboard-activity-poster').hover(function() {
|
$('.dashboard-activity-poster, .dashboard-activity-progress-bar').hover(function() {
|
||||||
$(this).closest('.dashboard-instance').addClass('hover');
|
$(this).closest('.dashboard-instance').addClass('hover');
|
||||||
}, function() {
|
}, function() {
|
||||||
$(this).closest('.dashboard-instance').removeClass('hover');
|
$(this).closest('.dashboard-instance').removeClass('hover');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.bar, .bufferbar').tooltip({container: 'body', placement: 'right', delay: 50});
|
||||||
</script>
|
</script>
|
||||||
% else:
|
% else:
|
||||||
<div class="text-muted">Nothing is currently being watched.</div><br>
|
<div class="text-muted">Nothing is currently being watched.</div><br>
|
||||||
|
|||||||
@@ -15,12 +15,23 @@ DOCUMENTATION :: END
|
|||||||
</%doc>
|
</%doc>
|
||||||
|
|
||||||
% if data != None:
|
% if data != None:
|
||||||
% if data == '0':
|
<%
|
||||||
|
s = '('
|
||||||
|
if data['direct_play']:
|
||||||
|
s += str(data['direct_play']) + ' direct play' + ('s' if data['direct_play'] > 1 else '') + ', '
|
||||||
|
if data['direct_stream']:
|
||||||
|
s += str(data['direct_stream']) + ' direct stream' + ('s' if data['direct_stream'] > 1 else '') + ', '
|
||||||
|
if data['transcode']:
|
||||||
|
s += str(data['transcode']) + ' transcode' + ('s' if data['transcode'] > 1 else '') + ', '
|
||||||
|
s = s.rstrip(', ')
|
||||||
|
s += ')'
|
||||||
|
%>
|
||||||
|
% if data['stream_count'] == '0':
|
||||||
<h3>Activity</h3>
|
<h3>Activity</h3>
|
||||||
% elif data == '1':
|
% elif data['stream_count'] == '1':
|
||||||
<h3>Activity <small>${data} stream</small></h3>
|
<h3>Activity <small>${data['stream_count']} stream ${s}</small></h3>
|
||||||
% else:
|
% else:
|
||||||
<h3>Activity <small>${data} streams</small></h3>
|
<h3>Activity <small>${data['stream_count']} streams ${s}</small></h3>
|
||||||
% endif
|
% endif
|
||||||
% else:
|
% else:
|
||||||
<h3>Activity</h3>
|
<h3>Activity</h3>
|
||||||
|
|||||||
278
data/interfaces/default/current_activity_instance.html
Normal file
@@ -0,0 +1,278 @@
|
|||||||
|
<%doc>
|
||||||
|
USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
|
||||||
|
|
||||||
|
For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
|
||||||
|
|
||||||
|
Filename: current_activity_instance.html
|
||||||
|
Version: 0.1
|
||||||
|
Variable names: data {dict}
|
||||||
|
|
||||||
|
data :: Usable parameters
|
||||||
|
|
||||||
|
== Global keys ==
|
||||||
|
session_key Returns a unique session id for the active stream
|
||||||
|
rating_key Returns the unique identifier for the media item.
|
||||||
|
media_index Returns the index of the media item.
|
||||||
|
parent_media_index Returns the index of the media item's parent.
|
||||||
|
media_type Returns the type of session. Either 'track', 'episode' or 'movie'.
|
||||||
|
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||||
|
bif_thumb Returns the location of the item's bif thumbnail. Use with pms_image_proxy.
|
||||||
|
art Returns the location of the item's artwork
|
||||||
|
progress_percent Returns the current progress of the item. 0 to 100.
|
||||||
|
user Returns the name of the user owning the session.
|
||||||
|
user_id Returns the Plex user id if available.
|
||||||
|
machine_id Returns the machine id of the players being used.
|
||||||
|
friendly_name Returns the friendlly name of the user owning the session.
|
||||||
|
user_thumb Returns the profile picture of the user owning the session.
|
||||||
|
state Returns the state of the current session. Either 'playing', 'paused' or 'buffering'.
|
||||||
|
title Returns the name of the episode, movie or music track.
|
||||||
|
year Returns the year of the episode, movie, or clip.
|
||||||
|
ip_address Returns the ip address of the stream.
|
||||||
|
player Returns the name of the platform used to play the stream.
|
||||||
|
platform Returns the type of platform used to play the stream.
|
||||||
|
throttled Returns true if the transcode session is throttled.
|
||||||
|
transcode_progress Returns the current transcode progress of the item. 0 to 100.
|
||||||
|
transcode_speed Returns the current transcode speed of the item.
|
||||||
|
audio_decision Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
||||||
|
audio_codec Returns the name of the audio codec.
|
||||||
|
audio_channels Returns the number of audio channels.
|
||||||
|
grandparent_title Returns the title of the item's grandparent.
|
||||||
|
parent_title Returns the title of the item's parent.
|
||||||
|
video_decision Returns the video transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
||||||
|
video_codec Returns the name of the video codec.
|
||||||
|
height Returns the value of the video height.
|
||||||
|
width Returns the value of the video width.
|
||||||
|
container Returns the value of the media container.
|
||||||
|
bitrate Returns the value of the media bitrate.
|
||||||
|
video_resolution Returns the value of the video resolution.
|
||||||
|
video_framerate Returns the value of the video framerate.
|
||||||
|
video_aspect_ratio Returns the value of the video aspect ratio.
|
||||||
|
transcode_audio_channels Returns the amount of audio channels if there is a transcode session.
|
||||||
|
transcode_audio_codec Returns the name of the audio codec if there is a transcode session.
|
||||||
|
transcode_video_codec Returns the name of the video codec if there is a transcode session.
|
||||||
|
transcode_width Returns the video width if there is a transcode session.
|
||||||
|
transcode_height Returns the video height if there is a transcode session.
|
||||||
|
transcode_container Returns the value of media container if there is a transcode session.
|
||||||
|
transcode_protocol Returns the value of media protocol if there is a transcode session.
|
||||||
|
indexes Returns true if the media has media indexes and are enabled
|
||||||
|
|
||||||
|
DOCUMENTATION :: END
|
||||||
|
</%doc>
|
||||||
|
|
||||||
|
% if data is not None:
|
||||||
|
<%
|
||||||
|
from urllib import quote
|
||||||
|
|
||||||
|
from plexpy import helpers
|
||||||
|
data['indexes'] = helpers.cast_to_int(data['indexes'])
|
||||||
|
%>
|
||||||
|
<div class="dashboard-instance" id="instance-${data['session_key']}" data-id="${data['session_key']}">
|
||||||
|
<div class="dashboard-hover-container">
|
||||||
|
% if (data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track') and data['rating_key']:
|
||||||
|
<a href="info?rating_key=${data['rating_key']}">
|
||||||
|
% else:
|
||||||
|
<a href="#">
|
||||||
|
% endif
|
||||||
|
<div class="dashboard-activity-poster" id="poster-${data['session_key']}">
|
||||||
|
% if not data['art'].startswith('interfaces') or not data['thumb'].startswith('interfaces'):
|
||||||
|
% if (data['media_type'] == 'movie' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
|
||||||
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
|
||||||
|
% elif (data['media_type'] == 'episode' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
|
||||||
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
|
||||||
|
% elif data['indexes']:
|
||||||
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['bif_thumb']}&width=500&height=280&fallback=art); display: none;"></div>
|
||||||
|
% else:
|
||||||
|
% if data['media_type'] == 'track':
|
||||||
|
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% elif data['media_type'] == 'clip':
|
||||||
|
% if data['art'].startswith('http'):
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
|
||||||
|
% elif data['thumb'].startswith('http'):
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
||||||
|
% else:
|
||||||
|
% if data['art']:
|
||||||
|
<!--Hacky solution to escape the image url until I come up with something better-->
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['art'])}&width=500&height=280&fallback=art);"></div>
|
||||||
|
% else:
|
||||||
|
<!--Hacky solution to escape the image url until I come up with something better-->
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['thumb'])}&width=500&height=280&fallback=art);"></div>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% elif data['media_type'] == 'photo':
|
||||||
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=cover);"></div>
|
||||||
|
% else:
|
||||||
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% else:
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
|
||||||
|
% endif
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image left" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
|
<div class="dashboard-activity-button-info">
|
||||||
|
<button type="button" class="btn btn-activity-info btn-lg" data-target="#stream-${data['session_key']}" data-id="${data['session_key']}">
|
||||||
|
<i class="fa fa-info-circle"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div id="stream-${data['session_key']}" class="dashboard-activity-info-details-overlay">
|
||||||
|
<div class="dashboard-activity-info-details-content">
|
||||||
|
<div id="platform-${data['session_key']}" title="${data['platform']}">
|
||||||
|
<script>
|
||||||
|
$("#platform-${data['session_key']}").html("<div class='dashboard-activity-info-platform-box' style='background-image: url(" + getPlatformImagePath('${data['platform']}') + ");'>");
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-activity-info-platform">
|
||||||
|
<strong>${data['player']}</strong><br />
|
||||||
|
<span id="overlay-play-state-${data['session_key']}">
|
||||||
|
% if data['state'] == 'playing':
|
||||||
|
State <strong>Playing</strong>
|
||||||
|
% elif data['state'] == 'paused':
|
||||||
|
State <strong>Paused</strong>
|
||||||
|
% elif data['state'] == 'buffering':
|
||||||
|
State <strong>Buffering</strong>
|
||||||
|
% endif
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span id="transcode-state-${data['session_key']}">
|
||||||
|
% if data['video_decision'] == 'transcode' or data['audio_decision'] == 'transcode':
|
||||||
|
Stream <strong>Transcode (Speed: ${data['transcode_speed']})
|
||||||
|
% if data['throttled'] == '1':
|
||||||
|
(Throttled)
|
||||||
|
% endif
|
||||||
|
</strong>
|
||||||
|
% elif data['video_decision'] == 'copy' or data['audio_decision'] == 'copy':
|
||||||
|
Stream <strong>Direct Stream</strong>
|
||||||
|
% else:
|
||||||
|
Stream <strong>Direct Play</strong>
|
||||||
|
% endif
|
||||||
|
<br />
|
||||||
|
% if data['video_decision'] and data['media_type'] != 'photo':
|
||||||
|
% if data['video_decision'] == 'transcode':
|
||||||
|
Video <strong>Transcode (${data['transcode_video_codec']}) (${data['transcode_width']}x${data['transcode_height']})</strong>
|
||||||
|
% elif data['video_decision'] == 'copy':
|
||||||
|
Video <strong>Direct Stream (${data['transcode_video_codec']}) (${data['width']}x${data['height']})</strong>
|
||||||
|
% else:
|
||||||
|
Video <strong>Direct Play (${data['video_codec']}) (${data['width']}x${data['height']})</strong>
|
||||||
|
% endif
|
||||||
|
<br />
|
||||||
|
% endif
|
||||||
|
% if data['audio_decision']:
|
||||||
|
% if data['audio_decision'] == 'transcode':
|
||||||
|
Audio <strong>Transcode (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
||||||
|
% elif data['audio_decision'] == 'copy':
|
||||||
|
Audio <strong>Direct Stream (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
||||||
|
% else:
|
||||||
|
Audio <strong>Direct Play (${data['audio_codec']}) (${data['audio_channels']}ch)</strong>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
% if data['media_type'] != 'photo':
|
||||||
|
<div class="dashboard-activity-poster-info-bar">
|
||||||
|
<div class="dashboard-activity-poster-info-ip-address">
|
||||||
|
% if data['ip_address']:
|
||||||
|
<span>IP: ${data['ip_address']}</span>
|
||||||
|
% else:
|
||||||
|
<span>IP: N/A</span>
|
||||||
|
% endif
|
||||||
|
<br />
|
||||||
|
ETA:
|
||||||
|
<span id="stream-eta-${data['session_key']}">
|
||||||
|
<script>
|
||||||
|
$("#stream-eta-${data['session_key']}").html(moment().add(parseInt("${data['duration']}") - parseInt("${data['view_offset']}"), 'milliseconds').format(time_format));
|
||||||
|
</script>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-activity-poster-info-time">
|
||||||
|
<span class="progress_time" id="stream-view-offset-${data['session_key']}">
|
||||||
|
<script>
|
||||||
|
$("#stream-view-offset-${data['session_key']}").html(millisecondsToMinutes(parseInt("${data['view_offset']}"), false));
|
||||||
|
</script>
|
||||||
|
</span>/<span class="progress_time" id="stream-duration-${data['session_key']}">
|
||||||
|
<script>
|
||||||
|
$("#stream-duration-${data['session_key']}").html(millisecondsToMinutes(parseInt("${data['duration']}"), false));
|
||||||
|
</script>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
% if (data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track') and data['rating_key']:
|
||||||
|
</a>
|
||||||
|
% else:
|
||||||
|
</a>
|
||||||
|
% endif
|
||||||
|
<div class="dashboard-activity-progress">
|
||||||
|
<div class="dashboard-activity-progress-bar">
|
||||||
|
<div id="bufferbar-${data['session_key']}" class="bufferbar" style="width: ${data['transcode_progress']}%" data-toggle="tooltip" title="Transcoder Progress">${data['transcode_progress']}%</div>
|
||||||
|
<div id="bar-${data['session_key']}" class="bar" style="width: ${data['progress_percent']}%" data-toggle="tooltip" title="Stream Progress">${data['progress_percent']}%</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-activity-metadata-wrapper">
|
||||||
|
% if data['user_id']:
|
||||||
|
<a href="user?user_id=${data['user_id']}">
|
||||||
|
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${data['user_thumb']});"></div>
|
||||||
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${data['user_thumb']});"></div>
|
||||||
|
% endif
|
||||||
|
<div class="dashboard-activity-metadata-title">
|
||||||
|
<span id="play-state-${data['session_key']}">
|
||||||
|
% if data['state'] == 'playing':
|
||||||
|
<i class="fa fa-fw fa-play"></i>
|
||||||
|
% elif data['state'] == 'paused':
|
||||||
|
<i class="fa fa-fw fa-pause"></i>
|
||||||
|
% elif data['state'] == 'buffering':
|
||||||
|
<i class="fa fa-fw fa-spinner"></i>
|
||||||
|
% endif
|
||||||
|
</span>
|
||||||
|
% if data['rating_key']:
|
||||||
|
% if data['media_type'] == 'episode':
|
||||||
|
<a href="info?rating_key=${data['grandparent_rating_key']}" title="${data['grandparent_title']}">${data['grandparent_title']}</a>
|
||||||
|
- <a href="info?rating_key=${data['rating_key']}" title="${data['title']}">${data['title']}</a>
|
||||||
|
% elif data['media_type'] == 'movie':
|
||||||
|
<a href="info?rating_key=${data['rating_key']}" title="${data['title']}">${data['title']}</a>
|
||||||
|
% elif data['media_type'] == 'clip':
|
||||||
|
<span title="${data['title']}">${data['title']}</span>
|
||||||
|
% elif data['media_type'] == 'track':
|
||||||
|
<a href="info?rating_key=${data['grandparent_rating_key']}" title="${data['grandparent_title']}">${data['grandparent_title']}</a>
|
||||||
|
- <a href="info?rating_key=${data['rating_key']}" title="${data['title']}">${data['title']}</a>
|
||||||
|
% elif data['media_type'] == 'photo':
|
||||||
|
<span title="${data['parent_title']}">${data['parent_title']}</span>
|
||||||
|
% else:
|
||||||
|
<span title="${data['title']}">${data['title']}</span>
|
||||||
|
% endif
|
||||||
|
% else:
|
||||||
|
${data['title']}
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-activity-metadata-subtitle">
|
||||||
|
% if data['rating_key']:
|
||||||
|
% if data['media_type'] == 'episode':
|
||||||
|
<a href="info?rating_key=${data['parent_rating_key']}" title="Season ${data['parent_media_index']}" class="text-muted">S${data['parent_media_index']}</a>
|
||||||
|
· <a href="info?rating_key=${data['rating_key']}" title="Episode ${data['media_index']}" class="text-muted">E${data['media_index']}</a>
|
||||||
|
% elif data['media_type'] == 'movie':
|
||||||
|
<span title="${data['year']}">${data['year']}</span>
|
||||||
|
% elif data['media_type'] == 'track':
|
||||||
|
<a href="info?rating_key=${data['parent_rating_key']}" title="${data['parent_title']}">${data['parent_title']}</a>
|
||||||
|
% elif data['media_type'] == 'photo':
|
||||||
|
<span title="${data['title']}">${data['title']}</span>
|
||||||
|
% else:
|
||||||
|
<span title="${data['year']}">${data['year']}</span>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-activity-metadata-user">
|
||||||
|
% if data['user_id']:
|
||||||
|
<a href="user?user_id=${data['user_id']}" title="${data['friendly_name']}">${data['friendly_name']}</a>
|
||||||
|
% else:
|
||||||
|
${data['friendly_name']}
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
@@ -20,6 +20,7 @@ is_allow_sync Returns bool value for whether the user has sync rights.
|
|||||||
is_restricted Returns bool value for whether the user account is restricted.
|
is_restricted Returns bool value for whether the user account is restricted.
|
||||||
do_notify Returns bool value for whether to send notifications for the user.
|
do_notify Returns bool value for whether to send notifications for the user.
|
||||||
keep_history Returns bool value for whether to keep history for the user.
|
keep_history Returns bool value for whether to keep history for the user.
|
||||||
|
allow_guest Returns bool value for whether to allow guest access for the user.
|
||||||
|
|
||||||
DOCUMENTATION :: END
|
DOCUMENTATION :: END
|
||||||
</%doc>
|
</%doc>
|
||||||
@@ -67,6 +68,12 @@ DOCUMENTATION :: END
|
|||||||
</label>
|
</label>
|
||||||
<p class="help-block">Uncheck this if you do not want to keep any history on this user's activity.</p>
|
<p class="help-block">Uncheck this if you do not want to keep any history on this user's activity.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" id="allow_guest" name="allow_guest" value="1" ${helpers.checked(data['allow_guest'])}> Allow Guest Access
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Uncheck this if you do not want to allow this user to login to PlexPy.</p>
|
||||||
|
</div>
|
||||||
% if data['user_id']:
|
% if data['user_id']:
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button class="btn btn-danger" id="delete-all-history">Purge</button>
|
<button class="btn btn-danger" id="delete-all-history">Purge</button>
|
||||||
@@ -83,7 +90,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="confirm-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
|
<div id="confirm-modal-purge" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="confirm-modal-purge">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -108,12 +115,16 @@ DOCUMENTATION :: END
|
|||||||
var custom_thumb = $("#custom_avatar_url").val();
|
var custom_thumb = $("#custom_avatar_url").val();
|
||||||
var do_notify = 0;
|
var do_notify = 0;
|
||||||
var keep_history = 0;
|
var keep_history = 0;
|
||||||
|
var allow_guest = 0;
|
||||||
if ($("#do_notify").is(":checked")) {
|
if ($("#do_notify").is(":checked")) {
|
||||||
do_notify = 1;
|
do_notify = 1;
|
||||||
}
|
}
|
||||||
if ($("#keep_history").is(":checked")) {
|
if ($("#keep_history").is(":checked")) {
|
||||||
keep_history = 1;
|
keep_history = 1;
|
||||||
}
|
}
|
||||||
|
if ($("#allow_guest").is(":checked")) {
|
||||||
|
allow_guest = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'edit_user',
|
url: 'edit_user',
|
||||||
@@ -122,7 +133,8 @@ DOCUMENTATION :: END
|
|||||||
friendly_name: friendly_name,
|
friendly_name: friendly_name,
|
||||||
custom_thumb: custom_thumb,
|
custom_thumb: custom_thumb,
|
||||||
do_notify: do_notify,
|
do_notify: do_notify,
|
||||||
keep_history: keep_history
|
keep_history: keep_history,
|
||||||
|
allow_guest: allow_guest
|
||||||
},
|
},
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
@@ -133,8 +145,8 @@ DOCUMENTATION :: END
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#delete-all-history").on('click', function() {
|
$("#delete-all-history").on('click', function() {
|
||||||
$('#confirm-modal').modal();
|
$('#confirm-modal-purge').modal();
|
||||||
$('#confirm-modal').one('click', '#confirm-purge', function () {
|
$('#confirm-modal-purge').one('click', '#confirm-purge', function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'delete_all_user_history',
|
url: 'delete_all_user_history',
|
||||||
data: { user_id: '${data["user_id"]}' },
|
data: { user_id: '${data["user_id"]}' },
|
||||||
@@ -148,28 +160,28 @@ DOCUMENTATION :: END
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Move #confirm-modal to parent container
|
// Move #confirm-modal-purge to parent container
|
||||||
if(!($('#edit-user-modal').next().is('#confirm-modal'))) {
|
if (!($('#edit-user-modal').next().is('#confirm-modal-purge'))) {
|
||||||
$('#confirm-modal').appendTo($('#edit-user-modal').parent());
|
$('#confirm-modal-purge').appendTo($('#edit-user-modal').parent());
|
||||||
}
|
}
|
||||||
$('#edit-user-modal > #confirm-modal').remove();
|
$('#edit-user-modal > #confirm-modal-purge').remove();
|
||||||
|
|
||||||
$('#edit-user-modal').css('z-index', '1050');
|
$('#edit-user-modal').css('z-index', '1050');
|
||||||
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1049');
|
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1049');
|
||||||
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
|
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
|
||||||
|
|
||||||
$('#confirm-modal').on('show.bs.modal', function () {
|
$('#confirm-modal-purge').on('show.bs.modal', function () {
|
||||||
// Fix position to match parent modal
|
// Fix position to match parent modal
|
||||||
var currentPadding = parseInt($('body').css('padding-right'));
|
var currentPadding = parseInt($('body').css('padding-right'));
|
||||||
$(this).children('.modal-dialog').css('left', -currentPadding/2);
|
$(this).children('.modal-dialog').css('left', -currentPadding/2);
|
||||||
$('#edit-user-modal').css('overflow-y', 'hidden');
|
$('#edit-user-modal').css('overflow-y', 'hidden');
|
||||||
});
|
});
|
||||||
$('#confirm-modal').on('shown.bs.modal', function () {
|
$('#confirm-modal-purge').on('shown.bs.modal', function () {
|
||||||
$(this).css('z-index', '1060');
|
$(this).css('z-index', '1060');
|
||||||
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1059');
|
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1059');
|
||||||
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
|
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
|
||||||
});
|
});
|
||||||
$('#confirm-modal').on('hidden.bs.modal', function() {
|
$('#confirm-modal-purge').on('hidden.bs.modal', function () {
|
||||||
$('body').addClass('modal-open');
|
$('body').addClass('modal-open');
|
||||||
$('#edit-user-modal').css('overflow-y', 'auto');
|
$('#edit-user-modal').css('overflow-y', 'auto');
|
||||||
});
|
});
|
||||||
|
|||||||
202
data/interfaces/default/fonts/Open-Sans-600/LICENSE.txt
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
BIN
data/interfaces/default/fonts/Open-Sans-600/Open-Sans-600.eot
Normal file
1637
data/interfaces/default/fonts/Open-Sans-600/Open-Sans-600.svg
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
data/interfaces/default/fonts/Open-Sans-600/Open-Sans-600.ttf
Normal file
BIN
data/interfaces/default/fonts/Open-Sans-600/Open-Sans-600.woff
Normal file
BIN
data/interfaces/default/fonts/Open-Sans-600/Open-Sans-600.woff2
Normal file
202
data/interfaces/default/fonts/Open-Sans-regular/LICENSE.txt
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
After Width: | Height: | Size: 105 KiB |
@@ -1,8 +1,8 @@
|
|||||||
<%inherit file="base.html"/>
|
<%inherit file="base.html"/>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.bootstrap.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.bootstrap.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/plexpy-dataTables.css">
|
<link rel="stylesheet" href="${http_root}css/plexpy-dataTables.css">
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
@@ -12,6 +12,14 @@
|
|||||||
<span><i class="fa fa-bar-chart"></i> Graphs</span>
|
<span><i class="fa fa-bar-chart"></i> Graphs</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar hidden-xs">
|
<div class="button-bar hidden-xs">
|
||||||
|
<div class="btn-group" id="user-selection">
|
||||||
|
<label>
|
||||||
|
<select name="graph-user" id="graph-user" class="btn" style="color: inherit;">
|
||||||
|
<option value="">All Users</option>
|
||||||
|
<option disabled>────────────</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div class="btn-group" data-toggle="buttons" id="yaxis-selection">
|
<div class="btn-group" data-toggle="buttons" id="yaxis-selection">
|
||||||
% if config['graph_type'] == 'duration':
|
% if config['graph_type'] == 'duration':
|
||||||
<label class="btn btn-dark">
|
<label class="btn btn-dark">
|
||||||
@@ -240,16 +248,18 @@
|
|||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
<script src="interfaces/default/js/moment-duration-format.js"></script>
|
<script src="${http_root}js/moment-duration-format.js"></script>
|
||||||
<script src="interfaces/default/js/highcharts/js/highcharts.js"></script>
|
<script src="${http_root}js/highcharts/js/highcharts.js"></script>
|
||||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
<script src="${http_root}js/jquery.dataTables.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.min.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.pagination.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.pagination.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
var selected_user_id = null
|
||||||
|
|
||||||
// Modal popup dialog
|
// Modal popup dialog
|
||||||
function selectHandler(selectedDate) {
|
function selectHandler(selectedDate, selectedSeries) {
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -259,10 +269,26 @@
|
|||||||
var y = dateValue.getFullYear();
|
var y = dateValue.getFullYear();
|
||||||
var dateString = '' + y + '-' + (m<=9 ? '0' + m : m) + '-' + (d <= 9 ? '0' + d : d);
|
var dateString = '' + y + '-' + (m<=9 ? '0' + m : m) + '-' + (d <= 9 ? '0' + d : d);
|
||||||
|
|
||||||
|
var media_type = null;
|
||||||
|
var transcode_decision = null;
|
||||||
|
switch(selectedSeries) {
|
||||||
|
case "TV": media_type = 'episode'; break;
|
||||||
|
case "Movies": media_type = 'movie'; break;
|
||||||
|
case "Music": media_type = 'track'; break;
|
||||||
|
case "Direct Play": transcode_decision = 'direct play'; break;
|
||||||
|
case "Direct Stream": transcode_decision = 'copy'; break;
|
||||||
|
case "Transcode": transcode_decision = 'transcode'; break;
|
||||||
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
"url": "history_table_modal",
|
url: "history_table_modal",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: { 'start_date': dateString },
|
data: {
|
||||||
|
user_id: selected_user_id,
|
||||||
|
start_date: dateString,
|
||||||
|
media_type: media_type,
|
||||||
|
transcode_decision: transcode_decision
|
||||||
|
},
|
||||||
complete: function(xhr, status) {
|
complete: function(xhr, status) {
|
||||||
$('#history-modal').modal('show');
|
$('#history-modal').modal('show');
|
||||||
$("#history-modal").html(xhr.responseText);
|
$("#history-modal").html(xhr.responseText);
|
||||||
@@ -271,21 +297,21 @@
|
|||||||
}
|
}
|
||||||
catch(err)
|
catch(err)
|
||||||
{
|
{
|
||||||
console.log("Failed to retrieve data");
|
console.log("Failed to retrieve history modal data.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_day.js"></script>
|
<script src="${http_root}js/graphs/plays_by_day.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_dayofweek.js"></script>
|
<script src="${http_root}js/graphs/plays_by_dayofweek.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_hourofday.js"></script>
|
<script src="${http_root}js/graphs/plays_by_hourofday.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_platform.js"></script>
|
<script src="${http_root}js/graphs/plays_by_platform.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_user.js"></script>
|
<script src="${http_root}js/graphs/plays_by_user.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_stream_type.js"></script>
|
<script src="${http_root}js/graphs/plays_by_stream_type.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_source_resolution.js"></script>
|
<script src="${http_root}js/graphs/plays_by_source_resolution.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_stream_resolution.js"></script>
|
<script src="${http_root}js/graphs/plays_by_stream_resolution.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_platform_by_stream_type.js"></script>
|
<script src="${http_root}js/graphs/plays_by_platform_by_stream_type.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_user_by_stream_type.js"></script>
|
<script src="${http_root}js/graphs/plays_by_user_by_stream_type.js"></script>
|
||||||
<script src="interfaces/default/js/graphs/plays_by_month.js"></script>
|
<script src="${http_root}js/graphs/plays_by_month.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
@@ -296,30 +322,59 @@
|
|||||||
|
|
||||||
$('.days').html(current_range);
|
$('.days').html(current_range);
|
||||||
|
|
||||||
|
// Load user ids and names (for the selector)
|
||||||
|
$.ajax({
|
||||||
|
url: 'get_user_names',
|
||||||
|
type: 'get',
|
||||||
|
dataType: "json",
|
||||||
|
success: function (data) {
|
||||||
|
var select = $('#graph-user');
|
||||||
|
data.sort(function(a, b) {
|
||||||
|
return a.friendly_name.localeCompare(b.friendly_name);
|
||||||
|
});
|
||||||
|
data.forEach(function(item) {
|
||||||
|
select.append('<option value="' + item.user_id + '">' +
|
||||||
|
item.friendly_name + '</option>');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var music_visible = (${config['music_logging_enable']} == 1 ? true : false);
|
var music_visible = (${config['music_logging_enable']} == 1 ? true : false);
|
||||||
|
|
||||||
|
function dataSecondsToHours(data) {
|
||||||
|
$.each(data.series, function (i, series) {
|
||||||
|
series.data = $.map(series.data, function (value) {
|
||||||
|
return value / 60 / 60;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function loadGraphsTab1(time_range, yaxis) {
|
function loadGraphsTab1(time_range, yaxis) {
|
||||||
|
$('#days-selection').show();
|
||||||
|
|
||||||
setGraphFormat(yaxis);
|
setGraphFormat(yaxis);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_date",
|
url: "get_plays_by_date",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var dateArray = [];
|
var dateArray = [];
|
||||||
for (var i = 0; i < data.categories.length; i++) {
|
$.each(data.categories, function (i, day) {
|
||||||
dateArray.push(moment(data.categories[i], 'YYYY-MM-DD').valueOf());
|
dateArray.push(moment(day, 'YYYY-MM-DD').valueOf());
|
||||||
// Highlight the weekend
|
// Highlight the weekend
|
||||||
if ((moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sat') ||
|
if ((moment(day, 'YYYY-MM-DD').format('ddd') == 'Sat') ||
|
||||||
(moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sun')) {
|
(moment(day, 'YYYY-MM-DD').format('ddd') == 'Sun')) {
|
||||||
hc_plays_by_day_options.xAxis.plotBands.push({
|
hc_plays_by_day_options.xAxis.plotBands.push({
|
||||||
from: i-0.5,
|
from: i-0.5,
|
||||||
to: i+0.5,
|
to: i+0.5,
|
||||||
color: 'rgba(80,80,80,0.3)'
|
color: 'rgba(80,80,80,0.3)'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_day_options.yAxis.min = 0;
|
hc_plays_by_day_options.yAxis.min = 0;
|
||||||
hc_plays_by_day_options.xAxis.categories = dateArray;
|
hc_plays_by_day_options.xAxis.categories = dateArray;
|
||||||
hc_plays_by_day_options.series = data.series;
|
hc_plays_by_day_options.series = data.series;
|
||||||
@@ -331,9 +386,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_dayofweek",
|
url: "get_plays_by_dayofweek",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_dayofweek_options.xAxis.categories = data.categories;
|
hc_plays_by_dayofweek_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_dayofweek_options.series = data.series;
|
hc_plays_by_dayofweek_options.series = data.series;
|
||||||
hc_plays_by_dayofweek_options.series[2].visible = music_visible;
|
hc_plays_by_dayofweek_options.series[2].visible = music_visible;
|
||||||
@@ -344,9 +400,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_hourofday",
|
url: "get_plays_by_hourofday",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_hourofday_options.xAxis.categories = data.categories;
|
hc_plays_by_hourofday_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_hourofday_options.series = data.series;
|
hc_plays_by_hourofday_options.series = data.series;
|
||||||
hc_plays_by_hourofday_options.series[2].visible = music_visible;
|
hc_plays_by_hourofday_options.series[2].visible = music_visible;
|
||||||
@@ -357,9 +414,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_top_10_platforms",
|
url: "get_plays_by_top_10_platforms",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_platform_options.xAxis.categories = data.categories;
|
hc_plays_by_platform_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_platform_options.series = data.series;
|
hc_plays_by_platform_options.series = data.series;
|
||||||
hc_plays_by_platform_options.series[2].visible = music_visible;
|
hc_plays_by_platform_options.series[2].visible = music_visible;
|
||||||
@@ -370,9 +428,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_top_10_users",
|
url: "get_plays_by_top_10_users",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_user_options.xAxis.categories = data.categories;
|
hc_plays_by_user_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_user_options.series = data.series;
|
hc_plays_by_user_options.series = data.series;
|
||||||
hc_plays_by_user_options.series[2].visible = music_visible;
|
hc_plays_by_user_options.series[2].visible = music_visible;
|
||||||
@@ -382,27 +441,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadGraphsTab2(time_range, yaxis) {
|
function loadGraphsTab2(time_range, yaxis) {
|
||||||
|
$('#days-selection').show();
|
||||||
|
|
||||||
setGraphFormat(yaxis);
|
setGraphFormat(yaxis);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_stream_type",
|
url: "get_plays_by_stream_type",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var dateArray = [];
|
var dateArray = [];
|
||||||
for (var i = 0; i < data.categories.length; i++) {
|
$.each(data.categories, function (i, day) {
|
||||||
dateArray.push(moment(data.categories[i], 'YYYY-MM-DD').valueOf());
|
dateArray.push(moment(day, 'YYYY-MM-DD').valueOf());
|
||||||
// Highlight the weekend
|
// Highlight the weekend
|
||||||
if ((moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sat') ||
|
if ((moment(day, 'YYYY-MM-DD').format('ddd') == 'Sat') ||
|
||||||
(moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sun')) {
|
(moment(day, 'YYYY-MM-DD').format('ddd') == 'Sun')) {
|
||||||
hc_plays_by_stream_type_options.xAxis.plotBands.push({
|
hc_plays_by_day_options.xAxis.plotBands.push({
|
||||||
from: i-0.5,
|
from: i-0.5,
|
||||||
to: i+0.5,
|
to: i+0.5,
|
||||||
color: 'rgba(80,80,80,0.3)'
|
color: 'rgba(80,80,80,0.3)'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_stream_type_options.yAxis.min = 0;
|
hc_plays_by_stream_type_options.yAxis.min = 0;
|
||||||
hc_plays_by_stream_type_options.xAxis.categories = dateArray;
|
hc_plays_by_stream_type_options.xAxis.categories = dateArray;
|
||||||
hc_plays_by_stream_type_options.series = data.series;
|
hc_plays_by_stream_type_options.series = data.series;
|
||||||
@@ -413,9 +475,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_source_resolution",
|
url: "get_plays_by_source_resolution",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_source_resolution_options.xAxis.categories = data.categories;
|
hc_plays_by_source_resolution_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_source_resolution_options.series = data.series;
|
hc_plays_by_source_resolution_options.series = data.series;
|
||||||
var hc_plays_by_source_resolution = new Highcharts.Chart(hc_plays_by_source_resolution_options);
|
var hc_plays_by_source_resolution = new Highcharts.Chart(hc_plays_by_source_resolution_options);
|
||||||
@@ -425,9 +488,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_by_stream_resolution",
|
url: "get_plays_by_stream_resolution",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_stream_resolution_options.xAxis.categories = data.categories;
|
hc_plays_by_stream_resolution_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_stream_resolution_options.series = data.series;
|
hc_plays_by_stream_resolution_options.series = data.series;
|
||||||
var hc_plays_by_stream_resolution = new Highcharts.Chart(hc_plays_by_stream_resolution_options);
|
var hc_plays_by_stream_resolution = new Highcharts.Chart(hc_plays_by_stream_resolution_options);
|
||||||
@@ -437,9 +501,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_stream_type_by_top_10_platforms",
|
url: "get_stream_type_by_top_10_platforms",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_platform_by_stream_type_options.xAxis.categories = data.categories;
|
hc_plays_by_platform_by_stream_type_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_platform_by_stream_type_options.series = data.series;
|
hc_plays_by_platform_by_stream_type_options.series = data.series;
|
||||||
var hc_plays_by_platform_by_stream_type = new Highcharts.Chart(hc_plays_by_platform_by_stream_type_options);
|
var hc_plays_by_platform_by_stream_type = new Highcharts.Chart(hc_plays_by_platform_by_stream_type_options);
|
||||||
@@ -449,9 +514,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_stream_type_by_top_10_users",
|
url: "get_stream_type_by_top_10_users",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { time_range: time_range, y_axis: yaxis },
|
data: { time_range: time_range, y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_user_by_stream_type_options.xAxis.categories = data.categories;
|
hc_plays_by_user_by_stream_type_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_user_by_stream_type_options.series = data.series;
|
hc_plays_by_user_by_stream_type_options.series = data.series;
|
||||||
var hc_plays_by_user_by_stream_type = new Highcharts.Chart(hc_plays_by_user_by_stream_type_options);
|
var hc_plays_by_user_by_stream_type = new Highcharts.Chart(hc_plays_by_user_by_stream_type_options);
|
||||||
@@ -460,14 +526,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadGraphsTab3(yaxis) {
|
function loadGraphsTab3(yaxis) {
|
||||||
|
$('#days-selection').hide();
|
||||||
|
|
||||||
setGraphFormat(yaxis);
|
setGraphFormat(yaxis);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "get_plays_per_month",
|
url: "get_plays_per_month",
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: { y_axis: yaxis },
|
data: { y_axis: yaxis, user_id: selected_user_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
if (yaxis === 'duration') { dataSecondsToHours(data); }
|
||||||
hc_plays_by_month_options.yAxis.min = 0;
|
hc_plays_by_month_options.yAxis.min = 0;
|
||||||
hc_plays_by_month_options.xAxis.categories = data.categories;
|
hc_plays_by_month_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_month_options.series = data.series;
|
hc_plays_by_month_options.series = data.series;
|
||||||
@@ -535,6 +604,14 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// User changed
|
||||||
|
$('#graph-user').on('change', function() {
|
||||||
|
selected_user_id = $(this).val() || null;
|
||||||
|
if (current_tab == '#tabs-1') { loadGraphsTab1(current_range, yaxis); }
|
||||||
|
if (current_tab == '#tabs-2') { loadGraphsTab2(current_range, yaxis); }
|
||||||
|
if (current_tab == '#tabs-3') { loadGraphsTab3(yaxis); }
|
||||||
|
});
|
||||||
|
|
||||||
// Y-axis changed
|
// Y-axis changed
|
||||||
$('#yaxis-selection').on('change', function() {
|
$('#yaxis-selection').on('change', function() {
|
||||||
yaxis = $('input[name=yaxis-options]:checked', '#yaxis-selection').val();
|
yaxis = $('input[name=yaxis-options]:checked', '#yaxis-selection').val();
|
||||||
@@ -553,7 +630,7 @@
|
|||||||
yaxis_format = function() { return this.value; };
|
yaxis_format = function() { return this.value; };
|
||||||
tooltip_format = function() {
|
tooltip_format = function() {
|
||||||
if (moment(this.x, 'X').isValid() && (this.x > 946684800)) {
|
if (moment(this.x, 'X').isValid() && (this.x > 946684800)) {
|
||||||
var s = '<b>'+ moment(this.x).format("ddd MMM D") +'</b>';
|
var s = '<b>'+ moment(this.x).format('ddd MMM D') +'</b>';
|
||||||
} else {
|
} else {
|
||||||
var s = '<b>'+ this.x +'</b>';
|
var s = '<b>'+ this.x +'</b>';
|
||||||
}
|
}
|
||||||
@@ -574,32 +651,31 @@
|
|||||||
stack_labels_format = function() {
|
stack_labels_format = function() {
|
||||||
return this.total;
|
return this.total;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.yaxis-text').html('Play count');
|
$('.yaxis-text').html('Play count');
|
||||||
} else {
|
} else {
|
||||||
yaxis_format = function() { return moment.duration(this.value, 'seconds').format("m [mins]"); };
|
yaxis_format = function() { return moment.duration(this.value, 'hours').format('H [h] m [m]'); };
|
||||||
tooltip_format = function() {
|
tooltip_format = function() {
|
||||||
if (moment(this.x, 'X').isValid() && (this.x > 946684800)) {
|
if (moment(this.x, 'X').isValid() && (this.x > 946684800)) {
|
||||||
var s = '<b>'+ moment(this.x).format("ddd MMM D") +'</b>';
|
var s = '<b>'+ moment(this.x).format('ddd MMM D') +'</b>';
|
||||||
} else {
|
} else {
|
||||||
var s = '<b>'+ this.x +'</b>';
|
var s = '<b>'+ this.x +'</b>';
|
||||||
}
|
}
|
||||||
if (this.points.length > 1) {
|
if (this.points.length > 1) {
|
||||||
var total = 0;
|
var total = 0;
|
||||||
$.each(this.points, function(i, point) {
|
$.each(this.points, function(i, point) {
|
||||||
s += '<br/>'+point.series.name+': '+moment.duration(point.y, 'seconds').format('D [days] H [hrs] m [mins]');
|
s += '<br/>'+point.series.name+': '+moment.duration(point.y, 'hours').format('D [days] H [hrs] m [mins]');
|
||||||
total += point.y;
|
total += point.y;
|
||||||
});
|
});
|
||||||
s += '<br/><b>Total: '+moment.duration(total, 'seconds').format('D [days] H [hrs] m [mins]')+'</b>';
|
s += '<br/><b>Total: '+moment.duration(total, 'hours').format('D [days] H [hrs] m [mins]')+'</b>';
|
||||||
} else {
|
} else {
|
||||||
$.each(this.points, function(i, point) {
|
$.each(this.points, function(i, point) {
|
||||||
s += '<br/>'+point.series.name+': '+moment.duration(point.y, 'seconds').format('D [days] H [hrs] m [mins]');
|
s += '<br/>'+point.series.name+': '+moment.duration(point.y, 'hours').format('D [days] H [hrs] m [mins]');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
stack_labels_format = function() {
|
stack_labels_format = function() {
|
||||||
var s = moment.duration(this.total, 'seconds').format("H [hrs] m [mins]");
|
var s = moment.duration(this.total, 'hours').format('H [h] m [m]');
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
$('.yaxis-text').html('Play duration');
|
$('.yaxis-text').html('Play duration');
|
||||||
|
|||||||
@@ -1,28 +1,55 @@
|
|||||||
<%inherit file="base.html"/>
|
<%inherit file="base.html"/>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.bootstrap.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.bootstrap.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.colVis.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.colVis.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/plexpy-dataTables.css">
|
<link rel="stylesheet" href="${http_root}css/plexpy-dataTables.css">
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
|
|
||||||
<div class='container-fluid'>
|
<div class='container-fluid'>
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span><i class="fa fa-history"></i> History</span>
|
<span><i class="fa fa-history"></i> History</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<div class="colvis-button-bar hidden-xs"></div>
|
% if _session['user_group'] == 'admin':
|
||||||
|
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||||
|
<div class="btn-group">
|
||||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||||
<i class="fa fa-trash-o"></i> Delete mode
|
<i class="fa fa-trash-o"></i> Delete mode
|
||||||
</button>
|
</button> 
|
||||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
</div>
|
||||||
|
% endif
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<div class="btn-group" id="user-selection">
|
||||||
|
<label>
|
||||||
|
<select name="history-user" id="history-user" class="btn" style="color: inherit;">
|
||||||
|
<option value="">All Users</option>
|
||||||
|
<option disabled>────────────</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
<div class="btn-group" data-toggle="buttons" id="media_type-selection">
|
||||||
|
<label class="btn btn-dark active">
|
||||||
|
<input type="radio" name="media_type-filter" id="history-all" value="" autocomplete="off"> All
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-dark">
|
||||||
|
<input type="radio" name="media_type-filter" id="history-movies" value="movie" autocomplete="off"> Movies
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-dark">
|
||||||
|
<input type="radio" name="media_type-filter" id="history-tv_shows" value="episode" autocomplete="off"> TV Shows
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-dark">
|
||||||
|
<input type="radio" name="media_type-filter" id="history-music" value="track" autocomplete="off"> Music
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="btn-group colvis-button-bar"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class="table-card-back">
|
||||||
<table class="display" id="history_table" width="100%">
|
<table class="display history_table" id="history_table" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="delete_row">Delete</th>
|
<th align="left" id="delete_row">Delete</th>
|
||||||
@@ -46,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
|
<div class="modal fade" id="confirm-modal-delete" tabindex="-1" role="dialog" aria-labelledby="confirm-modal-delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -69,22 +96,40 @@
|
|||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
<script src="${http_root}js/jquery.dataTables.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.colVis.js"></script>
|
<script src="${http_root}js/dataTables.colVis.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.min.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.pagination.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.pagination.js"></script>
|
||||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
<script src="${http_root}js/tables/history_table.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
function loadHistoryTable(media_type) {
|
// Load user ids and names (for the selector)
|
||||||
|
$.ajax({
|
||||||
|
url: 'get_user_names',
|
||||||
|
type: 'get',
|
||||||
|
dataType: "json",
|
||||||
|
success: function (data) {
|
||||||
|
var select = $('#history-user');
|
||||||
|
data.sort(function (a, b) {
|
||||||
|
return a.friendly_name.localeCompare(b.friendly_name);
|
||||||
|
});
|
||||||
|
data.forEach(function (item) {
|
||||||
|
select.append('<option value="' + item.user_id + '">' +
|
||||||
|
item.friendly_name + '</option>');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function loadHistoryTable(media_type, selected_user_id) {
|
||||||
history_table_options.ajax = {
|
history_table_options.ajax = {
|
||||||
url: 'get_history',
|
url: 'get_history',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: function (d) {
|
data: function (d) {
|
||||||
return {
|
return {
|
||||||
json_data: JSON.stringify(d),
|
json_data: JSON.stringify(d),
|
||||||
media_type: media_type
|
media_type: media_type,
|
||||||
|
user_id: selected_user_id
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,21 +139,6 @@
|
|||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table', history_table);
|
||||||
|
|
||||||
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
|
|
||||||
<label class="btn btn-dark active"> \
|
|
||||||
<input type="radio" name="media_type-filter" id="history-all" value="all" autocomplete="off"> All \
|
|
||||||
</label> \
|
|
||||||
<label class="btn btn-dark"> \
|
|
||||||
<input type="radio" name="media_type-filter" id="history-movies" value="movie" autocomplete="off"> Movies \
|
|
||||||
</label> \
|
|
||||||
<label class="btn btn-dark"> \
|
|
||||||
<input type="radio" name="media_type-filter" id="history-tv_shows" value="episode" autocomplete="off"> TV Shows \
|
|
||||||
</label> \
|
|
||||||
<label class="btn btn-dark"> \
|
|
||||||
<input type="radio" name="media_type-filter" id="history-music" value="track" autocomplete="off"> Music \
|
|
||||||
</label> \
|
|
||||||
</div>');
|
|
||||||
|
|
||||||
$('#media_type-selection').on('change', function () {
|
$('#media_type-selection').on('change', function () {
|
||||||
$('#media_type-selection > label').removeClass('active');
|
$('#media_type-selection > label').removeClass('active');
|
||||||
selected_filter = $('input[name=media_type-filter]:checked', '#media_type-selection');
|
selected_filter = $('input[name=media_type-filter]:checked', '#media_type-selection');
|
||||||
@@ -116,19 +146,26 @@
|
|||||||
media_type = $(selected_filter).val();
|
media_type = $(selected_filter).val();
|
||||||
history_table.draw();
|
history_table.draw();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#history-user').on('change', function () {
|
||||||
|
selected_user_id = $(this).val() || null;
|
||||||
|
history_table.draw();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var media_type = 'all';
|
var media_type = null;
|
||||||
loadHistoryTable(media_type);
|
var selected_user_id = "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||||
|
loadHistoryTable(media_type, selected_user_id);
|
||||||
|
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
$('#row-edit-mode').on('click', function() {
|
$('#row-edit-mode').on('click', function() {
|
||||||
$('#row-edit-mode-alert').fadeIn(200);
|
$('#row-edit-mode-alert').fadeIn(200);
|
||||||
|
|
||||||
if ($(this).hasClass('active')) {
|
if ($(this).hasClass('active')) {
|
||||||
if (history_to_delete.length > 0) {
|
if (history_to_delete.length > 0) {
|
||||||
$('#deleteCount').text(history_to_delete.length);
|
$('#deleteCount').text(history_to_delete.length);
|
||||||
$('#confirm-modal').modal();
|
$('#confirm-modal-delete').modal();
|
||||||
$('#confirm-modal').one('click', '#confirm-delete', function () {
|
$('#confirm-modal-delete').one('click', '#confirm-delete', function () {
|
||||||
for (var i = 0; i < history_to_delete.length; i++) {
|
for (var i = 0; i < history_to_delete.length; i++) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'delete_history_rows',
|
url: 'delete_history_rows',
|
||||||
@@ -157,6 +194,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
% endif
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</%def>
|
</%def>
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||||
<h4 class="modal-title" id="myModalLabel">
|
<h4 class="modal-title" id="myModalLabel">
|
||||||
<strong><span id="modal_header_ip_address">
|
<strong><span id="modal_header_ip_address">
|
||||||
<i class="fa fa-history"></i> History for <span id="date-header">${data}</span>
|
<i class="fa fa-history"></i> History for <span id="date-header">${data['start_date']}</span>
|
||||||
</span></strong>
|
</span></strong>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="modal-text">
|
<div class="modal-body" id="modal-text">
|
||||||
<table class="display" id="history_table" width="100%">
|
<table class="display history_table" id="history_table_modal" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="started">Started</th>
|
<th align="left" id="started">Started</th>
|
||||||
@@ -29,10 +29,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="info-modal" tabindex="-1" role="dialog" aria-labelledby="info-modal">
|
<div class="modal fade" id="info-modal" tabindex="-1" role="dialog" aria-labelledby="info-modal">
|
||||||
</div>
|
</div>
|
||||||
<script src="interfaces/default/js/tables/history_table_modal.js"></script>
|
<script src="${http_root}js/tables/history_table_modal.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#date-header').html(moment('${data}','YYYY-MM-DD').format('ddd MMM Do YYYY'));
|
$('#date-header').html(moment('${data["start_date"]}','YYYY-MM-DD').format('ddd MMM Do YYYY'));
|
||||||
history_table_modal_options.ajax = {
|
history_table_modal_options.ajax = {
|
||||||
url: 'get_history',
|
url: 'get_history',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
@@ -40,14 +40,17 @@
|
|||||||
return {
|
return {
|
||||||
json_data: JSON.stringify(d),
|
json_data: JSON.stringify(d),
|
||||||
grouping: false,
|
grouping: false,
|
||||||
start_date: '${data}'
|
user_id: "${data['user_id']}",
|
||||||
|
start_date: "${data['start_date']}",
|
||||||
|
media_type: "${data.get('media_type')}",
|
||||||
|
transcode_decision: "${data.get('transcode_decision')}"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
history_table = $('#history_table').DataTable(history_table_modal_options);
|
history_table = $('#history_table_modal').DataTable(history_table_modal_options);
|
||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table_modal', history_table);
|
||||||
|
|
||||||
// Move #info-modal to parent container
|
// Move #info-modal to parent container
|
||||||
if (!($('#history-modal').next().is('#info-modal'))) {
|
if (!($('#history-modal').next().is('#info-modal'))) {
|
||||||
|
|||||||
@@ -82,9 +82,13 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-playcount">
|
<div class="home-platforms-instance-playcount">
|
||||||
<h4>
|
<h4>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
${top_stat['rows'][0]['title']}
|
${top_stat['rows'][0]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['title']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
% if top_stat['stat_type'] == 'total_plays':
|
% if top_stat['stat_type'] == 'total_plays':
|
||||||
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
||||||
@@ -94,17 +98,26 @@ DOCUMENTATION :: END
|
|||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
% if top_stat['rows'][0]['grandparent_thumb']:
|
% if top_stat['rows'][0]['grandparent_thumb']:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-poster">
|
||||||
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -116,9 +129,13 @@ DOCUMENTATION :: END
|
|||||||
<div class="home-platforms-instance-list-info">
|
<div class="home-platforms-instance-list-info">
|
||||||
<div class="home-platforms-instance-list-name">
|
<div class="home-platforms-instance-list-name">
|
||||||
<h5>
|
<h5>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
${top_stat['rows'][loop.index]['title']}
|
${top_stat['rows'][loop.index]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['title']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-playcount">
|
<div class="home-platforms-instance-list-playcount">
|
||||||
@@ -130,17 +147,26 @@ DOCUMENTATION :: END
|
|||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster2">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-list-poster">
|
||||||
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -162,25 +188,38 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-playcount">
|
<div class="home-platforms-instance-playcount">
|
||||||
<h4>
|
<h4>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
${top_stat['rows'][0]['title']}
|
${top_stat['rows'][0]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['title']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
<h3>${top_stat['rows'][0]['users_watched']}</h3>
|
<h3>${top_stat['rows'][0]['users_watched']}</h3>
|
||||||
<p> users</p>
|
<p> users</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
% if top_stat['rows'][0]['grandparent_thumb'] != '':
|
% if top_stat['rows'][0]['grandparent_thumb'] != '':
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-poster">
|
||||||
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -192,9 +231,13 @@ DOCUMENTATION :: END
|
|||||||
<div class="home-platforms-instance-list-info">
|
<div class="home-platforms-instance-list-info">
|
||||||
<div class="home-platforms-instance-list-name">
|
<div class="home-platforms-instance-list-name">
|
||||||
<h5>
|
<h5>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
${top_stat['rows'][loop.index]['title']}
|
${top_stat['rows'][loop.index]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['title']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-playcount">
|
<div class="home-platforms-instance-list-playcount">
|
||||||
@@ -202,17 +245,26 @@ DOCUMENTATION :: END
|
|||||||
<p> users</p>
|
<p> users</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster2">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-list-poster">
|
||||||
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -234,9 +286,13 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-playcount">
|
<div class="home-platforms-instance-playcount">
|
||||||
<h4>
|
<h4>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
${top_stat['rows'][0]['title']}
|
${top_stat['rows'][0]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['title']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
% if top_stat['stat_type'] == 'total_plays':
|
% if top_stat['stat_type'] == 'total_plays':
|
||||||
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
||||||
@@ -246,17 +302,26 @@ DOCUMENTATION :: END
|
|||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
% if top_stat['rows'][0]['thumb']:
|
% if top_stat['rows'][0]['thumb']:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-poster">
|
||||||
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -268,9 +333,13 @@ DOCUMENTATION :: END
|
|||||||
<div class="home-platforms-instance-list-info">
|
<div class="home-platforms-instance-list-info">
|
||||||
<div class="home-platforms-instance-list-name">
|
<div class="home-platforms-instance-list-name">
|
||||||
<h5>
|
<h5>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
${top_stat['rows'][loop.index]['title']}
|
${top_stat['rows'][loop.index]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['title']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-playcount">
|
<div class="home-platforms-instance-list-playcount">
|
||||||
@@ -282,17 +351,26 @@ DOCUMENTATION :: END
|
|||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
% if top_stat['rows'][loop.index]['thumb']:
|
% if top_stat['rows'][loop.index]['thumb']:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster2">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-list-poster">
|
||||||
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -314,25 +392,38 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-playcount">
|
<div class="home-platforms-instance-playcount">
|
||||||
<h4>
|
<h4>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
${top_stat['rows'][0]['title']}
|
${top_stat['rows'][0]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['title']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
<h3>${top_stat['rows'][0]['users_watched']}</h3>
|
<h3>${top_stat['rows'][0]['users_watched']}</h3>
|
||||||
<p> users</p>
|
<p> users</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
% if top_stat['rows'][0]['thumb']:
|
% if top_stat['rows'][0]['thumb']:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-poster">
|
||||||
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -344,9 +435,13 @@ DOCUMENTATION :: END
|
|||||||
<div class="home-platforms-instance-list-info">
|
<div class="home-platforms-instance-list-info">
|
||||||
<div class="home-platforms-instance-list-name">
|
<div class="home-platforms-instance-list-name">
|
||||||
<h5>
|
<h5>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
${top_stat['rows'][loop.index]['title']}
|
${top_stat['rows'][loop.index]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['title']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-playcount">
|
<div class="home-platforms-instance-list-playcount">
|
||||||
@@ -354,17 +449,26 @@ DOCUMENTATION :: END
|
|||||||
<p> users</p>
|
<p> users</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
% if top_stat['rows'][loop.index]['thumb']:
|
% if top_stat['rows'][loop.index]['thumb']:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster2">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-list-poster">
|
||||||
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -386,9 +490,13 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-playcount">
|
<div class="home-platforms-instance-playcount">
|
||||||
<h4>
|
<h4>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
${top_stat['rows'][0]['title']}
|
${top_stat['rows'][0]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['title']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
% if top_stat['stat_type'] == 'total_plays':
|
% if top_stat['stat_type'] == 'total_plays':
|
||||||
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
||||||
@@ -398,17 +506,26 @@ DOCUMENTATION :: END
|
|||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
% if top_stat['rows'][0]['grandparent_thumb']:
|
% if top_stat['rows'][0]['grandparent_thumb']:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-cover">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
|
<div class="home-platforms-cover-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-cover">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-cover">
|
||||||
|
<div class="home-platforms-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -420,9 +537,13 @@ DOCUMENTATION :: END
|
|||||||
<div class="home-platforms-instance-list-info">
|
<div class="home-platforms-instance-list-info">
|
||||||
<div class="home-platforms-instance-list-name">
|
<div class="home-platforms-instance-list-name">
|
||||||
<h5>
|
<h5>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
${top_stat['rows'][loop.index]['title']}
|
${top_stat['rows'][loop.index]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['title']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-playcount">
|
<div class="home-platforms-instance-list-playcount">
|
||||||
@@ -434,17 +555,26 @@ DOCUMENTATION :: END
|
|||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-cover">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
|
<div class="home-platforms-list-cover-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster2">
|
<div class="home-platforms-instance-list-cover">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-list-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-list-cover">
|
||||||
|
<div class="home-platforms-list-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -466,25 +596,38 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-playcount">
|
<div class="home-platforms-instance-playcount">
|
||||||
<h4>
|
<h4>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
${top_stat['rows'][0]['title']}
|
${top_stat['rows'][0]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['title']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
<h3>${top_stat['rows'][0]['users_watched']}</h3>
|
<h3>${top_stat['rows'][0]['users_watched']}</h3>
|
||||||
<p> users</p>
|
<p> users</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
% if top_stat['rows'][0]['grandparent_thumb'] != '':
|
% if top_stat['rows'][0]['grandparent_thumb'] != '':
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-cover">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
|
<div class="home-platforms-cover-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-cover">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-cover">
|
||||||
|
<div class="home-platforms-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -496,9 +639,13 @@ DOCUMENTATION :: END
|
|||||||
<div class="home-platforms-instance-list-info">
|
<div class="home-platforms-instance-list-info">
|
||||||
<div class="home-platforms-instance-list-name">
|
<div class="home-platforms-instance-list-name">
|
||||||
<h5>
|
<h5>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
${top_stat['rows'][loop.index]['title']}
|
${top_stat['rows'][loop.index]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['title']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-playcount">
|
<div class="home-platforms-instance-list-playcount">
|
||||||
@@ -506,17 +653,26 @@ DOCUMENTATION :: END
|
|||||||
<p> users</p>
|
<p> users</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
% if top_stat['rows'][loop.index]['grandparent_thumb']:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-cover">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
|
<div class="home-platforms-list-cover-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster2">
|
<div class="home-platforms-instance-list-cover">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-list-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-list-cover">
|
||||||
|
<div class="home-platforms-list-cover-face" style="background-image: url(${http_root}images/cover.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -540,11 +696,11 @@ DOCUMENTATION :: END
|
|||||||
<h4>
|
<h4>
|
||||||
% if top_stat['rows'][0]['user_id']:
|
% if top_stat['rows'][0]['user_id']:
|
||||||
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
|
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
|
||||||
% else:
|
|
||||||
<a href="user?user=${top_stat['rows'][0]['user']}" title="${top_stat['rows'][0]['friendly_name']}">
|
|
||||||
% endif
|
|
||||||
${top_stat['rows'][0]['friendly_name']}
|
${top_stat['rows'][0]['friendly_name']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['friendly_name']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
% if top_stat['stat_type'] == 'total_plays':
|
% if top_stat['stat_type'] == 'total_plays':
|
||||||
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
<h3>${top_stat['rows'][0]['total_plays']}</h3>
|
||||||
@@ -556,8 +712,6 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
% if top_stat['rows'][0]['user_id']:
|
% if top_stat['rows'][0]['user_id']:
|
||||||
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
|
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
|
||||||
% else:
|
|
||||||
<a href="user?user=${top_stat['rows'][0]['user']}" title="${top_stat['rows'][0]['friendly_name']}">
|
|
||||||
% endif
|
% endif
|
||||||
% if top_stat['rows'][0]['user_thumb'] != '':
|
% if top_stat['rows'][0]['user_thumb'] != '':
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
@@ -565,10 +719,12 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-instance-oval" style="background-image: url(interfaces/default/images/gravatar-default.png);"></div>
|
<div class="home-platforms-instance-oval" style="background-image: url(${http_root}images/gravatar-default.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
|
% if top_stat['rows'][0]['user_id']:
|
||||||
</a>
|
</a>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -582,11 +738,11 @@ DOCUMENTATION :: END
|
|||||||
<h5>
|
<h5>
|
||||||
% if top_stat['rows'][loop.index]['user_id']:
|
% if top_stat['rows'][loop.index]['user_id']:
|
||||||
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
||||||
% else:
|
|
||||||
<a href="user?user=${top_stat['rows'][loop.index]['user']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
|
||||||
% endif
|
|
||||||
${top_stat['rows'][loop.index]['friendly_name']}
|
${top_stat['rows'][loop.index]['friendly_name']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['friendly_name']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-playcount">
|
<div class="home-platforms-instance-list-playcount">
|
||||||
@@ -600,8 +756,6 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
% if top_stat['rows'][loop.index]['user_id']:
|
% if top_stat['rows'][loop.index]['user_id']:
|
||||||
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
||||||
% else:
|
|
||||||
<a href="user?user=${top_stat['rows'][loop.index]['user']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
|
||||||
% endif
|
% endif
|
||||||
% if top_stat['rows'][loop.index]['user_thumb'] != '':
|
% if top_stat['rows'][loop.index]['user_thumb'] != '':
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
@@ -609,10 +763,12 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-instance-list-oval" style="background-image: url(interfaces/default/images/gravatar-default.png);"></div>
|
<div class="home-platforms-instance-list-oval" style="background-image: url(${http_root}images/gravatar-default.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
|
% if top_stat['rows'][loop.index]['user_id']:
|
||||||
</a>
|
</a>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -644,7 +800,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div id="platform-stat" class="home-platforms-instance-poster" title="${top_stat['rows'][0]['platform_type']}">
|
<div id="platform-stat" class="home-platforms-instance-poster" title="${top_stat['rows'][0]['platform_type']}">
|
||||||
<script>
|
<script>
|
||||||
$("#platform-stat").html("<div class='home-platforms-instance-box' style='background-image: url(" + getPlatformImagePath('${top_stat['rows'][0]['platform_type']}') + ");'>");
|
$("#platform-stat").html("<div class='home-platforms-instance-box' style='background-image: url(" + getPlatformImagePath("${top_stat['rows'][0]['platform_type']}") + ");'>");
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
@@ -672,7 +828,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-poster" id="home-platforms-instance-poster-${loop.index + 1}" title="${top_stat['rows'][loop.index]['platform_type']}">
|
<div class="home-platforms-instance-poster" id="home-platforms-instance-poster-${loop.index + 1}" title="${top_stat['rows'][loop.index]['platform_type']}">
|
||||||
<script>
|
<script>
|
||||||
$("#home-platforms-instance-poster-${loop.index + 1}").html("<div class='home-platforms-instance-list-box' style='background-image: url(" + getPlatformImagePath('${top_stat['rows'][loop.index]['platform_type']}') + ");'>");
|
$("#home-platforms-instance-poster-${loop.index + 1}").html("<div class='home-platforms-instance-list-box' style='background-image: url(" + getPlatformImagePath("${top_stat['rows'][loop.index]['platform_type']}") + ");'>");
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
@@ -692,22 +848,26 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<div class="home-platforms-instance-info">
|
<div class="home-platforms-instance-info">
|
||||||
<div class="home-platforms-instance-name">
|
<div class="home-platforms-instance-name">
|
||||||
<h4>Last Played</h4>
|
<h4>Last Watched</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-last-user">
|
<div class="home-platforms-instance-last-user">
|
||||||
<h4>
|
<h4>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?source=history&rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?source=history&rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
${top_stat['rows'][0]['title']}
|
${top_stat['rows'][0]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['title']}
|
||||||
|
% endif
|
||||||
</h4>
|
</h4>
|
||||||
<h5>
|
<h5>
|
||||||
% if top_stat['rows'][0]['user_id']:
|
% if top_stat['rows'][0]['user_id']:
|
||||||
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
|
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
|
||||||
% else:
|
|
||||||
<a href="user?user=${top_stat['rows'][0]['user']}" title="${top_stat['rows'][0]['friendly_name']}">
|
|
||||||
% endif
|
|
||||||
${top_stat['rows'][0]['friendly_name']}
|
${top_stat['rows'][0]['friendly_name']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][0]['friendly_name']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
<span id="last-watch-stat">
|
<span id="last-watch-stat">
|
||||||
@@ -718,17 +878,26 @@ DOCUMENTATION :: END
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][0]['rating_key']:
|
||||||
<a href="info?source=history&rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
<a href="info?source=history&rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
|
||||||
% if top_stat['rows'][0]['thumb']:
|
% if top_stat['rows'][0]['thumb']:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-poster">
|
||||||
|
<div class="home-platforms-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -740,20 +909,24 @@ DOCUMENTATION :: END
|
|||||||
<div class="home-platforms-instance-list-info">
|
<div class="home-platforms-instance-list-info">
|
||||||
<div class="home-platforms-instance-list-name">
|
<div class="home-platforms-instance-list-name">
|
||||||
<h5>
|
<h5>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?source=history&rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?source=history&rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
${top_stat['rows'][loop.index]['title']}
|
${top_stat['rows'][loop.index]['title']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['title']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-list-last-user">
|
<div class="home-platforms-instance-list-last-user">
|
||||||
<h5>
|
<h5>
|
||||||
% if top_stat['rows'][loop.index]['user_id']:
|
% if top_stat['rows'][loop.index]['user_id']:
|
||||||
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
||||||
% else:
|
|
||||||
<a href="user?user=${top_stat['rows'][loop.index]['user']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
|
|
||||||
% endif
|
|
||||||
${top_stat['rows'][loop.index]['friendly_name']}
|
${top_stat['rows'][loop.index]['friendly_name']}
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
${top_stat['rows'][loop.index]['friendly_name']}
|
||||||
|
% endif
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
<span id="home-platforms-instance-list-last-watch-${loop.index + 1}">
|
<span id="home-platforms-instance-list-last-watch-${loop.index + 1}">
|
||||||
@@ -764,17 +937,26 @@ DOCUMENTATION :: END
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if top_stat['rows'][loop.index]['rating_key']:
|
||||||
<a href="info?source=history&rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
<a href="info?source=history&rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
|
||||||
% if top_stat['rows'][loop.index]['thumb']:
|
% if top_stat['rows'][loop.index]['thumb']:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-list-poster">
|
<div class="home-platforms-instance-list-poster">
|
||||||
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
|
% else:
|
||||||
|
<div class="home-platforms-instance-list-poster">
|
||||||
|
<div class="home-platforms-list-poster-face" style="background-image: url(${http_root}images/poster.png);"></div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="home-platforms-instance-list-number">
|
<div class="home-platforms-instance-list-number">
|
||||||
<h4>${loop.index + 1}</h4>
|
<h4>${loop.index + 1}</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -807,7 +989,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-instance-box" style="background-image: url(interfaces/default/images/home-stat_most-concurrent.png);"></div>
|
<div class="home-platforms-instance-box" style="background-image: url(${http_root}images/home-stat_most-concurrent.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
% if len(top_stat['rows']) > 1:
|
% if len(top_stat['rows']) > 1:
|
||||||
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
|
||||||
@@ -839,7 +1021,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-instance-list-box" style="background-image: url(interfaces/default/images/home-stat_most-concurrent.png);"></div>
|
<div class="home-platforms-instance-list-box" style="background-image: url(${http_root}images/home-stat_most-concurrent.png);"></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
% endif
|
% endif
|
||||||
|
|||||||
BIN
data/interfaces/default/images/art.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 391 KiB After Width: | Height: | Size: 349 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 5.2 MiB After Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 5.2 MiB After Width: | Height: | Size: 4.5 MiB |
|
Before Width: | Height: | Size: 6.2 MiB After Width: | Height: | Size: 4.7 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 6.2 MiB After Width: | Height: | Size: 4.6 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 977 KiB After Width: | Height: | Size: 788 KiB |
|
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 457 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 461 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 455 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 458 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 456 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 460 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 466 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 457 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 463 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 458 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 464 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 454 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 456 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 456 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 461 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -5,61 +5,86 @@
|
|||||||
|
|
||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
% for section in config['home_sections']:
|
||||||
|
% if section == 'current_activity':
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="padded-header" id="current-activity-header">
|
<div class="padded-header" id="current-activity-header">
|
||||||
<h3>Activity</h3>
|
<h3>Activity</h3>
|
||||||
</div>
|
</div>
|
||||||
<div id="currentActivity">
|
<div id="currentActivity">
|
||||||
<div class="text-muted"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>
|
<div class="text-muted" id="dashboard-checking-activity"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>
|
||||||
<br>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% if config['home_stats_cards']:
|
% elif section == 'watch_stats':
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="padded-header">
|
<div class="padded-header">
|
||||||
<h3>Watch Statistics <small>Last ${config['home_stats_length']} days</small></h3>
|
<h3>Watch Statistics <small>Last ${config['home_stats_length']} days</small></h3>
|
||||||
</div>
|
</div>
|
||||||
<div id="home-stats" class="home-platforms">
|
<div id="home-stats" class="home-platforms">
|
||||||
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading stats...</div>
|
<div class="text-muted"><i class="fa fa-refresh fa-spin"></i> Loading stats...</div>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% elif section == 'library_stats':
|
||||||
% if config['home_library_cards']:
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="padded-header" id="library-statistics-header">
|
<div class="padded-header" id="library-statistics-header">
|
||||||
<h3>Library Statistics <small>${config['pms_name']}</small></h3>
|
<h3>Library Statistics <small>${config['pms_name']}</small></h3>
|
||||||
</div>
|
</div>
|
||||||
<div id="library-stats" class="library-platforms">
|
<div id="library-stats" class="library-platforms">
|
||||||
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading stats...</div>
|
<div class="text-muted"><i class="fa fa-refresh fa-spin"></i> Loading stats...</div>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
% elif section == 'recently_added':
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="padded-header">
|
||||||
|
<ul class="nav nav-header nav-dashboard pull-right" style="margin-top: -12px;">
|
||||||
|
<li>
|
||||||
|
<a href="#" id="recently-added-page-left" class="paginate btn-gray disabled" data-id="+1"><i class="fa fa-lg fa-chevron-left"></i></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" id="recently-added-page-right" class="paginate btn-gray disabled" data-id="-1"><i class="fa fa-lg fa-chevron-right"></i></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Recently Added <small>
|
||||||
|
<a href="#" class="toggle-recently-added-type btn-gray disabled" id="toggle-recently-added-movie" data-type="movie">Movies</a>
|
||||||
|
<a href="#" class="toggle-recently-added-type btn-gray disabled" id="toggle-recently-added-season" data-type="season">TV Shows</a>
|
||||||
|
<a href="#" class="toggle-recently-added-type btn-gray disabled" id="toggle-recently-added-album" data-type="album">Music</a></small></h3>
|
||||||
|
</div>
|
||||||
|
<div id="recentlyAdded" style="margin-right: -15px;">
|
||||||
|
<div class="text-muted"><i class="fa fa-refresh fa-spin"></i> Looking for new items...</div>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
<div class='row'>
|
% endfor
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="padded-header">
|
|
||||||
<h3>Recently Added</h3>
|
|
||||||
</div>
|
|
||||||
<div id='recentlyAdded'>
|
|
||||||
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Looking for new items...</div>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
|
<script>
|
||||||
|
var date_format = 'YYYY-MM-DD';
|
||||||
|
var time_format = 'hh:mm a';
|
||||||
|
$.ajax({
|
||||||
|
url: 'get_date_formats',
|
||||||
|
type: 'GET',
|
||||||
|
success: function (data) {
|
||||||
|
date_format = data.date_format;
|
||||||
|
time_format = data.time_format;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
% if 'current_activity' in config['home_sections']:
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function currentActivityHeader() {
|
function currentActivityHeader() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_current_activity_header',
|
url: 'get_current_activity_header',
|
||||||
@@ -71,24 +96,192 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
currentActivityHeader();
|
currentActivityHeader();
|
||||||
setInterval(currentActivityHeader, 15000);
|
|
||||||
|
|
||||||
function currentActivity() {
|
function getCurrentActivity() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_current_activity',
|
url: 'get_activity',
|
||||||
|
type: 'GET',
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.log(status + ': ' + error);
|
||||||
|
},
|
||||||
complete: function (xhr, status) {
|
complete: function (xhr, status) {
|
||||||
$("#currentActivity").html(xhr.responseText);
|
$('#dashboard-checking-activity').remove();
|
||||||
|
|
||||||
|
var current_activity;
|
||||||
|
try {
|
||||||
|
current_activity = $.parseJSON(xhr.responseText);
|
||||||
|
} catch (e) {
|
||||||
|
console.log(status + ': ' + e);
|
||||||
|
current_activity = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(current_activity)) {
|
||||||
|
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">There was an error communicating with your Plex Server.</div>');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var stream_count = parseInt(current_activity.stream_count);
|
||||||
|
var sessions = current_activity.sessions;
|
||||||
|
|
||||||
|
if (stream_count) {
|
||||||
|
$('#dashboard-no-activity').remove();
|
||||||
|
|
||||||
|
sessions.forEach(function (s) {
|
||||||
|
var key = s.session_key;
|
||||||
|
var instance = $('#instance-' + key);
|
||||||
|
|
||||||
|
// create a new instance if it doesn't exist
|
||||||
|
if (!(instance.length)) {
|
||||||
|
getActivityInstance(s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// update play state
|
||||||
|
switch (s.state) {
|
||||||
|
case 'playing':
|
||||||
|
var overlay_state = 'State <strong>Playing</strong>';
|
||||||
|
var state_icon = '<i class="fa fa-fw fa-play"></i> ';
|
||||||
|
break;
|
||||||
|
case 'paused':
|
||||||
|
var overlay_state = 'State <strong>Paused</strong>';
|
||||||
|
var state_icon = '<i class="fa fa-fw fa-pause"></i> ';
|
||||||
|
break;
|
||||||
|
case 'buffering':
|
||||||
|
var overlay_state = 'State <strong>Buffering</strong>';
|
||||||
|
var state_icon = '<i class="fa fa-fw fa-spinner"></i> ';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
var overlay_state = 'State <strong>Unknown</strong>';
|
||||||
|
var state_icon = '<i class="fa fa-fw fa-question-circle"></i> ';
|
||||||
|
}
|
||||||
|
$('#overlay-play-state-' + key).html(overlay_state);
|
||||||
|
$('#play-state-' + key).html(state_icon);
|
||||||
|
|
||||||
|
// if using bif indexes, update the bif thumbnail
|
||||||
|
if (s.indexes) {
|
||||||
|
var bif_poster = $('#bif-' + key);
|
||||||
|
bif_poster.animate({ opacity: 0 }, { duration: 1000, queue: false });
|
||||||
|
bif_poster.after($('<div id="bif-' + key + '"class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img='
|
||||||
|
+ s.bif_thumb + '&width=500&height=280&fallback=art);"></div>').fadeIn(1000, function () { bif_poster.remove() }));
|
||||||
|
blurArtwork(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
// if transcoding, update the transcode state
|
||||||
|
var ts = '';
|
||||||
|
if (s.video_decision == 'transcode' || s.audio_decision == 'transcode') {
|
||||||
|
var throttled = (s.throttled == '1') ? ' (Throttled)' : '';
|
||||||
|
ts += 'Stream <strong>Transcode (Speed: ' + s.transcode_speed + ')' + throttled + '</strong><br>';
|
||||||
|
} else if (s.video_decision == 'copy' || s.audio_decision == 'copy') {
|
||||||
|
ts += 'Stream <strong>Direct Stream</strong><br>';
|
||||||
|
} else {
|
||||||
|
ts += 'Stream <strong>Direct Play</strong><br>';
|
||||||
|
}
|
||||||
|
if (s.video_decision != '' && s.media_type != 'photo') {
|
||||||
|
if (s.video_decision == 'transcode') {
|
||||||
|
ts += 'Video <strong>Transcode (' + s.transcode_video_codec + ') (' + s.transcode_width + 'x' + s.transcode_height + ')</strong><br>';
|
||||||
|
} else if (s.video_decision == 'copy') {
|
||||||
|
ts += 'Video <strong>Direct Stream (' + s.transcode_video_codec + ') (' + s.width + 'x' + s.height + ')</strong><br>';
|
||||||
|
} else {
|
||||||
|
ts += 'Video <strong>Direct Play (' + s.video_codec + ') (' + s.width + 'x' + s.height + ')</strong><br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (s.audio_decision != '') {
|
||||||
|
if (s.audio_decision == 'transcode') {
|
||||||
|
ts += 'Audio <strong>Transcode (' + s.transcode_audio_codec + ') (' + s.transcode_audio_channels + 'ch)</strong>';
|
||||||
|
} else if (s.audio_decision == 'copy') {
|
||||||
|
ts += 'Audio <strong>Direct Stream (' + s.transcode_audio_codec + ') (' + s.transcode_audio_channels + 'ch)</strong>';
|
||||||
|
} else {
|
||||||
|
ts += 'Audio <strong>Direct Play (' + s.audio_codec + ') (' + s.audio_channels + 'ch)</strong>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#transcode-state-' + key).html(ts);
|
||||||
|
|
||||||
|
// update the stream progress times
|
||||||
|
$('#stream-eta-' + key).html(moment().add(parseInt(s.duration) - parseInt(s.view_offset), 'milliseconds').format(time_format));
|
||||||
|
$('#stream-view-offset-' + key).html(millisecondsToMinutes(s.view_offset, false));
|
||||||
|
|
||||||
|
// update the progress bars
|
||||||
|
// percent - 3 because of 3px padding-right
|
||||||
|
$('#bufferbar-' + key).width(parseInt(s.transcode_progress) - 3 + '%').html(s.transcode_progress + '%');
|
||||||
|
$('#bar-' + key).width(parseInt(s.progress_percent) - 3 + '%').html(s.progress_percent + '%');
|
||||||
|
|
||||||
|
// add temporary class so we know which instances are still active
|
||||||
|
instance.addClass('updated-temp');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Remove finished instances
|
||||||
|
var all_instances = $('div[id^=instance-]');
|
||||||
|
all_instances.each(function (i, instance) {
|
||||||
|
if ($(instance).hasClass('updated-temp')) {
|
||||||
|
$(instance).removeClass('updated-temp');
|
||||||
|
} else {
|
||||||
|
$(instance).remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">Nothing is currently being played.</div>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
currentActivity();
|
|
||||||
setInterval(currentActivity, 15000);
|
|
||||||
|
|
||||||
|
function getActivityInstance(session) {
|
||||||
|
$.ajax({
|
||||||
|
url: 'get_current_activity_instance',
|
||||||
|
type: 'GET',
|
||||||
|
cache: false,
|
||||||
|
async: true,
|
||||||
|
data: session,
|
||||||
|
complete: function(xhr, status) {
|
||||||
|
$('#currentActivity').append(xhr.responseText);
|
||||||
|
$('#instance-' + session.session_key).find('.dashboard-activity-poster-face').hide().fadeIn(1000);
|
||||||
|
$('#bufferbar-' + session.session_key).tooltip({ container: 'body', placement: 'right', delay: 50 });
|
||||||
|
$('#bar-' + session.session_key).tooltip({ container: 'body', placement: 'right', delay: 50 });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getCurrentActivity();
|
||||||
|
setInterval(function () {
|
||||||
|
currentActivityHeader();
|
||||||
|
getCurrentActivity();
|
||||||
|
}, 15000);
|
||||||
|
|
||||||
|
function blurArtwork(session_key) {
|
||||||
|
var filterVal = $('#stream-' + session_key).is(':visible') ? 'blur(5px)' : '';
|
||||||
|
$($('#poster-' + session_key).find('.dashboard-activity-poster-face, .dashboard-activity-cover-face'))
|
||||||
|
.css('filter', filterVal).css('webkitFilter', filterVal).css('mozFilter', filterVal).css('oFilter', filterVal).css('msFilter', filterVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show/Hide activity info
|
||||||
|
$('#currentActivity').on('click', '.btn-activity-info', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$($(this).attr('data-target')).toggle();
|
||||||
|
var key = $(this).data('id');
|
||||||
|
blurArtwork(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add hover class to dashboard-instance
|
||||||
|
$('#currentActivity').on('mouseover', '.dashboard-hover-container', function () {
|
||||||
|
$(this).closest('.dashboard-instance').addClass('hover');
|
||||||
|
});
|
||||||
|
$('#currentActivity').on('mouseleave', '.dashboard-hover-container', function () {
|
||||||
|
var id = $(this).closest('.dashboard-instance').data('id');
|
||||||
|
if (!($('#stream-' + id).is(':visible'))) {
|
||||||
|
$(this).closest('.dashboard-instance').removeClass('hover');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
% endif
|
||||||
|
% if 'watch_stats' in config['home_sections']:
|
||||||
|
<script>
|
||||||
function getHomeStats(days) {
|
function getHomeStats(days) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'home_stats',
|
url: 'home_stats',
|
||||||
|
type: 'GET',
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
data: { },
|
data: { },
|
||||||
@@ -97,10 +290,15 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
getHomeStats();
|
||||||
|
</script>
|
||||||
|
% endif
|
||||||
|
% if 'library_stats' in config['home_sections']:
|
||||||
|
<script>
|
||||||
function getLibraryStats() {
|
function getLibraryStats() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'library_stats',
|
url: 'library_stats',
|
||||||
|
type: 'GET',
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
data: { },
|
data: { },
|
||||||
@@ -109,49 +307,108 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
getLibraryStats();
|
||||||
|
</script>
|
||||||
|
% endif
|
||||||
|
% if 'recently_added' in config['home_sections']:
|
||||||
|
<script>
|
||||||
function recentlyAdded() {
|
function recentlyAdded() {
|
||||||
var widthVal = $('body').find(".container-fluid").width();
|
|
||||||
var tmp = (widthVal-20) / 182;
|
|
||||||
|
|
||||||
if (tmp > 0) {
|
|
||||||
containerSize = parseInt(tmp);
|
|
||||||
} else {
|
|
||||||
containerSize = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_recently_added',
|
url: 'get_recently_added',
|
||||||
type: "GET",
|
type: "GET",
|
||||||
async: true,
|
async: true,
|
||||||
data: { count : containerSize },
|
data: { count : 50 },
|
||||||
complete: function (xhr, status) {
|
complete: function (xhr, status) {
|
||||||
$("#recentlyAdded").html(xhr.responseText);
|
$("#recentlyAdded").html(xhr.responseText);
|
||||||
|
highlightAddedScrollerButton();
|
||||||
|
if ($('.dashboard-recent-media-instance li[data-type=movie]').length) { $('#toggle-recently-added-movie').removeClass('disabled'); }
|
||||||
|
if ($('.dashboard-recent-media-instance li[data-type=season]').length) { $('#toggle-recently-added-season').removeClass('disabled'); }
|
||||||
|
if ($('.dashboard-recent-media-instance li[data-type=album]').length) { $('#toggle-recently-added-album').removeClass('disabled'); }
|
||||||
|
|
||||||
|
$('.toggle-recently-added-type').not('.disabled').click(function () {
|
||||||
|
var scroller = $("#recently-added-row-scroller");
|
||||||
|
var media_type = $(this).data('type');
|
||||||
|
var margin_right = $(this).hasClass('text-muted') ? '25px' : 0;
|
||||||
|
var toggle_items = $('.dashboard-recent-media-instance li[data-type=' + media_type + ']');
|
||||||
|
var containerWidth = $("body").find(".container-fluid").width();
|
||||||
|
|
||||||
|
if (margin_right == 0) {
|
||||||
|
toggle_items.stop().animate({ width: 'toggle', marginRight: margin_right }, 1000, function () {
|
||||||
|
toggle_items.hide();
|
||||||
|
|
||||||
|
var scroller_width = $('.dashboard-recent-media-instance li:visible').length * 175;
|
||||||
|
scroller.width(scroller_width);
|
||||||
|
|
||||||
|
if (scroller_width < containerWidth) {
|
||||||
|
$("#recently-added-page-right").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-right").removeClass("disabled");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
scroller.width(50 * 175);
|
||||||
|
toggle_items.stop().animate({ width: 'toggle', marginRight: margin_right }, 1000, function () {
|
||||||
|
toggle_items.show();
|
||||||
|
|
||||||
|
var scroller_width = $('.dashboard-recent-media-instance li:visible').length * 175;
|
||||||
|
scroller.width(scroller_width);
|
||||||
|
|
||||||
|
if (scroller_width < containerWidth) {
|
||||||
|
$("#recently-added-page-right").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-right").removeClass("disabled");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
leftTotal = 0;
|
||||||
|
scroller.animate({ left: leftTotal }, 1000);
|
||||||
|
$("#recently-added-page-left").addClass("disabled").blur();
|
||||||
|
$(this).toggleClass('text-muted').blur();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$(document).ready(function () {
|
|
||||||
recentlyAdded();
|
recentlyAdded();
|
||||||
|
|
||||||
|
function highlightAddedScrollerButton() {
|
||||||
|
var scroller = $("#recently-added-row-scroller");
|
||||||
|
var numElems = scroller.find("li:visible").length;
|
||||||
|
scroller.width(numElems * 175);
|
||||||
|
if (scroller.width() > $("body").find(".container-fluid").width()) {
|
||||||
|
$("#recently-added-page-right").removeClass("disabled");
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-right").addClass("disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(window).resize(function () {
|
$(window).resize(function () {
|
||||||
recentlyAdded();
|
highlightAddedScrollerButton();
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var date_format = 'YYYY-MM-DD';
|
var leftTotal = 0;
|
||||||
var time_format = 'hh:mm a';
|
$(".paginate").click(function (e) {
|
||||||
$.ajax({
|
e.preventDefault();
|
||||||
url: 'get_date_formats',
|
var scroller = $("#recently-added-row-scroller");
|
||||||
type: 'GET',
|
var containerWidth = $("body").find(".container-fluid").width();
|
||||||
success: function(data) {
|
var scrollAmount = $(this).data("id") * parseInt((containerWidth - 15) / 175) * 175;
|
||||||
date_format = data.date_format;
|
var leftMax = Math.min(-parseInt(scroller.width()) + Math.abs(scrollAmount), 0);
|
||||||
time_format = data.time_format;
|
|
||||||
|
leftTotal = Math.max(Math.min(leftTotal + scrollAmount, 0), leftMax);
|
||||||
|
scroller.animate({ left: leftTotal }, 250);
|
||||||
|
|
||||||
|
if (leftTotal == 0) {
|
||||||
|
$("#recently-added-page-left").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-left").removeClass("disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (leftTotal == leftMax) {
|
||||||
|
$("#recently-added-page-right").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-right").removeClass("disabled");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
getHomeStats();
|
|
||||||
getLibraryStats();
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
@@ -36,9 +36,10 @@ DOCUMENTATION :: END
|
|||||||
</%doc>
|
</%doc>
|
||||||
|
|
||||||
<%!
|
<%!
|
||||||
from plexpy import common
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from plexpy import common
|
||||||
|
|
||||||
# Get audio codec file
|
# Get audio codec file
|
||||||
def af(codec):
|
def af(codec):
|
||||||
for pattern, file in common.MEDIA_FLAGS_AUDIO.iteritems():
|
for pattern, file in common.MEDIA_FLAGS_AUDIO.iteritems():
|
||||||
@@ -57,9 +58,9 @@ DOCUMENTATION :: END
|
|||||||
<%inherit file="base.html"/>
|
<%inherit file="base.html"/>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.bootstrap.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.bootstrap.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.colVis.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.colVis.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/plexpy-dataTables.css">
|
<link rel="stylesheet" href="${http_root}css/plexpy-dataTables.css">
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
@@ -67,6 +68,9 @@ DOCUMENTATION :: END
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="art-face" style="background-image:url(pms_image_proxy?img=${data['art']}&width=1920&height=1080)"></div>
|
<div class="art-face" style="background-image:url(pms_image_proxy?img=${data['art']}&width=1920&height=1080)"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image info-art" title="Refresh background image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
<div class="summary-container">
|
<div class="summary-container">
|
||||||
<div class="summary-navbar">
|
<div class="summary-navbar">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -113,23 +117,32 @@ DOCUMENTATION :: END
|
|||||||
<a href="http://app.plex.tv/web/app#!/server/${config['pms_identifier']}/details/%2Flibrary%2Fmetadata%2F${data['rating_key']}" target="_blank" title="View in Plex Web">
|
<a href="http://app.plex.tv/web/app#!/server/${config['pms_identifier']}/details/%2Flibrary%2Fmetadata%2F${data['rating_key']}" target="_blank" title="View in Plex Web">
|
||||||
% endif
|
% endif
|
||||||
% if data['media_type'] == 'episode':
|
% if data['media_type'] == 'episode':
|
||||||
<div class="summary-poster-face-episode" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=poster);">
|
<div class="summary-poster-face-episode" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=art);">
|
||||||
<div class="summary-poster-face-overlay">
|
<div class="summary-poster-face-overlay">
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
% elif data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track':
|
% elif data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track':
|
||||||
<div class="summary-poster-face-track" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=poster);">
|
<div class="summary-poster-face-track" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=cover);">
|
||||||
<div class="summary-poster-face-overlay">
|
<div class="summary-poster-face-overlay">
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
% else:
|
% else:
|
||||||
<div class="summary-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=450&fallback=poster);">
|
<div class="summary-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=450&fallback=poster);">
|
||||||
<div class="summary-poster-face-overlay">
|
<div class="summary-poster-face-overlay">
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
% endif
|
% endif
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -171,17 +184,17 @@ DOCUMENTATION :: END
|
|||||||
% endif
|
% endif
|
||||||
% if data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track':
|
% if data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track':
|
||||||
<div class="summary-content-media-info-wrapper">
|
<div class="summary-content-media-info-wrapper">
|
||||||
% if data['video_codec']:
|
% if data['media_type'] != 'track' and data['video_codec']:
|
||||||
<img class="summary-content-media-flag" title="${data['video_codec']}" src="interfaces/default/images/media_flags/video_codec/${data['video_codec'] | vf}.png" />
|
<img class="summary-content-media-flag" title="${data['video_codec']}" src="${http_root}images/media_flags/video_codec/${data['video_codec'] | vf}.png" />
|
||||||
% endif
|
% endif
|
||||||
% if data['video_resolution']:
|
% if data['media_type'] != 'track' and data['video_resolution']:
|
||||||
<img class="summary-content-media-flag" title="${data['video_resolution']}" src="interfaces/default/images/media_flags/video_resolution/${data['video_resolution']}.png" />
|
<img class="summary-content-media-flag" title="${data['video_resolution']}" src="${http_root}images/media_flags/video_resolution/${data['video_resolution']}.png" />
|
||||||
% endif
|
% endif
|
||||||
% if data['audio_codec']:
|
% if data['audio_codec']:
|
||||||
<img class="summary-content-media-flag" title="${data['audio_codec']}" src="interfaces/default/images/media_flags/audio_codec/${data['audio_codec'] | af}.png" />
|
<img class="summary-content-media-flag" title="${data['audio_codec']}" src="${http_root}images/media_flags/audio_codec/${data['audio_codec'] | af}.png" />
|
||||||
% endif
|
% endif
|
||||||
% if data['audio_channels']:
|
% if data['audio_channels']:
|
||||||
<img class="summary-content-media-flag" title="${data['audio_channels']}" src="interfaces/default/images/media_flags/audio_channels/${data['audio_channels']}.png" />
|
<img class="summary-content-media-flag" title="${data['audio_channels']}" src="${http_root}images/media_flags/audio_channels/${data['audio_channels']}.png" />
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
@@ -290,7 +303,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% if data['media_type'] == 'show':
|
% if data['media_type'] == 'show':
|
||||||
<div class='col-md-12'>
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Season List for <strong>${data['title']}</strong></span>
|
<span>Season List for <strong>${data['title']}</strong></span>
|
||||||
@@ -301,7 +314,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% elif data['media_type'] == 'season':
|
% elif data['media_type'] == 'season':
|
||||||
<div class='col-md-12'>
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Episode List for <strong>${data['title']}</strong></span>
|
<span>Episode List for <strong>${data['title']}</strong></span>
|
||||||
@@ -312,7 +325,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% elif data['media_type'] == 'artist':
|
% elif data['media_type'] == 'artist':
|
||||||
<div class='col-md-12'>
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Album List for <strong>${data['title']}</strong></span>
|
<span>Album List for <strong>${data['title']}</strong></span>
|
||||||
@@ -323,7 +336,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% elif data['media_type'] == 'album':
|
% elif data['media_type'] == 'album':
|
||||||
<div class='col-md-12'>
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Track List for <strong>${data['title']}</strong></span>
|
<span>Track List for <strong>${data['title']}</strong></span>
|
||||||
@@ -334,35 +347,59 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
<div class='col-md-12'>
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Watch History for <strong>${data['title']}</strong></span>
|
<span>Watch History for <strong>${data['title']}</strong></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<div class="colvis-button-bar hidden-xs"></div>
|
% if _session['user_group'] == 'admin':
|
||||||
|
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||||
|
<div class="btn-group">
|
||||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||||
<i class="fa fa-trash-o"></i> Delete mode
|
<i class="fa fa-trash-o"></i> Delete mode
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
% if source == 'history':
|
||||||
|
<div class="btn-group">
|
||||||
|
<a href="update_metadata?rating_key=${data['rating_key']}&update=True" class="btn btn-danger btn-edit" id="fix-metadata">
|
||||||
|
<i class="fa fa-wrench"></i> Fix Metadata
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
% if data.get('poster_url'):
|
||||||
|
<div class="btn-group">
|
||||||
|
% if data['media_type'] == 'artist' or data['media_type'] == 'album' or data['media_type'] == 'track':
|
||||||
|
<span class="imgur-poster-tooltip" data-toggle="popover" data-img="${data['poster_url']}" data-height="80" data-width="80" style="display: inline-flex;">
|
||||||
|
% else:
|
||||||
|
<span class="imgur-poster-tooltip" data-toggle="popover" data-img="${data['poster_url']}" data-height="120" data-width="80" style="display: inline-flex;">
|
||||||
|
% endif
|
||||||
|
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="delete-imgur-poster">
|
||||||
|
<i class="fa fa-picture-o"></i> Reset Imgur Poster
|
||||||
</button>
|
</button>
|
||||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
</span>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
<div class="btn-group colvis-button-bar"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="history_table" width="100%">
|
<table class="display history_table" id="history_table-RK-${data['rating_key']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align='left' id="delete">Delete</th>
|
<th align="left" id="delete">Delete</th>
|
||||||
<th align='left' id="time">Time</th>
|
<th align="left" id="time">Time</th>
|
||||||
<th align='left' id="friendly_name">User</th>
|
<th align="left" id="friendly_name">User</th>
|
||||||
<th align='left' id="ip_address">IP Address</th>
|
<th align="left" id="ip_address">IP Address</th>
|
||||||
<th align='left' id="platform">Platform</th>
|
<th align="left" id="platform">Platform</th>
|
||||||
<th align='left' id="player">Player</th>
|
<th align="left" id="player">Player</th>
|
||||||
<th align='left' id="title">Title</th>
|
<th align="left" id="title">Title</th>
|
||||||
<th align='left' id="started">Started</th>
|
<th align="left" id="started">Started</th>
|
||||||
<th align='left' id="paused_counter">Paused</th>
|
<th align="left" id="paused_counter">Paused</th>
|
||||||
<th align='left' id="stopped">Stopped</th>
|
<th align="left" id="stopped">Stopped</th>
|
||||||
<th align='left' id="duration">Duration</th>
|
<th align="left" id="duration">Duration</th>
|
||||||
<th align='left' id="percent_complete"></th>
|
<th align="left" id="percent_complete"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
@@ -372,7 +409,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
|
<div class="modal fade" id="confirm-modal-delete" tabindex="-1" role="dialog" aria-labelledby="confirm-modal-delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -399,16 +436,14 @@ DOCUMENTATION :: END
|
|||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script src="interfaces/default/js/jquery.rateit.min.js"></script>
|
<script src="${http_root}js/jquery.dataTables.min.js"></script>
|
||||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
<script src="${http_root}js/dataTables.colVis.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.colVis.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.min.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.pagination.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.pagination.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
|
||||||
|
|
||||||
% if data:
|
% if data:
|
||||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
<script src="${http_root}js/tables/history_table.js"></script>
|
||||||
<!-- Need to find a place to put this -->
|
|
||||||
% if data['media_type'] == 'show' or data['media_type'] == 'artist':
|
% if data['media_type'] == 'show' or data['media_type'] == 'artist':
|
||||||
<script>
|
<script>
|
||||||
function get_history() {
|
function get_history() {
|
||||||
@@ -418,7 +453,8 @@ DOCUMENTATION :: END
|
|||||||
data: function ( d ) {
|
data: function ( d ) {
|
||||||
return {
|
return {
|
||||||
json_data: JSON.stringify( d ),
|
json_data: JSON.stringify( d ),
|
||||||
grandparent_rating_key: "${data['rating_key']}"
|
grandparent_rating_key: "${data['rating_key']}",
|
||||||
|
user_id: "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -433,7 +469,8 @@ DOCUMENTATION :: END
|
|||||||
data: function ( d ) {
|
data: function ( d ) {
|
||||||
return {
|
return {
|
||||||
json_data: JSON.stringify( d ),
|
json_data: JSON.stringify( d ),
|
||||||
parent_rating_key: "${data['rating_key']}"
|
parent_rating_key: "${data['rating_key']}",
|
||||||
|
user_id: "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -448,7 +485,8 @@ DOCUMENTATION :: END
|
|||||||
data: function ( d ) {
|
data: function ( d ) {
|
||||||
return {
|
return {
|
||||||
json_data: JSON.stringify( d ),
|
json_data: JSON.stringify( d ),
|
||||||
rating_key: "${data['rating_key']}"
|
rating_key: "${data['rating_key']}",
|
||||||
|
user_id: "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -458,11 +496,11 @@ DOCUMENTATION :: END
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
get_history();
|
get_history();
|
||||||
history_table = $('#history_table').DataTable(history_table_options);
|
history_table = $('#history_table-RK-${data["rating_key"]}').DataTable(history_table_options);
|
||||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table-RK-${data["rating_key"]}', history_table);
|
||||||
|
|
||||||
$('#row-edit-mode').on('click', function() {
|
$('#row-edit-mode').on('click', function() {
|
||||||
$('#row-edit-mode-alert').fadeIn(200);
|
$('#row-edit-mode-alert').fadeIn(200);
|
||||||
@@ -470,8 +508,8 @@ DOCUMENTATION :: END
|
|||||||
if ($(this).hasClass('active')) {
|
if ($(this).hasClass('active')) {
|
||||||
if (history_to_delete.length > 0) {
|
if (history_to_delete.length > 0) {
|
||||||
$('#deleteCount').text(history_to_delete.length);
|
$('#deleteCount').text(history_to_delete.length);
|
||||||
$('#confirm-modal').modal();
|
$('#confirm-modal-delete').modal();
|
||||||
$('#confirm-modal').one('click', '#confirm-delete', function () {
|
$('#confirm-modal-delete').one('click', '#confirm-delete', function () {
|
||||||
for (var i = 0; i < history_to_delete.length; i++) {
|
for (var i = 0; i < history_to_delete.length; i++) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'delete_history_rows',
|
url: 'delete_history_rows',
|
||||||
@@ -519,10 +557,33 @@ DOCUMENTATION :: END
|
|||||||
$("#runtime").html(millisecondsToMinutes($("#runtime").text(), true));
|
$("#runtime").html(millisecondsToMinutes($("#runtime").text(), true));
|
||||||
$('div.art-face').animate({ opacity: 0.2 }, { duration: 1000 });
|
$('div.art-face').animate({ opacity: 0.2 }, { duration: 1000 });
|
||||||
</script>
|
</script>
|
||||||
% if source == 'history':
|
% if data.get('poster_url'):
|
||||||
<script>
|
<script>
|
||||||
$('#row-edit-mode').after('<a href="update_metadata?rating_key=${data['rating_key']}&update=True" class="btn btn-danger btn-edit" id="fix-metadata"> \
|
$('.imgur-poster-tooltip').popover({
|
||||||
<i class="fa fa-wrench"></i> Fix Metadata</a>');
|
html: true,
|
||||||
|
container: 'body',
|
||||||
|
trigger: 'hover',
|
||||||
|
placement: 'left',
|
||||||
|
template: '<div class="popover history-thumbnail-popover" role="tooltip"><div class="arrow" style="top: 50%;"></div><div class="popover-content"></div></div>',
|
||||||
|
content: function () {
|
||||||
|
return '<div class="history-thumbnail" style="background-image: url(' + $(this).data('img') + '); height: ' + $(this).data('height') + 'px; width: ' + $(this).data('width') + 'px;" />';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#delete-imgur-poster').on('click', function() {
|
||||||
|
$.ajax({
|
||||||
|
url: 'delete_poster_url',
|
||||||
|
type: 'POST',
|
||||||
|
async: true,
|
||||||
|
data: { poster_url : "${data['poster_url']}" },
|
||||||
|
success: function (data) {
|
||||||
|
var msg = '<i class="fa fa-check"></i> Imgur poster reset';
|
||||||
|
showMsg(msg, false, true, 2000);
|
||||||
|
$('.imgur-poster-tooltip').popover('destroy');
|
||||||
|
$('#delete-imgur-poster').closest('span').remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ DOCUMENTATION :: END
|
|||||||
% else:
|
% else:
|
||||||
<li>
|
<li>
|
||||||
% endif
|
% endif
|
||||||
<a href="info?rating_key=${child['rating_key']}">
|
|
||||||
%if data['children_type'] == 'season':
|
%if data['children_type'] == 'season':
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="Season ${child['media_index']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
% if child['thumb']:
|
% if child['thumb']:
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);">
|
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);">
|
||||||
% else:
|
% else:
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=450);">
|
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=450&fallback=poster);">
|
||||||
% endif
|
% endif
|
||||||
<div class="item-children-card-overlay">
|
<div class="item-children-card-overlay">
|
||||||
<div class="item-children-overlay-text">
|
<div class="item-children-overlay-text">
|
||||||
@@ -51,32 +51,50 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
% elif data['children_type'] == 'episode':
|
% elif data['children_type'] == 'episode':
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="Episode ${child['media_index']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);">
|
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=500&height=250&fallback=art);">
|
||||||
<div class="item-children-card-overlay">
|
<div class="item-children-card-overlay">
|
||||||
<div class="item-children-overlay-text">
|
<div class="item-children-overlay-text">
|
||||||
Episode ${child['media_index']}
|
Episode ${child['media_index']}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<div class="item-children-instance-text-wrapper episode-item">
|
<div class="item-children-instance-text-wrapper episode-item">
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
% elif data['children_type'] == 'album':
|
% elif data['children_type'] == 'album':
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300);"></div>
|
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<div class="item-children-instance-text-wrapper album-item">
|
<div class="item-children-instance-text-wrapper album-item">
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
% elif data['children_type'] == 'track':
|
% elif data['children_type'] == 'track':
|
||||||
% if loop.index % 2 == 0:
|
% if loop.index % 2 == 0:
|
||||||
<div class="item-children-list-item-even">
|
<div class="item-children-list-item-even">
|
||||||
<span class="item-children-list-item-index">${child['media_index']}</span>
|
<span class="item-children-list-item-index">${child['media_index']}</span>
|
||||||
<span class="item-children-list-item-title">${child['title']}</span>
|
<span class="item-children-list-item-title"><a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a></span>
|
||||||
<span class="item-children-list-item-duration" id="item-children-list-item-duration-${loop.index + 1}">
|
<span class="item-children-list-item-duration" id="item-children-list-item-duration-${loop.index + 1}">
|
||||||
<script>$('#item-children-list-item-duration-${loop.index + 1}').text(moment.utc(${child['duration']}).format("m:ss"));</script>
|
<script>$('#item-children-list-item-duration-${loop.index + 1}').text(moment.utc(${child['duration']}).format("m:ss"));</script>
|
||||||
</span>
|
</span>
|
||||||
@@ -84,14 +102,13 @@ DOCUMENTATION :: END
|
|||||||
% else:
|
% else:
|
||||||
<div class="item-children-list-item-odd">
|
<div class="item-children-list-item-odd">
|
||||||
<span class="item-children-list-item-index">${child['media_index']}</span>
|
<span class="item-children-list-item-index">${child['media_index']}</span>
|
||||||
<span class="item-children-list-item-title">${child['title']}</span>
|
<span class="item-children-list-item-title"><a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a></span>
|
||||||
<span class="item-children-list-item-duration" id="item-children-list-item-duration-${loop.index + 1}">
|
<span class="item-children-list-item-duration" id="item-children-list-item-duration-${loop.index + 1}">
|
||||||
<script>$('#item-children-list-item-duration-${loop.index + 1}').text(moment.utc(${child['duration']}).format("m:ss"));</script>
|
<script>$('#item-children-list-item-duration-${loop.index + 1}').text(moment.utc(${child['duration']}).format("m:ss"));</script>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
% endif
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
|
|||||||
@@ -64,7 +64,10 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"></div>
|
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper season-item">
|
<div class="item-children-instance-text-wrapper season-item">
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3 title="${child['title']}">${child['title']}</h3>
|
||||||
@@ -86,7 +89,10 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"></div>
|
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper season-item">
|
<div class="item-children-instance-text-wrapper season-item">
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3 title="${child['title']}">${child['title']}</h3>
|
||||||
@@ -108,7 +114,10 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"></div>
|
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper season-item">
|
<div class="item-children-instance-text-wrapper season-item">
|
||||||
<h3 title="${child['parent_title']}">${child['parent_title']}</h3>
|
<h3 title="${child['parent_title']}">${child['parent_title']}</h3>
|
||||||
@@ -130,7 +139,10 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"></div>
|
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=500&height=250&fallback=art);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper episode-item">
|
<div class="item-children-instance-text-wrapper episode-item">
|
||||||
<h3 title="${child['grandparent_title']}">${child['grandparent_title']}</h3>
|
<h3 title="${child['grandparent_title']}">${child['grandparent_title']}</h3>
|
||||||
@@ -153,7 +165,10 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300);"></div>
|
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper album-item">
|
<div class="item-children-instance-text-wrapper album-item">
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3 title="${child['title']}">${child['title']}</h3>
|
||||||
@@ -174,7 +189,10 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300);"></div>
|
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper album-item">
|
<div class="item-children-instance-text-wrapper album-item">
|
||||||
<h3 title="${child['parent_title']}">${child['parent_title']}</h3>
|
<h3 title="${child['parent_title']}">${child['parent_title']}</h3>
|
||||||
@@ -196,7 +214,7 @@ DOCUMENTATION :: END
|
|||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=300);">
|
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=300&fallback=cover);">
|
||||||
<div class="item-children-card-overlay">
|
<div class="item-children-card-overlay">
|
||||||
<div class="item-children-overlay-text">
|
<div class="item-children-overlay-text">
|
||||||
Track ${child['media_index']}
|
Track ${child['media_index']}
|
||||||
@@ -204,6 +222,9 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
<div class="item-children-instance-text-wrapper album-item">
|
<div class="item-children-instance-text-wrapper album-item">
|
||||||
<h3 title="${child['grandparent_title']}">${child['grandparent_title']}</h3>
|
<h3 title="${child['grandparent_title']}">${child['grandparent_title']}</h3>
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3 title="${child['title']}">${child['title']}</h3>
|
||||||
|
|||||||
@@ -3,36 +3,56 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||||
<h4 class="modal-title" id="myModalLabel">
|
<h4 class="modal-title" id="myModalLabel">
|
||||||
% if data:
|
|
||||||
<strong><span id="modal_header_ip_address">
|
<strong><span id="modal_header_ip_address">
|
||||||
<i class="fa fa-spin fa-refresh"></i> Loading Details...
|
% if data:
|
||||||
</span></strong>
|
<i class="fa fa-map-marker"></i> IP Address: ${data}
|
||||||
% else:
|
% else:
|
||||||
<i class="fa fa-exclamation-circle"></i> Invalid IP Address</span></strong>
|
<i class="fa fa-exclamation-circle"></i> Invalid IP Address
|
||||||
% endif
|
% endif
|
||||||
|
</span></strong>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="modal-text">
|
<div class="modal-body" id="modal-text">
|
||||||
<div class="col-md-6">
|
<div class="col-sm-12">
|
||||||
<h4><strong>Location Details</strong></h4>
|
<h4><strong>Location Details</strong><span id="ip_loading" style="padding-left: 5px;"><i class="fa fa-refresh fa-spin"></i></span></h4>
|
||||||
|
</div>
|
||||||
|
<div id="ip_error" class="col-sm-12 text-muted"></div>
|
||||||
|
<div class="col-sm-6">
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
|
<li>Continent: <strong><span id="continent"></span></strong></li>
|
||||||
<li>Country: <strong><span id="country"></span></strong></li>
|
<li>Country: <strong><span id="country"></span></strong></li>
|
||||||
<li>Region: <strong><span id="region"></span></strong></li>
|
<li>Region: <strong><span id="region"></span></strong></li>
|
||||||
<li>City: <strong><span id="city"></span></strong></li>
|
<li>City: <strong><span id="city"></span></strong></li>
|
||||||
<li>Timezone: <strong><span id="timezone"></span></strong></li>
|
<li>Postal Code: <strong><span id="postal_code"></span></strong></li>
|
||||||
<li>Latitude: <strong><span id="lat"></span></strong></li>
|
|
||||||
<li>Longitude: <strong><span id="lon"></span></strong></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-sm-6">
|
||||||
<h4><strong>Connection Details</strong></h4>
|
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li>Organization: <strong><span id="organization"></span></strong></li>
|
<li>Timezone: <strong><span id="timezone"></span></strong></li>
|
||||||
|
<li>Latitude: <strong><span id="latitude"></span></strong></li>
|
||||||
|
<li>Longitude: <strong><span id="longitude"></span></strong></li>
|
||||||
|
<li>Accuracy Radius: <strong><span id="accuracy"></span></strong></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h4><strong>Connection Details</strong><span id="isp_loading" style="padding-left: 5px;"><i class="fa fa-refresh fa-spin"></i></span></h4>
|
||||||
|
</div>
|
||||||
|
<div id="isp_error" class="col-sm-12 text-muted"></div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li>Host: <strong><span id="isp_host"></span></strong></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6" id="isp_instance">
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li>ISP: <strong><span id="isp_name"></span></strong></li>
|
||||||
|
<li>Address: <strong><span id="isp_address"></span></strong></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<span class="text-muted">Telize service written by <a href="https://github.com/fcambus/telize" target="_blank">Frederic Cambus</a>.</span>
|
<% from plexpy.helpers import anon_url %>
|
||||||
|
<span class="text-muted">GeoLite2 data created by <a href="${anon_url('http://www.maxmind.com')}" target="_blank">MaxMind</a>.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,27 +61,79 @@
|
|||||||
<script>
|
<script>
|
||||||
function getUserLocation(ip_address) {
|
function getUserLocation(ip_address) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'https://telize.myhtpc.co.za/geoip/' + ip_address,
|
url: 'get_geoip_lookup',
|
||||||
|
type: 'GET',
|
||||||
|
data: { ip_address: ip_address },
|
||||||
cache: true,
|
cache: true,
|
||||||
async: true,
|
async: true,
|
||||||
type: 'GET',
|
complete: function () {
|
||||||
dataType: 'json',
|
$('#ip_loading').remove();
|
||||||
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
$('#modal_header_ip_address').html("Request failed. Server may be too busy.");
|
$('#ip_error').html('<i class="fa fa-exclamation-circle"></i> Internal request failed.').show();
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$('#modal_header_ip_address').html('<i class="fa fa-map-marker"></i> IP Address: ' + ip_address);
|
if ('error' in data) {
|
||||||
|
$('#ip_error').html('<i class="fa fa-exclamation-circle"></i> ' + data.error).show();
|
||||||
|
} else {
|
||||||
|
$('#continent').html(data.continent);
|
||||||
$('#country').html(data.country);
|
$('#country').html(data.country);
|
||||||
$('#city').html(data.city);
|
|
||||||
$('#region').html(data.region);
|
$('#region').html(data.region);
|
||||||
|
$('#city').html(data.city);
|
||||||
|
$('#postal_code').html(data.postal_code);
|
||||||
$('#timezone').html(data.timezone);
|
$('#timezone').html(data.timezone);
|
||||||
$('#lat').html(data.latitude);
|
$('#latitude').html(data.latitude);
|
||||||
$('#lon').html(data.longitude);
|
$('#longitude').html(data.longitude);
|
||||||
$('#organization').html(data.organization);
|
$('#accuracy').html(data.accuracy + ' km');
|
||||||
},
|
}
|
||||||
timeout: 5000
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getUserConnection(ip_address) {
|
||||||
|
$.ajax({
|
||||||
|
url: 'get_whois_lookup',
|
||||||
|
type: 'GET',
|
||||||
|
data: { ip_address: ip_address },
|
||||||
|
cache: true,
|
||||||
|
async: true,
|
||||||
|
complete: function () {
|
||||||
|
$('#isp_loading').remove();
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
$('#isp_error').html('<i class="fa fa-exclamation-circle"></i> Internal request failed.').show();
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
$('#isp_host').html(data.host);
|
||||||
|
if ('error' in data) {
|
||||||
|
$('#isp_error').html('<i class="fa fa-exclamation-circle"></i> ' + data.error).show();
|
||||||
|
} else if (data.nets.length) {
|
||||||
|
$('#isp_instance').remove();
|
||||||
|
$.each(data.nets, function (index, net) {
|
||||||
|
var s = '';
|
||||||
|
if (net.city || net.state || net.postal_code) {
|
||||||
|
s = (net.city && net.state) ? net.city + ', ' + net.state : net.city || net.state || '';
|
||||||
|
s = (s && net.postal_code) ? s + ' ' + net.postal_code : s || net.postal_code || '';
|
||||||
|
}
|
||||||
|
s = (s) ? '<strong>' + s + '</strong><br />' : s;
|
||||||
|
$('#modal-text').append('<div class="col-sm-6"> \
|
||||||
|
<ul class="list-unstyled"> \
|
||||||
|
<li>ISP: <strong>' + net.description + '</strong></li> \
|
||||||
|
<li><span style="float: left;">Address: </span> \
|
||||||
|
<span style="float: left;"><strong>' + net.address + '</strong><br />' + s +
|
||||||
|
'<strong>' + net.country + '</strong></span> \
|
||||||
|
</li> \
|
||||||
|
</ul> \
|
||||||
|
</div>')
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$('#isp_name, #isp_address').html("Not available");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
getUserLocation('${data}');
|
getUserLocation('${data}');
|
||||||
|
getUserConnection('${data}');
|
||||||
</script>
|
</script>
|
||||||
% endif
|
% endif
|
||||||
42
data/interfaces/default/js/ajaxNotifications.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
// Taken from https://github.com/SickRage/SickRage
|
||||||
|
|
||||||
|
PNotify.prototype.options.addclass = "stack-bottomright";
|
||||||
|
PNotify.prototype.options.buttons.closer_hover = false;
|
||||||
|
PNotify.prototype.options.desktop = { desktop: true, icon: 'images/favicon.png' }
|
||||||
|
PNotify.prototype.options.history = false;
|
||||||
|
PNotify.prototype.options.shadow = false;
|
||||||
|
PNotify.prototype.options.stack = { dir1: 'up', dir2: 'left', firstpos1: 25, firstpos2: 25 };
|
||||||
|
PNotify.prototype.options.styling = 'fontawesome';
|
||||||
|
PNotify.prototype.options.type = 'notice';
|
||||||
|
PNotify.prototype.options.width = '340px';
|
||||||
|
|
||||||
|
function displayPNotify(title, message) {
|
||||||
|
var notification = new PNotify({
|
||||||
|
title: title,
|
||||||
|
text: message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_notifications() {
|
||||||
|
$.getJSON('get_browser_notifications', function (data) {
|
||||||
|
if (data) {
|
||||||
|
$.each(data, function (i, notification) {
|
||||||
|
if (notification.delay == 0) {
|
||||||
|
PNotify.prototype.options.hide = false;
|
||||||
|
} else {
|
||||||
|
PNotify.prototype.options.hide = true;
|
||||||
|
PNotify.prototype.options.delay = notification.delay * 1000;
|
||||||
|
}
|
||||||
|
displayPNotify(notification.subject_text, notification.body_text);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setTimeout(function () {
|
||||||
|
"use strict";
|
||||||
|
check_notifications();
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
check_notifications();
|
||||||
|
});
|
||||||
12
data/interfaces/default/js/bootstrap-hover-dropdown.min.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* @preserve
|
||||||
|
* Project: Bootstrap Hover Dropdown
|
||||||
|
* Author: Cameron Spear
|
||||||
|
* Version: v2.2.1
|
||||||
|
* Contributors: Mattia Larentis
|
||||||
|
* Dependencies: Bootstrap's Dropdown plugin, jQuery
|
||||||
|
* Description: A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
|
||||||
|
* License: MIT
|
||||||
|
* Homepage: http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
|
||||||
|
*/
|
||||||
|
!function(e,n,o){var t=e();e.fn.dropdownHover=function(o){return"ontouchstart"in document?this:(t=t.add(this.parent()),this.each(function(){function r(e){d.parents(".navbar").find(".navbar-toggle").is(":visible")||(n.clearTimeout(a),n.clearTimeout(i),i=n.setTimeout(function(){t.find(":focus").blur(),f.instantlyCloseOthers===!0&&t.removeClass("open"),n.clearTimeout(i),d.attr("aria-expanded","true"),s.addClass("open"),d.trigger(l)},f.hoverDelay))}var a,i,d=e(this),s=d.parent(),u={delay:500,hoverDelay:0,instantlyCloseOthers:!0},h={delay:e(this).data("delay"),hoverDelay:e(this).data("hover-delay"),instantlyCloseOthers:e(this).data("close-others")},l="show.bs.dropdown",c="hide.bs.dropdown",f=e.extend(!0,{},u,o,h);s.hover(function(e){return s.hasClass("open")||d.is(e.target)?void r(e):!0},function(){n.clearTimeout(i),a=n.setTimeout(function(){d.attr("aria-expanded","false"),s.removeClass("open"),d.trigger(c)},f.delay)}),d.hover(function(e){return s.hasClass("open")||s.is(e.target)?void r(e):!0}),s.find(".dropdown-submenu").each(function(){var o,t=e(this);t.hover(function(){n.clearTimeout(o),t.children(".dropdown-menu").show(),t.siblings().children(".dropdown-menu").hide()},function(){var e=t.children(".dropdown-menu");o=n.setTimeout(function(){e.hide()},f.delay)})})}))},e(document).ready(function(){e(n).width()>769&&e(".navbar .dropdown > a").click(function(){location.href=this.href})}),e(document).ready(function(){e('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window);
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
DataTables Bootstrap 3 integration
|
DataTables Bootstrap 3 integration
|
||||||
©2011-2014 SpryMedia Ltd - datatables.net/license
|
©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||||
*/
|
*/
|
||||||
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
|
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(f.ext.classes,
|
||||||
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="…";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
|
{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new f.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};
|
||||||
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
l=0;for(h=f.length;l<h;l++)if(c=f[l],b.isArray(c))q(d,c);else{g=e="";switch(c){case "ellipsis":e="…";g="disabled";break;case "first":e=k.sFirst;g=c+(0<j?"":" disabled");break;case "previous":e=k.sPrevious;g=c+(0<j?"":" disabled");break;case "next":e=k.sNext;g=c+(j<n-1?"":" disabled");break;case "last":e=k.sLast;g=c+(j<n-1?"":" disabled");break;default:e=c+1,g=j===c?"active":""}e&&(i=b("<li>",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#",
|
||||||
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
"aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ var hc_plays_by_day_options = {
|
|||||||
point: {
|
point: {
|
||||||
events: {
|
events: {
|
||||||
click: function () {
|
click: function () {
|
||||||
selectHandler(this.category);
|
selectHandler(this.category, this.series.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,8 @@ var hc_plays_by_day_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
shared: true
|
shared: true,
|
||||||
|
crosshairs: true
|
||||||
},
|
},
|
||||||
series: [{}]
|
series: [{}]
|
||||||
};
|
};
|
||||||
@@ -29,7 +29,7 @@ var hc_plays_by_stream_type_options = {
|
|||||||
point: {
|
point: {
|
||||||
events: {
|
events: {
|
||||||
click: function() {
|
click: function() {
|
||||||
selectHandler(this.category);
|
selectHandler(this.category, this.series.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,8 @@ var hc_plays_by_stream_type_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
shared: true
|
shared: true,
|
||||||
|
crosshairs: true
|
||||||
},
|
},
|
||||||
series: [{}]
|
series: [{}]
|
||||||
};
|
};
|
||||||
322
data/interfaces/default/js/jquery.dataTables.min.js
vendored
@@ -1,160 +1,166 @@
|
|||||||
/*! DataTables 1.10.7
|
/*!
|
||||||
* ©2008-2015 SpryMedia Ltd - datatables.net/license
|
DataTables 1.10.11
|
||||||
|
©2008-2015 SpryMedia Ltd - datatables.net/license
|
||||||
*/
|
*/
|
||||||
(function(Ea,Q,k){var P=function(h){function W(a){var b,c,e={};h.each(a,function(d){if((b=d.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=d.replace(b[0],b[2].toLowerCase()),e[c]=d,"o"===b[1]&&W(a[d])});a._hungarianMap=e}function H(a,b,c){a._hungarianMap||W(a);var e;h.each(b,function(d){e=a._hungarianMap[d];if(e!==k&&(c||b[e]===k))"o"===e.charAt(0)?(b[e]||(b[e]={}),h.extend(!0,b[e],b[d]),H(a[e],b[e],c)):b[e]=b[d]})}function P(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;
|
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(D){return h(D,window,document)}):"object"===typeof exports?module.exports=function(D,I){D||(D=window);I||(I="undefined"!==typeof window?require("jquery"):require("jquery")(D));return h(I,D,D.document)}:h(jQuery,window,document)})(function(h,D,I,k){function Y(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
|
||||||
!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&E(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&E(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");
|
d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function K(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),K(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&E(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&E(a,a,"sZeroRecords","sLoadingRecords");
|
||||||
A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&H(m.models.oSearch,a[b])}function fb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;b&&!h.isArray(b)&&(a.aDataSort=[b])}function gb(a){var a=a.oBrowser,b=h("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",
|
a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
|
||||||
top:1,left:1,width:100,overflow:"scroll"}).append(h('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),c=b.find(".test");a.bScrollOversize=100===c[0].offsetWidth;a.bScrollbarLeft=1!==Math.round(c.offset().left);b.remove()}function hb(a,b,c,e,d,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;e!==d;)a.hasOwnProperty(e)&&(g=j?b(g,a[e],e,a):a[e],j=!0,e+=f);return g}function Fa(a,b){var c=m.defaults.column,e=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:Q.createElement("th"),sTitle:c.sTitle?
|
a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&K(m.models.oSearch,a[b])}function fb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;b&&!h.isArray(b)&&(a.aDataSort=[b])}function gb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,
|
||||||
c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[e],mData:c.mData?c.mData:e,idx:e});a.aoColumns.push(c);c=a.aoPreSearchCols;c[e]=h.extend({},m.models.oSearch,c[e]);ka(a,e,h(b).data())}function ka(a,b,c){var b=a.aoColumns[b],e=a.oClasses,d=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=d.attr("width")||null;var f=(d.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),H(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&
|
width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&
|
||||||
(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),E(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),E(b,c,"aDataSort"));var g=b.mData,j=R(g),i=b.mRender?R(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b.fnGetData=function(a,b,c){var e=j(a,b,k,c);return i&&b?i(e,b,a,c):e};b.fnSetData=function(a,b,c){return S(g)(a,b,c)};"number"!==typeof g&&
|
(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:I.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=
|
||||||
(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,d.addClass(e.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=e.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=e.sSortableAsc,b.sSortingClassJUI=e.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=e.sSortableDesc,b.sSortingClassJUI=e.sSortJUIDescAllowed):(b.sSortingClass=e.sSortable,b.sSortingClassJUI=e.sSortJUI)}function X(a){if(!1!==a.oFeatures.bAutoWidth){var b=
|
(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),K(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),E(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),E(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&
|
||||||
a.aoColumns;Ga(a);for(var c=0,e=b.length;c<e;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&Y(a);w(a,null,"column-sizing",[a])}function la(a,b){var c=Z(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=Z(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function aa(a){return Z(a,"bVisible").length}function Z(a,b){var c=[];h.map(a.aoColumns,function(a,d){a[b]&&c.push(d)});return c}function Ha(a){var b=a.aoColumns,c=a.aoData,e=m.ext.type.detect,d,
|
(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):
|
||||||
f,g,j,i,h,l,q,n;d=0;for(f=b.length;d<f;d++)if(l=b[d],n=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=e.length;g<j;g++){i=0;for(h=c.length;i<h;i++){n[i]===k&&(n[i]=x(a,i,d,"type"));q=e[g](n[i],a);if(!q&&g!==e.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function ib(a,b,c,e){var d,f,g,j,i,o,l=a.aoColumns;if(b)for(d=b.length-1;0<=d;d--){o=b[d];var q=o.targets!==k?o.targets:o.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<
|
!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&ka(a);u(a,null,"column-sizing",[a])}function Z(a,b){var c=la(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=la(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}
|
||||||
g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Fa(a);e(q[f],o)}else if("number"===typeof q[f]&&0>q[f])e(l.length+q[f],o);else if("string"===typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&e(j,o)}}if(c){d=0;for(a=c.length;d<a;d++)e(d,c[d])}}function K(a,b,c,e){var d=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data"});f._aData=b;a.aoData.push(f);for(var b=a.aoColumns,f=0,g=b.length;f<g;f++)c&&Ia(a,d,f,x(a,d,f)),b[f].sType=null;a.aiDisplayMaster.push(d);
|
function aa(a){return h(F(a.aoColumns,"nTh")).filter(":visible").length}function la(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ia(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=
|
||||||
(c||!a.oFeatures.bDeferRender)&&Ja(a,d,c,e);return d}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,d){c=na(a,d);return K(a,c.data,d,c.cells)})}function x(a,b,c,e){var d=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,c=f.fnGetData(g,e,{settings:a,row:b,col:c});if(c===k)return a.iDrawError!=d&&null===j&&(I(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b,4),a.iDrawError=d),j;if((c===g||null===c)&&
|
q;break}}l.sType||(l.sType="string")}}function ib(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ga(a);d(q[f],n)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}
|
||||||
null!==j)c=j;else if("function"===typeof c)return c.call(g);return null===c&&"display"==e?"":c}function Ia(a,b,c,e){a.aoColumns[c].fnSetData(a.aoData[b]._aData,e,{settings:a,row:b,col:c})}function Ka(a){return h.map(a.match(/(\\.|[^\.])+/g),function(a){return a.replace(/\\./g,".")})}function R(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=R(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,
|
function N(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ja(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ka(a,e);return N(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,
|
||||||
c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=Ka(f);for(var i=0,h=j.length;i<h;i++){f=j[i].match(ba);g=j[i].match(T);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");i=0;for(h=a.length;i<h;i++)g.push(c(a[i],b,j));a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(T,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===
|
i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(L(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function La(a){return h.map(a.match(/(\\.|[^\.])+/g)||
|
||||||
k)return k;a=a[j[i]]}}return a};return function(b,d){return c(b,d,a)}}return function(b){return b[a]}}function S(a){if(h.isPlainObject(a))return S(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,e,d){a(b,"set",e,d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,e,d){var d=Ka(d),f;f=d[d.length-1];for(var g,j,i=0,h=d.length-1;i<h;i++){g=d[i].match(ba);j=d[i].match(T);if(g){d[i]=d[i].replace(ba,"");a[d[i]]=[];
|
[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=La(f);for(var i=0,n=j.length;i<n;i++){f=j[i].match(ba);g=
|
||||||
f=d.slice();f.splice(0,i+1);g=f.join(".");j=0;for(h=e.length;j<h;j++)f={},b(f,e[j],g),a[d[i]].push(f);return}j&&(d[i]=d[i].replace(T,""),a=a[d[i]](e));if(null===a[d[i]]||a[d[i]]===k)a[d[i]]={};a=a[d[i]]}if(f.match(T))a[f.replace(T,"")](e);else a[f.replace(ba,"")]=e};return function(c,e){return b(c,e,a)}}return function(b,e){b[a]=e}}function La(a){return D(a.aoData,"_aData")}function oa(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0}function pa(a,b,c){for(var e=-1,d=0,f=a.length;d<
|
j[i].match(V);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(n=a.length;i<n;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(V,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);if(null===a)return function(){};if("function"===
|
||||||
f;d++)a[d]==b?e=d:a[d]>b&&a[d]--; -1!=e&&c===k&&a.splice(e,1)}function ca(a,b,c,e){var d=a.aoData[b],f,g=function(c,f){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=x(a,b,f,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===d.src)d._aData=na(a,d,e,e===k?k:d._aData).data;else{var j=d.anCells;if(j)if(e!==k)g(j[e],e);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}d._aSortData=null;d._aFilterData=null;g=a.aoColumns;if(e!==k)g[e].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;
|
typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=La(e),f;f=e[e.length-1];for(var g,j,i=0,n=e.length-1;i<n;i++){g=e[i].match(ba);j=e[i].match(V);if(g){e[i]=e[i].replace(ba,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(n=d.length;j<n;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(V,""),a=a[e[i]](d));if(null===a[e[i]]||
|
||||||
Ma(d)}}function na(a,b,c,e){var d=[],f=b.firstChild,g,j=0,i,o=a.aoColumns,l=a._rowReadObject,e=e||l?{}:[],q=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),S(a)(e,b.getAttribute(c)))}},a=function(a){if(c===k||c===j)g=o[j],i=h.trim(a.innerHTML),g&&g._bAttrSrc?(S(g.mData._)(e,i),q(g.mData.sort,a),q(g.mData.type,a),q(g.mData.filter,a)):l?(g._setter||(g._setter=S(g.mData)),g._setter(e,i)):e[j]=i;j++};if(f)for(;f;){b=f.nodeName.toUpperCase();if("TD"==b||"TH"==b)a(f),
|
a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(V))a[f.replace(V,"")](d);else a[f.replace(ba,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ma(a){return F(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);
|
||||||
d.push(f);f=f.nextSibling}else{d=b.anCells;f=0;for(b=d.length;f<b;f++)a(d[f])}return{data:e,cells:d}}function Ja(a,b,c,e){var d=a.aoData[b],f=d._aData,g=[],j,i,h,l,q;if(null===d.nTr){j=c||Q.createElement("tr");d.nTr=j;d.anCells=g;j._DT_RowIndex=b;Ma(d);l=0;for(q=a.aoColumns.length;l<q;l++){h=a.aoColumns[l];i=c?e[l]:Q.createElement(h.sCellType);g.push(i);if(!c||h.mRender||h.mData!==l)i.innerHTML=x(a,b,l,"display");h.sClass&&(i.className+=" "+h.sClass);h.bVisible&&!c?j.appendChild(i):!h.bVisible&&c&&
|
c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Na(a,e)}}function Ka(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,n,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");
|
||||||
i.parentNode.removeChild(i);h.fnCreatedCell&&h.fnCreatedCell.call(a.oInstance,i,x(a,b,l),f,b,l)}w(a,"aoRowCreatedCallback",null,[j,f,b])}d.nTr.setAttribute("role","row")}function Ma(a){var b=a.nTr,c=a._aData;if(b){c.DT_RowId&&(b.id=c.DT_RowId);if(c.DT_RowClass){var e=c.DT_RowClass.split(" ");a.__rowc=a.__rowc?Na(a.__rowc.concat(e)):e;h(b).removeClass(a.__rowc.join(" ")).addClass(c.DT_RowClass)}c.DT_RowAttr&&h(b).attr(c.DT_RowAttr);c.DT_RowData&&h(b).data(c.DT_RowData)}}function jb(a){var b,c,e,d,
|
-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},S=function(a){if(c===k||c===i)j=l[i],n=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,n),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,n)):d[i]=n;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)S(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)S(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}
|
||||||
f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,o=a.oClasses,l=a.aoColumns;i&&(d=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],e=h(f.nTh).addClass(f.sClass),i&&e.appendTo(d),a.oFeatures.bSort&&(e.addClass(f.sSortingClass),!1!==f.bSortable&&(e.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Oa(a,f.nTh,b))),f.sTitle!=e.html()&&e.html(f.sTitle),Pa(a,"header")(a,e,f,o);i&&da(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(o.sHeaderTH);
|
function Ja(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,n,l,q;if(null===e.nTr){j=c||I.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Na(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){n=a.aoColumns[l];i=c?d[l]:I.createElement(n.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||n.mRender||n.mData!==l)&&(!h.isPlainObject(n.mData)||n.mData._!==l+".display"))i.innerHTML=B(a,b,l,"display");n.sClass&&(i.className+=" "+n.sClass);n.bVisible&&!c?j.appendChild(i):!n.bVisible&&c&&i.parentNode.removeChild(i);
|
||||||
h(j).find(">tr>th, >tr>td").addClass(o.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var e,d,f,g=[],j=[],i=a.aoColumns.length,o;if(b){c===k&&(c=!1);e=0;for(d=b.length;e<d;e++){g[e]=b[e].slice();g[e].nTr=b[e].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[e].splice(f,1);j.push([])}e=0;for(d=g.length;e<d;e++){if(a=g[e].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[e].length;f<b;f++)if(o=
|
n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}u(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function Na(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?pa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function kb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===
|
||||||
i=1,j[e][f]===k){a.appendChild(g[e][f].cell);for(j[e][f]=1;g[e+i]!==k&&g[e][f].cell==g[e+i][f].cell;)j[e+i][f]=1,i++;for(;g[e][f+o]!==k&&g[e][f].cell==g[e][f+o].cell;){for(c=0;c<i;c++)j[e+c][f+o]=1;o++}h(g[e][f].cell).attr("rowspan",i).attr("colspan",o)}}}}function M(a){var b=w(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,e=a.asStripeClasses,d=e.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==B(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=
|
h("th, td",g).length,n=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Oa(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Pa(a,"header")(a,d,f,n);i&&da(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH);
|
||||||
j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,o=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!kb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:o;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ja(a,l);l=q.nTr;if(0!==d){var n=e[c%d];q._sRowStripe!=n&&(h(l).removeClass(q._sRowStripe).addClass(n),q._sRowStripe=n)}w(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,
|
if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,n;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(n=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);
|
||||||
1==a.iDraw&&"ajax"==B(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":d?e[0]:""}).append(h("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];w(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],La(a),g,o,i]);w(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],La(a),g,o,i]);e=h(a.nTBody);e.children().detach();e.append(h(b));w(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=
|
for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+n]!==k&&g[d][f].cell==g[d][f+n].cell;){for(c=0;c<i;c++)j[d+c][f+n]=1;n++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",n)}}}}function O(a){var b=u(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=
|
||||||
!1}}function N(a,b){var c=a.oFeatures,e=c.bFilter;c.bSort&&lb(a);e?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;M(a);a._drawHold=!1}function mb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),e=a.oFeatures,d=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=d[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,o,l,q,n=0;n<f.length;n++){g=
|
-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!lb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ja(a,l);l=q.nTr;if(0!==e){var t=d[c%e];q._sRowStripe!=t&&(h(l).removeClass(q._sRowStripe).addClass(t),q._sRowStripe=t)}u(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:
|
||||||
null;j=f[n];if("<"==j){i=h("<div/>")[0];o=f[n+1];if("'"==o||'"'==o){l="";for(q=2;f[n+q]!=o;)l+=f[n+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(o=l.split("."),i.id=o[0].substr(1,o[0].length-1),i.className=o[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;n+=q}d.append(i);d=h(i)}else if(">"==j)d=d.parent();else if("l"==j&&e.bPaginate&&e.bLengthChange)g=nb(a);else if("f"==j&&e.bFilter)g=ob(a);else if("r"==j&&e.bProcessing)g=pb(a);else if("t"==j)g=qb(a);else if("i"==
|
f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];u(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ma(a),g,n,i]);u(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ma(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));u(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;
|
||||||
j&&e.bInfo)g=rb(a);else if("p"==j&&e.bPaginate)g=sb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(o=i.length;q<o;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),d.append(g))}c.replaceWith(d)}function da(a,b){var c=h(b).children("tr"),e,d,f,g,j,i,o,l,q,n;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){e=c[f];for(d=e.firstChild;d;){if("TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){l=
|
c.bSort&&mb(a);d?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;O(a);a._drawHold=!1}function nb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,t=0;t<f.length;t++){g=null;j=f[t];if("<"==j){i=h("<div/>")[0];
|
||||||
1*d.getAttribute("colspan");q=1*d.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;o=g;n=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][o+j]={cell:d,unique:n},a[f+g].nTr=e}d=d.nextSibling}}}function qa(a,b,c){var e=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,d=c.length;b<d;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!e[f]||!a.bSortCellsTop))e[f]=c[b][f].cell;return e}function ra(a,b,c){w(a,"aoServerParams","serverParams",[b]);
|
n=f[t+1];if("'"==n||'"'==n){l="";for(q=2;f[t+q]!=n;)l+=f[t+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;t+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=ob(a);else if("f"==j&&d.bFilter)g=pb(a);else if("r"==j&&d.bProcessing)g=qb(a);else if("t"==j)g=rb(a);else if("i"==j&&d.bInfo)g=sb(a);else if("p"==
|
||||||
if(b&&h.isArray(b)){var e={},d=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(d);c?(c=c[0],e[c]||(e[c]=[]),e[c].push(b.value)):e[b.name]=b.value});b=e}var f,g=a.ajax,j=a.oInstance,i=function(b){w(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var o=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&o?o:h.extend(!0,b,o);delete g.data}o={data:b,success:function(b){var c=b.error||b.sError;c&&I(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,
|
j&&d.bPaginate)g=tb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q<n;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function da(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,n,l,q,t;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");
|
||||||
c){var f=w(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,f)&&("parsererror"==c?I(a,0,"Invalid JSON response",1):4===b.readyState&&I(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;w(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(o,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(o,g)),g.data=f)}function kb(a){return a.bAjaxDataGet?
|
q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;n=g;t=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][n+j]={cell:e,unique:t},a[f+g].nTr=d}e=e.nextSibling}}}function qa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function ra(a,b,c){u(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},
|
||||||
(a.iDraw++,C(a,!0),ra(a,tb(a),function(b){ub(a,b)}),!1):!0}function tb(a){var b=a.aoColumns,c=b.length,e=a.oFeatures,d=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,o,l,q=U(a);g=a._iDisplayStart;i=!1!==e.bPaginate?a._iDisplayLength:-1;var n=function(a,b){j.push({name:a,value:b})};n("sEcho",a.iDraw);n("iColumns",c);n("sColumns",D(b,"sName").join(","));n("iDisplayStart",g);n("iDisplayLength",i);var k={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:d.sSearch,regex:d.bRegex}};for(g=
|
e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){u(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var n=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&n?n:h.extend(!0,b,n);delete g.data}n={data:b,success:function(b){var c=b.error||b.sError;c&&L(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=u(a,null,"xhr",
|
||||||
0;g<c;g++)o=b[g],l=f[g],i="function"==typeof o.mData?"function":o.mData,k.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),n("mDataProp_"+g,i),e.bFilter&&(n("sSearch_"+g,l.sSearch),n("bRegex_"+g,l.bRegex),n("bSearchable_"+g,o.bSearchable)),e.bSort&&n("bSortable_"+g,o.bSortable);e.bFilter&&(n("sSearch",d.sSearch),n("bRegex",d.bRegex));e.bSort&&(h.each(q,function(a,b){k.order.push({column:b.col,dir:b.dir});n("iSortCol_"+a,b.col);
|
[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?L(a,0,"Invalid JSON response",1):4===b.readyState&&L(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;u(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(n,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(n,g)),g.data=f)}function lb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,
|
||||||
n("sSortDir_"+a,b.dir)}),n("iSortingCols",q.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:k:b?j:k}function ub(a,b){var c=sa(a,b),e=b.sEcho!==k?b.sEcho:b.draw,d=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(e){if(1*e<a.iDraw)return;a.iDraw=1*e}oa(a);a._iRecordsTotal=parseInt(d,10);a._iRecordsDisplay=parseInt(f,10);e=0;for(d=c.length;e<d;e++)K(a,c[e]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;
|
!0),ra(a,ub(a),function(b){vb(a,b)}),!1):!0}function ub(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,n,l,q=W(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var k=function(a,b){j.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",F(b,"sName").join(","));k("iDisplayStart",g);k("iDisplayLength",i);var S={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)n=b[g],
|
||||||
M(a);a._bInitComplete||ta(a,b);a.bAjaxDataGet=!0;C(a,!1)}function sa(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?R(c)(b):b}function ob(a){var b=a.oClasses,c=a.sTableId,e=a.oLanguage,d=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=e.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),
|
l=f[g],i="function"==typeof n.mData?"function":n.mData,S.columns.push({data:i,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),k("mDataProp_"+g,i),d.bFilter&&(k("sSearch_"+g,l.sSearch),k("bRegex_"+g,l.bRegex),k("bSearchable_"+g,n.bSearchable)),d.bSort&&k("bSortable_"+g,n.bSortable);d.bFilter&&(k("sSearch",e.sSearch),k("bRegex",e.bRegex));d.bSort&&(h.each(q,function(a,b){S.order.push({column:b.col,dir:b.dir});k("iSortCol_"+a,b.col);k("sSortDir_"+
|
||||||
f=function(){var b=!this.value?"":this.value;b!=d.sSearch&&(fa(a,{sSearch:b,bRegex:d.bRegex,bSmart:d.bSmart,bCaseInsensitive:d.bCaseInsensitive}),a._iDisplayStart=0,M(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===B(a)?400:0,i=h("input",b).val(d.sSearch).attr("placeholder",e.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",g?ua(f,g):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==
|
a,b.dir)}),k("iSortingCols",q.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:S:b?j:S}function vb(a,b){var c=sa(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,10);d=0;for(e=c.length;d<e;d++)N(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;O(a);a._bInitComplete||
|
||||||
Q.activeElement&&i.val(d.sSearch)}catch(f){}});return b[0]}function fa(a,b,c){var e=a.oPreviousSearch,d=a.aoPreSearchCols,f=function(a){e.sSearch=a.sSearch;e.bRegex=a.bRegex;e.bSmart=a.bSmart;e.bCaseInsensitive=a.bCaseInsensitive};Ha(a);if("ssp"!=B(a)){vb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<d.length;b++)wb(a,d[b].sSearch,b,d[b].bEscapeRegex!==k?!d[b].bEscapeRegex:d[b].bRegex,d[b].bSmart,d[b].bCaseInsensitive);xb(a)}else f(b);a.bFiltered=
|
ta(a,b);a.bAjaxDataGet=!0;C(a,!1)}function sa(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?Q(c)(b):b}function pb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?
|
||||||
!0;w(a,null,"search",[a])}function xb(a){for(var b=m.ext.search,c=a.aiDisplay,e,d,f=0,g=b.length;f<g;f++){for(var j=[],i=0,h=c.length;i<h;i++)d=c[i],e=a.aoData[d],b[f](a,e._aFilterData,d,e._aData,i)&&j.push(d);c.length=0;c.push.apply(c,j)}}function wb(a,b,c,e,d,f){if(""!==b)for(var g=a.aiDisplay,e=Qa(b,e,d,f),d=g.length-1;0<=d;d--)b=a.aoData[g[d]]._aFilterData[c],e.test(b)||g.splice(d,1)}function vb(a,b,c,e,d,f){var e=Qa(b,e,d,f),d=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,g;0!==m.ext.search.length&&
|
"":this.value;b!=e.sSearch&&(fa(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,O(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",g?ua(f,g):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==I.activeElement&&i.val(e.sSearch)}catch(d){}});
|
||||||
(c=!0);g=yb(a);if(0>=b.length)a.aiDisplay=f.slice();else{if(g||c||d.length>b.length||0!==b.indexOf(d)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<=c;c--)e.test(a.aoData[b[c]]._sFilterRow)||b.splice(c,1)}}function Qa(a,b,c,e){a=b?a:va(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,e?"i":"")}function va(a){return a.replace(Yb,"\\$1")}
|
return b[0]}function fa(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ia(a);if("ssp"!=y(a)){wb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)xb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);yb(a)}else f(b);a.bFiltered=!0;u(a,null,"search",[a])}function yb(a){for(var b=
|
||||||
function yb(a){var b=a.aoColumns,c,e,d,f,g,j,i,h,l=m.ext.type.search;c=!1;e=0;for(f=a.aoData.length;e<f;e++)if(h=a.aoData[e],!h._aFilterData){j=[];d=0;for(g=b.length;d<g;d++)c=b[d],c.bSearchable?(i=x(a,e,d,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(wa.innerHTML=i,i=Zb?wa.textContent:wa.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}
|
m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,n=c.length;i<n;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function xb(a,b,c,d,e,f){if(""!==b)for(var g=a.aiDisplay,d=Qa(b,d,e,f),e=g.length-1;0<=e;e--)b=a.aoData[g[e]]._aFilterData[c],d.test(b)||g.splice(e,1)}function wb(a,b,c,d,e,f){var d=Qa(b,d,e,f),e=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,g;0!==m.ext.search.length&&(c=!0);g=zb(a);if(0>=b.length)a.aiDisplay=f.slice();
|
||||||
function zb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Ab(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function rb(a){var b=a.sTableId,c=a.aanFeatures.i,e=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Bb,sName:"information"}),e.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return e[0]}function Bb(a){var b=
|
else{if(g||c||e.length>b.length||0!==b.indexOf(e)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<=c;c--)d.test(a.aoData[b[c]]._sFilterRow)||b.splice(c,1)}}function Qa(a,b,c,d){a=b?a:va(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function va(a){return a.replace(Zb,"\\$1")}function zb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=
|
||||||
a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,e=a._iDisplayStart+1,d=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Cb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,e,d,f,g,j));h(b).html(j)}}function Cb(a,b){var c=a.fnFormatNumber,e=a._iDisplayStart+1,d=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===d;return b.replace(/_START_/g,c.call(a,e)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,
|
m.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(wa.innerHTML=i,i=$b?wa.textContent:wa.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Ab(a){return{search:a.sSearch,smart:a.bSmart,
|
||||||
c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(e/d))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/d)))}function ga(a){var b,c,e=a.iInitDisplayStart,d=a.aoColumns,f;c=a.oFeatures;if(a.bInitialised){mb(a);jb(a);ea(a,a.aoHeader);ea(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Ga(a);b=0;for(c=d.length;b<c;b++)f=d[b],f.sWidth&&(f.nTh.style.width=s(f.sWidth));N(a);d=B(a);"ssp"!=d&&("ajax"==d?ra(a,[],function(c){var f=sa(a,c);for(b=0;b<f.length;b++)K(a,f[b]);
|
regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Bb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function sb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Cb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Cb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,
|
||||||
a.iInitDisplayStart=e;N(a);C(a,!1);ta(a,c)},a):(C(a,!1),ta(a)))}else setTimeout(function(){ga(a)},200)}function ta(a,b){a._bInitComplete=!0;b&&X(a);w(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);w(a,null,"length",[a,c])}function nb(a){for(var b=a.oClasses,c=a.sTableId,e=a.aLengthMenu,d=h.isArray(e[0]),f=d?e[0]:e,e=d?e[1]:e,d=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)d[0][g]=new Option(e[g],
|
d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Db(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Db(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,
|
||||||
f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",d[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());M(a)});h(a.nTable).bind("length.dt.DT",function(b,c,f){a===c&&h("select",i).val(f)});return i[0]}function sb(a){var b=a.sPaginationType,c=m.ext.pager[b],e="function"===typeof c,d=function(a){M(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],
|
c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ga(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){nb(a);kb(a);ea(a,a.aoHeader);ea(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Ha(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=x(f.sWidth));u(a,null,"preInit",[a]);T(a);e=y(a);if("ssp"!=e||g)"ajax"==e?ra(a,[],function(c){var f=sa(a,c);for(b=0;b<f.length;b++)N(a,f[b]);
|
||||||
f=a.aanFeatures;e||c.fnInit(a,b,d);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(e){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),q,l=0;for(q=f.p.length;l<q;l++)Pa(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,d)},sName:"pagination"}));return b}function Ta(a,b,c){var e=a._iDisplayStart,d=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===d?e=0:"number"===typeof b?(e=b*d,e>f&&(e=0)):
|
a.iInitDisplayStart=d;T(a);C(a,!1);ta(a,c)},a):(C(a,!1),ta(a))}else setTimeout(function(){ga(a)},200)}function ta(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&U(a);u(a,null,"plugin-init",[a,b]);u(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);u(a,null,"length",[a,c])}function ob(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),
|
||||||
"first"==b?e=0:"previous"==b?(e=0<=d?e-d:0,0>e&&(e=0)):"next"==b?e+d<f&&(e+=d):"last"==b?e=Math.floor((f-1)/d)*d:I(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==e;a._iDisplayStart=e;b&&(w(a,null,"page",[a]),c&&M(a));return b}function pb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");w(a,
|
g=0,j=f.length;g<j;g++)e[0][g]=new Option(d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());O(a)});h(a.nTable).bind("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function tb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){O(a)},
|
||||||
null,"processing",[a,b])}function qb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var e=c.sX,d=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),o=h(b[0].cloneNode(!1)),l=b.children("tfoot");c.sX&&"100%"===b.attr("width")&&b.removeAttr("width");l.length||(l=null);c=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,
|
b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Pa(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===
|
||||||
width:e?!e?null:s(e):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({overflow:"auto",height:!d?null:s(d),width:!e?null:s(e)}).append(b));l&&c.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:e?!e?null:s(e):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(o.removeAttr("id").css("margin-left",
|
e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:L(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(u(a,null,"page",[a]),c&&O(a));return b}function qb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",
|
||||||
0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=c.children(),q=b[0],f=b[1],n=l?b[2]:null;if(e)h(f).on("scroll.DT",function(){var a=this.scrollLeft;q.scrollLeft=a;l&&(n.scrollLeft=a)});a.nScrollHead=q;a.nScrollBody=f;a.nScrollFoot=n;a.aoDrawCallback.push({fn:Y,sName:"scrolling"});return c[0]}function Y(a){var b=a.oScroll,c=b.sX,e=b.sXInner,d=b.sY,f=b.iBarWidth,g=h(a.nScrollHead),j=g[0].style,i=g.children("div"),o=i[0].style,l=i.children("table"),i=a.nScrollBody,q=h(i),n=i.style,
|
b?"block":"none");u(a,null,"processing",[a,b])}function rb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:x(d):"100%"}).append(h("<div/>",
|
||||||
k=h(a.nScrollFoot).children("div"),p=k.children("table"),m=h(a.nTHead),r=h(a.nTable),t=r[0],O=t.style,L=a.nTFoot?h(a.nTFoot):null,ha=a.oBrowser,w=ha.bScrollOversize,v,u,y,x,z,A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};r.children("thead, tfoot").remove();z=m.clone().prependTo(r);v=m.find("tr");y=z.find("tr");z.find("th, td").removeAttr("tabindex");L&&(x=L.clone().prependTo(r),u=L.find("tr"),x=x.find("tr"));
|
{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:x(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:x(d):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",
|
||||||
c||(n.width="100%",g[0].style.width="100%");h.each(qa(a,z),function(b,c){D=la(a,b);c.style.width=a.aoColumns[D].sWidth});L&&G(function(a){a.style.width=""},x);b.bCollapse&&""!==d&&(n.height=q[0].offsetHeight+m[0].offsetHeight+"px");g=r.outerWidth();if(""===c){if(O.width="100%",w&&(r.find("tbody").height()>i.offsetHeight||"scroll"==q.css("overflow-y")))O.width=s(r.outerWidth()-f)}else""!==e?O.width=s(e):g==q.width()&&q.height()<r.height()?(O.width=s(g-f),r.outerWidth()>g-f&&(O.width=s(g))):O.width=
|
0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:ka,sName:"scrolling"});return i[0]}function ka(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,n=j.children("table"),
|
||||||
s(g);g=r.outerWidth();G(E,y);G(function(a){C.push(a.innerHTML);A.push(s(h(a).css("width")))},y);G(function(a,b){a.style.width=A[b]},v);h(y).height(0);L&&(G(E,x),G(function(a){B.push(s(h(a).css("width")))},x),G(function(a,b){a.style.width=B[b]},u),h(x).height(0));G(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+C[b]+"</div>";a.style.width=A[b]},y);L&&G(function(a,b){a.innerHTML="";a.style.width=B[b]},x);if(r.outerWidth()<g){u=i.scrollHeight>i.offsetHeight||
|
j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),m=t.children("table"),o=h(a.nTHead),G=h(a.nTable),p=G[0],r=p.style,u=a.nTFoot?h(a.nTFoot):null,Eb=a.oBrowser,Ua=Eb.bScrollOversize,s=F(a.aoColumns,"nTh"),P,v,w,y,z=[],A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};v=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==v&&a.scrollBarVis!==k)a.scrollBarVis=v,U(a);else{a.scrollBarVis=v;G.children("thead, tfoot").remove();
|
||||||
"scroll"==q.css("overflow-y")?g+f:g;if(w&&(i.scrollHeight>i.offsetHeight||"scroll"==q.css("overflow-y")))O.width=s(u-f);(""===c||""!==e)&&I(a,1,"Possible column misalignment",6)}else u="100%";n.width=s(u);j.width=s(u);L&&(a.nScrollFoot.style.width=s(u));!d&&w&&(n.height=s(t.offsetHeight+f));d&&b.bCollapse&&(n.height=s(d),b=c&&t.offsetWidth>i.offsetWidth?f:0,t.offsetHeight<i.offsetHeight&&(n.height=s(t.offsetHeight+b)));b=r.outerWidth();l[0].style.width=s(b);o.width=s(b);l=r.height()>i.clientHeight||
|
u&&(w=u.clone().prependTo(G),P=u.find("tr"),w=w.find("tr"));y=o.clone().prependTo(G);o=o.find("tr");v=y.find("tr");y.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(qa(a,y),function(b,c){D=Z(a,b);c.style.width=a.aoColumns[D].sWidth});u&&J(function(a){a.style.width=""},w);f=G.outerWidth();if(""===c){r.width="100%";if(Ua&&(G.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(G.outerWidth()-b);f=G.outerWidth()}else""!==d&&(r.width=
|
||||||
"scroll"==q.css("overflow-y");ha="padding"+(ha.bScrollbarLeft?"Left":"Right");o[ha]=l?f+"px":"0px";L&&(p[0].style.width=s(b),k[0].style.width=s(b),k[0].style[ha]=l?f+"px":"0px");q.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)i.scrollTop=0}function G(a,b,c){for(var e=0,d=0,f=b.length,g,j;d<f;){g=b[d].firstChild;for(j=c?c[d].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,e):a(g,e),e++),g=g.nextSibling,j=c?j.nextSibling:null;d++}}function Ga(a){var b=a.nTable,c=a.aoColumns,e=a.oScroll,d=e.sY,f=e.sX,
|
x(d),f=G.outerWidth());J(E,v);J(function(a){B.push(a.innerHTML);z.push(x(h(a).css("width")))},v);J(function(a,b){if(h.inArray(a,s)!==-1)a.style.width=z[b]},o);h(v).height(0);u&&(J(E,w),J(function(a){C.push(a.innerHTML);A.push(x(h(a).css("width")))},w),J(function(a,b){a.style.width=A[b]},P),h(w).height(0));J(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+B[b]+"</div>";a.style.width=z[b]},v);u&&J(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+
|
||||||
g=e.sXInner,j=c.length,e=Z(a,"bVisible"),i=h("th",a.nTHead),o=b.getAttribute("width"),l=b.parentNode,k=!1,n,m;(n=b.style.width)&&-1!==n.indexOf("%")&&(o=n);for(n=0;n<e.length;n++)m=c[e[n]],null!==m.sWidth&&(m.sWidth=Db(m.sWidthOrig,l),k=!0);if(!k&&!f&&!d&&j==aa(a)&&j==i.length)for(n=0;n<j;n++)c[n].sWidth=s(i.eq(n).width());else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var p=h("<tr/>").appendTo(j.find("tbody"));j.find("tfoot th, tfoot td").css("width",
|
C[b]+"</div>";a.style.width=A[b]},w);if(G.outerWidth()<f){P=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(Ua&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(P-b);(""===c||""!==d)&&L(a,1,"Possible column misalignment",6)}else P="100%";q.width=x(P);g.width=x(P);u&&(a.nScrollFoot.style.width=x(P));!e&&Ua&&(q.height=x(p.offsetHeight+b));c=G.outerWidth();n[0].style.width=x(c);i.width=x(c);d=G.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+
|
||||||
"");i=qa(a,j.find("thead")[0]);for(n=0;n<e.length;n++)m=c[e[n]],i[n].style.width=null!==m.sWidthOrig&&""!==m.sWidthOrig?s(m.sWidthOrig):"";if(a.aoData.length)for(n=0;n<e.length;n++)k=e[n],m=c[k],h(Eb(a,k)).clone(!1).append(m.sContentPadding).appendTo(p);j.appendTo(l);f&&g?j.width(g):f?(j.css("width","auto"),j.width()<l.offsetWidth&&j.width(l.offsetWidth)):d?j.width(l.offsetWidth):o&&j.width(o);Fb(a,j[0]);if(f){for(n=g=0;n<e.length;n++)m=c[e[n]],d=h(i[n]).outerWidth(),g+=null===m.sWidthOrig?d:parseInt(m.sWidth,
|
(Eb.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(m[0].style.width=x(c),t[0].style.width=x(c),t[0].style[e]=d?b+"px":"0px");G.children("colgroup").insertBefore(G.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function J(a,b,c){for(var d=0,e=0,f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Ha(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,
|
||||||
10)+d-h(i[n]).width();j.width(s(g));b.style.width=s(g)}for(n=0;n<e.length;n++)if(m=c[e[n]],d=h(i[n]).width())m.sWidth=s(d);b.style.width=s(j.css("width"));j.remove()}o&&(b.style.width=s(o));if((o||f)&&!a._reszEvt)b=function(){h(Ea).bind("resize.DT-"+a.sInstance,ua(function(){X(a)}))},a.oBrowser.bScrollOversize?setTimeout(b,1E3):b(),a._reszEvt=!0}function ua(a,b){var c=b!==k?b:200,e,d;return function(){var b=this,g=+new Date,j=arguments;e&&g<e+c?(clearTimeout(d),d=setTimeout(function(){e=k;a.apply(b,
|
e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=la(a,"bVisible"),n=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,m,o,p=a.oBrowser,d=p.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)o=c[i[m]],null!==o.sWidth&&(o.sWidth=Fb(o.sWidthOrig,k),t=!0);if(d||!t&&!f&&!e&&j==aa(a)&&j==n.length)for(m=0;m<j;m++)i=Z(a,m),null!==i&&(c[i].sWidth=x(n.eq(m).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var r=h("<tr/>").appendTo(j.find("tbody"));
|
||||||
j)},c)):(e=g,a.apply(b,j))}}function Db(a,b){if(!a)return 0;var c=h("<div/>").css("width",s(a)).appendTo(b||Q.body),e=c[0].offsetWidth;c.remove();return e}function Fb(a,b){var c=a.oScroll;if(c.sX||c.sY)c=!c.sX?c.iBarWidth:0,b.style.width=s(h(b).outerWidth()-c)}function Eb(a,b){var c=Gb(a,b);if(0>c)return null;var e=a.aoData[c];return!e.nTr?h("<td/>").html(x(a,c,b,"display"))[0]:e.anCells[b]}function Gb(a,b){for(var c,e=-1,d=-1,f=0,g=a.aoData.length;f<g;f++)c=x(a,f,b,"display")+"",c=c.replace($b,""),
|
j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");n=qa(a,j.find("thead")[0]);for(m=0;m<i.length;m++)o=c[i[m]],n[m].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?x(o.sWidthOrig):"",o.sWidthOrig&&f&&h(n[m]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m<i.length;m++)t=i[m],o=c[t],h(Gb(a,t)).clone(!1).append(o.sContentPadding).appendTo(r);h("[name]",
|
||||||
c.length>e&&(e=c.length,d=f);return d}function s(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function Hb(){var a=m.__scrollbarWidth;if(a===k){var b=h("<p/>").css({position:"absolute",top:0,left:0,width:"100%",height:150,padding:0,overflow:"scroll",visibility:"hidden"}).appendTo("body"),a=b[0].offsetWidth-b[0].clientWidth;m.__scrollbarWidth=a;b.remove()}return a}function U(a){var b,c,e=[],d=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var o=[];
|
j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):l&&j.width(l);for(m=e=0;m<i.length;m++)k=h(n[m]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(n[m].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[m]].sWidth=x(k-g);b.style.width=x(e);o.remove()}l&&(b.style.width=
|
||||||
f=function(a){a.length&&!h.isArray(a[0])?o.push(a):o.push.apply(o,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<o.length;a++){i=o[a][0];f=d[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=d[g].sType||"string",o[a]._idx===k&&(o[a]._idx=h.inArray(o[a][1],d[g].asSorting)),e.push({src:i,col:g,dir:o[a][1],index:o[a]._idx,type:j,formatter:m.ext.type.order[j+"-pre"]})}return e}function lb(a){var b,c,e=[],d=m.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;
|
x(l));if((l||f)&&!a._reszEvt)b=function(){h(D).bind("resize.DT-"+a.sInstance,ua(function(){U(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function ua(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}}function Fb(a,b){if(!a)return 0;var c=h("<div/>").css("width",x(a)).appendTo(b||I.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,b){var c=Hb(a,b);if(0>c)return null;var d=
|
||||||
Ha(a);h=U(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Ib(a,j.col);if("ssp"!=B(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)e[i[b]]=b;g===h.length?i.sort(function(a,b){var c,d,g,j,i=h.length,k=f[a]._aSortData,m=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],d=m[j.col],c=c<d?-1:c>d?1:0,0!==c)return"asc"===j.dir?c:-c;c=e[a];d=e[b];return c<d?-1:c>d?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,r=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=m[i.col],g=r[i.col],i=d[i.type+
|
a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(ac,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=f);return e}function x(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function W(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):h.merge(n,
|
||||||
"-"+i.dir]||d["string-"+i.dir],c=i(c,g),0!==c)return c;c=e[a];g=e[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,e=a.aoColumns,d=U(a),a=a.oLanguage.oAria,f=0,g=e.length;f<g;f++){c=e[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<d.length&&d[0].col==f?(i.setAttribute("aria-sort","asc"==d[0].dir?"ascending":"descending"),c=j[d[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",
|
a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<n.length;a++){i=n[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",n[a]._idx===k&&(n[a]._idx=h.inArray(n[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:n[a][1],index:n[a]._idx,type:j,formatter:m.ext.type.order[j+"-pre"]})}return d}function mb(a){var b,c,d=[],e=m.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ia(a);h=W(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Ib(a,
|
||||||
b)}}function Ua(a,b,c,e){var d=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof d[0]&&(d=a.aaSorting=[d]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,D(d,"0")),-1!==c?(b=g(d[c],!0),null===b&&1===d.length&&(b=0),null===b?d.splice(c,1):(d[c][1]=f[b],d[c]._idx=b)):(d.push([b,f[0],0]),d[d.length-1]._idx=0)):d.length&&d[0][0]==b?(b=g(d[0]),d.length=1,d[0][1]=f[b],d[0]._idx=b):(d.length=0,d.push([b,f[0]]),d[0]._idx=
|
j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,m=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],e=m[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,p=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=m[i.col],g=p[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],c=i(c,g),0!==c)return c;c=d[a];
|
||||||
0);N(a);"function"==typeof e&&e(a)}function Oa(a,b,c,e){var d=a.aoColumns[c];Va(b,{},function(b){!1!==d.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Ua(a,c,b.shiftKey,e);"ssp"!==B(a)&&C(a,!1)},0)):Ua(a,c,b.shiftKey,e))})}function xa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,e=U(a),d=a.oFeatures,f,g;if(d.bSort&&d.bSortClasses){d=0;for(f=b.length;d<f;d++)g=b[d].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>d?d+1:3));d=0;for(f=e.length;d<f;d++)g=e[d].src,h(D(a.aoData,"anCells",
|
g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=W(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a,b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,
|
||||||
g)).addClass(c+(2>d?d+1:3))}a.aLastSort=e}function Ib(a,b){var c=a.aoColumns[b],e=m.ext.order[c.sSortDataType],d;e&&(d=e.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||e)f=e?d[j]:x(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function ya(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),
|
g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,F(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"==typeof d&&d(a)}function Oa(a,b,c,d){var e=
|
||||||
search:zb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,e){return{visible:b.bVisible,search:zb(a.aoPreSearchCols[e])}})};w(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Kb(a){var b,c,e=a.aoColumns;if(a.oFeatures.bStateSave){var d=a.fnStateLoadCallback.call(a.oInstance,a);if(d&&d.time&&(b=w(a,"aoStateLoadParams","stateLoadParams",[a,d]),-1===h.inArray(!1,b)&&(b=a.iStateDuration,!(0<b&&d.time<+new Date-1E3*b)&&e.length===
|
a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}function xa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=W(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(F(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(F(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Ib(a,
|
||||||
d.columns.length))){a.oLoadedState=h.extend(!0,{},d);d.start!==k&&(a._iDisplayStart=d.start,a.iInitDisplayStart=d.start);d.length!==k&&(a._iDisplayLength=d.length);d.order!==k&&(a.aaSorting=[],h.each(d.order,function(b,c){a.aaSorting.push(c[0]>=e.length?[0,c[1]]:c)}));d.search!==k&&h.extend(a.oPreviousSearch,Ab(d.search));b=0;for(c=d.columns.length;b<c;b++){var f=d.columns[b];f.visible!==k&&(e[b].bVisible=f.visible);f.search!==k&&h.extend(a.aoPreSearchCols[b],Ab(f.search))}w(a,"aoStateLoaded","stateLoaded",
|
b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function ya(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Ab(a.oPreviousSearch),columns:h.map(a.aoColumns,
|
||||||
[a,d])}}}function za(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function I(a,b,c,e){c="DataTables warning: "+(null!==a?"table id="+a.sTableId+" - ":"")+c;e&&(c+=". For more information about this error, please see http://datatables.net/tn/"+e);if(b)Ea.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,w(a,null,"error",[a,e,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,e,c)}}function E(a,b,c,e){h.isArray(c)?
|
function(b,d){return{visible:b.bVisible,search:Ab(a.aoPreSearchCols[d])}})};u(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Kb(a){var b,c,d=a.aoColumns;if(a.oFeatures.bStateSave){var e=a.fnStateLoadCallback.call(a.oInstance,a);if(e&&e.time&&(b=u(a,"aoStateLoadParams","stateLoadParams",[a,e]),-1===h.inArray(!1,b)&&(b=a.iStateDuration,!(0<b&&e.time<+new Date-1E3*b)&&d.length===e.columns.length))){a.oLoadedState=h.extend(!0,{},e);
|
||||||
h.each(c,function(c,f){h.isArray(f)?E(a,b,f[0],f[1]):E(a,b,f)}):(e===k&&(e=c),b[c]!==k&&(a[e]=b[c]))}function Lb(a,b,c){var e,d;for(d in b)b.hasOwnProperty(d)&&(e=b[d],h.isPlainObject(e)?(h.isPlainObject(a[d])||(a[d]={}),h.extend(!0,a[d],e)):a[d]=c&&"data"!==d&&"aaData"!==d&&h.isArray(e)?e.slice():e);return a}function Va(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).bind("selectstart.DT",function(){return!1})}function z(a,
|
e.start!==k&&(a._iDisplayStart=e.start,a.iInitDisplayStart=e.start);e.length!==k&&(a._iDisplayLength=e.length);e.order!==k&&(a.aaSorting=[],h.each(e.order,function(b,c){a.aaSorting.push(c[0]>=d.length?[0,c[1]]:c)}));e.search!==k&&h.extend(a.oPreviousSearch,Bb(e.search));b=0;for(c=e.columns.length;b<c;b++){var f=e.columns[b];f.visible!==k&&(d[b].bVisible=f.visible);f.search!==k&&h.extend(a.aoPreSearchCols[b],Bb(f.search))}u(a,"aoStateLoaded","stateLoaded",[a,e])}}}function za(a){var b=m.settings,a=
|
||||||
b,c,e){c&&a[b].push({fn:c,sName:e})}function w(a,b,c,e){var d=[];b&&(d=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,e)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,e),d.push(b.result));return d}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),e=a._iDisplayLength;b>=c&&(b=c-e);b-=b%e;if(-1===e||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c=a.renderer,e=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?e[c[b]]||e._:"string"===typeof c?e[c]||e._:e._}function B(a){return a.oFeatures.bServerSide?
|
h.inArray(a,F(b,"nTable"));return-1!==a?b[a]:null}function L(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)D.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&u(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function E(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?E(a,b,d[0],
|
||||||
"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Wa(a,b){var c=[],c=Mb.numbers_length,e=Math.floor(c/2);b<=c?c=V(0,b):a<=e?(c=V(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-e?c=V(b-(c-2),b):(c=V(a-e+2,a+e-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return Aa(b,a)},"num-fmt":function(b){return Aa(b,a,Xa)},"html-num":function(b){return Aa(b,a,Ba)},"html-num-fmt":function(b){return Aa(b,a,Ba,Xa)}},function(b,
|
d[1]):E(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Lb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).bind("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}
|
||||||
c){u.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(u.type.search[b+a]=u.type.search.html)})}function Nb(a){return function(){var b=[za(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m,u,t,r,v,Ya={},Ob=/[\r\n]/g,Ba=/<.*?>/g,ac=/^[\w\+\-]/,bc=/[\w\+\-]$/,Yb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Xa=/[',$\u00a3\u20ac\u00a5%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,J=function(a){return!a||!0===a||
|
function u(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?
|
||||||
"-"===a?!0:!1},Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(va(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Ya[b],"."):a},Za=function(a,b,c){var e="string"===typeof a;if(J(a))return!0;b&&e&&(a=Qb(a,b));c&&e&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return J(a)?!0:!(J(a)||"string"===typeof a)?null:Za(a.replace(Ba,""),b,c)?!0:null},D=function(a,b,c){var e=[],d=0,f=a.length;
|
"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Aa(a,b){var c=[],c=Mb.numbers_length,d=Math.floor(c/2);b<=c?c=X(0,b):a<=d?(c=X(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=X(b-(c-2),b):(c=X(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return Ba(b,a)},"num-fmt":function(b){return Ba(b,a,Xa)},"html-num":function(b){return Ba(b,a,Ca)},"html-num-fmt":function(b){return Ba(b,a,Ca,Xa)}},function(b,
|
||||||
if(c!==k)for(;d<f;d++)a[d]&&a[d][b]&&e.push(a[d][b][c]);else for(;d<f;d++)a[d]&&e.push(a[d][b]);return e},ia=function(a,b,c,e){var d=[],f=0,g=b.length;if(e!==k)for(;f<g;f++)a[b[f]][c]&&d.push(a[b[f]][c][e]);else for(;f<g;f++)d.push(a[b[f]][c]);return d},V=function(a,b){var c=[],e;b===k?(b=0,e=a):(e=b,b=a);for(var d=b;d<e;d++)c.push(d);return c},Sb=function(a){for(var b=[],c=0,e=a.length;c<e;c++)a[c]&&b.push(a[c]);return b},Na=function(a){var b=[],c,e,d=a.length,f,g=0;e=0;a:for(;e<d;e++){c=a[e];for(f=
|
c){v.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(v.type.search[b+a]=v.type.search.html)})}function Nb(a){return function(){var b=[za(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m,v,r,p,s,Ya={},Ob=/[\r\n]/g,Ca=/<.*?>/g,bc=/^[\w\+\-]/,cc=/[\w\+\-]$/,Zb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Xa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},
|
||||||
0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b},A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ba=/\[.*?\]$/,T=/\(\)$/,wa=h("<div>")[0],Zb=wa.textContent!==k,$b=/<.*?>/g;m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new t(za(this[u.iApiIndex])):new t(this)};this.fnAddData=function(a,b){var c=this.api(!0),e=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===
|
Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(va(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Ya[b],"."):a},Za=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Qb(a,b));c&&d&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:Za(a.replace(Ca,""),b,c)?!0:null},F=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<
|
||||||
k||b)&&c.draw();return e.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],e=c.oScroll;a===k||a?b.draw(!1):(""!==e.sX||""!==e.sY)&&Y(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var e=this.api(!0),a=e.rows(a),d=a.settings()[0],h=d.aoData[a[0][0]];a.remove();b&&b.call(this,d,h);(c===k||c)&&e.draw();return h};
|
f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},ha=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},X=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Sb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},pa=function(a){var b=[],c,d,e=a.length,f,g=0;d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===
|
||||||
this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,e,d,h){d=this.api(!0);null===b||b===k?d.search(a,c,e,h):d.column(b).search(a,c,e,h);d.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var e=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==e||"th"==e?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};
|
c)continue a;b.push(c);g++}return b},A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ba=/\[.*?\]$/,V=/\(\)$/,wa=h("<div>")[0],$b=wa.textContent!==k,ac=/<.*?>/g;m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new r(za(this[v.iApiIndex])):new r(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};
|
||||||
this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===
|
this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&ka(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};
|
||||||
k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return za(this[u.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,e,d){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(d===k||d)&&h.columns.adjust();(e===k||e)&&h.draw();return 0};this.fnVersionCheck=u.fnVersionCheck;var b=this,c=a===k,e=this.length;c&&(a={});this.oApi=this.internal=u.internal;for(var d in m.ext.internal)d&&
|
this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=
|
||||||
(this[d]=Nb(d));this.each(function(){var d={},d=1<e?Lb(d,a,!0):a,g=0,j,i=this.getAttribute("id"),o=!1,l=m.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())I(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{eb(l);fb(l.column);H(l,l,!0);H(l.column,l.column,!0);H(l,h.extend(d,q.data()));var n=m.settings,g=0;for(j=n.length;g<j;g++){var r=n[g];if(r.nTable==this||r.nTHead.parentNode==this||r.nTFoot&&r.nTFoot.parentNode==this){g=d.bRetrieve!==k?d.bRetrieve:l.bRetrieve;if(c||g)return r.oInstance;
|
function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};
|
||||||
if(d.bDestroy!==k?d.bDestroy:l.bDestroy){r.oInstance.fnDestroy();break}else{I(r,0,"Cannot reinitialise DataTable",3);return}}if(r.sTableId==this.id){n.splice(g,1);break}}if(null===i||""===i)this.id=i="DataTables_Table_"+m.ext._unique++;var p=h.extend(!0,{},m.models.oSettings,{sDestroyWidth:q[0].style.width,sInstance:i,sTableId:i});p.nTable=this;p.oApi=b.internal;p.oInit=d;n.push(p);p.oInstance=1===b.length?b:q.dataTable();eb(d);d.oLanguage&&P(d.oLanguage);d.aLengthMenu&&!d.iDisplayLength&&(d.iDisplayLength=
|
this.fnSettings=function(){return za(this[v.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=v.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=v.internal;for(var e in m.ext.internal)e&&(this[e]=
|
||||||
h.isArray(d.aLengthMenu[0])?d.aLengthMenu[0][0]:d.aLengthMenu[0]);d=Lb(h.extend(!0,{},l),d);E(p.oFeatures,d,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));E(p,d,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback",
|
Nb(e));this.each(function(){var e={},e=1<d?Lb(e,a,!0):a,g=0,j,i=this.getAttribute("id"),n=!1,l=m.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())L(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{eb(l);fb(l.column);K(l,l,!0);K(l.column,l.column,!0);K(l,h.extend(e,q.data()));var t=m.settings,g=0;for(j=t.length;g<j;g++){var p=t[g];if(p.nTable==this||p.nTHead.parentNode==this||p.nTFoot&&p.nTFoot.parentNode==this){g=e.bRetrieve!==k?e.bRetrieve:l.bRetrieve;if(c||g)return p.oInstance;
|
||||||
"renderer","searchDelay",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);E(p.oScroll,d,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);E(p.oLanguage,d,"fnInfoCallback");z(p,"aoDrawCallback",d.fnDrawCallback,"user");z(p,"aoServerParams",d.fnServerParams,"user");z(p,"aoStateSaveParams",d.fnStateSaveParams,"user");z(p,"aoStateLoadParams",
|
if(e.bDestroy!==k?e.bDestroy:l.bDestroy){p.oInstance.fnDestroy();break}else{L(p,0,"Cannot reinitialise DataTable",3);return}}if(p.sTableId==this.id){t.splice(g,1);break}}if(null===i||""===i)this.id=i="DataTables_Table_"+m.ext._unique++;var o=h.extend(!0,{},m.models.oSettings,{sDestroyWidth:q[0].style.width,sInstance:i,sTableId:i});o.nTable=this;o.oApi=b.internal;o.oInit=e;t.push(o);o.oInstance=1===b.length?b:q.dataTable();eb(e);e.oLanguage&&Fa(e.oLanguage);e.aLengthMenu&&!e.iDisplayLength&&(e.iDisplayLength=
|
||||||
d.fnStateLoadParams,"user");z(p,"aoStateLoaded",d.fnStateLoaded,"user");z(p,"aoRowCallback",d.fnRowCallback,"user");z(p,"aoRowCreatedCallback",d.fnCreatedRow,"user");z(p,"aoHeaderCallback",d.fnHeaderCallback,"user");z(p,"aoFooterCallback",d.fnFooterCallback,"user");z(p,"aoInitComplete",d.fnInitComplete,"user");z(p,"aoPreDrawCallback",d.fnPreDrawCallback,"user");i=p.oClasses;d.bJQueryUI?(h.extend(i,m.ext.oJUIClasses,d.oClasses),d.sDom===l.sDom&&"lfrtip"===l.sDom&&(p.sDom='<"H"lfr>t<"F"ip>'),p.renderer)?
|
h.isArray(e.aLengthMenu[0])?e.aLengthMenu[0][0]:e.aLengthMenu[0]);e=Lb(h.extend(!0,{},l),e);E(o.oFeatures,e,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));E(o,e,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback",
|
||||||
h.isPlainObject(p.renderer)&&!p.renderer.header&&(p.renderer.header="jqueryui"):p.renderer="jqueryui":h.extend(i,m.ext.classes,d.oClasses);q.addClass(i.sTable);if(""!==p.oScroll.sX||""!==p.oScroll.sY)p.oScroll.iBarWidth=Hb();!0===p.oScroll.sX&&(p.oScroll.sX="100%");p.iInitDisplayStart===k&&(p.iInitDisplayStart=d.iDisplayStart,p._iDisplayStart=d.iDisplayStart);null!==d.iDeferLoading&&(p.bDeferLoading=!0,g=h.isArray(d.iDeferLoading),p._iRecordsDisplay=g?d.iDeferLoading[0]:d.iDeferLoading,p._iRecordsTotal=
|
"renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);E(o.oScroll,e,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);E(o.oLanguage,e,"fnInfoCallback");z(o,"aoDrawCallback",e.fnDrawCallback,"user");z(o,"aoServerParams",e.fnServerParams,"user");z(o,"aoStateSaveParams",e.fnStateSaveParams,"user");z(o,"aoStateLoadParams",
|
||||||
g?d.iDeferLoading[1]:d.iDeferLoading);var t=p.oLanguage;h.extend(!0,t,d.oLanguage);""!==t.sUrl&&(h.ajax({dataType:"json",url:t.sUrl,success:function(a){P(a);H(l.oLanguage,a);h.extend(true,t,a);ga(p)},error:function(){ga(p)}}),o=!0);null===d.asStripeClasses&&(p.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=p.asStripeClasses,s=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return s.hasClass(a)}))&&(h("tbody tr",this).removeClass(g.join(" ")),p.asDestroyStripes=g.slice());
|
e.fnStateLoadParams,"user");z(o,"aoStateLoaded",e.fnStateLoaded,"user");z(o,"aoRowCallback",e.fnRowCallback,"user");z(o,"aoRowCreatedCallback",e.fnCreatedRow,"user");z(o,"aoHeaderCallback",e.fnHeaderCallback,"user");z(o,"aoFooterCallback",e.fnFooterCallback,"user");z(o,"aoInitComplete",e.fnInitComplete,"user");z(o,"aoPreDrawCallback",e.fnPreDrawCallback,"user");o.rowIdFn=Q(e.rowId);gb(o);i=o.oClasses;e.bJQueryUI?(h.extend(i,m.ext.oJUIClasses,e.oClasses),e.sDom===l.sDom&&"lfrtip"===l.sDom&&(o.sDom=
|
||||||
n=[];g=this.getElementsByTagName("thead");0!==g.length&&(da(p.aoHeader,g[0]),n=qa(p));if(null===d.aoColumns){r=[];g=0;for(j=n.length;g<j;g++)r.push(null)}else r=d.aoColumns;g=0;for(j=r.length;g<j;g++)Fa(p,n?n[g]:null);ib(p,d.aoColumnDefs,r,function(a,b){ka(p,a,b)});if(s.length){var u=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h.each(na(p,s[0]).cells,function(a,b){var c=p.aoColumns[a];if(c.mData===a){var d=u(b,"sort")||u(b,"order"),e=u(b,"filter")||u(b,"search");if(d!==null||e!==
|
'<"H"lfr>t<"F"ip>'),o.renderer)?h.isPlainObject(o.renderer)&&!o.renderer.header&&(o.renderer.header="jqueryui"):o.renderer="jqueryui":h.extend(i,m.ext.classes,e.oClasses);q.addClass(i.sTable);o.iInitDisplayStart===k&&(o.iInitDisplayStart=e.iDisplayStart,o._iDisplayStart=e.iDisplayStart);null!==e.iDeferLoading&&(o.bDeferLoading=!0,g=h.isArray(e.iDeferLoading),o._iRecordsDisplay=g?e.iDeferLoading[0]:e.iDeferLoading,o._iRecordsTotal=g?e.iDeferLoading[1]:e.iDeferLoading);var r=o.oLanguage;h.extend(!0,
|
||||||
null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ka(p,a)}}})}var v=p.oFeatures;d.bStateSave&&(v.bStateSave=!0,Kb(p,d),z(p,"aoDrawCallback",ya,"state_save"));if(d.aaSorting===k){n=p.aaSorting;g=0;for(j=n.length;g<j;g++)n[g][1]=p.aoColumns[g].asSorting[0]}xa(p);v.bSort&&z(p,"aoDrawCallback",function(){if(p.bSorted){var a=U(p),b={};h.each(a,function(a,c){b[c.src]=c.dir});w(p,null,"order",[p,a,b]);Jb(p)}});z(p,"aoDrawCallback",
|
r,e.oLanguage);""!==r.sUrl&&(h.ajax({dataType:"json",url:r.sUrl,success:function(a){Fa(a);K(l.oLanguage,a);h.extend(true,r,a);ga(o)},error:function(){ga(o)}}),n=!0);null===e.asStripeClasses&&(o.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=o.asStripeClasses,v=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return v.hasClass(a)}))&&(h("tbody tr",this).removeClass(g.join(" ")),o.asDestroyStripes=g.slice());t=[];g=this.getElementsByTagName("thead");0!==g.length&&(da(o.aoHeader,
|
||||||
function(){(p.bSorted||B(p)==="ssp"||v.bDeferRender)&&xa(p)},"sc");gb(p);g=q.children("caption").each(function(){this._captionSide=q.css("caption-side")});j=q.children("thead");0===j.length&&(j=h("<thead/>").appendTo(this));p.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("<tbody/>").appendTo(this));p.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0<g.length&&(""!==p.oScroll.sX||""!==p.oScroll.sY))j=h("<tfoot/>").appendTo(this);0===j.length||0===j.children().length?q.addClass(i.sNoFooter):
|
g[0]),t=qa(o));if(null===e.aoColumns){p=[];g=0;for(j=t.length;g<j;g++)p.push(null)}else p=e.aoColumns;g=0;for(j=p.length;g<j;g++)Ga(o,t?t[g]:null);ib(o,e.aoColumnDefs,p,function(a,b){ja(o,a,b)});if(v.length){var s=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(v[0]).children("th, td").each(function(a,b){var c=o.aoColumns[a];if(c.mData===a){var d=s(b,"sort")||s(b,"order"),e=s(b,"filter")||s(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==
|
||||||
0<j.length&&(p.nTFoot=j[0],da(p.aoFooter,p.nTFoot));if(d.aaData)for(g=0;g<d.aaData.length;g++)K(p,d.aaData[g]);else(p.bDeferLoading||"dom"==B(p))&&ma(p,h(p.nTBody).children("tr"));p.aiDisplay=p.aiDisplayMaster.slice();p.bInitialised=!0;!1===o&&ga(p)}});b=null;return this};var Tb=[],y=Array.prototype,cc=function(a){var b,c,e=m.settings,d=h.map(e,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,d),-1!==b?[e[b]]:
|
null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ja(o,a)}}})}var w=o.oFeatures;e.bStateSave&&(w.bStateSave=!0,Kb(o,e),z(o,"aoDrawCallback",ya,"state_save"));if(e.aaSorting===k){t=o.aaSorting;g=0;for(j=t.length;g<j;g++)t[g][1]=o.aoColumns[g].asSorting[0]}xa(o);w.bSort&&z(o,"aoDrawCallback",function(){if(o.bSorted){var a=W(o),b={};h.each(a,function(a,c){b[c.src]=c.dir});u(o,null,"order",[o,a,b]);Jb(o)}});z(o,"aoDrawCallback",function(){(o.bSorted||y(o)==="ssp"||w.bDeferRender)&&xa(o)},"sc");g=
|
||||||
null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,d);return-1!==b?e[b]:null}).toArray()};t=function(a,b){if(!(this instanceof t))return new t(a,b);var c=[],e=function(a){(a=cc(a))&&c.push.apply(c,a)};if(h.isArray(a))for(var d=0,f=a.length;d<f;d++)e(a[d]);else e(a);this.context=Na(c);b&&this.push.apply(this,b.toArray?b.toArray():b);this.selector={rows:null,cols:null,opts:null};
|
q.children("caption").each(function(){this._captionSide=q.css("caption-side")});j=q.children("thead");0===j.length&&(j=h("<thead/>").appendTo(this));o.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("<tbody/>").appendTo(this));o.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0<g.length&&(""!==o.oScroll.sX||""!==o.oScroll.sY))j=h("<tfoot/>").appendTo(this);0===j.length||0===j.children().length?q.addClass(i.sNoFooter):0<j.length&&(o.nTFoot=j[0],da(o.aoFooter,o.nTFoot));if(e.aaData)for(g=0;g<
|
||||||
t.extend(this,this,Tb)};m.Api=t;t.prototype={any:function(){return 0!==this.flatten().length},concat:y.concat,context:[],each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new t(b[a],this[a]):null},filter:function(a){var b=[];if(y.filter)b=y.filter.call(this,a,this);else for(var c=0,e=this.length;c<e;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new t(this.context,b)},flatten:function(){var a=[];
|
e.aaData.length;g++)N(o,e.aaData[g]);else(o.bDeferLoading||"dom"==y(o))&&ma(o,h(o.nTBody).children("tr"));o.aiDisplay=o.aiDisplayMaster.slice();o.bInitialised=!0;!1===n&&ga(o)}});b=null;return this};var Tb=[],w=Array.prototype,dc=function(a){var b,c,d=m.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===
|
||||||
return new t(this.context,a.concat.apply(a,this.toArray()))},join:y.join,indexOf:y.indexOf||function(a,b){for(var c=b||0,e=this.length;c<e;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,e){var d=[],f,g,h,i,o,l=this.context,q,n,m=this.selector;"string"===typeof a&&(e=c,c=b,b=a,a=!1);g=0;for(h=l.length;g<h;g++){var p=new t(l[g]);if("table"===b)f=c.call(p,l[g],g),f!==k&&d.push(f);else if("columns"===b||"rows"===b)f=c.call(p,l[g],this[g],g),f!==k&&d.push(f);else if("column"===b||"column-rows"===
|
typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};r=function(a,b){if(!(this instanceof r))return new r(a,b);var c=[],d=function(a){(a=dc(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=pa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};r.extend(this,this,Tb)};m.Api=r;h.extend(r.prototype,{any:function(){return 0!==this.count()},concat:w.concat,
|
||||||
b||"row"===b||"cell"===b){n=this[g];"column-rows"===b&&(q=Ca(l[g],m.opts));i=0;for(o=n.length;i<o;i++)f=n[i],f="cell"===b?c.call(p,l[g],f.row,f.column,g,i):c.call(p,l[g],f,g,i,q),f!==k&&d.push(f)}}return d.length||e?(a=new t(l,a?d.concat.apply([],d):d),b=a.selector,b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,a):this},lastIndexOf:y.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(y.map)b=y.map.call(this,a,this);else for(var c=
|
context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new r(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new r(this.context,b)},flatten:function(){var a=[];return new r(this.context,a.concat.apply(a,this.toArray()))},join:w.join,
|
||||||
0,e=this.length;c<e;c++)b.push(a.call(this,this[c],c));return new t(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:y.pop,push:y.push,reduce:y.reduce||function(a,b){return hb(this,a,b,0,this.length,1)},reduceRight:y.reduceRight||function(a,b){return hb(this,a,b,this.length-1,-1,-1)},reverse:y.reverse,selector:null,shift:y.shift,sort:y.sort,splice:y.splice,toArray:function(){return y.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},
|
indexOf:w.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,h,i,n,l=this.context,m,t,p=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(h=l.length;g<h;g++){var o=new r(l[g]);if("table"===b)f=c.call(o,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(o,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){t=this[g];"column-rows"===b&&(m=Da(l[g],
|
||||||
unique:function(){return new t(this.context,Na(this))},unshift:y.unshift};t.extend=function(a,b,c){if(c.length&&b&&(b instanceof t||b.__dt_wrapper)){var e,d,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);t.extend(d,d,c.methodExt);return d}};e=0;for(d=c.length;e<d;e++)f=c[e],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,t.extend(a,b[f.name],f.propExt)}};t.register=r=function(a,b){if(h.isArray(a))for(var c=0,e=a.length;c<
|
p.opts));i=0;for(n=t.length;i<n;i++)f=t[i],f="cell"===b?c.call(o,l[g],f.row,f.column,g,i):c.call(o,l[g],f,g,i,m),f!==k&&e.push(f)}}return e.length||d?(a=new r(l,a?e.concat.apply([],e):e),b=a.selector,b.rows=p.rows,b.cols=p.cols,b.opts=p.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new r(this.context,
|
||||||
e;c++)t.register(a[c],b);else for(var d=a.split("."),f=Tb,g,j,c=0,e=d.length;c<e;c++){g=(j=-1!==d[c].indexOf("()"))?d[c].replace("()",""):d[c];var i;a:{i=0;for(var o=f.length;i<o;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===e-1?i.val=b:f=j?i.methodExt:i.propExt}};t.registerPlural=v=function(a,b,c){t.register(a,c);t.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof t?a.length?h.isArray(a[0])?new t(a.context,
|
b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return hb(this,a,b,0,this.length,1)},reduceRight:w.reduceRight||function(a,b){return hb(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new r(this.context,pa(this))},unshift:w.unshift});r.extend=
|
||||||
a[0]):a[0]:k:a})};r("tables()",function(a){var b;if(a){b=t;var c=this.context;if("number"===typeof a)a=[c[a]];else var e=h.map(c,function(a){return a.nTable}),a=h(e).filter(a).map(function(){var a=h.inArray(this,e);return c[a]}).toArray();b=new b(a)}else b=this;return b});r("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new t(b[0]):a});v("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});v("tables().body()","table().body()",
|
function(a,b,c){if(c.length&&b&&(b instanceof r||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);r.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,r.extend(a,b[f.name],f.propExt)}};r.register=p=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)r.register(a[c],b);else for(var e=a.split("."),f=Tb,g,j,c=0,d=e.length;c<d;c++){g=
|
||||||
function(){return this.iterator("table",function(a){return a.nTBody},1)});v("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});v("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});v("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});r("draw()",function(a){return this.iterator("table",function(b){N(b,
|
(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var n=f.length;i<n;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};r.registerPlural=s=function(a,b,c){r.register(a,c);r.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof r?a.length?h.isArray(a[0])?new r(a.context,a[0]):a[0]:k:a})};p("tables()",function(a){var b;if(a){b=r;var c=this.context;if("number"===
|
||||||
!1===a)})});r("page()",function(a){return a===k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});r("page.info()",function(){if(0===this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a._iDisplayLength,e=a.fnRecordsDisplay(),d=-1===c;return{page:d?0:Math.floor(b/c),pages:d?1:Math.ceil(e/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:e}});r("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:
|
typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,d);return c[a]}).toArray();b=new b(a)}else b=this;return b});p("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new r(b[0]):a});s("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});s("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});s("tables().header()",
|
||||||
k:this.iterator("table",function(b){Ra(b,a)})});var Ub=function(a,b,c){if(c){var e=new t(a);e.one("draw",function(){c(e.ajax.json())})}"ssp"==B(a)?N(a,b):(C(a,!0),ra(a,[],function(c){oa(a);for(var c=sa(a,c),e=0,g=c.length;e<g;e++)K(a,c[e]);N(a,b);C(a,!1)}))};r("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});r("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});r("ajax.reload()",function(a,b){return this.iterator("table",function(c){Ub(c,
|
"table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});s("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});s("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});p("draw()",function(a){return this.iterator("table",function(b){"page"===a?O(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});p("page()",function(a){return a===
|
||||||
!1===b,a)})});r("ajax.url()",function(a){var b=this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});r("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Ub(c,!1===b,a)})});var $a=function(a,b,c,e,d){var f=[],g,j,i,o,l,q;i=typeof b;if(!b||"string"===i||"function"===i||b.length===k)b=[b];i=0;for(o=b.length;i<o;i++){j=
|
k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});p("page.info()",function(){if(0===this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});p("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:
|
||||||
b[i]&&b[i].split?b[i].split(","):[b[i]];l=0;for(q=j.length;l<q;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&f.push.apply(f,g)}a=u.selector[a];if(a.length){i=0;for(o=a.length;i<o;i++)f=a[i](e,d,f)}return f},ab=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},
|
k:this.iterator("table",function(b){Ra(b,a)})});var Ub=function(a,b,c){if(c){var d=new r(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();ra(a,[],function(c){na(a);for(var c=sa(a,c),d=0,e=c.length;d<e;d++)N(a,c[d]);T(a,b);C(a,!1)})}};p("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});p("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});p("ajax.reload()",function(a,
|
||||||
Ca=function(a,b){var c,e,d,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;e=b.order;d=b.page;if("ssp"==B(a))return"removed"===j?[]:V(0,c.length);if("current"==d){c=a._iDisplayStart;for(e=a.fnDisplayEnd();c<e;c++)f.push(g[c])}else if("current"==e||"applied"==e)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,function(a){return-1===h.inArray(a,g)?a:null});else if("index"==e||"original"==e){c=0;for(e=a.aoData.length;c<e;c++)"none"==j?f.push(c):(d=h.inArray(c,g),(-1===d&&"removed"==j||0<=d&&
|
b){return this.iterator("table",function(c){Ub(c,!1===b,a)})});p("ajax.url()",function(a){var b=this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});p("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Ub(c,!1===b,a)})});var $a=function(a,b,c,d,e){var f=[],g,j,i,n,l,m;i=typeof b;if(!b||"string"===i||"function"===
|
||||||
"applied"==j)&&f.push(c))}return f};r("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var d=b;return $a("row",a,function(a){var b=Pb(a);if(b!==null&&!d)return[b];var j=Ca(c,d);if(b!==null&&h.inArray(b,j)!==-1)return[b];if(!a)return j;if(typeof a==="function")return h.map(j,function(b){var d=c.aoData[b];return a(b,d._aData,d.nTr)?b:null});b=Sb(ia(c.aoData,j,"nTr"));return a.nodeName&&h.inArray(a,b)!==-1?[a._DT_RowIndex]:h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},
|
i||b.length===k)b=[b];i=0;for(n=b.length;i<n;i++){j=b[i]&&b[i].split?b[i].split(","):[b[i]];l=0;for(m=j.length;l<m;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=v.selector[a];if(a.length){i=0;for(n=a.length;i<n;i++)f=a[i](d,e,f)}return pa(f)},ab=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=
|
||||||
c,d)},1);c.selector.rows=a;c.selector.opts=b;return c});r("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||k},1)});r("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ia(a.aoData,b,"_aData")},1)});v("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var e=b.aoData[c];return"search"===a?e._aFilterData:e._aSortData},1)});v("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",
|
1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Da=function(a,b){var c,d,e,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;d=b.order;e=b.page;if("ssp"==y(a))return"removed"===j?[]:X(0,c.length);if("current"==e){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==d||"applied"==d)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,function(a){return-1===h.inArray(a,g)?a:null});else if("index"==d||"original"==d){c=0;for(d=a.aoData.length;c<d;c++)"none"==
|
||||||
function(b,c){ca(b,c,a)})});v("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});v("rows().remove()","row().remove()",function(){var a=this;return this.iterator("row",function(b,c,e){var d=b.aoData;d.splice(c,1);for(var f=0,g=d.length;f<g;f++)null!==d[f].nTr&&(d[f].nTr._DT_RowIndex=f);h.inArray(c,b.aiDisplay);pa(b.aiDisplayMaster,c);pa(b.aiDisplay,c);pa(a[e],c,!1);Sa(b)})});r("rows.add()",function(a){var b=this.iterator("table",function(b){var c,
|
j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};p("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=b;return $a("row",a,function(a){var b=Pb(a);if(b!==null&&!e)return[b];var j=Da(c,e);if(b!==null&&h.inArray(b,j)!==-1)return[b];if(!a)return j;if(typeof a==="function")return h.map(j,function(b){var e=c.aoData[b];return a(b,e._aData,e.nTr)?b:null});b=Sb(ha(c.aoData,j,"nTr"));if(a.nodeName){if(a._DT_RowIndex!==
|
||||||
f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ma(b,c)[0]):h.push(K(b,c));return h},1),c=this.rows(-1);c.pop();c.push.apply(c,b.toArray());return c});r("row()",function(a,b){return bb(this.rows(a,b))});r("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;b[0].aoData[this[0]]._aData=a;ca(b[0],this[0],"data");return this});r("row().node()",function(){var a=this.context;return a.length&&this.length?
|
k)return[a._DT_RowIndex];if(a._DT_CellIndex)return[a._DT_CellIndex.row];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){j=c.aIds[a.replace(/^#/,"")];if(j!==k)return[j.idx]}return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});p("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||k},1)});p("rows().data()",function(){return this.iterator(!0,
|
||||||
a[0].aoData[this[0]].nTr||null:null});r("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?ma(b,a)[0]:K(b,a)});return this.row(b[0])});var cb=function(a,b){var c=a.context;c.length&&(c=c[0].aoData[b!==k?b:a[0]],c._details&&(c._details.remove(),c._detailsShow=k,c._details=k))},Vb=function(a,b){var c=a.context;if(c.length&&a.length){var e=c[0].aoData[a[0]];if(e._details){(e._detailsShow=b)?e._details.insertAfter(e.nTr):
|
"rows",function(a,b){return ha(a.aoData,b,"_aData")},1)});s("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});s("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){ca(b,c,a)})});s("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});s("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,
|
||||||
e._details.detach();var d=c[0],f=new t(d),g=d.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<D(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){d===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(d===b)for(var c,e=aa(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",e)}),f.on("destroy.dt.DT_details",
|
d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new r(c,b)});s("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,n,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(n=l.length;i<n;i++)l[i]._DT_CellIndex.row=g}oa(b.aiDisplayMaster,c);oa(b.aiDisplay,c);oa(a[d],c,!1);
|
||||||
function(a,b){if(d===b)for(var c=0,e=g.length;c<e;c++)g[c]._details&&cb(f,c)}))}}};r("row().child()",function(a,b){var c=this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)cb(this);else if(c.length&&this.length){var e=c[0],c=c[0].aoData[this[0]],d=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?d.push(a):(c=h("<tr><td/></tr>").addClass(b),
|
Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});p("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ma(b,c)[0]):h.push(N(b,c));return h},1),c=this.rows(-1);c.pop();h.merge(c,b);return c});p("row()",function(a,b){return bb(this.rows(a,b))});p("row().data()",function(a){var b=
|
||||||
h("td",c).addClass(b).html(a)[0].colSpan=aa(e),d.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(d);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});r(["row().child.show()","row().child().show()"],function(){Vb(this,!0);return this});r(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});r(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});r("row().child.isShown()",function(){var a=this.context;return a.length&&
|
this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;b[0].aoData[this[0]]._aData=a;ca(b[0],this[0],"data");return this});p("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});p("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?ma(b,a)[0]:N(b,a)});return this.row(b[0])});var cb=function(a,b){var c=a.context;if(c.length&&
|
||||||
this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var dc=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,e,d){for(var c=[],e=0,f=d.length;e<f;e++)c.push(x(a,d[e],b));return c};r("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var d=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return $a("column",d,function(a){var b=Pb(a);if(a==="")return V(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var d=Ca(c,
|
(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Vb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new r(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<F(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];
|
||||||
f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,d),i[f])?f:null})}var k=typeof a==="string"?a.match(dc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});return[m[m.length+b]]}return[la(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null})}else return h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray()},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});v("columns().header()",
|
a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=aa(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&cb(f,c)}))}}};p("row().child()",function(a,b){var c=this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===
|
||||||
"column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});v("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});v("columns().data()","column().data()",function(){return this.iterator("column-rows",Wb,1)});v("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});v("columns().cache()","column().cache()",
|
a)cb(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=aa(d),e.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});p(["row().child.show()","row().child().show()"],function(){Vb(this,
|
||||||
function(a){return this.iterator("column-rows",function(b,c,e,d,f){return ia(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});v("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,e,d){return ia(a.aoData,d,"anCells",b)},1)});v("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,e){if(a===k)return c.aoColumns[e].bVisible;var d=c.aoColumns,f=d[e],g=c.aoData,j,i,m;if(a!==k&&f.bVisible!==a){if(a){var l=
|
!0);return this});p(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});p(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});p("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var ec=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};p("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&
|
||||||
h.inArray(!0,D(d,"bVisible"),e+1);j=0;for(i=g.length;j<i;j++)m=g[j].nTr,d=g[j].anCells,m&&m.insertBefore(d[e],d[l]||null)}else h(D(c.aoData,"anCells",e)).detach();f.bVisible=a;ea(c,c.aoHeader);ea(c,c.aoFooter);if(b===k||b)X(c),(c.oScroll.sX||c.oScroll.sY)&&Y(c);w(c,null,"column-visibility",[c,e,a]);ya(c)}})});v("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});r("columns.adjust()",function(){return this.iterator("table",
|
(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=F(g,"sName"),i=F(g,"nTh");return $a("column",e,function(a){var b=Pb(a);if(a==="")return X(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Da(c,f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(ec):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});
|
||||||
function(a){X(a)},1)});r("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return la(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});r("column()",function(a,b){return bb(this.columns(a,b))});r("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=ab(c),f=b.aoData,g=Ca(b,e),i=Sb(ia(f,g,"anCells")),
|
return[m[m.length+b]]}return[Z(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});s("columns().header()","column().header()",function(){return this.iterator("column",
|
||||||
j=h([].concat.apply([],i)),l,m=b.aoColumns.length,o,r,t,s,u,v;return $a("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){o=[];r=0;for(t=g.length;r<t;r++){l=g[r];for(s=0;s<m;s++){u={row:l,column:s};if(c){v=b.aoData[l];a(u,x(b,l,s),v.anCells?v.anCells[s]:null)&&o.push(u)}else o.push(u)}}return o}return h.isPlainObject(a)?[a]:j.filter(a).map(function(a,b){l=b.parentNode._DT_RowIndex;return{row:l,column:h.inArray(b,f[l].anCells)}}).toArray()},b,e)});var e=this.columns(b,c),d=this.rows(a,
|
function(a,b){return a.aoColumns[b].nTh},1)});s("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});s("columns().data()","column().data()",function(){return this.iterator("column-rows",Wb,1)});s("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});s("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,
|
||||||
c),f,g,j,i,m,l=this.iterator("table",function(a,b){f=[];g=0;for(j=d[b].length;g<j;g++){i=0;for(m=e[b].length;i<m;i++)f.push({row:d[b][g],column:e[b][i]})}return f},1);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});v("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b].anCells)?a[c]:k},1)});r("cells().data()",function(){return this.iterator("cell",function(a,b,c){return x(a,b,c)},1)});v("cells().cache()","cell().cache()",function(a){a=
|
c,d,e,f){return ha(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});s("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ha(a.aoData,e,"anCells",b)},1)});s("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,d){if(a===k)return c.aoColumns[d].bVisible;var e=c.aoColumns,f=e[d],g=c.aoData,j,i,n;if(a!==k&&f.bVisible!==a){if(a){var l=h.inArray(!0,F(e,"bVisible"),d+1);j=0;for(i=g.length;j<
|
||||||
"search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,e){return b.aoData[c][a][e]},1)});v("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,e){return x(b,c,e,a)},1)});v("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:$(a,c)}},1)});v("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,e){ca(b,c,a,e)})});r("cell()",
|
i;j++)n=g[j].nTr,e=g[j].anCells,n&&n.insertBefore(e[d],e[l]||null)}else h(F(c.aoData,"anCells",d)).detach();f.bVisible=a;ea(c,c.aoHeader);ea(c,c.aoFooter);(b===k||b)&&U(c);u(c,null,"column-visibility",[c,d,a,b]);ya(c)}})});s("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});p("columns.adjust()",function(){return this.iterator("table",function(a){U(a)},1)});p("column.index()",function(a,b){if(0!==this.context.length){var c=
|
||||||
function(a,b,c){return bb(this.cells(a,b,c))});r("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?x(b[0],c[0].row,c[0].column):k;Ia(b[0],c[0].row,c[0].column,a);ca(b[0],c[0].row,"data",c[0].column);return this});r("order()",function(a,b){var c=this.context;if(a===k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:h.isArray(a[0])||(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});
|
this.context[0];if("fromVisible"===a||"toData"===a)return Z(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});p("column()",function(a,b){return bb(this.columns(a,b))});p("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=ab(c),f=b.aoData,g=Da(b,e),j=Sb(ha(f,g,"anCells")),i=h([].concat.apply([],j)),l,n=b.aoColumns.length,m,p,r,u,v,s;return $a("cell",d,function(a){var c=
|
||||||
r("order.listener()",function(a,b,c){return this.iterator("table",function(e){Oa(e,a,b,c)})});r(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,e){var d=[];h.each(b[e],function(b,c){d.push([c,a])});c.aaSorting=d})});r("search()",function(a,b,c,e){var d=this.context;return a===k?0!==d.length?d[0].oPreviousSearch.sSearch:k:this.iterator("table",function(d){d.oFeatures.bFilter&&fa(d,h.extend({},d.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:
|
typeof a==="function";if(a===null||a===k||c){m=[];p=0;for(r=g.length;p<r;p++){l=g[p];for(u=0;u<n;u++){v={row:l,column:u};if(c){s=f[l];a(v,B(b,l,u),s.anCells?s.anCells[u]:null)&&m.push(v)}else m.push(v)}}return m}if(h.isPlainObject(a))return[a];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||!a.nodeName)return c;s=h(a).closest("*[data-dt-row]");return s.length?[{row:s.data("dt-row"),column:s.data("dt-column")}]:[]},b,e)});var d=
|
||||||
b,bSmart:null===c?!0:c,bCaseInsensitive:null===e?!0:e}),1)})});v("columns().search()","column().search()",function(a,b,c,e){return this.iterator("column",function(d,f){var g=d.aoPreSearchCols;if(a===k)return g[f].sSearch;d.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===e?!0:e}),fa(d,d.oPreviousSearch,1))})});r("state()",function(){return this.context.length?this.context[0].oSavedState:null});r("state.clear()",function(){return this.iterator("table",
|
this.columns(b,c),e=this.rows(a,c),f,g,j,i,n,l=this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(n=d[b].length;i<n;i++)f.push({row:e[b][g],column:d[b][i]})}return f},1);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});s("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:k},1)});p("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});s("cells().cache()",
|
||||||
function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});r("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});r("state.save()",function(){return this.iterator("table",function(a){ya(a)})});m.versionCheck=m.fnVersionCheck=function(a){for(var b=m.version.split("."),a=a.split("."),c,e,d=0,f=a.length;d<f;d++)if(c=parseInt(b[d],10)||0,e=parseInt(a[d],10)||0,c!==e)return c>e;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings,
|
"cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});s("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});s("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:$(a,c)}},1)});s("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,
|
||||||
function(a,d){var f=d.nScrollHead?h("table",d.nScrollHead)[0]:null,g=d.nScrollFoot?h("table",d.nScrollFoot)[0]:null;if(d.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){return h.map(m.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable})};m.util={throttle:ua,escapeRegex:va};m.camelToHungarian=H;r("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,
|
c,d){ca(b,c,a,d)})});p("cell()",function(a,b,c){return bb(this.cells(a,b,c))});p("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],c[0].row,c[0].column):k;jb(b[0],c[0].row,c[0].column,a);ca(b[0],c[0].row,"data",c[0].column);return this});p("order()",function(a,b){var c=this.context;if(a===k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:h.isArray(a[0])||(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=
|
||||||
b){r(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||(a[0]+=".dt");var e=h(this.tables().nodes());e[b].apply(e,a);return this})});r("clear()",function(){return this.iterator("table",function(a){oa(a)})});r("settings()",function(){return new t(this.context,this.context)});r("init()",function(){var a=this.context;return a.length?a[0].oInit:null});r("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});r("destroy()",
|
a.slice()})});p("order.listener()",function(a,b,c){return this.iterator("table",function(d){Oa(d,a,b,c)})});p("order.fixed()",function(a){if(!a){var b=this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});p(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});p("search()",function(a,
|
||||||
function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,e=b.oClasses,d=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(d),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),q;b.bDestroying=!0;w(b,"aoDestroyCallback","destroy",[b]);a||(new t(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(Ea).unbind(".DT-"+b.sInstance);d!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&d!=j.parentNode&&(i.children("tfoot").detach(),
|
b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&fa(e,h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});s("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===
|
||||||
i.append(j));i.detach();k.detach();b.aaSorting=[];b.aaSortingFixed=[];xa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(e.sSortable+" "+e.sSortableAsc+" "+e.sSortableDesc+" "+e.sSortableNone);b.bJUI&&(h("th span."+e.sSortIcon+", td span."+e.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+e.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));!a&&c&&c.insertBefore(d,b.nTableReinsertBefore);f.children().detach();f.append(l);i.css("width",b.sDestroyWidth).removeClass(e.sTable);
|
c?!0:c,bCaseInsensitive:null===d?!0:d}),fa(e,e.oPreviousSearch,1))})});p("state()",function(){return this.context.length?this.context[0].oSavedState:null});p("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});p("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});p("state.save()",function(){return this.iterator("table",function(a){ya(a)})});m.versionCheck=m.fnVersionCheck=function(a){for(var b=
|
||||||
(q=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%q])});c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){r(b+"s().every()",function(a){return this.iterator(b,function(e,d,f){a.call((new t(e))[b](d,f))})})});r("i18n()",function(a,b,c){var e=this.context[0],a=R(a)(e.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.7";m.settings=
|
m.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a||
|
||||||
[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",
|
a&&h(b.nTable).is(":visible"))return b.nTable});return b?new r(c):c};m.util={throttle:ua,escapeRegex:va};m.camelToHungarian=K;p("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){p(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||(a[0]+=".dt");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});p("clear()",function(){return this.iterator("table",
|
||||||
sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,
|
function(a){na(a)})});p("settings()",function(){return new r(this.context,this.context)});p("init()",function(){var a=this.context;return a.length?a[0].oInit:null});p("data()",function(){return this.iterator("table",function(a){return F(a.aoData,"_aData")}).flatten()});p("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),
|
||||||
fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,
|
p;b.bDestroying=!0;u(b,"aoDestroyCallback","destroy",[b]);a||(new r(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(D).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];xa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(h("th span."+
|
||||||
fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},
|
d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%p])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column",
|
||||||
sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,
|
"row","cell"],function(a,b){p(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,n){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,n)})})});p("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.11";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null,
|
||||||
sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null};W(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};W(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,
|
_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults=
|
||||||
bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],
|
{aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
|
||||||
sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,
|
this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+
|
||||||
bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==B(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==B(this)?1*this._iRecordsDisplay:
|
"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",
|
||||||
this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,e=this.aiDisplay.length,d=this.oFeatures,f=d.bPaginate;return d.bServerSide?!1===f||-1===a?b+e:Math.min(b+a,this._iRecordsDisplay):!f||c>e||-1===a?e:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}};m.ext=u={buttons:{},classes:{},errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},
|
sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};
|
||||||
header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(u,{afnFiltering:u.search,aTypes:u.type.detect,ofnSearch:u.type.search,oSort:u.type.order,afnSortData:u.order,aoFeatures:u.feature,oApi:u.internal,oStdClasses:u.classes,oPagination:u.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",
|
Y(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};Y(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,
|
||||||
|
bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],
|
||||||
|
aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,
|
||||||
|
aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=
|
||||||
|
this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};m.ext=v={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},
|
||||||
|
header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(v,{afnFiltering:v.search,aTypes:v.type.detect,ofnSearch:v.type.search,oSort:v.type.order,afnSortData:v.order,aoFeatures:v.feature,oApi:v.internal,oStdClasses:v.classes,oPagination:v.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",
|
||||||
sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",
|
sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",
|
||||||
sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Da="",Da="",F=Da+"ui-state-default",ja=Da+"css_right ui-icon ui-icon-",Xb=Da+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses,
|
sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ea="",Ea="",H=Ea+"ui-state-default",ia=Ea+"css_right ui-icon ui-icon-",Xb=Ea+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses,
|
||||||
m.ext.classes,{sPageButton:"fg-button ui-button "+F,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:F+" sorting_asc",sSortDesc:F+" sorting_desc",sSortable:F+" sorting",sSortableAsc:F+" sorting_asc_disabled",sSortableDesc:F+" sorting_desc_disabled",sSortableNone:F+" sorting_disabled",sSortJUIAsc:ja+"triangle-1-n",sSortJUIDesc:ja+"triangle-1-s",sSortJUI:ja+"carat-2-n-s",
|
m.ext.classes,{sPageButton:"fg-button ui-button "+H,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:H+" sorting_asc",sSortDesc:H+" sorting_desc",sSortable:H+" sorting",sSortableAsc:H+" sorting_asc_disabled",sSortableDesc:H+" sorting_desc_disabled",sSortableNone:H+" sorting_disabled",sSortJUIAsc:ia+"triangle-1-n",sSortJUIDesc:ia+"triangle-1-s",sSortJUI:ia+"carat-2-n-s",
|
||||||
sSortJUIAscAllowed:ja+"carat-1-n",sSortJUIDescAllowed:ja+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+F,sScrollFoot:"dataTables_scrollFoot "+F,sHeaderTH:F,sFooterTH:F,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(a,b){return["previous",
|
sSortJUIAscAllowed:ia+"carat-1-n",sSortJUIDescAllowed:ia+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+H,sScrollFoot:"dataTables_scrollFoot "+H,sHeaderTH:H,sFooterTH:H,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[Aa(a,
|
||||||
Wa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Wa(a,b),"next","last"]},_numbers:Wa,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,e,d,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i,k,l=0,m=function(b,e){var n,r,t,s,u=function(b){Ta(a,b.data.action,true)};n=0;for(r=e.length;n<r;n++){s=e[n];if(h.isArray(s)){t=h("<"+(s.DT_el||"div")+"/>").appendTo(b);m(t,s)}else{k=i="";switch(s){case "ellipsis":b.append('<span class="ellipsis">…</span>');break;
|
b)]},simple_numbers:function(a,b){return["previous",Aa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Aa(a,b),"next","last"]},_numbers:Aa,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},k,l,m=0,p=function(b,d){var o,r,u,s,v=function(b){Ta(a,b.data.action,true)};o=0;for(r=d.length;o<r;o++){s=d[o];if(h.isArray(s)){u=h("<"+(s.DT_el||"div")+"/>").appendTo(b);p(u,s)}else{k=null;
|
||||||
case "first":i=j.sFirst;k=s+(d>0?"":" "+g.sPageButtonDisabled);break;case "previous":i=j.sPrevious;k=s+(d>0?"":" "+g.sPageButtonDisabled);break;case "next":i=j.sNext;k=s+(d<f-1?"":" "+g.sPageButtonDisabled);break;case "last":i=j.sLast;k=s+(d<f-1?"":" "+g.sPageButtonDisabled);break;default:i=s+1;k=d===s?g.sPageButtonActive:""}if(i){t=h("<a>",{"class":g.sPageButton+" "+k,"aria-controls":a.sTableId,"data-dt-idx":l,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(i).appendTo(b);
|
l="";switch(s){case "ellipsis":b.append('<span class="ellipsis">…</span>');break;case "first":k=j.sFirst;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":k=j.sPrevious;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":k=j.sNext;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":k=j.sLast;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:k=s+1;l=e===s?g.sPageButtonActive:""}if(k!==null){u=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[s],
|
||||||
Va(t,{action:s},u);l++}}}},n;try{n=h(Q.activeElement).data("dt-idx")}catch(r){}m(h(b).empty(),e);n&&h(b).find("[data-dt-idx="+n+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!ac.test(a)||!bc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||J(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;
|
"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(k).appendTo(b);Wa(u,{action:s},v);m++}}}},r;try{r=h(b).find(I.activeElement).data("dt-idx")}catch(o){}p(h(b).empty(),d);r&&h(b).find("[data-dt-idx="+r+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!bc.test(a)||!cc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":
|
||||||
return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return J(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return J(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ba,""):""},string:function(a){return J(a)?a:"string"===typeof a?a.replace(Ob," "):a}});var Aa=function(a,b,c,e){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")),
|
null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ca,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob,
|
||||||
e&&(a=a.replace(e,"")));return 1*a};h.extend(u.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return J(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return J(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,e){h(a.nTable).on("order.dt.DT",function(d,
|
" "):a}});var Ba=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(v.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,
|
||||||
f,g,h){if(a===f){d=c.idx;b.removeClass(c.sSortingClass+" "+e.sSortAsc+" "+e.sSortDesc).addClass(h[d]=="asc"?e.sSortAsc:h[d]=="desc"?e.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,e){h("<div/>").addClass(e.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(e.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(d,f,g,h){if(a===f){d=c.idx;b.removeClass(e.sSortAsc+" "+e.sSortDesc).addClass(h[d]=="asc"?e.sSortAsc:h[d]=="desc"?e.sSortDesc:c.sSortingClass);
|
b){return a<b?1:a>b?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,
|
||||||
b.find("span."+e.sSortIcon).removeClass(e.sSortJUIAsc+" "+e.sSortJUIDesc+" "+e.sSortJUI+" "+e.sSortJUIAscAllowed+" "+e.sSortJUIDescAllowed).addClass(h[d]=="asc"?e.sSortJUIAsc:h[d]=="desc"?e.sSortJUIDesc:c.sSortingClassJUI)}})}}});m.render={number:function(a,b,c,e){return{display:function(d){if("number"!==typeof d&&"string"!==typeof d)return d;var f=0>d?"-":"",d=Math.abs(parseFloat(d)),g=parseInt(d,10),d=c?b+(d-g).toFixed(c).substring(2):"";return f+(e||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
|
f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Yb=function(a){return"string"===typeof a?a.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):a};m.render={number:function(a,
|
||||||
a)+d}}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:kb,_fnAjaxParameters:tb,_fnAjaxUpdateDraw:ub,_fnAjaxDataSrc:sa,_fnAddColumn:Fa,_fnColumnOptions:ka,_fnAdjustColumnSizing:X,_fnVisibleToColumnIndex:la,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:Z,_fnColumnTypes:Ha,_fnApplyColumnDefs:ib,_fnHungarianMap:W,_fnCamelToHungarian:H,_fnLanguageCompat:P,_fnBrowserDetect:gb,_fnAddData:K,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:
|
b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Yb(f);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:Yb}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:lb,_fnAjaxParameters:ub,_fnAjaxUpdateDraw:vb,_fnAjaxDataSrc:sa,_fnAddColumn:Ga,_fnColumnOptions:ja,
|
||||||
null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:x,_fnSetCellData:Ia,_fnSplitObjNotation:Ka,_fnGetObjectDataFn:R,_fnSetObjectDataFn:S,_fnGetDataMaster:La,_fnClearTable:oa,_fnDeleteIndex:pa,_fnInvalidate:ca,_fnGetRowElements:na,_fnCreateTr:Ja,_fnBuildHead:jb,_fnDrawHead:ea,_fnDraw:M,_fnReDraw:N,_fnAddOptionsHtml:mb,_fnDetectHeader:da,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:ob,_fnFilterComplete:fa,_fnFilterCustom:xb,_fnFilterColumn:wb,_fnFilter:vb,_fnFilterCreateSearch:Qa,
|
_fnAdjustColumnSizing:U,_fnVisibleToColumnIndex:Z,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:la,_fnColumnTypes:Ia,_fnApplyColumnDefs:ib,_fnHungarianMap:Y,_fnCamelToHungarian:K,_fnLanguageCompat:Fa,_fnBrowserDetect:gb,_fnAddData:N,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:jb,_fnSplitObjNotation:La,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R,
|
||||||
_fnEscapeRegex:va,_fnFilterData:yb,_fnFeatureHtmlInfo:rb,_fnUpdateInfo:Bb,_fnInfoMacros:Cb,_fnInitialise:ga,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:nb,_fnFeatureHtmlPaginate:sb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:pb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:qb,_fnScrollDraw:Y,_fnApplyToChildren:G,_fnCalculateColumnWidths:Ga,_fnThrottle:ua,_fnConvertToWidth:Db,_fnScrollingWidthAdjust:Fb,_fnGetWidestNode:Eb,_fnGetMaxLenString:Gb,_fnStringToCss:s,_fnScrollBarWidth:Hb,_fnSortFlatten:U,
|
_fnGetDataMaster:Ma,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ca,_fnGetRowElements:Ka,_fnCreateTr:Ja,_fnBuildHead:kb,_fnDrawHead:ea,_fnDraw:O,_fnReDraw:T,_fnAddOptionsHtml:nb,_fnDetectHeader:da,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:pb,_fnFilterComplete:fa,_fnFilterCustom:yb,_fnFilterColumn:xb,_fnFilter:wb,_fnFilterCreateSearch:Qa,_fnEscapeRegex:va,_fnFilterData:zb,_fnFeatureHtmlInfo:sb,_fnUpdateInfo:Cb,_fnInfoMacros:Db,_fnInitialise:ga,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:ob,
|
||||||
_fnSort:lb,_fnSortAria:Jb,_fnSortListener:Ua,_fnSortAttachListener:Oa,_fnSortingClasses:xa,_fnSortData:Ib,_fnSaveState:ya,_fnLoadState:Kb,_fnSettingsFromNode:za,_fnLog:I,_fnMap:E,_fnBindAction:Va,_fnCallbackReg:z,_fnCallbackFire:w,_fnLengthOverflow:Sa,_fnRenderer:Pa,_fnDataSource:B,_fnRowAttributes:Ma,_fnCalculateEnd:function(){}});h.fn.dataTable=m;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=
|
_fnFeatureHtmlPaginate:tb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:qb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:rb,_fnScrollDraw:ka,_fnApplyToChildren:J,_fnCalculateColumnWidths:Ha,_fnThrottle:ua,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:x,_fnSortFlatten:W,_fnSort:mb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Oa,_fnSortingClasses:xa,_fnSortData:Ib,_fnSaveState:ya,_fnLoadState:Kb,_fnSettingsFromNode:za,_fnLog:L,_fnMap:E,_fnBindAction:Wa,_fnCallbackReg:z,
|
||||||
b});return h.fn.dataTable};"function"===typeof define&&define.amd?define("datatables",["jquery"],P):"object"===typeof exports?module.exports=P(require("jquery")):jQuery&&!jQuery.fn.dataTable&&P(jQuery)})(window,document);
|
_fnCallbackFire:u,_fnLengthOverflow:Sa,_fnRenderer:Pa,_fnDataSource:y,_fnRowAttributes:Na,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});
|
||||||
|
|||||||
49
data/interfaces/default/js/pnotify.custom.min.js
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
PNotify 3.0.0 sciactive.com/pnotify/
|
||||||
|
(C) 2015 Hunter Perrin; Google, Inc.
|
||||||
|
license Apache-2.0
|
||||||
|
*/
|
||||||
|
(function(b,k){"function"===typeof define&&define.amd?define("pnotify",["jquery"],function(q){return k(q,b)}):"object"===typeof exports&&"undefined"!==typeof module?module.exports=k(require("jquery"),global||b):b.PNotify=k(b.jQuery,b)})(this,function(b,k){var q=function(l){var k={dir1:"down",dir2:"left",push:"bottom",spacing1:36,spacing2:36,context:b("body"),modal:!1},g,h,n=b(l),r=function(){h=b("body");d.prototype.options.stack.context=h;n=b(l);n.bind("resize",function(){g&&clearTimeout(g);g=setTimeout(function(){d.positionAll(!0)},
|
||||||
|
10)})},s=function(c){var a=b("<div />",{"class":"ui-pnotify-modal-overlay"});a.prependTo(c.context);c.overlay_close&&a.click(function(){d.removeStack(c)});return a},d=function(c){this.parseOptions(c);this.init()};b.extend(d.prototype,{version:"3.0.0",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"brighttheme",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,animation:"fade",animate_speed:"normal",shadow:!0,hide:!0,delay:8E3,mouse_reset:!0,
|
||||||
|
remove:!0,insert_brs:!0,destroy:!0,stack:k},modules:{},runModules:function(c,a){var p,b;for(b in this.modules)p="object"===typeof a&&b in a?a[b]:a,"function"===typeof this.modules[b][c]&&(this.modules[b].notice=this,this.modules[b].options="object"===typeof this.options[b]?this.options[b]:{},this.modules[b][c](this,"object"===typeof this.options[b]?this.options[b]:{},p))},state:"initializing",timer:null,animTimer:null,styles:null,elem:null,container:null,title_container:null,text_container:null,animating:!1,
|
||||||
|
timerHide:!1,init:function(){var c=this;this.modules={};b.extend(!0,this.modules,d.prototype.modules);this.styles="object"===typeof this.options.styling?this.options.styling:d.styling[this.options.styling];this.elem=b("<div />",{"class":"ui-pnotify "+this.options.addclass,css:{display:"none"},"aria-live":"assertive","aria-role":"alertdialog",mouseenter:function(a){if(c.options.mouse_reset&&"out"===c.animating){if(!c.timerHide)return;c.cancelRemove()}c.options.hide&&c.options.mouse_reset&&c.cancelRemove()},
|
||||||
|
mouseleave:function(a){c.options.hide&&c.options.mouse_reset&&"out"!==c.animating&&c.queueRemove();d.positionAll()}});"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed);this.container=b("<div />",{"class":this.styles.container+" ui-pnotify-container "+("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),role:"alert"}).appendTo(this.elem);""!==
|
||||||
|
this.options.cornerclass&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass);this.options.shadow&&this.container.addClass("ui-pnotify-shadow");!1!==this.options.icon&&b("<div />",{"class":"ui-pnotify-icon"}).append(b("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container);
|
||||||
|
this.title_container=b("<h4 />",{"class":"ui-pnotify-title"}).appendTo(this.container);!1===this.options.title?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title);this.text_container=b("<div />",{"class":"ui-pnotify-text","aria-role":"alert"}).appendTo(this.container);!1===this.options.text?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?
|
||||||
|
String(this.options.text).replace(/\n/g,"<br />"):this.options.text);"string"===typeof this.options.width&&this.elem.css("width",this.options.width);"string"===typeof this.options.min_height&&this.container.css("min-height",this.options.min_height);d.notices="top"===this.options.stack.push?b.merge([this],d.notices):b.merge(d.notices,[this]);"top"===this.options.stack.push&&this.queuePosition(!1,1);this.options.stack.animation=!1;this.runModules("init");this.options.auto_display&&this.open();return this},
|
||||||
|
update:function(c){var a=this.options;this.parseOptions(a,c);this.elem.removeClass("ui-pnotify-fade-slow ui-pnotify-fade-normal ui-pnotify-fade-fast");"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed);this.options.cornerclass!==a.cornerclass&&this.container.removeClass("ui-corner-all "+a.cornerclass).addClass(this.options.cornerclass);this.options.shadow!==a.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-shadow"):this.container.removeClass("ui-pnotify-shadow"));
|
||||||
|
!1===this.options.addclass?this.elem.removeClass(a.addclass):this.options.addclass!==a.addclass&&this.elem.removeClass(a.addclass).addClass(this.options.addclass);!1===this.options.title?this.title_container.slideUp("fast"):this.options.title!==a.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),!1===a.title&&this.title_container.slideDown(200));!1===this.options.text?this.text_container.slideUp("fast"):this.options.text!==
|
||||||
|
a.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),!1===a.text&&this.text_container.slideDown(200));this.options.type!==a.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?
|
||||||
|
this.styles.success:this.styles.notice);if(this.options.icon!==a.icon||!0===this.options.icon&&this.options.type!==a.type)this.container.find("div.ui-pnotify-icon").remove(),!1!==this.options.icon&&b("<div />",{"class":"ui-pnotify-icon"}).append(b("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container);
|
||||||
|
this.options.width!==a.width&&this.elem.animate({width:this.options.width});this.options.min_height!==a.min_height&&this.container.animate({minHeight:this.options.min_height});this.options.hide?a.hide||this.queueRemove():this.cancelRemove();this.queuePosition(!0);this.runModules("update",a);return this},open:function(){this.state="opening";this.runModules("beforeOpen");var c=this;this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:h);"top"!==this.options.stack.push&&
|
||||||
|
this.position(!0);this.animateIn(function(){c.queuePosition(!0);c.options.hide&&c.queueRemove();c.state="open";c.runModules("afterOpen")});return this},remove:function(c){this.state="closing";this.timerHide=!!c;this.runModules("beforeClose");var a=this;this.timer&&(l.clearTimeout(this.timer),this.timer=null);this.animateOut(function(){a.state="closed";a.runModules("afterClose");a.queuePosition(!0);a.options.remove&&a.elem.detach();a.runModules("beforeDestroy");if(a.options.destroy&&null!==d.notices){var c=
|
||||||
|
b.inArray(a,d.notices);-1!==c&&d.notices.splice(c,1)}a.runModules("afterDestroy")});return this},get:function(){return this.elem},parseOptions:function(c,a){this.options=b.extend(!0,{},d.prototype.options);this.options.stack=d.prototype.options.stack;for(var p=[c,a],m,f=0;f<p.length;f++){m=p[f];if("undefined"===typeof m)break;if("object"!==typeof m)this.options.text=m;else for(var e in m)this.modules[e]?b.extend(!0,this.options[e],m[e]):this.options[e]=m[e]}},animateIn:function(c){this.animating=
|
||||||
|
"in";var a=this;c=function(){a.animTimer&&clearTimeout(a.animTimer);"in"===a.animating&&(a.elem.is(":visible")?(this&&this.call(),a.animating=!1):a.animTimer=setTimeout(c,40))}.bind(c);"fade"===this.options.animation?(this.elem.one("webkitTransitionEnd mozTransitionEnd MSTransitionEnd oTransitionEnd transitionend",c).addClass("ui-pnotify-in"),this.elem.css("opacity"),this.elem.addClass("ui-pnotify-fade-in"),this.animTimer=setTimeout(c,650)):(this.elem.addClass("ui-pnotify-in"),c())},animateOut:function(c){this.animating=
|
||||||
|
"out";var a=this;c=function(){a.animTimer&&clearTimeout(a.animTimer);"out"===a.animating&&("0"!=a.elem.css("opacity")&&a.elem.is(":visible")?a.animTimer=setTimeout(c,40):(a.elem.removeClass("ui-pnotify-in"),this&&this.call(),a.animating=!1))}.bind(c);"fade"===this.options.animation?(this.elem.one("webkitTransitionEnd mozTransitionEnd MSTransitionEnd oTransitionEnd transitionend",c).removeClass("ui-pnotify-fade-in"),this.animTimer=setTimeout(c,650)):(this.elem.removeClass("ui-pnotify-in"),c())},position:function(c){var a=
|
||||||
|
this.options.stack,b=this.elem;"undefined"===typeof a.context&&(a.context=h);if(a){"number"!==typeof a.nextpos1&&(a.nextpos1=a.firstpos1);"number"!==typeof a.nextpos2&&(a.nextpos2=a.firstpos2);"number"!==typeof a.addpos2&&(a.addpos2=0);var d=!b.hasClass("ui-pnotify-in");if(!d||c){a.modal&&(a.overlay?a.overlay.show():a.overlay=s(a));b.addClass("ui-pnotify-move");var f;switch(a.dir1){case "down":f="top";break;case "up":f="bottom";break;case "left":f="right";break;case "right":f="left"}c=parseInt(b.css(f).replace(/(?:\..*|[^0-9.])/g,
|
||||||
|
""));isNaN(c)&&(c=0);"undefined"!==typeof a.firstpos1||d||(a.firstpos1=c,a.nextpos1=a.firstpos1);var e;switch(a.dir2){case "down":e="top";break;case "up":e="bottom";break;case "left":e="right";break;case "right":e="left"}c=parseInt(b.css(e).replace(/(?:\..*|[^0-9.])/g,""));isNaN(c)&&(c=0);"undefined"!==typeof a.firstpos2||d||(a.firstpos2=c,a.nextpos2=a.firstpos2);if("down"===a.dir1&&a.nextpos1+b.height()>(a.context.is(h)?n.height():a.context.prop("scrollHeight"))||"up"===a.dir1&&a.nextpos1+b.height()>
|
||||||
|
(a.context.is(h)?n.height():a.context.prop("scrollHeight"))||"left"===a.dir1&&a.nextpos1+b.width()>(a.context.is(h)?n.width():a.context.prop("scrollWidth"))||"right"===a.dir1&&a.nextpos1+b.width()>(a.context.is(h)?n.width():a.context.prop("scrollWidth")))a.nextpos1=a.firstpos1,a.nextpos2+=a.addpos2+("undefined"===typeof a.spacing2?25:a.spacing2),a.addpos2=0;"number"===typeof a.nextpos2&&(a.animation?b.css(e,a.nextpos2+"px"):(b.removeClass("ui-pnotify-move"),b.css(e,a.nextpos2+"px"),b.css(e),b.addClass("ui-pnotify-move")));
|
||||||
|
switch(a.dir2){case "down":case "up":b.outerHeight(!0)>a.addpos2&&(a.addpos2=b.height());break;case "left":case "right":b.outerWidth(!0)>a.addpos2&&(a.addpos2=b.width())}"number"===typeof a.nextpos1&&(a.animation?b.css(f,a.nextpos1+"px"):(b.removeClass("ui-pnotify-move"),b.css(f,a.nextpos1+"px"),b.css(f),b.addClass("ui-pnotify-move")));switch(a.dir1){case "down":case "up":a.nextpos1+=b.height()+("undefined"===typeof a.spacing1?25:a.spacing1);break;case "left":case "right":a.nextpos1+=b.width()+("undefined"===
|
||||||
|
typeof a.spacing1?25:a.spacing1)}}return this}},queuePosition:function(b,a){g&&clearTimeout(g);a||(a=10);g=setTimeout(function(){d.positionAll(b)},a);return this},cancelRemove:function(){this.timer&&l.clearTimeout(this.timer);this.animTimer&&l.clearTimeout(this.animTimer);"closing"===this.state&&(this.state="open",this.animating=!1,this.elem.addClass("ui-pnotify-in"),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-in"));return this},queueRemove:function(){var b=this;this.cancelRemove();
|
||||||
|
this.timer=l.setTimeout(function(){b.remove(!0)},isNaN(this.options.delay)?0:this.options.delay);return this}});b.extend(d,{notices:[],reload:q,removeAll:function(){b.each(d.notices,function(){this.remove&&this.remove(!1)})},removeStack:function(c){b.each(d.notices,function(){this.remove&&this.options.stack===c&&this.remove(!1)})},positionAll:function(c){g&&clearTimeout(g);g=null;if(d.notices&&d.notices.length)b.each(d.notices,function(){var a=this.options.stack;a&&(a.overlay&&a.overlay.hide(),a.nextpos1=
|
||||||
|
a.firstpos1,a.nextpos2=a.firstpos2,a.addpos2=0,a.animation=c)}),b.each(d.notices,function(){this.position()});else{var a=d.prototype.options.stack;a&&(delete a.nextpos1,delete a.nextpos2)}},styling:{brighttheme:{container:"brighttheme",notice:"brighttheme-notice",notice_icon:"brighttheme-icon-notice",info:"brighttheme-info",info_icon:"brighttheme-icon-info",success:"brighttheme-success",success_icon:"brighttheme-icon-success",error:"brighttheme-error",error_icon:"brighttheme-icon-error"},jqueryui:{container:"ui-widget ui-widget-content ui-corner-all",
|
||||||
|
notice:"ui-state-highlight",notice_icon:"ui-icon ui-icon-info",info:"",info_icon:"ui-icon ui-icon-info",success:"ui-state-default",success_icon:"ui-icon ui-icon-circle-check",error:"ui-state-error",error_icon:"ui-icon ui-icon-alert"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}});
|
||||||
|
d.styling.fontawesome=b.extend({},d.styling.bootstrap3);b.extend(d.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"});l.document.body?r():b(r);return d};return q(k)});
|
||||||
|
(function(d,e){"function"===typeof define&&define.amd?define("pnotify.buttons",["jquery","pnotify"],e):"object"===typeof exports&&"undefined"!==typeof module?module.exports=e(require("jquery"),require("./pnotify")):e(d.jQuery,d.PNotify)})(this,function(d,e){e.prototype.options.buttons={closer:!0,closer_hover:!0,sticker:!0,sticker_hover:!0,show_on_nonblock:!1,labels:{close:"Close",stick:"Stick",unstick:"Unstick"},classes:{closer:null,pin_up:null,pin_down:null}};e.prototype.modules.buttons={closer:null,
|
||||||
|
sticker:null,init:function(a,b){var c=this;a.elem.on({mouseenter:function(b){!c.options.sticker||a.options.nonblock&&a.options.nonblock.nonblock&&!c.options.show_on_nonblock||c.sticker.trigger("pnotify:buttons:toggleStick").css("visibility","visible");!c.options.closer||a.options.nonblock&&a.options.nonblock.nonblock&&!c.options.show_on_nonblock||c.closer.css("visibility","visible")},mouseleave:function(a){c.options.sticker_hover&&c.sticker.css("visibility","hidden");c.options.closer_hover&&c.closer.css("visibility",
|
||||||
|
"hidden")}});this.sticker=d("<div />",{"class":"ui-pnotify-sticker","aria-role":"button","aria-pressed":a.options.hide?"false":"true",tabindex:"0",title:a.options.hide?b.labels.stick:b.labels.unstick,css:{cursor:"pointer",visibility:b.sticker_hover?"hidden":"visible"},click:function(){a.options.hide=!a.options.hide;a.options.hide?a.queueRemove():a.cancelRemove();d(this).trigger("pnotify:buttons:toggleStick")}}).bind("pnotify:buttons:toggleStick",function(){var b=null===c.options.classes.pin_up?a.styles.pin_up:
|
||||||
|
c.options.classes.pin_up,e=null===c.options.classes.pin_down?a.styles.pin_down:c.options.classes.pin_down;d(this).attr("title",a.options.hide?c.options.labels.stick:c.options.labels.unstick).children().attr("class","").addClass(a.options.hide?b:e).attr("aria-pressed",a.options.hide?"false":"true")}).append("<span />").trigger("pnotify:buttons:toggleStick").prependTo(a.container);(!b.sticker||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock)&&this.sticker.css("display","none");
|
||||||
|
this.closer=d("<div />",{"class":"ui-pnotify-closer","aria-role":"button",tabindex:"0",title:b.labels.close,css:{cursor:"pointer",visibility:b.closer_hover?"hidden":"visible"},click:function(){a.remove(!1);c.sticker.css("visibility","hidden");c.closer.css("visibility","hidden")}}).append(d("<span />",{"class":null===b.classes.closer?a.styles.closer:b.classes.closer})).prependTo(a.container);(!b.closer||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock)&&this.closer.css("display",
|
||||||
|
"none")},update:function(a,b){!b.closer||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock?this.closer.css("display","none"):b.closer&&this.closer.css("display","block");!b.sticker||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock?this.sticker.css("display","none"):b.sticker&&this.sticker.css("display","block");this.sticker.trigger("pnotify:buttons:toggleStick");this.closer.find("span").attr("class","").addClass(null===b.classes.closer?a.styles.closer:b.classes.closer);
|
||||||
|
b.sticker_hover?this.sticker.css("visibility","hidden"):a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock||this.sticker.css("visibility","visible");b.closer_hover?this.closer.css("visibility","hidden"):a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock||this.closer.css("visibility","visible")}};d.extend(e.styling.brighttheme,{closer:"brighttheme-icon-closer",pin_up:"brighttheme-icon-sticker",pin_down:"brighttheme-icon-sticker brighttheme-icon-stuck"});d.extend(e.styling.jqueryui,
|
||||||
|
{closer:"ui-icon ui-icon-close",pin_up:"ui-icon ui-icon-pin-w",pin_down:"ui-icon ui-icon-pin-s"});d.extend(e.styling.bootstrap2,{closer:"icon-remove",pin_up:"icon-pause",pin_down:"icon-play"});d.extend(e.styling.bootstrap3,{closer:"glyphicon glyphicon-remove",pin_up:"glyphicon glyphicon-pause",pin_down:"glyphicon glyphicon-play"});d.extend(e.styling.fontawesome,{closer:"fa fa-times",pin_up:"fa fa-pause",pin_down:"fa fa-play"})});
|
||||||
|
(function(e,c){"function"===typeof define&&define.amd?define("pnotify.desktop",["jquery","pnotify"],c):"object"===typeof exports&&"undefined"!==typeof module?module.exports=c(require("jquery"),require("./pnotify")):c(e.jQuery,e.PNotify)})(this,function(e,c){var d,f=function(a,b){f="Notification"in window?function(a,b){return new Notification(a,b)}:"mozNotification"in navigator?function(a,b){return navigator.mozNotification.createNotification(a,b.body,b.icon).show()}:"webkitNotifications"in window?
|
||||||
|
function(a,b){return window.webkitNotifications.createNotification(b.icon,a,b.body)}:function(a,b){return null};return f(a,b)};c.prototype.options.desktop={desktop:!1,fallback:!0,icon:null,tag:null};c.prototype.modules.desktop={tag:null,icon:null,genNotice:function(a,b){this.icon=null===b.icon?"http://sciactive.com/pnotify/includes/desktop/"+a.options.type+".png":!1===b.icon?null:b.icon;if(null===this.tag||null!==b.tag)this.tag=null===b.tag?"PNotify-"+Math.round(1E6*Math.random()):b.tag;a.desktop=
|
||||||
|
f(a.options.title,{icon:this.icon,body:b.text||a.options.text,tag:this.tag});!("close"in a.desktop)&&"cancel"in a.desktop&&(a.desktop.close=function(){a.desktop.cancel()});a.desktop.onclick=function(){a.elem.trigger("click")};a.desktop.onclose=function(){"closing"!==a.state&&"closed"!==a.state&&a.remove()}},init:function(a,b){b.desktop&&(d=c.desktop.checkPermission(),0!==d?b.fallback||(a.options.auto_display=!1):this.genNotice(a,b))},update:function(a,b,c){0!==d&&b.fallback||!b.desktop||this.genNotice(a,
|
||||||
|
b)},beforeOpen:function(a,b){0!==d&&b.fallback||!b.desktop||a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in")},afterOpen:function(a,b){0!==d&&b.fallback||!b.desktop||(a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in"),"show"in a.desktop&&a.desktop.show())},beforeClose:function(a,b){0!==d&&b.fallback||!b.desktop||a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in")},afterClose:function(a,b){0!==d&&b.fallback||!b.desktop||(a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in"),
|
||||||
|
"close"in a.desktop&&a.desktop.close())}};c.desktop={permission:function(){"undefined"!==typeof Notification&&"requestPermission"in Notification?Notification.requestPermission():"webkitNotifications"in window&&window.webkitNotifications.requestPermission()},checkPermission:function(){return"undefined"!==typeof Notification&&"permission"in Notification?"granted"===Notification.permission?0:1:"webkitNotifications"in window?0==window.webkitNotifications.checkPermission()?0:1:1}};d=c.desktop.checkPermission()});
|
||||||
|
(function(g,c){"function"===typeof define&&define.amd?define("pnotify.mobile",["jquery","pnotify"],c):"object"===typeof exports&&"undefined"!==typeof module?module.exports=c(require("jquery"),require("./pnotify")):c(g.jQuery,g.PNotify)})(this,function(g,c){c.prototype.options.mobile={swipe_dismiss:!0,styling:!0};c.prototype.modules.mobile={swipe_dismiss:!0,init:function(a,b){var c=this,d=null,e=null,f=null;this.swipe_dismiss=b.swipe_dismiss;this.doMobileStyling(a,b);a.elem.on({touchstart:function(b){c.swipe_dismiss&&
|
||||||
|
(d=b.originalEvent.touches[0].screenX,f=a.elem.width(),a.container.css("left","0"))},touchmove:function(b){d&&c.swipe_dismiss&&(e=b.originalEvent.touches[0].screenX-d,b=(1-Math.abs(e)/f)*a.options.opacity,a.elem.css("opacity",b),a.container.css("left",e))},touchend:function(){if(d&&c.swipe_dismiss){if(40<Math.abs(e)){var b=0>e?-2*f:2*f;a.elem.animate({opacity:0},100);a.container.animate({left:b},100);a.remove()}else a.elem.animate({opacity:a.options.opacity},100),a.container.animate({left:0},100);
|
||||||
|
f=e=d=null}},touchcancel:function(){d&&c.swipe_dismiss&&(a.elem.animate({opacity:a.options.opacity},100),a.container.animate({left:0},100),f=e=d=null)}})},update:function(a,b){this.swipe_dismiss=b.swipe_dismiss;this.doMobileStyling(a,b)},doMobileStyling:function(a,b){if(b.styling)if(a.elem.addClass("ui-pnotify-mobile-able"),480>=g(window).width())a.options.stack.mobileOrigSpacing1||(a.options.stack.mobileOrigSpacing1=a.options.stack.spacing1,a.options.stack.mobileOrigSpacing2=a.options.stack.spacing2),
|
||||||
|
a.options.stack.spacing1=0,a.options.stack.spacing2=0;else{if(a.options.stack.mobileOrigSpacing1||a.options.stack.mobileOrigSpacing2)a.options.stack.spacing1=a.options.stack.mobileOrigSpacing1,delete a.options.stack.mobileOrigSpacing1,a.options.stack.spacing2=a.options.stack.mobileOrigSpacing2,delete a.options.stack.mobileOrigSpacing2}else a.elem.removeClass("ui-pnotify-mobile-able"),a.options.stack.mobileOrigSpacing1&&(a.options.stack.spacing1=a.options.stack.mobileOrigSpacing1,delete a.options.stack.mobileOrigSpacing1),
|
||||||
|
a.options.stack.mobileOrigSpacing2&&(a.options.stack.spacing2=a.options.stack.mobileOrigSpacing2,delete a.options.stack.mobileOrigSpacing2)}}});
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
function initConfigCheckbox(elem) {
|
function initConfigCheckbox(elem) {
|
||||||
var config = $(elem).parent().next();
|
var config = $(elem).closest('div').next();
|
||||||
|
config.css('overflow', 'hidden');
|
||||||
if ($(elem).is(":checked")) {
|
if ($(elem).is(":checked")) {
|
||||||
config.show();
|
config.show();
|
||||||
} else {
|
} else {
|
||||||
config.hide();
|
config.hide();
|
||||||
}
|
}
|
||||||
$(elem).click(function () {
|
$(elem).click(function () {
|
||||||
var config = $(this).parent().next();
|
var config = $(this).closest('div').next();
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
config.slideDown();
|
config.slideDown();
|
||||||
} else {
|
} else {
|
||||||
@@ -39,22 +40,47 @@ function showMsg(msg,loader,timeout,ms,error) {
|
|||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
feedback.css("background-color", "rgba(255,0,0,0.5)");
|
feedback.css("background-color", "rgba(255,0,0,0.5)");
|
||||||
console.log('is error');
|
|
||||||
}
|
}
|
||||||
$(feedback).html(message);
|
$(feedback).html(message);
|
||||||
feedback.fadeIn();
|
feedback.fadeIn();
|
||||||
|
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
message.fadeOut(function () {
|
message.fadeOut(function () {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
feedback.fadeOut();
|
feedback.fadeOut();
|
||||||
|
feedback.css("background-color", "");
|
||||||
});
|
});
|
||||||
}, ms);
|
}, ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function doAjaxCall(url,elem,reload,form) {
|
function confirmAjaxCall(url, msg, loader_msg, callback) {
|
||||||
|
$("#confirm-message").html(msg);
|
||||||
|
$('#confirm-modal').modal();
|
||||||
|
$('#confirm-modal').one('click', '#confirm-button', function () {
|
||||||
|
if (loader_msg) {
|
||||||
|
showMsg(loader_msg, true, false)
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'POST',
|
||||||
|
complete: function (xhr, status) {
|
||||||
|
result = $.parseJSON(xhr.responseText);
|
||||||
|
msg = result.message;
|
||||||
|
if (result.result == 'success') {
|
||||||
|
showMsg('<i class="fa fa-check"></i> ' + msg, false, true, 5000)
|
||||||
|
} else {
|
||||||
|
showMsg('<i class="fa fa-times"></i> ' + msg, false, true, 5000, true)
|
||||||
|
}
|
||||||
|
if (typeof callback === "function") {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function doAjaxCall(url, elem, reload, form, callback) {
|
||||||
// Set Message
|
// Set Message
|
||||||
feedback = $("#ajaxMsg");
|
feedback = $("#ajaxMsg");
|
||||||
update = $("#updatebar");
|
update = $("#updatebar");
|
||||||
@@ -64,7 +90,6 @@ function doAjaxCall(url,elem,reload,form) {
|
|||||||
} else {
|
} else {
|
||||||
feedback.removeAttr("style");
|
feedback.removeAttr("style");
|
||||||
}
|
}
|
||||||
|
|
||||||
feedback.fadeIn();
|
feedback.fadeIn();
|
||||||
// Get Form data
|
// Get Form data
|
||||||
var formID = "#" + url;
|
var formID = "#" + url;
|
||||||
@@ -88,10 +113,10 @@ function doAjaxCall(url,elem,reload,form) {
|
|||||||
// Get Success & Error message from inline data, else use standard message
|
// Get Success & Error message from inline data, else use standard message
|
||||||
var succesMsg = $("<div class='msg'><i class='fa fa-check'></i> " + dataSucces + "</div>");
|
var succesMsg = $("<div class='msg'><i class='fa fa-check'></i> " + dataSucces + "</div>");
|
||||||
var errorMsg = $("<div class='msg'><i class='fa fa-exclamation-triangle'></i> " + dataError + "</div>");
|
var errorMsg = $("<div class='msg'><i class='fa fa-exclamation-triangle'></i> " + dataError + "</div>");
|
||||||
|
|
||||||
// Check if checkbox is selected
|
// Check if checkbox is selected
|
||||||
if (form) {
|
if (form) {
|
||||||
if ( $('td#select input[type=checkbox]').length > 0 && !$('td#select input[type=checkbox]').is(':checked') || $('#importLastFM #username:visible').length > 0 && $("#importLastFM #username" ).val().length === 0 ) {
|
if ($('td#select input[type=checkbox]').length > 0 && !$('td#select input[type=checkbox]').is(':checked') ||
|
||||||
|
$('#importLastFM #username:visible').length > 0 && $("#importLastFM #username").val().length === 0) {
|
||||||
feedback.addClass('error')
|
feedback.addClass('error')
|
||||||
$(feedback).prepend(errorMsg);
|
$(feedback).prepend(errorMsg);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@@ -106,7 +131,6 @@ function doAjaxCall(url,elem,reload,form) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ajax Call
|
// Ajax Call
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
@@ -139,7 +163,7 @@ function doAjaxCall(url,elem,reload,form) {
|
|||||||
});
|
});
|
||||||
if (reload == true) refreshSubmenu();
|
if (reload == true) refreshSubmenu();
|
||||||
if (reload == "table") {
|
if (reload == "table") {
|
||||||
console.log('refresh'); refreshTable();
|
refreshTable();
|
||||||
}
|
}
|
||||||
if (reload == "tabs") refreshTab();
|
if (reload == "tabs") refreshTab();
|
||||||
if (reload == "page") location.reload();
|
if (reload == "page") location.reload();
|
||||||
@@ -149,7 +173,8 @@ function doAjaxCall(url,elem,reload,form) {
|
|||||||
}
|
}
|
||||||
if (form) {
|
if (form) {
|
||||||
// Change the option to 'choose...'
|
// Change the option to 'choose...'
|
||||||
$(formID + " select").children('option[disabled=disabled]').attr('selected','selected');
|
$(formID + " select").children('option[disabled=disabled]').attr(
|
||||||
|
'selected', 'selected');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 2000);
|
}, 2000);
|
||||||
@@ -157,6 +182,9 @@ function doAjaxCall(url,elem,reload,form) {
|
|||||||
complete: function (jqXHR, textStatus) {
|
complete: function (jqXHR, textStatus) {
|
||||||
// Remove loaders and stuff, ajax request is complete!
|
// Remove loaders and stuff, ajax request is complete!
|
||||||
loader.remove();
|
loader.remove();
|
||||||
|
if (typeof callback === "function") {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -172,65 +200,64 @@ function resetFilters(text){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getPlatformImagePath(platformName) {
|
function getPlatformImagePath(platformName) {
|
||||||
|
|
||||||
if (platformName.indexOf("Roku") > -1) {
|
if (platformName.indexOf("Roku") > -1) {
|
||||||
return 'interfaces/default/images/platforms/roku.png';
|
return 'images/platforms/roku.png';
|
||||||
} else if (platformName.indexOf("Apple TV") > -1) {
|
} else if (platformName.indexOf("Apple TV") > -1) {
|
||||||
return 'interfaces/default/images/platforms/atv.png';
|
return 'images/platforms/atv.png';
|
||||||
} else if (platformName.indexOf("tvOS") > -1) {
|
} else if (platformName.indexOf("tvOS") > -1) {
|
||||||
return 'interfaces/default/images/platforms/atv.png';
|
return 'images/platforms/atv.png';
|
||||||
} else if (platformName.indexOf("Firefox") > -1) {
|
} else if (platformName.indexOf("Firefox") > -1) {
|
||||||
return 'interfaces/default/images/platforms/firefox.png';
|
return 'images/platforms/firefox.png';
|
||||||
} else if (platformName.indexOf("Chromecast") > -1) {
|
} else if (platformName.indexOf("Chromecast") > -1) {
|
||||||
return 'interfaces/default/images/platforms/chromecast.png';
|
return 'images/platforms/chromecast.png';
|
||||||
} else if (platformName.indexOf("Chrome") > -1) {
|
} else if (platformName.indexOf("Chrome") > -1) {
|
||||||
return 'interfaces/default/images/platforms/chrome.png';
|
return 'images/platforms/chrome.png';
|
||||||
} else if (platformName.indexOf("Android") > -1) {
|
} else if (platformName.indexOf("Android") > -1) {
|
||||||
return 'interfaces/default/images/platforms/android.png';
|
return 'images/platforms/android.png';
|
||||||
} else if (platformName.indexOf("Nexus") > -1) {
|
} else if (platformName.indexOf("Nexus") > -1) {
|
||||||
return 'interfaces/default/images/platforms/android.png';
|
return 'images/platforms/android.png';
|
||||||
} else if (platformName.indexOf("iPad") > -1) {
|
} else if (platformName.indexOf("iPad") > -1) {
|
||||||
return 'interfaces/default/images/platforms/ios.png';
|
return 'images/platforms/ios.png';
|
||||||
} else if (platformName.indexOf("iPhone") > -1) {
|
} else if (platformName.indexOf("iPhone") > -1) {
|
||||||
return 'interfaces/default/images/platforms/ios.png';
|
return 'images/platforms/ios.png';
|
||||||
} else if (platformName.indexOf("iOS") > -1) {
|
} else if (platformName.indexOf("iOS") > -1) {
|
||||||
return 'interfaces/default/images/platforms/ios.png';
|
return 'images/platforms/ios.png';
|
||||||
} else if (platformName.indexOf("Plex Home Theater") > -1) {
|
} else if (platformName.indexOf("Plex Home Theater") > -1) {
|
||||||
return 'interfaces/default/images/platforms/pht.png';
|
return 'images/platforms/pht.png';
|
||||||
} else if (platformName.indexOf("Linux/RPi-XMBC") > -1) {
|
} else if (platformName.indexOf("Linux/RPi-XMBC") > -1) {
|
||||||
return 'interfaces/default/images/platforms/xbmc.png';
|
return 'images/platforms/xbmc.png';
|
||||||
} else if (platformName.indexOf("Safari") > -1) {
|
} else if (platformName.indexOf("Safari") > -1) {
|
||||||
return 'interfaces/default/images/platforms/safari.png';
|
return 'images/platforms/safari.png';
|
||||||
} else if (platformName.indexOf("Internet Explorer") > -1) {
|
} else if (platformName.indexOf("Internet Explorer") > -1) {
|
||||||
return 'interfaces/default/images/platforms/ie.png';
|
return 'images/platforms/ie.png';
|
||||||
} else if (platformName.indexOf("Microsoft Edge") > -1) {
|
} else if (platformName.indexOf("Microsoft Edge") > -1) {
|
||||||
return 'interfaces/default/images/platforms/msedge.png';
|
return 'images/platforms/msedge.png';
|
||||||
} else if (platformName.indexOf("Unknown Browser") > -1) {
|
} else if (platformName.indexOf("Unknown Browser") > -1) {
|
||||||
return 'interfaces/default/images/platforms/dafault.png';
|
return 'images/platforms/dafault.png';
|
||||||
} else if (platformName.indexOf("Windows-XBMC") > -1) {
|
} else if (platformName.indexOf("Windows-XBMC") > -1) {
|
||||||
return 'interfaces/default/images/platforms/xbmc.png';
|
return 'images/platforms/xbmc.png';
|
||||||
} else if (platformName.indexOf("Xbox") > -1) {
|
} else if (platformName.indexOf("Xbox") > -1) {
|
||||||
return 'interfaces/default/images/platforms/xbox.png';
|
return 'images/platforms/xbox.png';
|
||||||
} else if (platformName.indexOf("Samsung") > -1) {
|
} else if (platformName.indexOf("Samsung") > -1) {
|
||||||
return 'interfaces/default/images/platforms/samsung.png';
|
return 'images/platforms/samsung.png';
|
||||||
} else if (platformName.indexOf("Opera") > -1) {
|
} else if (platformName.indexOf("Opera") > -1) {
|
||||||
return 'interfaces/default/images/platforms/opera.png';
|
return 'images/platforms/opera.png';
|
||||||
} else if (platformName.indexOf("KODI") > -1) {
|
} else if (platformName.indexOf("KODI") > -1) {
|
||||||
return 'interfaces/default/images/platforms/kodi.png';
|
return 'images/platforms/kodi.png';
|
||||||
} else if (platformName.indexOf("Playstation 3") > -1) {
|
} else if (platformName.indexOf("Playstation 3") > -1) {
|
||||||
return 'interfaces/default/images/platforms/playstation.png';
|
return 'images/platforms/playstation.png';
|
||||||
} else if (platformName.indexOf("Playstation 4") > -1) {
|
} else if (platformName.indexOf("Playstation 4") > -1) {
|
||||||
return 'interfaces/default/images/platforms/playstation.png';
|
return 'images/platforms/playstation.png';
|
||||||
} else if (platformName.indexOf("Xbox 360") > -1) {
|
} else if (platformName.indexOf("Xbox 360") > -1) {
|
||||||
return 'interfaces/default/images/platforms/xbox.png';
|
return 'images/platforms/xbox.png';
|
||||||
} else if (platformName.indexOf("Windows") > -1) {
|
} else if (platformName.indexOf("Windows") > -1) {
|
||||||
return 'interfaces/default/images/platforms/win8.png';
|
return 'images/platforms/win8.png';
|
||||||
} else if (platformName.indexOf("Windows phone") > -1) {
|
} else if (platformName.indexOf("Windows phone") > -1) {
|
||||||
return 'interfaces/default/images/platforms/wp.png';
|
return 'images/platforms/wp.png';
|
||||||
} else if (platformName.indexOf("Plex Media Player") > -1) {
|
} else if (platformName.indexOf("Plex Media Player") > -1) {
|
||||||
return 'interfaces/default/images/platforms/pmp.png';
|
return 'images/platforms/pmp.png';
|
||||||
} else {
|
} else {
|
||||||
return 'interfaces/default/images/platforms/default.png';
|
return 'images/platforms/default.png';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,9 +266,9 @@ function isPrivateIP(ip_address) {
|
|||||||
// get IPv4 mapped address (xxx.xxx.xxx.xxx) from IPv6 addresss (::ffff:xxx.xxx.xxx.xxx)
|
// get IPv4 mapped address (xxx.xxx.xxx.xxx) from IPv6 addresss (::ffff:xxx.xxx.xxx.xxx)
|
||||||
var parts = ip_address.split(":");
|
var parts = ip_address.split(":");
|
||||||
var parts = parts[parts.length - 1].split('.');
|
var parts = parts[parts.length - 1].split('.');
|
||||||
if (parts[0] === '10' ||
|
if ((parts[0] === '127' && parts[1] === '0' && parts[2] === '0' && parts[3] === '1') || (parts[0] === '10') ||
|
||||||
(parts[0] === '172' && (parseInt(parts[1], 10) >= 16 && parseInt(parts[1], 10) <= 31)) ||
|
(parts[0] === '172' && (parseInt(parts[1], 10) >= 16 && parseInt(parts[1], 10) <= 31)) || (parts[0] ===
|
||||||
(parts[0] === '192' && parts[1] === '168')) {
|
'192' && parts[1] === '168')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -252,16 +279,18 @@ function isPrivateIP(ip_address) {
|
|||||||
|
|
||||||
function humanTime(seconds) {
|
function humanTime(seconds) {
|
||||||
if (seconds >= 86400) {
|
if (seconds >= 86400) {
|
||||||
text = '<h3>' + Math.floor(moment.duration(seconds, 'seconds').asDays()) +
|
text = '<h3>' + Math.floor(moment.duration(seconds, 'seconds').asDays()) + '</h3><p> days</p>' + '<h3>' +
|
||||||
'</h3><p> days </p><h3>' + Math.floor(moment.duration((seconds % 86400), 'seconds').asHours()) +
|
Math.floor(moment.duration((seconds % 86400), 'seconds').asHours()) + '</h3><p> hrs</p>' + '<h3>' +
|
||||||
'</h3><p> hrs</p><h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + '</h3><p> mins</p>';
|
Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + '</h3><p> mins</p>';
|
||||||
return text;
|
return text;
|
||||||
} else if (seconds >= 3600) {
|
} else if (seconds >= 3600) {
|
||||||
text = '<h3>' + Math.floor(moment.duration((seconds % 86400), 'seconds').asHours()) +
|
text = '<h3>' + Math.floor(moment.duration((seconds % 86400), 'seconds').asHours()) + '</h3><p> hrs</p>' +
|
||||||
'</h3><p>hrs</p><h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + '</h3><p> mins</p>';
|
'<h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) +
|
||||||
|
'</h3><p> mins</p>';
|
||||||
return text;
|
return text;
|
||||||
} else if (seconds >= 60) {
|
} else if (seconds >= 60) {
|
||||||
text = '<h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + '</h3><p> mins</p>';
|
text = '<h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) +
|
||||||
|
'</h3><p> mins</p>';
|
||||||
return text;
|
return text;
|
||||||
} else {
|
} else {
|
||||||
text = '<h3>0</h3><p> mins</p>';
|
text = '<h3>0</h3><p> mins</p>';
|
||||||
@@ -269,16 +298,34 @@ function humanTime(seconds) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function humanTimeClean(seconds) {
|
||||||
|
if (seconds >= 86400) {
|
||||||
|
text = Math.floor(moment.duration(seconds, 'seconds').asDays()) + ' days ' + Math.floor(moment.duration((
|
||||||
|
seconds % 86400), 'seconds').asHours()) + ' hrs ' + Math.floor(moment.duration(
|
||||||
|
((seconds % 86400) % 3600), 'seconds').asMinutes()) + ' mins';
|
||||||
|
return text;
|
||||||
|
} else if (seconds >= 3600) {
|
||||||
|
text = Math.floor(moment.duration((seconds % 86400), 'seconds').asHours()) + ' hrs ' + Math.floor(moment.duration(
|
||||||
|
((seconds % 86400) % 3600), 'seconds').asMinutes()) + ' mins';
|
||||||
|
return text;
|
||||||
|
} else if (seconds >= 60) {
|
||||||
|
text = Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + ' mins';
|
||||||
|
return text;
|
||||||
|
} else {
|
||||||
|
text = '0';
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
}
|
||||||
String.prototype.toProperCase = function () {
|
String.prototype.toProperCase = function () {
|
||||||
return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
|
return this.replace(/\w\S*/g, function (txt) {
|
||||||
|
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function millisecondsToMinutes(ms, roundToMinute) {
|
function millisecondsToMinutes(ms, roundToMinute) {
|
||||||
|
|
||||||
if (ms > 0) {
|
if (ms > 0) {
|
||||||
seconds = ms / 1000;
|
seconds = ms / 1000;
|
||||||
minutes = seconds / 60;
|
minutes = seconds / 60;
|
||||||
|
|
||||||
if (roundToMinute) {
|
if (roundToMinute) {
|
||||||
output = Math.round(minutes, 0)
|
output = Math.round(minutes, 0)
|
||||||
} else {
|
} else {
|
||||||
@@ -298,7 +345,6 @@ function millisecondsToMinutes(ms, roundToMinute) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Our countdown plugin takes a callback, a duration, and an optional message
|
// Our countdown plugin takes a callback, a duration, and an optional message
|
||||||
$.fn.countdown = function (callback, duration, message) {
|
$.fn.countdown = function (callback, duration, message) {
|
||||||
// If no message is provided, we use an empty string
|
// If no message is provided, we use an empty string
|
||||||
@@ -320,7 +366,6 @@ $.fn.countdown = function (callback, duration, message) {
|
|||||||
}
|
}
|
||||||
// Run interval every 1000ms (1 second)
|
// Run interval every 1000ms (1 second)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function setCookie(cname, cvalue, exdays) {
|
function setCookie(cname, cvalue, exdays) {
|
||||||
@@ -340,35 +385,67 @@ function getCookie(cname) {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
var Accordion = function (el, multiple) {
|
var Accordion = function (el, multiple) {
|
||||||
this.el = el || {};
|
this.el = el || {};
|
||||||
this.multiple = multiple || false;
|
this.multiple = multiple || false;
|
||||||
|
|
||||||
// Variables privadas
|
// Variables privadas
|
||||||
var links = this.el.find('.link');
|
var links = this.el.find('.link');
|
||||||
// Evento
|
// Evento
|
||||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
|
links.on('click', {
|
||||||
|
el: this.el,
|
||||||
|
multiple: this.multiple
|
||||||
|
}, this.dropdown)
|
||||||
}
|
}
|
||||||
|
|
||||||
Accordion.prototype.dropdown = function (e) {
|
Accordion.prototype.dropdown = function (e) {
|
||||||
var $el = e.data.el;
|
var $el = e.data.el;
|
||||||
$this = $(this),
|
$this = $(this),
|
||||||
$next = $this.next();
|
$next = $this.next();
|
||||||
|
|
||||||
$next.slideToggle();
|
$next.slideToggle();
|
||||||
$this.parent().toggleClass('open');
|
$this.parent().toggleClass('open');
|
||||||
|
|
||||||
if (!e.data.multiple) {
|
if (!e.data.multiple) {
|
||||||
$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
|
$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearSearchButton(tableName, table) {
|
function clearSearchButton(tableName, table) {
|
||||||
$('#' + tableName + '_filter').find('input[type=search]')
|
$('#' + tableName + '_filter').find('input[type=search]').wrap(
|
||||||
.wrap('<div class="input-group" role="group" aria-label="Search"></div>')
|
'<div class="input-group" role="group" aria-label="Search"></div>').after(
|
||||||
.after('<span class="input-group-btn"><button class="btn btn-form" data-toggle="button" aria-pressed="false" autocomplete="off" id="clear-search-' + tableName + '"><i class="fa fa-remove"></i></button></span>')
|
'<span class="input-group-btn"><button class="btn btn-form" data-toggle="button" aria-pressed="false" autocomplete="off" id="clear-search-' +
|
||||||
|
tableName + '"><i class="fa fa-remove"></i></button></span>')
|
||||||
$('#clear-search-' + tableName).click(function () {
|
$('#clear-search-' + tableName).click(function () {
|
||||||
table.search('').draw();
|
table.search('').draw();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// Taken from https://github.com/Hellowlol/HTPC-Manager
|
||||||
|
window.onerror = function (message, file, line) {
|
||||||
|
var e = {
|
||||||
|
'page': window.location.href,
|
||||||
|
'message': message,
|
||||||
|
'file': file,
|
||||||
|
'line': line
|
||||||
|
};
|
||||||
|
$.post("log_js_errors", e, function (data) { });
|
||||||
|
};
|
||||||
|
|
||||||
|
$('*').on('click', '.refresh_pms_image', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
var background_div = $(this).parent().siblings(['style*=pms_image_proxy']).first();
|
||||||
|
var pms_proxy_url = background_div.css('background-image');
|
||||||
|
pms_proxy_url = /^url\((['"]?)(.*)\1\)$/.exec(pms_proxy_url);
|
||||||
|
pms_proxy_url = pms_proxy_url ? pms_proxy_url[2] : ""; // If matched, retrieve url, otherwise ""
|
||||||
|
|
||||||
|
if (pms_proxy_url.indexOf('pms_image_proxy') == -1) {
|
||||||
|
console.log('PMS image proxy url not found.');
|
||||||
|
} else {
|
||||||
|
if (pms_proxy_url.indexOf('refresh=true') > -1) {
|
||||||
|
pms_proxy_url = pms_proxy_url.replace("&refresh=true", "");
|
||||||
|
console.log(pms_proxy_url)
|
||||||
|
background_div.css('background-image', 'url(' + pms_proxy_url + ')');
|
||||||
|
background_div.css('background-image', 'url(' + pms_proxy_url + '&refresh=true)');
|
||||||
|
} else {
|
||||||
|
background_div.css('background-image', 'url(' + pms_proxy_url + '&refresh=true)');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -19,21 +19,27 @@ history_table_options = {
|
|||||||
"info": "Showing _START_ to _END_ of _TOTAL_ history items",
|
"info": "Showing _START_ to _END_ of _TOTAL_ history items",
|
||||||
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
||||||
"infoFiltered": "<span class='hidden-md hidden-sm hidden-xs'>(filtered from _MAX_ total entries)</span>",
|
"infoFiltered": "<span class='hidden-md hidden-sm hidden-xs'>(filtered from _MAX_ total entries)</span>",
|
||||||
"emptyTable": "No data in table"
|
"emptyTable": "No data in table",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
},
|
},
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "full_numbers",
|
||||||
"stateSave": false,
|
"stateSave": true,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 25,
|
"pageLength": 25,
|
||||||
"order": [ 1, 'desc'],
|
"order": [ 1, 'desc'],
|
||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
"data": null,
|
"data": null,
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (rowData['id'] === null) {
|
||||||
|
$(td).html('');
|
||||||
|
} else {
|
||||||
$(td).html('<button class="btn btn-xs btn-warning" data-id="' + rowData['id'] + '"><i class="fa fa-trash-o fa-fw"></i> Delete</button>');
|
$(td).html('<button class="btn btn-xs btn-warning" data-id="' + rowData['id'] + '"><i class="fa fa-trash-o fa-fw"></i> Delete</button>');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"width": "5%",
|
"width": "5%",
|
||||||
"className": "delete-control no-wrap hidden",
|
"className": "delete-control no-wrap hidden",
|
||||||
@@ -44,14 +50,21 @@ history_table_options = {
|
|||||||
"targets": [1],
|
"targets": [1],
|
||||||
"data":"date",
|
"data":"date",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (rowData['stopped'] === null) {
|
var date = moment(cellData, "X").format(date_format);
|
||||||
$(td).html('Currently watching...');
|
if (rowData['state'] !== null) {
|
||||||
|
var state = '';
|
||||||
|
if (rowData['state'] === 'playing') {
|
||||||
|
state = '<span class="current-activity-tooltip" data-toggle="tooltip" title="Currently Playing"><i class="fa fa-play fa-fw"></i></span>';
|
||||||
|
} else if (rowData['state'] === 'paused') {
|
||||||
|
state = '<span class="current-activity-tooltip" data-toggle="tooltip" title="Currently Paused"><i class="fa fa-pause fa-fw"></i></span>';
|
||||||
|
} else if (rowData['state'] === 'buffering') {
|
||||||
|
state = '<span class="current-activity-tooltip" data-toggle="tooltip" title="Currently Buffering"><i class="fa fa-spinner fa-fw"></i></span>';
|
||||||
|
}
|
||||||
|
$(td).html('<div><div style="float: left;">' + state + ' ' + date + '</div></div>');
|
||||||
} else if (rowData['group_count'] > 1) {
|
} else if (rowData['group_count'] > 1) {
|
||||||
date = moment(cellData, "X").format(date_format);
|
|
||||||
expand_history = '<span class="expand-history-tooltip" data-toggle="tooltip" title="Show Detailed History"><i class="fa fa-plus-circle fa-fw"></i></span>';
|
expand_history = '<span class="expand-history-tooltip" data-toggle="tooltip" title="Show Detailed History"><i class="fa fa-plus-circle fa-fw"></i></span>';
|
||||||
$(td).html('<div><a href="#"><div style="float: left;">' + expand_history + ' ' + date + '</div></a></div>');
|
$(td).html('<div><a href="#"><div style="float: left;">' + expand_history + ' ' + date + '</div></a></div>');
|
||||||
} else {
|
} else {
|
||||||
date = moment(cellData, "X").format(date_format);
|
|
||||||
$(td).html('<div style="float: left;"><i class="fa fa-fw"></i> ' + date + '</div>');
|
$(td).html('<div style="float: left;"><i class="fa fa-fw"></i> ' + date + '</div>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -74,7 +87,7 @@ history_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "9%",
|
"width": "9%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [3],
|
"targets": [3],
|
||||||
@@ -96,7 +109,7 @@ history_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "8%",
|
"width": "8%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control-ip"
|
"className": "no-wrap modal-control-ip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [4],
|
"targets": [4],
|
||||||
@@ -107,7 +120,7 @@ history_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [5],
|
"targets": [5],
|
||||||
@@ -115,18 +128,18 @@ history_table_options = {
|
|||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== '') {
|
if (cellData !== '') {
|
||||||
var transcode_dec = '';
|
var transcode_dec = '';
|
||||||
if (rowData['video_decision'] === 'transcode' || rowData['audio_decision'] === 'transcode') {
|
if (rowData['transcode_decision'] === 'transcode') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'copy' || rowData['audio_decision'] === 'copy') {
|
} else if (rowData['transcode_decision'] === 'copy') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'direct play' || rowData['audio_decision'] === 'direct play') {
|
} else if (rowData['transcode_decision'] === 'direct play') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
||||||
}
|
}
|
||||||
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "12%",
|
"width": "12%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
"className": "no-wrap modal-control"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [6],
|
"targets": [6],
|
||||||
@@ -136,27 +149,29 @@ history_table_options = {
|
|||||||
var parent_info = '';
|
var parent_info = '';
|
||||||
var media_type = '';
|
var media_type = '';
|
||||||
var thumb_popover = '';
|
var thumb_popover = '';
|
||||||
|
var source = (rowData['state'] === null) ? 'source=history&' : '';
|
||||||
if (rowData['media_type'] === 'movie') {
|
if (rowData['media_type'] === 'movie') {
|
||||||
if (rowData['year']) { parent_info = ' (' + rowData['year'] + ')'; }
|
if (rowData['year']) { parent_info = ' (' + rowData['year'] + ')'; }
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Movie"><i class="fa fa-film fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Movie"><i class="fa fa-film fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?' + source + 'rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type'] === 'episode') {
|
} else if (rowData['media_type'] === 'episode') {
|
||||||
if (rowData['parent_media_index'] && rowData['media_index']) { parent_info = ' (S' + rowData['parent_media_index'] + '· E' + rowData['media_index'] + ')'; }
|
if (rowData['parent_media_index'] && rowData['media_index']) { parent_info = ' (S' + rowData['parent_media_index'] + '· E' + rowData['media_index'] + ')'; }
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;" >' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?' + source + 'rating_key=' + rowData['rating_key'] + '"><div style="float: left;" >' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type'] === 'track') {
|
} else if (rowData['media_type'] === 'track') {
|
||||||
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?' + source + 'rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "33%"
|
"width": "33%",
|
||||||
|
"className": "datatable-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [7],
|
"targets": [7],
|
||||||
@@ -170,7 +185,7 @@ history_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "5%",
|
"width": "5%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [8],
|
"targets": [8],
|
||||||
@@ -184,7 +199,7 @@ history_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "5%",
|
"width": "5%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [9],
|
"targets": [9],
|
||||||
@@ -198,7 +213,7 @@ history_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "5%",
|
"width": "5%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [10],
|
"targets": [10],
|
||||||
@@ -212,7 +227,7 @@ history_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "5%",
|
"width": "5%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [11],
|
"targets": [11],
|
||||||
@@ -228,7 +243,7 @@ history_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"orderable": false,
|
"orderable": false,
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs",
|
"className": "no-wrap",
|
||||||
"width": "2%"
|
"width": "2%"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -238,6 +253,7 @@ history_table_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
|
$('.current-activity-tooltip').tooltip({ container: 'body' });
|
||||||
$('.expand-history-tooltip').tooltip({ container: 'body' });
|
$('.expand-history-tooltip').tooltip({ container: 'body' });
|
||||||
$('.external-ip-tooltip').tooltip({ container: 'body' });
|
$('.external-ip-tooltip').tooltip({ container: 'body' });
|
||||||
$('.transcode-tooltip').tooltip({ container: 'body' });
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
@@ -283,7 +299,7 @@ history_table_options = {
|
|||||||
if ($.inArray(rowData['id'], history_to_delete) !== -1) {
|
if ($.inArray(rowData['id'], history_to_delete) !== -1) {
|
||||||
$(row).find('button[data-id="' + rowData['id'] + '"]').toggleClass('btn-warning').toggleClass('btn-danger');
|
$(row).find('button[data-id="' + rowData['id'] + '"]').toggleClass('btn-warning').toggleClass('btn-danger');
|
||||||
}
|
}
|
||||||
} else {
|
} else if (rowData['id'] !== null) {
|
||||||
// if grouped rows
|
// if grouped rows
|
||||||
// toggle the parent button to danger
|
// toggle the parent button to danger
|
||||||
$(row).find('button[data-id="' + rowData['id'] + '"]').toggleClass('btn-warning').toggleClass('btn-danger');
|
$(row).find('button[data-id="' + rowData['id'] + '"]').toggleClass('btn-warning').toggleClass('btn-danger');
|
||||||
@@ -303,11 +319,14 @@ history_table_options = {
|
|||||||
history_table.row(row).child(childTableFormat(rowData)).show();
|
history_table.row(row).child(childTableFormat(rowData)).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rowData['state'] !== null) {
|
||||||
|
$(row).addClass('current-activity-row');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parent table platform modal
|
// Parent table platform modal
|
||||||
$('#history_table').on('click', '> tbody > tr > td.modal-control', function () {
|
$('.history_table').on('click', '> tbody > tr > td.modal-control', function () {
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
var row = history_table.row( tr );
|
var row = history_table.row( tr );
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
@@ -315,7 +334,11 @@ $('#history_table').on('click', '> tbody > tr > td.modal-control', function () {
|
|||||||
function showStreamDetails() {
|
function showStreamDetails() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_stream_data',
|
url: 'get_stream_data',
|
||||||
data: {row_id: rowData['id'], user: rowData['friendly_name']},
|
data: {
|
||||||
|
row_id: rowData['id'],
|
||||||
|
session_key: rowData['session_key'],
|
||||||
|
user: rowData['friendly_name']
|
||||||
|
},
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
complete: function(xhr, status) {
|
complete: function(xhr, status) {
|
||||||
@@ -327,7 +350,7 @@ $('#history_table').on('click', '> tbody > tr > td.modal-control', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Parent table ip address modal
|
// Parent table ip address modal
|
||||||
$('#history_table').on('click', '> tbody > tr > td.modal-control-ip', function () {
|
$('.history_table').on('click', '> tbody > tr > td.modal-control-ip', function () {
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
var row = history_table.row( tr );
|
var row = history_table.row( tr );
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
@@ -350,7 +373,7 @@ $('#history_table').on('click', '> tbody > tr > td.modal-control-ip', function (
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Parent table delete mode
|
// Parent table delete mode
|
||||||
$('#history_table').on('click', '> tbody > tr > td.delete-control > button', function () {
|
$('.history_table').on('click', '> tbody > tr > td.delete-control > button', function () {
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
var row = history_table.row( tr );
|
var row = history_table.row( tr );
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
@@ -399,7 +422,7 @@ $('#history_table').on('click', '> tbody > tr > td.delete-control > button', fun
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Parent table expand detailed history
|
// Parent table expand detailed history
|
||||||
$('#history_table').on('click', '> tbody > tr > td.expand-history a', function () {
|
$('.history_table').on('click', '> tbody > tr > td.expand-history a', function () {
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
var row = history_table.row(tr);
|
var row = history_table.row(tr);
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
@@ -445,10 +468,10 @@ function childTableOptions(rowData) {
|
|||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.expand-history-tooltip').tooltip({ container: 'body' });
|
$('.expand-history-tooltip').tooltip({ container: 'body' });
|
||||||
$('.external-ip-tooltip').tooltip();
|
$('.external-ip-tooltip').tooltip({ container: 'body' });
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.watched-tooltip').tooltip();
|
$('.watched-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
container: 'body',
|
container: 'body',
|
||||||
|
|||||||
@@ -18,14 +18,16 @@ history_table_modal_options = {
|
|||||||
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
||||||
"infoFiltered": "",
|
"infoFiltered": "",
|
||||||
"emptyTable": "No data in table",
|
"emptyTable": "No data in table",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
},
|
},
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "simple_numbers",
|
||||||
"stateSave": false,
|
"stateSave": false,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 10,
|
"pageLength": 10,
|
||||||
"lengthChange": false,
|
"lengthChange": false,
|
||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"order": [0, 'desc'],
|
"order": [0, 'desc'],
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
@@ -71,7 +73,7 @@ history_table_modal_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "15%",
|
"width": "15%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [3],
|
"targets": [3],
|
||||||
@@ -79,18 +81,18 @@ history_table_modal_options = {
|
|||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== '') {
|
if (cellData !== '') {
|
||||||
var transcode_dec = '';
|
var transcode_dec = '';
|
||||||
if (rowData['video_decision'] === 'transcode' || rowData['audio_decision'] === 'transcode') {
|
if (rowData['transcode_decision'] === 'transcode') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'copy' || rowData['audio_decision'] === 'copy') {
|
} else if (rowData['transcode_decision'] === 'copy') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'direct play' || rowData['audio_decision'] === 'direct play') {
|
} else if (rowData['transcode_decision'] === 'direct play') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
||||||
}
|
}
|
||||||
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "25%",
|
"width": "25%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs modal-control"
|
"className": "no-wrap modal-control"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [4],
|
"targets": [4],
|
||||||
@@ -113,14 +115,15 @@ history_table_modal_options = {
|
|||||||
} else if (rowData['media_type'] === 'track') {
|
} else if (rowData['media_type'] === 'track') {
|
||||||
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "40%"
|
"width": "40%",
|
||||||
|
"className": "datatable-wrap"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"drawCallback": function (settings) {
|
"drawCallback": function (settings) {
|
||||||
@@ -129,8 +132,8 @@ history_table_modal_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
container: '#history-modal',
|
container: '#history-modal',
|
||||||
@@ -148,7 +151,7 @@ history_table_modal_options = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#history_table').on('click', 'td.modal-control', function () {
|
$('.history_table').on('click', 'td.modal-control', function () {
|
||||||
var tr = $(this).parents('tr');
|
var tr = $(this).parents('tr');
|
||||||
var row = history_table.row(tr);
|
var row = history_table.row(tr);
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
|
|||||||
@@ -9,15 +9,17 @@ libraries_list_table_options = {
|
|||||||
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
||||||
"infoFiltered": "",
|
"infoFiltered": "",
|
||||||
"emptyTable": "No data in table",
|
"emptyTable": "No data in table",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
},
|
},
|
||||||
"destroy": true,
|
"destroy": true,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 10,
|
"pageLength": 25,
|
||||||
"order": [ 2, 'asc'],
|
"order": [ 2, 'asc'],
|
||||||
"autoWidth": true,
|
"stateSave": true,
|
||||||
"stateSave": false,
|
"pagingType": "full_numbers",
|
||||||
"pagingType": "bootstrap",
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
@@ -44,10 +46,10 @@ libraries_list_table_options = {
|
|||||||
if (rowData['library_thumb'].substring(0, 4) == "http") {
|
if (rowData['library_thumb'].substring(0, 4) == "http") {
|
||||||
$(td).html('<a href="library?section_id=' + rowData['section_id'] + '"><div class="libraries-poster-face" style="background-image: url(' + rowData['library_thumb'] + ');"></div></a>');
|
$(td).html('<a href="library?section_id=' + rowData['section_id'] + '"><div class="libraries-poster-face" style="background-image: url(' + rowData['library_thumb'] + ');"></div></a>');
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="library?section_id=' + rowData['section_id'] + '"><div class="libraries-poster-face" style="background-image: url(pms_image_proxy?img=' + rowData['library_thumb'] + '&width=80&height=80&fallback=poster);"></div></a>');
|
$(td).html('<a href="library?section_id=' + rowData['section_id'] + '"><div class="libraries-poster-face" style="background-image: url(pms_image_proxy?img=' + rowData['library_thumb'] + '&width=80&height=80&fallback=cover);"></div></a>');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="library?section_id=' + rowData['section_id'] + '"><div class="libraries-poster-face" style="background-image: url(interfaces/default/images/cover.png);"></div></a>');
|
$(td).html('<a href="library?section_id=' + rowData['section_id'] + '"><div class="libraries-poster-face" style="background-image: url(../../images/cover.png);"></div></a>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"orderable": false,
|
"orderable": false,
|
||||||
@@ -79,7 +81,7 @@ libraries_list_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [4],
|
"targets": [4],
|
||||||
@@ -91,7 +93,7 @@ libraries_list_table_options = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [5],
|
"targets": [5],
|
||||||
@@ -103,7 +105,7 @@ libraries_list_table_options = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [6],
|
"targets": [6],
|
||||||
@@ -115,7 +117,7 @@ libraries_list_table_options = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [7],
|
"targets": [7],
|
||||||
@@ -129,7 +131,7 @@ libraries_list_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [8],
|
"targets": [8],
|
||||||
@@ -140,35 +142,72 @@ libraries_list_table_options = {
|
|||||||
var media_type = '';
|
var media_type = '';
|
||||||
var thumb_popover = '';
|
var thumb_popover = '';
|
||||||
if (rowData['media_type'] === 'movie') {
|
if (rowData['media_type'] === 'movie') {
|
||||||
if (rowData['year']) { parent_info = ' (' + rowData['year'] + ')'; }
|
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Movie"><i class="fa fa-film fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Movie"><i class="fa fa-film fa-fw"></i></span>';
|
||||||
|
if (rowData['rating_key']) {
|
||||||
|
if (rowData['year']) { parent_info = ' (' + rowData['year'] + ')'; }
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
|
} else {
|
||||||
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="images/poster.png" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
|
$(td).html('<div class="history-title"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></div>');
|
||||||
|
}
|
||||||
} else if (rowData['media_type'] === 'episode') {
|
} else if (rowData['media_type'] === 'episode') {
|
||||||
if (rowData['parent_media_index'] && rowData['media_index']) { parent_info = ' (S' + rowData['parent_media_index'] + '· E' + rowData['media_index'] + ')'; }
|
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
||||||
|
if (rowData['rating_key']) {
|
||||||
|
if (rowData['parent_media_index'] && rowData['media_index']) { parent_info = ' (S' + rowData['parent_media_index'] + '· E' + rowData['media_index'] + ')'; }
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;" >' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;" >' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
|
} else {
|
||||||
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="images/poster.png" data-height="120" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
|
$(td).html('<div class="history-title"><div style="float: left;" >' + media_type + ' ' + thumb_popover + '</div></div>');
|
||||||
|
}
|
||||||
} else if (rowData['media_type'] === 'track') {
|
} else if (rowData['media_type'] === 'track') {
|
||||||
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
if (rowData['rating_key']) {
|
||||||
|
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
||||||
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
|
} else {
|
||||||
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="images/cover.png" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
|
$(td).html('<div class="history-title"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></div>');
|
||||||
|
}
|
||||||
} else if (rowData['media_type']) {
|
} else if (rowData['media_type']) {
|
||||||
|
if (rowData['rating_key']) {
|
||||||
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
||||||
|
} else {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(td).html('n/a');
|
$(td).html('n/a');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "25%",
|
"width": "18%",
|
||||||
"className": "hidden-sm hidden-xs"
|
"className": "datatable-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [9],
|
"targets": [9],
|
||||||
"data": "plays",
|
"data": "plays",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== null && cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "10%"
|
"width": "7%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [10],
|
||||||
|
"data": "duration",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== null && cellData !== '') {
|
||||||
|
$(td).html(humanTimeClean(cellData));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"searchable": false,
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
@@ -178,10 +217,10 @@ libraries_list_table_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.purge-tooltip').tooltip();
|
$('.purge-tooltip').tooltip({ container: 'body' });
|
||||||
$('.edit-tooltip').tooltip();
|
$('.edit-tooltip').tooltip({ container: 'body' });
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
container: 'body',
|
container: 'body',
|
||||||
|
|||||||
124
data/interfaces/default/js/tables/login_logs.js
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
login_log_table_options = {
|
||||||
|
"destroy": true,
|
||||||
|
"language": {
|
||||||
|
"search": "Search: ",
|
||||||
|
"lengthMenu": "Show _MENU_ entries per page",
|
||||||
|
"info": "Showing _START_ to _END_ of _TOTAL_ results",
|
||||||
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
||||||
|
"infoFiltered": "(filtered from _MAX_ total entries)",
|
||||||
|
"emptyTable": "No data in table",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
|
},
|
||||||
|
"stateSave": true,
|
||||||
|
"pagingType": "full_numbers",
|
||||||
|
"processing": false,
|
||||||
|
"serverSide": true,
|
||||||
|
"pageLength": 25,
|
||||||
|
"order": [0, 'desc'],
|
||||||
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
|
"columnDefs": [
|
||||||
|
{
|
||||||
|
"targets": [0],
|
||||||
|
"data": "timestamp",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== '') {
|
||||||
|
$(td).html(moment(cellData, "X").format('YYYY-MM-DD HH:mm:ss'));
|
||||||
|
} else {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"searchable": false,
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [1],
|
||||||
|
"data": "friendly_name",
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [2],
|
||||||
|
"data": "user_group",
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [3],
|
||||||
|
"data": "ip_address",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData) {
|
||||||
|
if (isPrivateIP(cellData)) {
|
||||||
|
if (cellData != '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
} else {
|
||||||
|
$(td).html('n/a');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
external_ip = '<span class="external-ip-tooltip" data-toggle="tooltip" title="External IP"><i class="fa fa-map-marker fa-fw"></i></span>';
|
||||||
|
$(td).html('<a href="javascript:void(0)" data-toggle="modal" data-target="#ip-info-modal">' + external_ip + cellData + '</a>');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$(td).html('n/a');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap modal-control-ip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [4],
|
||||||
|
"data": "host",
|
||||||
|
"width": "20%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [5],
|
||||||
|
"data": "os",
|
||||||
|
"width": "20%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [6],
|
||||||
|
"data": "browser",
|
||||||
|
"width": "20%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"drawCallback": function (settings) {
|
||||||
|
// Jump to top of page
|
||||||
|
// $('html,body').scrollTop(0);
|
||||||
|
|
||||||
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
|
// Create the tooltips.
|
||||||
|
$('.external-ip-tooltip').tooltip({ container: 'body' });
|
||||||
|
|
||||||
|
},
|
||||||
|
"preDrawCallback": function (settings) {
|
||||||
|
var msg = "<i class='fa fa-refresh fa-spin'></i> Fetching rows...";
|
||||||
|
showMsg(msg, false, false, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.login_log_table').on('click', '> tbody > tr > td.modal-control-ip', function () {
|
||||||
|
var tr = $(this).closest('tr');
|
||||||
|
var row = login_log_table.row(tr);
|
||||||
|
var rowData = row.data();
|
||||||
|
|
||||||
|
function getUserLocation(ip_address) {
|
||||||
|
if (isPrivateIP(ip_address)) {
|
||||||
|
return "n/a"
|
||||||
|
} else {
|
||||||
|
$.ajax({
|
||||||
|
url: 'get_ip_address_details',
|
||||||
|
data: { ip_address: ip_address },
|
||||||
|
async: true,
|
||||||
|
complete: function (xhr, status) {
|
||||||
|
$("#ip-info-modal").html(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getUserLocation(rowData['ip_address']);
|
||||||
|
});
|
||||||
@@ -2,27 +2,31 @@ var log_table_options = {
|
|||||||
"destroy": true,
|
"destroy": true,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "full_numbers",
|
||||||
"order": [ 0, 'desc'],
|
"order": [ 0, 'desc'],
|
||||||
"pageLength": 50,
|
"pageLength": 50,
|
||||||
"stateSave": false,
|
"stateSave": true,
|
||||||
"language": {
|
"language": {
|
||||||
"search": "Search: ",
|
"search": "Search: ",
|
||||||
"lengthMenu": "Show _MENU_ lines per page",
|
"lengthMenu": "Show _MENU_ lines per page",
|
||||||
"emptyTable": "No log information available",
|
"emptyTable": "No log information available",
|
||||||
"info": "Showing _START_ to _END_ of _TOTAL_ lines",
|
"info": "Showing _START_ to _END_ of _TOTAL_ lines",
|
||||||
"infoEmpty": "Showing 0 to 0 of 0 lines",
|
"infoEmpty": "Showing 0 to 0 of 0 lines",
|
||||||
"infoFiltered":"(filtered from _MAX_ total lines)"},
|
"infoFiltered": "(filtered from _MAX_ total lines)",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
|
},
|
||||||
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
"width": "15%",
|
"width": "15%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [1],
|
"targets": [1],
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [2],
|
"targets": [2],
|
||||||
|
|||||||
@@ -20,23 +20,28 @@ media_info_table_options = {
|
|||||||
"info":"Showing _START_ to _END_ of _TOTAL_ library items",
|
"info":"Showing _START_ to _END_ of _TOTAL_ library items",
|
||||||
"infoEmpty":"Showing 0 to 0 of 0 entries",
|
"infoEmpty":"Showing 0 to 0 of 0 entries",
|
||||||
"infoFiltered":"<span class='hidden-md hidden-sm hidden-xs'>(filtered from _MAX_ total entries)</span>",
|
"infoFiltered":"<span class='hidden-md hidden-sm hidden-xs'>(filtered from _MAX_ total entries)</span>",
|
||||||
"emptyTable": "No data in table"
|
"emptyTable": "No data in table",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
},
|
},
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "full_numbers",
|
||||||
"stateSave": false,
|
"stateSave": true,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 25,
|
"pageLength": 25,
|
||||||
"order": [ 1, 'asc'],
|
"order": [ 1, 'asc'],
|
||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
"data": "added_at",
|
"data": "added_at",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (rowData) {
|
||||||
var expand_details = '';
|
var expand_details = '';
|
||||||
var date = moment(cellData, "X").format(date_format);
|
var date = '';
|
||||||
|
if (cellData !== null && cellData !== '') {
|
||||||
|
date = moment(cellData, "X").format(date_format);
|
||||||
|
}
|
||||||
if (rowData['media_type'] === 'show') {
|
if (rowData['media_type'] === 'show') {
|
||||||
expand_details = '<span class="expand-media-info-tooltip" data-toggle="tooltip" title="Show Seasons"><i class="fa fa-plus-circle fa-fw"></i></span>';
|
expand_details = '<span class="expand-media-info-tooltip" data-toggle="tooltip" title="Show Seasons"><i class="fa fa-plus-circle fa-fw"></i></span>';
|
||||||
$(td).html('<div><a href="#"><div style="float: left;">' + expand_details + ' ' + date + '</div></a></div>');
|
$(td).html('<div><a href="#"><div style="float: left;">' + expand_details + ' ' + date + '</div></a></div>');
|
||||||
@@ -84,26 +89,27 @@ media_info_table_options = {
|
|||||||
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 15px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 15px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type'] === 'episode') {
|
} else if (rowData['media_type'] === 'episode') {
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=poster" data-height="80" data-width="140">E' + rowData['media_index'] + ' - ' + cellData + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=450&fallback=art" data-height="80" data-width="140">E' + rowData['media_index'] + ' - ' + cellData + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 30px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 30px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type'] === 'artist') {
|
} else if (rowData['media_type'] === 'artist') {
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Artist"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Artist"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">' + cellData + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">' + cellData + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type'] === 'album') {
|
} else if (rowData['media_type'] === 'album') {
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Album"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Album"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">' + cellData + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">' + cellData + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 15px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 15px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type'] === 'track') {
|
} else if (rowData['media_type'] === 'track') {
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">T' + rowData['media_index'] + ' - ' + cellData + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">T' + rowData['media_index'] + ' - ' + cellData + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 30px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?rating_key=' + rowData['rating_key'] + '"><div style="float: left; padding-left: 30px;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else {
|
} else {
|
||||||
$(td).html(cellData);
|
$(td).html(cellData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "20%"
|
"width": "20%",
|
||||||
|
"className": "no-wrap",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [2],
|
"targets": [2],
|
||||||
@@ -114,7 +120,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "6%",
|
"width": "6%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [3],
|
"targets": [3],
|
||||||
@@ -125,7 +131,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "6%",
|
"width": "6%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs",
|
"className": "no-wrap",
|
||||||
"searchable": false
|
"searchable": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -137,7 +143,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "8%",
|
"width": "8%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [5],
|
"targets": [5],
|
||||||
@@ -148,7 +154,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "8%",
|
"width": "8%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [6],
|
"targets": [6],
|
||||||
@@ -159,7 +165,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "8%",
|
"width": "8%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [7],
|
"targets": [7],
|
||||||
@@ -170,7 +176,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "8%",
|
"width": "8%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [8],
|
"targets": [8],
|
||||||
@@ -181,7 +187,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "8%",
|
"width": "8%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [9],
|
"targets": [9],
|
||||||
@@ -196,7 +202,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "7%",
|
"width": "7%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs",
|
"className": "no-wrap",
|
||||||
"searchable": false
|
"searchable": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -209,7 +215,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "7%",
|
"width": "7%",
|
||||||
"className": "no-wrap hidden-xs",
|
"className": "no-wrap",
|
||||||
"searchable": false
|
"searchable": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -221,7 +227,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "5%",
|
"width": "5%",
|
||||||
"className": "no-wrap hidden-xs",
|
"className": "no-wrap",
|
||||||
"searchable": false
|
"searchable": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -273,7 +279,7 @@ media_info_table_options = {
|
|||||||
get_file_sizes = false;
|
get_file_sizes = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#media_info_table_info").append('<span class="hidden-md hidden-sm hidden-xs"> with a total file size of ' +
|
$("#media_info_table-SID-" + section_id + "_info").append('<span class="hidden-md hidden-sm hidden-xs"> with a total file size of ' +
|
||||||
Math.round(settings.json.filtered_file_size / Math.pow(1024, 3)).toString() + ' GiB' +
|
Math.round(settings.json.filtered_file_size / Math.pow(1024, 3)).toString() + ' GiB' +
|
||||||
' (filtered from ' + Math.round(settings.json.total_file_size / Math.pow(1024, 3)).toString() + ' GiB)</span>');
|
' (filtered from ' + Math.round(settings.json.total_file_size / Math.pow(1024, 3)).toString() + ' GiB)</span>');
|
||||||
},
|
},
|
||||||
@@ -291,7 +297,7 @@ media_info_table_options = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parent table expand detailed media info
|
// Parent table expand detailed media info
|
||||||
$('#media_info_table').on('click', '> tbody > tr > td.expand-media-info a', function () {
|
$('.media_info_table').on('click', '> tbody > tr > td.expand-media-info a', function () {
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
var row = media_info_table.row(tr);
|
var row = media_info_table.row(tr);
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
|
|||||||
94
data/interfaces/default/js/tables/notification_logs.js
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
notification_log_table_options = {
|
||||||
|
"destroy": true,
|
||||||
|
"serverSide": true,
|
||||||
|
"processing": false,
|
||||||
|
"pagingType": "full_numbers",
|
||||||
|
"order": [ 0, 'desc'],
|
||||||
|
"pageLength": 50,
|
||||||
|
"stateSave": true,
|
||||||
|
"language": {
|
||||||
|
"search":"Search: ",
|
||||||
|
"lengthMenu": "Show _MENU_ lines per page",
|
||||||
|
"emptyTable": "No log information available",
|
||||||
|
"info" :"Showing _START_ to _END_ of _TOTAL_ lines",
|
||||||
|
"infoEmpty": "Showing 0 to 0 of 0 lines",
|
||||||
|
"infoFiltered": "(filtered from _MAX_ total lines)",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
|
},
|
||||||
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
|
"columnDefs": [
|
||||||
|
{
|
||||||
|
"targets": [0],
|
||||||
|
"data": "timestamp",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== '') {
|
||||||
|
$(td).html(moment(cellData, "X").format('YYYY-MM-DD HH:mm:ss'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [1],
|
||||||
|
"data": "agent_name",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": "7%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [2],
|
||||||
|
"data": "notify_action",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": "5%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [3],
|
||||||
|
"data": "subject_text",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": "20%"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [4],
|
||||||
|
"data": "body_text",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": "38%"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [5],
|
||||||
|
"data": "script_args",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": "20%"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"drawCallback": function (settings) {
|
||||||
|
// Jump to top of page
|
||||||
|
//$('html,body').scrollTop(0);
|
||||||
|
$('#ajaxMsg').fadeOut();
|
||||||
|
},
|
||||||
|
"preDrawCallback": function(settings) {
|
||||||
|
var msg = "<i class='fa fa-refresh fa-spin'></i> Fetching rows...";
|
||||||
|
showMsg(msg, false, false, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,32 +1,45 @@
|
|||||||
var plex_log_table_options = {
|
var plex_log_table_options = {
|
||||||
"destroy": true,
|
"destroy": true,
|
||||||
"processing": false,
|
|
||||||
"serverSide": false,
|
"serverSide": false,
|
||||||
"pagingType": "bootstrap",
|
"processing": false,
|
||||||
|
"pagingType": "full_numbers",
|
||||||
"order": [ 0, 'desc'],
|
"order": [ 0, 'desc'],
|
||||||
"pageLength": 50,
|
"pageLength": 50,
|
||||||
"stateSave": false,
|
"stateSave": true,
|
||||||
"language": {
|
"language": {
|
||||||
"search": "Search: ",
|
"search": "Search: ",
|
||||||
"lengthMenu": "Show _MENU_ lines per page",
|
"lengthMenu": "Show _MENU_ lines per page",
|
||||||
"emptyTable": "No log information available. Have you set your logs folder in the <a href='settings'>settings</a>?",
|
"emptyTable": "No log information available. Have you set your logs folder in the <a href='settings'>settings</a>?",
|
||||||
"info": "Showing _START_ to _END_ of _TOTAL_ lines",
|
"info": "Showing _START_ to _END_ of _TOTAL_ lines",
|
||||||
"infoEmpty": "Showing 0 to 0 of 0 lines",
|
"infoEmpty": "Showing 0 to 0 of 0 lines",
|
||||||
"infoFiltered":"(filtered from _MAX_ total lines)"},
|
"infoFiltered": "(filtered from _MAX_ total lines)",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
|
},
|
||||||
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
"width": "15%",
|
"width": "15%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [1],
|
"targets": [1],
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [2],
|
"targets": [2],
|
||||||
"width": "75%"
|
"width": "75%"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"drawCallback": function (settings) {
|
||||||
|
// Jump to top of page
|
||||||
|
//$('html,body').scrollTop(0);
|
||||||
|
$('#ajaxMsg').fadeOut();
|
||||||
|
},
|
||||||
|
"preDrawCallback": function(settings) {
|
||||||
|
var msg = "<i class='fa fa-refresh fa-spin'></i> Fetching rows...";
|
||||||
|
showMsg(msg, false, false, 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
sync_table_options = {
|
sync_table_options = {
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": false,
|
"serverSide": false,
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "full_numbers",
|
||||||
"order": [ [ 0, 'desc'], [ 1, 'asc'], [2, 'asc'] ],
|
"order": [ [ 0, 'desc'], [ 1, 'asc'], [2, 'asc'] ],
|
||||||
"pageLength": 25,
|
"pageLength": 25,
|
||||||
"stateSave": false,
|
"stateSave": true,
|
||||||
"language": {
|
"language": {
|
||||||
"search": "Search: ",
|
"search": "Search: ",
|
||||||
"lengthMenu": "Show _MENU_ lines per page",
|
"lengthMenu": "Show _MENU_ lines per page",
|
||||||
@@ -14,6 +14,8 @@ sync_table_options = {
|
|||||||
"infoFiltered": "(filtered from _MAX_ total lines)",
|
"infoFiltered": "(filtered from _MAX_ total lines)",
|
||||||
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
},
|
},
|
||||||
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
@@ -26,7 +28,7 @@ sync_table_options = {
|
|||||||
$(td).html(cellData.toProperCase());
|
$(td).html(cellData.toProperCase());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [1],
|
"targets": [1],
|
||||||
@@ -55,7 +57,8 @@ sync_table_options = {
|
|||||||
$(td).html(cellData);
|
$(td).html(cellData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"className": "datatable-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [3],
|
"targets": [3],
|
||||||
@@ -63,17 +66,17 @@ sync_table_options = {
|
|||||||
"render": function ( data, type, full ) {
|
"render": function ( data, type, full ) {
|
||||||
return data.toProperCase();
|
return data.toProperCase();
|
||||||
},
|
},
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [4],
|
"targets": [4],
|
||||||
"data": "platform",
|
"data": "platform",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [5],
|
"targets": [5],
|
||||||
"data": "device_name",
|
"data": "device_name",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [6],
|
"targets": [6],
|
||||||
@@ -86,22 +89,22 @@ sync_table_options = {
|
|||||||
$(td).html('0MB');
|
$(td).html('0MB');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [7],
|
"targets": [7],
|
||||||
"data": "item_count",
|
"data": "item_count",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [8],
|
"targets": [8],
|
||||||
"data": "item_complete_count",
|
"data": "item_complete_count",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [9],
|
"targets": [9],
|
||||||
"data": "item_downloaded_count",
|
"data": "item_downloaded_count",
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [10],
|
"targets": [10],
|
||||||
@@ -113,11 +116,17 @@ sync_table_options = {
|
|||||||
$(td).html('<span class="badge">0%</span>');
|
$(td).html('<span class="badge">0%</span>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"className": "no-wrap hidden-sm hidden-xs"
|
"className": "no-wrap"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"drawCallback": function (settings) {
|
"drawCallback": function (settings) {
|
||||||
// Jump to top of page
|
// Jump to top of page
|
||||||
$('html,body').scrollTop(0);
|
// $('html,body').scrollTop(0);
|
||||||
|
|
||||||
|
$('#ajaxMsg').fadeOut();
|
||||||
|
},
|
||||||
|
"preDrawCallback": function (settings) {
|
||||||
|
var msg = "<i class='fa fa-refresh fa-spin'></i> Fetching rows...";
|
||||||
|
showMsg(msg, false, false, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,16 @@ user_ip_table_options = {
|
|||||||
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
||||||
"infoFiltered": "(filtered from _MAX_ total entries)",
|
"infoFiltered": "(filtered from _MAX_ total entries)",
|
||||||
"emptyTable": "No data in table",
|
"emptyTable": "No data in table",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
},
|
},
|
||||||
"stateSave": false,
|
"stateSave": true,
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "full_numbers",
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 10,
|
"pageLength": 25,
|
||||||
"order": [ 0, 'desc'],
|
"order": [ 0, 'desc'],
|
||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
@@ -24,7 +26,7 @@ user_ip_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "15%",
|
"width": "15%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [1],
|
"targets": [1],
|
||||||
@@ -38,7 +40,8 @@ user_ip_table_options = {
|
|||||||
$(td).html('n/a');
|
$(td).html('n/a');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="javascript:void(0)" data-toggle="modal" data-target="#ip-info-modal"><span data-toggle="ip-tooltip" data-placement="left" title="IP Address Info" id="ip-info"><i class="fa fa-map-marker"></i></span> ' + cellData +'</a>');
|
external_ip = '<span class="external-ip-tooltip" data-toggle="tooltip" title="External IP"><i class="fa fa-map-marker fa-fw"></i></span>';
|
||||||
|
$(td).html('<a href="javascript:void(0)" data-toggle="modal" data-target="#ip-info-modal">' + external_ip + cellData + '</a>');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(td).html('n/a');
|
$(td).html('n/a');
|
||||||
@@ -56,7 +59,7 @@ user_ip_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "15%",
|
"width": "15%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [3],
|
"targets": [3],
|
||||||
@@ -64,11 +67,11 @@ user_ip_table_options = {
|
|||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData) {
|
if (cellData) {
|
||||||
var transcode_dec = '';
|
var transcode_dec = '';
|
||||||
if (rowData['video_decision'] === 'transcode' || rowData['audio_decision'] === 'transcode') {
|
if (rowData['transcode_decision'] === 'transcode') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'copy' || rowData['audio_decision'] === 'copy') {
|
} else if (rowData['transcode_decision'] === 'copy') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'direct play' || rowData['audio_decision'] === 'direct play') {
|
} else if (rowData['transcode_decision'] === 'direct play') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
||||||
}
|
}
|
||||||
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
||||||
@@ -77,7 +80,7 @@ user_ip_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "15%",
|
"width": "15%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
"className": "no-wrap modal-control"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [4],
|
"targets": [4],
|
||||||
@@ -100,7 +103,7 @@ user_ip_table_options = {
|
|||||||
} else if (rowData['media_type'] === 'track') {
|
} else if (rowData['media_type'] === 'track') {
|
||||||
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type']) {
|
} else if (rowData['media_type']) {
|
||||||
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
||||||
@@ -110,13 +113,14 @@ user_ip_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "30%",
|
"width": "30%",
|
||||||
"className": "hidden-sm hidden-xs"
|
"className": "datatable-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [5],
|
"targets": [5],
|
||||||
"data":"play_count",
|
"data":"play_count",
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "10%"
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"drawCallback": function (settings) {
|
"drawCallback": function (settings) {
|
||||||
@@ -125,9 +129,10 @@ user_ip_table_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.external-ip-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.watched-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
|
$('.watched-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
container: 'body',
|
container: 'body',
|
||||||
@@ -146,11 +151,11 @@ user_ip_table_options = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#user_ip_table').on('mouseenter', 'td.modal-control span', function () {
|
$('.user_ip_table').on('mouseenter', 'td.modal-control span', function () {
|
||||||
$(this).tooltip();
|
$(this).tooltip();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#user_ip_table').on('click', 'td.modal-control', function () {
|
$('.user_ip_table').on('click', 'td.modal-control', function () {
|
||||||
var tr = $(this).parents('tr');
|
var tr = $(this).parents('tr');
|
||||||
var row = user_ip_table.row(tr);
|
var row = user_ip_table.row(tr);
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
@@ -169,7 +174,7 @@ $('#user_ip_table').on('click', 'td.modal-control', function () {
|
|||||||
showStreamDetails();
|
showStreamDetails();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#user_ip_table').on('click', 'td.modal-control-ip', function () {
|
$('.user_ip_table').on('click', 'td.modal-control-ip', function () {
|
||||||
var tr = $(this).parents('tr');
|
var tr = $(this).parents('tr');
|
||||||
var row = user_ip_table.row( tr );
|
var row = user_ip_table.row( tr );
|
||||||
var rowData = row.data();
|
var rowData = row.data();
|
||||||
|
|||||||
@@ -1,6 +1,23 @@
|
|||||||
var users_to_delete = [];
|
var users_to_delete = [];
|
||||||
var users_to_purge = [];
|
var users_to_purge = [];
|
||||||
|
|
||||||
|
function toggleEditNames() {
|
||||||
|
if ($('.edit-control').hasClass('hidden')) {
|
||||||
|
$('.edit-user-control > .edit-user-name').each(function () {
|
||||||
|
a = $(this).children('a');
|
||||||
|
input = $(this).children('input');
|
||||||
|
a.text(input.val());
|
||||||
|
a.removeClass('hidden');
|
||||||
|
input.addClass('hidden');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$('.edit-user-control > .edit-user-name').each(function () {
|
||||||
|
$(this).children('a').addClass('hidden');
|
||||||
|
$(this).children('input').removeClass('hidden');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
users_list_table_options = {
|
users_list_table_options = {
|
||||||
"language": {
|
"language": {
|
||||||
"search": "Search: ",
|
"search": "Search: ",
|
||||||
@@ -9,15 +26,17 @@ users_list_table_options = {
|
|||||||
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
||||||
"infoFiltered": "",
|
"infoFiltered": "",
|
||||||
"emptyTable": "No data in table",
|
"emptyTable": "No data in table",
|
||||||
|
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
|
||||||
},
|
},
|
||||||
"destroy": true,
|
"destroy": true,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 10,
|
"pageLength": 25,
|
||||||
"order": [ 2, 'asc'],
|
"order": [ 2, 'asc'],
|
||||||
"autoWidth": true,
|
"stateSave": true,
|
||||||
"stateSave": false,
|
"pagingType": "full_numbers",
|
||||||
"pagingType": "bootstrap",
|
"autoWidth": false,
|
||||||
|
"scrollX": true,
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"targets": [0],
|
"targets": [0],
|
||||||
@@ -28,6 +47,7 @@ users_list_table_options = {
|
|||||||
'<button class="btn btn-xs btn-warning purge-user" data-id="' + rowData['user_id'] + '" data-toggle="button"><i class="fa fa-eraser fa-fw"></i> Purge</button>   ' +
|
'<button class="btn btn-xs btn-warning purge-user" data-id="' + rowData['user_id'] + '" data-toggle="button"><i class="fa fa-eraser fa-fw"></i> Purge</button>   ' +
|
||||||
'<input type="checkbox" id="do_notify-' + rowData['user_id'] + '" name="do_notify" value="1" ' + rowData['do_notify'] + '><label class="edit-tooltip" for="do_notify-' + rowData['user_id'] + '" data-toggle="tooltip" title="Toggle Notifications"><i class="fa fa-bell fa-lg fa-fw"></i></label> ' +
|
'<input type="checkbox" id="do_notify-' + rowData['user_id'] + '" name="do_notify" value="1" ' + rowData['do_notify'] + '><label class="edit-tooltip" for="do_notify-' + rowData['user_id'] + '" data-toggle="tooltip" title="Toggle Notifications"><i class="fa fa-bell fa-lg fa-fw"></i></label> ' +
|
||||||
'<input type="checkbox" id="keep_history-' + rowData['user_id'] + '" name="keep_history" value="1" ' + rowData['keep_history'] + '><label class="edit-tooltip" for="keep_history-' + rowData['user_id'] + '" data-toggle="tooltip" title="Toggle History"><i class="fa fa-history fa-lg fa-fw"></i></label> ' +
|
'<input type="checkbox" id="keep_history-' + rowData['user_id'] + '" name="keep_history" value="1" ' + rowData['keep_history'] + '><label class="edit-tooltip" for="keep_history-' + rowData['user_id'] + '" data-toggle="tooltip" title="Toggle History"><i class="fa fa-history fa-lg fa-fw"></i></label> ' +
|
||||||
|
'<input type="checkbox" id="allow_guest-' + rowData['user_id'] + '" name="allow_guest" value="1" ' + rowData['allow_guest'] + '><label class="edit-tooltip" for="allow_guest-' + rowData['user_id'] + '" data-toggle="tooltip" title="Toggle Guest Access"><i class="fa fa-unlock-alt fa-lg fa-fw"></i></label> ' +
|
||||||
'</div>');
|
'</div>');
|
||||||
},
|
},
|
||||||
"width": "7%",
|
"width": "7%",
|
||||||
@@ -40,7 +60,7 @@ users_list_table_options = {
|
|||||||
"data": "user_thumb",
|
"data": "user_thumb",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData === '') {
|
if (cellData === '') {
|
||||||
$(td).html('<a href="user?user_id=' + rowData['user_id'] + '"><div class="users-poster-face" style="background-image: url(interfaces/default/images/gravatar-default-80x80.png);"></div></a>');
|
$(td).html('<a href="user?user_id=' + rowData['user_id'] + '"><div class="users-poster-face" style="background-image: url(../../images/gravatar-default-80x80.png);"></div></a>');
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="user?user_id=' + rowData['user_id'] + '"><div class="users-poster-face" style="background-image: url(' + rowData['user_thumb'] + ');"></div></a>');
|
$(td).html('<a href="user?user_id=' + rowData['user_id'] + '"><div class="users-poster-face" style="background-image: url(' + rowData['user_thumb'] + ');"></div></a>');
|
||||||
}
|
}
|
||||||
@@ -78,7 +98,7 @@ users_list_table_options = {
|
|||||||
},
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-xs"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [4],
|
"targets": [4],
|
||||||
@@ -99,7 +119,7 @@ users_list_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control-ip"
|
"className": "no-wrap modal-control-ip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [5],
|
"targets": [5],
|
||||||
@@ -112,7 +132,7 @@ users_list_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "10%",
|
"width": "10%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
"className": "no-wrap modal-control"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [6],
|
"targets": [6],
|
||||||
@@ -120,11 +140,11 @@ users_list_table_options = {
|
|||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
var transcode_dec = '';
|
var transcode_dec = '';
|
||||||
if (rowData['video_decision'] === 'transcode' || rowData['audio_decision'] === 'transcode') {
|
if (rowData['transcode_decision'] === 'transcode') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'copy' || rowData['audio_decision'] === 'copy') {
|
} else if (rowData['transcode_decision'] === 'copy') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span>';
|
||||||
} else if (rowData['video_decision'] === 'direct play' || rowData['audio_decision'] === 'direct play') {
|
} else if (rowData['transcode_decision'] === 'direct play') {
|
||||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span>';
|
||||||
}
|
}
|
||||||
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
||||||
@@ -133,7 +153,7 @@ users_list_table_options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "15%",
|
"width": "15%",
|
||||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
"className": "no-wrap modal-control"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [7],
|
"targets": [7],
|
||||||
@@ -156,7 +176,7 @@ users_list_table_options = {
|
|||||||
} else if (rowData['media_type'] === 'track') {
|
} else if (rowData['media_type'] === 'track') {
|
||||||
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
if (rowData['parent_title']) { parent_info = ' (' + rowData['parent_title'] + ')'; }
|
||||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
||||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=poster" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=300&height=300&fallback=cover" data-height="80" data-width="80">' + cellData + parent_info + '</span>'
|
||||||
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
$(td).html('<div class="history-title"><a href="info?source=history&rating_key=' + rowData['rating_key'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||||
} else if (rowData['media_type']) {
|
} else if (rowData['media_type']) {
|
||||||
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
|
||||||
@@ -165,14 +185,32 @@ users_list_table_options = {
|
|||||||
$(td).html('n/a');
|
$(td).html('n/a');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"width": "30%",
|
"width": "23%",
|
||||||
"className": "hidden-sm hidden-xs"
|
"className": "datatable-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [8],
|
"targets": [8],
|
||||||
"data": "plays",
|
"data": "plays",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== null && cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"width": "10%"
|
"width": "7%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [9],
|
||||||
|
"data": "duration",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== null && cellData !== '') {
|
||||||
|
$(td).html(humanTimeClean(cellData));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"searchable": false,
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
@@ -182,13 +220,14 @@ users_list_table_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.purge-tooltip').tooltip();
|
$('.purge-tooltip').tooltip({ container: 'body' });
|
||||||
$('.edit-tooltip').tooltip();
|
$('.edit-tooltip').tooltip({ container: 'body' });
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.watched-tooltip').tooltip();
|
$('.watched-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
|
container: 'body',
|
||||||
trigger: 'hover',
|
trigger: 'hover',
|
||||||
placement: 'right',
|
placement: 'right',
|
||||||
template: '<div class="popover history-thumbnail-popover" role="tooltip"><div class="arrow" style="top: 50%;"></div><div class="popover-content"></div></div>',
|
template: '<div class="popover history-thumbnail-popover" role="tooltip"><div class="arrow" style="top: 50%;"></div><div class="popover-content"></div></div>',
|
||||||
@@ -201,6 +240,7 @@ users_list_table_options = {
|
|||||||
$('.edit-control').each(function () {
|
$('.edit-control').each(function () {
|
||||||
$(this).removeClass('hidden');
|
$(this).removeClass('hidden');
|
||||||
});
|
});
|
||||||
|
toggleEditNames();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"preDrawCallback": function(settings) {
|
"preDrawCallback": function(settings) {
|
||||||
@@ -266,12 +306,16 @@ $('#users_list_table').on('change', 'td.edit-control > .edit-user-toggles > inpu
|
|||||||
|
|
||||||
var do_notify = 0;
|
var do_notify = 0;
|
||||||
var keep_history = 0;
|
var keep_history = 0;
|
||||||
|
var allow_guest = 0;
|
||||||
if ($('#do_notify-' + rowData['user_id']).is(':checked')) {
|
if ($('#do_notify-' + rowData['user_id']).is(':checked')) {
|
||||||
do_notify = 1;
|
do_notify = 1;
|
||||||
}
|
}
|
||||||
if ($('#keep_history-' + rowData['user_id']).is(':checked')) {
|
if ($('#keep_history-' + rowData['user_id']).is(':checked')) {
|
||||||
keep_history = 1;
|
keep_history = 1;
|
||||||
}
|
}
|
||||||
|
if ($('#allow_guest-' + rowData['user_id']).is(':checked')) {
|
||||||
|
allow_guest = 1;
|
||||||
|
}
|
||||||
|
|
||||||
friendly_name = tr.find('td.edit-user-control > .edit-user-name > input').val();
|
friendly_name = tr.find('td.edit-user-control > .edit-user-name > input').val();
|
||||||
|
|
||||||
@@ -282,6 +326,7 @@ $('#users_list_table').on('change', 'td.edit-control > .edit-user-toggles > inpu
|
|||||||
friendly_name: friendly_name,
|
friendly_name: friendly_name,
|
||||||
do_notify: do_notify,
|
do_notify: do_notify,
|
||||||
keep_history: keep_history,
|
keep_history: keep_history,
|
||||||
|
allow_guest: allow_guest,
|
||||||
thumb: rowData['user_thumb']
|
thumb: rowData['user_thumb']
|
||||||
},
|
},
|
||||||
cache: false,
|
cache: false,
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<%inherit file="base.html"/>
|
<%inherit file="base.html"/>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.bootstrap.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.bootstrap.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/plexpy-dataTables.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.colVis.css">
|
||||||
|
<link rel="stylesheet" href="${http_root}css/plexpy-dataTables.css">
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
@@ -23,15 +24,24 @@
|
|||||||
<span><i class="fa fa-book"></i> All Libraries</span>
|
<span><i class="fa fa-book"></i> All Libraries</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
% if config['update_section_ids'] == -1:
|
% if _session['user_group'] == 'admin':
|
||||||
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list" disabled><i class="fa fa-refresh"></i> Refresh libraries</button>
|
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select libraries to delete/purge. Data is deleted/purged upon exiting edit mode.</div>
|
||||||
% else:
|
<div class="btn-group">
|
||||||
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list"><i class="fa fa-refresh"></i> Refresh libraries</button>
|
|
||||||
% endif
|
|
||||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||||
<i class="fa fa-pencil"></i> Edit mode
|
<i class="fa fa-pencil"></i> Edit mode
|
||||||
</button> 
|
</button> 
|
||||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select libraries to delete/purge. Data is deleted/purged upon exiting edit mode.</div>
|
</div>
|
||||||
|
% if config['update_section_ids'] == -1:
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list" disabled><i class="fa fa-refresh"></i> Refresh libraries</button>
|
||||||
|
</div>
|
||||||
|
% else:
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn btn-dark refresh-libraries-button" id="refresh-libraries-list"><i class="fa fa-refresh"></i> Refresh libraries</button>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
<div class="btn-group colvis-button-bar"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class='table-card-back'>
|
||||||
@@ -48,12 +58,13 @@
|
|||||||
<th align="left" id="last_accessed">Last Accessed</th>
|
<th align="left" id="last_accessed">Last Accessed</th>
|
||||||
<th align="left" id="last_played">Last Played</th>
|
<th align="left" id="last_played">Last Played</th>
|
||||||
<th align="left" id="total_plays">Total Plays</th>
|
<th align="left" id="total_plays">Total Plays</th>
|
||||||
|
<th align="left" id="total_duration">Total Duration</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
|
<div class="modal fade" id="confirm-modal-delete" tabindex="-1" role="dialog" aria-labelledby="confirm-modal-delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -78,11 +89,12 @@
|
|||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
<script src="${http_root}js/jquery.dataTables.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.min.js"></script>
|
<script src="${http_root}js/dataTables.colVis.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.pagination.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.min.js"></script>
|
||||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.pagination.js"></script>
|
||||||
<script src="interfaces/default/js/tables/libraries.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
|
<script src="${http_root}js/tables/libraries.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
libraries_list_table_options.ajax = {
|
libraries_list_table_options.ajax = {
|
||||||
@@ -96,9 +108,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
libraries_list_table = $('#libraries_list_table').DataTable(libraries_list_table_options);
|
libraries_list_table = $('#libraries_list_table').DataTable(libraries_list_table_options);
|
||||||
|
var colvis = new $.fn.dataTable.ColVis(libraries_list_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 1] });
|
||||||
|
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||||
|
|
||||||
clearSearchButton('libraries_list_table', libraries_list_table);
|
clearSearchButton('libraries_list_table', libraries_list_table);
|
||||||
|
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
$('#row-edit-mode').on('click', function () {
|
$('#row-edit-mode').on('click', function () {
|
||||||
$('#row-edit-mode-alert').fadeIn(200);
|
$('#row-edit-mode-alert').fadeIn(200);
|
||||||
$('#libraries-to-delete').html('');
|
$('#libraries-to-delete').html('');
|
||||||
@@ -128,8 +143,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#confirm-modal').modal();
|
$('#confirm-modal-delete').modal();
|
||||||
$('#confirm-modal').one('click', '#confirm-delete', function () {
|
$('#confirm-modal-delete').one('click', '#confirm-delete', function () {
|
||||||
for (var i = 0; i < libraries_to_delete.length; i++) {
|
for (var i = 0; i < libraries_to_delete.length; i++) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'delete_library',
|
url: 'delete_library',
|
||||||
@@ -172,8 +187,10 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
% endif
|
||||||
});
|
});
|
||||||
|
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
$("#refresh-libraries-list").click(function () {
|
$("#refresh-libraries-list").click(function () {
|
||||||
if ("${config['update_section_ids']}" == "1") {
|
if ("${config['update_section_ids']}" == "1") {
|
||||||
$('#update_section_ids_message').html(
|
$('#update_section_ids_message').html(
|
||||||
@@ -198,5 +215,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
% endif
|
||||||
</script>
|
</script>
|
||||||
</%def>
|
</%def>
|
||||||
@@ -28,16 +28,21 @@ DOCUMENTATION :: END
|
|||||||
<%inherit file="base.html"/>
|
<%inherit file="base.html"/>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.bootstrap.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.bootstrap.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.colVis.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.colVis.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/plexpy-dataTables.css">
|
<link rel="stylesheet" href="${http_root}css/plexpy-dataTables.css">
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
% if data:
|
% if data:
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
% if data['library_art']:
|
||||||
<div class="art-face" style="background-image:url(pms_image_proxy?img=${data['library_art']}&width=1920&height=1080)"></div>
|
<div class="art-face" style="background-image:url(pms_image_proxy?img=${data['library_art']}&width=1920&height=1080)"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image info-art" title="Refresh background image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
<div class="summary-container">
|
<div class="summary-container">
|
||||||
<div class="summary-navbar">
|
<div class="summary-navbar">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -48,26 +53,30 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="summary-content-wrapper">
|
<div class="summary-content-wrapper" style="min-height: calc(100% - 50px);">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<div class="user-info-wrapper">
|
<div class="user-info-wrapper">
|
||||||
% if data['library_thumb'][:4] == 'http':
|
% if data['library_thumb'][:4] == 'http' or data['library_thumb'][:10] == 'interfaces':
|
||||||
<div class="library-info-poster-face" style="background-image: url(${data['library_thumb']});"></div>
|
<div class="library-info-poster-face" style="background-image: url(${data['library_thumb']});"></div>
|
||||||
% else:
|
% else:
|
||||||
<div class="library-info-poster-face" style="background-image: url(pms_image_proxy?img=${data['library_thumb']}&width=80&height=80&fallback=cover);"></div>
|
<div class="library-info-poster-face" style="background-image: url(pms_image_proxy?img=${data['library_thumb']}&width=80&height=80&fallback=cover);"></div>
|
||||||
% endif
|
% endif
|
||||||
<div class="user-info-username">
|
<div class="user-info-username">
|
||||||
<span class="set-username">${data['section_name']}</span>
|
<span class="set-username">${data['section_name']}</span>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
<span id="edit-library-tooltip" data-target="tooltip" title="Edit library details">
|
<span id="edit-library-tooltip" data-target="tooltip" title="Edit library details">
|
||||||
<a href="#" data-toggle="modal" data-target="#edit-library-modal" id="toggle-edit-library-modal"><i class="fa fa-pencil"></i></a>
|
<a href="#" data-toggle="modal" data-target="#edit-library-modal" id="toggle-edit-library-modal"><i class="fa fa-pencil"></i></a>
|
||||||
</span>
|
</span>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="user-info-nav">
|
<div class="user-info-nav">
|
||||||
<ul class="user-info-nav">
|
<ul class="user-info-nav">
|
||||||
<li class="active"><a href="#profile" data-toggle="tab">Profile</a></li>
|
<li class="active"><a href="#profile" data-toggle="tab">Profile</a></li>
|
||||||
<li><a id="history-tab-btn" href="#libraryHistory" data-toggle="tab">History</a></li>
|
<li><a id="history-tab-btn" href="#libraryHistory" data-toggle="tab">History</a></li>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
<li><a id="media-info-tab-btn" href="#libraryMediaInfo" data-toggle="tab">Media Info</a></li>
|
<li><a id="media-info-tab-btn" href="#libraryMediaInfo" data-toggle="tab">Media Info</a></li>
|
||||||
|
% endif
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -116,8 +125,16 @@ DOCUMENTATION :: END
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="table-card-header">
|
<div class="table-card-header">
|
||||||
|
<ul class="nav nav-header nav-dashboard pull-right">
|
||||||
|
<li>
|
||||||
|
<a href="#" id="recently-watched-page-left" class="paginate-watched btn-gray disabled" data-id="+1"><i class="fa fa-lg fa-chevron-left"></i></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" id="recently-watched-page-right" class="paginate-watched btn-gray disabled" data-id="-1"><i class="fa fa-lg fa-chevron-right"></i></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span><i class="fa fa-history"></i> Recently Watched</span>
|
<span><i class="fa fa-history"></i> Recently Played</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
@@ -133,6 +150,14 @@ DOCUMENTATION :: END
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="table-card-header">
|
<div class="table-card-header">
|
||||||
|
<ul class="nav nav-header nav-dashboard pull-right">
|
||||||
|
<li>
|
||||||
|
<a href="#" id="recently-added-page-left" class="paginate-added btn-gray disabled" data-id="+1"><i class="fa fa-lg fa-chevron-left"></i></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" id="recently-added-page-right" class="paginate-added btn-gray disabled" data-id="-1"><i class="fa fa-lg fa-chevron-right"></i></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span><i class="fa fa-history"></i> Recently Added</span>
|
<span><i class="fa fa-history"></i> Recently Added</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,21 +179,25 @@ DOCUMENTATION :: END
|
|||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>
|
<span>
|
||||||
<i class="fa fa-history"></i> Watch History for <strong>
|
<i class="fa fa-history"></i> History for <strong>
|
||||||
<span class="set-username">${data['section_name']}</span>
|
<span class="set-username">${data['section_name']}</span>
|
||||||
</strong>
|
</strong>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<div class="colvis-button-bar hidden-xs" id="button-bar-history"></div>
|
% if _session['user_group'] == 'admin':
|
||||||
|
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||||
|
<div class="btn-group">
|
||||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||||
<i class="fa fa-trash-o"></i> Delete mode
|
<i class="fa fa-trash-o"></i> Delete mode
|
||||||
</button>
|
</button>
|
||||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
</div>
|
||||||
|
% endif
|
||||||
|
<div class="btn-group colvis-button-bar" id="button-bar-history"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="history_table" width="100%">
|
<table class="display history_table" id="history_table-SID-${data['section_id']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="delete">Delete</th>
|
<th align="left" id="delete">Delete</th>
|
||||||
@@ -208,26 +237,30 @@ DOCUMENTATION :: END
|
|||||||
<div class='table-card-header'>
|
<div class='table-card-header'>
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>
|
<span>
|
||||||
<i class="fa fa-history"></i> All Media Info for <strong>
|
<i class="fa fa-history"></i> Media Info for <strong>
|
||||||
<span class="set-username">${data['section_name']}</span>
|
<span class="set-username">${data['section_name']}</span>
|
||||||
</strong>
|
</strong>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<div class="btn-group">
|
||||||
% if config['get_file_sizes'] and data['section_id'] in config['get_file_sizes_hold']['section_ids']:
|
% if config['get_file_sizes'] and data['section_id'] in config['get_file_sizes_hold']['section_ids']:
|
||||||
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table" style="margin-right: 5px;" disabled>
|
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table" disabled>
|
||||||
<i class="fa fa-refresh"></i> Refresh media info
|
<i class="fa fa-refresh"></i> Refresh media info
|
||||||
</button>
|
</button>
|
||||||
% else:
|
% else:
|
||||||
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table" style="margin-right: 5px;">
|
<button class="btn btn-dark refresh-media-info-table-button" id="refresh-media-info-table">
|
||||||
<i class="fa fa-refresh"></i> Refresh media info
|
<i class="fa fa-refresh"></i> Refresh media info
|
||||||
</button>
|
</button>
|
||||||
% endif
|
% endif
|
||||||
<div class="colvis-button-bar hidden-xs" id="button-bar-media-info"></div>
|
</div>
|
||||||
|
% endif
|
||||||
|
<div class="btn-group colvis-button-bar" id="button-bar-media-info"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="media_info_table" width="100%">
|
<table class="display media_info_table" id="media_info_table-SID-${data['section_id']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="added_at">Added At</th>
|
<th align="left" id="added_at">Added At</th>
|
||||||
@@ -255,7 +288,7 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
|
<div class="modal fade" id="confirm-modal-delete" tabindex="-1" role="dialog" aria-labelledby="confirm-modal-delete">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -303,10 +336,10 @@ DOCUMENTATION :: END
|
|||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
<script src="${http_root}js/jquery.dataTables.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.colVis.js"></script>
|
<script src="${http_root}js/dataTables.colVis.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.min.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.pagination.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.pagination.js"></script>
|
||||||
% if data:
|
% if data:
|
||||||
<script>
|
<script>
|
||||||
% if str(data['section_id']).isdigit():
|
% if str(data['section_id']).isdigit():
|
||||||
@@ -323,16 +356,16 @@ DOCUMENTATION :: END
|
|||||||
var get_file_sizes = null;
|
var get_file_sizes = null;
|
||||||
% endif
|
% endif
|
||||||
</script>
|
</script>
|
||||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
<script src="${http_root}js/tables/history_table.js"></script>
|
||||||
<script src="interfaces/default/js/tables/media_info_table.js"></script>
|
<script src="${http_root}js/tables/media_info_table.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#edit-library-tooltip").tooltip();
|
$("#edit-library-tooltip").tooltip();
|
||||||
|
|
||||||
// Populate watch time stats
|
// Populate watch time stats
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_library_watch_time_stats',
|
url: 'library_watch_time_stats',
|
||||||
async: true,
|
async: true,
|
||||||
data: { section_id: section_id },
|
data: { section_id: section_id },
|
||||||
complete: function(xhr, status) {
|
complete: function(xhr, status) {
|
||||||
@@ -342,7 +375,7 @@ DOCUMENTATION :: END
|
|||||||
|
|
||||||
// Populate user stats
|
// Populate user stats
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_library_user_stats',
|
url: 'library_user_stats',
|
||||||
async: true,
|
async: true,
|
||||||
data: { section_id: section_id },
|
data: { section_id: section_id },
|
||||||
complete: function(xhr, status) {
|
complete: function(xhr, status) {
|
||||||
@@ -358,18 +391,28 @@ DOCUMENTATION :: END
|
|||||||
data: function ( d ) {
|
data: function ( d ) {
|
||||||
return {
|
return {
|
||||||
json_data: JSON.stringify( d ),
|
json_data: JSON.stringify( d ),
|
||||||
section_id: section_id
|
section_id: section_id,
|
||||||
|
user_id: "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
history_table = $('#history_table').DataTable(history_table_options);
|
history_table = $('#history_table-SID-${data["section_id"]}').DataTable(history_table_options);
|
||||||
|
|
||||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||||
$(colvis.button()).appendTo('#button-bar-history');
|
$(colvis.button()).appendTo('#button-bar-history');
|
||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table-SID-${data["section_id"]}', history_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$( "#history-tab-btn" ).one( "click", function() {
|
||||||
|
loadHistoryTable();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||||
|
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||||
|
});
|
||||||
|
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
function loadMediaInfoTable() {
|
function loadMediaInfoTable() {
|
||||||
// Build media info table
|
// Build media info table
|
||||||
media_info_table_options.ajax = {
|
media_info_table_options.ajax = {
|
||||||
@@ -383,17 +426,14 @@ DOCUMENTATION :: END
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
media_info_table = $('#media_info_table').DataTable(media_info_table_options);
|
media_info_table = $('#media_info_table-SID-${data["section_id"]}').DataTable(media_info_table_options);
|
||||||
|
|
||||||
var colvis = new $.fn.dataTable.ColVis(media_info_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark' });
|
var colvis = new $.fn.dataTable.ColVis(media_info_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark' });
|
||||||
$(colvis.button()).appendTo('#button-bar-media-info');
|
$(colvis.button()).appendTo('#button-bar-media-info');
|
||||||
|
|
||||||
clearSearchButton('media_info_table', media_info_table);
|
clearSearchButton('media_info_table-SID-${data["section_id"]}', media_info_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
$( "#history-tab-btn" ).one( "click", function() {
|
|
||||||
loadHistoryTable();
|
|
||||||
});
|
|
||||||
$( "#media-info-tab-btn" ).one( "click", function() {
|
$( "#media-info-tab-btn" ).one( "click", function() {
|
||||||
loadMediaInfoTable();
|
loadMediaInfoTable();
|
||||||
});
|
});
|
||||||
@@ -426,8 +466,8 @@ DOCUMENTATION :: END
|
|||||||
if ($(this).hasClass('active')) {
|
if ($(this).hasClass('active')) {
|
||||||
if (history_to_delete.length > 0) {
|
if (history_to_delete.length > 0) {
|
||||||
$('#deleteCount').text(history_to_delete.length);
|
$('#deleteCount').text(history_to_delete.length);
|
||||||
$('#confirm-modal').modal();
|
$('#confirm-modal-delete').modal();
|
||||||
$('#confirm-modal').one('click', '#confirm-delete', function () {
|
$('#confirm-modal-delete').one('click', '#confirm-delete', function () {
|
||||||
for (var i = 0; i < history_to_delete.length; i++) {
|
for (var i = 0; i < history_to_delete.length; i++) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'delete_history_rows',
|
url: 'delete_history_rows',
|
||||||
@@ -456,63 +496,119 @@ DOCUMENTATION :: END
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
% endif
|
||||||
|
|
||||||
function recentlyWatched() {
|
function recentlyWatched() {
|
||||||
var widthVal = $("#library-recently-watched").width();
|
|
||||||
var tmp = (widthVal-25) / 175;
|
|
||||||
|
|
||||||
if (tmp > 0) {
|
|
||||||
var containerSize = parseInt(tmp);
|
|
||||||
} else {
|
|
||||||
var containerSize = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Populate recently watched
|
// Populate recently watched
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_library_recently_watched',
|
url: 'library_recently_watched',
|
||||||
async: true,
|
async: true,
|
||||||
data: {
|
data: {
|
||||||
section_id: section_id,
|
section_id: section_id,
|
||||||
limit: containerSize
|
limit: 50
|
||||||
},
|
},
|
||||||
complete: function(xhr, status) {
|
complete: function(xhr, status) {
|
||||||
$("#library-recently-watched").html(xhr.responseText);
|
$("#library-recently-watched").html(xhr.responseText);
|
||||||
|
highlightWatchedScrollerButton();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function recentlyAdded() {
|
function recentlyAdded() {
|
||||||
var widthVal = $("#library-recently-added").width();
|
|
||||||
var tmp = (widthVal-25) / 175;
|
|
||||||
|
|
||||||
if (tmp > 0) {
|
|
||||||
var containerSize = parseInt(tmp);
|
|
||||||
} else {
|
|
||||||
var containerSize = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Populate recently added
|
// Populate recently added
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_library_recently_added',
|
url: 'library_recently_added',
|
||||||
async: true,
|
async: true,
|
||||||
data: {
|
data: {
|
||||||
section_id: section_id,
|
section_id: section_id,
|
||||||
limit: containerSize
|
limit: 50
|
||||||
},
|
},
|
||||||
complete: function(xhr, status) {
|
complete: function(xhr, status) {
|
||||||
$("#library-recently-added").html(xhr.responseText);
|
$("#library-recently-added").html(xhr.responseText);
|
||||||
|
highlightAddedScrollerButton();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
recentlyWatched();
|
recentlyWatched();
|
||||||
recentlyAdded();
|
recentlyAdded();
|
||||||
|
|
||||||
|
function highlightWatchedScrollerButton() {
|
||||||
|
var scroller = $("#recently-watched-row-scroller");
|
||||||
|
var numElems = scroller.find("li").length;
|
||||||
|
scroller.width(numElems * 175);
|
||||||
|
if (scroller.width() > $("#library-recently-watched").width()) {
|
||||||
|
$("#recently-watched-page-right").removeClass("disabled");
|
||||||
|
} else {
|
||||||
|
$("#recently-watched-page-right").addClass("disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightAddedScrollerButton() {
|
||||||
|
var scroller = $("#recently-added-row-scroller");
|
||||||
|
var numElems = scroller.find("li").length;
|
||||||
|
scroller.width(numElems * 175);
|
||||||
|
if (scroller.width() > $("#library-recently-added").width()) {
|
||||||
|
$("#recently-added-page-right").removeClass("disabled");
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-right").addClass("disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
recentlyWatched();
|
highlightWatchedScrollerButton();
|
||||||
recentlyAdded();
|
highlightAddedScrollerButton();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('div.art-face').animate({ opacity: 0.2 }, { duration: 1000 });
|
$('div.art-face').animate({ opacity: 0.2 }, { duration: 1000 });
|
||||||
|
|
||||||
|
var leftTotalWatched = 0;
|
||||||
|
$(".paginate-watched").click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var scroller = $("#recently-watched-row-scroller");
|
||||||
|
var containerWidth = $("#library-recently-watched").width();
|
||||||
|
var scrollAmount = $(this).data("id") * parseInt(containerWidth / 175) * 175;
|
||||||
|
var leftMax = Math.min(-parseInt(scroller.width()) + Math.abs(scrollAmount), 0);
|
||||||
|
|
||||||
|
leftTotalWatched = Math.max(Math.min(leftTotalWatched + scrollAmount, 0), leftMax);
|
||||||
|
scroller.animate({ left: leftTotalWatched }, 250);
|
||||||
|
|
||||||
|
if (leftTotalWatched == 0) {
|
||||||
|
$("#recently-watched-page-left").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-watched-page-left").removeClass("disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (leftTotalWatched == leftMax) {
|
||||||
|
$("#recently-watched-page-right").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-watched-page-right").removeClass("disabled");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var leftTotalAdded = 0;
|
||||||
|
$(".paginate-added").click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var scroller = $("#recently-added-row-scroller");
|
||||||
|
var containerWidth = $("#library-recently-added").width();
|
||||||
|
var scrollAmount = $(this).data("id") * parseInt(containerWidth / 175) * 175;
|
||||||
|
var leftMax = Math.min(-parseInt(scroller.width()) + Math.abs(scrollAmount), 0);
|
||||||
|
|
||||||
|
leftTotalAdded = Math.max(Math.min(leftTotalAdded + scrollAmount, 0), leftMax);
|
||||||
|
scroller.animate({ left: leftTotalAdded }, 250);
|
||||||
|
|
||||||
|
if (leftTotalAdded == 0) {
|
||||||
|
$("#recently-added-page-left").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-left").removeClass("disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (leftTotalAdded == leftMax) {
|
||||||
|
$("#recently-added-page-right").addClass("disabled").blur();
|
||||||
|
} else {
|
||||||
|
$("#recently-added-page-right").removeClass("disabled");
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
% endif
|
% endif
|
||||||
|
|||||||
@@ -32,11 +32,16 @@ DOCUMENTATION :: END
|
|||||||
|
|
||||||
% if data:
|
% if data:
|
||||||
<div class="dashboard-recent-media-row">
|
<div class="dashboard-recent-media-row">
|
||||||
|
<div id="recently-added-row-scroller" style="left: 0;">
|
||||||
<ul class="dashboard-recent-media list-unstyled">
|
<ul class="dashboard-recent-media list-unstyled">
|
||||||
% for item in data:
|
% for item in data:
|
||||||
<li>
|
<li>
|
||||||
% if item['media_type'] == 'episode' or item['media_type'] == 'movie':
|
% if item['media_type'] == 'episode' or item['media_type'] == 'movie':
|
||||||
<a href="info?rating_key=${item['rating_key']}">
|
% if item['media_type'] == 'movie':
|
||||||
|
<a href="info?rating_key=${item['rating_key']}" title="${item['title']}">
|
||||||
|
% elif item['media_type'] == 'episode':
|
||||||
|
<a href="info?rating_key=${item['rating_key']}" title="${item['grandparent_title']}">
|
||||||
|
% endif
|
||||||
<div class="dashboard-recent-media-poster">
|
<div class="dashboard-recent-media-poster">
|
||||||
% if item['media_type'] == 'episode':
|
% if item['media_type'] == 'episode':
|
||||||
% if item['parent_thumb']:
|
% if item['parent_thumb']:
|
||||||
@@ -55,20 +60,32 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
% if _session['user_group'] == 'admin':
|
||||||
<div class="dashboard-recent-media-metacontainer">
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% if item['media_type'] == 'episode':
|
|
||||||
<h3 title="${item['grandparent_title']}">${item['grandparent_title']}</h3>
|
|
||||||
<h3 title="${item['title']}">${item['title']}</h3>
|
|
||||||
<h3 class="text-muted">S${item['parent_media_index']} · E${item['media_index']}</h3>
|
|
||||||
% elif item['media_type'] == 'movie':
|
|
||||||
<h3 title="${item['title']}">${item['title']}</h3>
|
|
||||||
<h3 class="text-muted">${item['year']}</h3>
|
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="dashboard-recent-media-metacontainer">
|
||||||
|
% if item['media_type'] == 'episode':
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${item['grandparent_rating_key']}" title="${item['grandparent_title']}">${item['grandparent_title']}</a>
|
||||||
|
</h3>
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${item['rating_key']}" title="${item['title']}">${item['title']}</a>
|
||||||
|
</h3>
|
||||||
|
<h3 class="text-muted">
|
||||||
|
<a href="info?rating_key=${item['parent_rating_key']}" title="Season ${item['parent_media_index']}">S${item['parent_media_index']}</a>
|
||||||
|
· <a href="info?rating_key=${item['rating_key']}" title="Episode ${item['media_index']}">E${item['media_index']}</a>
|
||||||
|
</h3>
|
||||||
|
% elif item['media_type'] == 'movie':
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${item['rating_key']}" title="${item['title']}">${item['title']}</a>
|
||||||
|
</h3>
|
||||||
|
<h3 class="text-muted">${item['year']}</h3>
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
% elif item['media_type'] == 'album':
|
% elif item['media_type'] == 'album':
|
||||||
<a href="info?rating_key=${item['rating_key']}">
|
<a href="info?rating_key=${item['rating_key']}" title="${item['title']}">
|
||||||
<div class="dashboard-recent-media-cover">
|
<div class="dashboard-recent-media-cover">
|
||||||
<div class="dashboard-recent-media-cover-face" style="background-image: url(pms_image_proxy?img=${item['thumb']}&width=300&height=300&fallback=cover);">
|
<div class="dashboard-recent-media-cover-face" style="background-image: url(pms_image_proxy?img=${item['thumb']}&width=300&height=300&fallback=cover);">
|
||||||
<div class="dashboard-recent-media-overlay">
|
<div class="dashboard-recent-media-overlay">
|
||||||
@@ -81,8 +98,12 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-recent-media-metacontainer">
|
<div class="dashboard-recent-media-metacontainer">
|
||||||
<h3 title="${item['parent_title']}">${item['parent_title']}</h3>
|
<h3>
|
||||||
<h3 class="text-muted">${item['title']}</h3>
|
<a href="info?rating_key=${item['parent_rating_key']}" title="${item['parent_title']}">${item['parent_title']}</a>
|
||||||
|
</h3>
|
||||||
|
<h3 class="text-muted">
|
||||||
|
<a class="text-muted" href="info?rating_key=${item['rating_key']}" title="${item['title']}">${item['title']}</a>
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
% endif
|
% endif
|
||||||
@@ -90,7 +111,8 @@ DOCUMENTATION :: END
|
|||||||
% endfor
|
% endfor
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="text-muted">Unable to retrieve data from database.
|
<div class="text-muted">No stats to show.
|
||||||
</div><br>
|
</div><br>
|
||||||
% endif
|
% endif
|
||||||
@@ -75,13 +75,13 @@ DOCUMENTATION :: END
|
|||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
% if library['thumb']:
|
% if library['thumb'].startswith("http"):
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-library-thumb" style="background-image: url(pms_image_proxy?img=${library['thumb']}&width=300&height=300&fallback=poster);"></div>
|
<div class="home-platforms-library-thumb" style="background-image: url(${library['thumb']});"></div>
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="home-platforms-instance-poster">
|
<div class="home-platforms-instance-poster">
|
||||||
<div class="home-platforms-library-thumb" style="background-image: url(interfaces/default/images/poster.png);"></div>
|
<div class="home-platforms-library-thumb" style="background-image: url(pms_image_proxy?img=${library['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ Variable names: data [array]
|
|||||||
data[array_index] :: Usable parameters
|
data[array_index] :: Usable parameters
|
||||||
|
|
||||||
== Global keys ==
|
== Global keys ==
|
||||||
user Returns the name of the user.
|
friendly_name Returns the friendly name of the user.
|
||||||
user_id Returns the user id of the user.
|
user_id Returns the user id of the user.
|
||||||
thumb Returns the avatar of the user.
|
user_thumb Returns the avatar of the user.
|
||||||
total_plays Returns the play count for the user.
|
total_plays Returns the play count for the user.
|
||||||
|
|
||||||
DOCUMENTATION :: END
|
DOCUMENTATION :: END
|
||||||
@@ -23,12 +23,19 @@ DOCUMENTATION :: END
|
|||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<div class="user-player-instance">
|
<div class="user-player-instance">
|
||||||
<li>
|
<li>
|
||||||
<a href="user?user_id=${a['user_id']}" title="${a['user']}">
|
% if a['user_id']:
|
||||||
<div class="library-user-instance-box" style="background-image: url(${a['thumb']});"></div>
|
<a href="user?user_id=${a['user_id']}" title="${a['friendly_name']}">
|
||||||
|
<div class="library-user-instance-box" style="background-image: url(${a['user_thumb']});"></div>
|
||||||
</a>
|
</a>
|
||||||
<div class=" user-player-instance-name">
|
<div class=" user-player-instance-name">
|
||||||
<a href="user?user_id=${a['user_id']}" title="${a['user']}">${a['user']}</a>
|
<a href="user?user_id=${a['user_id']}" title="${a['friendly_name']}">${a['friendly_name']}</a>
|
||||||
</div>
|
</div>
|
||||||
|
% else:
|
||||||
|
<div class="library-user-instance-box" style="background-image: url(${a['user_thumb']});"></div>
|
||||||
|
<div class=" user-player-instance-name">
|
||||||
|
${a['friendly_name']}
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
<div class="user-player-instance-playcount">
|
<div class="user-player-instance-playcount">
|
||||||
<h3>${a['total_plays']}</h3>
|
<h3>${a['total_plays']}</h3>
|
||||||
<p> plays</p>
|
<p> plays</p>
|
||||||
|
|||||||
63
data/interfaces/default/login.html
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>PlexPy - ${title}</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
<link href="${http_root}css/bootstrap3/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="${http_root}css/plexpy.css" rel="stylesheet">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,800" rel="stylesheet" type="text/css">
|
||||||
|
<link href="${http_root}css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
<link rel="icon" type="image/x-icon" href="${http_root}images/favicon.ico"/>
|
||||||
|
<link rel="shortcut icon" href="${http_root}images/favicon.ico">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="body-container">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="login-container">
|
||||||
|
<div class="login-logo">
|
||||||
|
<img alt="PlexPy" src="${http_root}images/logo-plexpy@2x.png">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 col-sm-offset-3">
|
||||||
|
<form action="${http_root}auth/login" method="post">
|
||||||
|
% if msg:
|
||||||
|
<div class="alert alert-danger" style="text-align: center; padding: 8px;">
|
||||||
|
${msg}
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="username" class="control-label">
|
||||||
|
Username
|
||||||
|
</label>
|
||||||
|
<input type="text" id="username" name="username" class="form-control" autocorrect="off" autocapitalize="off" value="${username}" autofocus>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password" class="control-label">
|
||||||
|
Password
|
||||||
|
</label>
|
||||||
|
<input type="password" id="password" name="password" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="form-footer">
|
||||||
|
<div class="remember-group">
|
||||||
|
<label class="control-label">
|
||||||
|
<input type="checkbox" id="remember_me" name="remember_me" title="for 30 days" value="1" checked="checked" /> Remember me
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-bright login-button"><i class="fa fa-sign-in"></i> Sign In</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -4,8 +4,8 @@ from plexpy import helpers
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/dataTables.bootstrap.css">
|
<link rel="stylesheet" href="${http_root}css/dataTables.bootstrap.css">
|
||||||
<link rel="stylesheet" href="interfaces/default/css/plexpy-dataTables.css">
|
<link rel="stylesheet" href="${http_root}css/plexpy-dataTables.css">
|
||||||
<style>
|
<style>
|
||||||
td {word-break: break-all;}
|
td {word-break: break-all;}
|
||||||
</style>
|
</style>
|
||||||
@@ -21,7 +21,36 @@ from plexpy import helpers
|
|||||||
<span><i class="fa fa-list-alt"></i> Logs</span>
|
<span><i class="fa fa-list-alt"></i> Logs</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<button class="btn btn-dark" id="clear-logs"><i class="fa fa-trash-o"></i> Clear log</button>
|
<div class="btn-group" id="plexpy-log-levels">
|
||||||
|
<label>
|
||||||
|
<select name="plexpy-log-level-filter" id="plexpy-log-level-filter" class="btn" style="color: inherit;">
|
||||||
|
<option value="">All log levels</option>
|
||||||
|
<option disabled>────────────</option>
|
||||||
|
<option value="DEBUG">Debug</option>
|
||||||
|
<option value="INFO">Info</option>
|
||||||
|
<option value="WARN">Warning</option>
|
||||||
|
<option value="ERROR">Error</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="btn-group" id="plex-log-levels" style="display: none;">
|
||||||
|
<label>
|
||||||
|
<select name="plex-log-level-filter" id="plex-log-level-filter" class="btn" style="color: inherit;">
|
||||||
|
<option value="">All log levels</option>
|
||||||
|
<option disabled>────────────</option>
|
||||||
|
<option value="DEBUG">Debug</option>
|
||||||
|
<option value="INFO">Info</option>
|
||||||
|
<option value="WARN">Warning</option>
|
||||||
|
<option value="ERROR">Error</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-dark" id="download-plexpylog"><i class="fa fa-download"></i> Download logs</button>
|
||||||
|
<button class="btn btn-dark" id="download-plexserverlog" style="display: none;"><i class="fa fa-download"></i> Download logs</button>
|
||||||
|
<button class="btn btn-dark" id="download-plexscannerlog" style="display: none;"><i class="fa fa-download"></i> Download logs</button>
|
||||||
|
<button class="btn btn-dark" id="clear-logs"><i class="fa fa-trash-o"></i> Clear logs</button>
|
||||||
|
<button class="btn btn-dark" id="clear-notify-logs" style="display: none;"><i class="fa fa-trash-o"></i> Clear logs</button>
|
||||||
|
<button class="btn btn-dark" id="clear-login-logs" style="display: none;"><i class="fa fa-trash-o"></i> Clear logs</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class='table-card-back'>
|
||||||
@@ -29,41 +58,88 @@ from plexpy import helpers
|
|||||||
<ul class="nav nav-pills" role="tablist">
|
<ul class="nav nav-pills" role="tablist">
|
||||||
<li role="presentation" class="active"><a id="plexpy-logs-btn" href="#tabs-1" aria-controls="tabs-1" role="tab" data-toggle="tab">PlexPy Logs</a></li>
|
<li role="presentation" class="active"><a id="plexpy-logs-btn" href="#tabs-1" aria-controls="tabs-1" role="tab" data-toggle="tab">PlexPy Logs</a></li>
|
||||||
<li role="presentation"><a id="plex-logs-btn" href="#tabs-2" aria-controls="tabs-2" role="tab" data-toggle="tab">Plex Media Server Logs</a></li>
|
<li role="presentation"><a id="plex-logs-btn" href="#tabs-2" aria-controls="tabs-2" role="tab" data-toggle="tab">Plex Media Server Logs</a></li>
|
||||||
|
<li role="presentation"><a id="plex-scanner-logs-btn" href="#tabs-3" aria-controls="tabs-3" role="tab" data-toggle="tab">Plex Media Scanner Logs</a></li>
|
||||||
|
<li role="presentation"><a id="notification-logs-btn" href="#tabs-4" aria-controls="tabs-4" role="tab" data-toggle="tab">Notification Logs</a></li>
|
||||||
|
<li role="presentation"><a id="login-logs-btn" href="#tabs-5" aria-controls="tabs-5" role="tab" data-toggle="tab">Login Logs</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div role="tabpanel" class="tab-pane active" id="tabs-1">
|
<div role="tabpanel" class="tab-pane active" id="tabs-1">
|
||||||
<table class="display" id="log_table" width="100%">
|
<table class="display" id="log_table" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="min-tablet" align='left' id="timestamp">Timestamp</th>
|
<th class="min-tablet" align="left" id="timestamp">Timestamp</th>
|
||||||
<th class="desktop" align='left' id="level">Level</th>
|
<th class="desktop" align="left" id="level">Level</th>
|
||||||
<th class="all" align='left' id="message">Message</th>
|
<th class="all" align="left" id="message">Message</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody></tbody>
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div role="tabpanel" class="tab-pane" id="tabs-2">
|
<div role="tabpanel" class="tab-pane" id="tabs-2">
|
||||||
<table class="display" id="plex_log_table" width="100%">
|
<table class="display" id="plex_log_table" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align='left' id="plex_timestamp">Timestamp</th>
|
<th align="left" id="plex_timestamp">Timestamp</th>
|
||||||
<th align='left' id="plex_level">Level</th>
|
<th align="left" id="plex_level">Level</th>
|
||||||
<th align='left' id="plex_message">Message</th>
|
<th align="left" id="plex_message">Message</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody></tbody>
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div role="tabpanel" class="tab-pane" id="tabs-3">
|
||||||
|
<table class="display" id="plex_scanner_log_table" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align="left" id="plex_scanner_timestamp">Timestamp</th>
|
||||||
|
<th align="left" id="plex_scanner_level">Level</th>
|
||||||
|
<th align="left" id="plex_scanner_message">Message</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div role="tabpanel" class="tab-pane" id="tabs-4">
|
||||||
|
<table class="display" id="notification_log_table" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align="left" id="notification_timestamp">Timestamp</th>
|
||||||
|
<th align="left" id="notification_agent_name">Agent</th>
|
||||||
|
<th align="left" id="notification_action">Action</th>
|
||||||
|
<th align="left" id="notification_poster_url">Subject Text</th>
|
||||||
|
<th align="left" id="notification_poster_url">Body Text</th>
|
||||||
|
<th align="left" id="notification_poster_url">Script Args</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div role="tabpanel" class="tab-pane" id="tabs-5">
|
||||||
|
<table class="display login_log_table" id="login_log_table" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align="left" id="timestamp">Timestamp</th>
|
||||||
|
<th align="left" id="friendly_name">User</th>
|
||||||
|
<th align="left" id="user_group">User Group</th>
|
||||||
|
<th align="left" id="ip_address">IP Address</th>
|
||||||
|
<th align="left" id="host">Host</th>
|
||||||
|
<th align="left" id="os">Operating System</th>
|
||||||
|
<th align="left" id="browser">Browser</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div align="center">Refresh rate:
|
<div align="center">
|
||||||
|
Refresh rate:
|
||||||
<select id="refreshrate" onchange="setRefresh()">
|
<select id="refreshrate" onchange="setRefresh()">
|
||||||
<option value="0" selected="selected">No Refresh</option>
|
<option value="0" selected="selected">No Refresh</option>
|
||||||
<option value="5">5 Seconds</option>
|
<option value="5">5 Seconds</option>
|
||||||
@@ -77,49 +153,251 @@ from plexpy import helpers
|
|||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
<script src="${http_root}js/jquery.dataTables.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.min.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.min.js"></script>
|
||||||
<script src="interfaces/default/js/dataTables.bootstrap.pagination.js"></script>
|
<script src="${http_root}js/dataTables.bootstrap.pagination.js"></script>
|
||||||
<script src="interfaces/default/js/tables/logs.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
<script src="interfaces/default/js/tables/plex_logs.js"></script>
|
<script src="${http_root}js/tables/logs.js"></script>
|
||||||
|
<script src="${http_root}js/tables/plex_logs.js"></script>
|
||||||
|
<script src="${http_root}js/tables/notification_logs.js"></script>
|
||||||
|
<script src="${http_root}js/tables/login_logs.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
LoadPlexPyLogs();
|
loadPlexPyLogs(selected_log_level);
|
||||||
clearSearchButton('log_table', log_table);
|
clearSearchButton('log_table', log_table);
|
||||||
});
|
});
|
||||||
|
|
||||||
function LoadPlexPyLogs() {
|
var log_levels = ['DEBUG', 'INFO', 'WARN', 'ERROR'];
|
||||||
log_table_options.ajax = {
|
|
||||||
"url": "getLog"
|
function bindLogLevelFilter() {
|
||||||
|
clearLogLevelFilter();
|
||||||
|
var log_level_column = this.api().column(1);
|
||||||
|
var select = $('#plex-log-level-filter');
|
||||||
|
select.on('change', function () {
|
||||||
|
var val = $.fn.dataTable.util.escapeRegex(
|
||||||
|
$(this).val()
|
||||||
|
);
|
||||||
|
var search_string = '';
|
||||||
|
var levelIndex = log_levels.indexOf(val);
|
||||||
|
if (levelIndex >= 0) {
|
||||||
|
search_string = '^' + log_levels
|
||||||
|
.slice(levelIndex)
|
||||||
|
.join('|') + '$';
|
||||||
}
|
}
|
||||||
log_table = $('#log_table').DataTable(log_table_options);
|
log_level_column
|
||||||
|
.search(search_string, true, false)
|
||||||
|
.draw();
|
||||||
|
}).change();
|
||||||
}
|
}
|
||||||
|
|
||||||
function LoadPlexLogs() {
|
function clearLogLevelFilter() {
|
||||||
plex_log_table_options.ajax = {
|
$('#plex-log-level-filter').off('change');
|
||||||
"url": "get_plex_log"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selected_log_level = null;
|
||||||
|
function loadPlexPyLogs(selected_log_level) {
|
||||||
|
log_table_options.ajax = {
|
||||||
|
url: "getLog",
|
||||||
|
type: 'post',
|
||||||
|
data: function (d) {
|
||||||
|
return {
|
||||||
|
json_data: JSON.stringify(d),
|
||||||
|
log_level: selected_log_level
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log_table = $('#log_table').DataTable(log_table_options);
|
||||||
|
|
||||||
|
$('#plexpy-log-level-filter').on('change', function () {
|
||||||
|
selected_log_level = $(this).val() || null;
|
||||||
|
log_table.draw();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadPlexLogs() {
|
||||||
|
plex_log_table_options.ajax = {
|
||||||
|
url: "get_plex_log?log_type=server"
|
||||||
|
}
|
||||||
|
plex_log_table_options.initComplete = bindLogLevelFilter;
|
||||||
plex_log_table = $('#plex_log_table').DataTable(plex_log_table_options);
|
plex_log_table = $('#plex_log_table').DataTable(plex_log_table_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadPlexScannerLogs() {
|
||||||
|
plex_log_table_options.ajax = {
|
||||||
|
url: "get_plex_log?log_type=scanner"
|
||||||
|
}
|
||||||
|
plex_log_table_options.initComplete = bindLogLevelFilter;
|
||||||
|
plex_scanner_log_table = $('#plex_scanner_log_table').DataTable(plex_log_table_options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadNotificationLogs() {
|
||||||
|
notification_log_table_options.ajax = {
|
||||||
|
url: "get_notification_log",
|
||||||
|
data: function (d) {
|
||||||
|
return {
|
||||||
|
json_data: JSON.stringify(d)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
notification_log_table = $('#notification_log_table').DataTable(notification_log_table_options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadLoginLogs() {
|
||||||
|
login_log_table_options.pageLength = 50;
|
||||||
|
login_log_table_options.ajax = {
|
||||||
|
url: "get_user_logins",
|
||||||
|
data: function (d) {
|
||||||
|
return {
|
||||||
|
json_data: JSON.stringify(d)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
login_log_table = $('#login_log_table').DataTable(login_log_table_options);
|
||||||
|
}
|
||||||
|
|
||||||
$("#plexpy-logs-btn").click(function () {
|
$("#plexpy-logs-btn").click(function () {
|
||||||
|
$("#plexpy-log-levels").show();
|
||||||
|
$("#plex-log-levels").hide();
|
||||||
$("#clear-logs").show();
|
$("#clear-logs").show();
|
||||||
LoadPlexPyLogs();
|
$("#download-plexpylog").show()
|
||||||
|
$("#download-plexserverlog").hide()
|
||||||
|
$("#download-plexscannerlog").hide()
|
||||||
|
$("#clear-notify-logs").hide();
|
||||||
|
$("#clear-login-logs").hide();
|
||||||
|
loadPlexPyLogs(selected_log_level);
|
||||||
clearSearchButton('log_table', log_table);
|
clearSearchButton('log_table', log_table);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#plex-logs-btn").click(function () {
|
$("#plex-logs-btn").click(function () {
|
||||||
|
$("#plexpy-log-levels").hide();
|
||||||
|
$("#plex-log-levels").show();
|
||||||
$("#clear-logs").hide();
|
$("#clear-logs").hide();
|
||||||
LoadPlexLogs();
|
$("#download-plexpylog").hide()
|
||||||
|
$("#download-plexserverlog").show()
|
||||||
|
$("#download-plexscannerlog").hide()
|
||||||
|
$("#clear-notify-logs").hide();
|
||||||
|
$("#clear-login-logs").hide();
|
||||||
|
loadPlexLogs();
|
||||||
clearSearchButton('plex_log_table', plex_log_table);
|
clearSearchButton('plex_log_table', plex_log_table);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#plex-scanner-logs-btn").click(function () {
|
||||||
|
$("#plexpy-log-levels").hide();
|
||||||
|
$("#plex-log-levels").show();
|
||||||
|
$("#clear-logs").hide();
|
||||||
|
$("#download-plexpylog").hide()
|
||||||
|
$("#download-plexserverlog").hide()
|
||||||
|
$("#download-plexscannerlog").show()
|
||||||
|
$("#clear-notify-logs").hide();
|
||||||
|
$("#clear-login-logs").hide();
|
||||||
|
loadPlexScannerLogs();
|
||||||
|
clearSearchButton('plex_scanner_log_table', plex_scanner_log_table);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#notification-logs-btn").click(function () {
|
||||||
|
$("#plexpy-log-levels").hide();
|
||||||
|
$("#plex-log-levels").hide();
|
||||||
|
$("#clear-logs").hide();
|
||||||
|
$("#download-plexpylog").hide()
|
||||||
|
$("#download-plexserverlog").hide()
|
||||||
|
$("#download-plexscannerlog").hide()
|
||||||
|
$("#clear-notify-logs").show();
|
||||||
|
$("#clear-login-logs").hide();
|
||||||
|
loadNotificationLogs();
|
||||||
|
clearSearchButton('notification_log_table', notification_log_table);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#login-logs-btn").click(function () {
|
||||||
|
$("#plexpy-log-levels").hide();
|
||||||
|
$("#plex-log-levels").hide();
|
||||||
|
$("#clear-logs").hide();
|
||||||
|
$("#download-plexpylog").hide()
|
||||||
|
$("#download-plexserverlog").hide()
|
||||||
|
$("#download-plexscannerlog").hide()
|
||||||
|
$("#clear-notify-logs").hide();
|
||||||
|
$("#clear-login-logs").show();
|
||||||
|
loadLoginLogs();
|
||||||
|
clearSearchButton('login_log_table', notification_log_table);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||||
|
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||||
|
});
|
||||||
|
|
||||||
$("#clear-logs").click(function () {
|
$("#clear-logs").click(function () {
|
||||||
var r = confirm("Are you sure you want to clear the PlexPy log?");
|
$("#confirm-message").text("Are you sure you want to clear the PlexPy logs?");
|
||||||
if (r == true) {
|
$('#confirm-modal').modal();
|
||||||
window.location.href = "clearLogs";
|
$('#confirm-modal').one('click', '#confirm-button', function () {
|
||||||
|
$.ajax({
|
||||||
|
url: 'delete_logs',
|
||||||
|
type: 'POST',
|
||||||
|
complete: function (xhr, status) {
|
||||||
|
result = $.parseJSON(xhr.responseText);
|
||||||
|
msg = result.message;
|
||||||
|
if (result.result == 'success') {
|
||||||
|
showMsg('<i class="fa fa-check"></i> ' + msg, false, true, 5000)
|
||||||
|
} else {
|
||||||
|
showMsg('<i class="fa fa-times"></i> ' + msg, false, true, 5000, true)
|
||||||
}
|
}
|
||||||
|
log_table.draw();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#download-plexpylog").click(function () {
|
||||||
|
window.location.href = "download_log";
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#download-plexserverlog").click(function () {
|
||||||
|
window.location.href = "download_plex_log?log_type=server";
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#download-plexscannerlog").click(function () {
|
||||||
|
window.location.href = "download_plex_log?log_type=scanner";
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#clear-notify-logs").click(function () {
|
||||||
|
$("#confirm-message").text("Are you sure you want to clear the PlexPy notification logs?");
|
||||||
|
$('#confirm-modal').modal();
|
||||||
|
$('#confirm-modal').one('click', '#confirm-button', function () {
|
||||||
|
$.ajax({
|
||||||
|
url: 'delete_notification_log',
|
||||||
|
type: 'POST',
|
||||||
|
complete: function (xhr, status) {
|
||||||
|
result = $.parseJSON(xhr.responseText);
|
||||||
|
msg = result.message;
|
||||||
|
if (result.result == 'success') {
|
||||||
|
showMsg('<i class="fa fa-check"></i> ' + msg, false, true, 5000)
|
||||||
|
} else {
|
||||||
|
showMsg('<i class="fa fa-times"></i> ' + msg, false, true, 5000, true)
|
||||||
|
}
|
||||||
|
notification_log_table.draw();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#clear-login-logs").click(function () {
|
||||||
|
$("#confirm-message").text("Are you sure you want to clear the PlexPy login logs?");
|
||||||
|
$('#confirm-modal').modal();
|
||||||
|
$('#confirm-modal').one('click', '#confirm-button', function () {
|
||||||
|
$.ajax({
|
||||||
|
url: 'delete_login_log',
|
||||||
|
type: 'POST',
|
||||||
|
complete: function (xhr, status) {
|
||||||
|
result = $.parseJSON(xhr.responseText);
|
||||||
|
msg = result.message;
|
||||||
|
if (result.result == 'success') {
|
||||||
|
showMsg('<i class="fa fa-check"></i> ' + msg, false, true, 5000)
|
||||||
|
} else {
|
||||||
|
showMsg('<i class="fa fa-times"></i> ' + msg, false, true, 5000, true)
|
||||||
|
}
|
||||||
|
login_log_table.draw();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var timer;
|
var timer;
|
||||||
@@ -137,8 +415,14 @@ from plexpy import helpers
|
|||||||
timer = setInterval(function() {
|
timer = setInterval(function() {
|
||||||
if ($("#tabs-1").hasClass("active")) {
|
if ($("#tabs-1").hasClass("active")) {
|
||||||
log_table.ajax.reload();
|
log_table.ajax.reload();
|
||||||
} else {
|
} else if ($("#tabs-2").hasClass("active")) {
|
||||||
plex_log_table.ajax.reload();
|
plex_log_table.ajax.reload();
|
||||||
|
} else if ($("#tabs-3").hasClass("active")) {
|
||||||
|
plex_scanner_log_table.ajax.reload();
|
||||||
|
} else if ($("#tabs-4").hasClass("active")) {
|
||||||
|
notification_log_table.ajax.reload();
|
||||||
|
} else if ($("#tabs-5").hasClass("active")) {
|
||||||
|
login_log_table.ajax.reload();
|
||||||
}
|
}
|
||||||
}, 1000*refreshrate.value);
|
}, 1000*refreshrate.value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ from plexpy import helpers
|
|||||||
</form>
|
</form>
|
||||||
<div class="col-md-12" style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #444;">
|
<div class="col-md-12" style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #444;">
|
||||||
<h4>Test ${agent['name']}</h4>
|
<h4>Test ${agent['name']}</h4>
|
||||||
<p class="help-block">Test if ${agent['name']} notifications are working. See <a href="/logs">logs</a> for troubleshooting.</p>
|
<p class="help-block">Test if ${agent['name']} notifications are working. See <a href="logs">logs</a> for troubleshooting.</p>
|
||||||
% if agent['name'] == 'Scripts':
|
% if agent['name'] == 'Scripts':
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="test_script">Script</label>
|
<label for="test_script">Script</label>
|
||||||
@@ -132,7 +132,7 @@ from plexpy import helpers
|
|||||||
function reloadModal() {
|
function reloadModal() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_notification_agent_config',
|
url: 'get_notification_agent_config',
|
||||||
data: { config_id: '${agent["id"]}' },
|
data: { agent_id: '${agent["id"]}' },
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
complete: function (xhr, status) {
|
complete: function (xhr, status) {
|
||||||
@@ -147,30 +147,11 @@ from plexpy import helpers
|
|||||||
})
|
})
|
||||||
|
|
||||||
$('#save-notification-item').click(function () {
|
$('#save-notification-item').click(function () {
|
||||||
doAjaxCall('set_notification_config', $(this), 'tabs', true);
|
|
||||||
// Reload modal to update certain fields
|
// Reload modal to update certain fields
|
||||||
reloadModal();
|
doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
function disableTwitterVerify() {
|
|
||||||
if ($('#twitter_key').val() != '') { $('#twitterStep2').prop('disabled', false); }
|
|
||||||
else { $('#twitterStep2').prop('disabled', true); }
|
|
||||||
}
|
|
||||||
disableTwitterVerify();
|
|
||||||
$('#twitter_key').on('change', function () {
|
|
||||||
disableTwitterVerify()
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#twitterStep1').click(function () {
|
|
||||||
$.get('twitterStep1', function (data) {window.open(data); })
|
|
||||||
.done(function () { showMsg('<i class="fa fa-check"></i> Confirm Authorization. Check pop-up blocker if no response.', false, true, 3000); });
|
|
||||||
});
|
|
||||||
$('#twitterStep2').click(function () {
|
|
||||||
var twitter_key = $('#twitter_key').val();
|
|
||||||
$.get('twitterStep2', { 'key': twitter_key }, function (data) { showMsg('<i class="fa fa-check"></i> ' + data, false, true, 3000); });
|
|
||||||
});
|
|
||||||
|
|
||||||
function disableFacebookRequest() {
|
function disableFacebookRequest() {
|
||||||
if ($('#facebook_app_id').val() != '' && $('#facebook_app_secret').val() != '') { $('#facebookStep1').prop('disabled', false); }
|
if ($('#facebook_app_id').val() != '' && $('#facebook_app_secret').val() != '') { $('#facebookStep1').prop('disabled', false); }
|
||||||
else { $('#facebookStep1').prop('disabled', true); }
|
else { $('#facebookStep1').prop('disabled', true); }
|
||||||
@@ -181,34 +162,64 @@ from plexpy import helpers
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#facebookStep1').click(function () {
|
$('#facebookStep1').click(function () {
|
||||||
|
// Remove trailing '/' from Facebook redirect URI
|
||||||
|
if ($('#facebook_redirect_uri') && $('#facebook_redirect_uri').val().endsWith('/')) {
|
||||||
|
$('#facebook_redirect_uri').val($('#facebook_redirect_uri').val().slice(0, -1));
|
||||||
|
}
|
||||||
doAjaxCall('set_notification_config', $(this), 'tabs', true);
|
doAjaxCall('set_notification_config', $(this), 'tabs', true);
|
||||||
$.get('facebookStep1', function (data) { window.open(data); })
|
$.get('facebookStep1', function (data) { window.open(data); })
|
||||||
.done(function () { showMsg('<i class="fa fa-check"></i> Confirm Authorization. Check pop-up blocker if no response.', false, true, 3000); });
|
.done(function () { showMsg('<i class="fa fa-check"></i> Confirm Authorization. Check pop-up blocker if no response.', false, true, 3000); });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#allow_browser').click(function () {
|
||||||
|
PNotify.desktop.permission();
|
||||||
|
})
|
||||||
|
|
||||||
$('#test_notifier').click(function () {
|
$('#test_notifier').click(function () {
|
||||||
doAjaxCall('set_notification_config', $(this), 'tabs', true);
|
doAjaxCall('set_notification_config', $(this), 'tabs', true, sendTestNotification);
|
||||||
|
});
|
||||||
|
|
||||||
|
function sendTestNotification() {
|
||||||
|
if ('${agent["id"]}' != '17') {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'test_notifier',
|
url: 'send_notification',
|
||||||
data: {
|
data: {
|
||||||
config_id: '${agent["id"]}',
|
agent_id: '${agent["id"]}',
|
||||||
subject: $('#test_subject').val(),
|
subject: $('#test_subject').val(),
|
||||||
body: $('#test_body').val(),
|
body: $('#test_body').val(),
|
||||||
script: $('#test_script').val(),
|
script: $('#test_script').val(),
|
||||||
script_args: $('#test_script_args').val()
|
script_args: $('#test_script_args').val(),
|
||||||
|
notify_action: 'test'
|
||||||
},
|
},
|
||||||
cache: false,
|
cache: false,
|
||||||
async: true,
|
async: true,
|
||||||
complete: function (xhr, status) {
|
complete: function (xhr, status) {
|
||||||
|
if (xhr.responseText.indexOf('sent') > -1) {
|
||||||
msg = '<i class="fa fa-check"></i> ' + xhr.responseText;
|
msg = '<i class="fa fa-check"></i> ' + xhr.responseText;
|
||||||
showMsg(msg, false, true, 2000);
|
showMsg(msg, false, true, 2000);
|
||||||
|
} else {
|
||||||
|
msg = '<i class="fa fa-times"></i> ' + xhr.responseText;
|
||||||
|
showMsg(msg, false, true, 2000, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
if ($('#browser_auto_hide_delay').val() == "0") {
|
||||||
|
PNotify.prototype.options.hide = false;
|
||||||
|
} else {
|
||||||
|
PNotify.prototype.options.hide = true;
|
||||||
|
PNotify.prototype.options.delay = $('#browser_auto_hide_delay').val() * 1000;
|
||||||
|
}
|
||||||
|
var notification = new PNotify({
|
||||||
|
title: $('#test_subject').val(),
|
||||||
|
text: $('#test_body').val()
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('#pushbullet_apikey, #pushover_apitoken, #scripts_folder').on('change', function () {
|
$('#pushbullet_apikey, #pushover_apitoken, #scripts_folder, #join_apikey').on('change', function () {
|
||||||
doAjaxCall('set_notification_config', $(this), 'tabs', true);
|
// Reload modal to update certain fields
|
||||||
reloadModal();
|
doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,20 @@ from plexpy import helpers
|
|||||||
</label>
|
</label>
|
||||||
<p class="help-block">Trigger notification when a media item triggers the defined buffer threshold.</p>
|
<p class="help-block">Trigger notification when a media item triggers the defined buffer threshold.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_concurrent" ${helpers.checked(data['on_concurrent'])} class="toggle-switches">
|
||||||
|
Notify on user concurrent streams
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Trigger notification when a user has concurrent streams.</p>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_newdevice" ${helpers.checked(data['on_newdevice'])} class="toggle-switches">
|
||||||
|
Notify on user new device
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Trigger notification when a user streams from a new device.</p>
|
||||||
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_created" ${helpers.checked(data['on_created'])} class="toggle-switches">
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_created" ${helpers.checked(data['on_created'])} class="toggle-switches">
|
||||||
@@ -64,13 +78,6 @@ from plexpy import helpers
|
|||||||
</label>
|
</label>
|
||||||
<p class="help-block">Trigger notification when a media item is added to the Plex Media Server.</p>
|
<p class="help-block">Trigger notification when a media item is added to the Plex Media Server.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_extdown" ${helpers.checked(data['on_extdown'])} class="toggle-switches">
|
|
||||||
Notify on Plex remote access down
|
|
||||||
</label>
|
|
||||||
<p class="help-block">Trigger notification when the Plex Media Server cannot be reached externally.</p>
|
|
||||||
</div>
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_intdown" ${helpers.checked(data['on_intdown'])} class="toggle-switches">
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_intdown" ${helpers.checked(data['on_intdown'])} class="toggle-switches">
|
||||||
@@ -78,6 +85,20 @@ from plexpy import helpers
|
|||||||
</label>
|
</label>
|
||||||
<p class="help-block">Trigger notification when the Plex Media Server cannot be reached internally.</p>
|
<p class="help-block">Trigger notification when the Plex Media Server cannot be reached internally.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_intup" ${helpers.checked(data['on_intup'])} class="toggle-switches">
|
||||||
|
Notify on Plex server back up
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Trigger notification when the Plex Media Server can be reached internally after being down.</p>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_extdown" ${helpers.checked(data['on_extdown'])} class="toggle-switches">
|
||||||
|
Notify on Plex remote access down
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Trigger notification when the Plex Media Server cannot be reached externally.</p>
|
||||||
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_extup" ${helpers.checked(data['on_extup'])} class="toggle-switches">
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_extup" ${helpers.checked(data['on_extup'])} class="toggle-switches">
|
||||||
@@ -87,10 +108,10 @@ from plexpy import helpers
|
|||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_intup" ${helpers.checked(data['on_intup'])} class="toggle-switches">
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_pmsupdate" ${helpers.checked(data['on_pmsupdate'])} class="toggle-switches">
|
||||||
Notify on Plex server back up
|
Notify on Plex update available
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">Trigger notification when the Plex Media Server can be reached internally after being down.</p>
|
<p class="help-block">Trigger notification when an update for the Plex Media Server is available.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||