Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e1c2fdcfd | ||
|
|
556ef530fd | ||
|
|
4b61d3dc9c | ||
|
|
0332cfb428 | ||
|
|
21dd42cb71 | ||
|
|
a85148790a | ||
|
|
27a00b339b | ||
|
|
96caef8f43 | ||
|
|
4c8b0df8b0 | ||
|
|
ba88642ab8 | ||
|
|
db846c9bc2 | ||
|
|
42f31ce46e | ||
|
|
796fbcce1a | ||
|
|
e15f964f81 | ||
|
|
41234fd502 | ||
|
|
e54cdfdb13 | ||
|
|
556d6be15e | ||
|
|
b19bd263a7 | ||
|
|
163709e1c0 | ||
|
|
e6286c711d | ||
|
|
ac2d7b6289 | ||
|
|
5a3764b418 | ||
|
|
ed28cabb16 | ||
|
|
f522a6cefd | ||
|
|
923d7f5178 | ||
|
|
f8ab617e4c | ||
|
|
022d6e94e3 | ||
|
|
25b414325d | ||
|
|
15aaf04093 | ||
|
|
bd896d1530 | ||
|
|
42ff8adee8 | ||
|
|
07dc78784e | ||
|
|
e3e009fe5b | ||
|
|
893688459c | ||
|
|
0aa6120530 | ||
|
|
85aa7ea71f | ||
|
|
208a75dc16 | ||
|
|
15453d0704 | ||
|
|
c77e89ca0d | ||
|
|
45ce1220dc | ||
|
|
37740bbf41 | ||
|
|
06959db5e5 | ||
|
|
1fa0cf8d32 | ||
|
|
ea50e53718 | ||
|
|
eb6b7ce84a | ||
|
|
d8f4056f46 | ||
|
|
240085834a | ||
|
|
be735c0990 | ||
|
|
58ae76f4c8 | ||
|
|
afa08e9170 | ||
|
|
af3a60590e | ||
|
|
497d118627 | ||
|
|
bad7ed2772 | ||
|
|
74efa5c502 | ||
|
|
f014dae6af | ||
|
|
b692eccd08 | ||
|
|
613a0c00e8 | ||
|
|
2cdf00af50 | ||
|
|
3a68cf07b3 | ||
|
|
484d939cea | ||
|
|
67d224c37e | ||
|
|
0793559831 | ||
|
|
b919a09d33 | ||
|
|
90b51d5a21 | ||
|
|
4e97c6f7a2 | ||
|
|
575e03c0fc | ||
|
|
300c364545 | ||
|
|
fa13145e23 | ||
|
|
dc0281d359 | ||
|
|
bbf916f28c | ||
|
|
0cf255702e | ||
|
|
7c8c4447cb | ||
|
|
1240ce2a02 | ||
|
|
1cc9aa967f | ||
|
|
a4883f5b0e | ||
|
|
f57fc6abbc | ||
|
|
e168399908 | ||
|
|
7462e135fa | ||
|
|
ef339566a5 | ||
|
|
3d6f8c6304 | ||
|
|
5b58e2efa5 | ||
|
|
6650cd2e41 | ||
|
|
f6fbb94ecc | ||
|
|
8730ab3377 | ||
|
|
1b24b06eba | ||
|
|
e3d62397a3 | ||
|
|
105ca78639 | ||
|
|
71ca5a3947 | ||
|
|
d7fc024c04 | ||
|
|
5b89f66758 | ||
|
|
01e2702491 | ||
|
|
ebe7ac1cfc | ||
|
|
0b29589055 | ||
|
|
5fb93afb24 | ||
|
|
6cdf442aa7 | ||
|
|
5626b9e626 | ||
|
|
5b043eb6a4 | ||
|
|
d5748a7950 | ||
|
|
df067be0b9 | ||
|
|
94b146d7bd | ||
|
|
868cf6c64b | ||
|
|
59b6a9e86e | ||
|
|
622c639e44 | ||
|
|
a0c9168791 | ||
|
|
d4c1c05b3c | ||
|
|
711d8161f6 | ||
|
|
b7eaba73b5 | ||
|
|
c269b4938d | ||
|
|
71dced5790 | ||
|
|
c0aea98e03 | ||
|
|
96e1e45696 | ||
|
|
bb922f987e | ||
|
|
fefc66ebe9 | ||
|
|
307d08d898 | ||
|
|
ce2f97e738 | ||
|
|
5a675ad048 | ||
|
|
d866989bc6 | ||
|
|
0f635c6dd0 | ||
|
|
a8b2ae5862 | ||
|
|
d9f8ad9db8 | ||
|
|
877d77f28b | ||
|
|
b26b8bdb98 | ||
|
|
1cac4fc4c0 | ||
|
|
fc0c81e2ca | ||
|
|
5db3bdcef9 | ||
|
|
793183cbea | ||
|
|
a68b530a9d | ||
|
|
0ebb105387 | ||
|
|
e9019418f0 | ||
|
|
3e4e25dee6 | ||
|
|
d3e9c8d692 | ||
|
|
bd1f7adc0c | ||
|
|
099bcdaf8f | ||
|
|
b9582b0dd2 | ||
|
|
f2fe9feb3a | ||
|
|
b99f3a3053 | ||
|
|
3e3677987c | ||
|
|
0cba30a202 | ||
|
|
9c08398d87 | ||
|
|
1a30da6726 | ||
|
|
30326825f0 | ||
|
|
a90baffda6 | ||
|
|
61ce23f7f9 | ||
|
|
0dcc973b2f | ||
|
|
10d07c8974 | ||
|
|
a79abfeab8 | ||
|
|
b6a7b35555 | ||
|
|
0adfee68db | ||
|
|
d0ece51fbb | ||
|
|
5471672ee5 | ||
|
|
470672e367 | ||
|
|
03a0c67209 | ||
|
|
0660180c53 | ||
|
|
499a2ee472 | ||
|
|
8ccedb598b | ||
|
|
c3f1457fce | ||
|
|
5c3dc0c2a5 | ||
|
|
590dfe90c3 | ||
|
|
f22a013079 | ||
|
|
e72975f552 | ||
|
|
77a2e2b2d5 | ||
|
|
8c36e9444a | ||
|
|
04b2b1cafe | ||
|
|
7de089dbbb | ||
|
|
c30965055c | ||
|
|
70cdb945f5 | ||
|
|
433b4e8c44 | ||
|
|
4bfb5b63c9 | ||
|
|
fad8358096 | ||
|
|
d23c17d172 | ||
|
|
426e68693a | ||
|
|
6712f88037 | ||
|
|
c351ecc299 | ||
|
|
b06b89dd86 | ||
|
|
cc48326977 | ||
|
|
2f8b368ae8 | ||
|
|
29b13f6b9c | ||
|
|
c6db4cd545 | ||
|
|
2c00ad098c | ||
|
|
bac0d93ccb | ||
|
|
6678e87cbf | ||
|
|
adbe14fd30 | ||
|
|
9b86aaa1bd | ||
|
|
2969ed2edc | ||
|
|
41d5df60f4 | ||
|
|
cfbaf60989 | ||
|
|
4178927b6f | ||
|
|
291976893a | ||
|
|
cde55ab574 | ||
|
|
77b78d05ac | ||
|
|
1fa32554d8 | ||
|
|
f1e79699a4 | ||
|
|
c628f9237f | ||
|
|
6a83d1ce25 | ||
|
|
081d40cf82 | ||
|
|
b23004c184 | ||
|
|
bc58f48752 | ||
|
|
1ac255a556 | ||
|
|
fb3cbbd924 | ||
|
|
1b29c7e463 | ||
|
|
6003c19b32 | ||
|
|
b54bf240a0 | ||
|
|
505bbda675 | ||
|
|
26bd37af31 | ||
|
|
bf13ccdcd3 | ||
|
|
645fc877e6 | ||
|
|
6ac021ff12 | ||
|
|
5d8e2c16f5 | ||
|
|
83a3ebb583 | ||
|
|
481e23fce0 | ||
|
|
be33ca69f8 | ||
|
|
bd54681d78 | ||
|
|
f0ffd3356d | ||
|
|
8a0b248caf | ||
|
|
bc71ce73cf | ||
|
|
de93966192 | ||
|
|
a4e8221508 | ||
|
|
36c37e97e0 | ||
|
|
03993052a3 | ||
|
|
3ef5c2aa6d | ||
|
|
02d84bada0 | ||
|
|
25332f2728 | ||
|
|
70e64e261e | ||
|
|
4ed88d33b1 | ||
|
|
3414241a71 | ||
|
|
e36a46b1cb | ||
|
|
df09a5227c | ||
|
|
1b1fcebeed | ||
|
|
33d9eb4c6d | ||
|
|
347c0a1275 | ||
|
|
1320c1fa58 | ||
|
|
0ce101f038 | ||
|
|
d56a0a8789 | ||
|
|
8da0e685c8 | ||
|
|
786306e32a | ||
|
|
4e20bf1d1c | ||
|
|
06797a78a7 | ||
|
|
1f3bc6baa6 | ||
|
|
ab0442cb59 | ||
|
|
e02a836063 | ||
|
|
8dfebd055c | ||
|
|
219c7028a7 | ||
|
|
4c21da5373 | ||
|
|
b2585137a5 | ||
|
|
2d585611a5 | ||
|
|
bc2dfc5403 | ||
|
|
071271b7dd | ||
|
|
bd05d5b650 | ||
|
|
f0839ade88 | ||
|
|
0b287be006 | ||
|
|
b0e928fc27 | ||
|
|
5cd2e9712e | ||
|
|
cafde950a4 | ||
|
|
34321ad89f | ||
|
|
3c09e77fba | ||
|
|
8a899c9afe | ||
|
|
865d3c89bb | ||
|
|
a3ce526854 | ||
|
|
f5b33dbbc7 | ||
|
|
83eb58fffa | ||
|
|
5e5d2d5c91 | ||
|
|
af06fc460b | ||
|
|
f874bf564d | ||
|
|
1ab5fcb36f | ||
|
|
e30aff8ca2 | ||
|
|
b2211ac4e0 | ||
|
|
0ad9347122 | ||
|
|
d48f71fc75 | ||
|
|
11adb5ddf0 | ||
|
|
8d3a15b117 | ||
|
|
dd2afb7609 | ||
|
|
08488cae4a | ||
|
|
ef6cb065d5 | ||
|
|
2880a37595 | ||
|
|
44afd72e8c | ||
|
|
6a2804ad79 | ||
|
|
d8af8f143a | ||
|
|
c6540b4fea | ||
|
|
e1897964e8 | ||
|
|
37212c9392 | ||
|
|
a4e8edce73 | ||
|
|
9da82dd205 | ||
|
|
1c15b1fdb2 | ||
|
|
27e02f22cc | ||
|
|
08178dd3aa | ||
|
|
9dc842c6e9 | ||
|
|
b706fd468d | ||
|
|
3d2489b51a | ||
|
|
f7121e25f6 | ||
|
|
307cf5eeae | ||
|
|
a6ae77cebf | ||
|
|
3d1f16bfc2 | ||
|
|
60fdef9d3f | ||
|
|
8d90a00d0e | ||
|
|
0169861c2a | ||
|
|
0f4304dcd4 | ||
|
|
64cb898d13 | ||
|
|
d3ac47356d | ||
|
|
054e58504f | ||
|
|
66ad3cc587 | ||
|
|
386cc074e3 | ||
|
|
0b1f491d16 | ||
|
|
5ce6035192 | ||
|
|
8d322a51db | ||
|
|
46d3c2bb69 | ||
|
|
92e8c5f0ce | ||
|
|
8a458eb96a | ||
|
|
e3e98f9844 | ||
|
|
89a6d6c2ac | ||
|
|
0627466308 | ||
|
|
163fea111b | ||
|
|
b8eb56ac71 | ||
|
|
e07b64339a | ||
|
|
df0c8b3c92 | ||
|
|
d4be69d44f | ||
|
|
cd0b98ee3c | ||
|
|
d1a80241f5 | ||
|
|
4f3d3b0be8 | ||
|
|
6f16d9413c | ||
|
|
2b5f38ca52 | ||
|
|
9dec0ad916 | ||
|
|
0c5118780c | ||
|
|
6e6f58ed94 | ||
|
|
00c31597c2 | ||
|
|
91b16159b7 | ||
|
|
840ab27570 | ||
|
|
0d53277fcc | ||
|
|
0218ac969b | ||
|
|
2f62d2bc14 | ||
|
|
d46d281dcf | ||
|
|
c812e24d8f | ||
|
|
7c120ee253 | ||
|
|
acbbe2c353 | ||
|
|
5b6e15c5fd | ||
|
|
dfdbeac8e4 | ||
|
|
dcf65d47a3 | ||
|
|
75fdc5368e | ||
|
|
af1d8a3041 | ||
|
|
6b0999d09b | ||
|
|
1efad18661 | ||
|
|
4d3fe5aafa | ||
|
|
c50ee44433 | ||
|
|
83c71bec25 | ||
|
|
4c2dabe4cc | ||
|
|
cf631491e8 | ||
|
|
5b026e3c5c | ||
|
|
4d136a022c | ||
|
|
f0a8efb5ad | ||
|
|
fc94177340 | ||
|
|
3b29e17696 | ||
|
|
a64431add8 | ||
|
|
c90820e6e2 | ||
|
|
46f3709f09 | ||
|
|
8e0b908b5e | ||
|
|
a5f8aa6d17 | ||
|
|
1d821480fc | ||
|
|
eaeb97baf0 | ||
|
|
e2cc446c71 | ||
|
|
02b3fe2f25 | ||
|
|
16b1bece2b | ||
|
|
4c41486e1c | ||
|
|
da71280a8d | ||
|
|
6da30c5723 | ||
|
|
aeabb05a9d | ||
|
|
2538dc5071 | ||
|
|
c7219eeb33 | ||
|
|
c493640dae | ||
|
|
0e7edad020 | ||
|
|
b7328a56ae | ||
|
|
b34e17d69a | ||
|
|
0fec301f61 | ||
|
|
82c8441e1d | ||
|
|
e845777735 | ||
|
|
f9b592fec7 | ||
|
|
55de2d3f62 | ||
|
|
ad6cae561a | ||
|
|
6256867fa0 | ||
|
|
7f4205601d | ||
|
|
d50c409315 | ||
|
|
4ee6946828 | ||
|
|
e1df980ece | ||
|
|
be1198b4a1 | ||
|
|
976c0bee6b | ||
|
|
4fc2fc1128 | ||
|
|
d3a455b955 | ||
|
|
0b815f89d6 | ||
|
|
e6cdf1ee7c | ||
|
|
aa12604481 | ||
|
|
872e0f565a | ||
|
|
f21b15f2db | ||
|
|
9aecca4cef | ||
|
|
553f9d46ba | ||
|
|
91079d9d40 | ||
|
|
6f6360d501 | ||
|
|
5a8ca16e34 | ||
|
|
9476c54eaa | ||
|
|
edd5752de2 | ||
|
|
a560ee6f0a | ||
|
|
3c28ceb701 | ||
|
|
527a0895f5 | ||
|
|
731f1e0226 | ||
|
|
6aa6a2e119 | ||
|
|
91fac6972c | ||
|
|
9fd754f3bb | ||
|
|
a922f90046 | ||
|
|
0c206c3835 | ||
|
|
bdf6d38f5d | ||
|
|
cf0a74a9d3 | ||
|
|
2d0c19271b | ||
|
|
3858f54fc5 | ||
|
|
d58b9a211f | ||
|
|
ffde727d68 | ||
|
|
6c3b9aafc1 | ||
|
|
872755e57f | ||
|
|
07c20af53b | ||
|
|
0a4a7863f1 | ||
|
|
a5738acc85 | ||
|
|
fb308b560b | ||
|
|
6639356f88 | ||
|
|
f45e0c9c4b | ||
|
|
7648563b00 | ||
|
|
32ac719663 | ||
|
|
f07ece9dd6 | ||
|
|
4b703f2790 | ||
|
|
0e350c28c7 | ||
|
|
50387cdbf5 | ||
|
|
49fcfa61f2 | ||
|
|
cd053d6a87 | ||
|
|
74ed82f592 | ||
|
|
10f23db843 | ||
|
|
89ec5861b5 | ||
|
|
ab614e4545 | ||
|
|
6559b3ba1b | ||
|
|
b70debeffa | ||
|
|
2a386e9c8b | ||
|
|
cf3f40b578 | ||
|
|
a18500dd9b | ||
|
|
3998d10bba | ||
|
|
1372874ab4 | ||
|
|
cbce448f35 | ||
|
|
b715918998 | ||
|
|
b4605958ad | ||
|
|
40a20a55d3 | ||
|
|
835e5ccc2b | ||
|
|
85fdbbd0ba | ||
|
|
6173e6c0f4 | ||
|
|
22d28f88c9 | ||
|
|
8d759ddd0a | ||
|
|
393078fb5f | ||
|
|
3d2ce8bf49 | ||
|
|
a653cedb16 | ||
|
|
f3538fbcb7 | ||
|
|
4b44f378ee | ||
|
|
5efba2aa10 | ||
|
|
ce43221767 | ||
|
|
69654fa96d | ||
|
|
16d0509262 | ||
|
|
e1a4ed67f4 | ||
|
|
5abe949006 | ||
|
|
bbb9a01130 | ||
|
|
5c589f0b39 | ||
|
|
dd37ea1295 | ||
|
|
7535f8b34c | ||
|
|
3dcf76467e | ||
|
|
dd8c1f3ec8 | ||
|
|
327ef6a39b | ||
|
|
742b70a5f0 | ||
|
|
fbf0610ff7 | ||
|
|
a06c15f469 | ||
|
|
ef96c7d074 | ||
|
|
a437675781 | ||
|
|
af0b10db40 | ||
|
|
60b5b0bf8d | ||
|
|
88237d369d | ||
|
|
3433810ed0 | ||
|
|
863a67516e | ||
|
|
531b04b2ff | ||
|
|
603f93025f | ||
|
|
51d4c4cdc9 | ||
|
|
f69a2be045 | ||
|
|
07b49dca49 | ||
|
|
f7ea1e3b99 | ||
|
|
8ecb42206f | ||
|
|
057f89ce01 | ||
|
|
dc8472323d | ||
|
|
974747b297 | ||
|
|
6a8cc2a505 | ||
|
|
4bcdbde5bc | ||
|
|
8f2770be95 | ||
|
|
7933336c25 | ||
|
|
5e1267bc64 | ||
|
|
dc835b86e9 | ||
|
|
ca49fc368a | ||
|
|
0475359eff | ||
|
|
119228c0b4 | ||
|
|
f06adcb15d | ||
|
|
1ed27c4c94 | ||
|
|
d57880510c | ||
|
|
c24b9cc0d0 | ||
|
|
2747f10901 | ||
|
|
20202ee75e | ||
|
|
58a43f5534 | ||
|
|
c186f05dd3 | ||
|
|
f2182c195b | ||
|
|
066c6bd1cd | ||
|
|
690df52019 | ||
|
|
533ba87ef4 | ||
|
|
b8581e3cec | ||
|
|
d7a7751480 | ||
|
|
e816f7126d | ||
|
|
6315dff17b | ||
|
|
826d9fcf6a | ||
|
|
4e642fe3d3 | ||
|
|
2012bbdbc1 | ||
|
|
96e14fd6fc | ||
|
|
1449d31e34 | ||
|
|
a3a2a62819 | ||
|
|
c59019f5f7 | ||
|
|
6bf09ff6da | ||
|
|
3a76d7df3a | ||
|
|
1d516f08b3 | ||
|
|
656245ce6a | ||
|
|
91d26db055 | ||
|
|
a354d60b77 | ||
|
|
3112ac7f9a | ||
|
|
5351496d6e | ||
|
|
794f766db8 | ||
|
|
3fb5423fda | ||
|
|
260cee9b38 | ||
|
|
c4a6735d60 | ||
|
|
28ad1b6c9d | ||
|
|
f609e2b628 | ||
|
|
3ef363a01e | ||
|
|
9e68bc90c2 | ||
|
|
4a36ac6a04 | ||
|
|
d2590607c2 | ||
|
|
2bce6e4f02 | ||
|
|
53e95bfadf | ||
|
|
6450629d70 | ||
|
|
8261b85b86 | ||
|
|
1c985e227f | ||
|
|
4efb380a61 | ||
|
|
e64812da72 | ||
|
|
14bbcd0617 | ||
|
|
ca4888ecae | ||
|
|
e3251b352f | ||
|
|
a532e73b52 | ||
|
|
b11aa4e633 | ||
|
|
1c66cf83bf | ||
|
|
4cbe3354e1 | ||
|
|
1ae7ba6bbb | ||
|
|
8d28478b10 | ||
|
|
c1fb8c619f | ||
|
|
eb250f91cb | ||
|
|
4ea2b963fa | ||
|
|
372b4bbb3f | ||
|
|
7577b1a958 | ||
|
|
7590c0241a | ||
|
|
68b00733e3 | ||
|
|
0cf1c48f2a | ||
|
|
8dbaa4c175 | ||
|
|
9085ed7ab0 | ||
|
|
26c3fea611 | ||
|
|
6008cc3831 | ||
|
|
f9d71a741f | ||
|
|
6affe95aea | ||
|
|
e83fe7f8ff | ||
|
|
4926577eeb | ||
|
|
584a9ba06c | ||
|
|
c8f5f671a9 | ||
|
|
cc852e5aad | ||
|
|
1bb37ede87 | ||
|
|
8eaee091ea | ||
|
|
90340c5be8 | ||
|
|
34258475f5 | ||
|
|
445c7a0472 | ||
|
|
541710ba1e | ||
|
|
27b6caf77d | ||
|
|
460c131c1e | ||
|
|
6aff22ae35 | ||
|
|
355021ba2d | ||
|
|
946fbc0933 | ||
|
|
7bebc7da8d | ||
|
|
cd33ac3c3e | ||
|
|
32f98ac079 | ||
|
|
fad54d4627 | ||
|
|
8ac6daff95 | ||
|
|
342f20a5a6 | ||
|
|
b02bf2e596 | ||
|
|
3961ff5185 | ||
|
|
90c696776c | ||
|
|
d697d42c4e | ||
|
|
b52604cb1d | ||
|
|
ee1639bbef | ||
|
|
59b09fa084 | ||
|
|
2d1a001c0f | ||
|
|
cb6d78eccb | ||
|
|
65949cccfa | ||
|
|
2d2c4d8ae4 | ||
|
|
a22005cf8c | ||
|
|
d5c88f2bc0 | ||
|
|
a7b816dd05 | ||
|
|
c84924c23c | ||
|
|
faa37756dc | ||
|
|
61ed7b167a | ||
|
|
cd6347a23a | ||
|
|
6cc37dedd2 | ||
|
|
1496fbe0b7 | ||
|
|
738758d753 | ||
|
|
7cd40fca03 | ||
|
|
266da98a73 | ||
|
|
2a17d357a1 | ||
|
|
b081e3e011 | ||
|
|
09f885ee68 | ||
|
|
d1568a3b2c | ||
|
|
f913a86dae | ||
|
|
5c56b5aacf | ||
|
|
096b87d4e3 | ||
|
|
6e3d3584a1 | ||
|
|
b0e7221950 | ||
|
|
92458fb1b3 | ||
|
|
80541abe9f | ||
|
|
d7851e5ec9 | ||
|
|
16a50d6271 | ||
|
|
72a58827bf | ||
|
|
85b806283e | ||
|
|
15037edbde | ||
|
|
17c83f8db9 | ||
|
|
e7dcc84afc | ||
|
|
8eaa940d4e | ||
|
|
9997675b1d | ||
|
|
9ef566f11f | ||
|
|
e3c3afe809 | ||
|
|
5b14ca6b12 | ||
|
|
c4676fecda | ||
|
|
a2872ef5b7 | ||
|
|
dea12f0e5e | ||
|
|
a518a6e67d | ||
|
|
325f2c28f7 | ||
|
|
dc470402e7 | ||
|
|
a029322aae | ||
|
|
e4a9953af4 | ||
|
|
57dc70f1bc | ||
|
|
dd83874d83 | ||
|
|
1ef2b7398e | ||
|
|
a89696afbb | ||
|
|
1ac03ba6e5 | ||
|
|
7e4068a244 | ||
|
|
c31a867bde | ||
|
|
f1252fa4e2 | ||
|
|
dd52766449 | ||
|
|
8f3c778b80 | ||
|
|
9aa1b25a56 | ||
|
|
b4d7acb827 | ||
|
|
b306601c72 | ||
|
|
5310c2e7f6 | ||
|
|
859f49eb10 | ||
|
|
ccfb73c19b | ||
|
|
b35c40c5a6 | ||
|
|
288107c8bc | ||
|
|
f9b56c7de2 | ||
|
|
b48734ebfa | ||
|
|
1aa944c3e1 | ||
|
|
0399b73c73 | ||
|
|
bcbd69e1b9 | ||
|
|
14fc85db51 | ||
|
|
0c50c49555 | ||
|
|
d37c254812 | ||
|
|
9d3e83e1ba | ||
|
|
2df98c614d | ||
|
|
ef7655101f | ||
|
|
b1f33e84b9 | ||
|
|
be27328404 | ||
|
|
f33a3989ea | ||
|
|
174cef80c0 | ||
|
|
b2dc9dc113 | ||
|
|
7e161684e9 | ||
|
|
a25654a1c2 | ||
|
|
8f1fb5df6c | ||
|
|
e9393a2e8e | ||
|
|
91a4989ef3 | ||
|
|
bbc70469e5 | ||
|
|
eb4ad1af46 | ||
|
|
0a42d7381c | ||
|
|
0165cfb3ac | ||
|
|
f44d45c992 | ||
|
|
38037978a2 | ||
|
|
e909a6927b | ||
|
|
85574ed40c | ||
|
|
7e9181d935 | ||
|
|
87b3f3ed27 | ||
|
|
9ac3763bdd | ||
|
|
5b4567b9ff | ||
|
|
201080e6ff | ||
|
|
5d1d7da498 | ||
|
|
c6f831aa38 | ||
|
|
fad7af19a7 | ||
|
|
4327f9529a | ||
|
|
d100030da6 | ||
|
|
3632d2c3ef | ||
|
|
a430a1dc0c | ||
|
|
739660e6ca | ||
|
|
1a18dc23b9 | ||
|
|
55f37f856b | ||
|
|
c1df8d2ed3 | ||
|
|
6c92b2dd2e | ||
|
|
3e35dec9fa | ||
|
|
187db3d011 | ||
|
|
0116e86fcc | ||
|
|
aaa3f1aa88 | ||
|
|
84f54b4b8a | ||
|
|
8c7ec533bf | ||
|
|
9de1f95360 | ||
|
|
cdefb96a8c | ||
|
|
e25b6c9232 | ||
|
|
eae58b59c9 | ||
|
|
4afedd5c88 | ||
|
|
6e5cc7fc6c | ||
|
|
1b6c2152d3 | ||
|
|
1fc022bc60 | ||
|
|
858777606b | ||
|
|
b4fe75af95 | ||
|
|
e8d94fd116 | ||
|
|
d6ab066152 | ||
|
|
54b7cb2c88 | ||
|
|
90b2623b9d | ||
|
|
8782836d7b | ||
|
|
e3aa26a41a | ||
|
|
54b1fb739f | ||
|
|
9983b719d6 | ||
|
|
c70df7102b | ||
|
|
f335b6837b | ||
|
|
19892a00f4 | ||
|
|
c6d753080a | ||
|
|
28547b32a0 | ||
|
|
8aae688fb0 | ||
|
|
38a688f918 | ||
|
|
6f9cb12dd8 | ||
|
|
5c20d6c3f6 | ||
|
|
a09511defb | ||
|
|
189db2a051 | ||
|
|
8f9d695ca6 | ||
|
|
cfc897055b | ||
|
|
f74a7b31c3 | ||
|
|
1860e1dc43 | ||
|
|
c5e6225e7f | ||
|
|
8e985ed413 | ||
|
|
392c627925 | ||
|
|
cd9a4887fd | ||
|
|
22f856668f | ||
|
|
0f926fc701 | ||
|
|
4ab5202ef2 | ||
|
|
26c316a47a | ||
|
|
b25c2547b2 | ||
|
|
64b041ea05 | ||
|
|
0ddc8588f8 | ||
|
|
b4e274682a | ||
|
|
76ce203272 | ||
|
|
7116efd65d | ||
|
|
a9b2dcb49e | ||
|
|
e804b6afb2 | ||
|
|
772d37131d | ||
|
|
ec30c46d7e | ||
|
|
b5705e6ec3 | ||
|
|
4e0479262f | ||
|
|
9a8088495e | ||
|
|
983c5eb544 | ||
|
|
58fdbc4054 | ||
|
|
3673632089 | ||
|
|
87e61c8920 | ||
|
|
d67e7a3b4d | ||
|
|
954995b3ef | ||
|
|
f591849b8d | ||
|
|
4c44b751e3 | ||
|
|
648ad23dcf | ||
|
|
c46c8a010f | ||
|
|
832536f403 | ||
|
|
f0067a1c04 | ||
|
|
f732a4b545 | ||
|
|
38cf897ae1 | ||
|
|
8ca365da7b | ||
|
|
cbe8b4012b | ||
|
|
522f5c8a86 | ||
|
|
ac5d2268e5 | ||
|
|
3d0effb912 | ||
|
|
90b970115a | ||
|
|
0f5ba4ef5b | ||
|
|
bd428fa352 | ||
|
|
00b57b2ff9 | ||
|
|
bd69e3dcc3 | ||
|
|
275d492f39 | ||
|
|
f55f302306 | ||
|
|
650225ad00 | ||
|
|
631f5ed99c | ||
|
|
b9664dc710 | ||
|
|
bd66871b0e | ||
|
|
dccc880ef5 | ||
|
|
0ccad9df90 | ||
|
|
c75fbc5f00 | ||
|
|
e257bed6de | ||
|
|
e56a550cff | ||
|
|
3d1ced386f | ||
|
|
eb90b33485 | ||
|
|
215a7501a6 | ||
|
|
9f228b6235 | ||
|
|
72e6132895 | ||
|
|
fbe520d381 | ||
|
|
108f47c90d | ||
|
|
c65c34469a | ||
|
|
b21845440a | ||
|
|
4ce642629c | ||
|
|
68262d8abb | ||
|
|
093002db14 | ||
|
|
b85f7915f4 | ||
|
|
e70315354e | ||
|
|
0867a234c2 | ||
|
|
4e962bba09 | ||
|
|
279b0cd0c5 | ||
|
|
3dc3dc8cbe | ||
|
|
38131f26be | ||
|
|
0e38412510 | ||
|
|
848279404f | ||
|
|
6e77c8b8fc | ||
|
|
33438263ab | ||
|
|
bbe4e6d7ed | ||
|
|
69387b6444 | ||
|
|
bf7ffda252 | ||
|
|
10c2f222e1 | ||
|
|
b0a0bfa4ac | ||
|
|
b573130ab7 | ||
|
|
cd5468f55c | ||
|
|
83407e0c8d | ||
|
|
e1466fe160 | ||
|
|
94a6a26b48 | ||
|
|
f205c82d90 | ||
|
|
f9e61e7ea0 | ||
|
|
9462d32f83 | ||
|
|
da8203e64d | ||
|
|
83ebd55a15 | ||
|
|
0c3e9eb716 | ||
|
|
bc72a8f083 | ||
|
|
14a68d5806 | ||
|
|
86dc78b63a | ||
|
|
5dd0a758d4 | ||
|
|
e959b1edc2 | ||
|
|
7533f6239c | ||
|
|
71636a4ce6 | ||
|
|
72e4cf3d10 | ||
|
|
a8c849a305 | ||
|
|
ce0a941e2d | ||
|
|
af899b3ca8 | ||
|
|
742234c757 | ||
|
|
15b8140690 | ||
|
|
89cd881397 | ||
|
|
75fd905829 | ||
|
|
5d77e227e9 | ||
|
|
1da46f1615 | ||
|
|
09bcf05b04 | ||
|
|
5c590f4ad8 | ||
|
|
1feb66dc86 | ||
|
|
e83ebc2581 | ||
|
|
c97889f249 | ||
|
|
5f1a8b406a | ||
|
|
3781d43fa8 | ||
|
|
d950315e5a | ||
|
|
fae10ae979 | ||
|
|
c1cc453761 | ||
|
|
52aad2db2a | ||
|
|
777d2dae40 | ||
|
|
6c2388633c | ||
|
|
9ade8f69fd | ||
|
|
aded799b81 | ||
|
|
34bcd946e9 | ||
|
|
791db54746 | ||
|
|
5c2d9dddb0 | ||
|
|
b4d5fbcb61 | ||
|
|
7a9ea55100 | ||
|
|
b6eaf30829 | ||
|
|
ee778e6a09 | ||
|
|
df5c4cefeb | ||
|
|
de8c0b6d09 | ||
|
|
86dcf290a6 | ||
|
|
cd9bfba7c6 | ||
|
|
aa5b8740fd | ||
|
|
869a31abf0 | ||
|
|
f8fa10389a | ||
|
|
553efb890e | ||
|
|
4b276370dc | ||
|
|
2d739a956d | ||
|
|
66dbc0366c | ||
|
|
553ee02387 | ||
|
|
8e5c65f03b | ||
|
|
2bb8f969dc | ||
|
|
e46f5ea1bf | ||
|
|
6549c5d1a0 | ||
|
|
1710dc9c72 | ||
|
|
1e963ee1d8 | ||
|
|
a133dfc722 | ||
|
|
42c3c6ff46 | ||
|
|
a62cd40fc0 | ||
|
|
b0dcf14d96 | ||
|
|
780169962d | ||
|
|
99d6c8c879 | ||
|
|
ed6d19e8ab | ||
|
|
c02581978d | ||
|
|
1feb732ebc | ||
|
|
1029acab75 | ||
|
|
db00b65e3c | ||
|
|
10533dcba2 | ||
|
|
773ae2bfe3 | ||
|
|
fd4d10e6e7 | ||
|
|
14e267b4b0 | ||
|
|
60d04b1bdf | ||
|
|
bebe535d94 | ||
|
|
d7d084b57a | ||
|
|
265200b5bc | ||
|
|
3b60d9ba77 | ||
|
|
3baf761b3b | ||
|
|
6623e5cb2d | ||
|
|
13f5cb1539 | ||
|
|
6e19722742 | ||
|
|
d083dc36b2 | ||
|
|
8eb2380542 | ||
|
|
aac7391d28 | ||
|
|
691ac56723 | ||
|
|
009e310a75 | ||
|
|
90cb9d58a4 | ||
|
|
7501570cea | ||
|
|
c5486f3e77 | ||
|
|
dbf376d400 | ||
|
|
2da6108d19 | ||
|
|
4f3c2e8adc | ||
|
|
ea9a0130db | ||
|
|
ff0fd9e20f | ||
|
|
ad868f1df3 | ||
|
|
7104d983cd | ||
|
|
ff9db8ff5a | ||
|
|
231df0b15b | ||
|
|
f978e528de | ||
|
|
cc73c7c0b6 | ||
|
|
15701a4a90 | ||
|
|
f8d6204f0c | ||
|
|
c3ceef836a | ||
|
|
de44c416f6 | ||
|
|
25d2824478 | ||
|
|
62872b34c2 | ||
|
|
ddbe6f4683 | ||
|
|
d3922804eb | ||
|
|
ce8fdb1595 | ||
|
|
b000ee7745 | ||
|
|
69a7ef2318 | ||
|
|
d6e09a6738 | ||
|
|
9d642bf941 | ||
|
|
1f4d543fe1 | ||
|
|
93363ec2e3 | ||
|
|
a5ec1c886a | ||
|
|
cb4d467f8e | ||
|
|
3c9add272a | ||
|
|
73a3cacfbd | ||
|
|
6149a12180 | ||
|
|
790ef81101 | ||
|
|
5cc57110c1 | ||
|
|
d54adf7ca9 | ||
|
|
195a590de3 | ||
|
|
5f8056fad6 | ||
|
|
87bfa7f0f3 | ||
|
|
dc645ff08f | ||
|
|
c72e0d5ea3 | ||
|
|
97261e2ee9 | ||
|
|
3cbc018f25 | ||
|
|
e0c908d88f | ||
|
|
562c69307e | ||
|
|
9a6b5d8e66 | ||
|
|
8f1845b334 | ||
|
|
5703db8c2b | ||
|
|
42b59f0471 | ||
|
|
76b8f8743d | ||
|
|
a3779ff1e1 | ||
|
|
f93739c0e0 | ||
|
|
1d6bd5acf6 | ||
|
|
592903f3f8 | ||
|
|
c17f905ed2 | ||
|
|
44e1bb10c3 | ||
|
|
77248ad4d8 | ||
|
|
f25f5008f1 | ||
|
|
666da255b8 | ||
|
|
60f9d4b3a3 | ||
|
|
115c6dd178 | ||
|
|
a1142100ab | ||
|
|
6b2ebe2f0e | ||
|
|
0ec8c74015 | ||
|
|
8baa24a539 | ||
|
|
6141a6b467 | ||
|
|
02f8dd928a | ||
|
|
31baa7fa85 | ||
|
|
207758482f | ||
|
|
0293e3a40a | ||
|
|
5445be2056 | ||
|
|
ce5ad89d5e | ||
|
|
83e8cfc2cc | ||
|
|
44d9818e97 | ||
|
|
ce4bece9ed | ||
|
|
18e2323cf4 | ||
|
|
8ebd6df41a | ||
|
|
c30dd01377 | ||
|
|
e84dc0120f | ||
|
|
47ea0cd282 | ||
|
|
e928b19b47 | ||
|
|
3f42024ffd | ||
|
|
0d1c168cbe | ||
|
|
3e32904c4b | ||
|
|
1c4697c2eb | ||
|
|
0cb73199b8 | ||
|
|
8cc406260d | ||
|
|
9a6f9f0a5e | ||
|
|
ee9483a291 | ||
|
|
c8d2050c7a | ||
|
|
ef5dd47604 | ||
|
|
f7a123c10b | ||
|
|
34fb3d9cd9 | ||
|
|
d712d53020 | ||
|
|
ac6b2ef4b4 | ||
|
|
9fd1f620d3 | ||
|
|
6de1a523bc | ||
|
|
37bface3a7 | ||
|
|
3e0a8618fd | ||
|
|
5d15141ae9 | ||
|
|
908863c076 | ||
|
|
628530dcff | ||
|
|
ff36369e57 | ||
|
|
366cba2102 | ||
|
|
39ea45eb51 | ||
|
|
07a1a3b469 | ||
|
|
b888be9dad | ||
|
|
c2ed6b8b08 | ||
|
|
90de11f4c9 | ||
|
|
083f26f3c4 | ||
|
|
4283d94edc | ||
|
|
46dece1b50 | ||
|
|
15e1ba7c05 | ||
|
|
9ea1b15753 | ||
|
|
07e186bc5f | ||
|
|
1bb5525c84 | ||
|
|
b0f47d70f1 | ||
|
|
8e4ee05bc1 | ||
|
|
51b04b68de | ||
|
|
6ec86fba1c | ||
|
|
e14a4382e5 | ||
|
|
a7ef197510 | ||
|
|
12f75688ff | ||
|
|
a1fd1acb86 | ||
|
|
d521bcede7 | ||
|
|
46eaa35718 | ||
|
|
2d905f9862 | ||
|
|
6ab2f99182 | ||
|
|
324b2f524c | ||
|
|
64973e46dd | ||
|
|
1980ef8e33 | ||
|
|
3852f644b8 | ||
|
|
dc780bd5fe | ||
|
|
11057154a7 | ||
|
|
215796bcaf | ||
|
|
cc70cb44ab | ||
|
|
b9833c49d1 | ||
|
|
685461b70f | ||
|
|
227b0a08ed | ||
|
|
2c45d38a66 | ||
|
|
c2364e3508 | ||
|
|
5aea034a17 | ||
|
|
73aa2bd158 | ||
|
|
79b3e6882a | ||
|
|
8208a3c3e3 | ||
|
|
71e52e0b65 | ||
|
|
79919802c9 | ||
|
|
5ac4fcc4fc | ||
|
|
902b22afac | ||
|
|
f33c293b1d | ||
|
|
86ae97e63c | ||
|
|
116aa5a508 | ||
|
|
9b4bdc8e33 | ||
|
|
5cc2d74128 | ||
|
|
22938a9d90 | ||
|
|
38020740d8 | ||
|
|
1e5ad5ad09 | ||
|
|
9382ad5809 | ||
|
|
8357180b78 | ||
|
|
0e0ee29cb6 | ||
|
|
c347ee1974 | ||
|
|
a0bc9c996d | ||
|
|
0ff098c2dd | ||
|
|
bf651ecad2 | ||
|
|
b516b704bb | ||
|
|
7a051d2587 | ||
|
|
d9dbedfded | ||
|
|
1f0590eff5 | ||
|
|
3b0b0e1cd5 | ||
|
|
9280cc841c | ||
|
|
57591444a9 | ||
|
|
704307c062 | ||
|
|
4bde1ba9f3 | ||
|
|
4524de492d | ||
|
|
1998d80162 | ||
|
|
8fb8e6f75e | ||
|
|
2455b14cc0 | ||
|
|
ef3e94edd3 | ||
|
|
cf06d79e8d | ||
|
|
b1ad327d16 | ||
|
|
223eaf7ee8 | ||
|
|
b7ed51ed49 | ||
|
|
7805c4eee6 | ||
|
|
5176d9a97d | ||
|
|
225199f264 | ||
|
|
70703e6952 | ||
|
|
c9ff23f243 | ||
|
|
127cbf1509 | ||
|
|
3de14c7c4c | ||
|
|
41ec5f262f | ||
|
|
773d772f8e | ||
|
|
8f700af029 | ||
|
|
0360bd168c | ||
|
|
8f438f95d0 | ||
|
|
0b825f58cf | ||
|
|
5893d853aa | ||
|
|
cf7a4a82f3 | ||
|
|
3c7bee32f8 | ||
|
|
6b9157f1d4 | ||
|
|
e229b207c1 | ||
|
|
6af3c1d523 | ||
|
|
51f24748a9 | ||
|
|
3a44782b05 | ||
|
|
8d41dead5d | ||
|
|
c611e98cf7 | ||
|
|
b98df58c76 | ||
|
|
feee4b2022 | ||
|
|
0dc061611f | ||
|
|
27aa1c1973 | ||
|
|
c1bf3a773f | ||
|
|
57ba12834a | ||
|
|
16f2c9fb42 | ||
|
|
b8c28e0a89 | ||
|
|
5e2f722e1c | ||
|
|
df67c0540c | ||
|
|
f26fb3cdf8 | ||
|
|
083dcb3647 | ||
|
|
a01fa3bc54 | ||
|
|
a53a69d374 | ||
|
|
98e0a48226 | ||
|
|
2c8e33b643 | ||
|
|
224a9e5cd8 | ||
|
|
4de249efa0 | ||
|
|
cbe341ff2c | ||
|
|
a4595a6592 | ||
|
|
b1c458bdc4 | ||
|
|
3fd747febf | ||
|
|
598f12a90a | ||
|
|
bd88cbfe64 | ||
|
|
5a2c21f956 | ||
|
|
09d28eff90 | ||
|
|
d540cd0a77 | ||
|
|
4e5caa7b8b | ||
|
|
968655c9cd | ||
|
|
1470793b52 | ||
|
|
e99832e2f0 | ||
|
|
327f85fdcc | ||
|
|
3b57965f8b | ||
|
|
baf697a134 | ||
|
|
8c900e5ca0 | ||
|
|
e6c37c0d1e | ||
|
|
b116741e25 | ||
|
|
0087d5784b | ||
|
|
8f95d4b279 | ||
|
|
baba2d34dd | ||
|
|
42e8f8f610 | ||
|
|
b739bfa01e | ||
|
|
a68b9643fc | ||
|
|
8d87c9bb19 | ||
|
|
287dd241e7 | ||
|
|
287dfded0e | ||
|
|
db5892b983 | ||
|
|
7c7caf98c1 | ||
|
|
869dd8d5a8 | ||
|
|
e5a4074c03 | ||
|
|
0ee8913199 | ||
|
|
ef94478db8 | ||
|
|
bb65e2c5c1 | ||
|
|
6cd5cb7ed0 | ||
|
|
3c0bb7ca41 | ||
|
|
48d5c2c772 | ||
|
|
9e7b8bb6b2 | ||
|
|
553e0fdbe3 | ||
|
|
38bef005f7 | ||
|
|
1bc468095c | ||
|
|
23089d2288 | ||
|
|
0fe8b3f671 | ||
|
|
61c1221b5e | ||
|
|
7fe04eee5a | ||
|
|
744c24b032 | ||
|
|
00d3105aad | ||
|
|
42bb937e68 | ||
|
|
86e58437aa | ||
|
|
89a6769385 | ||
|
|
d7989ab34d | ||
|
|
d291d38b38 | ||
|
|
6722de4173 | ||
|
|
c63085be15 | ||
|
|
5a1003ad71 | ||
|
|
29c7e3696a | ||
|
|
28c3ebb5f9 | ||
|
|
573d313cc8 | ||
|
|
33c7b4c440 | ||
|
|
4abf43e0ca | ||
|
|
12529b2c41 | ||
|
|
144b0c651c | ||
|
|
a4f7514220 | ||
|
|
22edba6c43 | ||
|
|
987450d880 | ||
|
|
107263d061 | ||
|
|
f667eb1500 | ||
|
|
50d7fa684f | ||
|
|
09ae205e37 | ||
|
|
68aeafaa0b | ||
|
|
cb1ac4541b | ||
|
|
073759612a | ||
|
|
2ea726518e | ||
|
|
7e5a1d385c | ||
|
|
1a9168e824 | ||
|
|
3c247e2156 | ||
|
|
6e80561f32 | ||
|
|
fb752f6ade | ||
|
|
497f848b70 | ||
|
|
8ce33b10a3 | ||
|
|
e77d40c4c2 | ||
|
|
323cf47417 | ||
|
|
026d72d68a | ||
|
|
617ca22f2d | ||
|
|
46acfe9470 | ||
|
|
5df66ede36 | ||
|
|
9b4d512429 | ||
|
|
c48b0c17ba | ||
|
|
969306822f | ||
|
|
01d3e6c03d | ||
|
|
61da4e56c1 | ||
|
|
614cd1c96f | ||
|
|
53a3767829 | ||
|
|
5eec7f9bbc | ||
|
|
6f722f9ead | ||
|
|
4c3cc8547c | ||
|
|
2ff74a2b68 | ||
|
|
793ee2acbe | ||
|
|
7abcbcda15 | ||
|
|
674f3b95c5 | ||
|
|
42eb107ecb | ||
|
|
107f28ca93 | ||
|
|
b180fa901d | ||
|
|
72682a3dd1 | ||
|
|
549114ae1f | ||
|
|
ead0e14350 | ||
|
|
1a69ee2b2c | ||
|
|
fe32958d59 | ||
|
|
a0215586f2 | ||
|
|
d18f795202 | ||
|
|
125d33d6b7 | ||
|
|
378d2e043f | ||
|
|
1d4a2c5863 | ||
|
|
109d6300ab | ||
|
|
9483035056 | ||
|
|
f69de0db21 | ||
|
|
2fa5c1a67c | ||
|
|
cbe47aea1b | ||
|
|
f40c9199fc | ||
|
|
890ecf5846 | ||
|
|
23d4136096 | ||
|
|
97d5f68072 | ||
|
|
53cebd7d2f | ||
|
|
21d06c00aa | ||
|
|
95487bba48 | ||
|
|
a544f4349f | ||
|
|
22b57f39ef | ||
|
|
4fdcc0221d | ||
|
|
2a78622529 | ||
|
|
21d21f4261 | ||
|
|
7dd519565b | ||
|
|
2e06b28e5a | ||
|
|
85409263c8 | ||
|
|
91b5a1e44a | ||
|
|
08373b76a2 | ||
|
|
3386d2f637 | ||
|
|
c047d23c69 | ||
|
|
31ec481d46 | ||
|
|
6a1cb8c597 | ||
|
|
653d1460a3 | ||
|
|
ff5ab5ab1d | ||
|
|
af2eee17fe | ||
|
|
ae02bbcce7 | ||
|
|
7d3ec1368f | ||
|
|
3267595bc5 | ||
|
|
750788d300 | ||
|
|
ff528cbbaf | ||
|
|
210f77c46e | ||
|
|
d77ee9b638 | ||
|
|
2a5e73a48a | ||
|
|
b3fb20df58 | ||
|
|
1d7bf20f96 | ||
|
|
08ecd47cf0 | ||
|
|
c14fcf29e8 | ||
|
|
e7b526455c | ||
|
|
5c2b4f03f3 | ||
|
|
832750ec57 | ||
|
|
8149df1e34 | ||
|
|
3b60a5d3c4 | ||
|
|
14e074a64f | ||
|
|
b04f1643c9 | ||
|
|
14904a2958 | ||
|
|
d43ea9bedd | ||
|
|
d397cdf0f6 | ||
|
|
93104a21f3 | ||
|
|
d3f36f9b71 | ||
|
|
fdb46534ab | ||
|
|
ee2f6e9c13 | ||
|
|
cc9706c413 | ||
|
|
13d3db0516 | ||
|
|
2ee0ad157d | ||
|
|
2dbbf052d2 | ||
|
|
453f5681dd | ||
|
|
afeaf01fdb | ||
|
|
bbfe5c2ab0 | ||
|
|
c8422421ab | ||
|
|
477ec440bc | ||
|
|
ef40f299ef | ||
|
|
fe2a076558 | ||
|
|
b32eb07d1e | ||
|
|
723150b755 | ||
|
|
d398f903f8 | ||
|
|
44142be28e | ||
|
|
5de5a77902 | ||
|
|
5d1b39ca49 | ||
|
|
d2cce02669 | ||
|
|
05b5a33eee | ||
|
|
8f1884349a | ||
|
|
8ece1a3454 | ||
|
|
3f2cf23f47 | ||
|
|
9268ca51da | ||
|
|
5da29ba148 | ||
|
|
0c64b506c2 | ||
|
|
da5fc417c5 | ||
|
|
186df66e81 | ||
|
|
f52865ce98 | ||
|
|
9ad8d70cf7 | ||
|
|
2765e1c923 | ||
|
|
44e0067e34 | ||
|
|
066e62c0aa | ||
|
|
1a0e84e6d7 | ||
|
|
03510ee1e7 | ||
|
|
cc1b61e522 | ||
|
|
af61d13bb3 | ||
|
|
3038e9309d | ||
|
|
668206af1c | ||
|
|
a0a4e52fca | ||
|
|
3064a13450 | ||
|
|
df1221ba74 | ||
|
|
71ce5c4dcb | ||
|
|
e6e0a4bd7d | ||
|
|
bda3cac24b | ||
|
|
d7522d0dc1 | ||
|
|
ae3688577d | ||
|
|
11077b1042 | ||
|
|
396db36829 | ||
|
|
f8f09a3654 | ||
|
|
7eb6f42bee | ||
|
|
447efc2174 | ||
|
|
b809a577ff | ||
|
|
9d63453130 | ||
|
|
8dd55ae036 | ||
|
|
6250f2ab28 | ||
|
|
59583d48d7 | ||
|
|
b8daf9882b | ||
|
|
587f2754d4 | ||
|
|
b247af7af6 | ||
|
|
15facbc291 | ||
|
|
e919ddb83c | ||
|
|
9dd7d96266 | ||
|
|
7191a9273c | ||
|
|
3aefbf71a9 | ||
|
|
e5d544e583 | ||
|
|
d5a845c3e1 | ||
|
|
cbe1248e0c | ||
|
|
fec23b56eb | ||
|
|
8f3e6d8c77 | ||
|
|
1649e5115d | ||
|
|
509904b7a5 | ||
|
|
8d51b76ca2 | ||
|
|
f5c833882d | ||
|
|
9989e76ef7 | ||
|
|
53e6c69b54 | ||
|
|
9bf7b0184b | ||
|
|
ccec652adc | ||
|
|
23a5ce6874 | ||
|
|
8027d4922b | ||
|
|
6dcafc3129 | ||
|
|
c99935bf2e | ||
|
|
90d5ced632 | ||
|
|
11c9edaf98 | ||
|
|
2ac53142b5 | ||
|
|
95a0b1d77e | ||
|
|
694a68c7f8 | ||
|
|
56b26822a2 | ||
|
|
075904616a | ||
|
|
8e0d3ec4d0 | ||
|
|
ef092bfefb | ||
|
|
b16dce7343 | ||
|
|
cda257a971 | ||
|
|
89dc1c45d7 | ||
|
|
c43cdcd5de | ||
|
|
32d56503fc | ||
|
|
157a04ef76 | ||
|
|
679bf22b74 | ||
|
|
cb97c00611 | ||
|
|
b36262b167 | ||
|
|
54c9279734 | ||
|
|
ee6b45894f | ||
|
|
112adf47be | ||
|
|
ac98f51356 | ||
|
|
139f5cf7b3 | ||
|
|
4dbb58af64 | ||
|
|
8167d7b6ae | ||
|
|
f2aefb1d39 | ||
|
|
167e76897f | ||
|
|
b47f21feaf | ||
|
|
9e2f7981fb | ||
|
|
cf78a30d89 | ||
|
|
61fa82a4fe | ||
|
|
e5347e6ee3 | ||
|
|
1396f960b0 | ||
|
|
6221ee164f | ||
|
|
309d18bebc | ||
|
|
ec22926189 | ||
|
|
084c6d24e2 | ||
|
|
de96aad086 | ||
|
|
f6eae2274f | ||
|
|
c9ee477c08 | ||
|
|
18aef77c4a | ||
|
|
9a78eac0ff | ||
|
|
74f20c2a5d | ||
|
|
9106d1f39b | ||
|
|
1c56fe0f1a | ||
|
|
3dd4e06fbe | ||
|
|
d21e696892 | ||
|
|
a1556212bc | ||
|
|
0eab965933 | ||
|
|
0c82f97880 | ||
|
|
4e6b9dbdb4 | ||
|
|
1ba9526e0b | ||
|
|
568ff4b366 | ||
|
|
16a82a28ae | ||
|
|
2d56f33b60 | ||
|
|
8db39d2e6b | ||
|
|
cd31768b5e | ||
|
|
077ce1b0a7 | ||
|
|
c990aa410e | ||
|
|
6a1848e814 | ||
|
|
ff8c876274 | ||
|
|
2126a4067b | ||
|
|
a9e58df64d | ||
|
|
e038620878 | ||
|
|
4468e5fa06 | ||
|
|
59922480fa | ||
|
|
29a140cb00 | ||
|
|
0843da7a7c | ||
|
|
50edd7dfbe | ||
|
|
37bfb7d936 | ||
|
|
fc349e9865 | ||
|
|
bec8b4d1b2 | ||
|
|
3a48483700 | ||
|
|
363278089d | ||
|
|
7d426fbfa9 | ||
|
|
3f45a0dbc9 | ||
|
|
69d00d1a4d | ||
|
|
92ca904748 | ||
|
|
33034118f2 | ||
|
|
dcd0ec9f29 | ||
|
|
467d53db81 | ||
|
|
f8a890c579 | ||
|
|
881bf08aee | ||
|
|
297767a42b | ||
|
|
f81a88abbf | ||
|
|
f335c882ba | ||
|
|
27ad4b9eb9 | ||
|
|
23f71d1ec8 | ||
|
|
5c120c3fc2 | ||
|
|
db56b74475 | ||
|
|
6576bffa52 | ||
|
|
594de74a88 | ||
|
|
395d58009e | ||
|
|
48adea0d16 | ||
|
|
dce24681e2 | ||
|
|
eecac2b007 | ||
|
|
53d5b6c37f | ||
|
|
6a8196b42c | ||
|
|
9e801f9ced | ||
|
|
4955edf69c | ||
|
|
0ab6cc9b75 | ||
|
|
5f29fe3c4f | ||
|
|
a2ab0a1173 | ||
|
|
d37b9c3c26 | ||
|
|
82dbb39568 | ||
|
|
23f2f96361 | ||
|
|
dfa585467f | ||
|
|
33b914fd4b | ||
|
|
18100867c5 | ||
|
|
d4bd27cb38 | ||
|
|
d4f682dadb | ||
|
|
f8bb7aaf30 | ||
|
|
6b02384fb8 | ||
|
|
65724bcaa7 | ||
|
|
4fa9346652 | ||
|
|
bc1459f107 | ||
|
|
9f11d7ec88 | ||
|
|
369271b29f | ||
|
|
4d34009d32 | ||
|
|
0d2c469ad9 | ||
|
|
a8bf85906a | ||
|
|
99369da128 | ||
|
|
648b3772a1 | ||
|
|
db45bfd07d | ||
|
|
06d88d3fe5 | ||
|
|
177d0a2de3 | ||
|
|
1bc08930be | ||
|
|
cc853a0632 | ||
|
|
3e89b8f781 | ||
|
|
6a928cd83a | ||
|
|
358ec17c61 | ||
|
|
765991b32e | ||
|
|
1c11a22347 | ||
|
|
b74244652e | ||
|
|
b6f76562e2 | ||
|
|
fa2e3f18d6 | ||
|
|
7a5efa938b | ||
|
|
b7b755a79d | ||
|
|
29e562259d | ||
|
|
fa74b2a084 | ||
|
|
f2d2d287f5 | ||
|
|
8d701e46df | ||
|
|
3a17e1f9b2 | ||
|
|
6d0306444d | ||
|
|
02e37eaf88 | ||
|
|
17daf67662 | ||
|
|
1ee3c49011 | ||
|
|
e3af89b001 | ||
|
|
c8f5ac4d25 | ||
|
|
ba841ce1b7 | ||
|
|
5f0258022a | ||
|
|
006ab00f20 | ||
|
|
94bc074f0d | ||
|
|
a99941d7dc | ||
|
|
a763681d2e | ||
|
|
32bc143589 | ||
|
|
b422cac734 | ||
|
|
9f9a7b9c4b | ||
|
|
5416978da5 | ||
|
|
8d6c4ed713 | ||
|
|
1ddce7ac2e | ||
|
|
6d642139d1 | ||
|
|
eb845a1eb7 | ||
|
|
18d11b2c6a | ||
|
|
00bbf4eae2 | ||
|
|
3cf9d39cf2 | ||
|
|
8ee2def02a | ||
|
|
51e9de0e79 | ||
|
|
bd3e886d7e | ||
|
|
37eafa54cc | ||
|
|
ca6e97be65 | ||
|
|
22bcef1310 | ||
|
|
900f307847 | ||
|
|
5602653ba9 | ||
|
|
c209dbd90b | ||
|
|
1c87db1faf | ||
|
|
73cd675dc9 | ||
|
|
dc374df350 | ||
|
|
9485725df5 | ||
|
|
81e59d5fe4 | ||
|
|
bcc9741fbe | ||
|
|
1151572814 | ||
|
|
c648bb71f5 | ||
|
|
be7dbc0e51 | ||
|
|
10a4350cae | ||
|
|
b15f2fc49b | ||
|
|
b793b81e4d | ||
|
|
ac6be74471 | ||
|
|
4103831401 | ||
|
|
7e87b4bed3 | ||
|
|
6fc05cb587 | ||
|
|
eaa9e6d840 | ||
|
|
e5da1905c6 | ||
|
|
864b94f62a | ||
|
|
cac19cad4d | ||
|
|
7b68309301 | ||
|
|
af9cbb47ef | ||
|
|
8bb9ed8a18 | ||
|
|
0813f48fce | ||
|
|
130d079c90 | ||
|
|
caf503faa3 | ||
|
|
ae817daa8e | ||
|
|
86659896da | ||
|
|
70ae6d612c | ||
|
|
cfa2d29a4b | ||
|
|
ca22dfec3a | ||
|
|
bbfecf1b47 | ||
|
|
7f949472f7 | ||
|
|
379c75aab6 | ||
|
|
23481318a2 | ||
|
|
5ceb2ea1c9 | ||
|
|
2af4c94817 | ||
|
|
f6333ba304 | ||
|
|
1d3e29cea2 | ||
|
|
2e462f39f7 | ||
|
|
c5868b7e5a | ||
|
|
2651e81cd3 | ||
|
|
db7a2d8768 | ||
|
|
d0d17d0033 | ||
|
|
3ebfb57527 | ||
|
|
b485dddfa2 | ||
|
|
979d7e3662 | ||
|
|
5de9859a1e | ||
|
|
5b96cc9b0a | ||
|
|
7886682f7c | ||
|
|
f95ba3f61c | ||
|
|
c6cb3190cf | ||
|
|
c8c026af16 | ||
|
|
e9012adaa4 | ||
|
|
e769b70099 | ||
|
|
0bfc7d430b | ||
|
|
8a04fc058d | ||
|
|
288e6eae00 | ||
|
|
84f4a022ed | ||
|
|
76079f24c0 | ||
|
|
0c5d62a0dd | ||
|
|
13d2e91914 | ||
|
|
9f0b2c570e | ||
|
|
1d5d72967a | ||
|
|
ba8bae67ae | ||
|
|
c68de36bce | ||
|
|
6c86fcf6fa | ||
|
|
f594a84664 | ||
|
|
b89e14f78d | ||
|
|
a872d10770 | ||
|
|
390cfa6058 | ||
|
|
613e10a2cf | ||
|
|
4ce23aee6e | ||
|
|
2534e5f668 | ||
|
|
16cc281a22 | ||
|
|
5fdcffc97d | ||
|
|
55abaf0dae | ||
|
|
8ece68a3c7 | ||
|
|
0ff3817c28 | ||
|
|
12d0ec2cf6 | ||
|
|
13fab5ebe4 | ||
|
|
2cc0150bec | ||
|
|
8be7a7e67d | ||
|
|
41ef70c1e4 | ||
|
|
26991b21ce | ||
|
|
3d79f39600 | ||
|
|
be940a32f5 | ||
|
|
fb2d3d6151 | ||
|
|
5180266f01 | ||
|
|
e00e160f35 | ||
|
|
077bd3b538 | ||
|
|
8e8eda1012 | ||
|
|
40e0adfefe | ||
|
|
7ef11cb05f | ||
|
|
d05ed7a26c | ||
|
|
b39befc111 | ||
|
|
d6a81e320b | ||
|
|
4fbbb63712 | ||
|
|
8858287469 | ||
|
|
08bff5d7df | ||
|
|
3cc437a17f | ||
|
|
c71a92302a | ||
|
|
6e5faa8cc1 | ||
|
|
b6db653f41 | ||
|
|
05fcb5397e | ||
|
|
18ae2f121a | ||
|
|
3536b01981 | ||
|
|
0b2bc922bb | ||
|
|
5226ee0343 | ||
|
|
af94f87196 | ||
|
|
743c8172e8 | ||
|
|
0816d14264 | ||
|
|
dde5bcbfe1 | ||
|
|
220e98b2cc | ||
|
|
337424cb96 | ||
|
|
a5c3a2fc79 | ||
|
|
642ad6f6f4 | ||
|
|
f592eb66a3 | ||
|
|
6297314c4a | ||
|
|
37bec05857 | ||
|
|
2b3886617e | ||
|
|
8c93d35ca9 | ||
|
|
f501eea00a | ||
|
|
13f7398761 | ||
|
|
d9c2111961 | ||
|
|
5bf206c933 | ||
|
|
26a0983860 | ||
|
|
c8add882f8 | ||
|
|
77a13d0f2b | ||
|
|
0b63dba86d | ||
|
|
376abd10a7 | ||
|
|
6239486361 | ||
|
|
a949a38bdf | ||
|
|
06f1085b89 | ||
|
|
708b05a9bd | ||
|
|
bc21d78217 | ||
|
|
2217d678e4 | ||
|
|
719922c7db | ||
|
|
6db3d92e2d | ||
|
|
3f65424d99 | ||
|
|
7cfc8f0269 | ||
|
|
bf788d4f6e | ||
|
|
d76b970d85 | ||
|
|
b7ac53b7ea | ||
|
|
a379f2d441 | ||
|
|
5c9cdd0524 | ||
|
|
2e5612697f | ||
|
|
921d3d0894 | ||
|
|
b76b467436 | ||
|
|
290c302352 | ||
|
|
8de8a156b8 | ||
|
|
1953b95732 | ||
|
|
b5b161e0d3 | ||
|
|
f8ead0093d | ||
|
|
a3d27c634e | ||
|
|
00f0b97ccb | ||
|
|
c342b4dd9a | ||
|
|
04b9d47a47 | ||
|
|
7aa7b4b6dd | ||
|
|
4baac981c2 | ||
|
|
c596c2768c | ||
|
|
50e97109b9 | ||
|
|
6970ea1ccc | ||
|
|
22d31661cb | ||
|
|
a61d8bae53 | ||
|
|
4fb542d5ee | ||
|
|
9a021e5687 | ||
|
|
168d302892 | ||
|
|
c98aed68da | ||
|
|
2cb7a5174b | ||
|
|
629d63f5e2 | ||
|
|
2bd894f53f | ||
|
|
63ed05fafb | ||
|
|
935473823a | ||
|
|
89ecbe34ed | ||
|
|
731a6e9587 | ||
|
|
a02454e2b4 | ||
|
|
082c376dde | ||
|
|
98cfc8a748 | ||
|
|
e8e405648f | ||
|
|
432318226e | ||
|
|
77c3385f93 | ||
|
|
36e45ecf68 | ||
|
|
a90096ab3c | ||
|
|
414717cebf | ||
|
|
b50a2125e4 | ||
|
|
e647f8405d | ||
|
|
613b374dcb | ||
|
|
2f28d5b327 | ||
|
|
5400eb0e32 | ||
|
|
34083c1798 | ||
|
|
eeb67d5e57 | ||
|
|
4d22814b95 | ||
|
|
c0fc922597 | ||
|
|
093cd0a050 | ||
|
|
a2caf2e971 | ||
|
|
a5fcf837bb | ||
|
|
0d152fafc7 | ||
|
|
5bba050403 | ||
|
|
b0264db0e6 | ||
|
|
e0497d9481 | ||
|
|
86d4706efc | ||
|
|
cf973847ab | ||
|
|
863fd2bdb5 | ||
|
|
8cbb637690 | ||
|
|
938fd98717 | ||
|
|
3030e0d874 | ||
|
|
88e3eb1d2c | ||
|
|
174214b096 | ||
|
|
aa5bf600ef | ||
|
|
a14f6e1455 | ||
|
|
849b0b2a27 | ||
|
|
b95ff07f61 | ||
|
|
ab3dcff023 | ||
|
|
b257672717 | ||
|
|
59a220ee51 | ||
|
|
ac3784c732 | ||
|
|
fde07c539b | ||
|
|
01c0ea13b9 | ||
|
|
d1fe9ca364 | ||
|
|
69197e6bf7 | ||
|
|
2c092997ba | ||
|
|
fab148d168 | ||
|
|
38af755e56 | ||
|
|
94f30ab40a | ||
|
|
4596a16a8c | ||
|
|
f478b5a688 | ||
|
|
47634f7f4e | ||
|
|
865dd9a2c7 | ||
|
|
4d81af640a | ||
|
|
ffbd3eb38a | ||
|
|
893f063ffa | ||
|
|
d3dccd3a8e | ||
|
|
aeb5e93548 | ||
|
|
998cf86d1a | ||
|
|
4248e6ee89 | ||
|
|
eba2bb33bb | ||
|
|
3d61dad2c7 | ||
|
|
14966a88c2 | ||
|
|
a44ea2c791 | ||
|
|
7ce1b0a6be | ||
|
|
d3d3242e0b | ||
|
|
44b3c6fb51 | ||
|
|
8a374e1963 | ||
|
|
51fdc2d920 | ||
|
|
f919e6eb43 | ||
|
|
0dfd010685 | ||
|
|
558e3ab493 | ||
|
|
105ddf93e0 | ||
|
|
a15be024a6 | ||
|
|
b10cf6e461 | ||
|
|
71d2102c4c | ||
|
|
eece42480a | ||
|
|
0e9de6e1bb | ||
|
|
178e0c4840 | ||
|
|
7232b0e48e | ||
|
|
732528ce85 | ||
|
|
7b71a1cf20 | ||
|
|
f9d45e05a9 | ||
|
|
1eafc96b35 | ||
|
|
7520a21b43 | ||
|
|
0e244c52e9 | ||
|
|
8fb48127fe | ||
|
|
39ff1921ec | ||
|
|
7c470dcd24 | ||
|
|
bd44e24398 | ||
|
|
96b8b8fd07 | ||
|
|
2a461e53b1 | ||
|
|
a1102599d7 | ||
|
|
8c491201df | ||
|
|
9139582ecd | ||
|
|
262f50cdeb | ||
|
|
177b5ea7ac | ||
|
|
7b3144b76a | ||
|
|
118877534d | ||
|
|
4566f2c172 | ||
|
|
62aa4ae53d | ||
|
|
b35b231d1a | ||
|
|
d981265f12 | ||
|
|
145a6636ca | ||
|
|
8192674948 | ||
|
|
1efef1fdcd | ||
|
|
5655568070 | ||
|
|
0ac08df532 | ||
|
|
26f3f320b8 | ||
|
|
cffbfc0f04 | ||
|
|
190769569c | ||
|
|
6c28f0e213 | ||
|
|
77ada220d5 | ||
|
|
a7872d4c33 | ||
|
|
c523711577 | ||
|
|
9a5d5a75ed | ||
|
|
f8a5ce44cf | ||
|
|
49e5e3b66e | ||
|
|
b315d80838 | ||
|
|
cebc8b77bf | ||
|
|
18055ce244 | ||
|
|
bdbb81cbd7 | ||
|
|
3e5eb9cf2d | ||
|
|
338f309f47 | ||
|
|
58d4000359 | ||
|
|
fb7b6ba7e5 | ||
|
|
5956c8cb84 | ||
|
|
75619befef | ||
|
|
1596269848 | ||
|
|
7737cdd4d5 | ||
|
|
4620b93752 | ||
|
|
0d7c5d898d | ||
|
|
a6a2c77416 | ||
|
|
4b4fc84d66 | ||
|
|
4ef725106c | ||
|
|
a1988aa18c | ||
|
|
0fc7c457bf | ||
|
|
16e219a629 | ||
|
|
36cbd21101 | ||
|
|
63ea8500b6 | ||
|
|
0ae4fc1113 | ||
|
|
661275c934 | ||
|
|
e392207c5a | ||
|
|
1529913ae4 | ||
|
|
be35cac6ae | ||
|
|
9c15dbd673 | ||
|
|
1301b37901 | ||
|
|
1fe3bfd0f3 | ||
|
|
c216c6d8ae | ||
|
|
8082eb2dec | ||
|
|
c56ee45397 | ||
|
|
2873856a63 | ||
|
|
49adfc9675 | ||
|
|
476de90ca7 | ||
|
|
5e0834b0c6 | ||
|
|
fcd04032f7 | ||
|
|
27295d69c3 | ||
|
|
e8dab58dec | ||
|
|
0fec47cbff | ||
|
|
3ada2df618 | ||
|
|
b8445347d9 | ||
|
|
844d394b14 | ||
|
|
0a888b0d0e | ||
|
|
e7ed58ea2b | ||
|
|
65241b1038 | ||
|
|
43f561ce11 | ||
|
|
e74d042dcf | ||
|
|
7bab771555 | ||
|
|
fb55312056 | ||
|
|
940c615458 | ||
|
|
e4cfebb044 | ||
|
|
cf443e8531 | ||
|
|
7f8c339c0f | ||
|
|
e78dc083e3 | ||
|
|
df69ebf90e | ||
|
|
f23b87c334 | ||
|
|
73a885a79e | ||
|
|
af544ab7c9 | ||
|
|
45e3aeaed4 | ||
|
|
d7b2272a20 | ||
|
|
9460291eef | ||
|
|
37f86a7622 | ||
|
|
593ebd3d6e | ||
|
|
c9788c31d3 | ||
|
|
21744c6880 | ||
|
|
c6cc92dbdf | ||
|
|
613425855d | ||
|
|
e2ee292e47 | ||
|
|
1f6e7e06da | ||
|
|
e8b3132e18 | ||
|
|
8d6aa28af4 | ||
|
|
1548ef0aa3 | ||
|
|
d1bf893b4f | ||
|
|
2fd2a3a6eb | ||
|
|
3a4103ac60 | ||
|
|
604d85f894 | ||
|
|
86a24ae44b | ||
|
|
4f926b3746 | ||
|
|
abcf7dfc97 | ||
|
|
6464f741e4 | ||
|
|
aab4ee2f30 | ||
|
|
845a2c63c9 | ||
|
|
b380f2d804 | ||
|
|
6a32606762 | ||
|
|
de2ef2033d | ||
|
|
e9d5380eba | ||
|
|
e9e9a69cec | ||
|
|
15b9cecfc6 | ||
|
|
665a8cab31 | ||
|
|
434468ca65 | ||
|
|
44c59f2236 | ||
|
|
81d12ce928 | ||
|
|
dd778d5c3a | ||
|
|
60ef249b5e | ||
|
|
9e687a34cc | ||
|
|
7889c429d9 | ||
|
|
1da3623c03 | ||
|
|
8ed76b4bd7 | ||
|
|
568e1b2923 | ||
|
|
bc92c2e8c4 | ||
|
|
3f63440b93 | ||
|
|
fca433f447 | ||
|
|
b166f2a469 | ||
|
|
0a9537ab07 | ||
|
|
08417f6f41 | ||
|
|
632e62e5e3 | ||
|
|
2146db9600 | ||
|
|
c93fa92c7d | ||
|
|
f594d594d3 | ||
|
|
c2bd6bcce8 | ||
|
|
8d84ccd2cc | ||
|
|
52875fb7fa | ||
|
|
119cf123fe | ||
|
|
b90d61dc15 | ||
|
|
40f35f0809 | ||
|
|
b9a8202762 | ||
|
|
ef17f7ba2c | ||
|
|
81bb511c07 | ||
|
|
400d21cdc5 | ||
|
|
7a31b57667 | ||
|
|
5fdea3ce2b | ||
|
|
e11d9f0e5c | ||
|
|
1cb1ef0fea | ||
|
|
fe5a3f9d5a | ||
|
|
29bb3df160 | ||
|
|
2773bf9888 | ||
|
|
1941cdf9cc | ||
|
|
edfced294a | ||
|
|
836f6dffd0 | ||
|
|
c437f4e2c1 | ||
|
|
6787279542 | ||
|
|
f123a17fcc | ||
|
|
a4ffe4e16c | ||
|
|
a145562535 | ||
|
|
f186441900 | ||
|
|
abdcf40aad | ||
|
|
e172219c2a | ||
|
|
4521711106 | ||
|
|
f81e249a47 | ||
|
|
369aef624f | ||
|
|
3925a92d84 | ||
|
|
27d09aab61 | ||
|
|
bfcdeb069f | ||
|
|
b1b3afa073 | ||
|
|
ef79553121 | ||
|
|
4d4cb59b80 | ||
|
|
20935af299 | ||
|
|
79d1c61494 | ||
|
|
5c40b84c8c | ||
|
|
415791dddd | ||
|
|
a5be15e453 | ||
|
|
9f34b82135 | ||
|
|
3d88ecdeed | ||
|
|
3a35c84b57 | ||
|
|
69310a2b72 | ||
|
|
8a512f6f19 | ||
|
|
8dab02a5e0 | ||
|
|
7217eea23e | ||
|
|
7120bf8d3b | ||
|
|
65718024e5 | ||
|
|
ef3c2b85f7 | ||
|
|
2ca4abcf11 | ||
|
|
07d02f3abe | ||
|
|
1ad2e62287 | ||
|
|
74c8e82e02 | ||
|
|
98062c24ff | ||
|
|
26b1dbd02b | ||
|
|
720e6b8fbd | ||
|
|
52d82b141f | ||
|
|
e6595a5e77 | ||
|
|
a478200549 | ||
|
|
faf79e4331 | ||
|
|
3d28ef1386 | ||
|
|
f188bc0d09 | ||
|
|
e003cd5276 | ||
|
|
e9c965ff7f | ||
|
|
afdfcdd465 | ||
|
|
ae8ccfe3a1 | ||
|
|
1e01f2a749 | ||
|
|
66adfb99b4 | ||
|
|
f59e21d20e | ||
|
|
d54c128ad6 | ||
|
|
689b48af78 | ||
|
|
c41dbf3f4c | ||
|
|
434842c22b | ||
|
|
be65031af4 | ||
|
|
537416190e | ||
|
|
47478f3899 | ||
|
|
d76d1f913a | ||
|
|
4bc78dba1e | ||
|
|
0cca2d5bda | ||
|
|
bc33e6fe66 | ||
|
|
40547088f6 | ||
|
|
ce8ab00a37 | ||
|
|
8fbbd15dbe | ||
|
|
3a805a7fcf | ||
|
|
a2f853fb76 | ||
|
|
8de42c3b25 | ||
|
|
534684a796 | ||
|
|
971f53c7bf | ||
|
|
4abe8ae005 | ||
|
|
55d6414497 | ||
|
|
ed9ccca134 | ||
|
|
1296f0fe23 | ||
|
|
5e2d8ef1e7 | ||
|
|
1a7a41e131 | ||
|
|
10335fbf16 | ||
|
|
f1243e3d5b | ||
|
|
d5214d616c | ||
|
|
5a167b05f0 | ||
|
|
302c09c4cb | ||
|
|
c4fc6856cd | ||
|
|
f1ec28c663 | ||
|
|
2d2f177773 | ||
|
|
2504a03211 | ||
|
|
467d03d0e5 | ||
|
|
d5581eb8b8 | ||
|
|
ca18648917 | ||
|
|
0eada14ea9 | ||
|
|
adaa1592f8 | ||
|
|
5bd0db2257 | ||
|
|
3d462c9948 | ||
|
|
39450d9e89 | ||
|
|
418213dbfc | ||
|
|
83cfe9fdb5 | ||
|
|
dbf7daa17e | ||
|
|
cab159921d | ||
|
|
421765c40d | ||
|
|
e8e5c4f023 | ||
|
|
f69d90276e | ||
|
|
20aaf3a319 | ||
|
|
e693541c88 | ||
|
|
e3ae63eb4a | ||
|
|
b5bf1beffa | ||
|
|
7d8fea286a | ||
|
|
7c4fefe672 | ||
|
|
238fa407d5 | ||
|
|
811218d30c | ||
|
|
46eed584fb | ||
|
|
1a25cccc0b | ||
|
|
2a3ebae4ae | ||
|
|
4acb6304df | ||
|
|
12fabb31f3 | ||
|
|
67d89a2558 | ||
|
|
8253edcf1a | ||
|
|
342242f6e4 | ||
|
|
2a9ebeb8dc | ||
|
|
5b3dccff52 | ||
|
|
24746c8395 | ||
|
|
8df67e8243 | ||
|
|
5df3078125 | ||
|
|
792e9717b2 | ||
|
|
7b0cffcf30 | ||
|
|
3e81a4e3fe | ||
|
|
8c4dbbfb90 | ||
|
|
55a2250efc | ||
|
|
4868fa3655 | ||
|
|
5370cbd7a1 | ||
|
|
5b69890cae | ||
|
|
815f440833 | ||
|
|
79e2b5a70b | ||
|
|
77de32a64f | ||
|
|
02cd3e66d8 | ||
|
|
3503d66773 | ||
|
|
46b902a802 | ||
|
|
fc5e0de386 | ||
|
|
3d480e950a | ||
|
|
998d27bd39 | ||
|
|
9c199161fe | ||
|
|
865fe23a64 | ||
|
|
7a8cd04447 | ||
|
|
340360d024 | ||
|
|
4cbe278bec | ||
|
|
acdc74969e | ||
|
|
95ac9a215c | ||
|
|
d3f6047d3b | ||
|
|
1776cfc3a8 | ||
|
|
c703c48d0f | ||
|
|
3b77fddade | ||
|
|
e83559e971 | ||
|
|
ed243ea56c | ||
|
|
f3fb9d884c | ||
|
|
027e39a081 | ||
|
|
6a6db1a4fc | ||
|
|
3de6687f4e | ||
|
|
c50642dd95 | ||
|
|
283b4f7d00 | ||
|
|
7906ea7c2e | ||
|
|
fa7035510b | ||
|
|
472db24705 | ||
|
|
abeba9384f | ||
|
|
a7c3f50a08 | ||
|
|
b010808618 | ||
|
|
07a4517079 | ||
|
|
b5caa2d6b0 | ||
|
|
175744c545 | ||
|
|
80fe42c741 | ||
|
|
a0aed33b3c | ||
|
|
9b9a17ba65 | ||
|
|
a4731e612e | ||
|
|
bdedb488e4 | ||
|
|
14989d0088 | ||
|
|
7925434603 | ||
|
|
537ae51750 | ||
|
|
4bcf729a80 | ||
|
|
de217eb9db | ||
|
|
16ac951eae | ||
|
|
a634423266 | ||
|
|
c2ce4ab43d | ||
|
|
80c224d43b | ||
|
|
f3921d130a | ||
|
|
63c1c13cd7 | ||
|
|
229ecfc6a2 | ||
|
|
dfd5940d51 | ||
|
|
d3d3a56d58 | ||
|
|
a7001ff6a2 | ||
|
|
a4c583361c | ||
|
|
fec6ff29d7 | ||
|
|
ca1e102949 | ||
|
|
403d914193 | ||
|
|
62520fb7fe | ||
|
|
53c880e9c0 | ||
|
|
badf89c660 | ||
|
|
5d7f916ee9 | ||
|
|
1f291853d6 | ||
|
|
a45ef44d0f | ||
|
|
96239aea0b | ||
|
|
4e7d213f19 | ||
|
|
8bdfb8a814 | ||
|
|
5cd4e0528a | ||
|
|
70a3b6f65a | ||
|
|
3af73b35b8 | ||
|
|
1d640ab9ce | ||
|
|
c2c4c63542 | ||
|
|
4ebd2ba5dc | ||
|
|
60f4ad7716 | ||
|
|
47594b2cd7 | ||
|
|
7911c7473a | ||
|
|
d75aa7e8dc | ||
|
|
b6cd004117 | ||
|
|
4cd901cf8e | ||
|
|
fe4d370f60 | ||
|
|
d774d8bbd0 | ||
|
|
f0103356ba | ||
|
|
dd38d1ca23 | ||
|
|
d6d45fe9cb | ||
|
|
9e24d08ab6 | ||
|
|
f0b9a8df5f | ||
|
|
e8a23f701a | ||
|
|
46e32154d7 | ||
|
|
359da4026f | ||
|
|
76786882ff | ||
|
|
d165dbdca4 | ||
|
|
791e8b02c3 | ||
|
|
53c61fe2d0 | ||
|
|
1eb73eb005 | ||
|
|
96c79a4404 | ||
|
|
26a8dcafce | ||
|
|
bb0575a35d | ||
|
|
99e29a586e | ||
|
|
d1af971d9a | ||
|
|
dc9c586dc8 | ||
|
|
f2486e7470 | ||
|
|
5364e2008c | ||
|
|
9b4b835c08 | ||
|
|
14d9b0dd31 | ||
|
|
51b376add2 | ||
|
|
aad7ddbc04 | ||
|
|
3007f1ba97 | ||
|
|
2b712baa50 | ||
|
|
b02d5b368d | ||
|
|
0e5b321e58 | ||
|
|
100bb00739 | ||
|
|
39c774625d | ||
|
|
49606adcf9 | ||
|
|
6324563acd | ||
|
|
1b5d39afcf | ||
|
|
21740b76e6 | ||
|
|
19e979769d | ||
|
|
0f0bea61d0 | ||
|
|
97ceaf221c | ||
|
|
4d0808efea | ||
|
|
efc287a3b9 | ||
|
|
2daef4e9bc | ||
|
|
6b2b8fd3c2 | ||
|
|
3780dbb2bb | ||
|
|
517fe05567 | ||
|
|
4f279c49c8 | ||
|
|
1ed1078979 | ||
|
|
46075cf317 | ||
|
|
87bdd06037 | ||
|
|
015487b800 | ||
|
|
95f5375288 | ||
|
|
5763bd5628 | ||
|
|
181a7e6f8e | ||
|
|
cac02fc2e8 | ||
|
|
f6315a5b46 | ||
|
|
5caeef134a | ||
|
|
b5dacced35 | ||
|
|
a42387948a | ||
|
|
a76dc6436f | ||
|
|
657900feb6 | ||
|
|
27f36ca508 | ||
|
|
bcb8696384 | ||
|
|
b4e72d56c7 | ||
|
|
8bd6bc4f60 | ||
|
|
0b20c34fb3 | ||
|
|
1cdb367081 | ||
|
|
c879a81a95 | ||
|
|
3c47f8c1a4 | ||
|
|
0f4b97daf8 | ||
|
|
a086cab252 | ||
|
|
11219a0073 | ||
|
|
4a609c81ee | ||
|
|
8d495051d7 | ||
|
|
734b8a2ddb | ||
|
|
a03a7d5ae9 | ||
|
|
e40ec7664e | ||
|
|
b9a0e7f3fa | ||
|
|
1001d4bd9d | ||
|
|
b33d39d475 | ||
|
|
5357402bf1 | ||
|
|
1539321521 | ||
|
|
addc8fc404 | ||
|
|
44c0601414 | ||
|
|
33c7dc29da | ||
|
|
756b0de34b | ||
|
|
b5ee605b30 | ||
|
|
a619ca4e72 | ||
|
|
b1fe39ccb0 | ||
|
|
3b7912e2d5 | ||
|
|
86e29c4579 | ||
|
|
0762ca8e4f | ||
|
|
974edf710c | ||
|
|
1c69656d2c | ||
|
|
bf1575e92b | ||
|
|
93c8ef0259 | ||
|
|
4c5ed4ce86 | ||
|
|
2fdc8e179e | ||
|
|
f5f06dbd3e | ||
|
|
f707da3601 | ||
|
|
e74851b289 | ||
|
|
356eb8a8b5 | ||
|
|
f7b7acc1d5 | ||
|
|
64ff1439b9 | ||
|
|
6147e207a1 | ||
|
|
b534da34ad | ||
|
|
c4f5962c7e | ||
|
|
330d9650c5 | ||
|
|
8e26910343 | ||
|
|
2add3944d3 | ||
|
|
6031ec2578 | ||
|
|
69ff5393ef | ||
|
|
fba0f67181 | ||
|
|
3998bddaca | ||
|
|
4645679d47 | ||
|
|
ead76e2486 | ||
|
|
e4f53b50fd | ||
|
|
931d291e65 | ||
|
|
230df2cec0 | ||
|
|
3a33d0cbc2 | ||
|
|
61911bdd28 | ||
|
|
bed4b87a54 | ||
|
|
3a37b35cee | ||
|
|
df7d568c2e | ||
|
|
d9e5a8224d | ||
|
|
69031f6da5 | ||
|
|
6089c449bf | ||
|
|
469fea321d | ||
|
|
85b7e6ad17 | ||
|
|
b47cbcb925 | ||
|
|
39b5362442 | ||
|
|
b5ba1c4e4f | ||
|
|
0f5790c5e6 | ||
|
|
1b6820664b | ||
|
|
2a872397f6 | ||
|
|
eff9ce8a70 | ||
|
|
a602d2d6a2 | ||
|
|
d878c7add7 | ||
|
|
3023032524 | ||
|
|
903d0cc021 | ||
|
|
11973e02e8 | ||
|
|
0f342270dc | ||
|
|
bc03a2885a | ||
|
|
0020cf7364 | ||
|
|
2af3070449 | ||
|
|
4727da6acf | ||
|
|
688936fd66 | ||
|
|
8c0103f83d | ||
|
|
8628f90592 | ||
|
|
fd90bb6c9b | ||
|
|
581212b8f7 | ||
|
|
351f84c6e6 | ||
|
|
cfbb4863c4 | ||
|
|
394e486ecb | ||
|
|
26459665c6 | ||
|
|
240268c7dd | ||
|
|
3ed0a4d794 | ||
|
|
c12e7821ec | ||
|
|
1388137158 | ||
|
|
3380970f6f | ||
|
|
2f7105f518 | ||
|
|
7c4b9536cd | ||
|
|
3e4995ae84 | ||
|
|
090aeed9f9 | ||
|
|
4a7b2d04c2 | ||
|
|
5556815d46 | ||
|
|
1baa00b4ff | ||
|
|
78d5323345 | ||
|
|
83396dec59 | ||
|
|
7248e65cba |
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"@babel/preset-env",
|
||||||
|
{
|
||||||
|
"useBuiltIns": "usage",
|
||||||
|
"corejs": 3,
|
||||||
|
"modules": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"lodash"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
parser: "vue-eslint-parser",
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'postcss.config.cjs', 'webpack.config.cjs', '*.js'],
|
||||||
|
overrides: [{
|
||||||
|
files: ['*.ts', '*.tsx', "*.vue"],
|
||||||
|
}],
|
||||||
|
plugins: [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
|
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:vue/vue3-essential",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
"sourceType": "module",
|
||||||
|
"project": "./tsconfig.json",
|
||||||
|
"ecmaVersion": 2021,
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
extraFileExtensions: ['.vue']
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-floating-promises': 'error',
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
'import/resolver': {
|
||||||
|
alias: {
|
||||||
|
map: [
|
||||||
|
['@', './hwe/ts'],
|
||||||
|
['@util', './hwe/ts/util'],
|
||||||
|
['@scss', './hwe/scss'],
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -4,8 +4,7 @@
|
|||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
|
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
|
||||||
# 체섭 ignore
|
# 체섭 ignore
|
||||||
*.log
|
*.log
|
||||||
@@ -18,25 +17,35 @@ sess_*
|
|||||||
*/logs/*/*.txt
|
*/logs/*/*.txt
|
||||||
*/logs/preserved
|
*/logs/preserved
|
||||||
err.txt
|
err.txt
|
||||||
che/.htaccess
|
|
||||||
kwe/.htaccess
|
|
||||||
pwe/.htaccess
|
|
||||||
twe/.htaccess
|
|
||||||
hwe/.htaccess
|
hwe/.htaccess
|
||||||
|
|
||||||
d_shared
|
d_shared
|
||||||
|
|
||||||
|
/d_pic
|
||||||
d_pic/*.jpg
|
d_pic/*.jpg
|
||||||
d_pic/*.gif
|
d_pic/*.gif
|
||||||
d_pic/*.png
|
d_pic/*.png
|
||||||
|
d_pic/*.webp
|
||||||
d_pic/uploaded_image
|
d_pic/uploaded_image
|
||||||
|
|
||||||
|
*/dist_misc/*
|
||||||
|
*/dist_js/*
|
||||||
|
*/dist_css/*
|
||||||
|
/dist_misc/*
|
||||||
|
/dist_js/*
|
||||||
|
/dist_css/*
|
||||||
|
|
||||||
d_setting/*.php
|
d_setting/*.php
|
||||||
*/d_setting/*.php
|
*/d_setting/*.php
|
||||||
|
*/d_setting/*.json
|
||||||
*/d_setting/templates/*.php
|
*/d_setting/templates/*.php
|
||||||
|
!*.orig.php
|
||||||
|
|
||||||
|
*/data/file_cache
|
||||||
|
|
||||||
**/old/*
|
**/old/*
|
||||||
test.php
|
test.*
|
||||||
|
|
||||||
/che
|
/che
|
||||||
/kwe
|
/kwe
|
||||||
@@ -45,6 +54,13 @@ test.php
|
|||||||
/pya
|
/pya
|
||||||
/twe
|
/twe
|
||||||
|
|
||||||
|
/hwe/data
|
||||||
|
|
||||||
|
/vendor
|
||||||
phpinfo.php
|
phpinfo.php
|
||||||
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
|
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
|
|
||||||
|
ingame/js/*
|
||||||
|
ingame/css/*
|
||||||
|
gateway/js/*
|
||||||
|
gateway/css/*
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"extension": ["ts"],
|
||||||
|
"spec": "hwe/test-ts/**/*.test.ts",
|
||||||
|
"require": [
|
||||||
|
"ts-node/register",
|
||||||
|
"tsconfig-paths/register"
|
||||||
|
],
|
||||||
|
"node-option": [
|
||||||
|
"experimental-specifier-resolution=node",
|
||||||
|
"loader=ts-node/esm"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -2,44 +2,145 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This configuration will be read and overlaid on top of the
|
* This configuration will be read and overlaid on top of the
|
||||||
* default configuration. Command line arguments will be applied
|
* default configuration. Command-line arguments will be applied
|
||||||
* after this file is read.
|
* after this file is read.
|
||||||
*/
|
*/
|
||||||
return [
|
return [
|
||||||
|
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`,
|
||||||
// Supported values: '7.0', '7.1', '7.2', null.
|
// `'7.4'`, `'8.0'`, `'8.1'`, `null`.
|
||||||
// If this is set to null,
|
// If this is set to `null`,
|
||||||
// then Phan assumes the PHP version which is closest to the minor version
|
// then Phan assumes the PHP version which is closest to the minor version
|
||||||
// of the php executable used to execute phan.
|
// of the php executable used to execute Phan.
|
||||||
"target_php_version" => '7.0',
|
//
|
||||||
'backward_compatibility_checks ' => false,
|
// Note that the **only** effect of choosing `'5.6'` is to infer
|
||||||
'ignore_undeclared_variables_in_global_scope' => false,
|
// that functions removed in php 7.0 exist.
|
||||||
'minimum_severity'=>\Phan\Issue::SEVERITY_LOW,
|
// (See `backward_compatibility_checks` for additional options)
|
||||||
|
"target_php_version" => '8.0',
|
||||||
|
'backward_compatibility_checks ' => true,
|
||||||
|
'minimum_severity' => \Phan\Issue::SEVERITY_NORMAL,
|
||||||
|
|
||||||
'file_list' => [
|
'file_list' => [
|
||||||
'f_config/config.php',
|
'f_config/config.php',
|
||||||
'hwe/MYDB.php',
|
'hwe/_119_b.php',
|
||||||
'hwe/lib.php',
|
'hwe/_119.php',
|
||||||
|
'hwe/a_bestGeneral.php',
|
||||||
|
'hwe/_admin1.php',
|
||||||
|
'hwe/_admin1_submit.php',
|
||||||
|
'hwe/_admin2.php',
|
||||||
|
'hwe/_admin2_submit.php',
|
||||||
|
'hwe/_admin4.php',
|
||||||
|
'hwe/_admin4_submit.php',
|
||||||
|
'hwe/_admin5.php',
|
||||||
|
'hwe/_admin5_submit.php',
|
||||||
|
'hwe/_admin7.php',
|
||||||
|
'hwe/_admin8.php',
|
||||||
|
'hwe/_admin_force_rehall.php',
|
||||||
|
'hwe/a_emperior_detail.php',
|
||||||
|
'hwe/a_emperior.php',
|
||||||
|
'hwe/a_genList.php',
|
||||||
|
'hwe/a_hallOfFame.php',
|
||||||
|
'hwe/a_history.php',
|
||||||
|
'hwe/a_kingdomList.php',
|
||||||
|
'hwe/a_npcList.php',
|
||||||
|
'hwe/api.php',
|
||||||
|
'hwe/a_status.php',
|
||||||
|
'hwe/a_traffic.php',
|
||||||
|
'hwe/a_vote.php',
|
||||||
|
'hwe/battle_simulator.php',
|
||||||
|
'hwe/b_auction.php',
|
||||||
|
'hwe/b_battleCenter.php',
|
||||||
|
'hwe/b_betting.php',
|
||||||
|
'hwe/v_chiefCenter.php',
|
||||||
|
'hwe/b_currentCity.php',
|
||||||
|
'hwe/v_nationStratFinan.php',
|
||||||
|
'hwe/b_diplomacy.php',
|
||||||
|
'hwe/b_genList.php',
|
||||||
|
'hwe/b_myBossInfo.php',
|
||||||
|
'hwe/b_myCityInfo.php',
|
||||||
|
'hwe/b_myGenInfo.php',
|
||||||
|
'hwe/b_myKingdomInfo.php',
|
||||||
|
'hwe/b_myPage.php',
|
||||||
|
'hwe/v_processing.php',
|
||||||
|
'hwe/b_tournament.php',
|
||||||
|
'hwe/b_troop.php',
|
||||||
|
'hwe/c_auction.php',
|
||||||
|
'hwe/c_tournament.php',
|
||||||
|
'hwe/c_vote.php',
|
||||||
'hwe/func_auction.php',
|
'hwe/func_auction.php',
|
||||||
'hwe/func_command.php',
|
'hwe/func_command.php',
|
||||||
'hwe/func_converter.php',
|
'hwe/func_converter.php',
|
||||||
'hwe/func_diplomacy.php',
|
|
||||||
'hwe/func_gamerule.php',
|
'hwe/func_gamerule.php',
|
||||||
'hwe/func_history.php',
|
'hwe/func_history.php',
|
||||||
'hwe/func_legacy.php',
|
'hwe/func_legacy.php',
|
||||||
'hwe/func_map.php',
|
'hwe/func_map.php',
|
||||||
'hwe/func_message.php',
|
'hwe/func_message.php',
|
||||||
'hwe/func_npc.php',
|
'hwe/func.php',
|
||||||
'hwe/func_process_chief.php',
|
|
||||||
'hwe/func_process_personnel.php',
|
|
||||||
'hwe/func_process_sabotage.php',
|
|
||||||
'hwe/func_process.php',
|
'hwe/func_process.php',
|
||||||
'hwe/func_string.php',
|
'hwe/func_string.php',
|
||||||
'hwe/func_template.php',
|
'hwe/func_template.php',
|
||||||
'hwe/func_time_event.php',
|
'hwe/func_time_event.php',
|
||||||
'hwe/func_tournament.php',
|
'hwe/func_tournament.php',
|
||||||
|
'hwe/index.php',
|
||||||
|
'hwe/install_db.php',
|
||||||
|
'hwe/install.php',
|
||||||
|
'hwe/j_adjust_icon.php',
|
||||||
|
'hwe/j_autoreset.php',
|
||||||
|
'hwe/j_basic_info.php',
|
||||||
|
'hwe/j_betting.php',
|
||||||
|
'hwe/j_board_article_add.php',
|
||||||
|
'hwe/j_board_comment_add.php',
|
||||||
|
'hwe/j_board_get_articles.php',
|
||||||
|
'hwe/j_die_immediately.php',
|
||||||
|
'hwe/j_diplomacy_destroy_letter.php',
|
||||||
|
'hwe/j_diplomacy_get_letter.php',
|
||||||
|
'hwe/j_diplomacy_respond_letter.php',
|
||||||
|
'hwe/j_diplomacy_rollback_letter.php',
|
||||||
|
'hwe/j_diplomacy_send_letter.php',
|
||||||
|
'hwe/j_export_simulator_object.php',
|
||||||
|
'hwe/j_general_log_old.php',
|
||||||
|
'hwe/j_general_set_permission.php',
|
||||||
|
'hwe/j_get_basic_general_list.php',
|
||||||
|
'hwe/j_get_city_list.php',
|
||||||
|
'hwe/j_get_general_list.php',
|
||||||
|
'hwe/j_get_nation_general_list.php',
|
||||||
|
'hwe/j_get_select_npc_token.php',
|
||||||
|
'hwe/j_get_select_pool.php',
|
||||||
|
'hwe/j_image_upload.php',
|
||||||
|
'hwe/j_install_db.php',
|
||||||
|
'hwe/j_install.php',
|
||||||
|
'hwe/j_load_scenarios.php',
|
||||||
|
'hwe/j_map_history.php',
|
||||||
|
'hwe/j_map.php',
|
||||||
|
'hwe/j_map_recent.php',
|
||||||
|
'hwe/j_msg_contact_list.php',
|
||||||
|
'hwe/j_msg_decide_opt.php',
|
||||||
|
'hwe/j_msg_delete.php',
|
||||||
|
'hwe/j_msg_get_old.php',
|
||||||
|
'hwe/j_msg_get_recent.php',
|
||||||
|
'hwe/j_msg_submit.php',
|
||||||
|
'hwe/j_myBossInfo.php',
|
||||||
|
'hwe/j_raise_event.php',
|
||||||
|
'hwe/j_select_npc.php',
|
||||||
|
'hwe/j_select_picked_general.php',
|
||||||
|
'hwe/j_server_basic_info.php',
|
||||||
|
'hwe/j_set_my_setting.php',
|
||||||
|
'hwe/j_set_npc_control.php',
|
||||||
|
'hwe/j_simulate_battle.php',
|
||||||
|
'hwe/j_troop.php',
|
||||||
|
'hwe/j_update_picked_general.php',
|
||||||
|
'hwe/j_vacation.php',
|
||||||
|
'hwe/lib.php',
|
||||||
'hwe/process_war.php',
|
'hwe/process_war.php',
|
||||||
'hwe/func.php'
|
'hwe/proc.php',
|
||||||
|
'hwe/readme.php',
|
||||||
|
'hwe/recent_map.php',
|
||||||
|
'hwe/select_general_from_pool.php',
|
||||||
|
'hwe/select_npc.php',
|
||||||
|
'hwe/t_diplomacy.php',
|
||||||
|
'hwe/v_board.php',
|
||||||
|
'hwe/v_inheritPoint.php',
|
||||||
|
'hwe/v_join.php',
|
||||||
|
'hwe/v_NPCControl.php',
|
||||||
],
|
],
|
||||||
|
|
||||||
// A list of directories that should be parsed for class and
|
// A list of directories that should be parsed for class and
|
||||||
@@ -74,6 +175,11 @@ return [
|
|||||||
'vendor/'
|
'vendor/'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'suppress_issue_types' => [
|
||||||
|
'PhanUnreferencedUseNormal',
|
||||||
|
'PhanTypeArraySuspiciousNullable',
|
||||||
|
],
|
||||||
|
|
||||||
// A list of plugin files to execute.
|
// A list of plugin files to execute.
|
||||||
// See https://github.com/phan/phan/tree/master/.phan/plugins for even more.
|
// See https://github.com/phan/phan/tree/master/.phan/plugins for even more.
|
||||||
// (Pass these in as relative paths.
|
// (Pass these in as relative paths.
|
||||||
|
|||||||
@@ -25,4 +25,8 @@
|
|||||||
"/pya":true,
|
"/pya":true,
|
||||||
"/twe":true,
|
"/twe":true,
|
||||||
},
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"josa",
|
||||||
|
"sammo"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>닫혀 있습니다.</title>
|
||||||
|
<script>
|
||||||
|
setTimeout(function(){
|
||||||
|
window.location.href = '../';
|
||||||
|
}, 5000);
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
html, body{
|
||||||
|
background-color:black;
|
||||||
|
color:yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
서버가 닫혀있습니다.<br>
|
||||||
|
잠시 뒤에 입구로 이동합니다.
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
The MIT License
|
The MIT License
|
||||||
|
|
||||||
Copyright (c) 2018 Hide_D, 62che
|
Copyright (c) 2022 Hide_D, 62che
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -5,36 +5,44 @@
|
|||||||
|
|
||||||
## 요구사항
|
## 요구사항
|
||||||
|
|
||||||
* Apache2
|
* Apache2 또는 nginx
|
||||||
* <code>mpm_event</code> 권장
|
* Apache2인 경우 `mpm_event` 권장
|
||||||
* PHP 7.2 이상
|
* PHP 8.0 이상
|
||||||
* <code>php-fpm</code> 권장
|
* `php-fpm` 권장
|
||||||
* php에서 curl, pdo-sqlite을 실행가능해야 합니다. (기본값: 지원)
|
* php에서 curl, pdo-sqlite을 실행가능해야 합니다.
|
||||||
* mysqlnd가 지원되어야합니다. (기본값: 지원)
|
* mysqli, mysqlnd
|
||||||
|
* gd
|
||||||
|
* mbstring
|
||||||
|
* NodeJS 14 이상
|
||||||
|
* 내부의 git을 통해 upgrade 때 `webpack build` 용도로 필요합니다.
|
||||||
* MariaDB 10.2.1 이상
|
* MariaDB 10.2.1 이상
|
||||||
* MySQL 5.6 이상도 가능하도록 할 예정입니다.
|
* 현재 MySQL은 지원하지 않습니다.
|
||||||
* <code>git</code>
|
* `git`
|
||||||
* <code>curl</code>
|
* `curl`
|
||||||
|
|
||||||
Linux는 Ubuntu 16.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
|
Linux는 Ubuntu 18.04, 20.04, Windows는 WSL2를 사용한 환경에서 테스트되었습니다.
|
||||||
|
|
||||||
Docker를 이용한 설치는 계획중입니다.
|
Docker를 이용한 설치도 제공하고 있습니다.
|
||||||
|
|
||||||
## 설치
|
## Docker를 이용한 설치
|
||||||
|
|
||||||
|
https://storage.hided.net/gitea/devsam/docker 를 참고해 주세요.
|
||||||
|
|
||||||
|
## 수동 설치
|
||||||
|
|
||||||
본 게임은 <code>git</code>을 이용한 업그레이드 시스템을 구현하였으므로, <code>git</code>이 필요합니다.
|
본 게임은 <code>git</code>을 이용한 업그레이드 시스템을 구현하였으므로, <code>git</code>이 필요합니다.
|
||||||
또한 웹 서비스 데몬을 운영중인 사용자(일반적으로 <code>www-data</code>, <code>apache</code>)에게 디렉토리 권한이 주어져야합니다.
|
또한 웹 서비스 데몬을 운영중인 사용자(일반적으로 <code>www-data</code>)에게 디렉토리 권한이 주어져야합니다.
|
||||||
|
|
||||||
### 다운로드
|
### 다운로드
|
||||||
|
|
||||||
웹 데몬 user가 <code>www-data</code>인 경우 다음과 같이 입력하여 최신 배포버전과 이미지 파일을 얻을 수 있습니다.
|
웹 데몬 user가 <code>www-data</code>인 경우 다음과 같이 입력하여 최신 배포버전과 이미지 파일을 얻을 수 있습니다.
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo -u www-data git clone ssh://git@storage.hided.net:2525/devsam/core.git
|
sudo -u www-data git clone https://storage.hided.net/gitea/devsam/core.git
|
||||||
git clone ssh://git@storage.hided.net:2525/devsam/image.git
|
sudo -u www-data git clone https://storage.hided.net/gitea/devsam/image.git
|
||||||
```
|
```
|
||||||
|
|
||||||
> 이미지는 git hook을 이용한 업데이트 기능을 제공하지만 아직 범용성 있는 설계가 되어있진 않습니다.
|
> 이미지는 hook/git_hook.php을 통해 동기화되며, 서버 설치 과정에 이미지 갱신 키를 지정하는 것으로 '훼' 서버 업데이트 시 동기화됩니다. 이미지 서버가 게임 서버와 별개여도 동작하나, php와 git을 지원해야합니다.
|
||||||
|
|
||||||
### 설치
|
### 설치
|
||||||
|
|
||||||
@@ -47,9 +55,9 @@ Database 수는 로그인 관리 서버 1개, 내부 서버 7개로, 총 8개의
|
|||||||
|
|
||||||
## 카카오로그인 연동
|
## 카카오로그인 연동
|
||||||
|
|
||||||
현재 카카오로그인 API KEY를 입력하는 작업이 설치과정에 추가되어있지 않습니다.
|
서버 설치 시 카카오 로그인 연동을 위한 API KEY를 입력받습니다.
|
||||||
|
|
||||||
설치 후 <code>d_setting/KakaoKey.php</code>에서 API키를 입력해야 합니다.
|
만약 설치 이후 API KEY를 변경하고자 하는 경우 <code>d_setting/KakaoKey.php</code>에서 API키를 변경해야 합니다.
|
||||||
|
|
||||||
|
|
||||||
## 라이선스
|
## 라이선스
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
require(__DIR__ . '/vendor/autoload.php');
|
||||||
|
|
||||||
|
|
||||||
|
if (!class_exists('\\sammo\\RootDB')) {
|
||||||
|
Json::dieWithReason('No DB');
|
||||||
|
}
|
||||||
|
|
||||||
|
APIHelper::launch(dirname(__FILE__), $_GET['path']??null);
|
||||||
@@ -6,12 +6,16 @@
|
|||||||
"GPL-2.0-or-later",
|
"GPL-2.0-or-later",
|
||||||
"proprietary"
|
"proprietary"
|
||||||
],
|
],
|
||||||
|
"config": {
|
||||||
|
"platform": {
|
||||||
|
"php": "8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"brandonwamboldt/utilphp": "^1.1",
|
"brandonwamboldt/utilphp": "^1.1",
|
||||||
"sergeytsalkov/meekrodb": "^2.3",
|
"sergeytsalkov/meekrodb": "^2.3",
|
||||||
"league/plates": "^3.3",
|
"league/plates": "^3.3",
|
||||||
"guzzlehttp/guzzle": "^6.3",
|
"guzzlehttp/guzzle": "^6.3",
|
||||||
"leafo/scssphp": "^0.7.5",
|
|
||||||
"monolog/monolog": "^1.23",
|
"monolog/monolog": "^1.23",
|
||||||
"firephp/firephp-core": "^0.4.0",
|
"firephp/firephp-core": "^0.4.0",
|
||||||
"vlucas/valitron": "^1.4",
|
"vlucas/valitron": "^1.4",
|
||||||
@@ -20,26 +24,33 @@
|
|||||||
"symfony/lock": "^4.1",
|
"symfony/lock": "^4.1",
|
||||||
"ezyang/htmlpurifier": "^4.10",
|
"ezyang/htmlpurifier": "^4.10",
|
||||||
"xemlock/htmlpurifier-html5": "^0.1.7",
|
"xemlock/htmlpurifier-html5": "^0.1.7",
|
||||||
"catfan/medoo": "^1.5"
|
"catfan/medoo": "^1.5",
|
||||||
|
"phan/phan": "*",
|
||||||
|
"erusev/parsedown-extra": "^0.8.1",
|
||||||
|
"nette/caching": "^3.0",
|
||||||
|
"illuminate/database": "^8.61",
|
||||||
|
"illuminate/events": "^8.61",
|
||||||
|
"spatie/data-transfer-object": "^3.7"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"sammo\\": [
|
"sammo\\": [
|
||||||
|
"d_setting",
|
||||||
"src/sammo"
|
"src/sammo"
|
||||||
],
|
],
|
||||||
"kakao\\": [
|
"kakao\\": [
|
||||||
|
"d_setting",
|
||||||
"src/kakao"
|
"src/kakao"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"classmap": [
|
|
||||||
"d_setting/"
|
|
||||||
],
|
|
||||||
"exclude-from-classmap": [
|
"exclude-from-classmap": [
|
||||||
"**/*.orig.php"
|
"**/*.orig.php"
|
||||||
],
|
],
|
||||||
"files":[
|
"files":[
|
||||||
"f_config/config.php"
|
"f_config/config.php"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.5"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,45 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
color:white; background-color:black; font-family: '맑은 고딕';
|
color: white;
|
||||||
|
background-color: black;
|
||||||
|
font-family: 'Pretendard';
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
border: solid 1px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-top-color: gray;
|
||||||
|
border-left-color: gray;
|
||||||
|
border-right-color: black;
|
||||||
|
border-bottom-color: black;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕';
|
|
||||||
}
|
}
|
||||||
th, td {
|
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
th,
|
||||||
|
td {
|
||||||
|
border: solid 1px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-top-color: gray;
|
||||||
|
border-left-color: gray;
|
||||||
|
border-right-color: black;
|
||||||
|
border-bottom-color: black;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.just_link {
|
a.just_link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.with_border{
|
.with_border {
|
||||||
margin:0;
|
margin: 0;
|
||||||
border: solid 1px;
|
border: solid 1px;
|
||||||
border-spacing: 0px;
|
border-spacing: 0px;
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
@@ -37,69 +50,91 @@ a.just_link {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.section_title {
|
.section_title {
|
||||||
height:50px;
|
height: 50px;
|
||||||
line-height:50px;
|
line-height: 50px;
|
||||||
font-size: 30px; font-weight: bold;
|
font-size: 30px;
|
||||||
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color:white;
|
color: white;
|
||||||
padding:0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legacy_layout div {
|
.legacy_layout div {
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
border: solid 1px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-top-color: gray;
|
||||||
|
border-left-color: gray;
|
||||||
|
border-right-color: black;
|
||||||
|
border-bottom-color: black;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕';;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.obj_fill{
|
.obj_fill {
|
||||||
display:block;
|
display: block;
|
||||||
width:100%;
|
width: 100%;
|
||||||
height:100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.with_skin {
|
button.with_skin {
|
||||||
padding:0 4px;
|
padding: 0 4px;
|
||||||
background-color: black; color: white;
|
background-color: black;
|
||||||
font-family: '맑은 고딕';
|
color: white;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.with_skin:disabled {
|
button.with_skin:disabled {
|
||||||
background-color:#333333;
|
background-color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.with_skin {
|
input.with_skin {
|
||||||
background-color: black; color: white;
|
background-color: black;
|
||||||
font-family: '맑은 고딕';
|
color: white;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.with_skin:disabled {
|
input.with_skin:disabled {
|
||||||
background-color: #333333;
|
background-color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font0 { font-size: 10px; }
|
.font0 {
|
||||||
.font1 { font-size: 13px; }
|
font-size: 10px;
|
||||||
.font2 { font-size: 15px; }
|
|
||||||
.font3 { font-size: 20px; }
|
|
||||||
.font4 { font-size: 30px; }
|
|
||||||
.font5 { font-size: 50px; }
|
|
||||||
|
|
||||||
caption.section_title {
|
|
||||||
caption-side:top;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.font1 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.samButton{
|
.font2 {
|
||||||
float:left;
|
font-size: 15px;
|
||||||
display:block;
|
}
|
||||||
padding:0;
|
|
||||||
margin:0;
|
.font3 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font4 {
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font5 {
|
||||||
|
font-size: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption.section_title {
|
||||||
|
caption-side: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samButton {
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
position:relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.samButton.disabled {
|
a.samButton.disabled {
|
||||||
@@ -107,24 +142,23 @@ a.samButton.disabled {
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samButtonOuter{
|
.samButtonOuter {
|
||||||
display: table;
|
display: table;
|
||||||
border: outset 2px white;
|
border: outset 2px white;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-weight:bold;
|
font-weight: bold;
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
width:125px;
|
width: 125px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
background-color:#000000;
|
background-color: #000000;
|
||||||
color:#ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samButtonOuter:active{
|
.samButtonOuter:active {
|
||||||
border: inset 2px white;
|
border: inset 2px white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.samButtonInner {
|
||||||
.samButtonInner{
|
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -133,39 +167,69 @@ a.samButton.disabled {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samToolbarButton > .samButtonOuter{
|
.samToolbarButton>.samButtonOuter {
|
||||||
width:125px;
|
width: 125px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
background-color:#225500;
|
background-color: #225500;
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samToolbarButton2 > .samButtonOuter{
|
.samToolbarButton2>.samButtonOuter {
|
||||||
width:125px;
|
width: 125px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
background-color:#225500;
|
background-color: #225500;
|
||||||
color:magenta;
|
color: magenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton > .samButtonOuter{
|
.samCommandButton>.samButtonOuter {
|
||||||
width:111px;
|
width: 111px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton.disabled > .samButtonOuter{
|
.samCommandButton.disabled>.samButtonOuter {
|
||||||
background-color:transparent !important;
|
background-color: transparent !important;
|
||||||
color:gray !important;
|
color: gray !important;
|
||||||
border-color:transparent !important;
|
border-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::before{
|
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::before {
|
||||||
content:'【'
|
content: '【'
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
|
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::after {
|
||||||
content:'】'
|
content: '】'
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip_copyable_info .tooltiptext {
|
||||||
|
display: inline;
|
||||||
|
color: rgba(0, 0, 0, 0);
|
||||||
|
font-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltiptext {
|
.tooltiptext {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden_but_copyable {
|
||||||
|
color: rgba(0, 0, 0, 0);
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical_flex {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical_flex .item {
|
||||||
|
display: block;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fill_box {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
@@ -1,141 +1,156 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
body {
|
||||||
body{
|
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_notice {
|
#server_notice {
|
||||||
margin:10px 0;
|
margin: 10px 0;
|
||||||
border: none;
|
border: none;
|
||||||
text-align:center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list_container{
|
#server_list_container {
|
||||||
width:800px;
|
width: 800px;
|
||||||
position:absolute;
|
position: absolute;
|
||||||
left:50%;
|
left: 50%;
|
||||||
margin-left:-400px;
|
margin-left: -400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list_table{
|
#server_list_table {
|
||||||
width:100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list tr{
|
#server_list tr {
|
||||||
height:66px;
|
height: 66px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list .server_create_and_select .general_create,
|
.ignore_border {
|
||||||
#server_list .server_create_and_select .general_select {
|
border: 0;
|
||||||
width: 120px; height: 33px;
|
margin: 0;
|
||||||
float: left;
|
padding: 0;
|
||||||
}
|
|
||||||
|
|
||||||
#server_list .general_create,
|
|
||||||
#server_list .general_login {
|
|
||||||
width: 120px; height: 66px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ignore_border{
|
|
||||||
border:0;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#user_info {
|
#user_info {
|
||||||
margin-top:20px;
|
margin-top: 20px;
|
||||||
width: 800px; height: 130px;
|
width: 800px;
|
||||||
|
height: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#user_info button {
|
||||||
#user_info button{
|
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
margin: 10px 50px;
|
margin: 10px 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.center_ordered_items{
|
.center_ordered_items {
|
||||||
text-align:center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerList {
|
.Entrance_ServerList {
|
||||||
width: 800px; height: 64px;
|
width: 800px;
|
||||||
|
height: 64px;
|
||||||
border: none;
|
border: none;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListServer {
|
.Entrance_ServerListServer {
|
||||||
width: 98px; height: 64px;
|
width: 98px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListDown {
|
.Entrance_ServerListDown {
|
||||||
width: 698px; height: 64px;
|
width: 698px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListInfo {
|
.Entrance_ServerListInfo {
|
||||||
width: 398px; height: 64px;
|
width: 398px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListBlock {
|
.Entrance_ServerListBlock {
|
||||||
width: 298px; height: 64px;
|
width: 298px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
line-height: 64px;
|
line-height: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListCharacter {
|
.Entrance_ServerListCharacter {
|
||||||
width: 64px; height: 64px;
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListName {
|
.Entrance_ServerListName {
|
||||||
width: 112px; height: 64px;
|
width: 112px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
line-height: 64px;
|
line-height: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.Entrance_ServerListSelect {
|
.Entrance_ServerListSelect {
|
||||||
width: 120px; height: 32px;
|
width: 120px;
|
||||||
|
height: 32px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Entrance_000003 {
|
#Entrance_000003 {
|
||||||
width: 798px; height: 155px;
|
width: 798px;
|
||||||
|
height: 155px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Alert {
|
.Entrance_Alert {
|
||||||
color: red; font-size: 15px; font-weight: bold;
|
color: red;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Che {
|
.Entrance_Che {
|
||||||
color: white; font-size: 15px; font-weight: bold;
|
color: white;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Kwe {
|
.Entrance_Kwe {
|
||||||
color: yellow; font-size: 15px; font-weight: bold;
|
color: yellow;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Pwe {
|
.Entrance_Pwe {
|
||||||
color: orange; font-size: 15px; font-weight: bold;
|
color: orange;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Twe {
|
.Entrance_Twe {
|
||||||
color: magenta; font-size: 15px; font-weight: bold;
|
color: magenta;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Nya {
|
.Entrance_Nya {
|
||||||
color: #e67e22; font-size: 15px; font-weight: bold;
|
color: #e67e22;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Pya {
|
.Entrance_Pya {
|
||||||
color: #9b59b6; font-size: 15px; font-weight: bold;
|
color: #9b59b6;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Hwe {
|
.Entrance_Hwe {
|
||||||
color: red; font-size: 15px; font-weight: bold;
|
color: red;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BtnPlate {
|
||||||
|
height: inherit;
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@ body, html{
|
|||||||
|
|
||||||
h1.title {
|
h1.title {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
font-family: 'Passion One', cursive;
|
font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic';
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
h1.title {
|
h1.title {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
font-family: 'Passion One', cursive;
|
font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic';
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,131 +0,0 @@
|
|||||||
body, html{
|
|
||||||
height: 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main{
|
|
||||||
margin-top: 70px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1.title {
|
|
||||||
font-size: 50px;
|
|
||||||
font-family: 'Passion One', cursive;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr{
|
|
||||||
width: 10%;
|
|
||||||
/*color: #fff;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group{
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
label{
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input,
|
|
||||||
input::-webkit-input-placeholder {
|
|
||||||
font-size: 11px;
|
|
||||||
padding-top: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-login{
|
|
||||||
/*background-color: #fff;*/
|
|
||||||
/* shadows and rounded borders */
|
|
||||||
-moz-border-radius: 2px;
|
|
||||||
-webkit-border-radius: 2px;
|
|
||||||
border-radius: 2px;
|
|
||||||
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
|
||||||
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
|
||||||
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-center{
|
|
||||||
margin-top: 30px;
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 330px;
|
|
||||||
padding: 40px 40px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.login_btn_group{
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-register{
|
|
||||||
font-size: 11px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.col-form-label{
|
|
||||||
text-align:center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.terms{
|
|
||||||
max-height: 200px; overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.terms pre{
|
|
||||||
width:100%;
|
|
||||||
white-space: pre-wrap; /* Since CSS 2.1 */
|
|
||||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
|
||||||
white-space: -pre-wrap; /* Opera 4-6 */
|
|
||||||
white-space: -o-pre-wrap; /* Opera 7 */
|
|
||||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
|
||||||
}
|
|
||||||
|
|
||||||
.vertical-center {
|
|
||||||
min-height: 100%; /* Fallback for browsers do NOT support vh unit */
|
|
||||||
min-height: 100vh; /* These two lines are counted as one :-) */
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.full-content {
|
|
||||||
position:fixed;
|
|
||||||
left:0;
|
|
||||||
top:0;
|
|
||||||
width:100%;
|
|
||||||
height:100%;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
z-index:800;
|
|
||||||
}
|
|
||||||
|
|
||||||
#login_card{
|
|
||||||
z-index:801;
|
|
||||||
}
|
|
||||||
|
|
||||||
#btn_kakao_login{
|
|
||||||
cursor: pointer;
|
|
||||||
height:46px;
|
|
||||||
width:116px;
|
|
||||||
background-color: transparent;
|
|
||||||
color:transparent;
|
|
||||||
border:0;
|
|
||||||
background-size: 100%; /* To fill the dimensions of container (button), or */
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: bottom center;
|
|
||||||
margin-top:5px;
|
|
||||||
background-image:url('../oauth_kakao/kakao_login_join.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
#btn_kakao_login:hover {
|
|
||||||
background-image:url('../oauth_kakao/kakao_login_join_ov.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
#bottom_box{
|
|
||||||
position:fixed;
|
|
||||||
bottom:0;
|
|
||||||
width:100%;
|
|
||||||
left:0;
|
|
||||||
}
|
|
||||||
#bottom_box .container{
|
|
||||||
text-align:center;
|
|
||||||
}
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
//download.js v3.0, by dandavis; 2008-2014. [CCBY2] see http://danml.com/download.html for tests/usage
|
|
||||||
// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
|
|
||||||
// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs
|
|
||||||
// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support
|
|
||||||
|
|
||||||
// data can be a string, Blob, File, or dataURL
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function download(data, strFileName, strMimeType) {
|
|
||||||
|
|
||||||
var self = window, // this script is only for browsers anyway...
|
|
||||||
u = "application/octet-stream", // this default mime also triggers iframe downloads
|
|
||||||
m = strMimeType || u,
|
|
||||||
x = data,
|
|
||||||
D = document,
|
|
||||||
a = D.createElement("a"),
|
|
||||||
z = function(a){return String(a);},
|
|
||||||
|
|
||||||
|
|
||||||
B = self.Blob || self.MozBlob || self.WebKitBlob || z,
|
|
||||||
BB = self.MSBlobBuilder || self.WebKitBlobBuilder || self.BlobBuilder,
|
|
||||||
fn = strFileName || "download",
|
|
||||||
blob,
|
|
||||||
b,
|
|
||||||
ua,
|
|
||||||
fr;
|
|
||||||
|
|
||||||
//if(typeof B.bind === 'function' ){ B=B.bind(self); }
|
|
||||||
|
|
||||||
if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
|
|
||||||
x=[x, m];
|
|
||||||
m=x[0];
|
|
||||||
x=x[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//go ahead and download dataURLs right away
|
|
||||||
if(String(x).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/)){
|
|
||||||
return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:
|
|
||||||
navigator.msSaveBlob(d2b(x), fn) :
|
|
||||||
saver(x) ; // everyone else can save dataURLs un-processed
|
|
||||||
}//end if dataURL passed?
|
|
||||||
|
|
||||||
try{
|
|
||||||
|
|
||||||
blob = x instanceof B ?
|
|
||||||
x :
|
|
||||||
new B([x], {type: m}) ;
|
|
||||||
}catch(y){
|
|
||||||
if(BB){
|
|
||||||
b = new BB();
|
|
||||||
b.append([x]);
|
|
||||||
blob = b.getBlob(m); // the blob
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function d2b(u) {
|
|
||||||
var p= u.split(/[:;,]/),
|
|
||||||
t= p[1],
|
|
||||||
dec= p[2] == "base64" ? atob : decodeURIComponent,
|
|
||||||
bin= dec(p.pop()),
|
|
||||||
mx= bin.length,
|
|
||||||
i= 0,
|
|
||||||
uia= new Uint8Array(mx);
|
|
||||||
|
|
||||||
for(i;i<mx;++i) uia[i]= bin.charCodeAt(i);
|
|
||||||
|
|
||||||
return new B([uia], {type: t});
|
|
||||||
}
|
|
||||||
|
|
||||||
function saver(url, winMode){
|
|
||||||
|
|
||||||
|
|
||||||
if ('download' in a) { //html5 A[download]
|
|
||||||
a.href = url;
|
|
||||||
a.setAttribute("download", fn);
|
|
||||||
a.innerHTML = "downloading...";
|
|
||||||
D.body.appendChild(a);
|
|
||||||
setTimeout(function() {
|
|
||||||
a.click();
|
|
||||||
D.body.removeChild(a);
|
|
||||||
if(winMode===true){setTimeout(function(){ self.URL.revokeObjectURL(a.href);}, 250 );}
|
|
||||||
}, 66);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//do iframe dataURL download (old ch+FF):
|
|
||||||
var f = D.createElement("iframe");
|
|
||||||
D.body.appendChild(f);
|
|
||||||
if(!winMode){ // force a mime that will download:
|
|
||||||
url="data:"+url.replace(/^data:([\w\/\-\+]+)/, u);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
f.src = url;
|
|
||||||
setTimeout(function(){ D.body.removeChild(f); }, 333);
|
|
||||||
|
|
||||||
}//end saver
|
|
||||||
|
|
||||||
|
|
||||||
if (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)
|
|
||||||
return navigator.msSaveBlob(blob, fn);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(self.URL){ // simple fast and modern way using Blob and URL:
|
|
||||||
saver(self.URL.createObjectURL(blob), true);
|
|
||||||
}else{
|
|
||||||
// handle non-Blob()+non-URL browsers:
|
|
||||||
if(typeof blob === "string" || blob.constructor===z ){
|
|
||||||
try{
|
|
||||||
return saver( "data:" + m + ";base64," + self.btoa(blob) );
|
|
||||||
}catch(y){
|
|
||||||
return saver( "data:" + m + "," + encodeURIComponent(blob) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Blob but not URL:
|
|
||||||
fr=new FileReader();
|
|
||||||
fr.onload=function(e){
|
|
||||||
saver(this.result);
|
|
||||||
};
|
|
||||||
fr.readAsDataURL(blob);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} /* end download() */
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 341 B |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 386 B |
|
Before Width: | Height: | Size: 346 B |
|
Before Width: | Height: | Size: 396 B |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
@@ -1,152 +0,0 @@
|
|||||||
/*
|
|
||||||
jQuery Redirect v1.1.1
|
|
||||||
|
|
||||||
Copyright (c) 2013-2017 Miguel Galante
|
|
||||||
Copyright (c) 2011-2013 Nemanja Avramovic, www.avramovic.info
|
|
||||||
|
|
||||||
Licensed under CC BY-SA 4.0 License: http://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
This means everyone is allowed to:
|
|
||||||
|
|
||||||
Share - copy and redistribute the material in any medium or format
|
|
||||||
Adapt - remix, transform, and build upon the material for any purpose, even commercially.
|
|
||||||
Under following conditions:
|
|
||||||
|
|
||||||
Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
|
|
||||||
ShareAlike - If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
|
|
||||||
|
|
||||||
*/
|
|
||||||
(function ($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* jQuery Redirect
|
|
||||||
* @param {string} url - Url of the redirection
|
|
||||||
* @param {Object} values - (optional) An object with the data to send. If not present will look for values as QueryString in the target url.
|
|
||||||
* @param {string} method - (optional) The HTTP verb can be GET or POST (defaults to POST)
|
|
||||||
* @param {string} target - (optional) The target of the form. "_blank" will open the url in a new window.
|
|
||||||
* @param {boolean} traditional - (optional) This provides the same function as jquery's ajax function. The brackets are omitted on the field name if its an array. This allows arrays to work with MVC.net among others.
|
|
||||||
* @param {boolean} redirectTop - (optional) If its called from a iframe, force to navigate the top window.
|
|
||||||
*/
|
|
||||||
$.redirect = function (url, values, method, target, traditional, redirectTop) {
|
|
||||||
redirectTop = redirectTop || false;
|
|
||||||
var generatedForm = $.redirect.getForm(url, values, method, target, traditional);
|
|
||||||
$('body', redirectTop ? window.top.document : undefined).append(generatedForm.form);
|
|
||||||
generatedForm.submit();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
$.redirect.getForm = function (url, values, method, target, traditional) {
|
|
||||||
method = (method && ["GET", "POST", "PUT", "DELETE"].indexOf(method.toUpperCase()) !== -1) ? method.toUpperCase() : 'POST';
|
|
||||||
|
|
||||||
url = url.split("#");
|
|
||||||
var hash = url[1] ? ("#" + url[1]) : "";
|
|
||||||
url = url[0];
|
|
||||||
|
|
||||||
if (!values) {
|
|
||||||
var obj = $.parseUrl(url);
|
|
||||||
url = obj.url;
|
|
||||||
values = obj.params;
|
|
||||||
}
|
|
||||||
|
|
||||||
values = removeNulls(values);
|
|
||||||
|
|
||||||
var form = $('<form>')
|
|
||||||
.attr("method", method)
|
|
||||||
.attr("action", url + hash);
|
|
||||||
|
|
||||||
|
|
||||||
if (target) {
|
|
||||||
form.attr("target", target);
|
|
||||||
}
|
|
||||||
|
|
||||||
var submit = form[0].submit;
|
|
||||||
iterateValues(values, [], form, null, traditional);
|
|
||||||
|
|
||||||
return { form: form, submit: function () { submit.call(form[0]); } };
|
|
||||||
}
|
|
||||||
//Utility Functions
|
|
||||||
/**
|
|
||||||
* Url and QueryString Parser.
|
|
||||||
* @param {string} url - a Url to parse.
|
|
||||||
* @returns {object} an object with the parsed url with the following structure {url: URL, params:{ KEY: VALUE }}
|
|
||||||
*/
|
|
||||||
$.parseUrl = function (url) {
|
|
||||||
|
|
||||||
if (url.indexOf('?') === -1) {
|
|
||||||
return {
|
|
||||||
url: url,
|
|
||||||
params: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var parts = url.split('?'),
|
|
||||||
query_string = parts[1],
|
|
||||||
elems = query_string.split('&');
|
|
||||||
url = parts[0];
|
|
||||||
|
|
||||||
var i, pair, obj = {};
|
|
||||||
for (i = 0; i < elems.length; i += 1) {
|
|
||||||
pair = elems[i].split('=');
|
|
||||||
obj[pair[0]] = pair[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
url: url,
|
|
||||||
params: obj
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//Private Functions
|
|
||||||
var getInput = function (name, value, parent, array, traditional) {
|
|
||||||
var parentString;
|
|
||||||
if (parent.length > 0) {
|
|
||||||
parentString = parent[0];
|
|
||||||
var i;
|
|
||||||
for (i = 1; i < parent.length; i += 1) {
|
|
||||||
parentString += "[" + parent[i] + "]";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (array) {
|
|
||||||
if (traditional)
|
|
||||||
name = parentString;
|
|
||||||
else
|
|
||||||
name = parentString + "[" + name + "]";
|
|
||||||
} else {
|
|
||||||
name = parentString + "[" + name + "]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $("<input>").attr("type", "hidden")
|
|
||||||
.attr("name", name)
|
|
||||||
.attr("value", value);
|
|
||||||
};
|
|
||||||
|
|
||||||
var iterateValues = function (values, parent, form, isArray, traditional) {
|
|
||||||
var i, iterateParent = [];
|
|
||||||
Object.keys(values).forEach(function (i) {
|
|
||||||
if (typeof values[i] === "object") {
|
|
||||||
iterateParent = parent.slice();
|
|
||||||
iterateParent.push(i);
|
|
||||||
iterateValues(values[i], iterateParent, form, Array.isArray(values[i]), traditional);
|
|
||||||
} else {
|
|
||||||
form.append(getInput(i, values[i], parent, isArray, traditional));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var removeNulls = function (values) {
|
|
||||||
var propNames = Object.getOwnPropertyNames(values);
|
|
||||||
for (var i = 0; i < propNames.length; i++) {
|
|
||||||
var propName = propNames[i];
|
|
||||||
if (values[propName] === null || values[propName] === undefined) {
|
|
||||||
delete values[propName];
|
|
||||||
} else if (typeof values[propName] === 'object') {
|
|
||||||
values[propName] = removeNulls(values[propName]);
|
|
||||||
} else if (values[propName].length < 1) {
|
|
||||||
delete values[propName];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return values;
|
|
||||||
};
|
|
||||||
|
|
||||||
}(window.jQuery || window.Zepto || window.jqlite));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
TODO : adobdb5, phpmailer5(?), plates, utilphp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
"use strict";!function(t,r){var n=function(t){function r(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function n(t){return t.replace(/"/g,""")}function e(t){if(!t)return"";var r=[];for(var e in t){var i=t[e]+"";r.push(e+'="'+n(i)+'"')}return r.join(" ")}function i(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i=new a(i);for(var f=o(t),u=[],c=0;c<f.length;c++){var p=f[c];if("nl"===p.type&&i.nl2br)u.push("<br>\n");else if(p.isLink&&i.check(p)){var l=i.resolve(p),s=l.formatted,g=l.formattedHref,y=l.tagName,h=l.className,v=l.target,k=l.attributes,S="<"+y+' href="'+n(g)+'"';h&&(S+=' class="'+n(h)+'"'),v&&(S+=' target="'+n(v)+'"'),k&&(S+=" "+e(k)),S+=">"+r(s)+"</"+y+">",u.push(S)}else u.push(r(p.toString()))}return u.join("")}var o=t.tokenize,f=t.options,a=f.Options;if(!String.prototype.linkify)try{Object.defineProperty(String.prototype,"linkify",{a:function(){},get:function(){return function(t){return i(this,t)}}})}catch(u){String.prototype.linkify||(String.prototype.linkify=function(t){return i(this,t)})}return i}(r);t.linkifyStr=n}(window,linkify);
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
/*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||||
|
|
||||||
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
|
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}();
|
||||||
@@ -1,188 +1,553 @@
|
|||||||
/* select2-bootstrap4 with Darkly */
|
/* select2-bootstrap4 with Darkly */
|
||||||
.select2-container--bootstrap4 { color: black; }
|
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; outline: 0; }
|
.select2-container--bootstrap4 {
|
||||||
|
color: black;
|
||||||
.select2-container--bootstrap4 .select2-selection.form-control { border-radius: 0.25rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field { background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; color: #495057; font-size: 1rem; }
|
.select2-container--bootstrap4 .select2-selection {
|
||||||
|
background-color: #fff;
|
||||||
.select2-container--bootstrap4 .select2-search__field { outline: 0; }
|
border: 1px solid #ced4da;
|
||||||
|
border-radius: 0.25rem;
|
||||||
.select2-container--bootstrap4 .select2-search__field::-webkit-input-placeholder { color: #6c757d; }
|
color: #495057;
|
||||||
|
font-size: 1rem;
|
||||||
.select2-container--bootstrap4 .select2-search__field:-moz-placeholder { color: #6c757d; }
|
outline: 0;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-search__field::-moz-placeholder { color: #6c757d; opacity: 1; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection.form-control {
|
||||||
.select2-container--bootstrap4 .select2-search__field:-ms-input-placeholder { color: #6c757d; }
|
border-radius: 0.25rem;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-results__option { padding: 0.75rem 0.375rem; font-size: 1rem; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field {
|
||||||
.select2-container--bootstrap4 .select2-results__option[role=group] { padding: 0; }
|
background-color: #fff;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] { color: #6c757d; cursor: not-allowed; }
|
border-radius: 0.25rem;
|
||||||
|
color: #495057;
|
||||||
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] { background-color: #f8f9fa; color: #16181b; }
|
font-size: 1rem;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] { background-color: #007bff; color: #fff; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-search__field {
|
||||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option { padding: 0.75rem 0.375rem; }
|
outline: 0;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__group { padding-left: 0; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-search__field::-webkit-input-placeholder {
|
||||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.375rem; padding-left: 0.75rem; }
|
color: #6c757d;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -0.75rem; padding-left: 1.125rem; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-search__field:-moz-placeholder {
|
||||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.125rem; padding-left: 1.5rem; }
|
color: #6c757d;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.5rem; padding-left: 1.875rem; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-search__field::-moz-placeholder {
|
||||||
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -1.875rem; padding-left: 2.25rem; }
|
color: #6c757d;
|
||||||
|
opacity: 1;
|
||||||
.select2-container--bootstrap4 .select2-results__group { color: #6c757d; display: block; padding: 0.75rem 0.375rem; font-size: 75%; line-height: 1; white-space: nowrap; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; border-color: #80bdff; }
|
.select2-container--bootstrap4 .select2-search__field:-ms-input-placeholder {
|
||||||
|
color: #6c757d;
|
||||||
@media screen and (prefers-reduced-motion: reduce) { .select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection { transition: none; } }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4.select2-container--open .select2-selection .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.25rem 0.25rem 0.25rem; }
|
.select2-container--bootstrap4 .select2-results__option {
|
||||||
|
padding: 0.75rem 0.375rem;
|
||||||
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection { border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-color: transparent; }
|
font-size: 1rem;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4.select2-container--open.select2-container--above .select2-selection { border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: transparent; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-results__option[role=group] {
|
||||||
.select2-container--bootstrap4 .select2-selection__clear { color: #6c757d; cursor: pointer; float: right; font-weight: bold; margin-right: 10px; }
|
padding: 0;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-selection__clear:hover { color: #343a40; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] {
|
||||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection { border-color: #ced4da; }
|
color: #6c757d;
|
||||||
|
cursor: not-allowed;
|
||||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-search__field { cursor: not-allowed; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice { background-color: #e9ecef; }
|
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] {
|
||||||
|
background-color: #f8f9fa;
|
||||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection__clear, .select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove { display: none; }
|
color: #16181b;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-dropdown { border-color: #80bdff; border-width: 1px; overflow-x: hidden; margin-top: -1px; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
|
||||||
.select2-container--bootstrap4 .select2-dropdown--above { margin-top: 1px; }
|
background-color: #007bff;
|
||||||
|
color: #fff;
|
||||||
.select2-container--bootstrap4 .select2-results > .select2-results__options { max-height: 200px; overflow-y: auto; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--single { height: calc(2.25rem + 2px); line-height: 1; padding: 0.75rem 1.125rem 0.75rem 0.375rem; }
|
.select2-container--bootstrap4 .select2-results__option .select2-results__option {
|
||||||
|
padding: 0.75rem 0.375rem;
|
||||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { position: absolute; bottom: 0; right: 0.375rem; top: 0; width: 0.25rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-color: #6c757d transparent transparent transparent; border-style: solid; border-width: 0.25rem 0.25rem 0 0.25rem; height: 0; left: 0; margin-left: -0.25rem; margin-top: -0.125rem; position: absolute; top: 50%; width: 0; }
|
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__group {
|
||||||
|
padding-left: 0;
|
||||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { color: #495057; padding: 0; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder { color: #6c757d; }
|
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option {
|
||||||
|
margin-left: -0.375rem;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.25rem + 2px); padding: 0; height: auto; }
|
padding-left: 0.75rem;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { box-sizing: border-box; display: block; line-height: 1; list-style: none; margin: 0; overflow: hidden; padding: 0.75rem 0.375rem 0 0.75rem; width: 100%; text-overflow: ellipsis; white-space: nowrap; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder { color: #6c757d; float: left; margin-top: 5px; }
|
margin-left: -0.75rem;
|
||||||
|
padding-left: 1.125rem;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { color: #495057; background: transparent; border: 1px solid #343a40; border-radius: 0.25rem; cursor: default; float: left; margin: -0.25rem 0 0 0.1875rem; padding: 0 0.75rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { background: transparent; padding: 0 0.375rem; height: calc(2.25rem + 2px)-2; line-height: 1; margin-top: 0; min-width: 5em; }
|
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||||
|
margin-left: -1.125rem;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove { color: #6c757d; cursor: pointer; display: inline-block; font-weight: bold; margin-right: 0.375rem; }
|
padding-left: 1.5rem;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover { color: #343a40; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.75rem; }
|
margin-left: -1.5rem;
|
||||||
|
padding-left: 1.875rem;
|
||||||
.select2-container--bootstrap4 .select2-selection--single.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--single, .form-group-sm .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.2rem; font-size: 75%; height: calc(1.8125rem + 2px); line-height: 1; padding: 0.5rem 1rem 0.5rem 0.25rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--single.input-sm .select2-selection__arrow b, .input-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { margin-left: -0.5rem; }
|
.select2-container--bootstrap4 .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||||
|
margin-left: -1.875rem;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(1.8125rem + 2px); border-radius: 0.2rem; }
|
padding-left: 2.25rem;
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__rendered, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { padding: 0.5rem 0.25rem 0 0.5rem; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-results__group {
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__choice, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 75%; line-height: 1; margin: 0 0 0 0.125rem; padding: 0 0.5rem; }
|
color: #6c757d;
|
||||||
|
display: block;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-search--inline .select2-search__field, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.25rem; font-size: 75%; height: calc(1.8125rem + 2px)-2; line-height: 1; }
|
padding: 0.75rem 0.375rem;
|
||||||
|
font-size: 75%;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__clear, .input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 0.5rem; }
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
.select2-container--bootstrap4 .select2-selection--single.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--single, .form-group-lg .select2-container--bootstrap4 .select2-selection--single { border-radius: 0.3rem; font-size: 1.25rem; height: calc(2.875rem + 2px); line-height: 1; padding: 1rem 1.4375rem 1rem 0.5rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { width: 0.3125rem; }
|
.select2-container--bootstrap4.select2-container--focus .select2-selection,
|
||||||
|
.select2-container--bootstrap4.select2-container--open .select2-selection {
|
||||||
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow b, .input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b, .form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { border-width: 0.3125rem 0.3125rem 0 0.3125rem; margin-left: -0.3125rem; margin-left: -1rem; margin-top: -0.15625rem; }
|
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
||||||
|
border-color: #80bdff;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple { min-height: calc(2.875rem + 2px); border-radius: 0.3rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__choice, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { font-size: 1.25rem; line-height: 1; border-radius: 0.25rem; margin: 0rem 0 0 0.25rem; padding: 0 1rem; }
|
@media screen and (prefers-reduced-motion: reduce) {
|
||||||
|
.select2-container--bootstrap4.select2-container--focus .select2-selection,
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-search--inline .select2-search__field, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field { padding: 0 0.5rem; font-size: 1.25rem; height: calc(2.875rem + 2px)-2; line-height: 1; }
|
.select2-container--bootstrap4.select2-container--open .select2-selection {
|
||||||
|
transition: none;
|
||||||
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__clear, .input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear, .form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear { margin-top: 1rem; }
|
}
|
||||||
|
}
|
||||||
.select2-container--bootstrap4 .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
|
|
||||||
|
.select2-container--bootstrap4.select2-container--open .select2-selection .select2-selection__arrow b {
|
||||||
.input-group-lg .select2-container--bootstrap4 .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #6c757d transparent; border-width: 0 0.3125rem 0.3125rem 0.3125rem; }
|
border-color: transparent transparent #6c757d transparent;
|
||||||
|
border-width: 0 0.25rem 0.25rem 0.25rem;
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single { padding-left: 1.125rem; padding-right: 0.375rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__rendered { padding-right: 0; padding-left: 0; text-align: right; }
|
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection {
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__clear { float: left; }
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-color: transparent;
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow { left: 0.375rem; right: auto; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow b { margin-left: 0; }
|
.select2-container--bootstrap4.select2-container--open.select2-container--above .select2-selection {
|
||||||
|
border-top-left-radius: 0;
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-search--inline { float: right; }
|
border-top-right-radius: 0;
|
||||||
|
border-top-color: transparent;
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice { margin-left: 0; margin-right: 0.1875rem; }
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { margin-left: 2px; margin-right: auto; }
|
.select2-container--bootstrap4 .select2-selection__clear {
|
||||||
|
color: #6c757d;
|
||||||
.has-warning .select2-dropdown, .has-warning .select2-selection { border-color: #ffc107; }
|
cursor: pointer;
|
||||||
|
float: right;
|
||||||
.has-warning .select2-container--focus .select2-selection, .has-warning .select2-container--open .select2-selection { border-color: #d39e00; }
|
font-weight: bold;
|
||||||
|
margin-right: 10px;
|
||||||
.has-warning.select2-drop-active { border-color: #d39e00; }
|
}
|
||||||
|
|
||||||
.has-warning.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #d39e00; }
|
.select2-container--bootstrap4 .select2-selection__clear:hover {
|
||||||
|
color: #343a40;
|
||||||
.has-error .select2-dropdown, .has-error .select2-selection { border-color: #dc3545; }
|
}
|
||||||
|
|
||||||
.has-error .select2-container--focus .select2-selection, .has-error .select2-container--open .select2-selection { border-color: #bd2130; }
|
.select2-container--bootstrap4.select2-container--disabled .select2-selection {
|
||||||
|
border-color: #ced4da;
|
||||||
.has-error.select2-drop-active { border-color: #bd2130; }
|
}
|
||||||
|
|
||||||
.has-error.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #bd2130; }
|
.select2-container--bootstrap4.select2-container--disabled .select2-selection,
|
||||||
|
.select2-container--bootstrap4.select2-container--disabled .select2-search__field {
|
||||||
.has-success .select2-dropdown, .has-success .select2-selection { border-color: #28a745; }
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
.has-success .select2-container--focus .select2-selection, .has-success .select2-container--open .select2-selection { border-color: #1e7e34; }
|
|
||||||
|
.select2-container--bootstrap4.select2-container--disabled .select2-selection,
|
||||||
.has-success.select2-drop-active { border-color: #1e7e34; }
|
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice {
|
||||||
|
background-color: #e9ecef;
|
||||||
.has-success.select2-drop-active.select2-drop.select2-drop-above { border-top-color: #1e7e34; }
|
}
|
||||||
|
|
||||||
.input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection, .input-group > .select2-hidden-accessible:first-child + .select2-container--bootstrap4 > .selection > .select2-selection.form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
|
.select2-container--bootstrap4.select2-container--disabled .select2-selection__clear,
|
||||||
|
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove {
|
||||||
.input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child) + .select2-container--bootstrap4:not(:last-child) > .selection > .select2-selection.form-control { border-radius: 0; }
|
display: none;
|
||||||
|
}
|
||||||
.input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection, .input-group > .select2-hidden-accessible:not(:first-child):not(:last-child) + .select2-container--bootstrap4:last-child > .selection > .select2-selection.form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
|
|
||||||
|
.select2-container--bootstrap4 .select2-dropdown {
|
||||||
.input-group > .select2-container--bootstrap4 { display: table; table-layout: fixed; position: relative; z-index: 2; width: 100%; margin-bottom: 0; }
|
border-color: #80bdff;
|
||||||
|
border-width: 1px;
|
||||||
.input-group > .select2-container--bootstrap4 > .selection > .select2-selection.form-control { float: none; }
|
overflow-x: hidden;
|
||||||
|
margin-top: -1px;
|
||||||
.input-group > .select2-container--bootstrap4.select2-container--open, .input-group > .select2-container--bootstrap4.select2-container--focus { z-index: 3; }
|
}
|
||||||
|
|
||||||
.input-group > .select2-container--bootstrap4, .input-group > .select2-container--bootstrap4 .input-group-btn, .input-group > .select2-container--bootstrap4 .input-group-btn .btn { vertical-align: top; }
|
.select2-container--bootstrap4 .select2-dropdown--above {
|
||||||
|
margin-top: 1px;
|
||||||
.form-control.select2-hidden-accessible { position: absolute !important; width: 1px !important; }
|
}
|
||||||
|
|
||||||
@media (min-width: 576px) { .form-inline .select2-container--bootstrap4 { display: inline-block; } }
|
.select2-container--bootstrap4 .select2-results>.select2-results__options {
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single {
|
||||||
|
height: calc(2.25rem + 2px);
|
||||||
|
line-height: 1;
|
||||||
|
padding: 0.75rem 1.125rem 0.75rem 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0.375rem;
|
||||||
|
top: 0;
|
||||||
|
width: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
|
||||||
|
border-color: #6c757d transparent transparent transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0.25rem 0.25rem 0 0.25rem;
|
||||||
|
height: 0;
|
||||||
|
left: 0;
|
||||||
|
margin-left: -0.25rem;
|
||||||
|
margin-top: -0.125rem;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
|
||||||
|
color: #495057;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
|
||||||
|
color: #6c757d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple {
|
||||||
|
min-height: calc(2.25rem + 2px);
|
||||||
|
padding: 0;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
|
line-height: 1;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0.75rem 0.375rem 0 0.75rem;
|
||||||
|
width: 100%;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder {
|
||||||
|
color: #6c757d;
|
||||||
|
float: left;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
|
||||||
|
color: #495057;
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid #343a40;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
cursor: default;
|
||||||
|
float: left;
|
||||||
|
margin: -0.25rem 0 0 0.1875rem;
|
||||||
|
padding: 0 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
|
||||||
|
background: transparent;
|
||||||
|
padding: 0 0.375rem;
|
||||||
|
height: calc(2.25rem + 2px)-2;
|
||||||
|
line-height: 1;
|
||||||
|
margin-top: 0;
|
||||||
|
min-width: 5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
|
||||||
|
color: #6c757d;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||||
|
color: #343a40;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
|
||||||
|
margin-top: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single.input-sm,
|
||||||
|
.input-group-sm .select2-container--bootstrap4 .select2-selection--single,
|
||||||
|
.form-group-sm .select2-container--bootstrap4 .select2-selection--single {
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
font-size: 75%;
|
||||||
|
height: calc(1.8125rem + 2px);
|
||||||
|
line-height: 1;
|
||||||
|
padding: 0.5rem 1rem 0.5rem 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single.input-sm .select2-selection__arrow b,
|
||||||
|
.input-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b,
|
||||||
|
.form-group-sm .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
|
||||||
|
margin-left: -0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-sm,
|
||||||
|
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple,
|
||||||
|
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple {
|
||||||
|
min-height: calc(1.8125rem + 2px);
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__rendered,
|
||||||
|
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered,
|
||||||
|
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
|
||||||
|
padding: 0.5rem 0.25rem 0 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__choice,
|
||||||
|
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
|
||||||
|
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 1;
|
||||||
|
margin: 0 0 0 0.125rem;
|
||||||
|
padding: 0 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-search--inline .select2-search__field,
|
||||||
|
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field,
|
||||||
|
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
|
||||||
|
padding: 0 0.25rem;
|
||||||
|
font-size: 75%;
|
||||||
|
height: calc(1.8125rem + 2px)-2;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-sm .select2-selection__clear,
|
||||||
|
.input-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear,
|
||||||
|
.form-group-sm .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single.input-lg,
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection--single,
|
||||||
|
.form-group-lg .select2-container--bootstrap4 .select2-selection--single {
|
||||||
|
border-radius: 0.3rem;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
height: calc(2.875rem + 2px);
|
||||||
|
line-height: 1;
|
||||||
|
padding: 1rem 1.4375rem 1rem 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow,
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow,
|
||||||
|
.form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
|
||||||
|
width: 0.3125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--single.input-lg .select2-selection__arrow b,
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b,
|
||||||
|
.form-group-lg .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
|
||||||
|
border-width: 0.3125rem 0.3125rem 0 0.3125rem;
|
||||||
|
margin-left: -0.3125rem;
|
||||||
|
margin-left: -1rem;
|
||||||
|
margin-top: -0.15625rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-lg,
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple,
|
||||||
|
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple {
|
||||||
|
min-height: calc(2.875rem + 2px);
|
||||||
|
border-radius: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__choice,
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
|
||||||
|
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
line-height: 1;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
margin: 0rem 0 0 0.25rem;
|
||||||
|
padding: 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-search--inline .select2-search__field,
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field,
|
||||||
|
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
|
||||||
|
padding: 0 0.5rem;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
height: calc(2.875rem + 2px)-2;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection--multiple.input-lg .select2-selection__clear,
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear,
|
||||||
|
.form-group-lg .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4 .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||||
|
border-color: transparent transparent #6c757d transparent;
|
||||||
|
border-width: 0 0.3125rem 0.3125rem 0.3125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-lg .select2-container--bootstrap4 .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||||
|
border-color: transparent transparent #6c757d transparent;
|
||||||
|
border-width: 0 0.3125rem 0.3125rem 0.3125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single {
|
||||||
|
padding-left: 1.125rem;
|
||||||
|
padding-right: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||||
|
left: 0.375rem;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single .select2-selection__arrow b {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice,
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0.1875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--bootstrap4[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-warning .select2-dropdown,
|
||||||
|
.has-warning .select2-selection {
|
||||||
|
border-color: #ffc107;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-warning .select2-container--focus .select2-selection,
|
||||||
|
.has-warning .select2-container--open .select2-selection {
|
||||||
|
border-color: #d39e00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-warning.select2-drop-active {
|
||||||
|
border-color: #d39e00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-warning.select2-drop-active.select2-drop.select2-drop-above {
|
||||||
|
border-top-color: #d39e00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-error .select2-dropdown,
|
||||||
|
.has-error .select2-selection {
|
||||||
|
border-color: #dc3545;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-error .select2-container--focus .select2-selection,
|
||||||
|
.has-error .select2-container--open .select2-selection {
|
||||||
|
border-color: #bd2130;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-error.select2-drop-active {
|
||||||
|
border-color: #bd2130;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-error.select2-drop-active.select2-drop.select2-drop-above {
|
||||||
|
border-top-color: #bd2130;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-success .select2-dropdown,
|
||||||
|
.has-success .select2-selection {
|
||||||
|
border-color: #28a745;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-success .select2-container--focus .select2-selection,
|
||||||
|
.has-success .select2-container--open .select2-selection {
|
||||||
|
border-color: #1e7e34;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-success.select2-drop-active {
|
||||||
|
border-color: #1e7e34;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has-success.select2-drop-active.select2-drop.select2-drop-above {
|
||||||
|
border-top-color: #1e7e34;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group>.select2-hidden-accessible:first-child+.select2-container--bootstrap4>.selection>.select2-selection,
|
||||||
|
.input-group>.select2-hidden-accessible:first-child+.select2-container--bootstrap4>.selection>.select2-selection.form-control {
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group>.select2-hidden-accessible:not(:first-child)+.select2-container--bootstrap4:not(:last-child)>.selection>.select2-selection,
|
||||||
|
.input-group>.select2-hidden-accessible:not(:first-child)+.select2-container--bootstrap4:not(:last-child)>.selection>.select2-selection.form-control {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group>.select2-hidden-accessible:not(:first-child):not(:last-child)+.select2-container--bootstrap4:last-child>.selection>.select2-selection,
|
||||||
|
.input-group>.select2-hidden-accessible:not(:first-child):not(:last-child)+.select2-container--bootstrap4:last-child>.selection>.select2-selection.form-control {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group>.select2-container--bootstrap4 {
|
||||||
|
display: table;
|
||||||
|
table-layout: fixed;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group>.select2-container--bootstrap4>.selection>.select2-selection.form-control {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group>.select2-container--bootstrap4.select2-container--open,
|
||||||
|
.input-group>.select2-container--bootstrap4.select2-container--focus {
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group>.select2-container--bootstrap4,
|
||||||
|
.input-group>.select2-container--bootstrap4 .input-group-btn,
|
||||||
|
.input-group>.select2-container--bootstrap4 .input-group-btn .btn {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control.select2-hidden-accessible {
|
||||||
|
position: absolute !important;
|
||||||
|
width: 1px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 576px) {
|
||||||
|
.form-inline .select2-container--bootstrap4 {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -118,12 +118,14 @@
|
|||||||
.select2-hidden-accessible {
|
.select2-hidden-accessible {
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
clip: rect(0 0 0 0) !important;
|
clip: rect(0 0 0 0) !important;
|
||||||
|
-webkit-clip-path: inset(50%) !important;
|
||||||
|
clip-path: inset(50%) !important;
|
||||||
height: 1px !important;
|
height: 1px !important;
|
||||||
margin: -1px !important;
|
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
width: 1px !important; }
|
width: 1px !important;
|
||||||
|
white-space: nowrap !important; }
|
||||||
|
|
||||||
.select2-container--default .select2-selection--single {
|
.select2-container--default .select2-selection--single {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -186,16 +188,13 @@
|
|||||||
width: 100%; }
|
width: 100%; }
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||||
list-style: none; }
|
list-style: none; }
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
|
||||||
color: #999;
|
|
||||||
margin-top: 5px;
|
|
||||||
float: left; }
|
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
float: right;
|
float: right;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-right: 10px; }
|
margin-right: 10px;
|
||||||
|
padding: 1px; }
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
background-color: #e4e4e4;
|
background-color: #e4e4e4;
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
@@ -214,7 +213,7 @@
|
|||||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||||
color: #333; }
|
color: #333; }
|
||||||
|
|
||||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||||
float: right; }
|
float: right; }
|
||||||
|
|
||||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||||
@@ -420,9 +419,7 @@
|
|||||||
color: #555; }
|
color: #555; }
|
||||||
|
|
||||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||||
float: right; }
|
float: right;
|
||||||
|
|
||||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
margin-right: auto; }
|
margin-right: auto; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/*!
|
/*!
|
||||||
* Select2 4.0.5
|
* Select2 4.0.13
|
||||||
* https://select2.github.io
|
* https://select2.github.io
|
||||||
*
|
*
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/select2/select2/blob/master/LICENSE.md
|
* https://github.com/select2/select2/blob/master/LICENSE.md
|
||||||
*/
|
*/
|
||||||
(function (factory) {
|
;(function (factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// AMD. Register as an anonymous module.
|
// AMD. Register as an anonymous module.
|
||||||
define(['jquery'], factory);
|
define(['jquery'], factory);
|
||||||
@@ -772,6 +772,70 @@ S2.define('select2/utils',[
|
|||||||
$element.append($nodes);
|
$element.append($nodes);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Cache objects in Utils.__cache instead of $.data (see #4346)
|
||||||
|
Utils.__cache = {};
|
||||||
|
|
||||||
|
var id = 0;
|
||||||
|
Utils.GetUniqueElementId = function (element) {
|
||||||
|
// Get a unique element Id. If element has no id,
|
||||||
|
// creates a new unique number, stores it in the id
|
||||||
|
// attribute and returns the new id.
|
||||||
|
// If an id already exists, it simply returns it.
|
||||||
|
|
||||||
|
var select2Id = element.getAttribute('data-select2-id');
|
||||||
|
if (select2Id == null) {
|
||||||
|
// If element has id, use it.
|
||||||
|
if (element.id) {
|
||||||
|
select2Id = element.id;
|
||||||
|
element.setAttribute('data-select2-id', select2Id);
|
||||||
|
} else {
|
||||||
|
element.setAttribute('data-select2-id', ++id);
|
||||||
|
select2Id = id.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return select2Id;
|
||||||
|
};
|
||||||
|
|
||||||
|
Utils.StoreData = function (element, name, value) {
|
||||||
|
// Stores an item in the cache for a specified element.
|
||||||
|
// name is the cache key.
|
||||||
|
var id = Utils.GetUniqueElementId(element);
|
||||||
|
if (!Utils.__cache[id]) {
|
||||||
|
Utils.__cache[id] = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
Utils.__cache[id][name] = value;
|
||||||
|
};
|
||||||
|
|
||||||
|
Utils.GetData = function (element, name) {
|
||||||
|
// Retrieves a value from the cache by its key (name)
|
||||||
|
// name is optional. If no name specified, return
|
||||||
|
// all cache items for the specified element.
|
||||||
|
// and for a specified element.
|
||||||
|
var id = Utils.GetUniqueElementId(element);
|
||||||
|
if (name) {
|
||||||
|
if (Utils.__cache[id]) {
|
||||||
|
if (Utils.__cache[id][name] != null) {
|
||||||
|
return Utils.__cache[id][name];
|
||||||
|
}
|
||||||
|
return $(element).data(name); // Fallback to HTML5 data attribs.
|
||||||
|
}
|
||||||
|
return $(element).data(name); // Fallback to HTML5 data attribs.
|
||||||
|
} else {
|
||||||
|
return Utils.__cache[id];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Utils.RemoveData = function (element) {
|
||||||
|
// Removes all cached items for a specified element.
|
||||||
|
var id = Utils.GetUniqueElementId(element);
|
||||||
|
if (Utils.__cache[id] != null) {
|
||||||
|
delete Utils.__cache[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
element.removeAttribute('data-select2-id');
|
||||||
|
};
|
||||||
|
|
||||||
return Utils;
|
return Utils;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -791,7 +855,7 @@ S2.define('select2/results',[
|
|||||||
|
|
||||||
Results.prototype.render = function () {
|
Results.prototype.render = function () {
|
||||||
var $results = $(
|
var $results = $(
|
||||||
'<ul class="select2-results__options" role="tree"></ul>'
|
'<ul class="select2-results__options" role="listbox"></ul>'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (this.options.get('multiple')) {
|
if (this.options.get('multiple')) {
|
||||||
@@ -814,7 +878,7 @@ S2.define('select2/results',[
|
|||||||
this.hideLoading();
|
this.hideLoading();
|
||||||
|
|
||||||
var $message = $(
|
var $message = $(
|
||||||
'<li role="treeitem" aria-live="assertive"' +
|
'<li role="alert" aria-live="assertive"' +
|
||||||
' class="select2-results__option"></li>'
|
' class="select2-results__option"></li>'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -907,7 +971,7 @@ S2.define('select2/results',[
|
|||||||
$options.each(function () {
|
$options.each(function () {
|
||||||
var $option = $(this);
|
var $option = $(this);
|
||||||
|
|
||||||
var item = $.data(this, 'data');
|
var item = Utils.GetData(this, 'data');
|
||||||
|
|
||||||
// id needs to be converted to a string when comparing
|
// id needs to be converted to a string when comparing
|
||||||
var id = '' + item.id;
|
var id = '' + item.id;
|
||||||
@@ -948,11 +1012,16 @@ S2.define('select2/results',[
|
|||||||
option.className = 'select2-results__option';
|
option.className = 'select2-results__option';
|
||||||
|
|
||||||
var attrs = {
|
var attrs = {
|
||||||
'role': 'treeitem',
|
'role': 'option',
|
||||||
'aria-selected': 'false'
|
'aria-selected': 'false'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.disabled) {
|
var matches = window.Element.prototype.matches ||
|
||||||
|
window.Element.prototype.msMatchesSelector ||
|
||||||
|
window.Element.prototype.webkitMatchesSelector;
|
||||||
|
|
||||||
|
if ((data.element != null && matches.call(data.element, ':disabled')) ||
|
||||||
|
(data.element == null && data.disabled)) {
|
||||||
delete attrs['aria-selected'];
|
delete attrs['aria-selected'];
|
||||||
attrs['aria-disabled'] = 'true';
|
attrs['aria-disabled'] = 'true';
|
||||||
}
|
}
|
||||||
@@ -1012,7 +1081,7 @@ S2.define('select2/results',[
|
|||||||
this.template(data, option);
|
this.template(data, option);
|
||||||
}
|
}
|
||||||
|
|
||||||
$.data(option, 'data', data);
|
Utils.StoreData(option, 'data', data);
|
||||||
|
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
@@ -1053,7 +1122,10 @@ S2.define('select2/results',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.setClasses();
|
self.setClasses();
|
||||||
|
|
||||||
|
if (self.options.get('scrollAfterSelect')) {
|
||||||
self.highlightFirstItem();
|
self.highlightFirstItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('unselect', function () {
|
container.on('unselect', function () {
|
||||||
@@ -1062,7 +1134,10 @@ S2.define('select2/results',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.setClasses();
|
self.setClasses();
|
||||||
|
|
||||||
|
if (self.options.get('scrollAfterSelect')) {
|
||||||
self.highlightFirstItem();
|
self.highlightFirstItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
@@ -1098,7 +1173,7 @@ S2.define('select2/results',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = $highlighted.data('data');
|
var data = Utils.GetData($highlighted[0], 'data');
|
||||||
|
|
||||||
if ($highlighted.attr('aria-selected') == 'true') {
|
if ($highlighted.attr('aria-selected') == 'true') {
|
||||||
self.trigger('close', {});
|
self.trigger('close', {});
|
||||||
@@ -1116,8 +1191,9 @@ S2.define('select2/results',[
|
|||||||
|
|
||||||
var currentIndex = $options.index($highlighted);
|
var currentIndex = $options.index($highlighted);
|
||||||
|
|
||||||
// If we are already at te top, don't move further
|
// If we are already at the top, don't move further
|
||||||
if (currentIndex === 0) {
|
// If no options, currentIndex will be -1
|
||||||
|
if (currentIndex <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1210,7 +1286,7 @@ S2.define('select2/results',[
|
|||||||
function (evt) {
|
function (evt) {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
var data = $this.data('data');
|
var data = Utils.GetData(this, 'data');
|
||||||
|
|
||||||
if ($this.attr('aria-selected') === 'true') {
|
if ($this.attr('aria-selected') === 'true') {
|
||||||
if (self.options.get('multiple')) {
|
if (self.options.get('multiple')) {
|
||||||
@@ -1233,7 +1309,7 @@ S2.define('select2/results',[
|
|||||||
|
|
||||||
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
||||||
function (evt) {
|
function (evt) {
|
||||||
var data = $(this).data('data');
|
var data = Utils.GetData(this, 'data');
|
||||||
|
|
||||||
self.getHighlightedResults()
|
self.getHighlightedResults()
|
||||||
.removeClass('select2-results__option--highlighted');
|
.removeClass('select2-results__option--highlighted');
|
||||||
@@ -1348,14 +1424,15 @@ S2.define('select2/selection/base',[
|
|||||||
|
|
||||||
this._tabindex = 0;
|
this._tabindex = 0;
|
||||||
|
|
||||||
if (this.$element.data('old-tabindex') != null) {
|
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
|
||||||
this._tabindex = this.$element.data('old-tabindex');
|
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
|
||||||
} else if (this.$element.attr('tabindex') != null) {
|
} else if (this.$element.attr('tabindex') != null) {
|
||||||
this._tabindex = this.$element.attr('tabindex');
|
this._tabindex = this.$element.attr('tabindex');
|
||||||
}
|
}
|
||||||
|
|
||||||
$selection.attr('title', this.$element.attr('title'));
|
$selection.attr('title', this.$element.attr('title'));
|
||||||
$selection.attr('tabindex', this._tabindex);
|
$selection.attr('tabindex', this._tabindex);
|
||||||
|
$selection.attr('aria-disabled', 'false');
|
||||||
|
|
||||||
this.$selection = $selection;
|
this.$selection = $selection;
|
||||||
|
|
||||||
@@ -1365,7 +1442,6 @@ S2.define('select2/selection/base',[
|
|||||||
BaseSelection.prototype.bind = function (container, $container) {
|
BaseSelection.prototype.bind = function (container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
var id = container.id + '-container';
|
|
||||||
var resultsId = container.id + '-results';
|
var resultsId = container.id + '-results';
|
||||||
|
|
||||||
this.container = container;
|
this.container = container;
|
||||||
@@ -1408,17 +1484,19 @@ S2.define('select2/selection/base',[
|
|||||||
self.$selection.removeAttr('aria-activedescendant');
|
self.$selection.removeAttr('aria-activedescendant');
|
||||||
self.$selection.removeAttr('aria-owns');
|
self.$selection.removeAttr('aria-owns');
|
||||||
|
|
||||||
self.$selection.focus();
|
self.$selection.trigger('focus');
|
||||||
|
|
||||||
self._detachCloseHandler(container);
|
self._detachCloseHandler(container);
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('enable', function () {
|
container.on('enable', function () {
|
||||||
self.$selection.attr('tabindex', self._tabindex);
|
self.$selection.attr('tabindex', self._tabindex);
|
||||||
|
self.$selection.attr('aria-disabled', 'false');
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('disable', function () {
|
container.on('disable', function () {
|
||||||
self.$selection.attr('tabindex', '-1');
|
self.$selection.attr('tabindex', '-1');
|
||||||
|
self.$selection.attr('aria-disabled', 'true');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1441,7 +1519,6 @@ S2.define('select2/selection/base',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
BaseSelection.prototype._attachCloseHandler = function (container) {
|
BaseSelection.prototype._attachCloseHandler = function (container) {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
||||||
var $target = $(e.target);
|
var $target = $(e.target);
|
||||||
@@ -1451,13 +1528,11 @@ S2.define('select2/selection/base',[
|
|||||||
var $all = $('.select2.select2-container--open');
|
var $all = $('.select2.select2-container--open');
|
||||||
|
|
||||||
$all.each(function () {
|
$all.each(function () {
|
||||||
var $this = $(this);
|
|
||||||
|
|
||||||
if (this == $select[0]) {
|
if (this == $select[0]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $element = $this.data('element');
|
var $element = Utils.GetData(this, 'element');
|
||||||
|
|
||||||
$element.select2('close');
|
$element.select2('close');
|
||||||
});
|
});
|
||||||
@@ -1481,6 +1556,27 @@ S2.define('select2/selection/base',[
|
|||||||
throw new Error('The `update` method must be defined in child classes.');
|
throw new Error('The `update` method must be defined in child classes.');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "enabled" (not "disabled") state of this
|
||||||
|
* object.
|
||||||
|
*
|
||||||
|
* @return {true} if the instance is not disabled.
|
||||||
|
* @return {false} if the instance is disabled.
|
||||||
|
*/
|
||||||
|
BaseSelection.prototype.isEnabled = function () {
|
||||||
|
return !this.isDisabled();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "disabled" state of this object.
|
||||||
|
*
|
||||||
|
* @return {true} if the disabled option is true.
|
||||||
|
* @return {false} if the disabled option is false.
|
||||||
|
*/
|
||||||
|
BaseSelection.prototype.isDisabled = function () {
|
||||||
|
return this.options.get('disabled');
|
||||||
|
};
|
||||||
|
|
||||||
return BaseSelection;
|
return BaseSelection;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1518,7 +1614,10 @@ S2.define('select2/selection/single',[
|
|||||||
|
|
||||||
var id = container.id + '-container';
|
var id = container.id + '-container';
|
||||||
|
|
||||||
this.$selection.find('.select2-selection__rendered').attr('id', id);
|
this.$selection.find('.select2-selection__rendered')
|
||||||
|
.attr('id', id)
|
||||||
|
.attr('role', 'textbox')
|
||||||
|
.attr('aria-readonly', 'true');
|
||||||
this.$selection.attr('aria-labelledby', id);
|
this.$selection.attr('aria-labelledby', id);
|
||||||
|
|
||||||
this.$selection.on('mousedown', function (evt) {
|
this.$selection.on('mousedown', function (evt) {
|
||||||
@@ -1542,17 +1641,15 @@ S2.define('select2/selection/single',[
|
|||||||
|
|
||||||
container.on('focus', function (evt) {
|
container.on('focus', function (evt) {
|
||||||
if (!container.isOpen()) {
|
if (!container.isOpen()) {
|
||||||
self.$selection.focus();
|
self.$selection.trigger('focus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('selection:update', function (params) {
|
|
||||||
self.update(params.data);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SingleSelection.prototype.clear = function () {
|
SingleSelection.prototype.clear = function () {
|
||||||
this.$selection.find('.select2-selection__rendered').empty();
|
var $rendered = this.$selection.find('.select2-selection__rendered');
|
||||||
|
$rendered.empty();
|
||||||
|
$rendered.removeAttr('title'); // clear tooltip on empty
|
||||||
};
|
};
|
||||||
|
|
||||||
SingleSelection.prototype.display = function (data, container) {
|
SingleSelection.prototype.display = function (data, container) {
|
||||||
@@ -1578,7 +1675,14 @@ S2.define('select2/selection/single',[
|
|||||||
var formatted = this.display(selection, $rendered);
|
var formatted = this.display(selection, $rendered);
|
||||||
|
|
||||||
$rendered.empty().append(formatted);
|
$rendered.empty().append(formatted);
|
||||||
$rendered.prop('title', selection.title || selection.text);
|
|
||||||
|
var title = selection.title || selection.text;
|
||||||
|
|
||||||
|
if (title) {
|
||||||
|
$rendered.attr('title', title);
|
||||||
|
} else {
|
||||||
|
$rendered.removeAttr('title');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return SingleSelection;
|
return SingleSelection;
|
||||||
@@ -1623,14 +1727,14 @@ S2.define('select2/selection/multiple',[
|
|||||||
'.select2-selection__choice__remove',
|
'.select2-selection__choice__remove',
|
||||||
function (evt) {
|
function (evt) {
|
||||||
// Ignore the event if it is disabled
|
// Ignore the event if it is disabled
|
||||||
if (self.options.get('disabled')) {
|
if (self.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $remove = $(this);
|
var $remove = $(this);
|
||||||
var $selection = $remove.parent();
|
var $selection = $remove.parent();
|
||||||
|
|
||||||
var data = $selection.data('data');
|
var data = Utils.GetData($selection[0], 'data');
|
||||||
|
|
||||||
self.trigger('unselect', {
|
self.trigger('unselect', {
|
||||||
originalEvent: evt,
|
originalEvent: evt,
|
||||||
@@ -1641,7 +1745,9 @@ S2.define('select2/selection/multiple',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
MultipleSelection.prototype.clear = function () {
|
MultipleSelection.prototype.clear = function () {
|
||||||
this.$selection.find('.select2-selection__rendered').empty();
|
var $rendered = this.$selection.find('.select2-selection__rendered');
|
||||||
|
$rendered.empty();
|
||||||
|
$rendered.removeAttr('title');
|
||||||
};
|
};
|
||||||
|
|
||||||
MultipleSelection.prototype.display = function (data, container) {
|
MultipleSelection.prototype.display = function (data, container) {
|
||||||
@@ -1679,9 +1785,14 @@ S2.define('select2/selection/multiple',[
|
|||||||
var formatted = this.display(selection, $selection);
|
var formatted = this.display(selection, $selection);
|
||||||
|
|
||||||
$selection.append(formatted);
|
$selection.append(formatted);
|
||||||
$selection.prop('title', selection.title || selection.text);
|
|
||||||
|
|
||||||
$selection.data('data', selection);
|
var title = selection.title || selection.text;
|
||||||
|
|
||||||
|
if (title) {
|
||||||
|
$selection.attr('title', title);
|
||||||
|
}
|
||||||
|
|
||||||
|
Utils.StoreData($selection[0], 'data', selection);
|
||||||
|
|
||||||
$selections.push($selection);
|
$selections.push($selection);
|
||||||
}
|
}
|
||||||
@@ -1746,8 +1857,9 @@ S2.define('select2/selection/placeholder',[
|
|||||||
|
|
||||||
S2.define('select2/selection/allowClear',[
|
S2.define('select2/selection/allowClear',[
|
||||||
'jquery',
|
'jquery',
|
||||||
'../keys'
|
'../keys',
|
||||||
], function ($, KEYS) {
|
'../utils'
|
||||||
|
], function ($, KEYS, Utils) {
|
||||||
function AllowClear () { }
|
function AllowClear () { }
|
||||||
|
|
||||||
AllowClear.prototype.bind = function (decorated, container, $container) {
|
AllowClear.prototype.bind = function (decorated, container, $container) {
|
||||||
@@ -1776,7 +1888,7 @@ S2.define('select2/selection/allowClear',[
|
|||||||
|
|
||||||
AllowClear.prototype._handleClear = function (_, evt) {
|
AllowClear.prototype._handleClear = function (_, evt) {
|
||||||
// Ignore the event if it is disabled
|
// Ignore the event if it is disabled
|
||||||
if (this.options.get('disabled')) {
|
if (this.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1789,10 +1901,22 @@ S2.define('select2/selection/allowClear',[
|
|||||||
|
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
|
||||||
var data = $clear.data('data');
|
var data = Utils.GetData($clear[0], 'data');
|
||||||
|
|
||||||
|
var previousVal = this.$element.val();
|
||||||
|
this.$element.val(this.placeholder.id);
|
||||||
|
|
||||||
|
var unselectData = {
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
this.trigger('clear', unselectData);
|
||||||
|
if (unselectData.prevented) {
|
||||||
|
this.$element.val(previousVal);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (var d = 0; d < data.length; d++) {
|
for (var d = 0; d < data.length; d++) {
|
||||||
var unselectData = {
|
unselectData = {
|
||||||
data: data[d]
|
data: data[d]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1802,11 +1926,12 @@ S2.define('select2/selection/allowClear',[
|
|||||||
|
|
||||||
// If the event was prevented, don't clear it out.
|
// If the event was prevented, don't clear it out.
|
||||||
if (unselectData.prevented) {
|
if (unselectData.prevented) {
|
||||||
|
this.$element.val(previousVal);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element.val(this.placeholder.id).trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
|
|
||||||
this.trigger('toggle', {});
|
this.trigger('toggle', {});
|
||||||
};
|
};
|
||||||
@@ -1829,12 +1954,14 @@ S2.define('select2/selection/allowClear',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var removeAll = this.options.get('translations').get('removeAllItems');
|
||||||
|
|
||||||
var $remove = $(
|
var $remove = $(
|
||||||
'<span class="select2-selection__clear">' +
|
'<span class="select2-selection__clear" title="' + removeAll() +'">' +
|
||||||
'×' +
|
'×' +
|
||||||
'</span>'
|
'</span>'
|
||||||
);
|
);
|
||||||
$remove.data('data', data);
|
Utils.StoreData($remove[0], 'data', data);
|
||||||
|
|
||||||
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
||||||
};
|
};
|
||||||
@@ -1856,7 +1983,7 @@ S2.define('select2/selection/search',[
|
|||||||
'<li class="select2-search select2-search--inline">' +
|
'<li class="select2-search select2-search--inline">' +
|
||||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||||
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||||
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
||||||
'</li>'
|
'</li>'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -1873,14 +2000,18 @@ S2.define('select2/selection/search',[
|
|||||||
Search.prototype.bind = function (decorated, container, $container) {
|
Search.prototype.bind = function (decorated, container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
var resultsId = container.id + '-results';
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
|
self.$search.attr('aria-controls', resultsId);
|
||||||
self.$search.trigger('focus');
|
self.$search.trigger('focus');
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('close', function () {
|
container.on('close', function () {
|
||||||
self.$search.val('');
|
self.$search.val('');
|
||||||
|
self.$search.removeAttr('aria-controls');
|
||||||
self.$search.removeAttr('aria-activedescendant');
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
self.$search.trigger('focus');
|
self.$search.trigger('focus');
|
||||||
});
|
});
|
||||||
@@ -1900,7 +2031,11 @@ S2.define('select2/selection/search',[
|
|||||||
});
|
});
|
||||||
|
|
||||||
container.on('results:focus', function (params) {
|
container.on('results:focus', function (params) {
|
||||||
self.$search.attr('aria-activedescendant', params.id);
|
if (params.data._resultId) {
|
||||||
|
self.$search.attr('aria-activedescendant', params.data._resultId);
|
||||||
|
} else {
|
||||||
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
||||||
@@ -1925,7 +2060,7 @@ S2.define('select2/selection/search',[
|
|||||||
.prev('.select2-selection__choice');
|
.prev('.select2-selection__choice');
|
||||||
|
|
||||||
if ($previousChoice.length > 0) {
|
if ($previousChoice.length > 0) {
|
||||||
var item = $previousChoice.data('data');
|
var item = Utils.GetData($previousChoice[0], 'data');
|
||||||
|
|
||||||
self.searchRemoveChoice(item);
|
self.searchRemoveChoice(item);
|
||||||
|
|
||||||
@@ -1934,6 +2069,12 @@ S2.define('select2/selection/search',[
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$selection.on('click', '.select2-search--inline', function (evt) {
|
||||||
|
if (self.$search.val()) {
|
||||||
|
evt.stopPropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Try to detect the IE version should the `documentMode` property that
|
// Try to detect the IE version should the `documentMode` property that
|
||||||
// is stored on the document. This is only implemented in IE and is
|
// is stored on the document. This is only implemented in IE and is
|
||||||
// slightly cleaner than doing a user agent check.
|
// slightly cleaner than doing a user agent check.
|
||||||
@@ -2019,7 +2160,7 @@ S2.define('select2/selection/search',[
|
|||||||
|
|
||||||
this.resizeSearch();
|
this.resizeSearch();
|
||||||
if (searchHadFocus) {
|
if (searchHadFocus) {
|
||||||
this.$search.focus();
|
this.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2052,7 +2193,7 @@ S2.define('select2/selection/search',[
|
|||||||
var width = '';
|
var width = '';
|
||||||
|
|
||||||
if (this.$search.attr('placeholder') !== '') {
|
if (this.$search.attr('placeholder') !== '') {
|
||||||
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
width = this.$selection.find('.select2-selection__rendered').width();
|
||||||
} else {
|
} else {
|
||||||
var minimumWidth = this.$search.val().length + 1;
|
var minimumWidth = this.$search.val().length + 1;
|
||||||
|
|
||||||
@@ -2076,10 +2217,13 @@ S2.define('select2/selection/eventRelay',[
|
|||||||
'open', 'opening',
|
'open', 'opening',
|
||||||
'close', 'closing',
|
'close', 'closing',
|
||||||
'select', 'selecting',
|
'select', 'selecting',
|
||||||
'unselect', 'unselecting'
|
'unselect', 'unselecting',
|
||||||
|
'clear', 'clearing'
|
||||||
];
|
];
|
||||||
|
|
||||||
var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
|
var preventableEvents = [
|
||||||
|
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
|
||||||
|
];
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
@@ -2412,6 +2556,7 @@ S2.define('select2/diacritics',[
|
|||||||
'\u019F': 'O',
|
'\u019F': 'O',
|
||||||
'\uA74A': 'O',
|
'\uA74A': 'O',
|
||||||
'\uA74C': 'O',
|
'\uA74C': 'O',
|
||||||
|
'\u0152': 'OE',
|
||||||
'\u01A2': 'OI',
|
'\u01A2': 'OI',
|
||||||
'\uA74E': 'OO',
|
'\uA74E': 'OO',
|
||||||
'\u0222': 'OU',
|
'\u0222': 'OU',
|
||||||
@@ -2821,6 +2966,7 @@ S2.define('select2/diacritics',[
|
|||||||
'\uA74B': 'o',
|
'\uA74B': 'o',
|
||||||
'\uA74D': 'o',
|
'\uA74D': 'o',
|
||||||
'\u0275': 'o',
|
'\u0275': 'o',
|
||||||
|
'\u0153': 'oe',
|
||||||
'\u01A3': 'oi',
|
'\u01A3': 'oi',
|
||||||
'\u0223': 'ou',
|
'\u0223': 'ou',
|
||||||
'\uA74F': 'oo',
|
'\uA74F': 'oo',
|
||||||
@@ -2989,8 +3135,9 @@ S2.define('select2/diacritics',[
|
|||||||
'\u03CD': '\u03C5',
|
'\u03CD': '\u03C5',
|
||||||
'\u03CB': '\u03C5',
|
'\u03CB': '\u03C5',
|
||||||
'\u03B0': '\u03C5',
|
'\u03B0': '\u03C5',
|
||||||
'\u03C9': '\u03C9',
|
'\u03CE': '\u03C9',
|
||||||
'\u03C2': '\u03C3'
|
'\u03C2': '\u03C3',
|
||||||
|
'\u2019': '\''
|
||||||
};
|
};
|
||||||
|
|
||||||
return diacritics;
|
return diacritics;
|
||||||
@@ -3075,7 +3222,7 @@ S2.define('select2/data/select',[
|
|||||||
if ($(data.element).is('option')) {
|
if ($(data.element).is('option')) {
|
||||||
data.element.selected = true;
|
data.element.selected = true;
|
||||||
|
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3096,13 +3243,13 @@ S2.define('select2/data/select',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.$element.val(val);
|
self.$element.val(val);
|
||||||
self.$element.trigger('change');
|
self.$element.trigger('input').trigger('change');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var val = data.id;
|
var val = data.id;
|
||||||
|
|
||||||
this.$element.val(val);
|
this.$element.val(val);
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3118,7 +3265,7 @@ S2.define('select2/data/select',[
|
|||||||
if ($(data.element).is('option')) {
|
if ($(data.element).is('option')) {
|
||||||
data.element.selected = false;
|
data.element.selected = false;
|
||||||
|
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3136,7 +3283,7 @@ S2.define('select2/data/select',[
|
|||||||
|
|
||||||
self.$element.val(val);
|
self.$element.val(val);
|
||||||
|
|
||||||
self.$element.trigger('change');
|
self.$element.trigger('input').trigger('change');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3158,7 +3305,7 @@ S2.define('select2/data/select',[
|
|||||||
// Remove anything added to child elements
|
// Remove anything added to child elements
|
||||||
this.$element.find('*').each(function () {
|
this.$element.find('*').each(function () {
|
||||||
// Remove any custom data set by Select2
|
// Remove any custom data set by Select2
|
||||||
$.removeData(this, 'data');
|
Utils.RemoveData(this);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3231,7 +3378,7 @@ S2.define('select2/data/select',[
|
|||||||
normalizedData.element = option;
|
normalizedData.element = option;
|
||||||
|
|
||||||
// Override the option's data with the combined data
|
// Override the option's data with the combined data
|
||||||
$.data(option, 'data', normalizedData);
|
Utils.StoreData(option, 'data', normalizedData);
|
||||||
|
|
||||||
return $option;
|
return $option;
|
||||||
};
|
};
|
||||||
@@ -3239,7 +3386,7 @@ S2.define('select2/data/select',[
|
|||||||
SelectAdapter.prototype.item = function ($option) {
|
SelectAdapter.prototype.item = function ($option) {
|
||||||
var data = {};
|
var data = {};
|
||||||
|
|
||||||
data = $.data($option[0], 'data');
|
data = Utils.GetData($option[0], 'data');
|
||||||
|
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
return data;
|
return data;
|
||||||
@@ -3277,13 +3424,13 @@ S2.define('select2/data/select',[
|
|||||||
data = this._normalizeItem(data);
|
data = this._normalizeItem(data);
|
||||||
data.element = $option[0];
|
data.element = $option[0];
|
||||||
|
|
||||||
$.data($option[0], 'data', data);
|
Utils.StoreData($option[0], 'data', data);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
SelectAdapter.prototype._normalizeItem = function (item) {
|
SelectAdapter.prototype._normalizeItem = function (item) {
|
||||||
if (!$.isPlainObject(item)) {
|
if (item !== Object(item)) {
|
||||||
item = {
|
item = {
|
||||||
id: item,
|
id: item,
|
||||||
text: item
|
text: item
|
||||||
@@ -3329,15 +3476,19 @@ S2.define('select2/data/array',[
|
|||||||
'jquery'
|
'jquery'
|
||||||
], function (SelectAdapter, Utils, $) {
|
], function (SelectAdapter, Utils, $) {
|
||||||
function ArrayAdapter ($element, options) {
|
function ArrayAdapter ($element, options) {
|
||||||
var data = options.get('data') || [];
|
this._dataToConvert = options.get('data') || [];
|
||||||
|
|
||||||
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
||||||
|
|
||||||
this.addOptions(this.convertToOptions(data));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.Extend(ArrayAdapter, SelectAdapter);
|
Utils.Extend(ArrayAdapter, SelectAdapter);
|
||||||
|
|
||||||
|
ArrayAdapter.prototype.bind = function (container, $container) {
|
||||||
|
ArrayAdapter.__super__.bind.call(this, container, $container);
|
||||||
|
|
||||||
|
this.addOptions(this.convertToOptions(this._dataToConvert));
|
||||||
|
};
|
||||||
|
|
||||||
ArrayAdapter.prototype.select = function (data) {
|
ArrayAdapter.prototype.select = function (data) {
|
||||||
var $option = this.$element.find('option').filter(function (i, elm) {
|
var $option = this.$element.find('option').filter(function (i, elm) {
|
||||||
return elm.value == data.id.toString();
|
return elm.value == data.id.toString();
|
||||||
@@ -3487,7 +3638,8 @@ S2.define('select2/data/ajax',[
|
|||||||
}, function () {
|
}, function () {
|
||||||
// Attempt to detect if a request was aborted
|
// Attempt to detect if a request was aborted
|
||||||
// Only works if the transport exposes a status property
|
// Only works if the transport exposes a status property
|
||||||
if ($request.status && $request.status === '0') {
|
if ('status' in $request &&
|
||||||
|
($request.status === 0 || $request.status === '0')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3626,8 +3778,6 @@ S2.define('select2/data/tags',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
Tags.prototype._removeOldTags = function (_) {
|
Tags.prototype._removeOldTags = function (_) {
|
||||||
var tag = this._lastTag;
|
|
||||||
|
|
||||||
var $options = this.$element.find('option[data-select2-tag]');
|
var $options = this.$element.find('option[data-select2-tag]');
|
||||||
|
|
||||||
$options.each(function () {
|
$options.each(function () {
|
||||||
@@ -3702,7 +3852,7 @@ S2.define('select2/data/tokenizer',[
|
|||||||
// Replace the search term if we have the search box
|
// Replace the search term if we have the search box
|
||||||
if (this.$search.length) {
|
if (this.$search.length) {
|
||||||
this.$search.val(tokenData.term);
|
this.$search.val(tokenData.term);
|
||||||
this.$search.focus();
|
this.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
|
|
||||||
params.term = tokenData.term;
|
params.term = tokenData.term;
|
||||||
@@ -3831,10 +3981,30 @@ S2.define('select2/data/maximumSelectionLength',[
|
|||||||
decorated.call(this, $e, options);
|
decorated.call(this, $e, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaximumSelectionLength.prototype.bind =
|
||||||
|
function (decorated, container, $container) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
|
container.on('select', function () {
|
||||||
|
self._checkIfMaximumSelected();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
MaximumSelectionLength.prototype.query =
|
MaximumSelectionLength.prototype.query =
|
||||||
function (decorated, params, callback) {
|
function (decorated, params, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
this._checkIfMaximumSelected(function () {
|
||||||
|
decorated.call(self, params, callback);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
MaximumSelectionLength.prototype._checkIfMaximumSelected =
|
||||||
|
function (_, successCallback) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.current(function (currentData) {
|
this.current(function (currentData) {
|
||||||
var count = currentData != null ? currentData.length : 0;
|
var count = currentData != null ? currentData.length : 0;
|
||||||
if (self.maximumSelectionLength > 0 &&
|
if (self.maximumSelectionLength > 0 &&
|
||||||
@@ -3847,7 +4017,10 @@ S2.define('select2/data/maximumSelectionLength',[
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
decorated.call(self, params, callback);
|
|
||||||
|
if (successCallback) {
|
||||||
|
successCallback();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3886,7 +4059,7 @@ S2.define('select2/dropdown',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
Dropdown.prototype.position = function ($dropdown, $container) {
|
Dropdown.prototype.position = function ($dropdown, $container) {
|
||||||
// Should be implmented in subclasses
|
// Should be implemented in subclasses
|
||||||
};
|
};
|
||||||
|
|
||||||
Dropdown.prototype.destroy = function () {
|
Dropdown.prototype.destroy = function () {
|
||||||
@@ -3910,7 +4083,7 @@ S2.define('select2/dropdown/search',[
|
|||||||
'<span class="select2-search select2-search--dropdown">' +
|
'<span class="select2-search select2-search--dropdown">' +
|
||||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||||
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||||
' spellcheck="false" role="textbox" />' +
|
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
||||||
'</span>'
|
'</span>'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -3925,6 +4098,8 @@ S2.define('select2/dropdown/search',[
|
|||||||
Search.prototype.bind = function (decorated, container, $container) {
|
Search.prototype.bind = function (decorated, container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
var resultsId = container.id + '-results';
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
this.$search.on('keydown', function (evt) {
|
this.$search.on('keydown', function (evt) {
|
||||||
@@ -3947,23 +4122,27 @@ S2.define('select2/dropdown/search',[
|
|||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
self.$search.attr('tabindex', 0);
|
self.$search.attr('tabindex', 0);
|
||||||
|
self.$search.attr('aria-controls', resultsId);
|
||||||
|
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
|
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('close', function () {
|
container.on('close', function () {
|
||||||
self.$search.attr('tabindex', -1);
|
self.$search.attr('tabindex', -1);
|
||||||
|
self.$search.removeAttr('aria-controls');
|
||||||
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
|
|
||||||
self.$search.val('');
|
self.$search.val('');
|
||||||
|
self.$search.trigger('blur');
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('focus', function () {
|
container.on('focus', function () {
|
||||||
if (!container.isOpen()) {
|
if (!container.isOpen()) {
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3978,6 +4157,14 @@ S2.define('select2/dropdown/search',[
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
container.on('results:focus', function (params) {
|
||||||
|
if (params.data._resultId) {
|
||||||
|
self.$search.attr('aria-activedescendant', params.data._resultId);
|
||||||
|
} else {
|
||||||
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Search.prototype.handleSearch = function (evt) {
|
Search.prototype.handleSearch = function (evt) {
|
||||||
@@ -4062,6 +4249,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|||||||
|
|
||||||
if (this.showLoadingMore(data)) {
|
if (this.showLoadingMore(data)) {
|
||||||
this.$results.append(this.$loadingMore);
|
this.$results.append(this.$loadingMore);
|
||||||
|
this.loadMoreIfNeeded();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -4080,25 +4268,27 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|||||||
self.loading = true;
|
self.loading = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$results.on('scroll', function () {
|
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
|
||||||
|
};
|
||||||
|
|
||||||
|
InfiniteScroll.prototype.loadMoreIfNeeded = function () {
|
||||||
var isLoadMoreVisible = $.contains(
|
var isLoadMoreVisible = $.contains(
|
||||||
document.documentElement,
|
document.documentElement,
|
||||||
self.$loadingMore[0]
|
this.$loadingMore[0]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (self.loading || !isLoadMoreVisible) {
|
if (this.loading || !isLoadMoreVisible) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentOffset = self.$results.offset().top +
|
var currentOffset = this.$results.offset().top +
|
||||||
self.$results.outerHeight(false);
|
this.$results.outerHeight(false);
|
||||||
var loadingMoreOffset = self.$loadingMore.offset().top +
|
var loadingMoreOffset = this.$loadingMore.offset().top +
|
||||||
self.$loadingMore.outerHeight(false);
|
this.$loadingMore.outerHeight(false);
|
||||||
|
|
||||||
if (currentOffset + 50 >= loadingMoreOffset) {
|
if (currentOffset + 50 >= loadingMoreOffset) {
|
||||||
self.loadMore();
|
this.loadMore();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
InfiniteScroll.prototype.loadMore = function () {
|
InfiniteScroll.prototype.loadMore = function () {
|
||||||
@@ -4119,7 +4309,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|||||||
var $option = $(
|
var $option = $(
|
||||||
'<li ' +
|
'<li ' +
|
||||||
'class="select2-results__option select2-results__option--load-more"' +
|
'class="select2-results__option select2-results__option--load-more"' +
|
||||||
'role="treeitem" aria-disabled="true"></li>'
|
'role="option" aria-disabled="true"></li>'
|
||||||
);
|
);
|
||||||
|
|
||||||
var message = this.options.get('translations').get('loadingMore');
|
var message = this.options.get('translations').get('loadingMore');
|
||||||
@@ -4137,7 +4327,7 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
'../utils'
|
'../utils'
|
||||||
], function ($, Utils) {
|
], function ($, Utils) {
|
||||||
function AttachBody (decorated, $element, options) {
|
function AttachBody (decorated, $element, options) {
|
||||||
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
|
this.$dropdownParent = $(options.get('dropdownParent') || document.body);
|
||||||
|
|
||||||
decorated.call(this, $element, options);
|
decorated.call(this, $element, options);
|
||||||
}
|
}
|
||||||
@@ -4145,27 +4335,14 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
AttachBody.prototype.bind = function (decorated, container, $container) {
|
AttachBody.prototype.bind = function (decorated, container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
var setupResultsEvents = false;
|
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
self._showDropdown();
|
self._showDropdown();
|
||||||
self._attachPositioningHandler(container);
|
self._attachPositioningHandler(container);
|
||||||
|
|
||||||
if (!setupResultsEvents) {
|
// Must bind after the results handlers to ensure correct sizing
|
||||||
setupResultsEvents = true;
|
self._bindContainerResultHandlers(container);
|
||||||
|
|
||||||
container.on('results:all', function () {
|
|
||||||
self._positionDropdown();
|
|
||||||
self._resizeDropdown();
|
|
||||||
});
|
|
||||||
|
|
||||||
container.on('results:append', function () {
|
|
||||||
self._positionDropdown();
|
|
||||||
self._resizeDropdown();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('close', function () {
|
container.on('close', function () {
|
||||||
@@ -4214,6 +4391,44 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
this.$dropdownContainer.detach();
|
this.$dropdownContainer.detach();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
AttachBody.prototype._bindContainerResultHandlers =
|
||||||
|
function (decorated, container) {
|
||||||
|
|
||||||
|
// These should only be bound once
|
||||||
|
if (this._containerResultsHandlersBound) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
container.on('results:all', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('results:append', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('results:message', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('select', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('unselect', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
this._containerResultsHandlersBound = true;
|
||||||
|
};
|
||||||
|
|
||||||
AttachBody.prototype._attachPositioningHandler =
|
AttachBody.prototype._attachPositioningHandler =
|
||||||
function (decorated, container) {
|
function (decorated, container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -4224,14 +4439,14 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
|
|
||||||
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
||||||
$watchers.each(function () {
|
$watchers.each(function () {
|
||||||
$(this).data('select2-scroll-position', {
|
Utils.StoreData(this, 'select2-scroll-position', {
|
||||||
x: $(this).scrollLeft(),
|
x: $(this).scrollLeft(),
|
||||||
y: $(this).scrollTop()
|
y: $(this).scrollTop()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$watchers.on(scrollEvent, function (ev) {
|
$watchers.on(scrollEvent, function (ev) {
|
||||||
var position = $(this).data('select2-scroll-position');
|
var position = Utils.GetData(this, 'select2-scroll-position');
|
||||||
$(this).scrollTop(position.y);
|
$(this).scrollTop(position.y);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -4290,16 +4505,26 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
top: container.bottom
|
top: container.bottom
|
||||||
};
|
};
|
||||||
|
|
||||||
// Determine what the parent element is to use for calciulating the offset
|
// Determine what the parent element is to use for calculating the offset
|
||||||
var $offsetParent = this.$dropdownParent;
|
var $offsetParent = this.$dropdownParent;
|
||||||
|
|
||||||
// For statically positoned elements, we need to get the element
|
// For statically positioned elements, we need to get the element
|
||||||
// that is determining the offset
|
// that is determining the offset
|
||||||
if ($offsetParent.css('position') === 'static') {
|
if ($offsetParent.css('position') === 'static') {
|
||||||
$offsetParent = $offsetParent.offsetParent();
|
$offsetParent = $offsetParent.offsetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
var parentOffset = $offsetParent.offset();
|
var parentOffset = {
|
||||||
|
top: 0,
|
||||||
|
left: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
if (
|
||||||
|
$.contains(document.body, $offsetParent[0]) ||
|
||||||
|
$offsetParent[0].isConnected
|
||||||
|
) {
|
||||||
|
parentOffset = $offsetParent.offset();
|
||||||
|
}
|
||||||
|
|
||||||
css.top -= parentOffset.top;
|
css.top -= parentOffset.top;
|
||||||
css.left -= parentOffset.left;
|
css.left -= parentOffset.left;
|
||||||
@@ -4396,8 +4621,8 @@ S2.define('select2/dropdown/minimumResultsForSearch',[
|
|||||||
});
|
});
|
||||||
|
|
||||||
S2.define('select2/dropdown/selectOnClose',[
|
S2.define('select2/dropdown/selectOnClose',[
|
||||||
|
'../utils'
|
||||||
], function () {
|
], function (Utils) {
|
||||||
function SelectOnClose () { }
|
function SelectOnClose () { }
|
||||||
|
|
||||||
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
||||||
@@ -4428,7 +4653,7 @@ S2.define('select2/dropdown/selectOnClose',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = $highlightedResults.data('data');
|
var data = Utils.GetData($highlightedResults[0], 'data');
|
||||||
|
|
||||||
// Don't re-select already selected resulte
|
// Don't re-select already selected resulte
|
||||||
if (
|
if (
|
||||||
@@ -4469,7 +4694,7 @@ S2.define('select2/dropdown/closeOnSelect',[
|
|||||||
var originalEvent = evt.originalEvent;
|
var originalEvent = evt.originalEvent;
|
||||||
|
|
||||||
// Don't close if the control key is being held
|
// Don't close if the control key is being held
|
||||||
if (originalEvent && originalEvent.ctrlKey) {
|
if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4523,6 +4748,9 @@ S2.define('select2/i18n/en',[],function () {
|
|||||||
},
|
},
|
||||||
searching: function () {
|
searching: function () {
|
||||||
return 'Searching…';
|
return 'Searching…';
|
||||||
|
},
|
||||||
|
removeAllItems: function () {
|
||||||
|
return 'Remove all items';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -4761,66 +4989,29 @@ S2.define('select2/defaults',[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof options.language === 'string') {
|
// If the defaults were not previously applied from an element, it is
|
||||||
// Check if the language is specified with a region
|
// possible for the language option to have not been resolved
|
||||||
if (options.language.indexOf('-') > 0) {
|
options.language = this._resolveLanguage(options.language);
|
||||||
// Extract the region information if it is included
|
|
||||||
var languageParts = options.language.split('-');
|
|
||||||
var baseLanguage = languageParts[0];
|
|
||||||
|
|
||||||
options.language = [options.language, baseLanguage];
|
// Always fall back to English since it will always be complete
|
||||||
} else {
|
|
||||||
options.language = [options.language];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($.isArray(options.language)) {
|
|
||||||
var languages = new Translation();
|
|
||||||
options.language.push('en');
|
options.language.push('en');
|
||||||
|
|
||||||
var languageNames = options.language;
|
var uniqueLanguages = [];
|
||||||
|
|
||||||
for (var l = 0; l < languageNames.length; l++) {
|
for (var l = 0; l < options.language.length; l++) {
|
||||||
var name = languageNames[l];
|
var language = options.language[l];
|
||||||
var language = {};
|
|
||||||
|
|
||||||
try {
|
if (uniqueLanguages.indexOf(language) === -1) {
|
||||||
// Try to load it with the original name
|
uniqueLanguages.push(language);
|
||||||
language = Translation.loadPath(name);
|
}
|
||||||
} catch (e) {
|
}
|
||||||
try {
|
|
||||||
// If we couldn't load it, check if it wasn't the full path
|
options.language = uniqueLanguages;
|
||||||
name = this.defaults.amdLanguageBase + name;
|
|
||||||
language = Translation.loadPath(name);
|
options.translations = this._processTranslations(
|
||||||
} catch (ex) {
|
options.language,
|
||||||
// The translation could not be loaded at all. Sometimes this is
|
options.debug
|
||||||
// because of a configuration problem, other times this can be
|
|
||||||
// because of how Select2 helps load all possible translation files.
|
|
||||||
if (options.debug && window.console && console.warn) {
|
|
||||||
console.warn(
|
|
||||||
'Select2: The language file for "' + name + '" could not be ' +
|
|
||||||
'automatically loaded. A fallback will be used instead.'
|
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
languages.extend(language);
|
|
||||||
}
|
|
||||||
|
|
||||||
options.translations = languages;
|
|
||||||
} else {
|
|
||||||
var baseTranslation = Translation.loadPath(
|
|
||||||
this.defaults.amdLanguageBase + 'en'
|
|
||||||
);
|
|
||||||
var customTranslation = new Translation(options.language);
|
|
||||||
|
|
||||||
customTranslation.extend(baseTranslation);
|
|
||||||
|
|
||||||
options.translations = customTranslation;
|
|
||||||
}
|
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
};
|
};
|
||||||
@@ -4887,13 +5078,14 @@ S2.define('select2/defaults',[
|
|||||||
debug: false,
|
debug: false,
|
||||||
dropdownAutoWidth: false,
|
dropdownAutoWidth: false,
|
||||||
escapeMarkup: Utils.escapeMarkup,
|
escapeMarkup: Utils.escapeMarkup,
|
||||||
language: EnglishTranslation,
|
language: {},
|
||||||
matcher: matcher,
|
matcher: matcher,
|
||||||
minimumInputLength: 0,
|
minimumInputLength: 0,
|
||||||
maximumInputLength: 0,
|
maximumInputLength: 0,
|
||||||
maximumSelectionLength: 0,
|
maximumSelectionLength: 0,
|
||||||
minimumResultsForSearch: 0,
|
minimumResultsForSearch: 0,
|
||||||
selectOnClose: false,
|
selectOnClose: false,
|
||||||
|
scrollAfterSelect: false,
|
||||||
sorter: function (data) {
|
sorter: function (data) {
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
@@ -4908,6 +5100,103 @@ S2.define('select2/defaults',[
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Defaults.prototype.applyFromElement = function (options, $element) {
|
||||||
|
var optionLanguage = options.language;
|
||||||
|
var defaultLanguage = this.defaults.language;
|
||||||
|
var elementLanguage = $element.prop('lang');
|
||||||
|
var parentLanguage = $element.closest('[lang]').prop('lang');
|
||||||
|
|
||||||
|
var languages = Array.prototype.concat.call(
|
||||||
|
this._resolveLanguage(elementLanguage),
|
||||||
|
this._resolveLanguage(optionLanguage),
|
||||||
|
this._resolveLanguage(defaultLanguage),
|
||||||
|
this._resolveLanguage(parentLanguage)
|
||||||
|
);
|
||||||
|
|
||||||
|
options.language = languages;
|
||||||
|
|
||||||
|
return options;
|
||||||
|
};
|
||||||
|
|
||||||
|
Defaults.prototype._resolveLanguage = function (language) {
|
||||||
|
if (!language) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.isEmptyObject(language)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.isPlainObject(language)) {
|
||||||
|
return [language];
|
||||||
|
}
|
||||||
|
|
||||||
|
var languages;
|
||||||
|
|
||||||
|
if (!$.isArray(language)) {
|
||||||
|
languages = [language];
|
||||||
|
} else {
|
||||||
|
languages = language;
|
||||||
|
}
|
||||||
|
|
||||||
|
var resolvedLanguages = [];
|
||||||
|
|
||||||
|
for (var l = 0; l < languages.length; l++) {
|
||||||
|
resolvedLanguages.push(languages[l]);
|
||||||
|
|
||||||
|
if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
|
||||||
|
// Extract the region information if it is included
|
||||||
|
var languageParts = languages[l].split('-');
|
||||||
|
var baseLanguage = languageParts[0];
|
||||||
|
|
||||||
|
resolvedLanguages.push(baseLanguage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return resolvedLanguages;
|
||||||
|
};
|
||||||
|
|
||||||
|
Defaults.prototype._processTranslations = function (languages, debug) {
|
||||||
|
var translations = new Translation();
|
||||||
|
|
||||||
|
for (var l = 0; l < languages.length; l++) {
|
||||||
|
var languageData = new Translation();
|
||||||
|
|
||||||
|
var language = languages[l];
|
||||||
|
|
||||||
|
if (typeof language === 'string') {
|
||||||
|
try {
|
||||||
|
// Try to load it with the original name
|
||||||
|
languageData = Translation.loadPath(language);
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
// If we couldn't load it, check if it wasn't the full path
|
||||||
|
language = this.defaults.amdLanguageBase + language;
|
||||||
|
languageData = Translation.loadPath(language);
|
||||||
|
} catch (ex) {
|
||||||
|
// The translation could not be loaded at all. Sometimes this is
|
||||||
|
// because of a configuration problem, other times this can be
|
||||||
|
// because of how Select2 helps load all possible translation files
|
||||||
|
if (debug && window.console && console.warn) {
|
||||||
|
console.warn(
|
||||||
|
'Select2: The language file for "' + language + '" could ' +
|
||||||
|
'not be automatically loaded. A fallback will be used instead.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ($.isPlainObject(language)) {
|
||||||
|
languageData = new Translation(language);
|
||||||
|
} else {
|
||||||
|
languageData = language;
|
||||||
|
}
|
||||||
|
|
||||||
|
translations.extend(languageData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return translations;
|
||||||
|
};
|
||||||
|
|
||||||
Defaults.prototype.set = function (key, value) {
|
Defaults.prototype.set = function (key, value) {
|
||||||
var camelKey = $.camelCase(key);
|
var camelKey = $.camelCase(key);
|
||||||
|
|
||||||
@@ -4916,7 +5205,7 @@ S2.define('select2/defaults',[
|
|||||||
|
|
||||||
var convertedData = Utils._convertData(data);
|
var convertedData = Utils._convertData(data);
|
||||||
|
|
||||||
$.extend(this.defaults, convertedData);
|
$.extend(true, this.defaults, convertedData);
|
||||||
};
|
};
|
||||||
|
|
||||||
var defaults = new Defaults();
|
var defaults = new Defaults();
|
||||||
@@ -4937,6 +5226,10 @@ S2.define('select2/options',[
|
|||||||
this.fromElement($element);
|
this.fromElement($element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($element != null) {
|
||||||
|
this.options = Defaults.applyFromElement(this.options, $element);
|
||||||
|
}
|
||||||
|
|
||||||
this.options = Defaults.apply(this.options);
|
this.options = Defaults.apply(this.options);
|
||||||
|
|
||||||
if ($element && $element.is('input')) {
|
if ($element && $element.is('input')) {
|
||||||
@@ -4960,14 +5253,6 @@ S2.define('select2/options',[
|
|||||||
this.options.disabled = $e.prop('disabled');
|
this.options.disabled = $e.prop('disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.language == null) {
|
|
||||||
if ($e.prop('lang')) {
|
|
||||||
this.options.language = $e.prop('lang').toLowerCase();
|
|
||||||
} else if ($e.closest('[lang]').prop('lang')) {
|
|
||||||
this.options.language = $e.closest('[lang]').prop('lang');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.options.dir == null) {
|
if (this.options.dir == null) {
|
||||||
if ($e.prop('dir')) {
|
if ($e.prop('dir')) {
|
||||||
this.options.dir = $e.prop('dir');
|
this.options.dir = $e.prop('dir');
|
||||||
@@ -4981,7 +5266,7 @@ S2.define('select2/options',[
|
|||||||
$e.prop('disabled', this.options.disabled);
|
$e.prop('disabled', this.options.disabled);
|
||||||
$e.prop('multiple', this.options.multiple);
|
$e.prop('multiple', this.options.multiple);
|
||||||
|
|
||||||
if ($e.data('select2Tags')) {
|
if (Utils.GetData($e[0], 'select2Tags')) {
|
||||||
if (this.options.debug && window.console && console.warn) {
|
if (this.options.debug && window.console && console.warn) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
||||||
@@ -4990,11 +5275,11 @@ S2.define('select2/options',[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$e.data('data', $e.data('select2Tags'));
|
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
|
||||||
$e.data('tags', true);
|
Utils.StoreData($e[0], 'tags', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($e.data('ajaxUrl')) {
|
if (Utils.GetData($e[0], 'ajaxUrl')) {
|
||||||
if (this.options.debug && window.console && console.warn) {
|
if (this.options.debug && window.console && console.warn) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
||||||
@@ -5003,21 +5288,45 @@ S2.define('select2/options',[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$e.attr('ajax--url', $e.data('ajaxUrl'));
|
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
|
||||||
$e.data('ajax--url', $e.data('ajaxUrl'));
|
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataset = {};
|
var dataset = {};
|
||||||
|
|
||||||
|
function upperCaseLetter(_, letter) {
|
||||||
|
return letter.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pre-load all of the attributes which are prefixed with `data-`
|
||||||
|
for (var attr = 0; attr < $e[0].attributes.length; attr++) {
|
||||||
|
var attributeName = $e[0].attributes[attr].name;
|
||||||
|
var prefix = 'data-';
|
||||||
|
|
||||||
|
if (attributeName.substr(0, prefix.length) == prefix) {
|
||||||
|
// Get the contents of the attribute after `data-`
|
||||||
|
var dataName = attributeName.substring(prefix.length);
|
||||||
|
|
||||||
|
// Get the data contents from the consistent source
|
||||||
|
// This is more than likely the jQuery data helper
|
||||||
|
var dataValue = Utils.GetData($e[0], dataName);
|
||||||
|
|
||||||
|
// camelCase the attribute name to match the spec
|
||||||
|
var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
|
||||||
|
|
||||||
|
// Store the data attribute contents into the dataset since
|
||||||
|
dataset[camelDataName] = dataValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Prefer the element's `dataset` attribute if it exists
|
// Prefer the element's `dataset` attribute if it exists
|
||||||
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
||||||
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
||||||
dataset = $.extend(true, {}, $e[0].dataset, $e.data());
|
dataset = $.extend(true, {}, $e[0].dataset, dataset);
|
||||||
} else {
|
|
||||||
dataset = $e.data();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = $.extend(true, {}, dataset);
|
// Prefer our internal data cache if it exists
|
||||||
|
var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
|
||||||
|
|
||||||
data = Utils._convertData(data);
|
data = Utils._convertData(data);
|
||||||
|
|
||||||
@@ -5054,8 +5363,8 @@ S2.define('select2/core',[
|
|||||||
'./keys'
|
'./keys'
|
||||||
], function ($, Options, Utils, KEYS) {
|
], function ($, Options, Utils, KEYS) {
|
||||||
var Select2 = function ($element, options) {
|
var Select2 = function ($element, options) {
|
||||||
if ($element.data('select2') != null) {
|
if (Utils.GetData($element[0], 'select2') != null) {
|
||||||
$element.data('select2').destroy();
|
Utils.GetData($element[0], 'select2').destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element = $element;
|
this.$element = $element;
|
||||||
@@ -5071,7 +5380,7 @@ S2.define('select2/core',[
|
|||||||
// Set up the tabindex
|
// Set up the tabindex
|
||||||
|
|
||||||
var tabindex = $element.attr('tabindex') || 0;
|
var tabindex = $element.attr('tabindex') || 0;
|
||||||
$element.data('old-tabindex', tabindex);
|
Utils.StoreData($element[0], 'old-tabindex', tabindex);
|
||||||
$element.attr('tabindex', '-1');
|
$element.attr('tabindex', '-1');
|
||||||
|
|
||||||
// Set up containers and adapters
|
// Set up containers and adapters
|
||||||
@@ -5132,6 +5441,9 @@ S2.define('select2/core',[
|
|||||||
// Synchronize any monitored attributes
|
// Synchronize any monitored attributes
|
||||||
this._syncAttributes();
|
this._syncAttributes();
|
||||||
|
|
||||||
|
Utils.StoreData($element[0], 'select2', this);
|
||||||
|
|
||||||
|
// Ensure backwards compatibility with $element.data('select2').
|
||||||
$element.data('select2', this);
|
$element.data('select2', this);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5208,6 +5520,12 @@ S2.define('select2/core',[
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (method == 'computedstyle') {
|
||||||
|
var computedStyle = window.getComputedStyle($element[0]);
|
||||||
|
|
||||||
|
return computedStyle.width;
|
||||||
|
}
|
||||||
|
|
||||||
return method;
|
return method;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5248,8 +5566,8 @@ S2.define('select2/core',[
|
|||||||
|
|
||||||
if (observer != null) {
|
if (observer != null) {
|
||||||
this._observer = new observer(function (mutations) {
|
this._observer = new observer(function (mutations) {
|
||||||
$.each(mutations, self._syncA);
|
self._syncA();
|
||||||
$.each(mutations, self._syncS);
|
self._syncS(null, mutations);
|
||||||
});
|
});
|
||||||
this._observer.observe(this.$element[0], {
|
this._observer.observe(this.$element[0], {
|
||||||
attributes: true,
|
attributes: true,
|
||||||
@@ -5371,7 +5689,7 @@ S2.define('select2/core',[
|
|||||||
if (self.isOpen()) {
|
if (self.isOpen()) {
|
||||||
if (key === KEYS.ESC || key === KEYS.TAB ||
|
if (key === KEYS.ESC || key === KEYS.TAB ||
|
||||||
(key === KEYS.UP && evt.altKey)) {
|
(key === KEYS.UP && evt.altKey)) {
|
||||||
self.close();
|
self.close(evt);
|
||||||
|
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
} else if (key === KEYS.ENTER) {
|
} else if (key === KEYS.ENTER) {
|
||||||
@@ -5405,7 +5723,7 @@ S2.define('select2/core',[
|
|||||||
Select2.prototype._syncAttributes = function () {
|
Select2.prototype._syncAttributes = function () {
|
||||||
this.options.set('disabled', this.$element.prop('disabled'));
|
this.options.set('disabled', this.$element.prop('disabled'));
|
||||||
|
|
||||||
if (this.options.get('disabled')) {
|
if (this.isDisabled()) {
|
||||||
if (this.isOpen()) {
|
if (this.isOpen()) {
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
@@ -5416,7 +5734,7 @@ S2.define('select2/core',[
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype._syncSubtree = function (evt, mutations) {
|
Select2.prototype._isChangeMutation = function (evt, mutations) {
|
||||||
var changed = false;
|
var changed = false;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
@@ -5444,7 +5762,22 @@ S2.define('select2/core',[
|
|||||||
}
|
}
|
||||||
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
||||||
changed = true;
|
changed = true;
|
||||||
|
} else if ($.isArray(mutations)) {
|
||||||
|
$.each(mutations, function(evt, mutation) {
|
||||||
|
if (self._isChangeMutation(evt, mutation)) {
|
||||||
|
// We've found a change mutation.
|
||||||
|
// Let's escape from the loop and continue
|
||||||
|
changed = true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return changed;
|
||||||
|
};
|
||||||
|
|
||||||
|
Select2.prototype._syncSubtree = function (evt, mutations) {
|
||||||
|
var changed = this._isChangeMutation(evt, mutations);
|
||||||
|
var self = this;
|
||||||
|
|
||||||
// Only re-pull the data if we think there is a change
|
// Only re-pull the data if we think there is a change
|
||||||
if (changed) {
|
if (changed) {
|
||||||
@@ -5466,7 +5799,8 @@ S2.define('select2/core',[
|
|||||||
'open': 'opening',
|
'open': 'opening',
|
||||||
'close': 'closing',
|
'close': 'closing',
|
||||||
'select': 'selecting',
|
'select': 'selecting',
|
||||||
'unselect': 'unselecting'
|
'unselect': 'unselecting',
|
||||||
|
'clear': 'clearing'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (args === undefined) {
|
if (args === undefined) {
|
||||||
@@ -5494,7 +5828,7 @@ S2.define('select2/core',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.toggleDropdown = function () {
|
Select2.prototype.toggleDropdown = function () {
|
||||||
if (this.options.get('disabled')) {
|
if (this.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5510,15 +5844,40 @@ S2.define('select2/core',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isDisabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.trigger('query', {});
|
this.trigger('query', {});
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.close = function () {
|
Select2.prototype.close = function (evt) {
|
||||||
if (!this.isOpen()) {
|
if (!this.isOpen()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.trigger('close', {});
|
this.trigger('close', { originalEvent : evt });
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "enabled" (not "disabled") state of this
|
||||||
|
* object.
|
||||||
|
*
|
||||||
|
* @return {true} if the instance is not disabled.
|
||||||
|
* @return {false} if the instance is disabled.
|
||||||
|
*/
|
||||||
|
Select2.prototype.isEnabled = function () {
|
||||||
|
return !this.isDisabled();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "disabled" state of this object.
|
||||||
|
*
|
||||||
|
* @return {true} if the disabled option is true.
|
||||||
|
* @return {false} if the disabled option is false.
|
||||||
|
*/
|
||||||
|
Select2.prototype.isDisabled = function () {
|
||||||
|
return this.options.get('disabled');
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.isOpen = function () {
|
Select2.prototype.isOpen = function () {
|
||||||
@@ -5595,7 +5954,7 @@ S2.define('select2/core',[
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element.val(newVal).trigger('change');
|
this.$element.val(newVal).trigger('input').trigger('change');
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.destroy = function () {
|
Select2.prototype.destroy = function () {
|
||||||
@@ -5621,10 +5980,12 @@ S2.define('select2/core',[
|
|||||||
this._syncS = null;
|
this._syncS = null;
|
||||||
|
|
||||||
this.$element.off('.select2');
|
this.$element.off('.select2');
|
||||||
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
|
this.$element.attr('tabindex',
|
||||||
|
Utils.GetData(this.$element[0], 'old-tabindex'));
|
||||||
|
|
||||||
this.$element.removeClass('select2-hidden-accessible');
|
this.$element.removeClass('select2-hidden-accessible');
|
||||||
this.$element.attr('aria-hidden', 'false');
|
this.$element.attr('aria-hidden', 'false');
|
||||||
|
Utils.RemoveData(this.$element[0]);
|
||||||
this.$element.removeData('select2');
|
this.$element.removeData('select2');
|
||||||
|
|
||||||
this.dataAdapter.destroy();
|
this.dataAdapter.destroy();
|
||||||
@@ -5652,7 +6013,7 @@ S2.define('select2/core',[
|
|||||||
|
|
||||||
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
||||||
|
|
||||||
$container.data('element', this.$element);
|
Utils.StoreData($container[0], 'element', this.$element);
|
||||||
|
|
||||||
return $container;
|
return $container;
|
||||||
};
|
};
|
||||||
@@ -5862,8 +6223,9 @@ S2.define('select2/compat/initSelection',[
|
|||||||
});
|
});
|
||||||
|
|
||||||
S2.define('select2/compat/inputData',[
|
S2.define('select2/compat/inputData',[
|
||||||
'jquery'
|
'jquery',
|
||||||
], function ($) {
|
'../utils'
|
||||||
|
], function ($, Utils) {
|
||||||
function InputData (decorated, $element, options) {
|
function InputData (decorated, $element, options) {
|
||||||
this._currentData = [];
|
this._currentData = [];
|
||||||
this._valueSeparator = options.get('valueSeparator') || ',';
|
this._valueSeparator = options.get('valueSeparator') || ',';
|
||||||
@@ -5927,13 +6289,13 @@ S2.define('select2/compat/inputData',[
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.$element.val(data.id);
|
this.$element.val(data.id);
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
} else {
|
} else {
|
||||||
var value = this.$element.val();
|
var value = this.$element.val();
|
||||||
value += this._valueSeparator + data.id;
|
value += this._valueSeparator + data.id;
|
||||||
|
|
||||||
this.$element.val(value);
|
this.$element.val(value);
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5956,7 +6318,7 @@ S2.define('select2/compat/inputData',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.$element.val(values.join(self._valueSeparator));
|
self.$element.val(values.join(self._valueSeparator));
|
||||||
self.$element.trigger('change');
|
self.$element.trigger('input').trigger('change');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5980,7 +6342,7 @@ S2.define('select2/compat/inputData',[
|
|||||||
|
|
||||||
InputData.prototype.addOptions = function (_, $options) {
|
InputData.prototype.addOptions = function (_, $options) {
|
||||||
var options = $.map($options, function ($option) {
|
var options = $.map($options, function ($option) {
|
||||||
return $.data($option[0], 'data');
|
return Utils.GetData($option[0], 'data');
|
||||||
});
|
});
|
||||||
|
|
||||||
this._currentData.push.apply(this._currentData, options);
|
this._currentData.push.apply(this._currentData, options);
|
||||||
@@ -6383,8 +6745,9 @@ S2.define('jquery.select2',[
|
|||||||
'jquery-mousewheel',
|
'jquery-mousewheel',
|
||||||
|
|
||||||
'./select2/core',
|
'./select2/core',
|
||||||
'./select2/defaults'
|
'./select2/defaults',
|
||||||
], function ($, _, Select2, Defaults) {
|
'./select2/utils'
|
||||||
|
], function ($, _, Select2, Defaults, Utils) {
|
||||||
if ($.fn.select2 == null) {
|
if ($.fn.select2 == null) {
|
||||||
// All methods that should return the element
|
// All methods that should return the element
|
||||||
var thisMethods = ['open', 'close', 'destroy'];
|
var thisMethods = ['open', 'close', 'destroy'];
|
||||||
@@ -6405,7 +6768,7 @@ S2.define('jquery.select2',[
|
|||||||
var args = Array.prototype.slice.call(arguments, 1);
|
var args = Array.prototype.slice.call(arguments, 1);
|
||||||
|
|
||||||
this.each(function () {
|
this.each(function () {
|
||||||
var instance = $(this).data('select2');
|
var instance = Utils.GetData(this, 'select2');
|
||||||
|
|
||||||
if (instance == null && window.console && console.error) {
|
if (instance == null && window.console && console.error) {
|
||||||
console.error(
|
console.error(
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/*!
|
/*!
|
||||||
* Select2 4.0.5
|
* Select2 4.0.13
|
||||||
* https://select2.github.io
|
* https://select2.github.io
|
||||||
*
|
*
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/select2/select2/blob/master/LICENSE.md
|
* https://github.com/select2/select2/blob/master/LICENSE.md
|
||||||
*/
|
*/
|
||||||
(function (factory) {
|
;(function (factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// AMD. Register as an anonymous module.
|
// AMD. Register as an anonymous module.
|
||||||
define(['jquery'], factory);
|
define(['jquery'], factory);
|
||||||
@@ -772,6 +772,70 @@ S2.define('select2/utils',[
|
|||||||
$element.append($nodes);
|
$element.append($nodes);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Cache objects in Utils.__cache instead of $.data (see #4346)
|
||||||
|
Utils.__cache = {};
|
||||||
|
|
||||||
|
var id = 0;
|
||||||
|
Utils.GetUniqueElementId = function (element) {
|
||||||
|
// Get a unique element Id. If element has no id,
|
||||||
|
// creates a new unique number, stores it in the id
|
||||||
|
// attribute and returns the new id.
|
||||||
|
// If an id already exists, it simply returns it.
|
||||||
|
|
||||||
|
var select2Id = element.getAttribute('data-select2-id');
|
||||||
|
if (select2Id == null) {
|
||||||
|
// If element has id, use it.
|
||||||
|
if (element.id) {
|
||||||
|
select2Id = element.id;
|
||||||
|
element.setAttribute('data-select2-id', select2Id);
|
||||||
|
} else {
|
||||||
|
element.setAttribute('data-select2-id', ++id);
|
||||||
|
select2Id = id.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return select2Id;
|
||||||
|
};
|
||||||
|
|
||||||
|
Utils.StoreData = function (element, name, value) {
|
||||||
|
// Stores an item in the cache for a specified element.
|
||||||
|
// name is the cache key.
|
||||||
|
var id = Utils.GetUniqueElementId(element);
|
||||||
|
if (!Utils.__cache[id]) {
|
||||||
|
Utils.__cache[id] = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
Utils.__cache[id][name] = value;
|
||||||
|
};
|
||||||
|
|
||||||
|
Utils.GetData = function (element, name) {
|
||||||
|
// Retrieves a value from the cache by its key (name)
|
||||||
|
// name is optional. If no name specified, return
|
||||||
|
// all cache items for the specified element.
|
||||||
|
// and for a specified element.
|
||||||
|
var id = Utils.GetUniqueElementId(element);
|
||||||
|
if (name) {
|
||||||
|
if (Utils.__cache[id]) {
|
||||||
|
if (Utils.__cache[id][name] != null) {
|
||||||
|
return Utils.__cache[id][name];
|
||||||
|
}
|
||||||
|
return $(element).data(name); // Fallback to HTML5 data attribs.
|
||||||
|
}
|
||||||
|
return $(element).data(name); // Fallback to HTML5 data attribs.
|
||||||
|
} else {
|
||||||
|
return Utils.__cache[id];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Utils.RemoveData = function (element) {
|
||||||
|
// Removes all cached items for a specified element.
|
||||||
|
var id = Utils.GetUniqueElementId(element);
|
||||||
|
if (Utils.__cache[id] != null) {
|
||||||
|
delete Utils.__cache[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
element.removeAttribute('data-select2-id');
|
||||||
|
};
|
||||||
|
|
||||||
return Utils;
|
return Utils;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -791,7 +855,7 @@ S2.define('select2/results',[
|
|||||||
|
|
||||||
Results.prototype.render = function () {
|
Results.prototype.render = function () {
|
||||||
var $results = $(
|
var $results = $(
|
||||||
'<ul class="select2-results__options" role="tree"></ul>'
|
'<ul class="select2-results__options" role="listbox"></ul>'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (this.options.get('multiple')) {
|
if (this.options.get('multiple')) {
|
||||||
@@ -814,7 +878,7 @@ S2.define('select2/results',[
|
|||||||
this.hideLoading();
|
this.hideLoading();
|
||||||
|
|
||||||
var $message = $(
|
var $message = $(
|
||||||
'<li role="treeitem" aria-live="assertive"' +
|
'<li role="alert" aria-live="assertive"' +
|
||||||
' class="select2-results__option"></li>'
|
' class="select2-results__option"></li>'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -907,7 +971,7 @@ S2.define('select2/results',[
|
|||||||
$options.each(function () {
|
$options.each(function () {
|
||||||
var $option = $(this);
|
var $option = $(this);
|
||||||
|
|
||||||
var item = $.data(this, 'data');
|
var item = Utils.GetData(this, 'data');
|
||||||
|
|
||||||
// id needs to be converted to a string when comparing
|
// id needs to be converted to a string when comparing
|
||||||
var id = '' + item.id;
|
var id = '' + item.id;
|
||||||
@@ -948,11 +1012,16 @@ S2.define('select2/results',[
|
|||||||
option.className = 'select2-results__option';
|
option.className = 'select2-results__option';
|
||||||
|
|
||||||
var attrs = {
|
var attrs = {
|
||||||
'role': 'treeitem',
|
'role': 'option',
|
||||||
'aria-selected': 'false'
|
'aria-selected': 'false'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.disabled) {
|
var matches = window.Element.prototype.matches ||
|
||||||
|
window.Element.prototype.msMatchesSelector ||
|
||||||
|
window.Element.prototype.webkitMatchesSelector;
|
||||||
|
|
||||||
|
if ((data.element != null && matches.call(data.element, ':disabled')) ||
|
||||||
|
(data.element == null && data.disabled)) {
|
||||||
delete attrs['aria-selected'];
|
delete attrs['aria-selected'];
|
||||||
attrs['aria-disabled'] = 'true';
|
attrs['aria-disabled'] = 'true';
|
||||||
}
|
}
|
||||||
@@ -1012,7 +1081,7 @@ S2.define('select2/results',[
|
|||||||
this.template(data, option);
|
this.template(data, option);
|
||||||
}
|
}
|
||||||
|
|
||||||
$.data(option, 'data', data);
|
Utils.StoreData(option, 'data', data);
|
||||||
|
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
@@ -1053,7 +1122,10 @@ S2.define('select2/results',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.setClasses();
|
self.setClasses();
|
||||||
|
|
||||||
|
if (self.options.get('scrollAfterSelect')) {
|
||||||
self.highlightFirstItem();
|
self.highlightFirstItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('unselect', function () {
|
container.on('unselect', function () {
|
||||||
@@ -1062,7 +1134,10 @@ S2.define('select2/results',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.setClasses();
|
self.setClasses();
|
||||||
|
|
||||||
|
if (self.options.get('scrollAfterSelect')) {
|
||||||
self.highlightFirstItem();
|
self.highlightFirstItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
@@ -1098,7 +1173,7 @@ S2.define('select2/results',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = $highlighted.data('data');
|
var data = Utils.GetData($highlighted[0], 'data');
|
||||||
|
|
||||||
if ($highlighted.attr('aria-selected') == 'true') {
|
if ($highlighted.attr('aria-selected') == 'true') {
|
||||||
self.trigger('close', {});
|
self.trigger('close', {});
|
||||||
@@ -1116,8 +1191,9 @@ S2.define('select2/results',[
|
|||||||
|
|
||||||
var currentIndex = $options.index($highlighted);
|
var currentIndex = $options.index($highlighted);
|
||||||
|
|
||||||
// If we are already at te top, don't move further
|
// If we are already at the top, don't move further
|
||||||
if (currentIndex === 0) {
|
// If no options, currentIndex will be -1
|
||||||
|
if (currentIndex <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1210,7 +1286,7 @@ S2.define('select2/results',[
|
|||||||
function (evt) {
|
function (evt) {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
var data = $this.data('data');
|
var data = Utils.GetData(this, 'data');
|
||||||
|
|
||||||
if ($this.attr('aria-selected') === 'true') {
|
if ($this.attr('aria-selected') === 'true') {
|
||||||
if (self.options.get('multiple')) {
|
if (self.options.get('multiple')) {
|
||||||
@@ -1233,7 +1309,7 @@ S2.define('select2/results',[
|
|||||||
|
|
||||||
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
||||||
function (evt) {
|
function (evt) {
|
||||||
var data = $(this).data('data');
|
var data = Utils.GetData(this, 'data');
|
||||||
|
|
||||||
self.getHighlightedResults()
|
self.getHighlightedResults()
|
||||||
.removeClass('select2-results__option--highlighted');
|
.removeClass('select2-results__option--highlighted');
|
||||||
@@ -1348,14 +1424,15 @@ S2.define('select2/selection/base',[
|
|||||||
|
|
||||||
this._tabindex = 0;
|
this._tabindex = 0;
|
||||||
|
|
||||||
if (this.$element.data('old-tabindex') != null) {
|
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
|
||||||
this._tabindex = this.$element.data('old-tabindex');
|
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
|
||||||
} else if (this.$element.attr('tabindex') != null) {
|
} else if (this.$element.attr('tabindex') != null) {
|
||||||
this._tabindex = this.$element.attr('tabindex');
|
this._tabindex = this.$element.attr('tabindex');
|
||||||
}
|
}
|
||||||
|
|
||||||
$selection.attr('title', this.$element.attr('title'));
|
$selection.attr('title', this.$element.attr('title'));
|
||||||
$selection.attr('tabindex', this._tabindex);
|
$selection.attr('tabindex', this._tabindex);
|
||||||
|
$selection.attr('aria-disabled', 'false');
|
||||||
|
|
||||||
this.$selection = $selection;
|
this.$selection = $selection;
|
||||||
|
|
||||||
@@ -1365,7 +1442,6 @@ S2.define('select2/selection/base',[
|
|||||||
BaseSelection.prototype.bind = function (container, $container) {
|
BaseSelection.prototype.bind = function (container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
var id = container.id + '-container';
|
|
||||||
var resultsId = container.id + '-results';
|
var resultsId = container.id + '-results';
|
||||||
|
|
||||||
this.container = container;
|
this.container = container;
|
||||||
@@ -1408,17 +1484,19 @@ S2.define('select2/selection/base',[
|
|||||||
self.$selection.removeAttr('aria-activedescendant');
|
self.$selection.removeAttr('aria-activedescendant');
|
||||||
self.$selection.removeAttr('aria-owns');
|
self.$selection.removeAttr('aria-owns');
|
||||||
|
|
||||||
self.$selection.focus();
|
self.$selection.trigger('focus');
|
||||||
|
|
||||||
self._detachCloseHandler(container);
|
self._detachCloseHandler(container);
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('enable', function () {
|
container.on('enable', function () {
|
||||||
self.$selection.attr('tabindex', self._tabindex);
|
self.$selection.attr('tabindex', self._tabindex);
|
||||||
|
self.$selection.attr('aria-disabled', 'false');
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('disable', function () {
|
container.on('disable', function () {
|
||||||
self.$selection.attr('tabindex', '-1');
|
self.$selection.attr('tabindex', '-1');
|
||||||
|
self.$selection.attr('aria-disabled', 'true');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1441,7 +1519,6 @@ S2.define('select2/selection/base',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
BaseSelection.prototype._attachCloseHandler = function (container) {
|
BaseSelection.prototype._attachCloseHandler = function (container) {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
||||||
var $target = $(e.target);
|
var $target = $(e.target);
|
||||||
@@ -1451,13 +1528,11 @@ S2.define('select2/selection/base',[
|
|||||||
var $all = $('.select2.select2-container--open');
|
var $all = $('.select2.select2-container--open');
|
||||||
|
|
||||||
$all.each(function () {
|
$all.each(function () {
|
||||||
var $this = $(this);
|
|
||||||
|
|
||||||
if (this == $select[0]) {
|
if (this == $select[0]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $element = $this.data('element');
|
var $element = Utils.GetData(this, 'element');
|
||||||
|
|
||||||
$element.select2('close');
|
$element.select2('close');
|
||||||
});
|
});
|
||||||
@@ -1481,6 +1556,27 @@ S2.define('select2/selection/base',[
|
|||||||
throw new Error('The `update` method must be defined in child classes.');
|
throw new Error('The `update` method must be defined in child classes.');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "enabled" (not "disabled") state of this
|
||||||
|
* object.
|
||||||
|
*
|
||||||
|
* @return {true} if the instance is not disabled.
|
||||||
|
* @return {false} if the instance is disabled.
|
||||||
|
*/
|
||||||
|
BaseSelection.prototype.isEnabled = function () {
|
||||||
|
return !this.isDisabled();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "disabled" state of this object.
|
||||||
|
*
|
||||||
|
* @return {true} if the disabled option is true.
|
||||||
|
* @return {false} if the disabled option is false.
|
||||||
|
*/
|
||||||
|
BaseSelection.prototype.isDisabled = function () {
|
||||||
|
return this.options.get('disabled');
|
||||||
|
};
|
||||||
|
|
||||||
return BaseSelection;
|
return BaseSelection;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1518,7 +1614,10 @@ S2.define('select2/selection/single',[
|
|||||||
|
|
||||||
var id = container.id + '-container';
|
var id = container.id + '-container';
|
||||||
|
|
||||||
this.$selection.find('.select2-selection__rendered').attr('id', id);
|
this.$selection.find('.select2-selection__rendered')
|
||||||
|
.attr('id', id)
|
||||||
|
.attr('role', 'textbox')
|
||||||
|
.attr('aria-readonly', 'true');
|
||||||
this.$selection.attr('aria-labelledby', id);
|
this.$selection.attr('aria-labelledby', id);
|
||||||
|
|
||||||
this.$selection.on('mousedown', function (evt) {
|
this.$selection.on('mousedown', function (evt) {
|
||||||
@@ -1542,17 +1641,15 @@ S2.define('select2/selection/single',[
|
|||||||
|
|
||||||
container.on('focus', function (evt) {
|
container.on('focus', function (evt) {
|
||||||
if (!container.isOpen()) {
|
if (!container.isOpen()) {
|
||||||
self.$selection.focus();
|
self.$selection.trigger('focus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('selection:update', function (params) {
|
|
||||||
self.update(params.data);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SingleSelection.prototype.clear = function () {
|
SingleSelection.prototype.clear = function () {
|
||||||
this.$selection.find('.select2-selection__rendered').empty();
|
var $rendered = this.$selection.find('.select2-selection__rendered');
|
||||||
|
$rendered.empty();
|
||||||
|
$rendered.removeAttr('title'); // clear tooltip on empty
|
||||||
};
|
};
|
||||||
|
|
||||||
SingleSelection.prototype.display = function (data, container) {
|
SingleSelection.prototype.display = function (data, container) {
|
||||||
@@ -1578,7 +1675,14 @@ S2.define('select2/selection/single',[
|
|||||||
var formatted = this.display(selection, $rendered);
|
var formatted = this.display(selection, $rendered);
|
||||||
|
|
||||||
$rendered.empty().append(formatted);
|
$rendered.empty().append(formatted);
|
||||||
$rendered.prop('title', selection.title || selection.text);
|
|
||||||
|
var title = selection.title || selection.text;
|
||||||
|
|
||||||
|
if (title) {
|
||||||
|
$rendered.attr('title', title);
|
||||||
|
} else {
|
||||||
|
$rendered.removeAttr('title');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return SingleSelection;
|
return SingleSelection;
|
||||||
@@ -1623,14 +1727,14 @@ S2.define('select2/selection/multiple',[
|
|||||||
'.select2-selection__choice__remove',
|
'.select2-selection__choice__remove',
|
||||||
function (evt) {
|
function (evt) {
|
||||||
// Ignore the event if it is disabled
|
// Ignore the event if it is disabled
|
||||||
if (self.options.get('disabled')) {
|
if (self.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $remove = $(this);
|
var $remove = $(this);
|
||||||
var $selection = $remove.parent();
|
var $selection = $remove.parent();
|
||||||
|
|
||||||
var data = $selection.data('data');
|
var data = Utils.GetData($selection[0], 'data');
|
||||||
|
|
||||||
self.trigger('unselect', {
|
self.trigger('unselect', {
|
||||||
originalEvent: evt,
|
originalEvent: evt,
|
||||||
@@ -1641,7 +1745,9 @@ S2.define('select2/selection/multiple',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
MultipleSelection.prototype.clear = function () {
|
MultipleSelection.prototype.clear = function () {
|
||||||
this.$selection.find('.select2-selection__rendered').empty();
|
var $rendered = this.$selection.find('.select2-selection__rendered');
|
||||||
|
$rendered.empty();
|
||||||
|
$rendered.removeAttr('title');
|
||||||
};
|
};
|
||||||
|
|
||||||
MultipleSelection.prototype.display = function (data, container) {
|
MultipleSelection.prototype.display = function (data, container) {
|
||||||
@@ -1679,9 +1785,14 @@ S2.define('select2/selection/multiple',[
|
|||||||
var formatted = this.display(selection, $selection);
|
var formatted = this.display(selection, $selection);
|
||||||
|
|
||||||
$selection.append(formatted);
|
$selection.append(formatted);
|
||||||
$selection.prop('title', selection.title || selection.text);
|
|
||||||
|
|
||||||
$selection.data('data', selection);
|
var title = selection.title || selection.text;
|
||||||
|
|
||||||
|
if (title) {
|
||||||
|
$selection.attr('title', title);
|
||||||
|
}
|
||||||
|
|
||||||
|
Utils.StoreData($selection[0], 'data', selection);
|
||||||
|
|
||||||
$selections.push($selection);
|
$selections.push($selection);
|
||||||
}
|
}
|
||||||
@@ -1746,8 +1857,9 @@ S2.define('select2/selection/placeholder',[
|
|||||||
|
|
||||||
S2.define('select2/selection/allowClear',[
|
S2.define('select2/selection/allowClear',[
|
||||||
'jquery',
|
'jquery',
|
||||||
'../keys'
|
'../keys',
|
||||||
], function ($, KEYS) {
|
'../utils'
|
||||||
|
], function ($, KEYS, Utils) {
|
||||||
function AllowClear () { }
|
function AllowClear () { }
|
||||||
|
|
||||||
AllowClear.prototype.bind = function (decorated, container, $container) {
|
AllowClear.prototype.bind = function (decorated, container, $container) {
|
||||||
@@ -1776,7 +1888,7 @@ S2.define('select2/selection/allowClear',[
|
|||||||
|
|
||||||
AllowClear.prototype._handleClear = function (_, evt) {
|
AllowClear.prototype._handleClear = function (_, evt) {
|
||||||
// Ignore the event if it is disabled
|
// Ignore the event if it is disabled
|
||||||
if (this.options.get('disabled')) {
|
if (this.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1789,10 +1901,22 @@ S2.define('select2/selection/allowClear',[
|
|||||||
|
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
|
||||||
var data = $clear.data('data');
|
var data = Utils.GetData($clear[0], 'data');
|
||||||
|
|
||||||
|
var previousVal = this.$element.val();
|
||||||
|
this.$element.val(this.placeholder.id);
|
||||||
|
|
||||||
|
var unselectData = {
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
this.trigger('clear', unselectData);
|
||||||
|
if (unselectData.prevented) {
|
||||||
|
this.$element.val(previousVal);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (var d = 0; d < data.length; d++) {
|
for (var d = 0; d < data.length; d++) {
|
||||||
var unselectData = {
|
unselectData = {
|
||||||
data: data[d]
|
data: data[d]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1802,11 +1926,12 @@ S2.define('select2/selection/allowClear',[
|
|||||||
|
|
||||||
// If the event was prevented, don't clear it out.
|
// If the event was prevented, don't clear it out.
|
||||||
if (unselectData.prevented) {
|
if (unselectData.prevented) {
|
||||||
|
this.$element.val(previousVal);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element.val(this.placeholder.id).trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
|
|
||||||
this.trigger('toggle', {});
|
this.trigger('toggle', {});
|
||||||
};
|
};
|
||||||
@@ -1829,12 +1954,14 @@ S2.define('select2/selection/allowClear',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var removeAll = this.options.get('translations').get('removeAllItems');
|
||||||
|
|
||||||
var $remove = $(
|
var $remove = $(
|
||||||
'<span class="select2-selection__clear">' +
|
'<span class="select2-selection__clear" title="' + removeAll() +'">' +
|
||||||
'×' +
|
'×' +
|
||||||
'</span>'
|
'</span>'
|
||||||
);
|
);
|
||||||
$remove.data('data', data);
|
Utils.StoreData($remove[0], 'data', data);
|
||||||
|
|
||||||
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
||||||
};
|
};
|
||||||
@@ -1856,7 +1983,7 @@ S2.define('select2/selection/search',[
|
|||||||
'<li class="select2-search select2-search--inline">' +
|
'<li class="select2-search select2-search--inline">' +
|
||||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||||
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||||
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
||||||
'</li>'
|
'</li>'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -1873,14 +2000,18 @@ S2.define('select2/selection/search',[
|
|||||||
Search.prototype.bind = function (decorated, container, $container) {
|
Search.prototype.bind = function (decorated, container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
var resultsId = container.id + '-results';
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
|
self.$search.attr('aria-controls', resultsId);
|
||||||
self.$search.trigger('focus');
|
self.$search.trigger('focus');
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('close', function () {
|
container.on('close', function () {
|
||||||
self.$search.val('');
|
self.$search.val('');
|
||||||
|
self.$search.removeAttr('aria-controls');
|
||||||
self.$search.removeAttr('aria-activedescendant');
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
self.$search.trigger('focus');
|
self.$search.trigger('focus');
|
||||||
});
|
});
|
||||||
@@ -1900,7 +2031,11 @@ S2.define('select2/selection/search',[
|
|||||||
});
|
});
|
||||||
|
|
||||||
container.on('results:focus', function (params) {
|
container.on('results:focus', function (params) {
|
||||||
self.$search.attr('aria-activedescendant', params.id);
|
if (params.data._resultId) {
|
||||||
|
self.$search.attr('aria-activedescendant', params.data._resultId);
|
||||||
|
} else {
|
||||||
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
||||||
@@ -1925,7 +2060,7 @@ S2.define('select2/selection/search',[
|
|||||||
.prev('.select2-selection__choice');
|
.prev('.select2-selection__choice');
|
||||||
|
|
||||||
if ($previousChoice.length > 0) {
|
if ($previousChoice.length > 0) {
|
||||||
var item = $previousChoice.data('data');
|
var item = Utils.GetData($previousChoice[0], 'data');
|
||||||
|
|
||||||
self.searchRemoveChoice(item);
|
self.searchRemoveChoice(item);
|
||||||
|
|
||||||
@@ -1934,6 +2069,12 @@ S2.define('select2/selection/search',[
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$selection.on('click', '.select2-search--inline', function (evt) {
|
||||||
|
if (self.$search.val()) {
|
||||||
|
evt.stopPropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Try to detect the IE version should the `documentMode` property that
|
// Try to detect the IE version should the `documentMode` property that
|
||||||
// is stored on the document. This is only implemented in IE and is
|
// is stored on the document. This is only implemented in IE and is
|
||||||
// slightly cleaner than doing a user agent check.
|
// slightly cleaner than doing a user agent check.
|
||||||
@@ -2019,7 +2160,7 @@ S2.define('select2/selection/search',[
|
|||||||
|
|
||||||
this.resizeSearch();
|
this.resizeSearch();
|
||||||
if (searchHadFocus) {
|
if (searchHadFocus) {
|
||||||
this.$search.focus();
|
this.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2052,7 +2193,7 @@ S2.define('select2/selection/search',[
|
|||||||
var width = '';
|
var width = '';
|
||||||
|
|
||||||
if (this.$search.attr('placeholder') !== '') {
|
if (this.$search.attr('placeholder') !== '') {
|
||||||
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
width = this.$selection.find('.select2-selection__rendered').width();
|
||||||
} else {
|
} else {
|
||||||
var minimumWidth = this.$search.val().length + 1;
|
var minimumWidth = this.$search.val().length + 1;
|
||||||
|
|
||||||
@@ -2076,10 +2217,13 @@ S2.define('select2/selection/eventRelay',[
|
|||||||
'open', 'opening',
|
'open', 'opening',
|
||||||
'close', 'closing',
|
'close', 'closing',
|
||||||
'select', 'selecting',
|
'select', 'selecting',
|
||||||
'unselect', 'unselecting'
|
'unselect', 'unselecting',
|
||||||
|
'clear', 'clearing'
|
||||||
];
|
];
|
||||||
|
|
||||||
var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
|
var preventableEvents = [
|
||||||
|
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
|
||||||
|
];
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
@@ -2412,6 +2556,7 @@ S2.define('select2/diacritics',[
|
|||||||
'\u019F': 'O',
|
'\u019F': 'O',
|
||||||
'\uA74A': 'O',
|
'\uA74A': 'O',
|
||||||
'\uA74C': 'O',
|
'\uA74C': 'O',
|
||||||
|
'\u0152': 'OE',
|
||||||
'\u01A2': 'OI',
|
'\u01A2': 'OI',
|
||||||
'\uA74E': 'OO',
|
'\uA74E': 'OO',
|
||||||
'\u0222': 'OU',
|
'\u0222': 'OU',
|
||||||
@@ -2821,6 +2966,7 @@ S2.define('select2/diacritics',[
|
|||||||
'\uA74B': 'o',
|
'\uA74B': 'o',
|
||||||
'\uA74D': 'o',
|
'\uA74D': 'o',
|
||||||
'\u0275': 'o',
|
'\u0275': 'o',
|
||||||
|
'\u0153': 'oe',
|
||||||
'\u01A3': 'oi',
|
'\u01A3': 'oi',
|
||||||
'\u0223': 'ou',
|
'\u0223': 'ou',
|
||||||
'\uA74F': 'oo',
|
'\uA74F': 'oo',
|
||||||
@@ -2989,8 +3135,9 @@ S2.define('select2/diacritics',[
|
|||||||
'\u03CD': '\u03C5',
|
'\u03CD': '\u03C5',
|
||||||
'\u03CB': '\u03C5',
|
'\u03CB': '\u03C5',
|
||||||
'\u03B0': '\u03C5',
|
'\u03B0': '\u03C5',
|
||||||
'\u03C9': '\u03C9',
|
'\u03CE': '\u03C9',
|
||||||
'\u03C2': '\u03C3'
|
'\u03C2': '\u03C3',
|
||||||
|
'\u2019': '\''
|
||||||
};
|
};
|
||||||
|
|
||||||
return diacritics;
|
return diacritics;
|
||||||
@@ -3075,7 +3222,7 @@ S2.define('select2/data/select',[
|
|||||||
if ($(data.element).is('option')) {
|
if ($(data.element).is('option')) {
|
||||||
data.element.selected = true;
|
data.element.selected = true;
|
||||||
|
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3096,13 +3243,13 @@ S2.define('select2/data/select',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.$element.val(val);
|
self.$element.val(val);
|
||||||
self.$element.trigger('change');
|
self.$element.trigger('input').trigger('change');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var val = data.id;
|
var val = data.id;
|
||||||
|
|
||||||
this.$element.val(val);
|
this.$element.val(val);
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3118,7 +3265,7 @@ S2.define('select2/data/select',[
|
|||||||
if ($(data.element).is('option')) {
|
if ($(data.element).is('option')) {
|
||||||
data.element.selected = false;
|
data.element.selected = false;
|
||||||
|
|
||||||
this.$element.trigger('change');
|
this.$element.trigger('input').trigger('change');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3136,7 +3283,7 @@ S2.define('select2/data/select',[
|
|||||||
|
|
||||||
self.$element.val(val);
|
self.$element.val(val);
|
||||||
|
|
||||||
self.$element.trigger('change');
|
self.$element.trigger('input').trigger('change');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3158,7 +3305,7 @@ S2.define('select2/data/select',[
|
|||||||
// Remove anything added to child elements
|
// Remove anything added to child elements
|
||||||
this.$element.find('*').each(function () {
|
this.$element.find('*').each(function () {
|
||||||
// Remove any custom data set by Select2
|
// Remove any custom data set by Select2
|
||||||
$.removeData(this, 'data');
|
Utils.RemoveData(this);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3231,7 +3378,7 @@ S2.define('select2/data/select',[
|
|||||||
normalizedData.element = option;
|
normalizedData.element = option;
|
||||||
|
|
||||||
// Override the option's data with the combined data
|
// Override the option's data with the combined data
|
||||||
$.data(option, 'data', normalizedData);
|
Utils.StoreData(option, 'data', normalizedData);
|
||||||
|
|
||||||
return $option;
|
return $option;
|
||||||
};
|
};
|
||||||
@@ -3239,7 +3386,7 @@ S2.define('select2/data/select',[
|
|||||||
SelectAdapter.prototype.item = function ($option) {
|
SelectAdapter.prototype.item = function ($option) {
|
||||||
var data = {};
|
var data = {};
|
||||||
|
|
||||||
data = $.data($option[0], 'data');
|
data = Utils.GetData($option[0], 'data');
|
||||||
|
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
return data;
|
return data;
|
||||||
@@ -3277,13 +3424,13 @@ S2.define('select2/data/select',[
|
|||||||
data = this._normalizeItem(data);
|
data = this._normalizeItem(data);
|
||||||
data.element = $option[0];
|
data.element = $option[0];
|
||||||
|
|
||||||
$.data($option[0], 'data', data);
|
Utils.StoreData($option[0], 'data', data);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
SelectAdapter.prototype._normalizeItem = function (item) {
|
SelectAdapter.prototype._normalizeItem = function (item) {
|
||||||
if (!$.isPlainObject(item)) {
|
if (item !== Object(item)) {
|
||||||
item = {
|
item = {
|
||||||
id: item,
|
id: item,
|
||||||
text: item
|
text: item
|
||||||
@@ -3329,15 +3476,19 @@ S2.define('select2/data/array',[
|
|||||||
'jquery'
|
'jquery'
|
||||||
], function (SelectAdapter, Utils, $) {
|
], function (SelectAdapter, Utils, $) {
|
||||||
function ArrayAdapter ($element, options) {
|
function ArrayAdapter ($element, options) {
|
||||||
var data = options.get('data') || [];
|
this._dataToConvert = options.get('data') || [];
|
||||||
|
|
||||||
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
||||||
|
|
||||||
this.addOptions(this.convertToOptions(data));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.Extend(ArrayAdapter, SelectAdapter);
|
Utils.Extend(ArrayAdapter, SelectAdapter);
|
||||||
|
|
||||||
|
ArrayAdapter.prototype.bind = function (container, $container) {
|
||||||
|
ArrayAdapter.__super__.bind.call(this, container, $container);
|
||||||
|
|
||||||
|
this.addOptions(this.convertToOptions(this._dataToConvert));
|
||||||
|
};
|
||||||
|
|
||||||
ArrayAdapter.prototype.select = function (data) {
|
ArrayAdapter.prototype.select = function (data) {
|
||||||
var $option = this.$element.find('option').filter(function (i, elm) {
|
var $option = this.$element.find('option').filter(function (i, elm) {
|
||||||
return elm.value == data.id.toString();
|
return elm.value == data.id.toString();
|
||||||
@@ -3487,7 +3638,8 @@ S2.define('select2/data/ajax',[
|
|||||||
}, function () {
|
}, function () {
|
||||||
// Attempt to detect if a request was aborted
|
// Attempt to detect if a request was aborted
|
||||||
// Only works if the transport exposes a status property
|
// Only works if the transport exposes a status property
|
||||||
if ($request.status && $request.status === '0') {
|
if ('status' in $request &&
|
||||||
|
($request.status === 0 || $request.status === '0')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3626,8 +3778,6 @@ S2.define('select2/data/tags',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
Tags.prototype._removeOldTags = function (_) {
|
Tags.prototype._removeOldTags = function (_) {
|
||||||
var tag = this._lastTag;
|
|
||||||
|
|
||||||
var $options = this.$element.find('option[data-select2-tag]');
|
var $options = this.$element.find('option[data-select2-tag]');
|
||||||
|
|
||||||
$options.each(function () {
|
$options.each(function () {
|
||||||
@@ -3702,7 +3852,7 @@ S2.define('select2/data/tokenizer',[
|
|||||||
// Replace the search term if we have the search box
|
// Replace the search term if we have the search box
|
||||||
if (this.$search.length) {
|
if (this.$search.length) {
|
||||||
this.$search.val(tokenData.term);
|
this.$search.val(tokenData.term);
|
||||||
this.$search.focus();
|
this.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
|
|
||||||
params.term = tokenData.term;
|
params.term = tokenData.term;
|
||||||
@@ -3831,10 +3981,30 @@ S2.define('select2/data/maximumSelectionLength',[
|
|||||||
decorated.call(this, $e, options);
|
decorated.call(this, $e, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaximumSelectionLength.prototype.bind =
|
||||||
|
function (decorated, container, $container) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
|
container.on('select', function () {
|
||||||
|
self._checkIfMaximumSelected();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
MaximumSelectionLength.prototype.query =
|
MaximumSelectionLength.prototype.query =
|
||||||
function (decorated, params, callback) {
|
function (decorated, params, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
this._checkIfMaximumSelected(function () {
|
||||||
|
decorated.call(self, params, callback);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
MaximumSelectionLength.prototype._checkIfMaximumSelected =
|
||||||
|
function (_, successCallback) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.current(function (currentData) {
|
this.current(function (currentData) {
|
||||||
var count = currentData != null ? currentData.length : 0;
|
var count = currentData != null ? currentData.length : 0;
|
||||||
if (self.maximumSelectionLength > 0 &&
|
if (self.maximumSelectionLength > 0 &&
|
||||||
@@ -3847,7 +4017,10 @@ S2.define('select2/data/maximumSelectionLength',[
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
decorated.call(self, params, callback);
|
|
||||||
|
if (successCallback) {
|
||||||
|
successCallback();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3886,7 +4059,7 @@ S2.define('select2/dropdown',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
Dropdown.prototype.position = function ($dropdown, $container) {
|
Dropdown.prototype.position = function ($dropdown, $container) {
|
||||||
// Should be implmented in subclasses
|
// Should be implemented in subclasses
|
||||||
};
|
};
|
||||||
|
|
||||||
Dropdown.prototype.destroy = function () {
|
Dropdown.prototype.destroy = function () {
|
||||||
@@ -3910,7 +4083,7 @@ S2.define('select2/dropdown/search',[
|
|||||||
'<span class="select2-search select2-search--dropdown">' +
|
'<span class="select2-search select2-search--dropdown">' +
|
||||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||||
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||||
' spellcheck="false" role="textbox" />' +
|
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
||||||
'</span>'
|
'</span>'
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -3925,6 +4098,8 @@ S2.define('select2/dropdown/search',[
|
|||||||
Search.prototype.bind = function (decorated, container, $container) {
|
Search.prototype.bind = function (decorated, container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
var resultsId = container.id + '-results';
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
this.$search.on('keydown', function (evt) {
|
this.$search.on('keydown', function (evt) {
|
||||||
@@ -3947,23 +4122,27 @@ S2.define('select2/dropdown/search',[
|
|||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
self.$search.attr('tabindex', 0);
|
self.$search.attr('tabindex', 0);
|
||||||
|
self.$search.attr('aria-controls', resultsId);
|
||||||
|
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
|
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('close', function () {
|
container.on('close', function () {
|
||||||
self.$search.attr('tabindex', -1);
|
self.$search.attr('tabindex', -1);
|
||||||
|
self.$search.removeAttr('aria-controls');
|
||||||
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
|
|
||||||
self.$search.val('');
|
self.$search.val('');
|
||||||
|
self.$search.trigger('blur');
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('focus', function () {
|
container.on('focus', function () {
|
||||||
if (!container.isOpen()) {
|
if (!container.isOpen()) {
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3978,6 +4157,14 @@ S2.define('select2/dropdown/search',[
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
container.on('results:focus', function (params) {
|
||||||
|
if (params.data._resultId) {
|
||||||
|
self.$search.attr('aria-activedescendant', params.data._resultId);
|
||||||
|
} else {
|
||||||
|
self.$search.removeAttr('aria-activedescendant');
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Search.prototype.handleSearch = function (evt) {
|
Search.prototype.handleSearch = function (evt) {
|
||||||
@@ -4062,6 +4249,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|||||||
|
|
||||||
if (this.showLoadingMore(data)) {
|
if (this.showLoadingMore(data)) {
|
||||||
this.$results.append(this.$loadingMore);
|
this.$results.append(this.$loadingMore);
|
||||||
|
this.loadMoreIfNeeded();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -4080,25 +4268,27 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|||||||
self.loading = true;
|
self.loading = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$results.on('scroll', function () {
|
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
|
||||||
|
};
|
||||||
|
|
||||||
|
InfiniteScroll.prototype.loadMoreIfNeeded = function () {
|
||||||
var isLoadMoreVisible = $.contains(
|
var isLoadMoreVisible = $.contains(
|
||||||
document.documentElement,
|
document.documentElement,
|
||||||
self.$loadingMore[0]
|
this.$loadingMore[0]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (self.loading || !isLoadMoreVisible) {
|
if (this.loading || !isLoadMoreVisible) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentOffset = self.$results.offset().top +
|
var currentOffset = this.$results.offset().top +
|
||||||
self.$results.outerHeight(false);
|
this.$results.outerHeight(false);
|
||||||
var loadingMoreOffset = self.$loadingMore.offset().top +
|
var loadingMoreOffset = this.$loadingMore.offset().top +
|
||||||
self.$loadingMore.outerHeight(false);
|
this.$loadingMore.outerHeight(false);
|
||||||
|
|
||||||
if (currentOffset + 50 >= loadingMoreOffset) {
|
if (currentOffset + 50 >= loadingMoreOffset) {
|
||||||
self.loadMore();
|
this.loadMore();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
InfiniteScroll.prototype.loadMore = function () {
|
InfiniteScroll.prototype.loadMore = function () {
|
||||||
@@ -4119,7 +4309,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|||||||
var $option = $(
|
var $option = $(
|
||||||
'<li ' +
|
'<li ' +
|
||||||
'class="select2-results__option select2-results__option--load-more"' +
|
'class="select2-results__option select2-results__option--load-more"' +
|
||||||
'role="treeitem" aria-disabled="true"></li>'
|
'role="option" aria-disabled="true"></li>'
|
||||||
);
|
);
|
||||||
|
|
||||||
var message = this.options.get('translations').get('loadingMore');
|
var message = this.options.get('translations').get('loadingMore');
|
||||||
@@ -4137,7 +4327,7 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
'../utils'
|
'../utils'
|
||||||
], function ($, Utils) {
|
], function ($, Utils) {
|
||||||
function AttachBody (decorated, $element, options) {
|
function AttachBody (decorated, $element, options) {
|
||||||
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
|
this.$dropdownParent = $(options.get('dropdownParent') || document.body);
|
||||||
|
|
||||||
decorated.call(this, $element, options);
|
decorated.call(this, $element, options);
|
||||||
}
|
}
|
||||||
@@ -4145,27 +4335,14 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
AttachBody.prototype.bind = function (decorated, container, $container) {
|
AttachBody.prototype.bind = function (decorated, container, $container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
var setupResultsEvents = false;
|
|
||||||
|
|
||||||
decorated.call(this, container, $container);
|
decorated.call(this, container, $container);
|
||||||
|
|
||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
self._showDropdown();
|
self._showDropdown();
|
||||||
self._attachPositioningHandler(container);
|
self._attachPositioningHandler(container);
|
||||||
|
|
||||||
if (!setupResultsEvents) {
|
// Must bind after the results handlers to ensure correct sizing
|
||||||
setupResultsEvents = true;
|
self._bindContainerResultHandlers(container);
|
||||||
|
|
||||||
container.on('results:all', function () {
|
|
||||||
self._positionDropdown();
|
|
||||||
self._resizeDropdown();
|
|
||||||
});
|
|
||||||
|
|
||||||
container.on('results:append', function () {
|
|
||||||
self._positionDropdown();
|
|
||||||
self._resizeDropdown();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('close', function () {
|
container.on('close', function () {
|
||||||
@@ -4214,6 +4391,44 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
this.$dropdownContainer.detach();
|
this.$dropdownContainer.detach();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
AttachBody.prototype._bindContainerResultHandlers =
|
||||||
|
function (decorated, container) {
|
||||||
|
|
||||||
|
// These should only be bound once
|
||||||
|
if (this._containerResultsHandlersBound) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
container.on('results:all', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('results:append', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('results:message', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('select', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
container.on('unselect', function () {
|
||||||
|
self._positionDropdown();
|
||||||
|
self._resizeDropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
this._containerResultsHandlersBound = true;
|
||||||
|
};
|
||||||
|
|
||||||
AttachBody.prototype._attachPositioningHandler =
|
AttachBody.prototype._attachPositioningHandler =
|
||||||
function (decorated, container) {
|
function (decorated, container) {
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -4224,14 +4439,14 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
|
|
||||||
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
||||||
$watchers.each(function () {
|
$watchers.each(function () {
|
||||||
$(this).data('select2-scroll-position', {
|
Utils.StoreData(this, 'select2-scroll-position', {
|
||||||
x: $(this).scrollLeft(),
|
x: $(this).scrollLeft(),
|
||||||
y: $(this).scrollTop()
|
y: $(this).scrollTop()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$watchers.on(scrollEvent, function (ev) {
|
$watchers.on(scrollEvent, function (ev) {
|
||||||
var position = $(this).data('select2-scroll-position');
|
var position = Utils.GetData(this, 'select2-scroll-position');
|
||||||
$(this).scrollTop(position.y);
|
$(this).scrollTop(position.y);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -4290,16 +4505,26 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
top: container.bottom
|
top: container.bottom
|
||||||
};
|
};
|
||||||
|
|
||||||
// Determine what the parent element is to use for calciulating the offset
|
// Determine what the parent element is to use for calculating the offset
|
||||||
var $offsetParent = this.$dropdownParent;
|
var $offsetParent = this.$dropdownParent;
|
||||||
|
|
||||||
// For statically positoned elements, we need to get the element
|
// For statically positioned elements, we need to get the element
|
||||||
// that is determining the offset
|
// that is determining the offset
|
||||||
if ($offsetParent.css('position') === 'static') {
|
if ($offsetParent.css('position') === 'static') {
|
||||||
$offsetParent = $offsetParent.offsetParent();
|
$offsetParent = $offsetParent.offsetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
var parentOffset = $offsetParent.offset();
|
var parentOffset = {
|
||||||
|
top: 0,
|
||||||
|
left: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
if (
|
||||||
|
$.contains(document.body, $offsetParent[0]) ||
|
||||||
|
$offsetParent[0].isConnected
|
||||||
|
) {
|
||||||
|
parentOffset = $offsetParent.offset();
|
||||||
|
}
|
||||||
|
|
||||||
css.top -= parentOffset.top;
|
css.top -= parentOffset.top;
|
||||||
css.left -= parentOffset.left;
|
css.left -= parentOffset.left;
|
||||||
@@ -4396,8 +4621,8 @@ S2.define('select2/dropdown/minimumResultsForSearch',[
|
|||||||
});
|
});
|
||||||
|
|
||||||
S2.define('select2/dropdown/selectOnClose',[
|
S2.define('select2/dropdown/selectOnClose',[
|
||||||
|
'../utils'
|
||||||
], function () {
|
], function (Utils) {
|
||||||
function SelectOnClose () { }
|
function SelectOnClose () { }
|
||||||
|
|
||||||
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
||||||
@@ -4428,7 +4653,7 @@ S2.define('select2/dropdown/selectOnClose',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = $highlightedResults.data('data');
|
var data = Utils.GetData($highlightedResults[0], 'data');
|
||||||
|
|
||||||
// Don't re-select already selected resulte
|
// Don't re-select already selected resulte
|
||||||
if (
|
if (
|
||||||
@@ -4469,7 +4694,7 @@ S2.define('select2/dropdown/closeOnSelect',[
|
|||||||
var originalEvent = evt.originalEvent;
|
var originalEvent = evt.originalEvent;
|
||||||
|
|
||||||
// Don't close if the control key is being held
|
// Don't close if the control key is being held
|
||||||
if (originalEvent && originalEvent.ctrlKey) {
|
if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4523,6 +4748,9 @@ S2.define('select2/i18n/en',[],function () {
|
|||||||
},
|
},
|
||||||
searching: function () {
|
searching: function () {
|
||||||
return 'Searching…';
|
return 'Searching…';
|
||||||
|
},
|
||||||
|
removeAllItems: function () {
|
||||||
|
return 'Remove all items';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -4761,66 +4989,29 @@ S2.define('select2/defaults',[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof options.language === 'string') {
|
// If the defaults were not previously applied from an element, it is
|
||||||
// Check if the language is specified with a region
|
// possible for the language option to have not been resolved
|
||||||
if (options.language.indexOf('-') > 0) {
|
options.language = this._resolveLanguage(options.language);
|
||||||
// Extract the region information if it is included
|
|
||||||
var languageParts = options.language.split('-');
|
|
||||||
var baseLanguage = languageParts[0];
|
|
||||||
|
|
||||||
options.language = [options.language, baseLanguage];
|
// Always fall back to English since it will always be complete
|
||||||
} else {
|
|
||||||
options.language = [options.language];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($.isArray(options.language)) {
|
|
||||||
var languages = new Translation();
|
|
||||||
options.language.push('en');
|
options.language.push('en');
|
||||||
|
|
||||||
var languageNames = options.language;
|
var uniqueLanguages = [];
|
||||||
|
|
||||||
for (var l = 0; l < languageNames.length; l++) {
|
for (var l = 0; l < options.language.length; l++) {
|
||||||
var name = languageNames[l];
|
var language = options.language[l];
|
||||||
var language = {};
|
|
||||||
|
|
||||||
try {
|
if (uniqueLanguages.indexOf(language) === -1) {
|
||||||
// Try to load it with the original name
|
uniqueLanguages.push(language);
|
||||||
language = Translation.loadPath(name);
|
}
|
||||||
} catch (e) {
|
}
|
||||||
try {
|
|
||||||
// If we couldn't load it, check if it wasn't the full path
|
options.language = uniqueLanguages;
|
||||||
name = this.defaults.amdLanguageBase + name;
|
|
||||||
language = Translation.loadPath(name);
|
options.translations = this._processTranslations(
|
||||||
} catch (ex) {
|
options.language,
|
||||||
// The translation could not be loaded at all. Sometimes this is
|
options.debug
|
||||||
// because of a configuration problem, other times this can be
|
|
||||||
// because of how Select2 helps load all possible translation files.
|
|
||||||
if (options.debug && window.console && console.warn) {
|
|
||||||
console.warn(
|
|
||||||
'Select2: The language file for "' + name + '" could not be ' +
|
|
||||||
'automatically loaded. A fallback will be used instead.'
|
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
languages.extend(language);
|
|
||||||
}
|
|
||||||
|
|
||||||
options.translations = languages;
|
|
||||||
} else {
|
|
||||||
var baseTranslation = Translation.loadPath(
|
|
||||||
this.defaults.amdLanguageBase + 'en'
|
|
||||||
);
|
|
||||||
var customTranslation = new Translation(options.language);
|
|
||||||
|
|
||||||
customTranslation.extend(baseTranslation);
|
|
||||||
|
|
||||||
options.translations = customTranslation;
|
|
||||||
}
|
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
};
|
};
|
||||||
@@ -4887,13 +5078,14 @@ S2.define('select2/defaults',[
|
|||||||
debug: false,
|
debug: false,
|
||||||
dropdownAutoWidth: false,
|
dropdownAutoWidth: false,
|
||||||
escapeMarkup: Utils.escapeMarkup,
|
escapeMarkup: Utils.escapeMarkup,
|
||||||
language: EnglishTranslation,
|
language: {},
|
||||||
matcher: matcher,
|
matcher: matcher,
|
||||||
minimumInputLength: 0,
|
minimumInputLength: 0,
|
||||||
maximumInputLength: 0,
|
maximumInputLength: 0,
|
||||||
maximumSelectionLength: 0,
|
maximumSelectionLength: 0,
|
||||||
minimumResultsForSearch: 0,
|
minimumResultsForSearch: 0,
|
||||||
selectOnClose: false,
|
selectOnClose: false,
|
||||||
|
scrollAfterSelect: false,
|
||||||
sorter: function (data) {
|
sorter: function (data) {
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
@@ -4908,6 +5100,103 @@ S2.define('select2/defaults',[
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Defaults.prototype.applyFromElement = function (options, $element) {
|
||||||
|
var optionLanguage = options.language;
|
||||||
|
var defaultLanguage = this.defaults.language;
|
||||||
|
var elementLanguage = $element.prop('lang');
|
||||||
|
var parentLanguage = $element.closest('[lang]').prop('lang');
|
||||||
|
|
||||||
|
var languages = Array.prototype.concat.call(
|
||||||
|
this._resolveLanguage(elementLanguage),
|
||||||
|
this._resolveLanguage(optionLanguage),
|
||||||
|
this._resolveLanguage(defaultLanguage),
|
||||||
|
this._resolveLanguage(parentLanguage)
|
||||||
|
);
|
||||||
|
|
||||||
|
options.language = languages;
|
||||||
|
|
||||||
|
return options;
|
||||||
|
};
|
||||||
|
|
||||||
|
Defaults.prototype._resolveLanguage = function (language) {
|
||||||
|
if (!language) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.isEmptyObject(language)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.isPlainObject(language)) {
|
||||||
|
return [language];
|
||||||
|
}
|
||||||
|
|
||||||
|
var languages;
|
||||||
|
|
||||||
|
if (!$.isArray(language)) {
|
||||||
|
languages = [language];
|
||||||
|
} else {
|
||||||
|
languages = language;
|
||||||
|
}
|
||||||
|
|
||||||
|
var resolvedLanguages = [];
|
||||||
|
|
||||||
|
for (var l = 0; l < languages.length; l++) {
|
||||||
|
resolvedLanguages.push(languages[l]);
|
||||||
|
|
||||||
|
if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
|
||||||
|
// Extract the region information if it is included
|
||||||
|
var languageParts = languages[l].split('-');
|
||||||
|
var baseLanguage = languageParts[0];
|
||||||
|
|
||||||
|
resolvedLanguages.push(baseLanguage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return resolvedLanguages;
|
||||||
|
};
|
||||||
|
|
||||||
|
Defaults.prototype._processTranslations = function (languages, debug) {
|
||||||
|
var translations = new Translation();
|
||||||
|
|
||||||
|
for (var l = 0; l < languages.length; l++) {
|
||||||
|
var languageData = new Translation();
|
||||||
|
|
||||||
|
var language = languages[l];
|
||||||
|
|
||||||
|
if (typeof language === 'string') {
|
||||||
|
try {
|
||||||
|
// Try to load it with the original name
|
||||||
|
languageData = Translation.loadPath(language);
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
// If we couldn't load it, check if it wasn't the full path
|
||||||
|
language = this.defaults.amdLanguageBase + language;
|
||||||
|
languageData = Translation.loadPath(language);
|
||||||
|
} catch (ex) {
|
||||||
|
// The translation could not be loaded at all. Sometimes this is
|
||||||
|
// because of a configuration problem, other times this can be
|
||||||
|
// because of how Select2 helps load all possible translation files
|
||||||
|
if (debug && window.console && console.warn) {
|
||||||
|
console.warn(
|
||||||
|
'Select2: The language file for "' + language + '" could ' +
|
||||||
|
'not be automatically loaded. A fallback will be used instead.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ($.isPlainObject(language)) {
|
||||||
|
languageData = new Translation(language);
|
||||||
|
} else {
|
||||||
|
languageData = language;
|
||||||
|
}
|
||||||
|
|
||||||
|
translations.extend(languageData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return translations;
|
||||||
|
};
|
||||||
|
|
||||||
Defaults.prototype.set = function (key, value) {
|
Defaults.prototype.set = function (key, value) {
|
||||||
var camelKey = $.camelCase(key);
|
var camelKey = $.camelCase(key);
|
||||||
|
|
||||||
@@ -4916,7 +5205,7 @@ S2.define('select2/defaults',[
|
|||||||
|
|
||||||
var convertedData = Utils._convertData(data);
|
var convertedData = Utils._convertData(data);
|
||||||
|
|
||||||
$.extend(this.defaults, convertedData);
|
$.extend(true, this.defaults, convertedData);
|
||||||
};
|
};
|
||||||
|
|
||||||
var defaults = new Defaults();
|
var defaults = new Defaults();
|
||||||
@@ -4937,6 +5226,10 @@ S2.define('select2/options',[
|
|||||||
this.fromElement($element);
|
this.fromElement($element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($element != null) {
|
||||||
|
this.options = Defaults.applyFromElement(this.options, $element);
|
||||||
|
}
|
||||||
|
|
||||||
this.options = Defaults.apply(this.options);
|
this.options = Defaults.apply(this.options);
|
||||||
|
|
||||||
if ($element && $element.is('input')) {
|
if ($element && $element.is('input')) {
|
||||||
@@ -4960,14 +5253,6 @@ S2.define('select2/options',[
|
|||||||
this.options.disabled = $e.prop('disabled');
|
this.options.disabled = $e.prop('disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.language == null) {
|
|
||||||
if ($e.prop('lang')) {
|
|
||||||
this.options.language = $e.prop('lang').toLowerCase();
|
|
||||||
} else if ($e.closest('[lang]').prop('lang')) {
|
|
||||||
this.options.language = $e.closest('[lang]').prop('lang');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.options.dir == null) {
|
if (this.options.dir == null) {
|
||||||
if ($e.prop('dir')) {
|
if ($e.prop('dir')) {
|
||||||
this.options.dir = $e.prop('dir');
|
this.options.dir = $e.prop('dir');
|
||||||
@@ -4981,7 +5266,7 @@ S2.define('select2/options',[
|
|||||||
$e.prop('disabled', this.options.disabled);
|
$e.prop('disabled', this.options.disabled);
|
||||||
$e.prop('multiple', this.options.multiple);
|
$e.prop('multiple', this.options.multiple);
|
||||||
|
|
||||||
if ($e.data('select2Tags')) {
|
if (Utils.GetData($e[0], 'select2Tags')) {
|
||||||
if (this.options.debug && window.console && console.warn) {
|
if (this.options.debug && window.console && console.warn) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
||||||
@@ -4990,11 +5275,11 @@ S2.define('select2/options',[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$e.data('data', $e.data('select2Tags'));
|
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
|
||||||
$e.data('tags', true);
|
Utils.StoreData($e[0], 'tags', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($e.data('ajaxUrl')) {
|
if (Utils.GetData($e[0], 'ajaxUrl')) {
|
||||||
if (this.options.debug && window.console && console.warn) {
|
if (this.options.debug && window.console && console.warn) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
||||||
@@ -5003,21 +5288,45 @@ S2.define('select2/options',[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$e.attr('ajax--url', $e.data('ajaxUrl'));
|
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
|
||||||
$e.data('ajax--url', $e.data('ajaxUrl'));
|
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataset = {};
|
var dataset = {};
|
||||||
|
|
||||||
|
function upperCaseLetter(_, letter) {
|
||||||
|
return letter.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pre-load all of the attributes which are prefixed with `data-`
|
||||||
|
for (var attr = 0; attr < $e[0].attributes.length; attr++) {
|
||||||
|
var attributeName = $e[0].attributes[attr].name;
|
||||||
|
var prefix = 'data-';
|
||||||
|
|
||||||
|
if (attributeName.substr(0, prefix.length) == prefix) {
|
||||||
|
// Get the contents of the attribute after `data-`
|
||||||
|
var dataName = attributeName.substring(prefix.length);
|
||||||
|
|
||||||
|
// Get the data contents from the consistent source
|
||||||
|
// This is more than likely the jQuery data helper
|
||||||
|
var dataValue = Utils.GetData($e[0], dataName);
|
||||||
|
|
||||||
|
// camelCase the attribute name to match the spec
|
||||||
|
var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
|
||||||
|
|
||||||
|
// Store the data attribute contents into the dataset since
|
||||||
|
dataset[camelDataName] = dataValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Prefer the element's `dataset` attribute if it exists
|
// Prefer the element's `dataset` attribute if it exists
|
||||||
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
||||||
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
||||||
dataset = $.extend(true, {}, $e[0].dataset, $e.data());
|
dataset = $.extend(true, {}, $e[0].dataset, dataset);
|
||||||
} else {
|
|
||||||
dataset = $e.data();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = $.extend(true, {}, dataset);
|
// Prefer our internal data cache if it exists
|
||||||
|
var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
|
||||||
|
|
||||||
data = Utils._convertData(data);
|
data = Utils._convertData(data);
|
||||||
|
|
||||||
@@ -5054,8 +5363,8 @@ S2.define('select2/core',[
|
|||||||
'./keys'
|
'./keys'
|
||||||
], function ($, Options, Utils, KEYS) {
|
], function ($, Options, Utils, KEYS) {
|
||||||
var Select2 = function ($element, options) {
|
var Select2 = function ($element, options) {
|
||||||
if ($element.data('select2') != null) {
|
if (Utils.GetData($element[0], 'select2') != null) {
|
||||||
$element.data('select2').destroy();
|
Utils.GetData($element[0], 'select2').destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element = $element;
|
this.$element = $element;
|
||||||
@@ -5071,7 +5380,7 @@ S2.define('select2/core',[
|
|||||||
// Set up the tabindex
|
// Set up the tabindex
|
||||||
|
|
||||||
var tabindex = $element.attr('tabindex') || 0;
|
var tabindex = $element.attr('tabindex') || 0;
|
||||||
$element.data('old-tabindex', tabindex);
|
Utils.StoreData($element[0], 'old-tabindex', tabindex);
|
||||||
$element.attr('tabindex', '-1');
|
$element.attr('tabindex', '-1');
|
||||||
|
|
||||||
// Set up containers and adapters
|
// Set up containers and adapters
|
||||||
@@ -5132,6 +5441,9 @@ S2.define('select2/core',[
|
|||||||
// Synchronize any monitored attributes
|
// Synchronize any monitored attributes
|
||||||
this._syncAttributes();
|
this._syncAttributes();
|
||||||
|
|
||||||
|
Utils.StoreData($element[0], 'select2', this);
|
||||||
|
|
||||||
|
// Ensure backwards compatibility with $element.data('select2').
|
||||||
$element.data('select2', this);
|
$element.data('select2', this);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5208,6 +5520,12 @@ S2.define('select2/core',[
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (method == 'computedstyle') {
|
||||||
|
var computedStyle = window.getComputedStyle($element[0]);
|
||||||
|
|
||||||
|
return computedStyle.width;
|
||||||
|
}
|
||||||
|
|
||||||
return method;
|
return method;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5248,8 +5566,8 @@ S2.define('select2/core',[
|
|||||||
|
|
||||||
if (observer != null) {
|
if (observer != null) {
|
||||||
this._observer = new observer(function (mutations) {
|
this._observer = new observer(function (mutations) {
|
||||||
$.each(mutations, self._syncA);
|
self._syncA();
|
||||||
$.each(mutations, self._syncS);
|
self._syncS(null, mutations);
|
||||||
});
|
});
|
||||||
this._observer.observe(this.$element[0], {
|
this._observer.observe(this.$element[0], {
|
||||||
attributes: true,
|
attributes: true,
|
||||||
@@ -5371,7 +5689,7 @@ S2.define('select2/core',[
|
|||||||
if (self.isOpen()) {
|
if (self.isOpen()) {
|
||||||
if (key === KEYS.ESC || key === KEYS.TAB ||
|
if (key === KEYS.ESC || key === KEYS.TAB ||
|
||||||
(key === KEYS.UP && evt.altKey)) {
|
(key === KEYS.UP && evt.altKey)) {
|
||||||
self.close();
|
self.close(evt);
|
||||||
|
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
} else if (key === KEYS.ENTER) {
|
} else if (key === KEYS.ENTER) {
|
||||||
@@ -5405,7 +5723,7 @@ S2.define('select2/core',[
|
|||||||
Select2.prototype._syncAttributes = function () {
|
Select2.prototype._syncAttributes = function () {
|
||||||
this.options.set('disabled', this.$element.prop('disabled'));
|
this.options.set('disabled', this.$element.prop('disabled'));
|
||||||
|
|
||||||
if (this.options.get('disabled')) {
|
if (this.isDisabled()) {
|
||||||
if (this.isOpen()) {
|
if (this.isOpen()) {
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
@@ -5416,7 +5734,7 @@ S2.define('select2/core',[
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype._syncSubtree = function (evt, mutations) {
|
Select2.prototype._isChangeMutation = function (evt, mutations) {
|
||||||
var changed = false;
|
var changed = false;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
@@ -5444,7 +5762,22 @@ S2.define('select2/core',[
|
|||||||
}
|
}
|
||||||
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
||||||
changed = true;
|
changed = true;
|
||||||
|
} else if ($.isArray(mutations)) {
|
||||||
|
$.each(mutations, function(evt, mutation) {
|
||||||
|
if (self._isChangeMutation(evt, mutation)) {
|
||||||
|
// We've found a change mutation.
|
||||||
|
// Let's escape from the loop and continue
|
||||||
|
changed = true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return changed;
|
||||||
|
};
|
||||||
|
|
||||||
|
Select2.prototype._syncSubtree = function (evt, mutations) {
|
||||||
|
var changed = this._isChangeMutation(evt, mutations);
|
||||||
|
var self = this;
|
||||||
|
|
||||||
// Only re-pull the data if we think there is a change
|
// Only re-pull the data if we think there is a change
|
||||||
if (changed) {
|
if (changed) {
|
||||||
@@ -5466,7 +5799,8 @@ S2.define('select2/core',[
|
|||||||
'open': 'opening',
|
'open': 'opening',
|
||||||
'close': 'closing',
|
'close': 'closing',
|
||||||
'select': 'selecting',
|
'select': 'selecting',
|
||||||
'unselect': 'unselecting'
|
'unselect': 'unselecting',
|
||||||
|
'clear': 'clearing'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (args === undefined) {
|
if (args === undefined) {
|
||||||
@@ -5494,7 +5828,7 @@ S2.define('select2/core',[
|
|||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.toggleDropdown = function () {
|
Select2.prototype.toggleDropdown = function () {
|
||||||
if (this.options.get('disabled')) {
|
if (this.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5510,15 +5844,40 @@ S2.define('select2/core',[
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isDisabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.trigger('query', {});
|
this.trigger('query', {});
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.close = function () {
|
Select2.prototype.close = function (evt) {
|
||||||
if (!this.isOpen()) {
|
if (!this.isOpen()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.trigger('close', {});
|
this.trigger('close', { originalEvent : evt });
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "enabled" (not "disabled") state of this
|
||||||
|
* object.
|
||||||
|
*
|
||||||
|
* @return {true} if the instance is not disabled.
|
||||||
|
* @return {false} if the instance is disabled.
|
||||||
|
*/
|
||||||
|
Select2.prototype.isEnabled = function () {
|
||||||
|
return !this.isDisabled();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to abstract the "disabled" state of this object.
|
||||||
|
*
|
||||||
|
* @return {true} if the disabled option is true.
|
||||||
|
* @return {false} if the disabled option is false.
|
||||||
|
*/
|
||||||
|
Select2.prototype.isDisabled = function () {
|
||||||
|
return this.options.get('disabled');
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.isOpen = function () {
|
Select2.prototype.isOpen = function () {
|
||||||
@@ -5595,7 +5954,7 @@ S2.define('select2/core',[
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element.val(newVal).trigger('change');
|
this.$element.val(newVal).trigger('input').trigger('change');
|
||||||
};
|
};
|
||||||
|
|
||||||
Select2.prototype.destroy = function () {
|
Select2.prototype.destroy = function () {
|
||||||
@@ -5621,10 +5980,12 @@ S2.define('select2/core',[
|
|||||||
this._syncS = null;
|
this._syncS = null;
|
||||||
|
|
||||||
this.$element.off('.select2');
|
this.$element.off('.select2');
|
||||||
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
|
this.$element.attr('tabindex',
|
||||||
|
Utils.GetData(this.$element[0], 'old-tabindex'));
|
||||||
|
|
||||||
this.$element.removeClass('select2-hidden-accessible');
|
this.$element.removeClass('select2-hidden-accessible');
|
||||||
this.$element.attr('aria-hidden', 'false');
|
this.$element.attr('aria-hidden', 'false');
|
||||||
|
Utils.RemoveData(this.$element[0]);
|
||||||
this.$element.removeData('select2');
|
this.$element.removeData('select2');
|
||||||
|
|
||||||
this.dataAdapter.destroy();
|
this.dataAdapter.destroy();
|
||||||
@@ -5652,7 +6013,7 @@ S2.define('select2/core',[
|
|||||||
|
|
||||||
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
||||||
|
|
||||||
$container.data('element', this.$element);
|
Utils.StoreData($container[0], 'element', this.$element);
|
||||||
|
|
||||||
return $container;
|
return $container;
|
||||||
};
|
};
|
||||||
@@ -5672,8 +6033,9 @@ S2.define('jquery.select2',[
|
|||||||
'jquery-mousewheel',
|
'jquery-mousewheel',
|
||||||
|
|
||||||
'./select2/core',
|
'./select2/core',
|
||||||
'./select2/defaults'
|
'./select2/defaults',
|
||||||
], function ($, _, Select2, Defaults) {
|
'./select2/utils'
|
||||||
|
], function ($, _, Select2, Defaults, Utils) {
|
||||||
if ($.fn.select2 == null) {
|
if ($.fn.select2 == null) {
|
||||||
// All methods that should return the element
|
// All methods that should return the element
|
||||||
var thisMethods = ['open', 'close', 'destroy'];
|
var thisMethods = ['open', 'close', 'destroy'];
|
||||||
@@ -5694,7 +6056,7 @@ S2.define('jquery.select2',[
|
|||||||
var args = Array.prototype.slice.call(arguments, 1);
|
var args = Array.prototype.slice.call(arguments, 1);
|
||||||
|
|
||||||
this.each(function () {
|
this.each(function () {
|
||||||
var instance = $(this).data('select2');
|
var instance = Utils.GetData(this, 'select2');
|
||||||
|
|
||||||
if (instance == null && window.console && console.error) {
|
if (instance == null && window.console && console.error) {
|
||||||
console.error(
|
console.error(
|
||||||
|
|||||||
@@ -1,155 +0,0 @@
|
|||||||
(function($) {
|
|
||||||
$.extend($.summernote.lang, {
|
|
||||||
'ko-KR': {
|
|
||||||
font: {
|
|
||||||
bold: '굵게',
|
|
||||||
italic: '기울임꼴',
|
|
||||||
underline: '밑줄',
|
|
||||||
clear: '글자 효과 없애기',
|
|
||||||
height: '줄간격',
|
|
||||||
name: '글꼴',
|
|
||||||
superscript: '위 첨자',
|
|
||||||
subscript: '아래 첨자',
|
|
||||||
strikethrough: '취소선',
|
|
||||||
size: '글자 크기'
|
|
||||||
},
|
|
||||||
image: {
|
|
||||||
image: '사진',
|
|
||||||
insert: '사진 추가',
|
|
||||||
resizeFull: '100% 크기로 변경',
|
|
||||||
resizeHalf: '50% 크기로 변경',
|
|
||||||
resizeQuarter: '25% 크기로 변경',
|
|
||||||
floatLeft: '왼쪽 정렬',
|
|
||||||
floatRight: '오른쪽 정렬',
|
|
||||||
floatNone: '정렬하지 않음',
|
|
||||||
shapeRounded: '스타일: 둥근 모서리',
|
|
||||||
shapeCircle: '스타일: 원형',
|
|
||||||
shapeThumbnail: '스타일: 액자',
|
|
||||||
shapeNone: '스타일: 없음',
|
|
||||||
dragImageHere: '텍스트 혹은 사진을 이곳으로 끌어오세요',
|
|
||||||
dropImage: '텍스트 혹은 사진을 내려놓으세요',
|
|
||||||
selectFromFiles: '파일 선택',
|
|
||||||
maximumFileSize: 'Maximum file size',
|
|
||||||
maximumFileSizeError: 'Maximum file size exceeded.',
|
|
||||||
url: '사진 URL',
|
|
||||||
remove: '사진 삭제',
|
|
||||||
original: 'Original'
|
|
||||||
},
|
|
||||||
video: {
|
|
||||||
video: '동영상',
|
|
||||||
videoLink: '동영상 링크',
|
|
||||||
insert: '동영상 추가',
|
|
||||||
url: '동영상 URL',
|
|
||||||
providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion, Youku 사용 가능)'
|
|
||||||
},
|
|
||||||
link: {
|
|
||||||
link: '링크',
|
|
||||||
insert: '링크 추가',
|
|
||||||
unlink: '링크 삭제',
|
|
||||||
edit: '수정',
|
|
||||||
textToDisplay: '링크에 표시할 내용',
|
|
||||||
url: '이동할 URL',
|
|
||||||
openInNewWindow: '새창으로 열기'
|
|
||||||
},
|
|
||||||
table: {
|
|
||||||
table: '테이블',
|
|
||||||
addRowAbove: 'Add row above',
|
|
||||||
addRowBelow: 'Add row below',
|
|
||||||
addColLeft: 'Add column left',
|
|
||||||
addColRight: 'Add column right',
|
|
||||||
delRow: 'Delete row',
|
|
||||||
delCol: 'Delete column',
|
|
||||||
delTable: 'Delete table'
|
|
||||||
},
|
|
||||||
hr: {
|
|
||||||
insert: '구분선 추가'
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
style: '스타일',
|
|
||||||
p: '본문',
|
|
||||||
blockquote: '인용구',
|
|
||||||
pre: '코드',
|
|
||||||
h1: '제목 1',
|
|
||||||
h2: '제목 2',
|
|
||||||
h3: '제목 3',
|
|
||||||
h4: '제목 4',
|
|
||||||
h5: '제목 5',
|
|
||||||
h6: '제목 6'
|
|
||||||
},
|
|
||||||
lists: {
|
|
||||||
unordered: '글머리 기호',
|
|
||||||
ordered: '번호 매기기'
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
help: '도움말',
|
|
||||||
fullscreen: '전체 화면',
|
|
||||||
codeview: '코드 보기'
|
|
||||||
},
|
|
||||||
paragraph: {
|
|
||||||
paragraph: '문단 정렬',
|
|
||||||
outdent: '내어쓰기',
|
|
||||||
indent: '들여쓰기',
|
|
||||||
left: '왼쪽 정렬',
|
|
||||||
center: '가운데 정렬',
|
|
||||||
right: '오른쪽 정렬',
|
|
||||||
justify: '양쪽 정렬'
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
recent: '마지막으로 사용한 색',
|
|
||||||
more: '다른 색 선택',
|
|
||||||
background: '배경색',
|
|
||||||
foreground: '글자색',
|
|
||||||
transparent: '투명',
|
|
||||||
setTransparent: '투명',
|
|
||||||
reset: '취소',
|
|
||||||
resetToDefault: '기본 값으로 변경'
|
|
||||||
},
|
|
||||||
shortcut: {
|
|
||||||
shortcuts: '키보드 단축키',
|
|
||||||
close: '닫기',
|
|
||||||
textFormatting: '글자 스타일 적용',
|
|
||||||
action: '기능',
|
|
||||||
paragraphFormatting: '문단 스타일 적용',
|
|
||||||
documentStyle: '문서 스타일 적용',
|
|
||||||
extraKeys: 'Extra keys'
|
|
||||||
},
|
|
||||||
help: {
|
|
||||||
'insertParagraph': 'Insert Paragraph',
|
|
||||||
'undo': 'Undoes the last command',
|
|
||||||
'redo': 'Redoes the last command',
|
|
||||||
'tab': 'Tab',
|
|
||||||
'untab': 'Untab',
|
|
||||||
'bold': 'Set a bold style',
|
|
||||||
'italic': 'Set a italic style',
|
|
||||||
'underline': 'Set a underline style',
|
|
||||||
'strikethrough': 'Set a strikethrough style',
|
|
||||||
'removeFormat': 'Clean a style',
|
|
||||||
'justifyLeft': 'Set left align',
|
|
||||||
'justifyCenter': 'Set center align',
|
|
||||||
'justifyRight': 'Set right align',
|
|
||||||
'justifyFull': 'Set full align',
|
|
||||||
'insertUnorderedList': 'Toggle unordered list',
|
|
||||||
'insertOrderedList': 'Toggle ordered list',
|
|
||||||
'outdent': 'Outdent on current paragraph',
|
|
||||||
'indent': 'Indent on current paragraph',
|
|
||||||
'formatPara': 'Change current block\'s format as a paragraph(P tag)',
|
|
||||||
'formatH1': 'Change current block\'s format as H1',
|
|
||||||
'formatH2': 'Change current block\'s format as H2',
|
|
||||||
'formatH3': 'Change current block\'s format as H3',
|
|
||||||
'formatH4': 'Change current block\'s format as H4',
|
|
||||||
'formatH5': 'Change current block\'s format as H5',
|
|
||||||
'formatH6': 'Change current block\'s format as H6',
|
|
||||||
'insertHorizontalRule': 'Insert horizontal rule',
|
|
||||||
'linkDialog.show': 'Show Link Dialog'
|
|
||||||
},
|
|
||||||
history: {
|
|
||||||
undo: '실행 취소',
|
|
||||||
redo: '다시 실행'
|
|
||||||
},
|
|
||||||
specialChar: {
|
|
||||||
specialChar: '특수문자',
|
|
||||||
select: '특수문자를 선택하세요'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})(jQuery);
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
.ext-databasic {
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
min-height: 50px;
|
|
||||||
background-color: cyan;
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px;
|
|
||||||
border: 1px solid white;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ext-databasic p {
|
|
||||||
color: white;
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
@@ -1,292 +0,0 @@
|
|||||||
(function(factory) {
|
|
||||||
/* global define */
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// AMD. Register as an anonymous module.
|
|
||||||
define(['jquery'], factory);
|
|
||||||
} else if (typeof module === 'object' && module.exports) {
|
|
||||||
// Node/CommonJS
|
|
||||||
module.exports = factory(require('jquery'));
|
|
||||||
} else {
|
|
||||||
// Browser globals
|
|
||||||
factory(window.jQuery);
|
|
||||||
}
|
|
||||||
}(function($) {
|
|
||||||
// pull in some summernote core functions
|
|
||||||
var ui = $.summernote.ui;
|
|
||||||
var dom = $.summernote.dom;
|
|
||||||
|
|
||||||
// define the popover plugin
|
|
||||||
var DataBasicPlugin = function(context) {
|
|
||||||
var self = this;
|
|
||||||
var options = context.options;
|
|
||||||
var lang = options.langInfo;
|
|
||||||
|
|
||||||
self.icon = '<i class="fa fa-object-group"/>';
|
|
||||||
|
|
||||||
// add context menu button for dialog
|
|
||||||
context.memo('button.databasic', function() {
|
|
||||||
return ui.button({
|
|
||||||
contents: self.icon,
|
|
||||||
tooltip: lang.databasic.insert,
|
|
||||||
click: context.createInvokeHandler('databasic.showDialog')
|
|
||||||
}).render();
|
|
||||||
});
|
|
||||||
|
|
||||||
// add popover edit button
|
|
||||||
context.memo('button.databasicDialog', function() {
|
|
||||||
return ui.button({
|
|
||||||
contents: self.icon,
|
|
||||||
tooltip: lang.databasic.edit,
|
|
||||||
click: context.createInvokeHandler('databasic.showDialog')
|
|
||||||
}).render();
|
|
||||||
});
|
|
||||||
|
|
||||||
// add popover size buttons
|
|
||||||
context.memo('button.databasicSize100', function() {
|
|
||||||
return ui.button({
|
|
||||||
contents: '<span class="note-fontsize-10">100%</span>',
|
|
||||||
tooltip: lang.image.resizeFull,
|
|
||||||
click: context.createInvokeHandler('editor.resize', '1')
|
|
||||||
}).render();
|
|
||||||
});
|
|
||||||
context.memo('button.databasicSize50', function() {
|
|
||||||
return ui.button({
|
|
||||||
contents: '<span class="note-fontsize-10">50%</span>',
|
|
||||||
tooltip: lang.image.resizeHalf,
|
|
||||||
click: context.createInvokeHandler('editor.resize', '0.5')
|
|
||||||
}).render();
|
|
||||||
});
|
|
||||||
context.memo('button.databasicSize25', function() {
|
|
||||||
return ui.button({
|
|
||||||
contents: '<span class="note-fontsize-10">25%</span>',
|
|
||||||
tooltip: lang.image.resizeQuarter,
|
|
||||||
click: context.createInvokeHandler('editor.resize', '0.25')
|
|
||||||
}).render();
|
|
||||||
});
|
|
||||||
|
|
||||||
self.events = {
|
|
||||||
'summernote.init': function(we, e) {
|
|
||||||
// update existing containers
|
|
||||||
$('data.ext-databasic', e.editable).each(function() { self.setContent($(this)); });
|
|
||||||
// TODO: make this an undo snapshot...
|
|
||||||
},
|
|
||||||
'summernote.keyup summernote.mouseup summernote.change summernote.scroll': function() {
|
|
||||||
self.update();
|
|
||||||
},
|
|
||||||
'summernote.dialog.shown': function() {
|
|
||||||
self.hidePopover();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
self.initialize = function() {
|
|
||||||
// create dialog markup
|
|
||||||
var $container = options.dialogsInBody ? $(document.body) : context.layoutInfo.editor;
|
|
||||||
|
|
||||||
var body = '<div class="form-group row-fluid">' +
|
|
||||||
'<label>' + lang.databasic.testLabel + '</label>' +
|
|
||||||
'<input class="ext-databasic-test form-control" type="text" />' +
|
|
||||||
'</div>';
|
|
||||||
var footer = '<button href="#" class="btn btn-primary ext-databasic-save">' + lang.databasic.insert + '</button>';
|
|
||||||
|
|
||||||
self.$dialog = ui.dialog({
|
|
||||||
title: lang.databasic.name,
|
|
||||||
fade: options.dialogsFade,
|
|
||||||
body: body,
|
|
||||||
footer: footer
|
|
||||||
}).render().appendTo($container);
|
|
||||||
|
|
||||||
// create popover
|
|
||||||
self.$popover = ui.popover({
|
|
||||||
className: 'ext-databasic-popover'
|
|
||||||
}).render().appendTo('body');
|
|
||||||
var $content = self.$popover.find('.popover-content');
|
|
||||||
|
|
||||||
context.invoke('buttons.build', $content, options.popover.databasic);
|
|
||||||
};
|
|
||||||
|
|
||||||
self.destroy = function() {
|
|
||||||
self.$popover.remove();
|
|
||||||
self.$popover = null;
|
|
||||||
self.$dialog.remove();
|
|
||||||
self.$dialog = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
self.update = function() {
|
|
||||||
// Prevent focusing on editable when invoke('code') is executed
|
|
||||||
if (!context.invoke('editor.hasFocus')) {
|
|
||||||
self.hidePopover();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var rng = context.invoke('editor.createRange');
|
|
||||||
var visible = false;
|
|
||||||
|
|
||||||
if (rng.isOnData()) {
|
|
||||||
var $data = $(rng.sc).closest('data.ext-databasic');
|
|
||||||
|
|
||||||
if ($data.length) {
|
|
||||||
var pos = dom.posFromPlaceholder($data[0]);
|
|
||||||
|
|
||||||
self.$popover.css({
|
|
||||||
display: 'block',
|
|
||||||
left: pos.left,
|
|
||||||
top: pos.top
|
|
||||||
});
|
|
||||||
|
|
||||||
// save editor target to let size buttons resize the container
|
|
||||||
context.invoke('editor.saveTarget', $data[0]);
|
|
||||||
|
|
||||||
visible = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// hide if not visible
|
|
||||||
if (!visible) {
|
|
||||||
self.hidePopover();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
self.hidePopover = function() {
|
|
||||||
self.$popover.hide();
|
|
||||||
};
|
|
||||||
|
|
||||||
// define plugin dialog
|
|
||||||
self.getInfo = function() {
|
|
||||||
var rng = context.invoke('editor.createRange');
|
|
||||||
|
|
||||||
if (rng.isOnData()) {
|
|
||||||
var $data = $(rng.sc).closest('data.ext-databasic');
|
|
||||||
|
|
||||||
if ($data.length) {
|
|
||||||
// Get the first node on range(for edit).
|
|
||||||
return {
|
|
||||||
node: $data,
|
|
||||||
test: $data.attr('data-test')
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {};
|
|
||||||
};
|
|
||||||
|
|
||||||
self.setContent = function($node) {
|
|
||||||
$node.html('<p contenteditable="false">' + self.icon + ' ' + lang.databasic.name + ': ' +
|
|
||||||
$node.attr('data-test') + '</p>');
|
|
||||||
};
|
|
||||||
|
|
||||||
self.updateNode = function(info) {
|
|
||||||
self.setContent(info.node
|
|
||||||
.attr('data-test', info.test));
|
|
||||||
};
|
|
||||||
|
|
||||||
self.createNode = function(info) {
|
|
||||||
var $node = $('<data class="ext-databasic"></data>');
|
|
||||||
|
|
||||||
if ($node) {
|
|
||||||
// save node to info structure
|
|
||||||
info.node = $node;
|
|
||||||
// insert node into editor dom
|
|
||||||
context.invoke('editor.insertNode', $node[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $node;
|
|
||||||
};
|
|
||||||
|
|
||||||
self.showDialog = function() {
|
|
||||||
var info = self.getInfo();
|
|
||||||
var newNode = !info.node;
|
|
||||||
context.invoke('editor.saveRange');
|
|
||||||
|
|
||||||
self
|
|
||||||
.openDialog(info)
|
|
||||||
.then(function(dialogInfo) {
|
|
||||||
// [workaround] hide dialog before restore range for IE range focus
|
|
||||||
ui.hideDialog(self.$dialog);
|
|
||||||
context.invoke('editor.restoreRange');
|
|
||||||
|
|
||||||
// insert a new node
|
|
||||||
if (newNode) {
|
|
||||||
self.createNode(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
// update info with dialog info
|
|
||||||
$.extend(info, dialogInfo);
|
|
||||||
|
|
||||||
self.updateNode(info);
|
|
||||||
})
|
|
||||||
.fail(function() {
|
|
||||||
context.invoke('editor.restoreRange');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
self.openDialog = function(info) {
|
|
||||||
return $.Deferred(function(deferred) {
|
|
||||||
var $inpTest = self.$dialog.find('.ext-databasic-test');
|
|
||||||
var $saveBtn = self.$dialog.find('.ext-databasic-save');
|
|
||||||
var onKeyup = function(event) {
|
|
||||||
if (event.keyCode === 13) {
|
|
||||||
$saveBtn.trigger('click');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ui.onDialogShown(self.$dialog, function() {
|
|
||||||
context.triggerEvent('dialog.shown');
|
|
||||||
|
|
||||||
$inpTest.val(info.test).on('input', function() {
|
|
||||||
ui.toggleBtn($saveBtn, $inpTest.val());
|
|
||||||
}).trigger('focus').on('keyup', onKeyup);
|
|
||||||
|
|
||||||
$saveBtn
|
|
||||||
.text(info.node ? lang.databasic.edit : lang.databasic.insert)
|
|
||||||
.click(function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
deferred.resolve({ test: $inpTest.val() });
|
|
||||||
});
|
|
||||||
|
|
||||||
// init save button
|
|
||||||
ui.toggleBtn($saveBtn, $inpTest.val());
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.onDialogHidden(self.$dialog, function() {
|
|
||||||
$inpTest.off('input keyup');
|
|
||||||
$saveBtn.off('click');
|
|
||||||
|
|
||||||
if (deferred.state() === 'pending') {
|
|
||||||
deferred.reject();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.showDialog(self.$dialog);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Extends summernote
|
|
||||||
$.extend(true, $.summernote, {
|
|
||||||
plugins: {
|
|
||||||
databasic: DataBasicPlugin
|
|
||||||
},
|
|
||||||
|
|
||||||
options: {
|
|
||||||
popover: {
|
|
||||||
databasic: [
|
|
||||||
['databasic', ['databasicDialog', 'databasicSize100', 'databasicSize50', 'databasicSize25']]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// add localization texts
|
|
||||||
lang: {
|
|
||||||
'en-US': {
|
|
||||||
databasic: {
|
|
||||||
name: 'Basic Data Container',
|
|
||||||
insert: 'insert basic data container',
|
|
||||||
edit: 'edit basic data container',
|
|
||||||
testLabel: 'test input'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
(function(factory) {
|
|
||||||
/* global define */
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// AMD. Register as an anonymous module.
|
|
||||||
define(['jquery'], factory);
|
|
||||||
} else if (typeof module === 'object' && module.exports) {
|
|
||||||
// Node/CommonJS
|
|
||||||
module.exports = factory(require('jquery'));
|
|
||||||
} else {
|
|
||||||
// Browser globals
|
|
||||||
factory(window.jQuery);
|
|
||||||
}
|
|
||||||
}(function($) {
|
|
||||||
// Extends plugins for adding hello.
|
|
||||||
// - plugin is external module for customizing.
|
|
||||||
$.extend($.summernote.plugins, {
|
|
||||||
/**
|
|
||||||
* @param {Object} context - context object has status of editor.
|
|
||||||
*/
|
|
||||||
'hello': function(context) {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
// ui has renders to build ui elements.
|
|
||||||
// - you can create a button with `ui.button`
|
|
||||||
var ui = $.summernote.ui;
|
|
||||||
|
|
||||||
// add hello button
|
|
||||||
context.memo('button.hello', function() {
|
|
||||||
// create button
|
|
||||||
var button = ui.button({
|
|
||||||
contents: '<i class="fa fa-child"/> Hello',
|
|
||||||
tooltip: 'hello',
|
|
||||||
click: function() {
|
|
||||||
self.$panel.show();
|
|
||||||
self.$panel.hide(500);
|
|
||||||
// invoke insertText method with 'hello' on editor module.
|
|
||||||
context.invoke('editor.insertText', 'hello');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// create jQuery object from button instance.
|
|
||||||
var $hello = button.render();
|
|
||||||
return $hello;
|
|
||||||
});
|
|
||||||
|
|
||||||
// This events will be attached when editor is initialized.
|
|
||||||
this.events = {
|
|
||||||
// This will be called after modules are initialized.
|
|
||||||
'summernote.init': function(we, e) {
|
|
||||||
console.log('summernote initialized', we, e);
|
|
||||||
},
|
|
||||||
// This will be called when user releases a key on editable.
|
|
||||||
'summernote.keyup': function(we, e) {
|
|
||||||
console.log('summernote keyup', we, e);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// This method will be called when editor is initialized by $('..').summernote();
|
|
||||||
// You can create elements for plugin
|
|
||||||
this.initialize = function() {
|
|
||||||
this.$panel = $('<div class="hello-panel"/>').css({
|
|
||||||
position: 'absolute',
|
|
||||||
width: 100,
|
|
||||||
height: 100,
|
|
||||||
left: '50%',
|
|
||||||
top: '50%',
|
|
||||||
background: 'red'
|
|
||||||
}).hide();
|
|
||||||
|
|
||||||
this.$panel.appendTo('body');
|
|
||||||
};
|
|
||||||
|
|
||||||
// This methods will be called when editor is destroyed by $('..').summernote('destroy');
|
|
||||||
// You should remove elements on `initialize`.
|
|
||||||
this.destroy = function() {
|
|
||||||
this.$panel.remove();
|
|
||||||
this.$panel = null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
@@ -1,153 +0,0 @@
|
|||||||
/* Forked from https://github.com/asiffermann/summernote-image-title */
|
|
||||||
|
|
||||||
(function (factory) {
|
|
||||||
/* Global define */
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// AMD. Register as an anonymous module.
|
|
||||||
define(['jquery'], factory);
|
|
||||||
} else if (typeof module === 'object' && module.exports) {
|
|
||||||
// Node/CommonJS
|
|
||||||
module.exports = factory(require('jquery'));
|
|
||||||
} else {
|
|
||||||
// Browser globals
|
|
||||||
factory(window.jQuery);
|
|
||||||
}
|
|
||||||
}(function ($) {
|
|
||||||
$.extend(true, $.summernote.lang, {
|
|
||||||
'en-US': {
|
|
||||||
imageFlip: {
|
|
||||||
edit: 'Flip image',
|
|
||||||
flipLabel: 'Alternative Image'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'ko-KR': {
|
|
||||||
imageFlip: {
|
|
||||||
edit: '이미지 전환',
|
|
||||||
flipLabel: '대체 이미지( , 로 구분)'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
$.extend($.summernote.options, {
|
|
||||||
imageFlip: {
|
|
||||||
icon: '<i class="note-icon-pencil"/>',
|
|
||||||
tooltip: 'Image Flip'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$.extend($.summernote.plugins, {
|
|
||||||
'imageFlip': function (context) {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
var ui = $.summernote.ui;
|
|
||||||
var $note = context.layoutInfo.note;
|
|
||||||
var $editor = context.layoutInfo.editor;
|
|
||||||
var $editable = context.layoutInfo.editable;
|
|
||||||
var $toolbar = context.layoutInfo.toolbar;
|
|
||||||
|
|
||||||
if (typeof context.options.imageFlip === 'undefined') {
|
|
||||||
context.options.imageFlip = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = context.options;
|
|
||||||
var lang = options.langInfo;
|
|
||||||
|
|
||||||
context.memo('button.imageFlip', function () {
|
|
||||||
var button = ui.button({
|
|
||||||
contents: ui.icon(options.icons.pencil),
|
|
||||||
container: false,
|
|
||||||
tooltip: lang.imageFlip.edit,
|
|
||||||
click: function (e) {
|
|
||||||
context.invoke('imageFlip.show');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return button.render();
|
|
||||||
});
|
|
||||||
|
|
||||||
this.initialize = function () {
|
|
||||||
var $container = options.dialogsInBody ? $(document.body) : $editor;
|
|
||||||
|
|
||||||
var body = '<div class="form-group">' +
|
|
||||||
'<label>' + lang.imageFlip.flipLabel + '</label>' +
|
|
||||||
'<input class="note-image-flip-text form-control" type="text" />' +
|
|
||||||
'</div>';
|
|
||||||
|
|
||||||
var footer = '<button href="#" class="btn btn-primary note-image-flip-btn">' + lang.imageFlip.edit + '</button>';
|
|
||||||
|
|
||||||
this.$dialog = ui.dialog({
|
|
||||||
title: lang.imageFlip.edit,
|
|
||||||
body: body,
|
|
||||||
footer: footer
|
|
||||||
}).render().appendTo($container);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.destroy = function () {
|
|
||||||
ui.hideDialog(this.$dialog);
|
|
||||||
this.$dialog.remove();
|
|
||||||
};
|
|
||||||
|
|
||||||
this.bindEnterKey = function ($input, $btn) {
|
|
||||||
$input.on('keypress', function (event) {
|
|
||||||
if (event.keyCode === 13) {
|
|
||||||
$btn.trigger('click');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.show = function () {
|
|
||||||
var $img = $($editable.data('target'));
|
|
||||||
|
|
||||||
var imgInfo = {
|
|
||||||
imgDom: $img,
|
|
||||||
flip: $img.data('flip'),
|
|
||||||
};
|
|
||||||
this.showLinkDialog(imgInfo).then(function (imgInfo) {
|
|
||||||
ui.hideDialog(self.$dialog);
|
|
||||||
var $img = imgInfo.imgDom;
|
|
||||||
|
|
||||||
if (imgInfo.flip) {
|
|
||||||
$img.attr('data-flip', imgInfo.flip);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$img.removeData('flip');
|
|
||||||
}
|
|
||||||
|
|
||||||
$note.val(context.invoke('code'));
|
|
||||||
$note.change();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.showLinkDialog = function (imgInfo) {
|
|
||||||
return $.Deferred(function (deferred) {
|
|
||||||
var $imageFlip = self.$dialog.find('.note-image-flip-text');
|
|
||||||
var $editBtn = self.$dialog.find('.note-image-flip-btn');
|
|
||||||
|
|
||||||
ui.onDialogShown(self.$dialog, function () {
|
|
||||||
context.triggerEvent('dialog.shown');
|
|
||||||
|
|
||||||
$editBtn.click(function (event) {
|
|
||||||
event.preventDefault();
|
|
||||||
deferred.resolve({
|
|
||||||
imgDom: imgInfo.imgDom,
|
|
||||||
flip: $imageFlip.val(),
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$imageFlip.val(imgInfo.flip).trigger('focus');
|
|
||||||
self.bindEnterKey($imageFlip, $editBtn);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.onDialogHidden(self.$dialog, function () {
|
|
||||||
$editBtn.off('click');
|
|
||||||
|
|
||||||
if (deferred.state() === 'pending') {
|
|
||||||
deferred.reject();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.showDialog(self.$dialog);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
@@ -1,312 +0,0 @@
|
|||||||
(function(factory) {
|
|
||||||
/* global define */
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// AMD. Register as an anonymous module.
|
|
||||||
define(['jquery'], factory);
|
|
||||||
} else if (typeof module === 'object' && module.exports) {
|
|
||||||
// Node/CommonJS
|
|
||||||
module.exports = factory(require('jquery'));
|
|
||||||
} else {
|
|
||||||
// Browser globals
|
|
||||||
factory(window.jQuery);
|
|
||||||
}
|
|
||||||
}(function($) {
|
|
||||||
$.extend($.summernote.plugins, {
|
|
||||||
'specialchars': function(context) {
|
|
||||||
var self = this;
|
|
||||||
var ui = $.summernote.ui;
|
|
||||||
|
|
||||||
var $editor = context.layoutInfo.editor;
|
|
||||||
var options = context.options;
|
|
||||||
var lang = options.langInfo;
|
|
||||||
|
|
||||||
var KEY = {
|
|
||||||
UP: 38,
|
|
||||||
DOWN: 40,
|
|
||||||
LEFT: 37,
|
|
||||||
RIGHT: 39,
|
|
||||||
ENTER: 13
|
|
||||||
};
|
|
||||||
var COLUMN_LENGTH = 15;
|
|
||||||
var COLUMN_WIDTH = 35;
|
|
||||||
|
|
||||||
var currentColumn = 0;
|
|
||||||
var currentRow = 0;
|
|
||||||
var totalColumn = 0;
|
|
||||||
var totalRow = 0;
|
|
||||||
|
|
||||||
// special characters data set
|
|
||||||
var specialCharDataSet = [
|
|
||||||
'"', '&', '<', '>', '¡', '¢',
|
|
||||||
'£', '¤', '¥', '¦', '§',
|
|
||||||
'¨', '©', 'ª', '«', '¬',
|
|
||||||
'®', '¯', '°', '±', '²',
|
|
||||||
'³', '´', 'µ', '¶', '·',
|
|
||||||
'¸', '¹', 'º', '»', '¼',
|
|
||||||
'½', '¾', '¿', '×', '÷',
|
|
||||||
'ƒ', 'ˆ', '˜', '–', '—',
|
|
||||||
'‘', '’', '‚', '“', '”',
|
|
||||||
'„', '†', '‡', '•', '…',
|
|
||||||
'‰', '′', '″', '‹', '›',
|
|
||||||
'‾', '⁄', '€', 'ℑ', '℘',
|
|
||||||
'ℜ', '™', 'ℵ', '←', '↑',
|
|
||||||
'→', '↓', '↔', '↵', '⇐',
|
|
||||||
'⇑', '⇒', '⇓', '⇔', '∀',
|
|
||||||
'∂', '∃', '∅', '∇', '∈',
|
|
||||||
'∉', '∋', '∏', '∑', '−',
|
|
||||||
'∗', '√', '∝', '∞', '∠',
|
|
||||||
'∧', '∨', '∩', '∪', '∫',
|
|
||||||
'∴', '∼', '≅', '≈', '≠',
|
|
||||||
'≡', '≤', '≥', '⊂', '⊃',
|
|
||||||
'⊄', '⊆', '⊇', '⊕', '⊗',
|
|
||||||
'⊥', '⋅', '⌈', '⌉', '⌊',
|
|
||||||
'⌋', '◊', '♠', '♣', '♥',
|
|
||||||
'♦'
|
|
||||||
];
|
|
||||||
|
|
||||||
context.memo('button.specialchars', function() {
|
|
||||||
return ui.button({
|
|
||||||
contents: '<i class="fa fa-font fa-flip-vertical">',
|
|
||||||
tooltip: lang.specialChar.specialChar,
|
|
||||||
click: function() {
|
|
||||||
self.show();
|
|
||||||
}
|
|
||||||
}).render();
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make Special Characters Table
|
|
||||||
*
|
|
||||||
* @member plugin.specialChar
|
|
||||||
* @private
|
|
||||||
* @return {jQuery}
|
|
||||||
*/
|
|
||||||
this.makeSpecialCharSetTable = function() {
|
|
||||||
var $table = $('<table/>');
|
|
||||||
$.each(specialCharDataSet, function(idx, text) {
|
|
||||||
var $td = $('<td/>').addClass('note-specialchar-node');
|
|
||||||
var $tr = (idx % COLUMN_LENGTH === 0) ? $('<tr/>') : $table.find('tr').last();
|
|
||||||
|
|
||||||
var $button = ui.button({
|
|
||||||
callback: function($node) {
|
|
||||||
$node.html(text);
|
|
||||||
$node.attr('title', text);
|
|
||||||
$node.attr('data-value', encodeURIComponent(text));
|
|
||||||
$node.css({
|
|
||||||
width: COLUMN_WIDTH,
|
|
||||||
'margin-right': '2px',
|
|
||||||
'margin-bottom': '2px'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).render();
|
|
||||||
|
|
||||||
$td.append($button);
|
|
||||||
|
|
||||||
$tr.append($td);
|
|
||||||
if (idx % COLUMN_LENGTH === 0) {
|
|
||||||
$table.append($tr);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
totalRow = $table.find('tr').length;
|
|
||||||
totalColumn = COLUMN_LENGTH;
|
|
||||||
|
|
||||||
return $table;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.initialize = function() {
|
|
||||||
var $container = options.dialogsInBody ? $(document.body) : $editor;
|
|
||||||
|
|
||||||
var body = '<div class="form-group row-fluid">' + this.makeSpecialCharSetTable()[0].outerHTML + '</div>';
|
|
||||||
|
|
||||||
this.$dialog = ui.dialog({
|
|
||||||
title: lang.specialChar.select,
|
|
||||||
body: body
|
|
||||||
}).render().appendTo($container);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.show = function() {
|
|
||||||
var text = context.invoke('editor.getSelectedText');
|
|
||||||
context.invoke('editor.saveRange');
|
|
||||||
this.showSpecialCharDialog(text).then(function(selectChar) {
|
|
||||||
context.invoke('editor.restoreRange');
|
|
||||||
|
|
||||||
// build node
|
|
||||||
var $node = $('<span></span>').html(selectChar)[0];
|
|
||||||
|
|
||||||
if ($node) {
|
|
||||||
// insert video node
|
|
||||||
context.invoke('editor.insertNode', $node);
|
|
||||||
}
|
|
||||||
}).fail(function() {
|
|
||||||
context.invoke('editor.restoreRange');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* show image dialog
|
|
||||||
*
|
|
||||||
* @param {jQuery} $dialog
|
|
||||||
* @return {Promise}
|
|
||||||
*/
|
|
||||||
this.showSpecialCharDialog = function(text) {
|
|
||||||
return $.Deferred(function(deferred) {
|
|
||||||
var $specialCharDialog = self.$dialog;
|
|
||||||
var $specialCharNode = $specialCharDialog.find('.note-specialchar-node');
|
|
||||||
var $selectedNode = null;
|
|
||||||
var ARROW_KEYS = [KEY.UP, KEY.DOWN, KEY.LEFT, KEY.RIGHT];
|
|
||||||
var ENTER_KEY = KEY.ENTER;
|
|
||||||
|
|
||||||
function addActiveClass($target) {
|
|
||||||
if (!$target) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$target.find('button').addClass('active');
|
|
||||||
$selectedNode = $target;
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeActiveClass($target) {
|
|
||||||
$target.find('button').removeClass('active');
|
|
||||||
$selectedNode = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// find next node
|
|
||||||
function findNextNode(row, column) {
|
|
||||||
var findNode = null;
|
|
||||||
$.each($specialCharNode, function(idx, $node) {
|
|
||||||
var findRow = Math.ceil((idx + 1) / COLUMN_LENGTH);
|
|
||||||
var findColumn = ((idx + 1) % COLUMN_LENGTH === 0) ? COLUMN_LENGTH : (idx + 1) % COLUMN_LENGTH;
|
|
||||||
if (findRow === row && findColumn === column) {
|
|
||||||
findNode = $node;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return $(findNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
function arrowKeyHandler(keyCode) {
|
|
||||||
// left, right, up, down key
|
|
||||||
var $nextNode;
|
|
||||||
var lastRowColumnLength = $specialCharNode.length % totalColumn;
|
|
||||||
|
|
||||||
if (KEY.LEFT === keyCode) {
|
|
||||||
if (currentColumn > 1) {
|
|
||||||
currentColumn = currentColumn - 1;
|
|
||||||
} else if (currentRow === 1 && currentColumn === 1) {
|
|
||||||
currentColumn = lastRowColumnLength;
|
|
||||||
currentRow = totalRow;
|
|
||||||
} else {
|
|
||||||
currentColumn = totalColumn;
|
|
||||||
currentRow = currentRow - 1;
|
|
||||||
}
|
|
||||||
} else if (KEY.RIGHT === keyCode) {
|
|
||||||
if (currentRow === totalRow && lastRowColumnLength === currentColumn) {
|
|
||||||
currentColumn = 1;
|
|
||||||
currentRow = 1;
|
|
||||||
} else if (currentColumn < totalColumn) {
|
|
||||||
currentColumn = currentColumn + 1;
|
|
||||||
} else {
|
|
||||||
currentColumn = 1;
|
|
||||||
currentRow = currentRow + 1;
|
|
||||||
}
|
|
||||||
} else if (KEY.UP === keyCode) {
|
|
||||||
if (currentRow === 1 && lastRowColumnLength < currentColumn) {
|
|
||||||
currentRow = totalRow - 1;
|
|
||||||
} else {
|
|
||||||
currentRow = currentRow - 1;
|
|
||||||
}
|
|
||||||
} else if (KEY.DOWN === keyCode) {
|
|
||||||
currentRow = currentRow + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentRow === totalRow && currentColumn > lastRowColumnLength) {
|
|
||||||
currentRow = 1;
|
|
||||||
} else if (currentRow > totalRow) {
|
|
||||||
currentRow = 1;
|
|
||||||
} else if (currentRow < 1) {
|
|
||||||
currentRow = totalRow;
|
|
||||||
}
|
|
||||||
|
|
||||||
$nextNode = findNextNode(currentRow, currentColumn);
|
|
||||||
|
|
||||||
if ($nextNode) {
|
|
||||||
removeActiveClass($selectedNode);
|
|
||||||
addActiveClass($nextNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function enterKeyHandler() {
|
|
||||||
if (!$selectedNode) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
deferred.resolve(decodeURIComponent($selectedNode.find('button').attr('data-value')));
|
|
||||||
$specialCharDialog.modal('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
function keyDownEventHandler(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
var keyCode = event.keyCode;
|
|
||||||
if (keyCode === undefined || keyCode === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// check arrowKeys match
|
|
||||||
if (ARROW_KEYS.indexOf(keyCode) > -1) {
|
|
||||||
if ($selectedNode === null) {
|
|
||||||
addActiveClass($specialCharNode.eq(0));
|
|
||||||
currentColumn = 1;
|
|
||||||
currentRow = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
arrowKeyHandler(keyCode);
|
|
||||||
} else if (keyCode === ENTER_KEY) {
|
|
||||||
enterKeyHandler();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove class
|
|
||||||
removeActiveClass($specialCharNode);
|
|
||||||
|
|
||||||
// find selected node
|
|
||||||
if (text) {
|
|
||||||
for (var i = 0; i < $specialCharNode.length; i++) {
|
|
||||||
var $checkNode = $($specialCharNode[i]);
|
|
||||||
if ($checkNode.text() === text) {
|
|
||||||
addActiveClass($checkNode);
|
|
||||||
currentRow = Math.ceil((i + 1) / COLUMN_LENGTH);
|
|
||||||
currentColumn = (i + 1) % COLUMN_LENGTH;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ui.onDialogShown(self.$dialog, function() {
|
|
||||||
$(document).on('keydown', keyDownEventHandler);
|
|
||||||
|
|
||||||
self.$dialog.find('button').tooltip();
|
|
||||||
|
|
||||||
$specialCharNode.on('click', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
deferred.resolve(decodeURIComponent($(event.currentTarget).find('button').attr('data-value')));
|
|
||||||
ui.hideDialog(self.$dialog);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.onDialogHidden(self.$dialog, function() {
|
|
||||||
$specialCharNode.off('click');
|
|
||||||
|
|
||||||
self.$dialog.find('button').tooltip('destroy');
|
|
||||||
|
|
||||||
$(document).off('keydown', keyDownEventHandler);
|
|
||||||
|
|
||||||
if (deferred.state() === 'pending') {
|
|
||||||
deferred.reject();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.showDialog(self.$dialog);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,20 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
define('ROOT', realpath(__dir__.'/..'));
|
define('ROOT', realpath(__DIR__ . '/..'));
|
||||||
setlocale(LC_ALL, 'ko_KR.UTF-8');
|
setlocale(LC_ALL, 'ko_KR.UTF-8');
|
||||||
date_default_timezone_set('Asia/Seoul');
|
date_default_timezone_set('Asia/Seoul');
|
||||||
mb_internal_encoding("UTF-8");
|
mb_internal_encoding("UTF-8");
|
||||||
mb_http_output('UTF-8');
|
mb_http_output('UTF-8');
|
||||||
mb_regex_encoding('UTF-8');
|
mb_regex_encoding('UTF-8');
|
||||||
|
|
||||||
ini_set("session.cache_expire", 10080); // minutes
|
ini_set("session.cache_expire", '10080'); // minutes
|
||||||
ini_set("session.gc_maxlifetime", 604800); // seconds
|
ini_set("session.gc_maxlifetime", '604800'); // seconds
|
||||||
|
|
||||||
function getFriendlyErrorType($type)
|
function getFriendlyErrorType($type)
|
||||||
{
|
{
|
||||||
switch($type)
|
switch ($type) {
|
||||||
{
|
|
||||||
case E_ERROR: // 1 //
|
case E_ERROR: // 1 //
|
||||||
return 'E_ERROR';
|
return 'E_ERROR';
|
||||||
case E_WARNING: // 2 //
|
case E_WARNING: // 2 //
|
||||||
@@ -49,7 +49,8 @@ function getFriendlyErrorType($type)
|
|||||||
return "{$type}";
|
return "{$type}";
|
||||||
}
|
}
|
||||||
|
|
||||||
function getExceptionTraceAsString($exception) {
|
function getExceptionTraceAsString($exception)
|
||||||
|
{
|
||||||
//https://gist.github.com/abtris/1437966
|
//https://gist.github.com/abtris/1437966
|
||||||
$rtn = "";
|
$rtn = "";
|
||||||
$count = 0;
|
$count = 0;
|
||||||
@@ -77,43 +78,47 @@ function getExceptionTraceAsString($exception) {
|
|||||||
}
|
}
|
||||||
$args = join(", ", $args);
|
$args = join(", ", $args);
|
||||||
}
|
}
|
||||||
$rtn[] = sprintf( "#%s %s:%s %s(%s)",
|
$rtn[] = sprintf(
|
||||||
|
"#%s %s:%s %s(%s)",
|
||||||
$count,
|
$count,
|
||||||
isset($frame['file']) ? $frame['file'] : 'unknown file',
|
isset($frame['file']) ? $frame['file'] : 'unknown file',
|
||||||
isset($frame['line']) ? $frame['line'] : 'unknown line',
|
isset($frame['line']) ? $frame['line'] : 'unknown line',
|
||||||
(isset($frame['class'])) ? $frame['class'].$frame['type'].$frame['function'] : $frame['function'],
|
(isset($frame['class'])) ? $frame['class'] . $frame['type'] . $frame['function'] : $frame['function'],
|
||||||
$args );
|
$args
|
||||||
|
);
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
function logError(string $err, string $errstr, string $errpath, array $trace){
|
function logError(string $err, string $errstr, string $errpath, array $trace)
|
||||||
$fdb = FileDB::db(ROOT.'/d_log/err_log.sqlite3', ROOT.'/f_install/sql/err_log.sql');
|
{
|
||||||
|
$fdb = FileDB::db(ROOT . '/d_log/err_log.sqlite3', ROOT . '/f_install/sql/err_log.sql');
|
||||||
$date = date("Ymd_His");
|
$date = date("Ymd_His");
|
||||||
|
|
||||||
$errpath = str_replace(ROOT, '{ROOT}', $errpath);
|
$errpath = str_replace(ROOT, '{ROOT}', $errpath);
|
||||||
$trace = array_map(function(string $text){
|
$trace = array_map(function (string $text) {
|
||||||
return str_replace(ROOT, '{ROOT}', $text);
|
return str_replace(ROOT, '{ROOT}', $text);
|
||||||
}, $trace);
|
}, $trace);
|
||||||
|
|
||||||
$owner = Util::get_client_ip();
|
$owner = Util::get_client_ip();
|
||||||
$session = Session::getInstance();
|
$session = Session::getInstance();
|
||||||
if($session->isLoggedIn(true)){
|
if ($session->isLoggedIn(true)) {
|
||||||
$owner .= '('.$session->getUserID().','.$session->userName.')';
|
$owner .= '(' . $session->getUserID() . ',' . $session->userName . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$fdb->insert('err_log', [
|
$fdb->insert('err_log', [
|
||||||
'date'=>$date,
|
'date' => $date,
|
||||||
'err'=>$err,
|
'err' => $err,
|
||||||
'errstr'=>$errstr,
|
'errstr' => $errstr,
|
||||||
'errpath'=>$errpath,
|
'errpath' => $errpath,
|
||||||
'trace'=>Json::encode($trace),
|
'trace' => Json::encode($trace),
|
||||||
'webuser'=>$owner
|
'webuser' => $owner
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
|
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext=null)
|
||||||
|
{
|
||||||
if (!(error_reporting() & $errno)) {
|
if (!(error_reporting() & $errno)) {
|
||||||
// This error code is not included in error_reporting, so let it fall
|
// This error code is not included in error_reporting, so let it fall
|
||||||
// through to the standard PHP error handler
|
// through to the standard PHP error handler
|
||||||
@@ -125,19 +130,20 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in
|
|||||||
logError(
|
logError(
|
||||||
getFriendlyErrorType($errno),
|
getFriendlyErrorType($errno),
|
||||||
$errstr,
|
$errstr,
|
||||||
$errfile.':'.$errline,
|
$errfile . ':' . $errline,
|
||||||
getExceptionTraceAsString($e)
|
getExceptionTraceAsString($e)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
set_error_handler("\sammo\logErrorByCustomHandler");
|
set_error_handler("\\sammo\\logErrorByCustomHandler");
|
||||||
|
|
||||||
|
|
||||||
function logExceptionByCustomHandler(\Throwable $e){
|
function logExceptionByCustomHandler(\Throwable $e)
|
||||||
|
{
|
||||||
|
|
||||||
logError(
|
logError(
|
||||||
get_class($e),
|
get_class($e),
|
||||||
$e->getMessage(),
|
$e->getMessage(),
|
||||||
$e->getFile().':'.$e->getLine(),
|
$e->getFile() . ':' . $e->getLine(),
|
||||||
getExceptionTraceAsString($e)
|
getExceptionTraceAsString($e)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -145,3 +151,28 @@ function logExceptionByCustomHandler(\Throwable $e){
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
|
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
|
||||||
|
|
||||||
|
function getAPIExecutorClass($path){
|
||||||
|
|
||||||
|
static $basePath = __NAMESPACE__.'\\API\\';
|
||||||
|
if(is_string($path)){
|
||||||
|
}
|
||||||
|
else if(is_array($path)){
|
||||||
|
$path = join('\\', $path);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
throw new \InvalidArgumentException("{$path}는 올바른 API 지시자가 아님");
|
||||||
|
}
|
||||||
|
|
||||||
|
$classPath = str_replace('/', '\\', $basePath.$path);
|
||||||
|
|
||||||
|
if(class_exists($classPath)){
|
||||||
|
return $classPath;
|
||||||
|
}
|
||||||
|
throw new \InvalidArgumentException("{$path}는 올바른 API 경로가 아님");
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildAPIExecutorClass($type, string $rootPath, array $args):\sammo\BaseAPI{
|
||||||
|
$class = getAPIExecutorClass($type);
|
||||||
|
return new $class($rootPath, $args);
|
||||||
|
}
|
||||||
@@ -1,25 +1,32 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
require(__dir__.'/../vendor/autoload.php');
|
require(__DIR__ . '/../vendor/autoload.php');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>설치</title>
|
<title>설치</title>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?php /* NOTE: 설치 이전에는 ServConfig가 준비되어있지 않으므로 예외로 수동 지정 */ ?>
|
||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
<?= WebUtil::printJS('../dist_js/gateway/vendors.js') ?>
|
||||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
<?= WebUtil::printCSS('../dist_js/gateway/vendor.css') ?>
|
||||||
<?=WebUtil::printJS('../js/common.js')?>
|
<?= WebUtil::printJS('../dist_js/gateway/common_ts.js') ?>
|
||||||
<?=WebUtil::printJS('../js/install.js')?>
|
<?= WebUtil::printCSS('../dist_js/gateway/common_ts.css') ?>
|
||||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
<?= WebUtil::printJS('../dist_js/gateway/install.js') ?>
|
||||||
<?=WebUtil::printCSS('../css/install.css')?>
|
<?= WebUtil::printCSS('../dist_js/gateway/install.css') ?>
|
||||||
|
|
||||||
|
<?= WebUtil::printCSS('../css/install.css') ?>
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 설치</h1>
|
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 설치</h1>
|
||||||
@@ -35,23 +42,21 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
|
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" name="db_host" id="db_host"
|
<input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
|
||||||
placeholder="호스트" value="localhost" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
|
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" name="db_port" id="db_port"
|
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
|
||||||
placeholder="접속 포트" value="3306" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
|
<label for="db_id" class="col-sm-4 col-form-label">DB계정명</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정"/>
|
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,55 +64,74 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
|
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="password" class="form-control" name="db_pw" id="db_pw"
|
<input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호" />
|
||||||
placeholder="DB비밀번호"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
|
<label for="db_name" class="col-sm-4 col-form-label">DB명</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" name="db_name" id="db_name"
|
<input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo)" />
|
||||||
placeholder="DB명(예:sammo)"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
|
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" name="serv_host" id="serv_host"
|
<input type="text" class="form-control" name="serv_host" id="serv_host" placeholder="접속경로(예:http://www.example.com)" />
|
||||||
placeholder="접속경로(예:http://www.example.com)"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
|
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path"
|
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path" placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/icons" />
|
||||||
placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
|
||||||
value="../image/icons" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
|
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" name="game_image_path" id="game_image_path"
|
<input type="text" class="form-control" name="game_image_path" id="game_image_path" placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/game" />
|
||||||
placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
|
</div>
|
||||||
value="../image/game" />
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 키</label>
|
||||||
|
<div class="input-group col-sm-8">
|
||||||
|
<input type="text" class="form-control" name="image_request_key" id="image_request_key" placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게" value="" />
|
||||||
|
<div class="input-group-text">
|
||||||
|
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr style="width:100%; border-top: 1px solid lightgray;">
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key" placeholder="카카오톡 API의 Rest Key" value="" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key" placeholder="카카오톡 API의 Admin Key" value="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-4"></div>
|
<div class="col-sm-4"></div>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<button type="submit"
|
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||||
class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div><!--DB 폼 끝-->
|
</div>
|
||||||
|
<!--DB 폼 끝-->
|
||||||
|
|
||||||
<div class="card" id="admin_form_card" style="display:none">
|
<div class="card" id="admin_form_card" style="display:none">
|
||||||
<h3 class="card-header">
|
<h3 class="card-header">
|
||||||
@@ -118,8 +142,7 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="username" class="col-sm-3 col-form-label">계정명</label>
|
<label for="username" class="col-sm-3 col-form-label">계정명</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" name="username" id="username"
|
<input type="text" class="form-control" name="username" id="username" placeholder="계정명" />
|
||||||
placeholder="계정명"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -127,24 +150,21 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
|
<label for="password" class="col-sm-3 col-form-label">비밀번호</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="password" class="form-control" name="password" id="password"
|
<input type="password" class="form-control" name="password" id="password" placeholder="비밀번호" />
|
||||||
placeholder="비밀번호"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
|
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
|
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="비밀번호 확인" />
|
||||||
placeholder="비밀번호 확인"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
|
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" name="nickname" id="nickname"
|
<input type="text" class="form-control" name="nickname" id="nickname" placeholder="닉네임" value="운영자" />
|
||||||
placeholder="닉네임" value="운영자"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -153,13 +173,13 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-3"></div>
|
<div class="col-sm-3"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<button type="submit"
|
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
|
||||||
class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div><!--ADMIN 폼 끝-->
|
</div>
|
||||||
|
<!--ADMIN 폼 끝-->
|
||||||
|
|
||||||
<!-- TODO: conf_kakao.php -->
|
<!-- TODO: conf_kakao.php -->
|
||||||
|
|
||||||
@@ -167,4 +187,5 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,33 +1,34 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
require(__dir__.'/../vendor/autoload.php');
|
require(__DIR__ . '/../vendor/autoload.php');
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
||||||
$username = mb_strtolower(Util::getReq('username'), 'utf-8');
|
$username = mb_strtolower(Util::getPost('username'), 'utf-8');
|
||||||
$password = Util::getReq('password', 'string');
|
$password = Util::getPost('password', 'string');
|
||||||
$nickname = Util::getReq('nickname');
|
$nickname = Util::getPost('nickname');
|
||||||
|
|
||||||
if(!$username || !$password || !$nickname){
|
if (!$username || !$password || !$nickname) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'입력값이 설정되지 않았습니다.'
|
'reason' => '입력값이 설정되지 않았습니다.'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strlen((string)$password)!=128){
|
if (strlen((string) $password) != 128) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'올바르지 않은 비밀번호 해시 포맷입니다.'
|
'reason' => '올바르지 않은 비밀번호 해시 포맷입니다.'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!class_exists('\\sammo\\RootDB')){
|
if (!class_exists('\\sammo\\RootDB')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'DB 설정이 완료되지 않았습니다.'
|
'reason' => 'DB 설정이 완료되지 않았습니다.'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,43 +38,43 @@ $rootDB = RootDB::db();
|
|||||||
$rootDB->query('LOCK TABLES member WRITE, member_log WRITE');
|
$rootDB->query('LOCK TABLES member WRITE, member_log WRITE');
|
||||||
|
|
||||||
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
|
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
|
||||||
if($memberCnt > 0){
|
if ($memberCnt > 0) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>'false',
|
'result' => 'false',
|
||||||
'reason'=>'이미 계정이 생성되어 있습니다'
|
'reason' => '이미 계정이 생성되어 있습니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$userSalt = bin2hex(random_bytes(8));
|
$userSalt = bin2hex(random_bytes(8));
|
||||||
$finalPassword = Util::hashPassword($userSalt, $password);
|
$finalPassword = Util::hashPassword($userSalt, $password);
|
||||||
$nowDate = TimeUtil::DatetimeNow();
|
$nowDate = TimeUtil::now();
|
||||||
|
|
||||||
$rootDB->insert('member',[
|
$rootDB->insert('member', [
|
||||||
'oauth_type' => 'NONE',
|
'oauth_type' => 'NONE',
|
||||||
'id' => $username,
|
'id' => $username,
|
||||||
'email' => null,
|
'email' => null,
|
||||||
'token_valid_until'=>'2999-01-01 00:00:00',
|
'token_valid_until' => '2999-01-01 00:00:00',
|
||||||
'pw' => $finalPassword,
|
'pw' => $finalPassword,
|
||||||
'salt' => $userSalt,
|
'salt' => $userSalt,
|
||||||
'grade'=> 6,
|
'grade' => 6,
|
||||||
'name'=>$nickname,
|
'name' => $nickname,
|
||||||
'reg_date'=>$nowDate
|
'reg_date' => $nowDate
|
||||||
]);
|
]);
|
||||||
$userID = $rootDB->insertId();
|
$userID = $rootDB->insertId();
|
||||||
|
|
||||||
$rootDB->insert('member_log', [
|
$rootDB->insert('member_log', [
|
||||||
'member_no'=>$userID,
|
'member_no' => $userID,
|
||||||
'date'=>$nowDate,
|
'date' => $nowDate,
|
||||||
'action_type'=>'reg',
|
'action_type' => 'reg',
|
||||||
'action'=>Json::encode([
|
'action' => Json::encode([
|
||||||
'type'=>'none',
|
'type' => 'none',
|
||||||
'aux'=>'admin',
|
'aux' => 'admin',
|
||||||
'id'=>$username,
|
'id' => $username,
|
||||||
'name'=>$nickname
|
'name' => $nickname
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>true,
|
'result' => true,
|
||||||
'reason'=>'success'
|
'reason' => 'success'
|
||||||
]);
|
]);
|
||||||
@@ -1,38 +1,44 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
require(__dir__.'/../vendor/autoload.php');
|
if(!file_exists(__DIR__ . '/../vendor/autoload.php')){
|
||||||
|
http_response_code(503);
|
||||||
|
die('not_ready');
|
||||||
|
}
|
||||||
|
|
||||||
if(!class_exists('\\sammo\\RootDB')){
|
require(__DIR__ . '/../vendor/autoload.php');
|
||||||
|
|
||||||
|
if (!class_exists('\\sammo\\RootDB')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'step'=>'config'
|
'step' => 'config'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$rootDB = RootDB::db();
|
$rootDB = RootDB::db();
|
||||||
|
|
||||||
$rootDB->throw_exception_on_nonsql_error = false;
|
$rootDB->throw_exception_on_nonsql_error = false;
|
||||||
$rootDB->nonsql_error_handler = function($params){
|
$rootDB->nonsql_error_handler = function ($params) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'step'=>'conn_fail'
|
'step' => 'conn_fail'
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
$rootDB->error_handler = function($params){
|
$rootDB->error_handler = function ($params) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'step'=>'sql_fail'
|
'step' => 'sql_fail'
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
|
$memberCnt = $rootDB->queryFirstField('SELECT count(`NO`) from member');
|
||||||
if($memberCnt == 0){
|
if ($memberCnt == 0) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'step'=>'admin',
|
'step' => 'admin',
|
||||||
'globalSalt'=>RootDB::getGlobalSalt()
|
'globalSalt' => RootDB::getGlobalSalt()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Json::die([
|
Json::die([
|
||||||
'step'=>'done'
|
'step' => 'done'
|
||||||
]);
|
]);
|
||||||
@@ -1,83 +1,90 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
require(__dir__.'/../vendor/autoload.php');
|
require(__DIR__ . '/../vendor/autoload.php');
|
||||||
|
|
||||||
|
$host = Util::getPost('db_host');
|
||||||
|
$port = Util::getPost('db_port', 'int');
|
||||||
|
$username = Util::getPost('db_id');
|
||||||
|
$password = Util::getPost('db_pw');
|
||||||
|
$dbName = Util::getPost('db_name');
|
||||||
|
$servHost = Util::getPost('serv_host');
|
||||||
|
$sharedIconPath = Util::getPost('shared_icon_path');
|
||||||
|
$gameImagePath = Util::getPost('game_image_path');
|
||||||
|
$imageRequestKey = Util::getPost('image_request_key');
|
||||||
|
|
||||||
|
$kakaoRESTKey = Util::getPost('kakao_rest_key', 'string', '');
|
||||||
|
$kakaoAdminKey = Util::getPost('kakao_admin_key', 'string', '');
|
||||||
|
|
||||||
$host = Util::getReq('db_host');
|
|
||||||
$port = Util::getReq('db_port', 'int');
|
|
||||||
$username = Util::getReq('db_id');
|
|
||||||
$password = Util::getReq('db_pw');
|
|
||||||
$dbName = Util::getReq('db_name');
|
|
||||||
$servHost = Util::getReq('serv_host');
|
|
||||||
$sharedIconPath = Util::getReq('shared_icon_path');
|
|
||||||
$gameImagePath = Util::getReq('game_image_path');
|
|
||||||
|
|
||||||
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
|
if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'입력 값이 올바르지 않습니다'
|
'reason' => '입력 값이 올바르지 않습니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!filter_var($servHost, FILTER_VALIDATE_URL)) {
|
if (!filter_var($servHost, FILTER_VALIDATE_URL)) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'접속 경로가 올바르지 않습니다.'
|
'reason' => '접속 경로가 올바르지 않습니다.'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(ROOT.'/d_setting/RootDB.php') && is_dir(ROOT.'/d_setting/RootDB.php')) {
|
if (file_exists(ROOT . '/d_setting/RootDB.php') && is_dir(ROOT . '/d_setting/RootDB.php')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'d_setting/RootDB.php 가 디렉토리입니다'
|
'reason' => 'd_setting/RootDB.php 가 디렉토리입니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (class_exists('\\sammo\\RootDB')) {
|
if (class_exists('\\sammo\\RootDB')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'이미 RootDB.php 파일이 있습니다'
|
'reason' => '이미 RootDB.php 파일이 있습니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//파일 권한 검사
|
//파일 권한 검사
|
||||||
if (file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())) {
|
if (file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>AppConf::$userIconPath.' 이 디렉토리가 아닙니다'
|
'reason' => AppConf::$userIconPath . ' 이 디렉토리가 아닙니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(ROOT.'/d_log') && !is_dir(ROOT.'/d_log')) {
|
if (file_exists(ROOT . '/d_log') && !is_dir(ROOT . '/d_log')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'d_log 가 디렉토리가 아닙니다'
|
'reason' => 'd_log 가 디렉토리가 아닙니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(ROOT.'/d_shared') && !is_dir(ROOT.'/d_shared')) {
|
if (file_exists(ROOT . '/d_shared') && !is_dir(ROOT . '/d_shared')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'d_shared 가 디렉토리가 아닙니다'
|
'reason' => 'd_shared 가 디렉토리가 아닙니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(ROOT.'/d_setting') && !is_dir(ROOT.'/d_setting')) {
|
if (file_exists(ROOT . '/d_setting') && !is_dir(ROOT . '/d_setting')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'d_shared 가 디렉토리가 아닙니다'
|
'reason' => 'd_shared 가 디렉토리가 아닙니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists(ROOT.'/d_log')
|
if (
|
||||||
|| !file_exists(ROOT.'/d_shared')
|
!file_exists(ROOT . '/d_log')
|
||||||
|| !file_exists(ROOT.'/d_setting')
|
|| !file_exists(ROOT . '/d_shared')
|
||||||
|
|| !file_exists(ROOT . '/d_setting')
|
||||||
|| !file_exists(AppConf::getUserIconPathFS())
|
|| !file_exists(AppConf::getUserIconPathFS())
|
||||||
) {
|
) {
|
||||||
if (!is_writable(ROOT)) {
|
if (!is_writable(ROOT)) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'하위 디렉토리 생성 권한이 없습니다'
|
'reason' => '하위 디렉토리 생성 권한이 없습니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,56 +93,56 @@ if (!file_exists(ROOT.'/d_log')
|
|||||||
mkdir(AppConf::getUserIconPathFS());
|
mkdir(AppConf::getUserIconPathFS());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists(ROOT.'/d_log')) {
|
if (!file_exists(ROOT . '/d_log')) {
|
||||||
mkdir(ROOT.'/d_log');
|
mkdir(ROOT . '/d_log');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists(ROOT.'/d_setting')) {
|
if (!file_exists(ROOT . '/d_setting')) {
|
||||||
mkdir(ROOT.'/d_setting');
|
mkdir(ROOT . '/d_setting');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists(ROOT.'/d_shared')) {
|
if (!file_exists(ROOT . '/d_shared')) {
|
||||||
mkdir(ROOT.'/d_shared');
|
mkdir(ROOT . '/d_shared');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!is_writable(AppConf::getUserIconPathFS())) {
|
if (!is_writable(AppConf::getUserIconPathFS())) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>AppConf::$userIconPath.' 디렉토리의 쓰기 권한이 없습니다'
|
'reason' => AppConf::$userIconPath . ' 디렉토리의 쓰기 권한이 없습니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_writable(ROOT.'/d_log')) {
|
if (!is_writable(ROOT . '/d_log')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'d_log 디렉토리의 쓰기 권한이 없습니다'
|
'reason' => 'd_log 디렉토리의 쓰기 권한이 없습니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_writable(ROOT.'/d_shared')) {
|
if (!is_writable(ROOT . '/d_shared')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'d_shared 디렉토리의 쓰기 권한이 없습니다'
|
'reason' => 'd_shared 디렉토리의 쓰기 권한이 없습니다'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_writable(ROOT.'/d_setting')) {
|
if (!is_writable(ROOT . '/d_setting')) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'d_setting 디렉토리의 쓰기 권한이 없습니다.'
|
'reason' => 'd_setting 디렉토리의 쓰기 권한이 없습니다.'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!file_exists(ROOT.'/d_log/.htaccess')) {
|
if (!file_exists(ROOT . '/d_log/.htaccess')) {
|
||||||
@file_put_contents(ROOT.'/d_log/.htaccess', 'Deny from all');
|
@file_put_contents(ROOT . '/d_log/.htaccess', 'Deny from all');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists(ROOT.'/d_setting/.htaccess')) {
|
if (!file_exists(ROOT . '/d_setting/.htaccess')) {
|
||||||
@file_put_contents(ROOT.'/d_setting/.htaccess', 'Deny from all');
|
@file_put_contents(ROOT . '/d_setting/.htaccess', 'Deny from all');
|
||||||
}
|
}
|
||||||
|
|
||||||
//DB 접근 권한 검사
|
//DB 접근 권한 검사
|
||||||
@@ -146,21 +153,21 @@ $rootDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
|||||||
$rootDB->throw_exception_on_nonsql_error = false;
|
$rootDB->throw_exception_on_nonsql_error = false;
|
||||||
$rootDB->nonsql_error_handler = function ($params) {
|
$rootDB->nonsql_error_handler = function ($params) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'DB 접속에 실패했습니다.'
|
'reason' => 'DB 접속에 실패했습니다.'
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
$rootDB->error_handler = function ($params) {
|
$rootDB->error_handler = function ($params) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
|
'reason' => 'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.'
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
|
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
|
||||||
|
|
||||||
if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))) {
|
if ($mysqli_obj->multi_query(file_get_contents(__DIR__ . '/sql/common_schema.sql'))) {
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!$mysqli_obj->more_results()) {
|
if (!$mysqli_obj->more_results()) {
|
||||||
break;
|
break;
|
||||||
@@ -174,8 +181,8 @@ if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql')
|
|||||||
$rootDB->insert('system', array(
|
$rootDB->insert('system', array(
|
||||||
'REG' => 'N',
|
'REG' => 'N',
|
||||||
'LOGIN' => 'N',
|
'LOGIN' => 'N',
|
||||||
'CRT_DATE' => TimeUtil::DatetimeNow(),
|
'CRT_DATE' => TimeUtil::now(),
|
||||||
'MDF_DATE' => TimeUtil::DatetimeNow()
|
'MDF_DATE' => TimeUtil::now()
|
||||||
));
|
));
|
||||||
|
|
||||||
$globalSalt = bin2hex(random_bytes(16));
|
$globalSalt = bin2hex(random_bytes(16));
|
||||||
@@ -186,99 +193,121 @@ $globalSalt = bin2hex(random_bytes(16));
|
|||||||
|
|
||||||
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
||||||
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
||||||
|
$imageRequestPath = WebUtil::resolveRelativePath($gameImagePath . '/../hook/git_pull.php', $servHost);
|
||||||
|
$imageKeyInstallPath = WebUtil::resolveRelativePath($gameImagePath . '/../hook/InstallKey.php', $servHost);
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/ServConfig.orig.php',
|
__DIR__ . '/templates/ServConfig.orig.php',
|
||||||
ROOT.'/d_setting/ServConfig.php',
|
ROOT . '/d_setting/ServConfig.php',
|
||||||
[
|
[
|
||||||
'serverBasePath'=>$servHost,
|
'serverBasePath' => $servHost,
|
||||||
'sharedIconPath'=>$sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath'=>$gameImagePath
|
'gameImagePath' => $gameImagePath,
|
||||||
|
'imageRequestPath' => $imageRequestPath,
|
||||||
|
'imageRequestKey' => $imageRequestKey,
|
||||||
|
'serverList' => [
|
||||||
|
['che', '체', 'white'],
|
||||||
|
['kwe', '퀘', 'yellow'],
|
||||||
|
['pwe', '풰', 'orange'],
|
||||||
|
['twe', '퉤', 'magenta'],
|
||||||
|
['nya', '냐', '#e67e22'],
|
||||||
|
['pya', '퍄', '#9b59b6']
|
||||||
|
]
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($imageRequestKey) {
|
||||||
|
@file_get_contents($imageKeyInstallPath . '?key=' . $imageRequestKey);
|
||||||
|
}
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>$result
|
'reason' => $result
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/common_path.orig.js',
|
__DIR__ . '/templates/common_path.orig.js',
|
||||||
ROOT.'/d_shared/common_path.js',
|
ROOT . '/d_shared/common_path.js',
|
||||||
[
|
[
|
||||||
'serverBasePath'=>$servHost,
|
'serverBasePath' => $servHost,
|
||||||
'sharedIconPath'=>$sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath'=>$gameImagePath
|
'gameImagePath' => $gameImagePath
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/menu.orig.json',
|
__DIR__ . '/templates/menu.orig.json',
|
||||||
ROOT.'/d_shared/menu.json',
|
ROOT . '/d_shared/menu.json',
|
||||||
[],
|
[],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>$result
|
'reason' => $result
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/common.orig.css',
|
__DIR__ . '/templates/common.orig.css',
|
||||||
ROOT.'/d_shared/common.css',
|
ROOT . '/d_shared/common.css',
|
||||||
[
|
[
|
||||||
'serverBasePath'=>$servHost,
|
'serverBasePath' => $servHost,
|
||||||
'sharedIconPath'=>$sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath'=>$gameImagePath
|
'gameImagePath' => $gameImagePath
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>$result
|
'reason' => $result
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/RootDB.orig.php',
|
__DIR__ . '/templates/RootDB.orig.php',
|
||||||
ROOT.'/d_setting/RootDB.php',
|
ROOT . '/d_setting/RootDB.php',
|
||||||
[
|
[
|
||||||
'host'=>$host,
|
'host' => $host,
|
||||||
'user'=>$username,
|
'user' => $username,
|
||||||
'password'=>$password,
|
'password' => $password,
|
||||||
'dbName'=>$dbName,
|
'dbName' => $dbName,
|
||||||
'port'=>$port,
|
'port' => $port,
|
||||||
'globalSalt'=>$globalSalt,
|
'globalSalt' => $globalSalt,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost . '/');
|
||||||
|
|
||||||
Util::generateFileUsingSimpleTemplate(
|
Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/KakaoKey.orig.php',
|
__DIR__ . '/templates/KakaoKey.orig.php',
|
||||||
ROOT.'/d_setting/KakaoKey.php',
|
ROOT . '/d_setting/KakaoKey.php',
|
||||||
[
|
[
|
||||||
|
'REST_API_KEY' => $kakaoRESTKey,
|
||||||
|
'ADMIN_KEY' => $kakaoAdminKey,
|
||||||
|
'REDIRECT_URI' => $kakaoRedirectURI
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>$result
|
'reason' => $result
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>true,
|
'result' => true,
|
||||||
'reason'=>'success'
|
'reason' => 'success',
|
||||||
|
'globalSalt' => $globalSalt
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -1,25 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
require(__dir__.'/../vendor/autoload.php');
|
require(__DIR__ . '/../vendor/autoload.php');
|
||||||
|
|
||||||
$session = Session::requireLogin([])->setReadOnly();
|
$session = Session::requireLogin([])->setReadOnly();
|
||||||
if($session->userGrade < 6){
|
if ($session->userGrade < 6) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'관리자 아님'
|
'reason' => '관리자 아님'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$servHost = Util::getReq('serv_host');
|
$servHost = Util::getPost('serv_host');
|
||||||
$sharedIconPath = Util::getReq('shared_icon_path');
|
$sharedIconPath = Util::getPost('shared_icon_path');
|
||||||
$gameImagePath = Util::getReq('game_image_path');
|
$gameImagePath = Util::getPost('game_image_path');
|
||||||
|
|
||||||
if($servHost){
|
if ($servHost) {
|
||||||
if(!$sharedIconPath || $gameImagePath){
|
if (!$sharedIconPath || $gameImagePath) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
|
'reason' => 'serv_host가 지정된 경우, sharedIconPath와 gameImagePath가 모두 지정되어야합니다.'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,58 +28,54 @@ if($servHost){
|
|||||||
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/ServConfig.orig.php',
|
__DIR__ . '/templates/ServConfig.orig.php',
|
||||||
ROOT.'/d_setting/ServConfig.php',
|
ROOT . '/d_setting/ServConfig.php',
|
||||||
[
|
[
|
||||||
'serverBasePath'=>$servHost,
|
'serverBasePath' => $servHost,
|
||||||
'sharedIconPath'=>$sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath'=>$gameImagePath
|
'gameImagePath' => $gameImagePath
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>$result
|
'reason' => $result
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
} else if ($sharedIconPath || $gameImagePath) {
|
||||||
else if($sharedIconPath || $gameImagePath){
|
|
||||||
$servHost = ServConfig::$serverWebPath;
|
$servHost = ServConfig::$serverWebPath;
|
||||||
if($sharedIconPath){
|
if ($sharedIconPath) {
|
||||||
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$sharedIconPath = ServConfig::$sharedIconPath;
|
$sharedIconPath = ServConfig::$sharedIconPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($gameImagePath){
|
if ($gameImagePath) {
|
||||||
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$gameImagePath = ServConfig::$gameImagePath;
|
$gameImagePath = ServConfig::$gameImagePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/ServConfig.orig.php',
|
__DIR__ . '/templates/ServConfig.orig.php',
|
||||||
ROOT.'/d_setting/ServConfig.php',
|
ROOT . '/d_setting/ServConfig.php',
|
||||||
[
|
[
|
||||||
'serverBasePath'=>$servHost,
|
'serverBasePath' => $servHost,
|
||||||
'sharedIconPath'=>$sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath'=>$gameImagePath
|
'gameImagePath' => $gameImagePath
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>$result
|
'reason' => $result
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$servHost = ServConfig::$serverWebPath;
|
$servHost = ServConfig::$serverWebPath;
|
||||||
$sharedIconPath = ServConfig::$sharedIconPath;
|
$sharedIconPath = ServConfig::$sharedIconPath;
|
||||||
$gameImagePath = ServConfig::$gameImagePath;
|
$gameImagePath = ServConfig::$gameImagePath;
|
||||||
@@ -87,31 +84,31 @@ else{
|
|||||||
|
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/common_path.orig.js',
|
__DIR__ . '/templates/common_path.orig.js',
|
||||||
ROOT.'/d_shared/common_path.js',
|
ROOT . '/d_shared/common_path.js',
|
||||||
[
|
[
|
||||||
'serverBasePath'=>$servHost,
|
'serverBasePath' => $servHost,
|
||||||
'sharedIconPath'=>$sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath'=>$gameImagePath
|
'gameImagePath' => $gameImagePath
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$result = Util::generateFileUsingSimpleTemplate(
|
$result = Util::generateFileUsingSimpleTemplate(
|
||||||
__dir__.'/templates/common.orig.css',
|
__DIR__ . '/templates/common.orig.css',
|
||||||
ROOT.'/d_shared/common.css',
|
ROOT . '/d_shared/common.css',
|
||||||
[
|
[
|
||||||
'serverBasePath'=>$servHost,
|
'serverBasePath' => $servHost,
|
||||||
'sharedIconPath'=>$sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath'=>$gameImagePath
|
'gameImagePath' => $gameImagePath
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result !== true) {
|
if ($result !== true) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result' => false,
|
||||||
'reason'=>$result
|
'reason' => $result
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ CREATE TABLE `system` (
|
|||||||
`MDF_DATE` DATETIME NULL DEFAULT NULL,
|
`MDF_DATE` DATETIME NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`NO`)
|
PRIMARY KEY (`NO`)
|
||||||
)
|
)
|
||||||
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
-- 회원 테이블
|
-- 회원 테이블
|
||||||
CREATE TABLE `member` (
|
CREATE TABLE `member` (
|
||||||
@@ -45,7 +45,7 @@ CREATE TABLE `member` (
|
|||||||
UNIQUE INDEX `kauth_id` (`oauth_id`),
|
UNIQUE INDEX `kauth_id` (`oauth_id`),
|
||||||
INDEX `delete_after` (`delete_after`)
|
INDEX `delete_after` (`delete_after`)
|
||||||
)
|
)
|
||||||
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
-- 로그인 로그 테이블
|
-- 로그인 로그 테이블
|
||||||
CREATE TABLE `member_log` (
|
CREATE TABLE `member_log` (
|
||||||
@@ -58,7 +58,7 @@ CREATE TABLE `member_log` (
|
|||||||
INDEX `action` (`member_no`, `action_type`, `date`),
|
INDEX `action` (`member_no`, `action_type`, `date`),
|
||||||
INDEX `member` (`member_no`, `date`)
|
INDEX `member` (`member_no`, `date`)
|
||||||
)
|
)
|
||||||
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# KV storage
|
# KV storage
|
||||||
@@ -72,4 +72,19 @@ CREATE TABLE if not exists `storage` (
|
|||||||
UNIQUE INDEX `key` (`namespace`, `key`)
|
UNIQUE INDEX `key` (`namespace`, `key`)
|
||||||
)
|
)
|
||||||
COLLATE='utf8mb4_general_ci'
|
COLLATE='utf8mb4_general_ci'
|
||||||
ENGINE=MyISAM
|
ENGINE=Aria;
|
||||||
|
|
||||||
|
CREATE TABLE `login_token` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`user_id` INT(11) NOT NULL,
|
||||||
|
`base_token` VARCHAR(20) NOT NULL COLLATE 'utf8mb4_general_ci',
|
||||||
|
`reg_ip` VARCHAR(40) NOT NULL COLLATE 'utf8mb4_general_ci',
|
||||||
|
`reg_date` DATETIME NOT NULL,
|
||||||
|
`expire_date` DATETIME NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE INDEX `by_token` (`base_token`),
|
||||||
|
INDEX `by_date` (`user_id`, `expire_date`)
|
||||||
|
)
|
||||||
|
COLLATE='utf8mb4_general_ci'
|
||||||
|
ENGINE=Aria
|
||||||
|
;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace kakao;
|
namespace kakao;
|
||||||
|
|
||||||
|
// @suppress PhanRedefineClass
|
||||||
class KakaoKey{
|
class KakaoKey{
|
||||||
const REST_KEY = '_tK_REST_API_KEY_';
|
const REST_KEY = '_tK_REST_API_KEY_';
|
||||||
const ADMIN_KEY = '_tK_ADMIN_KEY_';
|
const ADMIN_KEY = '_tK_ADMIN_KEY_';
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
|
//https://hub.packtpub.com/eloquent-without-laravel/
|
||||||
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||||
|
use Illuminate\Events\Dispatcher;
|
||||||
|
use Illuminate\Container\Container;
|
||||||
|
|
||||||
class RootDB
|
class RootDB
|
||||||
{
|
{
|
||||||
private static $uDB = null;
|
private static $uDB = null;
|
||||||
|
private static ?Capsule $uIlluminate = null;
|
||||||
|
|
||||||
private static $host = '_tK_host_';
|
private static $host = '_tK_host_';
|
||||||
private static $user = '_tK_user_';
|
private static $user = '_tK_user_';
|
||||||
@@ -11,6 +18,8 @@ class RootDB
|
|||||||
private static $dbName = '_tK_dbName_';
|
private static $dbName = '_tK_dbName_';
|
||||||
private static $port = _tK_port_;
|
private static $port = _tK_port_;
|
||||||
private static $encoding = 'utf8mb4';
|
private static $encoding = 'utf8mb4';
|
||||||
|
private static $collation = 'utf8mb4_general_ci';
|
||||||
|
|
||||||
|
|
||||||
private static $globalSalt = '_tK_globalSalt_';
|
private static $globalSalt = '_tK_globalSalt_';
|
||||||
|
|
||||||
@@ -18,6 +27,29 @@ class RootDB
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function illuminate(): Capsule
|
||||||
|
{
|
||||||
|
if(self::$uIlluminate !== null){
|
||||||
|
return self::$uIlluminate;
|
||||||
|
}
|
||||||
|
$capsule = new Capsule;
|
||||||
|
|
||||||
|
$capsule->addConnection([
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'host' => self::$host,
|
||||||
|
'database' => self::$dbName,
|
||||||
|
'username' => self::$user,
|
||||||
|
'password' => self::$password,
|
||||||
|
'charset' => self::$encoding,
|
||||||
|
'collation' => self::$collation,
|
||||||
|
], 'root');
|
||||||
|
|
||||||
|
$capsule->setEventDispatcher(new Dispatcher(new Container));
|
||||||
|
$capsule->bootEloquent();
|
||||||
|
self::$uIlluminate = $capsule;
|
||||||
|
return $capsule;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DB 객체 생성
|
* DB 객체 생성
|
||||||
*
|
*
|
||||||
@@ -30,7 +62,8 @@ class RootDB
|
|||||||
self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding);
|
self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding);
|
||||||
self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||||
|
|
||||||
self::$uDB->error_handler= function(){};
|
self::$uDB->error_handler = function () {
|
||||||
|
};
|
||||||
self::$uDB->throw_exception_on_error = true;
|
self::$uDB->throw_exception_on_error = true;
|
||||||
self::$uDB->throw_exception_on_nonsql_error = true;
|
self::$uDB->throw_exception_on_nonsql_error = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
class ServConfig
|
class ServConfig
|
||||||
@@ -10,35 +11,63 @@ class ServConfig
|
|||||||
public static $serverWebPath = '_tK_serverBasePath_';
|
public static $serverWebPath = '_tK_serverBasePath_';
|
||||||
public static $sharedIconPath = '_tK_sharedIconPath_';
|
public static $sharedIconPath = '_tK_sharedIconPath_';
|
||||||
public static $gameImagePath = "_tK_gameImagePath_";
|
public static $gameImagePath = "_tK_gameImagePath_";
|
||||||
|
public static $imageRequestPath = "_tK_imageRequestPath_";
|
||||||
|
public static $imageRequestKey = '_tK_imageRequestKey_';
|
||||||
|
private static $serverList = null;
|
||||||
|
|
||||||
public static function getSharedIconPath(string $filepath='') : string
|
public static function getSharedIconPath(string $filepath = ''): string
|
||||||
{
|
{
|
||||||
if($filepath){
|
if ($filepath) {
|
||||||
return static::$sharedIconPath."/{$filepath}";
|
return static::$sharedIconPath . "/{$filepath}";
|
||||||
}
|
}
|
||||||
return static::$sharedIconPath;
|
return static::$sharedIconPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getUserIconPath(string $filepath='') : string
|
public static function getUserIconPath(string $filepath = ''): string
|
||||||
{
|
{
|
||||||
return AppConf::getUserIconPathWeb($filepath);
|
return AppConf::getUserIconPathWeb($filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getGameImagePath(string $filepath='') : string
|
public static function getGameImagePath(string $filepath = ''): string
|
||||||
{
|
{
|
||||||
if($filepath){
|
if ($filepath) {
|
||||||
return static::$gameImagePath."/{$filepath}";
|
return static::$gameImagePath . "/{$filepath}";
|
||||||
}
|
}
|
||||||
return static::$gameImagePath;
|
return static::$gameImagePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getImagePullURI(): string
|
||||||
|
{
|
||||||
|
$now = time();
|
||||||
|
$req_hash = Util::hashPassword(sprintf("%016x", $now), static::$imageRequestKey);
|
||||||
|
return static::$imageRequestPath . "?req={$req_hash}&time={$now}";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 서버 설정 반환
|
||||||
|
*
|
||||||
|
* @return \sammo\Setting[]
|
||||||
|
*/
|
||||||
|
public static function getServerList(): array{
|
||||||
|
$servKeyList = [/*_tK_serverList_*/];
|
||||||
|
$servKeyList[] = ['hwe', '훼', 'red'];
|
||||||
|
|
||||||
|
if (self::$serverList === null) {
|
||||||
|
self::$serverList = [];
|
||||||
|
foreach($servKeyList as [$servKey, $servNick, $servColor]){
|
||||||
|
self::$serverList[$servKey] = new Setting(ROOT.'/'.$servKey, $servNick, $servColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return self::$serverList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getServerBasepath() : string
|
public static function getServerBasepath(): string
|
||||||
{
|
{
|
||||||
return self::$serverWebPath;
|
return self::$serverWebPath;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,6 @@
|
|||||||
|
|
||||||
.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); }
|
.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); }
|
||||||
|
|
||||||
/* 레거시. */
|
|
||||||
#bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
|
|
||||||
#bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
|
|
||||||
#bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
|
|
||||||
|
|
||||||
.map_detail .map_title{
|
.map_detail .map_title{
|
||||||
background:
|
background:
|
||||||
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
|
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
|
||||||
@@ -88,6 +83,59 @@
|
|||||||
background-size: 700px 500px;
|
background-size: 700px 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*미니체 지도*/
|
||||||
|
.map_theme_miniche_b.map_spring .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_b.map_summer .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_b.map_fall .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_b.map_winter .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_b .map_bgroad{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*미니체 지도*/
|
||||||
|
.map_theme_miniche_clean.map_spring .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_clean.map_summer .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_clean.map_fall .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_clean.map_winter .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map_theme_miniche_clean .map_bgroad{
|
||||||
|
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|
||||||
/*루드라사움 지도*/
|
/*루드라사움 지도*/
|
||||||
.map_theme_ludo_rathowm .map_bglayer1{
|
.map_theme_ludo_rathowm .map_bglayer1{
|
||||||
background: url('_tK_gameImagePath_/map/ludo_rathowm/back.jpg') no-repeat;
|
background: url('_tK_gameImagePath_/map/ludo_rathowm/back.jpg') no-repeat;
|
||||||
@@ -110,3 +158,10 @@
|
|||||||
background: url('_tK_gameImagePath_/map/chess/chessboard.png') no-repeat;
|
background: url('_tK_gameImagePath_/map/chess/chessboard.png') no-repeat;
|
||||||
background-size: 700px 500px;
|
background-size: 700px 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*포켓몬 v1 지도*/
|
||||||
|
.map_theme_pokemon_v1 .map_bglayer1{
|
||||||
|
background: url('_tK_gameImagePath_/map/pokemon_v1/back_pal8.png') no-repeat;
|
||||||
|
background-size: 700px 500px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace sammo;
|
|
||||||
|
|
||||||
function MYDB_query($query, $connect)
|
|
||||||
{
|
|
||||||
return mysqli_query($connect, $query);
|
|
||||||
}
|
|
||||||
|
|
||||||
function MYDB_num_rows(\mysqli_result $result) : int
|
|
||||||
{
|
|
||||||
return mysqli_num_rows($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return mixed[]
|
|
||||||
*/
|
|
||||||
function MYDB_fetch_array(\mysqli_result $result)
|
|
||||||
{
|
|
||||||
return mysqli_fetch_array($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
function MYDB_fetch_row(\mysqli_result $result)
|
|
||||||
{
|
|
||||||
return mysqli_fetch_row($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
function MYDB_error($connect)
|
|
||||||
{
|
|
||||||
return mysqli_error($connect);
|
|
||||||
}
|
|
||||||
@@ -6,35 +6,15 @@ include "func.php";
|
|||||||
|
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
if($session->userGrade < 4) {
|
if($session->userGrade < 4) {
|
||||||
?>
|
die(requireAdminPermissionHTML());
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>관리메뉴</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
관리자가 아닙니다.<br>
|
|
||||||
<?=banner()?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
[$turntime, $tnmt_time] = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
|
[$turntime, $tnmt_time] = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
|
||||||
|
|
||||||
$query = "select plock from plock";
|
$plock = $db->queryFirstField('SELECT plock FROM plock');
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$plock = MYDB_fetch_array($result);
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
@@ -44,15 +24,15 @@ $plock = MYDB_fetch_array($result);
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?= WebUtil::printDist('ts', 'common', true) ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form action=_119_b.php method=post>
|
<form action=_119_b.php method=post>
|
||||||
시간조정 : <input type=text size=3 name=minute><input type=submit name=btn value='분당김'><input type=submit name=btn value='분지연'> 최종갱신 : <?=$turntime?><br>
|
시간조정 : <input type=text size=3 name=minute><input type=submit name=btn value='분당김'><input type=submit name=btn value='분지연'> 최종갱신 : <?=$turntime?><br>
|
||||||
시간조정 : <input type=text size=3 name=minute2><input type=submit name=btn value='토너분당김'><input type=submit name=btn value='토너분지연'> 토너먼트 : <?=$tnmt_time?><br>
|
시간조정 : <input type=text size=3 name=minute2><input type=submit name=btn value='토너분당김'><input type=submit name=btn value='토너분지연'> 토너먼트 : <?=$tnmt_time?><br>
|
||||||
봉급지급 : <input type=submit name=btn value='금지급'><input type=submit name=btn value='쌀지급'><br>
|
봉급지급 : <input type=submit name=btn value='금지급'><input type=submit name=btn value='쌀지급'><br>
|
||||||
락 풀 기 : <input type=submit name=btn value='락걸기'><input type=submit name=btn value='락풀기'> 현재 : <?=$plock['plock']>0?"동결중":"가동중"?><br>
|
락 풀 기 : <input type=submit name=btn value='락걸기'><input type=submit name=btn value='락풀기'> 현재 : <?=$plock>0?"동결중":"가동중"?><br>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
@@ -6,7 +7,7 @@ include "func.php";
|
|||||||
|
|
||||||
|
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
if($session->userGrade < 4){
|
if ($session->userGrade < 4) {
|
||||||
header('location:_119.php');
|
header('location:_119.php');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
@@ -16,74 +17,101 @@ $v->rule('integer', [
|
|||||||
'minute',
|
'minute',
|
||||||
'minutes2'
|
'minutes2'
|
||||||
]);
|
]);
|
||||||
if(!$v->validate()){
|
if (!$v->validate()) {
|
||||||
Error($v->errorStr());
|
Error($v->errorStr());
|
||||||
}
|
}
|
||||||
|
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getPost('btn');
|
||||||
$minute = Util::getReq('minute', 'int');
|
$minute = Util::getPost('minute', 'int');
|
||||||
$minute2 = Util::getReq('minute2', 'int');
|
$minute2 = Util::getPost('minute2', 'int');
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
switch($btn) {
|
switch ($btn) {
|
||||||
case "분당김":
|
case "분당김":
|
||||||
|
$locked = false;
|
||||||
|
for ($i = 0; $i < 10; $i++) {
|
||||||
|
if (tryLock()) {
|
||||||
|
$locked = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
usleep(500000);
|
||||||
|
}
|
||||||
|
|
||||||
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
||||||
$turntime = (new \DateTimeImmutable($gameStor->turntime))->sub(new \DateInterval("PT{$minute}M"));
|
$turntime = (new \DateTimeImmutable($gameStor->turntime))->sub(new \DateInterval("PT{$minute}M"));
|
||||||
$starttime = (new \DateTimeImmutable($gameStor->starttime))->sub(new \DateInterval("PT{$minute}M"));
|
$starttime = (new \DateTimeImmutable($gameStor->starttime))->sub(new \DateInterval("PT{$minute}M"));
|
||||||
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->sub(new \DateInterval("PT{$minute}M"));
|
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->sub(new \DateInterval("PT{$minute}M"));
|
||||||
|
|
||||||
$gameStor->turntime = $turntime->format('Y-m-d H:i:s');
|
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
|
||||||
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
|
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
|
||||||
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'turntime'=>$db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
|
'turntime' => $db->sqleval('DATE_SUB(turntime, INTERVAL %i MINUTE)', $minute)
|
||||||
], true);
|
], true);
|
||||||
$db->update('auction', [
|
$db->update('auction', [
|
||||||
'expire'=>$db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
|
'expire' => $db->sqleval('DATE_SUB(expire, INTERVAL %i MINUTE)', $minute)
|
||||||
], true);
|
], true);
|
||||||
|
if ($locked) {
|
||||||
|
unlock();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "분지연":
|
case "분지연":
|
||||||
|
$locked = false;
|
||||||
|
for ($i = 0; $i < 5; $i++) {
|
||||||
|
if (tryLock()) {
|
||||||
|
$locked = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
usleep(500000);
|
||||||
|
}
|
||||||
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
$gameStor->cacheValues(['turntime', 'starttime', 'tnmt_time']);
|
||||||
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
|
$turntime = (new \DateTimeImmutable($gameStor->turntime))->add(new \DateInterval("PT{$minute}M"));
|
||||||
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
|
$starttime = (new \DateTimeImmutable($gameStor->starttime))->add(new \DateInterval("PT{$minute}M"));
|
||||||
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
|
$tnmt_time = (new \DateTimeImmutable($gameStor->tnmt_time))->add(new \DateInterval("PT{$minute}M"));
|
||||||
|
|
||||||
$gameStor->turntime = $turntime->format('Y-m-d H:i:s');
|
$gameStor->turntime = $turntime->format('Y-m-d H:i:s.u');
|
||||||
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
|
$gameStor->starttime = $starttime->format('Y-m-d H:i:s');
|
||||||
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'turntime'=>$db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
|
'turntime' => $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
|
||||||
], true);
|
], true);
|
||||||
$db->update('auction', [
|
$db->update('auction', [
|
||||||
'expire'=>$db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
|
'expire' => $db->sqleval('DATE_ADD(expire, INTERVAL %i MINUTE)', $minute)
|
||||||
], true);
|
], true);
|
||||||
|
if ($locked) {
|
||||||
|
unlock();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "토너분당김":
|
case "토너분당김":
|
||||||
$tnmt_time = new \DateTime($gameStor->tnmt_time);
|
$tnmt_time = new \DateTime($gameStor->tnmt_time);
|
||||||
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
|
$tnmt_time->sub(new \DateInterval("PT{$minute2}M"));
|
||||||
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
break;
|
break;
|
||||||
case "토너분지연":
|
case "토너분지연":
|
||||||
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
|
$tnmt_time = new \DateTimeImmutable($gameStor->tnmt_time);
|
||||||
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
|
$tnmt_time->add(new \DateInterval("PT{$minute2}M"));
|
||||||
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
$gameStor->tnmt_time = $tnmt_time->format('Y-m-d H:i:s');
|
||||||
break;
|
break;
|
||||||
case "금지급":
|
case "금지급":
|
||||||
processGoldIncome();
|
processGoldIncome();
|
||||||
break;
|
break;
|
||||||
case "쌀지급":
|
case "쌀지급":
|
||||||
processRiceIncome();
|
processRiceIncome();
|
||||||
break;
|
break;
|
||||||
case "락걸기":
|
case "락걸기":
|
||||||
$db->update('plock', ['plock'=>1], true);
|
for ($i = 0; $i < 10; $i++) {
|
||||||
|
if (tryLock()) {
|
||||||
|
$locked = true;
|
||||||
break;
|
break;
|
||||||
case "락풀기":
|
}
|
||||||
$db->update('plock', ['plock'=>0], true);
|
usleep(500000);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "락풀기":
|
||||||
|
unlock();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,28 +7,10 @@ include "func.php";
|
|||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if($session->userGrade < 5) {
|
||||||
?>
|
die(requireAdminPermissionHTML());
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>관리메뉴</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
관리자가 아닙니다.<br>
|
|
||||||
<?=banner()?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$admin = getAdmin();
|
$admin = getAdmin();
|
||||||
?>
|
?>
|
||||||
@@ -40,7 +22,8 @@ $admin = getAdmin();
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?= WebUtil::printDist('ts', 'common', true) ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 class="tb_layout bg0">
|
<table align=center width=1000 class="tb_layout bg0">
|
||||||
@@ -56,7 +39,7 @@ $admin = getAdmin();
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=110 align=right>시작시간변경</td>
|
<td width=110 align=right>시작시간변경</td>
|
||||||
<td width=285><input type=text size=20 maxlength=20 style=color:white;background-color:black;text-align:right; name=starttime value='<?=$admin['starttime']?>'><input type=submit name=btn value=변경1></td>
|
<td width=285><input type=text size=20 maxlength=20 style=color:white;background-color:black;text-align:right; name=starttime value='<?=substr($admin['starttime'], 0, 19)?>'><input type=submit name=btn value=변경1></td>
|
||||||
<td width=110 align=right>현재도시훈사</td>
|
<td width=110 align=right>현재도시훈사</td>
|
||||||
<td width=285><?=$admin['city_rate']?></td>
|
<td width=285><?=$admin['city_rate']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -66,12 +49,6 @@ $admin = getAdmin();
|
|||||||
<td width=110 align=right>최대 국가</td>
|
<td width=110 align=right>최대 국가</td>
|
||||||
<td width=285><input type=text size=3 maxlength=2 style=color:white;background-color:black;text-align:right; name=maxnation value=<?=$admin['maxnation']?>><input type=submit name=btn value=변경3></td>
|
<td width=285><input type=text size=3 maxlength=2 style=color:white;background-color:black;text-align:right; name=maxnation value=<?=$admin['maxnation']?>><input type=submit name=btn value=변경3></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td width=110 align=right></td>
|
|
||||||
<td width=285></td>
|
|
||||||
<td width=110 align=right>현재 수입률</td>
|
|
||||||
<td width=285><?=$admin['gold_rate']?>%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width=110 align=right>시작 년도</td>
|
<td width=110 align=right>시작 년도</td>
|
||||||
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=startyear value='<?=$admin['startyear']?>'><input type=submit name=btn value=변경4></td>
|
<td width=285><input type=text size=3 maxlength=3 style=color:white;background-color:black;text-align:right; name=startyear value='<?=$admin['startyear']?>'><input type=submit name=btn value=변경4></td>
|
||||||
|
|||||||
@@ -22,19 +22,16 @@ if (!$v->validate()) {
|
|||||||
Error($v->errorStr());
|
Error($v->errorStr());
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg = Util::getReq('msg');
|
$msg = Util::getPost('msg');
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getPost('btn');
|
||||||
$log = Util::getReq('log');
|
$log = Util::getPost('log');
|
||||||
$starttime = Util::getReq('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s'));
|
$starttime = Util::getPost('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s'));
|
||||||
$maxgeneral = Util::getReq('maxgeneral', 'int', GameConst::$defaultMaxGeneral);
|
$maxgeneral = Util::getPost('maxgeneral', 'int', GameConst::$defaultMaxGeneral);
|
||||||
$maxnation = Util::getReq('maxnation', 'int', GameConst::$defaultMaxNation);
|
$maxnation = Util::getPost('maxnation', 'int', GameConst::$defaultMaxNation);
|
||||||
$startyear = Util::getReq('startyear', 'int', GameConst::$defaultStartYear);
|
$startyear = Util::getPost('startyear', 'int', GameConst::$defaultStartYear);
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$admin = getAdmin();
|
$admin = getAdmin();
|
||||||
|
|
||||||
@@ -43,11 +40,7 @@ switch ($btn) {
|
|||||||
$gameStor->msg = $msg;
|
$gameStor->msg = $msg;
|
||||||
break;
|
break;
|
||||||
case "로그쓰기":
|
case "로그쓰기":
|
||||||
$lognum = $admin['historyindex'] + 1;
|
pushGlobalHistoryLog(["<R>★</><S>{$log}</>"]);
|
||||||
if ($lognum >= 29) {
|
|
||||||
$lognum = 0;
|
|
||||||
}
|
|
||||||
pushWorldHistory(["<R>★</><S>{$log}</>"]);
|
|
||||||
break;
|
break;
|
||||||
case "변경1":
|
case "변경1":
|
||||||
$gameStor->starttime = (new \DateTime($starttime))->format('Y-m-d H:i:s');
|
$gameStor->starttime = (new \DateTime($starttime))->format('Y-m-d H:i:s');
|
||||||
@@ -69,6 +62,7 @@ switch ($btn) {
|
|||||||
case "30분턴":
|
case "30분턴":
|
||||||
case "60분턴":
|
case "60분턴":
|
||||||
case "120분턴":
|
case "120분턴":
|
||||||
|
$admin = $gameStor->getValues(['turntime', 'turnterm', 'year', 'startyear', 'month']);
|
||||||
switch ($btn) {
|
switch ($btn) {
|
||||||
case "1분턴": $turnterm = 1; break;
|
case "1분턴": $turnterm = 1; break;
|
||||||
case "2분턴": $turnterm = 2; break;
|
case "2분턴": $turnterm = 2; break;
|
||||||
@@ -79,40 +73,28 @@ switch ($btn) {
|
|||||||
case "60분턴": $turnterm = 60; break;
|
case "60분턴": $turnterm = 60; break;
|
||||||
case "120분턴": $turnterm = 120; break;
|
case "120분턴": $turnterm = 120; break;
|
||||||
}
|
}
|
||||||
|
$oldunit = $admin['turnterm'] * 60;
|
||||||
$unit = $turnterm * 60;
|
$unit = $turnterm * 60;
|
||||||
|
|
||||||
|
$unitDiff = $unit / $oldunit;
|
||||||
|
|
||||||
|
$servTurnTime = new \DateTimeImmutable($admin['turntime']);
|
||||||
|
foreach ($db->query('SELECT no,turntime FROM general') as $gen) {
|
||||||
|
$genTurnTime = new \DateTimeImmutable($gen['turntime']);
|
||||||
|
$timeDiff = TimeUtil::DateIntervalToSeconds($genTurnTime->diff($servTurnTime));
|
||||||
|
$timeDiff *= $unitDiff;
|
||||||
|
$newGenTurnTime = $servTurnTime->add(TimeUtil::secondsToDateInterval($timeDiff));
|
||||||
|
|
||||||
|
$db->update('general', [
|
||||||
|
'turntime'=>$newGenTurnTime->format('Y-m-d H:i:s.u')
|
||||||
|
], 'no=%i', $gen['no']);
|
||||||
|
}
|
||||||
$turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1;
|
$turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1;
|
||||||
$starttime = date("Y-m-d H:i:s", strtotime($admin['turntime']) - $turn * $unit);
|
$starttime = $servTurnTime->sub(TimeUtil::secondsToDateInterval($turn * $unit))->format('Y-m-d H:i:s');
|
||||||
$starttime = cutTurn($starttime, $turnterm);
|
$starttime = cutTurn($starttime, $turnterm, false);
|
||||||
$gameStor->turnterm = $turnterm;
|
$gameStor->turnterm = $turnterm;
|
||||||
$gameStor->starttime = $starttime;
|
$gameStor->starttime = $starttime;
|
||||||
// 턴시간이 길어지는 경우 랜덤턴 배정
|
pushGlobalHistoryLog(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
|
||||||
if ($turnterm < $admin['turnterm']) {
|
|
||||||
$query = "select no from general";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
for ($i=0; $i < $count; $i++) {
|
|
||||||
$gen = MYDB_fetch_array($result);
|
|
||||||
$turntime = getRandTurn($turnterm);
|
|
||||||
$query = "update general set turntime='$turntime' where no='{$gen['no']}'";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
}
|
|
||||||
// 턴시간이 너무 멀리 떨어진 선수 제대로 보정
|
|
||||||
} else {
|
|
||||||
$query = "select no,turntime from general";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
for ($i=0; $i < $count; $i++) {
|
|
||||||
$gen = MYDB_fetch_array($result);
|
|
||||||
$num = intdiv((strtotime($gen['turntime']) - strtotime($admin['turntime'])), $unit);
|
|
||||||
if ($num > 0) {
|
|
||||||
$gen['turntime'] = date("Y-m-d H:i:s", strtotime($gen['turntime']) - $unit * $num);
|
|
||||||
$query = "update general set turntime='{$gen['turntime']}' where no='{$gen['no']}'";
|
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pushWorldHistory(["<R>★</>턴시간이 <C>$btn</>으로 변경됩니다."]);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
@@ -6,25 +7,8 @@ include "func.php";
|
|||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
?>
|
die(requireAdminPermissionHTML());
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>관리메뉴</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
관리자가 아닙니다.<br>
|
|
||||||
<?=banner()?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
@@ -32,56 +16,81 @@ $db = DB::db();
|
|||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>회원관리</title>
|
<title>회원관리</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?= WebUtil::printDist('ts', 'common', true) ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>회 원 관 리<br><?=backButton()?></td></tr>
|
<tr>
|
||||||
</table>
|
<td>회 원 관 리<br><?= backButton() ?></td>
|
||||||
<form name=form1 method=post action=_admin2_submit.php>
|
</tr>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
</table>
|
||||||
|
<form name=form1 method=post action=_admin2_submit.php>
|
||||||
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=80 align=center>접속제한</td>
|
<td width=80 align=center>접속제한</td>
|
||||||
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
|
<td width=713 align=center><input type=submit name=btn value='전체 접속허용'><input type=submit name=btn value='전체 접속제한'></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=80 align=center rowspan=12>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
|
<td width=80 align=center rowspan=12>회원선택<br><br>
|
||||||
|
<font color=cyan>NPC</font><br>
|
||||||
|
<font color=skyblue>NPC유저</font><br>
|
||||||
|
<font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b>
|
||||||
|
</td>
|
||||||
<td width=105 rowspan=12>
|
<td width=105 rowspan=12>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
|
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:14px'>";
|
||||||
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
|
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
|
||||||
|
|
||||||
foreach($generalList as $general){
|
foreach ($generalList as $general) {
|
||||||
$style = "style=;";
|
$style = "style=;";
|
||||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
if ($general['block'] > 0) {
|
||||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
$style .= "background-color:red;";
|
||||||
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
|
}
|
||||||
|
|
||||||
|
$npcColor = getNPCColor($general['npc']);
|
||||||
|
if($npcColor !== null){
|
||||||
|
$style .= "color:{$npcColor};";
|
||||||
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<option value={$general['no']} $style>{$general['name']}</option>";
|
<option value={$general['no']} $style>{$general['name']}</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td width=100 align=center>아이템 지급</td>
|
<td width=100 align=center>아이템 지급</td>
|
||||||
<td width=504>
|
<td width=504>
|
||||||
<select name=weap size=1 style='color:white;background-color:black;font-size:13px'>";
|
<select name=weapon size=1 style='color:white;background-color:black;font-size:14px'>";
|
||||||
for($i=0; $i < 27; $i++) {
|
foreach (GameConst::$allItems as $itemCategories) {
|
||||||
|
foreach ($itemCategories as $item => $cnt) {
|
||||||
|
if ($cnt == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$itemObj = buildItemClass($item);
|
||||||
|
if ($itemObj->isBuyable()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for ($i = 0; $i < 27; $i++) {
|
||||||
echo "
|
echo "
|
||||||
<option value={$i}>{$i}</option>";
|
<option value={$i}>{$i}</option>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<input type=submit name=btn value='무기지급'>
|
<input type=submit name=btn value='무기지급'>
|
||||||
<input type=submit name=btn value='책지급'>
|
<input type=submit name=btn value='책지급'>
|
||||||
@@ -113,22 +122,27 @@ for($i=0; $i < 27; $i++) {
|
|||||||
<td><input type=submit name=btn value='접속 허용'><input type=submit name=btn value='접속 제한'></td>
|
<td><input type=submit name=btn value='접속 허용'><input type=submit name=btn value='접속 제한'></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>턴설정</td>
|
<td align=center>턴 시각 설정</td>
|
||||||
<td><input type=submit name=btn value='00턴'><input type=submit name=btn value='랜덤턴'></td>
|
<td><input type=submit name=btn value='00턴'><input type=submit name=btn value='랜덤턴'></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>NPC해제</td>
|
<td align=center>명령 설정</td>
|
||||||
<td><input type=submit name=btn value='NPC해제'><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'><input type=submit name=btn value='NPC설정'></td>
|
<td><input type=submit name=btn value='하야입력'><input type=submit name=btn value='방랑해산'></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>메세지 전달</td>
|
<td align=center>메세지 전달</td>
|
||||||
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<td><?= backButton() ?></td>
|
||||||
</table>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= banner() ?> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,351 +1,352 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getPost('btn');
|
||||||
$weap = Util::getReq('weap', 'int');
|
$item = Util::getPost('item', 'string');
|
||||||
$genlist = Util::getReq('genlist', 'array_int');
|
$genlist = Util::getPost('genlist', 'array_int');
|
||||||
$msg = Util::getReq('msg', 'string');
|
$msg = Util::getPost('msg', 'string');
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireLogin()->loginGame()->setReadOnly();
|
$session = Session::requireLogin()->loginGame()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
header('location:_admin2.php');
|
header('location:_admin2.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
$generalID = $session->generalID;
|
$generalID = $session->generalID;
|
||||||
if(!$generalID){
|
if (!$generalID) {
|
||||||
header('location:_admin2.php');
|
header('location:_admin2.php');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
|
|
||||||
switch($btn) {
|
$genObjList = [];
|
||||||
|
$env = [];
|
||||||
|
if ($genlist) {
|
||||||
|
$genObjList = General::createGeneralObjListFromDB($genlist);
|
||||||
|
$env = $gameStor->cacheAll();
|
||||||
|
}
|
||||||
|
switch ($btn) {
|
||||||
case "전체 접속허용":
|
case "전체 접속허용":
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'con'=>0
|
'con' => 0
|
||||||
], true);
|
], true);
|
||||||
break;
|
break;
|
||||||
case "전체 접속제한":
|
case "전체 접속제한":
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'con'=>1000
|
'con' => 1000
|
||||||
], true);
|
], true);
|
||||||
break;
|
break;
|
||||||
case "블럭 해제":
|
case "블럭 해제":
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'block'=>0
|
'block' => 0
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
DB::db()->query('update general set block=0 where no IN %li', $genlist);
|
DB::db()->query('update general set block=0 where no IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "1단계 블럭":
|
case "1단계 블럭":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now();
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'block'=>1,
|
'block' => 1,
|
||||||
'killturn'=>24
|
'killturn' => 24
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
$uid = $db->queryFirstColumn('SELECT `owner` FROM general WHERE `no` IN %li', $genlist);
|
$uid = $db->queryFirstColumn('SELECT `owner` FROM general WHERE `no` IN %li', $genlist);
|
||||||
RootDB::db()->update('member',[
|
RootDB::db()->update('member', [
|
||||||
'block_num'=>$db->sqleval('block_num+1'),
|
'block_num' => $db->sqleval('block_num+1'),
|
||||||
'block_date'=>$date
|
'block_date' => $date
|
||||||
], 'id IN %li', $uid);
|
], 'id IN %li', $uid);
|
||||||
break;
|
break;
|
||||||
case "2단계 블럭":
|
case "2단계 블럭":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now();
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'gold'=>0,
|
'gold' => 0,
|
||||||
'rice'=>0,
|
'rice' => 0,
|
||||||
'block'=>2,
|
'block' => 2,
|
||||||
'killturn'=>24
|
'killturn' => 24
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||||
RootDB::db()->update('member',[
|
RootDB::db()->update('member', [
|
||||||
'block_num'=>$db->sqleval('block_num+1'),
|
'block_num' => $db->sqleval('block_num+1'),
|
||||||
'block_date'=>$date
|
'block_date' => $date
|
||||||
], 'id IN %li', $uid);
|
], 'id IN %li', $uid);
|
||||||
break;
|
break;
|
||||||
case "3단계 블럭":
|
case "3단계 블럭":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now();
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'gold'=>0,
|
'gold' => 0,
|
||||||
'rice'=>0,
|
'rice' => 0,
|
||||||
'block'=>3,
|
'block' => 3,
|
||||||
'killturn'=>24
|
'killturn' => 24
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
$uid = $db->queryFirstColumn('SELECT `owner` from general where no IN %li', $genlist);
|
$uid = $db->queryFirstColumn('SELECT `owner` from general where no IN %li', $genlist);
|
||||||
RootDB::db()->update('member',[
|
RootDB::db()->update('member', [
|
||||||
'block_num'=>$db->sqleval('block_num+1'),
|
'block_num' => $db->sqleval('block_num+1'),
|
||||||
'block_date'=>$date
|
'block_date' => $date
|
||||||
], 'id IN %li', $uid);
|
], 'id IN %li', $uid);
|
||||||
break;
|
break;
|
||||||
case "무한삭턴":
|
case "무한삭턴":
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'killturn'=>8000
|
'killturn' => 8000
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "강제 사망":
|
case "강제 사망":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now(true);
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'turn0'=>EncodeCommand(0, 0, 0, 0),
|
'killturn' => 0,
|
||||||
'killturn'=>0,
|
'turntime' => $date,
|
||||||
'turntime'=>$date,
|
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
|
$db->update('general_turn', [
|
||||||
|
'action' => '휴식',
|
||||||
|
'arg' => '{}',
|
||||||
|
'brief' => '휴식',
|
||||||
|
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||||
break;
|
break;
|
||||||
case "특기 부여":
|
case "특기 부여":
|
||||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
$text = "특기 부여!";
|
$text = "특기 부여!";
|
||||||
|
|
||||||
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
|
foreach ($db->query("SELECT `no`,leadership,strength,intel,dex1,dex2,dex3,dex4,dex5 FROM general WHERE `no` IN %li", $genlist) as $general) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
|
|
||||||
$specialWar = SpecialityConst::pickSpecialWar($general);
|
$specialWar = SpecialityHelper::pickSpecialWar($general);
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'specage2'=>$db->sqleval('age'),
|
'specage2' => $db->sqleval('age'),
|
||||||
'special2'=>$specialWar
|
'special2' => $specialWar
|
||||||
], 'no=%i', $general['no']);
|
], 'no=%i', $general['no']);
|
||||||
$specialWarName = SpecialityConst::WAR[$specialWar][0];
|
$specialWarName = buildGeneralSpecialWarClass($specialWar)->getName();
|
||||||
$josaUl = JosaUtil::pick($specialWarName, '을');
|
$josaUl = JosaUtil::pick($specialWarName, '을');
|
||||||
pushGeneralHistory($general, "<C>●</>{$year}년 {$month}월:특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
|
$logger = new ActionLogger($general['no'], 0, $year, $month);
|
||||||
pushGenLog($general, ["<C>●</>특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!"]);
|
$logger->pushGeneralHistoryLog("특기 【<b><C>{$specialWarName}</></b>】{$josaUl} 습득");
|
||||||
|
$logger->pushGeneralActionLog("특기 【<b><L>{$specialWarName}</></b>】{$josaUl} 익혔습니다!",ActionLogger::PLAIN);
|
||||||
|
$logger->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "경험치1000":
|
case "경험치1000":
|
||||||
$text = $btn." 지급!";
|
$text = $btn . " 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'experience'=>$db->sqleval('experience+1000')
|
'experience' => $db->sqleval('experience+1000')
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "공헌치1000":
|
case "공헌치1000":
|
||||||
$text = $btn." 지급!";
|
$text = $btn . " 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'dedication'=>$db->sqleval('dedication+1000')
|
'dedication' => $db->sqleval('dedication+1000')
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "보숙10000":
|
case "보숙10000":
|
||||||
$text = "보병숙련도+10000 지급!";
|
$text = "보병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'dex0'=>$db->sqleval('dex0+10000')
|
'dex1' => $db->sqleval('dex1+10000')
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "궁숙10000":
|
case "궁숙10000":
|
||||||
$text = "궁병숙련도+10000 지급!";
|
$text = "궁병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'dex10'=>$db->sqleval('dex10+10000')
|
'dex2' => $db->sqleval('dex2+10000')
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "기숙10000":
|
case "기숙10000":
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
$text = "기병숙련도+10000 지급!";
|
$text = "기병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'dex20'=>$db->sqleval('dex20+10000')
|
'dex3' => $db->sqleval('dex3+10000')
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "귀숙10000":
|
case "귀숙10000":
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
$text = "귀병숙련도+10000 지급!";
|
$text = "귀병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'dex30'=>$db->sqleval('dex30+10000')
|
'dex4' => $db->sqleval('dex4+10000')
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "차숙10000":
|
case "차숙10000":
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
$text = "차병숙련도+10000 지급!";
|
$text = "차병숙련도+10000 지급!";
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'dex40'=>$db->sqleval('dex40+10000')
|
'dex5' => $db->sqleval('dex5+10000')
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "접속 허용":
|
case "접속 허용":
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'con'=>0
|
'con' => 0
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "접속 제한":
|
case "접속 제한":
|
||||||
$db->update('general',[
|
$db->update('general', [
|
||||||
'con'=>1000
|
'con' => 1000
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "메세지 전달":
|
case "메세지 전달":
|
||||||
$text = $msg;
|
$text = $msg ?? '';
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "무기지급":
|
case "무기지급":
|
||||||
|
|
||||||
if($weap == 0) {
|
if ($item == 'None') {
|
||||||
$text = "무기 회수!";
|
$text = "무기 회수!";
|
||||||
}
|
} else {
|
||||||
else {
|
$text = getItemName($item) . " 지급!";
|
||||||
$text = getWeapName($weap)." 지급!";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($weap == 0){
|
if ($item === 'None') {
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'weap'=>0
|
'weapon' => 'None'
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'weap'=>$weap
|
'weapon' => $item
|
||||||
], '`no` IN %li AND weap < %i', $genlist, $weap);
|
], '`no` IN %li', $genlist, $item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "책지급":
|
case "책지급":
|
||||||
if($weap == 0) {
|
if ($item == 'None') {
|
||||||
$text = "책 회수!";
|
$text = "책 회수!";
|
||||||
}
|
} else {
|
||||||
else {
|
$text = getItemName($item) . " 지급!";
|
||||||
$text = getBookName($weap)." 지급!";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($weap == 0){
|
if ($item == 'None') {
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'book'=>0
|
'book' => 'None'
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'book'=>$weap
|
'book' => $item
|
||||||
], '`no` IN %li AND book < %i', $genlist, $weap);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "말지급":
|
case "말지급":
|
||||||
if($weap == 0) {
|
if ($item == 'None') {
|
||||||
$text = "말 회수!";
|
$text = "말 회수!";
|
||||||
}
|
} else {
|
||||||
else {
|
$text = getItemName($item) . " 지급!";
|
||||||
$text = getHorseName($weap)." 지급!";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($weap == 0){
|
if ($item == 'None') {
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'horse'=>0
|
'horse' => 'None'
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'horse'=>$weap
|
'horse' => $item
|
||||||
], '`no` IN %li AND horse < %i', $genlist, $weap);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "도구지급":
|
case "도구지급":
|
||||||
if($weap == 0) {
|
if ($item == 'None') {
|
||||||
$text = "특수도구 회수!";
|
$text = "특수도구 회수!";
|
||||||
}
|
} else {
|
||||||
else {
|
$text = getItemName($item) . " 지급!";
|
||||||
$text = getItemName($weap)." 지급!";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
$msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []);
|
||||||
$msg->send(true);
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($weap == 0){
|
if ($item == 'None') {
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'item'=>0
|
'item' => 'None'
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'item'=>$weap
|
'item' => $item
|
||||||
], '`no` IN %li AND item < %i', $genlist, $weap);
|
], '`no` IN %li AND item < %i', $genlist, $item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "NPC해제":
|
|
||||||
$db->update('general', [
|
|
||||||
'npc'=>1
|
|
||||||
], '`no` IN %li', $genlist);
|
|
||||||
break;
|
|
||||||
case "하야입력":
|
case "하야입력":
|
||||||
$db->update('general', [
|
$db->update('general_turn', [
|
||||||
'turn0'=>EncodeCommand(0, 0, 0, 45)
|
'action' => 'che_하야',
|
||||||
], '`no` IN %li', $genlist);
|
'arg' => '{}',
|
||||||
|
'brief' => '하야',
|
||||||
|
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||||
break;
|
break;
|
||||||
case "방랑해산":
|
case "방랑해산":
|
||||||
$db->update('general', [
|
$db->update('general_turn', [
|
||||||
'turn0'=>EncodeCommand(0, 0, 0, 47),
|
'action' => 'che_방랑',
|
||||||
'turn1'=>EncodeCommand(0, 0, 0, 56)
|
'arg' => '{}',
|
||||||
], '`no` IN %li', $genlist);
|
'brief' => '방랑',
|
||||||
break;
|
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||||
case "NPC설정":
|
$db->update('general_turn', [
|
||||||
$db->update('general', [
|
'action' => 'che_해산',
|
||||||
'npc'=>2
|
'arg' => '{}',
|
||||||
], '`no` IN %li', $genlist);
|
'brief' => '해산',
|
||||||
|
], 'general_id IN %li AND turn_idx = 1', $genlist);
|
||||||
break;
|
break;
|
||||||
case "00턴":
|
case "00턴":
|
||||||
$turnterm = $gameStor->turnterm;
|
$turnterm = $gameStor->turnterm;
|
||||||
|
|
||||||
foreach($genlist as $generalID){
|
foreach ($genlist as $generalID) {
|
||||||
$turntime = getRandTurn($turnterm);
|
$turntime = getRandTurn($turnterm);
|
||||||
$cutTurn = cutTurn($turntime, $turnterm);
|
$cutTurn = cutTurn($turntime, $turnterm);
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'turntime'=>$curTurn
|
'turntime' => $cutTurn
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "랜덤턴":
|
case "랜덤턴":
|
||||||
foreach($genlist as $generalID){
|
$turnterm = $gameStor->turnterm;
|
||||||
|
foreach ($genlist as $generalID) {
|
||||||
$turntime = getRandTurn($turnterm);
|
$turntime = getRandTurn($turnterm);
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'turntime'=>$turntime
|
'turntime' => $turntime
|
||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
@@ -6,71 +7,82 @@ include "func.php";
|
|||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
?>
|
die(requireAdminPermissionHTML());
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>관리메뉴</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
관리자가 아닙니다.<br>
|
|
||||||
<?=banner()?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$conlimit = $gameStor->conlimit;
|
$conlimit = $gameStor->conlimit;
|
||||||
|
|
||||||
|
$ipGroupList = Util::arrayGroupBy(
|
||||||
|
$db->query(
|
||||||
|
'SELECT name,ip,lastconnect,owner,block,substring_index(ip,".",3) as ip_c from general WHERE ip!="" and npc<2'
|
||||||
|
),
|
||||||
|
'ip_c'
|
||||||
|
);
|
||||||
|
|
||||||
|
function colorBlockedName($general)
|
||||||
|
{
|
||||||
|
if (!$general['blocked']) {
|
||||||
|
return $general['name'];
|
||||||
|
}
|
||||||
|
return "<span style='color:magenta;'>{$general['name']}</span>";
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>멀티관리</title>
|
<title>멀티관리</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?= WebUtil::printDist('ts', 'common', true) ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>멀 티 관 리<br><?=backButton()?></td></tr>
|
|
||||||
</table>
|
|
||||||
<form name=form1 method=post action=_admin4_submit.php>
|
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width=80 align=center rowspan=3>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
|
<td>멀 티 관 리<br><?= backButton() ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<form name=form1 method=post action=_admin4_submit.php>
|
||||||
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
|
<tr>
|
||||||
|
<td width=80 align=center rowspan=3>회원선택<br><br>
|
||||||
|
<font color=cyan>NPC</font><br>
|
||||||
|
<font color=skyblue>NPC유저</font><br>
|
||||||
|
<font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b>
|
||||||
|
</td>
|
||||||
<td width=105 rowspan=3>
|
<td width=105 rowspan=3>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
|
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:14px'>";
|
||||||
|
|
||||||
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
|
foreach ($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general) {
|
||||||
$style = "style=;";
|
$style = "style=;";
|
||||||
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
if ($general['block'] > 0) {
|
||||||
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
$style .= "background-color:red;";
|
||||||
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
|
}
|
||||||
if($general['con'] > $conlimit) { $style .= "color:red;"; }
|
|
||||||
|
$npcColor = getNPCColor($general['npc']);
|
||||||
|
if($npcColor !== null){
|
||||||
|
$style .= "color:{$npcColor};";
|
||||||
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<option value={$general['no']} $style>{$general['name']}</option>";
|
<option value={$general['no']} $style>{$general['name']}</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
</select>";
|
</select>";
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td width=100 align=center>블럭</td>
|
<td width=100 align=center>블럭</td>
|
||||||
<td width=504>
|
<td width=504>
|
||||||
@@ -86,57 +98,35 @@ echo "
|
|||||||
<td align=center>메세지 전달</td>
|
<td align=center>메세지 전달</td>
|
||||||
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center width=100>장수명</td>
|
<td align=center width=100>장수명</td>
|
||||||
<td align=center width=180>최근로그인</td>
|
<td align=center width=180>최근로그인</td>
|
||||||
<td align=center width=129>IP</td>
|
<td align=center width=129>IP</td>
|
||||||
<td align=center width=100>ID</td>
|
<td align=center width=100>ID</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php foreach ($ipGroupList as $ipGroupC => $users) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<td><?= join('<br>', array_map('\sammo\colorBlockedName', $users)) ?></td>
|
||||||
$query = "select substring_index(ip,'.',3) as ip2 from general where ip!='' and npc<2 group by ip2 having count(*)>1";
|
<td><?= join('<br>', array_column($users, 'lastconnect')) ?></td>
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
<td><?= join('<br>', array_column($users, 'ip')) ?></td>
|
||||||
$ipCount = MYDB_num_rows($result);
|
<td><?= join('<br>', array_column($users, 'owner')) ?></td>
|
||||||
$genName = "";
|
|
||||||
$genDate = "";
|
|
||||||
$genIP = "";
|
|
||||||
$genID = "";
|
|
||||||
for($i=0; $i < $ipCount; $i++) {
|
|
||||||
$ip = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$query = "select name,ip,lastconnect,owner,block from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
|
|
||||||
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$genCount = MYDB_num_rows($genResult);
|
|
||||||
for($k=0; $k < $genCount; $k++) {
|
|
||||||
$gen = MYDB_fetch_array($genResult);
|
|
||||||
if($gen['block'] > 0) $genName .= "<font color=magenta>{$gen['name']}</font><br>";
|
|
||||||
else $genName .= $gen['name']."<br>";
|
|
||||||
$genDate .= $gen['lastconnect']."<br>";
|
|
||||||
$genIP .= $gen['ip']."<br>";
|
|
||||||
$genID .= $gen['owner']."<br>";
|
|
||||||
}
|
|
||||||
$genName .= "<br>";
|
|
||||||
$genDate .= "<br>";
|
|
||||||
$genIP .= "<br>";
|
|
||||||
$genID .= "<br>";
|
|
||||||
}
|
|
||||||
echo "
|
|
||||||
<td align=right>$genName</td>
|
|
||||||
<td>$genDate</td>
|
|
||||||
<td>$genIP</td>
|
|
||||||
<td>$genID</td>";
|
|
||||||
?>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<?php endforeach; ?>
|
||||||
<?php
|
</table>
|
||||||
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
|
<?php
|
||||||
?>
|
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
|
||||||
</form>
|
?>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
</form>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr>
|
||||||
</table>
|
<td><?= backButton() ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= banner() ?> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
@@ -6,69 +7,74 @@ include "func.php";
|
|||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
header('location:_admin4.php');
|
header('location:_admin4.php');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getPost('btn');
|
||||||
$genlist = Util::getReq('genlist', 'array_int');
|
$genlist = Util::getPost('genlist', 'array_int');
|
||||||
$msg = Util::getReq('msg','string', '메시지');
|
$msg = Util::getPost('msg', 'string', '메시지');
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|
||||||
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
|
//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가?
|
||||||
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
|
//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가?
|
||||||
switch($btn) {
|
switch ($btn) {
|
||||||
case "블럭 해제":
|
case "블럭 해제":
|
||||||
DB::db()->query('update general set block=0 where no IN %li', $genlist);
|
DB::db()->query('update general set block=0 where no IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "1단계 블럭":
|
case "1단계 블럭":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now();
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$db->query('update general set block=1,killturn=24 where no IN %li',$genlist);
|
$db->query('update general set block=1,killturn=24 where no IN %li', $genlist);
|
||||||
//FIXME: subquery로 하는게 더 빠를 듯.
|
//FIXME: subquery로 하는게 더 빠를 듯.
|
||||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||||
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||||
break;
|
break;
|
||||||
case "2단계 블럭":
|
case "2단계 블럭":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now();
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$db->query('update general set block=2,killturn=24 where no IN %li',$genlist);
|
$db->query('update general set block=2,killturn=24 where no IN %li', $genlist);
|
||||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||||
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||||
break;
|
break;
|
||||||
case "3단계 블럭":
|
case "3단계 블럭":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now();
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$db->query('update general set block=3,killturn=24 where no IN %li',$genlist);
|
$db->query('update general set block=3,killturn=24 where no IN %li', $genlist);
|
||||||
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
$uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist);
|
||||||
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
RootDB::db()->query('update member set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid);
|
||||||
break;
|
break;
|
||||||
case "무한삭턴":
|
case "무한삭턴":
|
||||||
DB::db()->query('update general set killturn=8000 where no IN %li',$genlist);
|
DB::db()->query('update general set killturn=8000 where no IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "강제 사망":
|
case "강제 사망":
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = TimeUtil::now(true);
|
||||||
DB::db()->query('update general set turn0=%s,killturn=0,turntime=%s where no IN %li',EncodeCommand(0, 0, 0, 0),$date, $genlist);
|
$db->update('general', [
|
||||||
|
'killturn' => 0,
|
||||||
|
'turntime' => $date,
|
||||||
|
], '`no` IN %li', $genlist);
|
||||||
|
$db->update('general_turn', [
|
||||||
|
'action' => '휴식',
|
||||||
|
'arg' => '{}',
|
||||||
|
'brief' => '휴식'
|
||||||
|
], 'general_id IN %li AND turn_idx = 0', $genlist);
|
||||||
break;
|
break;
|
||||||
case "메세지 전달":
|
case "메세지 전달":
|
||||||
//TODO:새 갠메 시스템으로 변경
|
$date = TimeUtil::now();
|
||||||
$date = date('Y-m-d H:i:s');
|
|
||||||
$src = MessageTarget::buildQuick($session->generalID);
|
$src = MessageTarget::buildQuick($session->generalID);
|
||||||
for($i=0; $i < count($genlist); $i++) {
|
foreach($genlist as $generalID){
|
||||||
$msgObj = new Message(
|
$msgObj = new Message(
|
||||||
Message::MSGTYPE_PRIVATE,
|
Message::MSGTYPE_PRIVATE,
|
||||||
$src,
|
$src,
|
||||||
MessageTarget::buildQuick($genlist[$i]),
|
MessageTarget::buildQuick($generalID),
|
||||||
$msg,
|
$msg,
|
||||||
new DateTime(),
|
new \DateTime(),
|
||||||
new \DateTime('9999-12-31'),
|
new \DateTime('9999-12-31'),
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
if($msgObj){
|
if ($msgObj) {
|
||||||
$msgObj->send(true);
|
$msgObj->send(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,4 +82,3 @@ switch($btn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
header('location:_admin4.php');
|
header('location:_admin4.php');
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$type = Util::getReq('type', 'int', 0);
|
$type = Util::getPost('type', 'int', 0);
|
||||||
$type2 = Util::getReq('type2', 'int', 0);
|
$type2 = Util::getPost('type2', 'int', 0);
|
||||||
|
|
||||||
if($type < 0 || $type > 17){
|
if ($type < 0 || $type > 17) {
|
||||||
$type = 0;
|
$type = 0;
|
||||||
}
|
}
|
||||||
if($type2 < 0 || $type2 > 6){
|
if ($type2 < 0 || $type2 > 6) {
|
||||||
$type2 = 0;
|
$type2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
?>
|
die(requireAdminPermissionHTML());
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>관리메뉴</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
관리자가 아닙니다.<br>
|
|
||||||
<?=banner()?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$sel = [];
|
$sel = [];
|
||||||
$sel2 = [];
|
$sel2 = [];
|
||||||
@@ -51,77 +32,79 @@ $sel2[$type2] = "selected";
|
|||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>일제정보</title>
|
<title>일제정보</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?= WebUtil::printDist('ts', 'common', true) ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>일 제 정 보<br><?=closeButton()?></td></tr>
|
<tr>
|
||||||
<tr><td>
|
<td>일 제 정 보<br><?= closeButton() ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<form name=form1 method=post>정렬순서 :
|
<form name=form1 method=post>정렬순서 :
|
||||||
<select name=type size=1>
|
<select name=type size=1>
|
||||||
<option <?=$sel[0]??''?> value=0>국력</option>
|
<option <?= $sel[0] ?? '' ?> value=0>국력</option>
|
||||||
<option <?=$sel[1]??''?> value=1>장수</option>
|
<option <?= $sel[1] ?? '' ?> value=1>장수</option>
|
||||||
<option <?=$sel[2]??''?> value=2>기술</option>
|
<option <?= $sel[2] ?? '' ?> value=2>기술</option>
|
||||||
<option <?=$sel[3]??''?> value=3>국고</option>
|
<option <?= $sel[3] ?? '' ?> value=3>국고</option>
|
||||||
<option <?=$sel[4]??''?> value=4>병량</option>
|
<option <?= $sel[4] ?? '' ?> value=4>병량</option>
|
||||||
<option <?=$sel[5]??''?> value=5>평금</option>
|
<option <?= $sel[5] ?? '' ?> value=5>평금</option>
|
||||||
<option <?=$sel[6]??''?> value=6>평쌀</option>
|
<option <?= $sel[6] ?? '' ?> value=6>평쌀</option>
|
||||||
<option <?=$sel[7]??''?> value=7>평통</option>
|
<option <?= $sel[7] ?? '' ?> value=7>평통</option>
|
||||||
<option <?=$sel[8]??''?> value=8>평무</option>
|
<option <?= $sel[8] ?? '' ?> value=8>평무</option>
|
||||||
<option <?=$sel[9]??''?> value=9>평지</option>
|
<option <?= $sel[9] ?? '' ?> value=9>평지</option>
|
||||||
<option <?=$sel[10]??''?> value=10>평Lv</option>
|
<option <?= $sel[10] ?? '' ?> value=10>평Lv</option>
|
||||||
<option <?=$sel[11]??''?> value=11>접속률</option>
|
<option <?= $sel[11] ?? '' ?> value=11>접속률</option>
|
||||||
<option <?=$sel[12]??''?> value=12>단기접</option>
|
<option <?= $sel[12] ?? '' ?> value=12>단기접</option>
|
||||||
<option <?=$sel[13]??''?> value=13>보숙</option>
|
<option <?= $sel[13] ?? '' ?> value=13>보숙</option>
|
||||||
<option <?=$sel[14]??''?> value=14>궁숙</option>
|
<option <?= $sel[14] ?? '' ?> value=14>궁숙</option>
|
||||||
<option <?=$sel[15]??''?> value=15>기숙</option>
|
<option <?= $sel[15] ?? '' ?> value=15>기숙</option>
|
||||||
<option <?=$sel[16]??''?> value=16>귀숙</option>
|
<option <?= $sel[16] ?? '' ?> value=16>귀숙</option>
|
||||||
<option <?=$sel[17]??''?> value=17>차숙</option>
|
<option <?= $sel[17] ?? '' ?> value=17>차숙</option>
|
||||||
</select>
|
</select>
|
||||||
<select name=type2 size=1>
|
<select name=type2 size=1>
|
||||||
<option <?=$sel2[0]??''?> value=0>국력</option>
|
<option <?= $sel2[0] ?? '' ?> value=0>국력</option>
|
||||||
<option <?=$sel2[1]??''?> value=1>국가별성향</option>
|
<option <?= $sel2[1] ?? '' ?> value=1>국가별성향</option>
|
||||||
<option <?=$sel2[2]??''?> value=2>국가성향</option>
|
<option <?= $sel2[2] ?? '' ?> value=2>국가성향</option>
|
||||||
<option <?=$sel2[3]??''?> value=3>장수성격</option>
|
<option <?= $sel2[3] ?? '' ?> value=3>장수성격</option>
|
||||||
<option <?=$sel2[4]??''?> value=4>장수특기</option>
|
<option <?= $sel2[4] ?? '' ?> value=4>장수특기</option>
|
||||||
<option <?=$sel2[5]??''?> value=5>병종수</option>
|
<option <?= $sel2[5] ?? '' ?> value=5>병종수</option>
|
||||||
<option <?=$sel2[6]??''?> value=6>기타</option>
|
<option <?= $sel2[6] ?? '' ?> value=6>기타</option>
|
||||||
</select>
|
</select>
|
||||||
<input type=submit value='정렬하기'>
|
<input type=submit value='정렬하기'>
|
||||||
</form>
|
</form>
|
||||||
<form name=form2 method=post action=_admin5_submit.php>
|
<form name=form2 method=post action=_admin5_submit.php>
|
||||||
<select name=nation size=1 style=color:white;background-color:black>";
|
<select name=nation size=1 style=color:white;background-color:black>";
|
||||||
<option value=0>재야</option>";
|
<option value=0>재야</option>";
|
||||||
<?php
|
<?php
|
||||||
$query = "select nation,name,color,scout,scoutmsg,gennum from nation order by power";
|
foreach ($db->query('SELECT nation,name,color,scout,gennum from nation order by power DESC') as $nation) {
|
||||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
for($i=1; $i <= $count; $i++) {
|
|
||||||
$nation = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<option value={$nation['nation']}>{$nation['name']}</option>";
|
<option value={$nation['nation']}>{$nation['name']}</option>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<input type=submit name=btn value='국가변경'>
|
<input type=submit name=btn value='국가변경'>
|
||||||
</form>
|
</form>
|
||||||
</td></tr>
|
</td>
|
||||||
</table>
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<table align=center width=1600 class="tb_layout bg0">
|
<table align=center width=1600 class="tb_layout bg0">
|
||||||
<tr id=bg1>
|
<tr class='bg1'>
|
||||||
<td align=center>국명</td>
|
<td align=center>국명</td>
|
||||||
<td align=center>접률</td>
|
<td align=center>접률</td>
|
||||||
<td align=center>단접</td>
|
<td align=center>단접</td>
|
||||||
<td align=center>국력</td>
|
<td align=center>국력</td>
|
||||||
<td align=center>단합</td>
|
|
||||||
<td align=center>장수</td>
|
<td align=center>장수</td>
|
||||||
<td align=center>속령</td>
|
<td align=center>속령</td>
|
||||||
<td align=center>기술</td>
|
<td align=center>기술</td>
|
||||||
@@ -149,149 +132,187 @@ for($i=1; $i <= $count; $i++) {
|
|||||||
<td align=center>수비</td>
|
<td align=center>수비</td>
|
||||||
<td align=center>국명</td>
|
<td align=center>국명</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$query = "
|
$query = "
|
||||||
SELECT
|
SELECT
|
||||||
A.nation,
|
A.nation,
|
||||||
A.name,
|
A.name,
|
||||||
A.power,
|
A.power,
|
||||||
A.chemi,
|
|
||||||
A.color,
|
A.color,
|
||||||
A.tech,
|
A.tech,
|
||||||
A.sabotagelimit,
|
A.strategic_cmd_limit,
|
||||||
A.gold,
|
A.gold,
|
||||||
A.rice,
|
A.rice,
|
||||||
COUNT(B.nation) AS gennum,
|
COUNT(B.nation) AS gennum,
|
||||||
ROUND(AVG(B.connect), 1) AS connect,
|
ROUND(AVG(B.connect), 1) AS connect,
|
||||||
ROUND(AVG(B.con), 1) AS con,
|
ROUND(AVG(B.con), 1) AS con,
|
||||||
ROUND(AVG(B.dex0)) AS dex0,
|
ROUND(AVG(B.dex1)) AS dex1,
|
||||||
ROUND(AVG(B.dex10)) AS dex10,
|
ROUND(AVG(B.dex2)) AS dex2,
|
||||||
ROUND(AVG(B.dex20)) AS dex20,
|
ROUND(AVG(B.dex3)) AS dex3,
|
||||||
ROUND(AVG(B.dex30)) AS dex30,
|
ROUND(AVG(B.dex4)) AS dex4,
|
||||||
ROUND(AVG(B.dex40)) AS dex40
|
ROUND(AVG(B.dex5)) AS dex5
|
||||||
FROM nation A, general B
|
FROM nation A, general B
|
||||||
WHERE A.nation=B.nation
|
WHERE A.nation=B.nation
|
||||||
GROUP BY B.nation
|
GROUP BY B.nation
|
||||||
";
|
";
|
||||||
|
|
||||||
switch($type) {
|
switch ($type) {
|
||||||
case 0: $query .= " order by power desc"; break;
|
case 0:
|
||||||
case 1: $query .= " order by gennum desc"; break;
|
$query .= " order by power desc";
|
||||||
case 2: $query .= " order by A.tech desc"; break;
|
break;
|
||||||
case 3: $query .= " order by A.gold desc"; break;
|
case 1:
|
||||||
case 4: $query .= " order by A.rice desc"; break;
|
$query .= " order by gennum desc";
|
||||||
case 5: $query .= " order by avg(B.gold) desc"; break;
|
break;
|
||||||
case 6: $query .= " order by avg(B.rice) desc"; break;
|
case 2:
|
||||||
case 7: $query .= " order by avg(B.leader) desc"; break;
|
$query .= " order by A.tech desc";
|
||||||
case 8: $query .= " order by avg(B.power) desc"; break;
|
break;
|
||||||
case 9: $query .= " order by avg(B.intel) desc"; break;
|
case 3:
|
||||||
case 10: $query .= " order by avg(B.explevel) desc"; break;
|
$query .= " order by A.gold desc";
|
||||||
case 11: $query .= " order by avg(B.connect) desc"; break;
|
break;
|
||||||
case 12: $query .= " order by avg(B.con) desc"; break;
|
case 4:
|
||||||
case 13: $query .= " order by avg(B.dex0) desc"; break;
|
$query .= " order by A.rice desc";
|
||||||
case 14: $query .= " order by avg(B.dex10) desc"; break;
|
break;
|
||||||
case 15: $query .= " order by avg(B.dex20) desc"; break;
|
case 5:
|
||||||
case 16: $query .= " order by avg(B.dex30) desc"; break;
|
$query .= " order by avg(B.gold) desc";
|
||||||
case 17: $query .= " order by avg(B.dex40) desc"; break;
|
break;
|
||||||
}
|
case 6:
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$query .= " order by avg(B.rice) desc";
|
||||||
$nationCount = MYDB_num_rows($result);
|
break;
|
||||||
for($i=0; $i < $nationCount; $i++) {
|
case 7:
|
||||||
$nation = MYDB_fetch_array($result);
|
$query .= " order by avg(B.leadership) desc";
|
||||||
|
break;
|
||||||
$query = "select COUNT(*) as cnt,
|
case 8:
|
||||||
|
$query .= " order by avg(B.strength) desc";
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
$query .= " order by avg(B.intel) desc";
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
$query .= " order by avg(B.explevel) desc";
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
$query .= " order by avg(B.connect) desc";
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
$query .= " order by avg(B.con) desc";
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
$query .= " order by avg(B.dex1) desc";
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
$query .= " order by avg(B.dex2) desc";
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
$query .= " order by avg(B.dex3) desc";
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
$query .= " order by avg(B.dex4) desc";
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
$query .= " order by avg(B.dex5) desc";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
foreach ($db->query($query) as $nation) {
|
||||||
|
$gen = $db->queryFirstRow('SELECT COUNT(*) as cnt,
|
||||||
ROUND(AVG(gold)) as avgg,
|
ROUND(AVG(gold)) as avgg,
|
||||||
ROUND(AVG(rice)) as avgr,
|
ROUND(AVG(rice)) as avgr,
|
||||||
SUM(leader) as leader, ROUND(AVG(leader), 1) as avgl,
|
SUM(leadership) as leadership, ROUND(AVG(leadership), 1) as avgl,
|
||||||
ROUND(AVG(power), 1) as avgp,
|
ROUND(AVG(strength), 1) as avgs,
|
||||||
ROUND(AVG(intel), 1) as avgi,
|
ROUND(AVG(intel), 1) as avgi,
|
||||||
ROUND(AVG(explevel), 1) as avge,
|
ROUND(AVG(explevel), 1) as avge,
|
||||||
SUM(crew) as crew
|
SUM(crew) as crew
|
||||||
from general where nation='{$nation['nation']}'";
|
from general where nation=%i', $nation['nation']);
|
||||||
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gen = MYDB_fetch_array($genResult);
|
|
||||||
|
|
||||||
$query = "select COUNT(*) as cnt,
|
$city = $db->queryFirstRow('SELECT COUNT(*) as cnt,
|
||||||
SUM(pop) as pop, SUM(pop2) as pop2,
|
SUM(pop) as pop, SUM(pop_max) as pop_max,
|
||||||
ROUND(SUM(pop)/SUM(pop2)*100, 2) as rate,
|
ROUND(SUM(pop)/SUM(pop_max)*100, 2) as rate,
|
||||||
ROUND(SUM(agri)/SUM(agri2)*100, 2) as agri,
|
trust,
|
||||||
ROUND(SUM(comm)/SUM(comm2)*100, 2) as comm,
|
ROUND(SUM(agri)/SUM(agri_max)*100, 2) as agri,
|
||||||
ROUND(SUM(secu)/SUM(secu2)*100, 2) as secu,
|
ROUND(SUM(comm)/SUM(comm_max)*100, 2) as comm,
|
||||||
ROUND(SUM(wall)/SUM(wall2)*100, 2) as wall,
|
ROUND(SUM(secu)/SUM(secu_max)*100, 2) as secu,
|
||||||
ROUND(SUM(def)/SUM(def2)*100, 2) as def
|
ROUND(SUM(wall)/SUM(wall_max)*100, 2) as wall,
|
||||||
from city where nation='{$nation['nation']}'";
|
ROUND(SUM(def)/SUM(def_max)*100, 2) as def
|
||||||
$cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
from city where nation=%i', $nation['nation']);
|
||||||
$city = MYDB_fetch_array($cityResult);
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center style=background-color:{$nation['color']};color:".newColor($nation['color']).";>{$nation['name']}</td>
|
<td align=center style=background-color:{$nation['color']};color:" . newColor($nation['color']) . ";>{$nation['name']}</td>
|
||||||
<td align=center> {$nation['connect']} </td>
|
<td align=center> {$nation['connect']} </td>
|
||||||
<td align=center> {$nation['con']} </td>
|
<td align=center> {$nation['con']} </td>
|
||||||
<td align=center> {$nation['power']} </td>
|
<td align=center> {$nation['power']} </td>
|
||||||
<td align=center> {$nation['chemi']} </td>
|
|
||||||
<td align=center> {$gen['cnt']} </td>
|
<td align=center> {$gen['cnt']} </td>
|
||||||
<td align=center> {$city['cnt']} </td>
|
<td align=center> {$city['cnt']} </td>
|
||||||
<td align=center> {$nation['tech']} </td>
|
<td align=right> " . sprintf('%.1f', $nation['tech']) . " </td>
|
||||||
<td align=center> {$nation['sabotagelimit']} </td>
|
<td align=center> {$nation['strategic_cmd_limit']} </td>
|
||||||
<td align=center> {$nation['gold']} </td>
|
<td align=center> {$nation['gold']} </td>
|
||||||
<td align=center> {$nation['rice']} </td>
|
<td align=center> {$nation['rice']} </td>
|
||||||
<td align=center> {$gen['avgg']} </td>
|
<td align=right> {$gen['avgg']} </td>
|
||||||
<td align=center> {$gen['avgr']} </td>
|
<td align=right> {$gen['avgr']} </td>
|
||||||
<td align=center> {$gen['avgl']} </td>
|
<td align=right> {$gen['avgl']} </td>
|
||||||
<td align=center> {$gen['avgp']} </td>
|
<td align=right> {$gen['avgs']} </td>
|
||||||
<td align=center> {$gen['avgi']} </td>
|
<td align=right> {$gen['avgi']} </td>
|
||||||
<td align=center> {$gen['avge']} </td>
|
<td align=right> {$gen['avge']} </td>
|
||||||
<td align=center> {$nation['dex0']} </td>
|
<td align=right> {$nation['dex1']} </td>
|
||||||
<td align=center> {$nation['dex10']} </td>
|
<td align=right> {$nation['dex2']} </td>
|
||||||
<td align=center> {$nation['dex20']} </td>
|
<td align=right> {$nation['dex3']} </td>
|
||||||
<td align=center> {$nation['dex30']} </td>
|
<td align=right> {$nation['dex4']} </td>
|
||||||
<td align=center> {$nation['dex40']} </td>
|
<td align=right> {$nation['dex5']} </td>
|
||||||
<td align=center> {$gen['crew']}/{$gen['leader']}00 </td>
|
<td align=right> {$gen['crew']}/{$gen['leadership']}00 </td>
|
||||||
<td align=center> {$city['pop']}/{$city['pop2']} </td>
|
<td align=center> {$city['pop']}/{$city['pop_max']} </td>
|
||||||
<td align=center> {$city['rate']}% </td>
|
<td align=center> " . sprintf('%.1f', $city['pop'] / Util::valueFit($city['pop_max'], 1) * 100) . "% </td>
|
||||||
<td align=center> {$city['agri']}% </td>
|
<td align=center> {$city['agri']}% </td>
|
||||||
<td align=center> {$city['comm']}% </td>
|
<td align=center> {$city['comm']}% </td>
|
||||||
<td align=center> {$city['secu']}% </td>
|
<td align=center> {$city['secu']}% </td>
|
||||||
<td align=center> {$city['wall']}% </td>
|
<td align=center> {$city['wall']}% </td>
|
||||||
<td align=center> {$city['def']}% </td>
|
<td align=center> {$city['def']}% </td>
|
||||||
<td align=center style=background-color:{$nation['color']};color:".newColor($nation['color']).";>{$nation['name']}</td>
|
<td align=center style=background-color:{$nation['color']};color:" . newColor($nation['color']) . ";>{$nation['name']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=getSabotageLogRecent(20)?></td></tr>
|
<tr>
|
||||||
</table>
|
<td><?= getSabotageLogRecent(20) ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<table align=center width=1760 class="tb_layout bg0">
|
<table align=center width=1760 class="tb_layout bg0">
|
||||||
<tr id=bg1>
|
<tr class='bg1'>
|
||||||
<td width=30 align=center>년</td>
|
<td width=30 align=center>년</td>
|
||||||
<td width=30 align=center>월</td>
|
<td width=30 align=center>월</td>
|
||||||
<td width=50 align=center>국가수</td>
|
<td width=50 align=center>국가수</td>
|
||||||
<td width=50 align=center>장수수</td>
|
<td width=50 align=center>장수수</td>
|
||||||
<?php
|
<?php
|
||||||
switch($type2) {
|
switch ($type2) {
|
||||||
default:
|
default:
|
||||||
case 0: echo "<td width=1600>국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)</td>"; break;
|
case 0:
|
||||||
case 1: echo "<td width=1600>국가별성향</td>"; break;
|
echo "<td width=1600>국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)</td>";
|
||||||
case 2: echo "<td width=1600>국가성향</td>"; break;
|
break;
|
||||||
case 3: echo "<td width=1600>장수성격</td>"; break;
|
case 1:
|
||||||
case 4: echo "<td width=1600>장수특기</td>"; break;
|
echo "<td width=1600>국가별성향</td>";
|
||||||
case 5: echo "<td width=1600>병종수</td>"; break;
|
break;
|
||||||
case 6: echo "<td width=1600>기타</td>"; break;
|
case 2:
|
||||||
}
|
echo "<td width=1600>국가성향</td>";
|
||||||
?>
|
break;
|
||||||
|
case 3:
|
||||||
|
echo "<td width=1600>장수성격</td>";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
echo "<td width=1600>장수특기</td>";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
echo "<td width=1600>병종수</td>";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
echo "<td width=1600>기타</td>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$query = "select * from statistic where month=1 or no=1";
|
foreach ($db->query('SELECT * from statistic where month=1 or no=1') as $stat) {
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$count = MYDB_num_rows($result);
|
|
||||||
for($i=0; $i < $count; $i++) {
|
|
||||||
$stat = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center>{$stat['year']}</td>
|
<td align=center>{$stat['year']}</td>
|
||||||
@@ -299,27 +320,46 @@ for($i=0; $i < $count; $i++) {
|
|||||||
<td align=center>{$stat['nation_count']}</td>
|
<td align=center>{$stat['nation_count']}</td>
|
||||||
<td align=center>{$stat['gen_count']}</td>
|
<td align=center>{$stat['gen_count']}</td>
|
||||||
";
|
";
|
||||||
switch($type2) {
|
switch ($type2) {
|
||||||
default:
|
default:
|
||||||
case 0: echo "<td>{$stat['power_hist']}</td>"; break;
|
case 0:
|
||||||
case 1: echo "<td>{$stat['nation_name']}</td>"; break;
|
echo "<td>{$stat['power_hist']}</td>";
|
||||||
case 2: echo "<td>{$stat['nation_hist']}</td>"; break;
|
break;
|
||||||
case 3: echo "<td>{$stat['personal_hist']}</td>"; break;
|
case 1:
|
||||||
case 4: echo "<td>{$stat['special_hist']}</td>"; break;
|
echo "<td>{$stat['nation_name']}</td>";
|
||||||
case 5: echo "<td>{$stat['crewtype']}</td>"; break;
|
break;
|
||||||
case 6: echo "<td>{$stat['etc']}</td>"; break;
|
case 2:
|
||||||
|
echo "<td>{$stat['nation_hist']}</td>";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
echo "<td>{$stat['personal_hist']}</td>";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
echo "<td>{$stat['special_hist']}</td>";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
echo "<td>{$stat['crewtype']}</td>";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
echo "<td>{$stat['etc']}</td>";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<td><?= closeButton() ?></td>
|
||||||
</table>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= banner() ?> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,42 +1,49 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getPost('btn');
|
||||||
$nation = Util::getReq('nation', 'int');
|
$nation = Util::getPost('nation', 'int');
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
header('location:_admin5.php');
|
header('location:_admin5.php');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
switch($btn) {
|
switch ($btn) {
|
||||||
case "국가변경":
|
case "국가변경":
|
||||||
if($nation == 0) {
|
$oldNation = $db->queryFirstField('SELECT nation FROM general WHERE owner=%i', $userID);
|
||||||
|
if ($nation == 0) {
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'nation'=>0,
|
'nation' => 0,
|
||||||
'level'=>0,
|
'officer_level' => 0,
|
||||||
|
'officer_city' => 0
|
||||||
], 'owner=%i', $userID);
|
], 'owner=%i', $userID);
|
||||||
} else {
|
} else {
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
'nation'=>$nation,
|
'nation' => $nation,
|
||||||
'level'=>1,
|
'officer_level' => 1,
|
||||||
|
'officer_city' => 0
|
||||||
], 'owner=%i', $userID);
|
], 'owner=%i', $userID);
|
||||||
|
$db->update('nation', [
|
||||||
|
'gennum' => $db->sqleval('gennum + 1')
|
||||||
|
], 'nation=%i', $oldNation);
|
||||||
|
}
|
||||||
|
if ($oldNation != 0) {
|
||||||
|
$db->update('nation', [
|
||||||
|
'gennum' => $db->sqleval('gennum - 1')
|
||||||
|
], 'nation=%i', $oldNation);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
header('location:_admin5.php');
|
header('location:_admin5.php');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,111 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace sammo;
|
|
||||||
|
|
||||||
include "lib.php";
|
|
||||||
include "func.php";
|
|
||||||
|
|
||||||
$type = Util::getReq('type', 'int', 0);
|
|
||||||
if($type < 0 || $type > 4){
|
|
||||||
$type = 0;
|
|
||||||
}
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
//로그인 검사
|
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>관리메뉴</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
관리자가 아닙니다.<br>
|
|
||||||
<?=banner()?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
$db = DB::db();
|
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
$sel[$type] = "selected";
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>접속정보</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
|
||||||
<tr><td>접 속 정 보<br><?=closeButton()?></td></tr>
|
|
||||||
<tr><td><form name=form1 method=post>정렬순서 :
|
|
||||||
<select name=type size=1>
|
|
||||||
<option <?=$sel[0]??''?> value=0>접속률</option>
|
|
||||||
<option <?=$sel[1]??''?> value=1>총갱신</option>
|
|
||||||
<option <?=$sel[2]??''?> value=2>갱신/턴</option>
|
|
||||||
<option <?=$sel[3]??''?> value=3>총로그인</option>
|
|
||||||
<option <?=$sel[4]??''?> value=4>갱신/로그인</option>
|
|
||||||
</select>
|
|
||||||
<input type=submit value='정렬하기'></form>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
<table align=center class='tb_layout bg0'>
|
|
||||||
<tr id=bg1>
|
|
||||||
<td align=center width=120>장수명</td>
|
|
||||||
<td align=center width=50>접속률</td>
|
|
||||||
<td align=center width=40>시작연령</td>
|
|
||||||
<td align=center width=40>연령</td>
|
|
||||||
<td align=center width=80>총갱신</td>
|
|
||||||
<td align=center width=80>갱신/턴</td>
|
|
||||||
<td align=center width=80>총로그인</td>
|
|
||||||
<td align=center width=100>갱신/로그인</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
switch($type) {
|
|
||||||
case 0: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by connect desc limit 0,30"; break;
|
|
||||||
case 1: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by refcnt desc limit 0,30"; break;
|
|
||||||
case 2: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by ref desc limit 0,30"; break;
|
|
||||||
case 3: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by logcnt desc limit 0,30"; break;
|
|
||||||
case 4: $query = "select name,connect,startage,age,refcnt,logcnt,refcnt/(age-startage+1)/12 as ref,refcnt/logcnt as log from general order by log desc limit 0,30"; break;
|
|
||||||
}
|
|
||||||
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gencount = MYDB_num_rows($genresult);
|
|
||||||
|
|
||||||
for($i=0; $i < $gencount; $i++) {
|
|
||||||
$gen = MYDB_fetch_array($genresult);
|
|
||||||
echo "
|
|
||||||
<tr>
|
|
||||||
<td align=center>{$gen['name']}</td>
|
|
||||||
<td align=center>{$gen['connect']}</td>
|
|
||||||
<td align=center>{$gen['startage']}</td>
|
|
||||||
<td align=center>{$gen['age']}</td>
|
|
||||||
<td align=center>".round($gen['refcnt']/2, 1)."</td>
|
|
||||||
<td align=center>".round($gen['ref']/2,1)."</td>
|
|
||||||
<td align=center>{$gen['logcnt']}</td>
|
|
||||||
<td align=center>".round($gen['log']/2,1)."</td>
|
|
||||||
</tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
</table>
|
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
|
||||||
<tr><td><?=banner()?> </td></tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,147 +1,179 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getPost('btn');
|
||||||
$gen = Util::getReq('gen', 'int', 0);
|
$gen = Util::getPost('gen', 'int', 0);
|
||||||
$type = Util::getReq('type', 'int', 0);
|
$reqQueryType = Util::getPost('query_type', 'string', null);
|
||||||
|
|
||||||
if($type < 0 || $type > 3){
|
// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp
|
||||||
$type = 0;
|
$queryMap = [
|
||||||
|
'turntime' => ['최근턴', 0, function ($lhs, $rhs) {
|
||||||
|
return - ($lhs['turntime'] <=> $rhs['turntime']);
|
||||||
|
}],
|
||||||
|
'recent_war' => ['최근전투', 1, function ($lhs, $rhs) {
|
||||||
|
return - ($lhs['recent_war'] <=> $rhs['recent_war']);
|
||||||
|
}],
|
||||||
|
'name' => ['장수명', 0, function ($lhs, $rhs) {
|
||||||
|
if ($lhs['npc'] !== $rhs['npc']) {
|
||||||
|
return $lhs['npc'] <=> $rhs['npc'];
|
||||||
|
}
|
||||||
|
return $lhs['name'] <=> $rhs['name'];
|
||||||
|
}],
|
||||||
|
'warnum' => ['전투수', 2, function ($lhs, $rhs) {
|
||||||
|
return - ($lhs['warnum'] <=> $rhs['warnum']);
|
||||||
|
}]
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) {
|
||||||
|
$reqQueryType = Util::array_first_key($queryMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
extractMissingPostToGlobals();
|
|
||||||
|
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
if($session->userGrade < 5) {
|
if ($session->userGrade < 5) {
|
||||||
?>
|
die(requireAdminPermissionHTML());
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>관리메뉴</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=1024" />
|
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
관리자가 아닙니다.<br>
|
|
||||||
<?=banner()?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
|
||||||
|
|
||||||
if($btn == '정렬하기') {
|
if ($btn == '정렬하기') {
|
||||||
$gen = 0;
|
$gen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sel[$type] = "selected";
|
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
|
||||||
|
if ($reqArgType === 0) {
|
||||||
|
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime FROM general');
|
||||||
|
} else if ($reqArgType === 1) {
|
||||||
|
$generalBasicList = $db->query('SELECT no, name, nation, npc, turntime, %b FROM general', $reqQueryType);
|
||||||
|
} else if ($reqArgType === 2) {
|
||||||
|
$generalBasicList = $db->query(
|
||||||
|
'SELECT no, name, nation, npc, turntime, value as %b
|
||||||
|
FROM general LEFT JOIN rank_data
|
||||||
|
ON general.no = rank_data.general_id
|
||||||
|
WHERE rank_data.type = %s',
|
||||||
|
$reqQueryType,
|
||||||
|
$reqQueryType
|
||||||
|
);
|
||||||
|
} else if ($reqArgType === 3) {
|
||||||
|
$generalBasicList = array_map(function ($arr) {
|
||||||
|
$arr['aux'] = Json::decode($arr['aux']);
|
||||||
|
return $arr;
|
||||||
|
}, $db->query('SELECT no, name, nation, npc, turntime, aux FROM general'));
|
||||||
|
} else {
|
||||||
|
throw new \sammo\MustNotBeReachedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
usort($generalBasicList, $comp);
|
||||||
|
|
||||||
|
if (!$gen) {
|
||||||
|
$gen = $generalBasicList[0]['no'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$generalObj = General::createGeneralObjFromDB($gen);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>로그정보</title>
|
<title>로그정보</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?= WebUtil::printDist('ts', 'common', true) ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td>로 그 정 보<br><?=closeButton()?></td></tr>
|
<tr>
|
||||||
<tr><td>
|
<td>로 그 정 보<br><?= closeButton() ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<form name=form1 method=post>
|
<form name=form1 method=post>
|
||||||
정렬순서 :
|
정렬순서 :
|
||||||
<select name=type size=1>
|
<select name='query_type' size=1>
|
||||||
<option <?=$sel[0]??''?> value=0>최근턴</option>
|
<?php foreach ($queryMap as $queryType => [$queryTypeText,]) : ?>
|
||||||
<option <?=$sel[1]??''?> value=1>최근전투</option>
|
<option <?= $queryType == $reqQueryType ? 'selected' : '' ?> value='<?= $queryType ?>'><?= $queryTypeText ?></option>
|
||||||
<option <?=$sel[2]??''?> value=2>장수명</option>
|
<?php endforeach; ?>
|
||||||
<option <?=$sel[3]??''?> value=3>전투수</option>
|
|
||||||
</select>
|
</select>
|
||||||
<input type=submit name=btn value='정렬하기'>
|
<input type=submit name=btn value='정렬하기'>
|
||||||
대상장수 :
|
대상장수 :
|
||||||
<select name=gen size=1>
|
<select name=gen size=1>
|
||||||
<?php
|
<?php foreach ($generalBasicList as $general) : ?>
|
||||||
switch($type) {
|
<option <?= $gen == $general['no'] ? 'selected' : '' ?> value='<?= $general['no'] ?>'><?= $general['name'] ?> (<?= substr($general['turntime'], 14, 5) ?>)</option>
|
||||||
case 0: $query = "select no,name from general order by turntime desc"; break;
|
<?php endforeach; ?>
|
||||||
case 1: $query = "select no,name from general order by recwar desc"; break;
|
|
||||||
case 2: $query = "select no,name from general order by npc,binary(name)"; break;
|
|
||||||
case 3: $query = "select no,name from general order by warnum desc"; break;
|
|
||||||
}
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$gencount = MYDB_num_rows($result);
|
|
||||||
|
|
||||||
for($i=0; $i < $gencount; $i++) {
|
|
||||||
$general = MYDB_fetch_array($result);
|
|
||||||
// 선택 없으면 맨 처음 장수
|
|
||||||
if($gen == 0) {
|
|
||||||
$gen = $general['no'];
|
|
||||||
}
|
|
||||||
if($gen == $general['no']) {
|
|
||||||
echo "
|
|
||||||
<option selected value={$general['no']}>{$general['name']}</option>";
|
|
||||||
} else {
|
|
||||||
echo "
|
|
||||||
<option value={$general['no']}>{$general['name']}</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
||||||
<input type=submit name=btn value='조회하기'>
|
<input type=submit name=btn value='조회하기'>
|
||||||
</form>
|
</form>
|
||||||
</td></tr>
|
</td>
|
||||||
</table>
|
</tr>
|
||||||
<table width=1000 align=center class='tb_layout bg0'>
|
</table>
|
||||||
|
<table width=1000 align=center class='tb_layout bg0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=50% align=center id=bg1><font color=skyblue size=3>장 수 정 보</font></td>
|
<td width=50% align=center class='bg1'>
|
||||||
<td width=50% align=center id=bg1><font color=orange size=3>-</font></td>
|
<font color=skyblue size=3>장 수 정 보</font>
|
||||||
|
</td>
|
||||||
|
<td width=50% align=center class='bg1'>
|
||||||
|
<font color=orange size=3>-</font>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign=top>
|
<td valign=top>
|
||||||
<?php generalInfo($gen); generalInfo2($gen); ?>
|
<?php generalInfo($generalObj);
|
||||||
|
generalInfo2($generalObj); ?>
|
||||||
</td>
|
</td>
|
||||||
<td valign=top>
|
<td valign=top>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><font color=skyblue size=3>개인 기록</font></td>
|
<td align=center class='bg1'>
|
||||||
<td align=center id=bg1><font color=orange size=3>전투 기록</font></td>
|
<font color=skyblue size=3>개인 기록</font>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign=top>
|
|
||||||
<?=getGenLogRecent($gen, 24)?>
|
|
||||||
</td>
|
</td>
|
||||||
<td valign=top>
|
<td align=center class='bg1'>
|
||||||
<?=getBatLogRecent($gen, 24)?>
|
<font color=orange size=3>전투 기록</font>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center id=bg1><font color=skyblue size=3>장수 열전</font></td>
|
<td valign=top>
|
||||||
<td align=center id=bg1><font color=orange size=3>전투 결과</font></td>
|
<?= formatHistoryToHTML(getGeneralActionLogRecent($gen, 24)) ?>
|
||||||
|
</td>
|
||||||
|
<td valign=top>
|
||||||
|
<?= formatHistoryToHTML(getBattleDetailLogRecent($gen, 24)) ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center class='bg1'>
|
||||||
|
<font color=skyblue size=3>장수 열전</font>
|
||||||
|
</td>
|
||||||
|
<td align=center class='bg1'>
|
||||||
|
<font color=orange size=3>전투 결과</font>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign=top>
|
<td valign=top>
|
||||||
<?=getGeneralHistoryAll($gen)?>
|
<?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?>
|
||||||
</td>
|
</td>
|
||||||
<td valign=top>
|
<td valign=top>
|
||||||
<?=getBatResRecent($gen, 24)?>
|
<?= formatHistoryToHTML(getBattleResultRecent($gen, 24)) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=closeButton()?></td></tr>
|
<tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<td><?= closeButton() ?></td>
|
||||||
</table>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= banner() ?> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||