Compare commits
686 Commits
v0.3.1
...
v0.5.0-rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87b56ec111 | ||
|
|
74abc499d8 | ||
|
|
7c04602cc7 | ||
|
|
daed799fa7 | ||
|
|
65e192efc3 | ||
|
|
e1c700878a | ||
|
|
81a0c62308 | ||
|
|
470538ac91 | ||
|
|
c6e7d621f0 | ||
|
|
99ca1ecf8c | ||
|
|
4a0398923f | ||
|
|
6c5f09e1f9 | ||
|
|
4aea8817df | ||
|
|
b4929e1b45 | ||
|
|
a56907862c | ||
|
|
24db3fbdc9 | ||
|
|
9cf30dc77b | ||
|
|
b42c80b464 | ||
|
|
8dd310cee2 | ||
|
|
4d1e6100db | ||
|
|
dc5eb9e815 | ||
|
|
e1b5efcd79 | ||
|
|
644c64aa4b | ||
|
|
3c706c8009 | ||
|
|
7234050447 | ||
|
|
6a7ceee75f | ||
|
|
7d64784dc4 | ||
|
|
21b7f08e18 | ||
|
|
47fc2eb20d | ||
|
|
fc5cabedd0 | ||
|
|
b60abba6e4 | ||
|
|
5371a02653 | ||
|
|
a6da1ded25 | ||
|
|
4e5f4df29a | ||
|
|
2b74da9d30 | ||
|
|
924d4bd01f | ||
|
|
a8173b045d | ||
|
|
71e6ff1b79 | ||
|
|
2bd77fd2ce | ||
|
|
aee5fb7a98 | ||
|
|
733f17d59a | ||
|
|
785bc08d7f | ||
|
|
7cb5045dff | ||
|
|
2b0954951d | ||
|
|
ad1e0c91ec | ||
|
|
9cf30bf5fd | ||
|
|
a22c152bd7 | ||
|
|
ec1faad4ab | ||
|
|
35991b7448 | ||
|
|
89cb797250 | ||
|
|
26ab4a950d | ||
|
|
31273a31b7 | ||
|
|
c83952ad00 | ||
|
|
31cf89d874 | ||
|
|
b494e9e1b0 | ||
|
|
fdd248b7d5 | ||
|
|
580bff4643 | ||
|
|
f1c19023e8 | ||
|
|
927b96219c | ||
|
|
2673bada6a | ||
|
|
a026ebf094 | ||
|
|
d830c5006c | ||
|
|
d74138837e | ||
|
|
413875b697 | ||
|
|
a068d6e1c6 | ||
|
|
25f543d3ad | ||
|
|
38bc02c07e | ||
|
|
2921a07f29 | ||
|
|
0c8e6d0e60 | ||
|
|
ac7fda0e5a | ||
|
|
e66aa2e988 | ||
|
|
aa0fa5a18d | ||
|
|
68976883cc | ||
|
|
d7bc382331 | ||
|
|
b38ef8fab0 | ||
|
|
bdca96c460 | ||
|
|
8dd2d88ff2 | ||
|
|
280d97c40c | ||
|
|
771e8e7db3 | ||
|
|
ef4235bbdc | ||
|
|
513147c18a | ||
|
|
65c263c7d8 | ||
|
|
32726af9c6 | ||
|
|
b72dca6536 | ||
|
|
0a52cdfe6b | ||
|
|
bdace3159f | ||
|
|
cd69c2fd71 | ||
|
|
658ab485aa | ||
|
|
0632551c65 | ||
|
|
5b385822dc | ||
|
|
5aefdd2302 | ||
|
|
b691b1a382 | ||
|
|
d029067849 | ||
|
|
162c47ef60 | ||
|
|
8b626251c1 | ||
|
|
6aee11ef6f | ||
|
|
1c9774a659 | ||
|
|
f3f75fb1d4 | ||
|
|
b320ef8818 | ||
|
|
33a2c5e403 | ||
|
|
dc4245ca11 | ||
|
|
4b4f597d3e | ||
|
|
2a3b4a8e3b | ||
|
|
8f6e8d9004 | ||
|
|
0a4a58cddc | ||
|
|
c025d1b5fd | ||
|
|
5cc65cac6e | ||
|
|
e9a320e528 | ||
|
|
7500a179c0 | ||
|
|
8bf3aed9a7 | ||
|
|
612a65d2e6 | ||
|
|
0cb3c9c1f8 | ||
|
|
61c9a76c73 | ||
|
|
93d0f9b3b8 | ||
|
|
4e59d386dc | ||
|
|
118fc0b0cc | ||
|
|
4f39b76573 | ||
|
|
80ba6314ee | ||
|
|
6f1a0b0aef | ||
|
|
3255b8c4c6 | ||
|
|
4bd7f4fd39 | ||
|
|
8e3fa71a2d | ||
|
|
8b161927da | ||
|
|
b0eee23ef2 | ||
|
|
09dc403b0e | ||
|
|
6754cfe73b | ||
|
|
59e8d9b4cf | ||
|
|
d11d033360 | ||
|
|
8cad06f702 | ||
|
|
f0118c0848 | ||
|
|
33dbbd0d62 | ||
|
|
72fd0fcc9b | ||
|
|
43b5571315 | ||
|
|
29756e1e8c | ||
|
|
1d777550ed | ||
|
|
4779d3ae0c | ||
|
|
68880fc4be | ||
|
|
da0cfdb1dc | ||
|
|
5edb95fc6b | ||
|
|
27f9707058 | ||
|
|
cb3c083d8b | ||
|
|
3a36f7da2f | ||
|
|
3e8451e1e1 | ||
|
|
5f8c46b146 | ||
|
|
9363f8667c | ||
|
|
dcc3601bd7 | ||
|
|
46720dc37b | ||
|
|
691c72d717 | ||
|
|
f66f4e0be0 | ||
|
|
93c3c542e8 | ||
|
|
97b7bca255 | ||
|
|
e0ac86ac1f | ||
|
|
310af37d67 | ||
|
|
e29efe8935 | ||
|
|
63a34e7018 | ||
|
|
ddeefd5bf3 | ||
|
|
630a5badf8 | ||
|
|
f5520d3087 | ||
|
|
e547a5d2b9 | ||
|
|
ffd32a803f | ||
|
|
63337c1d26 | ||
|
|
2e824f0c80 | ||
|
|
339bc34f9b | ||
|
|
41db5d0024 | ||
|
|
d3027acd37 | ||
|
|
10c09927e2 | ||
|
|
014e7e4cbe | ||
|
|
884de2b4f2 | ||
|
|
a5a836450e | ||
|
|
da2e3add9d | ||
|
|
e9a505f273 | ||
|
|
8ec4a8e2bb | ||
|
|
a02bd5ab52 | ||
|
|
df43e07057 | ||
|
|
d17cd78605 | ||
|
|
fe6caf094b | ||
|
|
84969180e2 | ||
|
|
7008745395 | ||
|
|
34d5f05821 | ||
|
|
b96038c049 | ||
|
|
0d21df347b | ||
|
|
f865149d35 | ||
|
|
5898428fb9 | ||
|
|
792b05dfdf | ||
|
|
08b6274131 | ||
|
|
d8db1c9019 | ||
|
|
f089c552e0 | ||
|
|
61978088fc | ||
|
|
a9d7095354 | ||
|
|
353fd792a4 | ||
|
|
e7d535e0c0 | ||
|
|
dc756991ae | ||
|
|
7529cfb892 | ||
|
|
08485b0381 | ||
|
|
1283c41283 | ||
|
|
774809a3a8 | ||
|
|
5a0227a339 | ||
|
|
3cb0e8fc2d | ||
|
|
7026c2ca88 | ||
|
|
ed5d57d474 | ||
|
|
61ead7dc66 | ||
|
|
1bb185c8f0 | ||
|
|
0ea5a5b7d6 | ||
|
|
9f8533b96c | ||
|
|
4fd8add19c | ||
|
|
cf8926952a | ||
|
|
47fe8913c4 | ||
|
|
bdd07ec31e | ||
|
|
4fbbb6aa79 | ||
|
|
57193181d1 | ||
|
|
cbbeb394c1 | ||
|
|
1174b8f7ca | ||
|
|
cca9390555 | ||
|
|
b9531ce684 | ||
|
|
e0decdf55e | ||
|
|
f5691e6d7f | ||
|
|
b979e37ad6 | ||
|
|
41f254af74 | ||
|
|
d95a8e8975 | ||
|
|
28f58ee5f3 | ||
|
|
df4f8dda60 | ||
|
|
4441075f49 | ||
|
|
56f9b5b6e6 | ||
|
|
f686b1e75b | ||
|
|
7e88d246c0 | ||
|
|
80aadb2717 | ||
|
|
0cc4fffd08 | ||
|
|
4ba47045b2 | ||
|
|
a6dceb2e64 | ||
|
|
eea5803ae5 | ||
|
|
e06a5ad44f | ||
|
|
f8f36dac09 | ||
|
|
4c300bf432 | ||
|
|
2d545aafa5 | ||
|
|
8d384c7c5c | ||
|
|
790ea6ff63 | ||
|
|
bc15b48ea2 | ||
|
|
3319f9c3b3 | ||
|
|
18f92f7b54 | ||
|
|
b5cf3709c2 | ||
|
|
df8c1984ca | ||
|
|
c32ab5648c | ||
|
|
6a5b4fe40c | ||
|
|
0ee0a5840b | ||
|
|
6f883d1417 | ||
|
|
8e974111ba | ||
|
|
45ee875646 | ||
|
|
1877340cd3 | ||
|
|
bcebec10bc | ||
|
|
dfbe15319c | ||
|
|
33764f645b | ||
|
|
b20ea4dea1 | ||
|
|
e53c623759 | ||
|
|
2c12a99020 | ||
|
|
a4105d22dc | ||
|
|
c7a058e575 | ||
|
|
b603c31398 | ||
|
|
f650e52f6a | ||
|
|
07ea4a1b4f | ||
|
|
a5ae5b3e26 | ||
|
|
adf9e057b4 | ||
|
|
c432f89424 | ||
|
|
410654b766 | ||
|
|
9e49064847 | ||
|
|
f8239f4e8a | ||
|
|
b3b16f8fbd | ||
|
|
939f5fa621 | ||
|
|
d17d0ec16f | ||
|
|
f1ebe01e5e | ||
|
|
1949dae8d4 | ||
|
|
7c6d36fde1 | ||
|
|
5fd8ff003b | ||
|
|
abb5290baa | ||
|
|
fd7dd9c3b4 | ||
|
|
4a4c787de2 | ||
|
|
6fb4525754 | ||
|
|
001609982d | ||
|
|
9353e4852c | ||
|
|
eb29baef4b | ||
|
|
031d20199e | ||
|
|
adf0b7b68b | ||
|
|
7296302af2 | ||
|
|
f040df785d | ||
|
|
5639bd1274 | ||
|
|
babfcbddd8 | ||
|
|
0c9b1f5338 | ||
|
|
81d333243d | ||
|
|
47a7e76a4d | ||
|
|
4391bf4eb8 | ||
|
|
aba7d02cfe | ||
|
|
6f5c0a2816 | ||
|
|
e8571454d9 | ||
|
|
7930fec5d7 | ||
|
|
37a2858d5f | ||
|
|
e88c9a760d | ||
|
|
172a80fa5d | ||
|
|
3e965d0cfb | ||
|
|
72aeb723a5 | ||
|
|
507a7fd243 | ||
|
|
184cd00a8b | ||
|
|
9c81584b02 | ||
|
|
5bc8a363b9 | ||
|
|
f1169b9c7e | ||
|
|
f2268c7f58 | ||
|
|
d33dd3e0fc | ||
|
|
8cac183af6 | ||
|
|
570ac81848 | ||
|
|
5719e9f134 | ||
|
|
891fa7b7d5 | ||
|
|
54f110f7c6 | ||
|
|
dcfb9f3903 | ||
|
|
2482dc963a | ||
|
|
6d57b1081a | ||
|
|
8dd732631a | ||
|
|
1fe70568cb | ||
|
|
bd254fd261 | ||
|
|
fad579c4d3 | ||
|
|
e8c53d71aa | ||
|
|
e0049cf07b | ||
|
|
881b05aeb1 | ||
|
|
cfd9ab98c6 | ||
|
|
dd1d4246fe | ||
|
|
2668f6b80c | ||
|
|
a388d199dc | ||
|
|
d9f3d492dc | ||
|
|
a14ca3d1f5 | ||
|
|
7d9fc83dc9 | ||
|
|
f97c7c3f7b | ||
|
|
6002067b64 | ||
|
|
7e4d24236a | ||
|
|
b82591a0bc | ||
|
|
e5f7f89ed9 | ||
|
|
a68e888654 | ||
|
|
0c0910ee81 | ||
|
|
ced87edfa5 | ||
|
|
5415ec21dc | ||
|
|
3cb496daa2 | ||
|
|
03e0559afe | ||
|
|
be91ff641c | ||
|
|
cec06493c0 | ||
|
|
0da84a3e8c | ||
|
|
6822d7d099 | ||
|
|
d82746be97 | ||
|
|
3b49c7f262 | ||
|
|
9bc9569a0d | ||
|
|
8771e35f11 | ||
|
|
656e8efa43 | ||
|
|
9fc01eb51f | ||
|
|
e32adb17f2 | ||
|
|
1ffa3211ba | ||
|
|
41cf623bb8 | ||
|
|
8ec97032b1 | ||
|
|
40f34eb3bc | ||
|
|
a4b348488b | ||
|
|
8316a0b25f | ||
|
|
86dde2d6b8 | ||
|
|
84a8db7b75 | ||
|
|
975b6f3572 | ||
|
|
b4224dadfb | ||
|
|
7dcd49c485 | ||
|
|
0c266d4a1f | ||
|
|
a3a70f67b4 | ||
|
|
43e76ecca3 | ||
|
|
241a654f28 | ||
|
|
94e1b86eaf | ||
|
|
4d5353b8d4 | ||
|
|
5ddfb66633 | ||
|
|
41d30d4fd4 | ||
|
|
95548fba54 | ||
|
|
ef4ce31c47 | ||
|
|
f2795f120b | ||
|
|
2ef4b55af4 | ||
|
|
3e4dedf397 | ||
|
|
ebcb86ff3e | ||
|
|
c0defcab9b | ||
|
|
25f6f16718 | ||
|
|
34767cdd13 | ||
|
|
9975d2b483 | ||
|
|
3f77c99544 | ||
|
|
9eab136f53 | ||
|
|
998d993102 | ||
|
|
f27d399dfc | ||
|
|
a117cc8e0c | ||
|
|
2c59a4148d | ||
|
|
dc20ff52d8 | ||
|
|
1764e6e0fe | ||
|
|
e65d2f2a85 | ||
|
|
2d26b24b10 | ||
|
|
990a70e958 | ||
|
|
2868391cf6 | ||
|
|
4050cddd12 | ||
|
|
92cee7b441 | ||
|
|
8e0f6c6e83 | ||
|
|
e7eb1dfbf0 | ||
|
|
f8a0b6c0c6 | ||
|
|
9f7bef9447 | ||
|
|
508674f404 | ||
|
|
25fa1a0e69 | ||
|
|
2453f27284 | ||
|
|
05598d1445 | ||
|
|
c82d99a656 | ||
|
|
619acbed15 | ||
|
|
fef5bb6342 | ||
|
|
4e91e06c64 | ||
|
|
0057c2be84 | ||
|
|
e8e50a3e31 | ||
|
|
769053b76d | ||
|
|
1948c303f2 | ||
|
|
476b15ee9d | ||
|
|
9595e00ae1 | ||
|
|
fdc1f275c5 | ||
|
|
1276dddc37 | ||
|
|
ed62a48ddd | ||
|
|
327c379ff3 | ||
|
|
77472b978d | ||
|
|
e81c08f7f0 | ||
|
|
1e24b3d774 | ||
|
|
a4044eff30 | ||
|
|
31c690ebf8 | ||
|
|
b84f118b4d | ||
|
|
c33783ac81 | ||
|
|
725ba6ff72 | ||
|
|
bf9811bf11 | ||
|
|
e08c430422 | ||
|
|
c72000bfc0 | ||
|
|
a131e468c0 | ||
|
|
d4a16589af | ||
|
|
5e69a453a2 | ||
|
|
23d3425ca4 | ||
|
|
653a1ccd58 | ||
|
|
09105d6e3d | ||
|
|
4d8acecc57 | ||
|
|
8d54028b31 | ||
|
|
415acfce57 | ||
|
|
f25401e9fd | ||
|
|
bcf26cee53 | ||
|
|
161bfb0e91 | ||
|
|
c1e52d7837 | ||
|
|
9cb096046a | ||
|
|
3c32f0533a | ||
|
|
3bf197bb32 | ||
|
|
4dc5c7da18 | ||
|
|
9ad070f40a | ||
|
|
a806714f56 | ||
|
|
bd630e31bc | ||
|
|
6313f24dc9 | ||
|
|
5a5cd23eb2 | ||
|
|
7fda7c1a4a | ||
|
|
ab637c7c13 | ||
|
|
7f497d59bc | ||
|
|
d794d61337 | ||
|
|
9f03854b3c | ||
|
|
17996822d3 | ||
|
|
ee438ad7b2 | ||
|
|
6bf4efbfe6 | ||
|
|
3163563fce | ||
|
|
04cb5f656d | ||
|
|
3863c7497b | ||
|
|
8d4dbd4d82 | ||
|
|
8f4fe1b05b | ||
|
|
7794fa065c | ||
|
|
af92da9a7c | ||
|
|
ba378ea00b | ||
|
|
be8a3479ac | ||
|
|
2002841c61 | ||
|
|
fde5096856 | ||
|
|
08f9874745 | ||
|
|
712ab9e0bc | ||
|
|
e07fc0a2c7 | ||
|
|
61fb68f4cf | ||
|
|
f3296dd443 | ||
|
|
8a8cffc542 | ||
|
|
820ad7c523 | ||
|
|
9f66ce618e | ||
|
|
2318425160 | ||
|
|
a36dfcc144 | ||
|
|
213e3083a1 | ||
|
|
683354da9d | ||
|
|
e208fd8222 | ||
|
|
4fc65c8302 | ||
|
|
bcb54faeaf | ||
|
|
f5753f3fde | ||
|
|
5ff8618c10 | ||
|
|
bee918e810 | ||
|
|
37301ae92b | ||
|
|
bd304d5f27 | ||
|
|
827c69bd7b | ||
|
|
812a225334 | ||
|
|
90c4e7818a | ||
|
|
1299df539e | ||
|
|
20b25e0108 | ||
|
|
e959afb2de | ||
|
|
cb25643741 | ||
|
|
bbfb9e713a | ||
|
|
e71a38fe96 | ||
|
|
120e4e13a6 | ||
|
|
04aa9df45b | ||
|
|
8d60a4379d | ||
|
|
4e96dec474 | ||
|
|
9727356d3b | ||
|
|
c0c0cb8545 | ||
|
|
af646c1999 | ||
|
|
38bb4c7a3a | ||
|
|
573fa2c457 | ||
|
|
d7e7fd58b0 | ||
|
|
f5a234fd26 | ||
|
|
f75c9e0d4a | ||
|
|
5eca92a0ea | ||
|
|
384b7a41a9 | ||
|
|
47e27a7a89 | ||
|
|
ac19621d5b | ||
|
|
cf2e84873c | ||
|
|
c523474980 | ||
|
|
754486673a | ||
|
|
a7110082e7 | ||
|
|
db619e4cda | ||
|
|
34d05f2ac0 | ||
|
|
fdb1dbf397 | ||
|
|
5c2925aeed | ||
|
|
dc5fbbf7eb | ||
|
|
e46844988e | ||
|
|
9d98107f3a | ||
|
|
681176c684 | ||
|
|
5d4757ddf1 | ||
|
|
9731e6811a | ||
|
|
23c86a4fcc | ||
|
|
43ea0136c8 | ||
|
|
2cc8eb1313 | ||
|
|
bfe71900d3 | ||
|
|
c6a6b41193 | ||
|
|
b0f7bef279 | ||
|
|
014f76b2fb | ||
|
|
546928fb79 | ||
|
|
b4ead5a2eb | ||
|
|
124918b744 | ||
|
|
9308ad125a | ||
|
|
7dc43829ab | ||
|
|
63ac985f15 | ||
|
|
93725e481d | ||
|
|
8e976cb2a6 | ||
|
|
58a89374e2 | ||
|
|
313bbca462 | ||
|
|
f0c22370e0 | ||
|
|
00554c218b | ||
|
|
b0222a2d11 | ||
|
|
03ba692f69 | ||
|
|
7147368ce1 | ||
|
|
c938fdd806 | ||
|
|
49d7f8c522 | ||
|
|
6357080f89 | ||
|
|
147c317a46 | ||
|
|
dd1a03f243 | ||
|
|
dfa409bd68 | ||
|
|
c2c0bae3d6 | ||
|
|
56412498f1 | ||
|
|
c720f964bb | ||
|
|
6ac3066dc8 | ||
|
|
63ad39dd2d | ||
|
|
7955a19149 | ||
|
|
a83b50bb97 | ||
|
|
0f50f8d1d9 | ||
|
|
5b95beb153 | ||
|
|
7ad8080f82 | ||
|
|
1972edc38d | ||
|
|
06ea03689b | ||
|
|
22190b90cf | ||
|
|
5bc65a6eb3 | ||
|
|
0b5ded2860 | ||
|
|
48c622d19e | ||
|
|
581fa011e3 | ||
|
|
c816b15bfa | ||
|
|
2bcd5d35c0 | ||
|
|
8229fbacea | ||
|
|
7b230d567e | ||
|
|
344ed6d928 | ||
|
|
94397dedb1 | ||
|
|
04b0807a12 | ||
|
|
757b041f73 | ||
|
|
0137b882c5 | ||
|
|
ee5a54a575 | ||
|
|
0c711b2b0b | ||
|
|
b08d416c51 | ||
|
|
bfda3e7623 | ||
|
|
f152f32952 | ||
|
|
45c7241daf | ||
|
|
cfc32c0b74 | ||
|
|
e4863b6d8d | ||
|
|
8f5d0c3f76 | ||
|
|
38feba1740 | ||
|
|
9973eef488 | ||
|
|
77b906e884 | ||
|
|
962724f0dc | ||
|
|
55440c47cf | ||
|
|
002ffc4b99 | ||
|
|
97952d775c | ||
|
|
a5130d8032 | ||
|
|
5b3f1f847d | ||
|
|
5be62756ed | ||
|
|
be2d0010f7 | ||
|
|
ab5d2c79ec | ||
|
|
1de3dc2f6c | ||
|
|
3413e7694a | ||
|
|
57f58e5e68 | ||
|
|
1a4b2e5f01 | ||
|
|
20490dbd39 | ||
|
|
f3088b5b48 | ||
|
|
40536a0097 | ||
|
|
6c93e99b9b | ||
|
|
00ae0e6963 | ||
|
|
25edef4fb9 | ||
|
|
9f58b1ea07 | ||
|
|
4a9ef92e5d | ||
|
|
2cc961dcdf | ||
|
|
fe383a3485 | ||
|
|
264ae7bac6 | ||
|
|
f6de432bcc | ||
|
|
1ed28ff563 | ||
|
|
23492745f7 | ||
|
|
a56c82928c | ||
|
|
78f5d24a5d | ||
|
|
aeac40e37e | ||
|
|
6b1015e99f | ||
|
|
6d8b856728 | ||
|
|
8c77f1bc8a | ||
|
|
7714b1e83b | ||
|
|
8ad1496eff | ||
|
|
a5683add3a | ||
|
|
3a155a3004 | ||
|
|
67a482cc6f | ||
|
|
fd154fafb3 | ||
|
|
51949fa179 | ||
|
|
614ddf1023 | ||
|
|
401a7db3e9 | ||
|
|
d52c727b92 | ||
|
|
7ff5fb64c3 | ||
|
|
d28a408994 | ||
|
|
541b8cc9e7 | ||
|
|
11f78403dd | ||
|
|
3db63d1761 | ||
|
|
24b00f0a85 | ||
|
|
f711a0214b | ||
|
|
7facc2593e | ||
|
|
bd32f51451 | ||
|
|
3b6c04dad9 | ||
|
|
99f845d746 | ||
|
|
22f39d28e4 | ||
|
|
aa0d8b6026 | ||
|
|
dd008f0895 | ||
|
|
c4dfb75b3a | ||
|
|
b633d82c5e | ||
|
|
08d9d51bea | ||
|
|
e21c12f23d | ||
|
|
101f20095d | ||
|
|
701b5c5a5b | ||
|
|
e92c99fe22 | ||
|
|
893734dff9 | ||
|
|
43babf82b0 | ||
|
|
bd5ce84c65 | ||
|
|
37851bad6f | ||
|
|
13c7be9dc2 | ||
|
|
2433703fa5 | ||
|
|
e320b52b48 | ||
|
|
73b91246e9 | ||
|
|
822cc1aaa5 | ||
|
|
83e62a9bc9 | ||
|
|
4057be32e8 | ||
|
|
764a28a1dd | ||
|
|
5565589ebf | ||
|
|
cd5d23bacc | ||
|
|
b7bc38376f | ||
|
|
3e0de1bfba | ||
|
|
8ddc21e403 | ||
|
|
9cf8ab1efb | ||
|
|
6f254510c1 | ||
|
|
2cd5606d40 | ||
|
|
4f0c05f536 | ||
|
|
24f4f84eb6 | ||
|
|
e94986744d | ||
|
|
7b15c04976 | ||
|
|
b9ff4ef305 | ||
|
|
5d0173f755 | ||
|
|
405f23f660 | ||
|
|
6cefa20ec7 | ||
|
|
20a2f53745 | ||
|
|
bd7fdf7934 | ||
|
|
8042d50d4c |
68
.drone.yml
@@ -8,7 +8,7 @@ pipeline:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -22,15 +22,52 @@ pipeline:
|
||||
when:
|
||||
matrix:
|
||||
TESTS: check-app-compatbility
|
||||
check-app-compatbility-14:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server
|
||||
# Code checker
|
||||
- ./occ app:check-code $APP_NAME -c strong-comparison
|
||||
- ./occ app:check-code $APP_NAME -c deprecation
|
||||
- cd apps/$APP_NAME/
|
||||
when:
|
||||
matrix:
|
||||
TESTS: check-app-compatbility-14
|
||||
check-app-compatbility-13:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=stable13
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server
|
||||
# Code checker
|
||||
- ./occ app:check-code $APP_NAME -c strong-comparison
|
||||
- ./occ app:check-code $APP_NAME -c deprecation
|
||||
- cd apps/$APP_NAME/
|
||||
when:
|
||||
matrix:
|
||||
TESTS: check-app-compatbility-13
|
||||
signed-off-check:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- wget https://raw.githubusercontent.com/nextcloud/server/master/build/signed-off-checker.php
|
||||
- php ./signed-off-checker.php
|
||||
secrets: [ github_token ]
|
||||
when:
|
||||
matrix:
|
||||
TESTS: signed-off-check
|
||||
@@ -50,7 +87,7 @@ pipeline:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- composer install
|
||||
@@ -62,7 +99,7 @@ pipeline:
|
||||
image: nextcloudci/php7.1:php7.1-15
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- composer install
|
||||
@@ -74,7 +111,7 @@ pipeline:
|
||||
image: nextcloudci/php7.2:php7.2-9
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- composer install
|
||||
@@ -97,6 +134,7 @@ pipeline:
|
||||
- cd ../server/
|
||||
- ./occ app:enable $APP_NAME
|
||||
- cd apps/$APP_NAME
|
||||
- composer install
|
||||
- phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml
|
||||
- phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml
|
||||
when:
|
||||
@@ -106,7 +144,7 @@ pipeline:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -116,6 +154,7 @@ pipeline:
|
||||
- php occ app:enable deck
|
||||
- cd apps/$APP_NAME
|
||||
# Run phpunit tests
|
||||
- composer install
|
||||
- phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml
|
||||
- phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml
|
||||
when:
|
||||
@@ -125,7 +164,7 @@ pipeline:
|
||||
image: nextcloudci/php7.1:php7.1-15
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -134,6 +173,7 @@ pipeline:
|
||||
- cd ../server/
|
||||
- php occ app:enable deck
|
||||
- cd apps/$APP_NAME
|
||||
- composer install
|
||||
- phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml
|
||||
- phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml
|
||||
when:
|
||||
@@ -143,7 +183,7 @@ pipeline:
|
||||
image: nextcloudci/php7.2:php7.2-9
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -152,6 +192,7 @@ pipeline:
|
||||
- cd ../server/
|
||||
- php occ app:enable deck
|
||||
- cd apps/$APP_NAME
|
||||
- composer install
|
||||
- phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml
|
||||
- phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml
|
||||
when:
|
||||
@@ -161,7 +202,7 @@ pipeline:
|
||||
image: nextcloudci/integration-php7.0:integration-php7.0-6
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable14
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -185,16 +226,15 @@ pipeline:
|
||||
jsbuild:
|
||||
image: mhart/alpine-node:6.8.0
|
||||
commands:
|
||||
- apk add --no-cache git
|
||||
- cd js
|
||||
- npm install --deps
|
||||
- ./node_modules/.bin/bower --allow-root install
|
||||
- apk add --no-cache make
|
||||
- make build-js
|
||||
when:
|
||||
matrix:
|
||||
TESTS: jsbuild
|
||||
matrix:
|
||||
include:
|
||||
- TESTS: check-app-compatbility
|
||||
- TESTS: check-app-compatbility-13
|
||||
- TESTS: check-app-compatbility-14
|
||||
- TESTS: signed-off-check
|
||||
- TESTS: syntax-php5.6
|
||||
- TESTS: syntax-php7.0
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/js/tests/*
|
||||
/js/vendor/*
|
||||
/js/legacy/*
|
||||
/js/node_modules/*
|
||||
/js/public/*
|
||||
/karma.conf.js
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
root: true
|
||||
|
||||
|
||||
extends:
|
||||
- eslint:recommended
|
||||
|
||||
env:
|
||||
browser: true
|
||||
amd: true
|
||||
es6: true
|
||||
|
||||
globals:
|
||||
global: false
|
||||
app: false
|
||||
angular: false
|
||||
$: false
|
||||
@@ -21,6 +22,10 @@ globals:
|
||||
Clipboard: false
|
||||
oc_defaults: false
|
||||
|
||||
parserOptions:
|
||||
ecmaVersion: 6
|
||||
sourceType: "module"
|
||||
|
||||
rules:
|
||||
curly: error
|
||||
eqeqeq: ["error", "smart"]
|
||||
@@ -29,6 +34,7 @@ rules:
|
||||
no-fallthrough: error
|
||||
no-mixed-spaces-and-tabs: error
|
||||
no-unused-vars: warn
|
||||
no-useless-escape: warn
|
||||
no-use-before-define: error
|
||||
semi: ["error", "always"]
|
||||
indent:
|
||||
|
||||
@@ -1,79 +1,97 @@
|
||||
### Steps to reproduce
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected behaviour
|
||||
Tell us what should happen
|
||||
|
||||
### Actual behaviour
|
||||
Tell us what happens instead
|
||||
|
||||
### Server configuration
|
||||
<!--
|
||||
You can use the Issue Template application to prefill most of the required information: https://apps.nextcloud.com/apps/issuetemplate
|
||||
-->
|
||||
|
||||
**Operating system**:
|
||||
|
||||
**Web server:**
|
||||
|
||||
**Database:**
|
||||
|
||||
**PHP version:**
|
||||
|
||||
**Nextcloud version:** (see Nextcloud admin page)
|
||||
|
||||
**Where did you install Nextcloud from:**
|
||||
|
||||
**Signing status:**
|
||||
|
||||
```
|
||||
Login as admin user into your Nextcloud and access
|
||||
http://example.com/index.php/settings/integrity/failed
|
||||
paste the results here.
|
||||
```
|
||||
|
||||
**List of activated apps:**
|
||||
|
||||
```
|
||||
If you have access to your command line run e.g.:
|
||||
sudo -u www-data php occ app:list
|
||||
from within your Nextcloud installation folder
|
||||
```
|
||||
|
||||
**Nextcloud configuration:**
|
||||
|
||||
```
|
||||
If you have access to your command line run e.g.:
|
||||
sudo -u www-data php occ config:list system
|
||||
from within your Nextcloud installation folder
|
||||
|
||||
or
|
||||
|
||||
Insert your config.php content here
|
||||
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
|
||||
```
|
||||
|
||||
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
|
||||
|
||||
### Client configuration
|
||||
**Browser:**
|
||||
|
||||
**Operating system:**
|
||||
|
||||
### Logs
|
||||
|
||||
#### Nextcloud log (data/nextcloud.log)
|
||||
```
|
||||
Insert your Nextcloud log here
|
||||
```
|
||||
|
||||
#### Browser log
|
||||
```
|
||||
Insert your browser log here, this could for example include:
|
||||
|
||||
a) The javascript console log
|
||||
b) The network log
|
||||
c) ...
|
||||
```
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Client details:**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
- Device: [e.g. iPhone6, desktop]
|
||||
|
||||
<details>
|
||||
<summary>Server details</summary>
|
||||
<!--
|
||||
You can use the Issue Template application to prefill most of the required information: https://apps.nextcloud.com/apps/issuetemplate
|
||||
-->
|
||||
|
||||
**Operating system**:
|
||||
|
||||
**Web server:**
|
||||
|
||||
**Database:**
|
||||
|
||||
**PHP version:**
|
||||
|
||||
**Nextcloud version:** (see Nextcloud admin page)
|
||||
|
||||
**Where did you install Nextcloud from:**
|
||||
|
||||
**Signing status:**
|
||||
|
||||
```
|
||||
Login as admin user into your Nextcloud and access
|
||||
http://example.com/index.php/settings/integrity/failed
|
||||
paste the results here.
|
||||
```
|
||||
|
||||
**List of activated apps:**
|
||||
|
||||
```
|
||||
If you have access to your command line run e.g.:
|
||||
sudo -u www-data php occ app:list
|
||||
from within your Nextcloud installation folder
|
||||
```
|
||||
|
||||
**Nextcloud configuration:**
|
||||
|
||||
```
|
||||
If you have access to your command line run e.g.:
|
||||
sudo -u www-data php occ config:list system
|
||||
from within your Nextcloud installation folder
|
||||
|
||||
or
|
||||
|
||||
Insert your config.php content here
|
||||
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
|
||||
```
|
||||
|
||||
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Logs</summary>
|
||||
|
||||
#### Nextcloud log (data/nextcloud.log)
|
||||
```
|
||||
Insert your Nextcloud log here
|
||||
```
|
||||
|
||||
#### Browser log
|
||||
```
|
||||
Insert your browser log here, this could for example include:
|
||||
|
||||
a) The javascript console log
|
||||
b) The network log
|
||||
c) ...
|
||||
```
|
||||
|
||||
</details>
|
||||
17
.github/ISSUE_TEMPLATE/Feature_request.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
17
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
* Resolves: # <!-- related github issue -->
|
||||
* Target version: master
|
||||
|
||||
### Summary
|
||||
|
||||
|
||||
### TODO
|
||||
|
||||
- [ ] ...
|
||||
|
||||
### Checklist
|
||||
|
||||
- [ ] Code is properly formatted
|
||||
- [ ] Sign-off message is added to all commits
|
||||
- [ ] Tests (unit, integration, api and/or acceptance) are included
|
||||
- [ ] Documentation (manuals or wiki) has been updated or is not required
|
||||
3
.gitignore
vendored
@@ -1,9 +1,10 @@
|
||||
js/node_modules/*
|
||||
js/vendor/
|
||||
js/public/
|
||||
js/package-lock.json
|
||||
js/build/
|
||||
build/
|
||||
css/style.css
|
||||
css/vendor.css
|
||||
tests/integration/vendor/
|
||||
tests/integration/composer.lock
|
||||
vendor/
|
||||
|
||||
@@ -6,7 +6,7 @@ php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
env:
|
||||
- CORE_BRANCH=master DB=mysql
|
||||
- CORE_BRANCH=stable14 DB=mysql
|
||||
|
||||
before_install:
|
||||
- wget https://phar.phpunit.de/phpunit-5.7.phar
|
||||
@@ -24,6 +24,7 @@ before_script:
|
||||
- cd apps/deck
|
||||
|
||||
script:
|
||||
- composer install
|
||||
- make test-unit
|
||||
|
||||
after_success:
|
||||
|
||||
40
CHANGELOG.md
@@ -1,6 +1,46 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 0.5.0 - unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- Activity stream for board and cards
|
||||
- Comments on cards
|
||||
- Use users locale format on date picker
|
||||
- Compact display mode
|
||||
- Card title inline editing
|
||||
- REST API
|
||||
- Empty content view for board lists
|
||||
- Undo for card and stack deletion
|
||||
- Show tag name on board
|
||||
- Notify users about card assignments
|
||||
- Add shortcut to assign a card to yourself
|
||||
- Improved view for printing
|
||||
- Support for Nextcloud 15
|
||||
|
||||
### Fixed
|
||||
|
||||
- Accesibility improvements
|
||||
- Don't allow empty card titles
|
||||
- Improved checkbox handling in markdown
|
||||
|
||||
|
||||
## 0.4.0 - 2018-07-11
|
||||
|
||||
### Added
|
||||
|
||||
- Attach files to cards
|
||||
- Embed attachments into the card description
|
||||
- Color picker to use any color value for board and labels
|
||||
- Support for checkboxes inside the description
|
||||
- occ command to export user data as JSON
|
||||
|
||||
### Fixed
|
||||
|
||||
- Improve frontend data management
|
||||
- Fix bug the user list being empty on some occasions
|
||||
|
||||
## 0.3.0 - 2018-01-12
|
||||
|
||||
### Added
|
||||
|
||||
24
Makefile
@@ -12,26 +12,30 @@ sign_dir=$(build_dir)/sign
|
||||
cert_dir=$(HOME)/.nextcloud/certificates
|
||||
|
||||
|
||||
default: build
|
||||
default: package
|
||||
|
||||
clean-build:
|
||||
rm -rf $(build_dir)
|
||||
|
||||
clean-dist:
|
||||
rm -rf js/node_modules
|
||||
rm -rf js/vendor
|
||||
|
||||
install-deps:
|
||||
cd js && npm install --deps
|
||||
cd js && ./node_modules/.bin/bower install
|
||||
install-deps: install-deps-js
|
||||
composer install
|
||||
|
||||
build: build-js
|
||||
install-deps-js:
|
||||
cd js && npm install
|
||||
|
||||
build-js: install-deps
|
||||
cd js && ./node_modules/.bin/grunt build
|
||||
build: install-deps build-js
|
||||
|
||||
build-js: install-deps-js
|
||||
cd js && npm run build
|
||||
|
||||
build-js-dev: install-deps
|
||||
cd js && npm run dev
|
||||
|
||||
watch:
|
||||
cd js && ./node_modules/.bin/grunt watch
|
||||
cd js && npm run watch
|
||||
|
||||
# appstore: clean install-deps
|
||||
appstore: clean-build build
|
||||
@@ -94,3 +98,5 @@ test-integration:
|
||||
test-js: install-deps
|
||||
cd js && run test
|
||||
|
||||
package:
|
||||
krankerl package
|
||||
|
||||
26
README.md
@@ -1,6 +1,6 @@
|
||||
# Deck
|
||||
|
||||
[](https://travis-ci.org/nextcloud/deck) [](https://codecov.io/github/nextcloud/deck) [](https://scrutinizer-ci.com/g/nextcloud/deck/?branch=master) [](https://www.versioneye.com/user/projects/58ad558f4ca76f004ed475b3) [](https://webchat.freenode.net/?channels=nextcloud-deck)
|
||||
[](https://travis-ci.org/nextcloud/deck) [](https://codecov.io/github/nextcloud/deck) [](https://www.codacy.com/app/juliushaertl/deck?utm_source=github.com&utm_medium=referral&utm_content=nextcloud/deck&utm_campaign=Badge_Grade) [](https://scrutinizer-ci.com/g/nextcloud/deck/?branch=master) [](https://webchat.freenode.net/?channels=nextcloud-deck)
|
||||
|
||||
|
||||
Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.
|
||||
@@ -9,22 +9,17 @@ Deck is a kanban style organization tool aimed at personal planning and project
|
||||
- :page_facing_up: Write down additional notes in markdown
|
||||
- :bookmark: Assign labels for even better organization
|
||||
- :busts_in_silhouette: Share with your team, friends or family
|
||||
- :paperclip: Attach files and embed them in your markdown description
|
||||
- :speech_balloon: Discuss with your team using comments
|
||||
- :zap: Keep track of changes in the activity stream
|
||||
- :rocket: Get your project organized
|
||||
|
||||
|
||||

|
||||
|
||||
### Planned features
|
||||
|
||||
- :file_folder: Attach files directly from your Nextcloud
|
||||
- :earth_africa: Share boards with the public
|
||||
- :calendar: Integration with Nextcloud calendar and other apps
|
||||
- :speech_balloon: Comments integration
|
||||
- :exclamation: Checkout the project milestones for more ...
|
||||

|
||||
|
||||
## Installation/Update
|
||||
|
||||
This app is supposed to work on Nextcloud version 11 or later.
|
||||
This app is supposed to work on the two latest Nextcloud versions.
|
||||
|
||||
### Install latest release
|
||||
|
||||
@@ -38,10 +33,10 @@ If you want to run the latest development version from git source, you need to c
|
||||
git clone https://github.com/nextcloud/deck.git
|
||||
cd deck
|
||||
make install-deps
|
||||
make
|
||||
make build
|
||||
```
|
||||
|
||||
Please make sure you have installed the following dependencies: `make, which, tar, npm, curl`
|
||||
Please make sure you have installed the following dependencies: `make, which, tar, npm, curl, composer`
|
||||
|
||||
### Install the nightly builds
|
||||
|
||||
@@ -55,15 +50,16 @@ Nothing to prepare, just dig into the code.
|
||||
|
||||
### JavaScript
|
||||
|
||||
When `'debug'=>true` is set in your config.php files will get loaded automatically. Otherwise you need to ensure that `public/app.js` is generated by running `make` or `make watch` to regenerate it on every change.
|
||||
Make sure you have installed the dependencies with ```make install-deps```.
|
||||
Deck requires running a `make build-js` to install npm dependencies and build the JavaScript code using webpack. While developing you can also use `make watch` to rebuild everytime the code changes.
|
||||
|
||||
### Running tests
|
||||
You can use the provided Makefile to run all tests by using:
|
||||
|
||||
make test
|
||||
|
||||
### Documentation
|
||||
|
||||
The documentation for our REST API can be found at https://deck.readthedocs.io/en/latest/API/
|
||||
|
||||
## Contribution Guidelines
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
theme: jekyll-theme-cayman
|
||||
site: https://deck-app.com
|
||||
@@ -21,6 +21,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if ((@include_once __DIR__ . '/../vendor/autoload.php')===false) {
|
||||
throw new Exception('Cannot include autoload. Did you run install dependencies using composer?');
|
||||
}
|
||||
|
||||
$app = new \OCA\Deck\AppInfo\Application();
|
||||
$app->registerNavigationEntry();
|
||||
$app->registerNotifications();
|
||||
$app->registerNotifications();
|
||||
$app->registerCommentsEntity();
|
||||
|
||||
/** Load activity style global so it is availabile in the activity app as well */
|
||||
\OC_Util::addStyle('deck', 'activity');
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\AppInfo;
|
||||
@@ -28,4 +28,4 @@ use OCP\AppFramework\App;
|
||||
/**
|
||||
* Additional autoloader registration, e.g. registering composer autoloaders
|
||||
*/
|
||||
// require_once __DIR__ . '/../vendor/autoload.php';
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
<field>
|
||||
<name>last_modified</name>
|
||||
<type>integer</type>
|
||||
<default></default>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
</declaration>
|
||||
</table>
|
||||
<table>
|
||||
@@ -77,6 +84,21 @@
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
</field>
|
||||
<field>
|
||||
<name>deleted_at</name>
|
||||
<type>integer</type>
|
||||
<default>0</default>
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
<field>
|
||||
<name>last_modified</name>
|
||||
<type>integer</type>
|
||||
<default></default>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
<index>
|
||||
<name>deck_stacks_board_id_index</name>
|
||||
<field>
|
||||
@@ -167,6 +189,14 @@
|
||||
<type>boolean</type>
|
||||
<default>false</default>
|
||||
</field>
|
||||
<field>
|
||||
<name>deleted_at</name>
|
||||
<type>integer</type>
|
||||
<default>0</default>
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
<index>
|
||||
<name>deck_cards_stack_id_index</name>
|
||||
<field>
|
||||
@@ -198,12 +228,6 @@
|
||||
<autoincrement>1</autoincrement>
|
||||
<length>4</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>title</name>
|
||||
<type>text</type>
|
||||
<notnull>true</notnull>
|
||||
<length>100</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>card_id</name>
|
||||
<type>integer</type>
|
||||
@@ -218,12 +242,12 @@
|
||||
</field>
|
||||
<field>
|
||||
<name>data</name>
|
||||
<type>clob</type>
|
||||
<type>text</type>
|
||||
</field>
|
||||
<field>
|
||||
<name>last_modified</name>
|
||||
<type>integer</type>
|
||||
<default></default>
|
||||
<default/>
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
@@ -231,7 +255,21 @@
|
||||
<field>
|
||||
<name>created_at</name>
|
||||
<type>integer</type>
|
||||
<default></default>
|
||||
<default/>
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
</field>
|
||||
<field>
|
||||
<name>created_by</name>
|
||||
<type>text</type>
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>deleted_at</name>
|
||||
<type>integer</type>
|
||||
<default>0</default>
|
||||
<length>8</length>
|
||||
<notnull>false</notnull>
|
||||
<unsigned>true</unsigned>
|
||||
|
||||
@@ -11,13 +11,19 @@
|
||||
- 📄 Write down additional notes in markdown
|
||||
- 🔖 Assign labels for even better organization
|
||||
- 👥 Share with your team, friends or family
|
||||
- 📎 Attach files and embed them in your markdown description
|
||||
- 💬 Discuss with your team using comments
|
||||
- ⚡ Keep track of changes in the activity stream
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>0.4.0-alpha1</version>
|
||||
<version>0.5.0-rc2</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<namespace>Deck</namespace>
|
||||
<types>
|
||||
<logging/>
|
||||
</types>
|
||||
<category>organization</category>
|
||||
<category>office</category>
|
||||
<website>https://github.com/nextcloud/deck</website>
|
||||
@@ -26,7 +32,11 @@
|
||||
<screenshot>https://download.bitgrid.net/nextcloud/deck/screenshots/Deck_Board.png</screenshot>
|
||||
<screenshot>https://download.bitgrid.net/nextcloud/deck/screenshots/Deck_Details.png</screenshot>
|
||||
<dependencies>
|
||||
<nextcloud min-version="12" max-version="14" />
|
||||
<php min-version="5.6"/>
|
||||
<database min-version="9.4">pgsql</database>
|
||||
<database>sqlite</database>
|
||||
<database min-version="5.5">mysql</database>
|
||||
<nextcloud min-version="13" max-version="15" />
|
||||
</dependencies>
|
||||
<background-jobs>
|
||||
<job>OCA\Deck\Cron\DeleteCron</job>
|
||||
@@ -37,4 +47,18 @@
|
||||
<step>OCA\Deck\Migration\UnknownUsers</step>
|
||||
</post-migration>
|
||||
</repair-steps>
|
||||
<commands>
|
||||
<command>OCA\Deck\Command\UserExport</command>
|
||||
</commands>
|
||||
<activity>
|
||||
<settings>
|
||||
<setting>OCA\Deck\Activity\Setting</setting>
|
||||
</settings>
|
||||
<filters>
|
||||
<filter>OCA\Deck\Activity\Filter</filter>
|
||||
</filters>
|
||||
<providers>
|
||||
<provider>OCA\Deck\Activity\DeckProvider</provider>
|
||||
</providers>
|
||||
</activity>
|
||||
</info>
|
||||
|
||||
@@ -3,22 +3,23 @@
|
||||
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
* @author Ryan Fletcher <ryan.fletcher@codepassion.ca>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
return [
|
||||
@@ -43,6 +44,7 @@ return [
|
||||
['name' => 'stack#update', 'url' => '/stacks/{stackId}', 'verb' => 'PUT'],
|
||||
['name' => 'stack#reorder', 'url' => '/stacks/{stackId}/reorder', 'verb' => 'PUT'],
|
||||
['name' => 'stack#delete', 'url' => '/stacks/{stackId}', 'verb' => 'DELETE'],
|
||||
['name' => 'stack#deleted', 'url' => '/{boardId}/stacks/deleted', 'verb' => 'GET'],
|
||||
['name' => 'stack#archived', 'url' => '/stacks/{boardId}/archived', 'verb' => 'GET'],
|
||||
|
||||
// cards
|
||||
@@ -50,6 +52,7 @@ return [
|
||||
['name' => 'card#create', 'url' => '/cards', 'verb' => 'POST'],
|
||||
['name' => 'card#update', 'url' => '/cards/{cardId}', 'verb' => 'PUT'],
|
||||
['name' => 'card#delete', 'url' => '/cards/{cardId}', 'verb' => 'DELETE'],
|
||||
['name' => 'card#deleted', 'url' => '/{boardId}/cards/deleted', 'verb' => 'GET'],
|
||||
['name' => 'card#rename', 'url' => '/cards/{cardId}/rename', 'verb' => 'PUT'],
|
||||
['name' => 'card#reorder', 'url' => '/cards/{cardId}/reorder', 'verb' => 'PUT'],
|
||||
['name' => 'card#archive', 'url' => '/cards/{cardId}/archive', 'verb' => 'PUT'],
|
||||
@@ -59,10 +62,58 @@ return [
|
||||
['name' => 'card#assignUser', 'url' => '/cards/{cardId}/assign', 'verb' => 'POST'],
|
||||
['name' => 'card#unassignUser', 'url' => '/cards/{cardId}/assign/{userId}', 'verb' => 'DELETE'],
|
||||
|
||||
['name' => 'attachment#getAll', 'url' => '/cards/{cardId}/attachments', 'verb' => 'GET'],
|
||||
['name' => 'attachment#create', 'url' => '/cards/{cardId}/attachment', 'verb' => 'POST'],
|
||||
['name' => 'attachment#display', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'GET'],
|
||||
['name' => 'attachment#update', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'PUT'],
|
||||
// also allow to use POST for updates so we can properly access files when using application/x-www-form-urlencoded
|
||||
['name' => 'attachment#update', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'POST'],
|
||||
['name' => 'attachment#delete', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'DELETE'],
|
||||
['name' => 'attachment#restore', 'url' => '/cards/{cardId}/attachment/{attachmentId}/restore', 'verb' => 'GET'],
|
||||
|
||||
|
||||
// labels
|
||||
['name' => 'label#create', 'url' => '/labels', 'verb' => 'POST'],
|
||||
['name' => 'label#update', 'url' => '/labels/{labelId}', 'verb' => 'PUT'],
|
||||
['name' => 'label#delete', 'url' => '/labels/{labelId}', 'verb' => 'DELETE'],
|
||||
|
||||
// api
|
||||
['name' => 'board_api#index', 'url' => '/api/v1.0/boards', 'verb' => 'GET'],
|
||||
['name' => 'board_api#get', 'url' => '/api/v1.0/boards/{boardId}', 'verb' => 'GET'],
|
||||
['name' => 'board_api#create', 'url' => '/api/v1.0/boards', 'verb' => 'POST'],
|
||||
['name' => 'board_api#delete', 'url' => '/api/v1.0/boards/{boardId}', 'verb' => 'DELETE'],
|
||||
['name' => 'board_api#update', 'url' => '/api/v1.0/boards/{boardId}', 'verb' => 'PUT'],
|
||||
['name' => 'board_api#undo_delete', 'url' => '/api/v1.0/boards/{boardId}/undo_delete', 'verb' => 'POST'],
|
||||
|
||||
['name' => 'stack_api#index', 'url' => '/api/v1.0/boards/{boardId}/stacks', 'verb' => 'GET'],
|
||||
['name' => 'stack_api#getArchived', 'url' => '/api/v1.0/boards/{boardId}/stacks/archived', 'verb' => 'GET'],
|
||||
['name' => 'stack_api#get', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}', 'verb' => 'GET'],
|
||||
['name' => 'stack_api#create', 'url' => '/api/v1.0/boards/{boardId}/stacks', 'verb' => 'POST'],
|
||||
['name' => 'stack_api#update', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}', 'verb' => 'PUT'],
|
||||
['name' => 'stack_api#delete', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}', 'verb' => 'DELETE'],
|
||||
|
||||
['name' => 'card_api#get', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}', 'verb' => 'GET'],
|
||||
['name' => 'card_api#create', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards', 'verb' => 'POST'],
|
||||
['name' => 'card_api#update', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}', 'verb' => 'PUT'],
|
||||
['name' => 'card_api#assignLabel', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/assignLabel', 'verb' => 'PUT'],
|
||||
['name' => 'card_api#removeLabel', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/removeLabel', 'verb' => 'PUT'],
|
||||
['name' => 'card_api#assignUser', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/assignUser', 'verb' => 'PUT'],
|
||||
['name' => 'card_api#unassignUser', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/unassignUser', 'verb' => 'PUT'],
|
||||
['name' => 'card_api#reorder', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/reorder', 'verb' => 'PUT'],
|
||||
['name' => 'card_api#delete', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}', 'verb' => 'DELETE'],
|
||||
|
||||
['name' => 'label_api#get', 'url' => '/api/v1.0/boards/{boardId}/labels/{labelId}', 'verb' => 'GET'],
|
||||
['name' => 'label_api#create', 'url' => '/api/v1.0/boards/{boardId}/labels', 'verb' => 'POST'],
|
||||
['name' => 'label_api#update', 'url' => '/api/v1.0/boards/{boardId}/labels/{labelId}', 'verb' => 'PUT'],
|
||||
['name' => 'label_api#delete', 'url' => '/api/v1.0/boards/{boardId}/labels/{labelId}', 'verb' => 'DELETE'],
|
||||
|
||||
['name' => 'attachment_api#getAll', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments', 'verb' => 'GET'],
|
||||
['name' => 'attachment_api#display', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}', 'verb' => 'GET'],
|
||||
['name' => 'attachment_api#create', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments', 'verb' => 'POST'],
|
||||
['name' => 'attachment_api#update', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}', 'verb' => 'PUT'],
|
||||
['name' => 'attachment_api#delete', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}', 'verb' => 'DELETE'],
|
||||
['name' => 'attachment_api#restore', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}/restore', 'verb' => 'PUT'],
|
||||
|
||||
['name' => 'board_api#preflighted_cors', 'url' => '/api/v1.0/{path}','verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
|
||||
]
|
||||
];
|
||||
|
||||
@@ -8,9 +8,12 @@
|
||||
"email": "jus@bitgrid.net"
|
||||
}
|
||||
],
|
||||
"require": {},
|
||||
"require": {
|
||||
"cogpowered/finediff": "0.3.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"christophwurst/nextcloud": "^12.0",
|
||||
"jakub-onderka/php-parallel-lint": "^0.9.2"
|
||||
"roave/security-advisories": "dev-master",
|
||||
"christophwurst/nextcloud": "^14.0",
|
||||
"jakub-onderka/php-parallel-lint": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
28
css/activity.css
Normal file
@@ -0,0 +1,28 @@
|
||||
.activitymessage .visualdiff ins {
|
||||
background-color: rgba(70, 186, 97, 0.2);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.activitymessage .visualdiff del {
|
||||
background-color: rgba(233, 50, 45, 0.2);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.activitymessage .visualdiff {
|
||||
overflow: scroll;
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.activityTabView .avatardiv-container {
|
||||
display: inline-block;
|
||||
bottom: -3px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.activityTabView .avatar-name-wrapper {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.activityTabView .activitysubject a {
|
||||
font-weight: bold;
|
||||
}
|
||||
43
css/animations.scss
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Michael Weimann <mail@michael-weimann.eu>
|
||||
*
|
||||
* @author 2018 Michael Weimann <mail@michael-weimann.eu>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
.compact-item.ng-enter,
|
||||
.compact-item.ng-leave {
|
||||
overflow: hidden;
|
||||
transition: all 250ms linear;
|
||||
}
|
||||
|
||||
.compact-item.ng-enter {
|
||||
max-height: 0;
|
||||
|
||||
&.ng-enter-active {
|
||||
max-height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.compact-item.ng-leave {
|
||||
max-height: 50px;
|
||||
|
||||
&.ng-leave-active {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
77
css/autocomplete.scss
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* based upon apps/comments/js/vendor/At.js/dist/css/jquery.atwho.css,
|
||||
* only changed colors and font-weight
|
||||
*/
|
||||
|
||||
.atwho-view {
|
||||
position:absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: none;
|
||||
margin-top: 18px;
|
||||
background: var(--color-main-background);
|
||||
color: var(--color-main-text);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: 0 0 5px var(--color-box-shadow);
|
||||
min-width: 120px;
|
||||
z-index: 11110 !important;
|
||||
}
|
||||
|
||||
.atwho-view .atwho-header {
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
border-bottom: solid 1px var(--color-border);
|
||||
color: var(--color-main-text);
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.atwho-view .atwho-header .small {
|
||||
color: var(--color-main-text);
|
||||
float: right;
|
||||
padding-top: 2px;
|
||||
margin-right: -5px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.atwho-view .atwho-header:hover {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.atwho-view .cur {
|
||||
background: var(--color-primary);
|
||||
color: var(--color-primary-text);
|
||||
}
|
||||
.atwho-view .cur small {
|
||||
color: var(--color-primary-text);
|
||||
}
|
||||
.atwho-view strong {
|
||||
color: var(--color-main-text);
|
||||
font-weight: normal;
|
||||
}
|
||||
.atwho-view .cur strong {
|
||||
color: var(--color-primary-text);
|
||||
font-weight: normal;
|
||||
}
|
||||
.atwho-view ul {
|
||||
/* width: 100px; */
|
||||
list-style:none;
|
||||
padding:0;
|
||||
margin:auto;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.atwho-view ul li {
|
||||
display: block;
|
||||
padding: 5px 10px;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
cursor: pointer;
|
||||
}
|
||||
.atwho-view small {
|
||||
font-size: smaller;
|
||||
color: var(--color-main-text);
|
||||
font-weight: normal;
|
||||
}
|
||||
50
css/comp-13.scss
Normal file
@@ -0,0 +1,50 @@
|
||||
#content-wrapper #content {
|
||||
height: 100%;
|
||||
}
|
||||
#app-content {
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
|
||||
&.details-visible {
|
||||
margin-right: 500px;
|
||||
}
|
||||
}
|
||||
|
||||
#app-sidebar {
|
||||
right: -500px;
|
||||
max-width: 100%;
|
||||
width: 500px;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
z-index: 1000;
|
||||
|
||||
&.details-visible {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#content[class*='app-'] * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body:not(.snapjs-left) {
|
||||
.app-navigation-hide {
|
||||
#app-content {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
#app-navigation {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#commentsTabView .newCommentForm .message {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
padding-right: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#commentsTabView .comment {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
41
css/compact-mode.scss
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Michael Weimann <mail@michael-weimann.eu>
|
||||
*
|
||||
* @author 2018 Michael Weimann <mail@michael-weimann.eu>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
.compact-mode {
|
||||
.card {
|
||||
margin: $compact-board-item-margin;
|
||||
|
||||
&:last-child {
|
||||
margin: $compact-board-last-item-margin;
|
||||
}
|
||||
}
|
||||
|
||||
.stack {
|
||||
.as-sortable-placeholder {
|
||||
margin: $compact-board-item-margin;
|
||||
|
||||
&:last-child {
|
||||
margin: $compact-board-last-item-margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,9 +34,37 @@
|
||||
}
|
||||
|
||||
.icon-home {
|
||||
background-image: url('../../../core/img/places/home.svg');
|
||||
background-image: var(--icon-home-000, url('../../../core/img/places/home.svg'));
|
||||
}
|
||||
|
||||
.icon-description {
|
||||
background-image: var(--icon-text-000, url('../img/description.svg'));
|
||||
}
|
||||
|
||||
.icon-badge {
|
||||
background-image: url('../../../core/img/places/calendar-dark.svg');
|
||||
}
|
||||
background-image: url('../img/calendar-dark.svg');
|
||||
}
|
||||
|
||||
.icon-toggle-compact-collapsed {
|
||||
background-image: url('../img/toggle-view-expand.svg');
|
||||
}
|
||||
|
||||
.icon-toggle-compact-expanded {
|
||||
background-image: url('../img/toggle-view-collapse.svg');
|
||||
}
|
||||
|
||||
@if mixin-exists('icon-black-white') {
|
||||
@include icon-black-white('deck', 'deck', 1);
|
||||
@include icon-black-white('archive', 'deck', 1);
|
||||
|
||||
.icon-toggle-compact-collapsed {
|
||||
@include icon-color('toggle-view-expand', 'deck', $color-black);
|
||||
}
|
||||
|
||||
.icon-toggle-compact-expanded {
|
||||
@include icon-color('toggle-view-collapse', 'deck', $color-black);
|
||||
}
|
||||
.icon-activity {
|
||||
@include icon-color('activity-dark', 'activity', $color-black);
|
||||
}
|
||||
}
|
||||
|
||||
90
css/print.scss
Normal file
@@ -0,0 +1,90 @@
|
||||
@media print {
|
||||
/* hide stuff */
|
||||
#body-user {
|
||||
#header,
|
||||
div#app-navigation,
|
||||
div.board-header-controls,
|
||||
#app-navigation-toggle,
|
||||
#app-navigation-toggle-custom,
|
||||
div#controls.ng-scope div.crumb:not(.title),
|
||||
div#controls.ng-scope div.crumb a.bullet,
|
||||
a.ng-binding + a,
|
||||
div.card.create,
|
||||
button.card-options {
|
||||
display: none !important;
|
||||
}
|
||||
#content {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#app-content {
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
div#app-navigation-toggle.icon-menu {
|
||||
display:block;
|
||||
width:0px;
|
||||
height:0px;
|
||||
background:none;
|
||||
}
|
||||
|
||||
/* title */
|
||||
div#controls.ng-scope {padding-left:20px;}
|
||||
div#controls.ng-scope div.crumb.title {
|
||||
display:inline;
|
||||
font-size: 2em;
|
||||
line-height:2.5em;
|
||||
background:none;
|
||||
}
|
||||
|
||||
div#controls.ng-scope div.crumb.title a.ng-binding {
|
||||
color:#000;
|
||||
opacity:1;
|
||||
}
|
||||
|
||||
/*Due, assigned-users and description*/
|
||||
div.card-controls {
|
||||
flex-direction:row;
|
||||
flex-wrap:wrap;
|
||||
}
|
||||
div.card-controls i.icon.icon-filetype-text {background:none;}
|
||||
div.card-controls i.icon.icon-filetype-text:after {
|
||||
content: attr(title);
|
||||
display:block;
|
||||
width:289px;
|
||||
height:1.5em;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
span.due { }
|
||||
|
||||
div.card-assigned-users {
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
ul.labels li.ng-scope span.ng-binding {
|
||||
color:#000;
|
||||
display:inline;
|
||||
padding-left:5px;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 2cm;
|
||||
}
|
||||
|
||||
div#innerBoard {
|
||||
display:flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
div.stack.ng-scope.as-sortable-item {border-right: 1px solid #000;}
|
||||
|
||||
div#innerBoard.ng-pristine.ng-untouched.ng-valid.ng-scope.ng-not-empty div.stack.ng-scope.as-sortable-item:nth-child(6n) {
|
||||
page-break-after: always;
|
||||
}
|
||||
}
|
||||
558
css/style.scss
@@ -4,6 +4,8 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
* @author Artem Anufrij <artem.anufrij@live.de>
|
||||
* @author Marin Treselj <marin@pixelipo.com>
|
||||
* @author Oskar Kurz <oskar.kurz@gmail.com>
|
||||
* @author Ryan Fletcher <ryan.fletcher@codepassion.ca>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
@@ -22,17 +24,29 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// colors
|
||||
$color-warning-light: nc-lighten($color-warning, 15%);
|
||||
$color-lightgrey: nc-darken($color-main-background, 4%);
|
||||
$color-grey: nc-darken($color-main-background, 7%);
|
||||
$color-darkgrey: nc-darken($color-main-background, 32%);
|
||||
|
||||
@import 'comp-appnav.scss';
|
||||
@import 'icons.scss';
|
||||
// margins/paddings
|
||||
$board-item-margin: 10px 10px 20px 10px;
|
||||
$board-last-item-margin: 10px;
|
||||
|
||||
$compact-board-item-margin: 5px 10px 10px 10px;
|
||||
$compact-board-last-item-margin: 5px 10px 10px;
|
||||
|
||||
@import 'comp-appnav';
|
||||
@import 'icons';
|
||||
@import 'animations';
|
||||
@import 'compact-mode';
|
||||
@import 'autocomplete';
|
||||
|
||||
/**
|
||||
* General styles
|
||||
*/
|
||||
|
||||
button,
|
||||
.button,
|
||||
.app-deck .icon {
|
||||
@@ -69,6 +83,26 @@ input.input-inline {
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic app layout
|
||||
*/
|
||||
|
||||
#content {
|
||||
height: 100%;
|
||||
min-height: initial;
|
||||
}
|
||||
|
||||
.app.app-deck {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#app-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigation sidebar
|
||||
*/
|
||||
@@ -101,8 +135,11 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
.app-navigation-entry-edit {
|
||||
.colorselect div{
|
||||
height: 32px;
|
||||
.colorselect {
|
||||
div, label {
|
||||
height: 32px;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
@@ -119,7 +156,7 @@ input.input-inline {
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: $color-main-background;
|
||||
background-color: var(--color-main-background, $color-main-background);
|
||||
}
|
||||
|
||||
#board {
|
||||
@@ -139,16 +176,19 @@ input.input-inline {
|
||||
|
||||
.card {
|
||||
opacity: 1;
|
||||
|
||||
&.file-drop {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&.card-selected {
|
||||
|
||||
.card {
|
||||
opacity: 0.7;
|
||||
box-shadow: 0px 0px 7px 0px var(--color-background-darker, $color-grey);
|
||||
|
||||
&.current {
|
||||
opacity: 1.0;
|
||||
box-shadow: 0px 0px 7px 0px $color-darkgrey;
|
||||
box-shadow: 0px 0px 7px 0px var(--color-text-lighter, $color-darkgrey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,10 +213,16 @@ input.input-inline {
|
||||
padding: 10px;
|
||||
|
||||
> .as-sortable-placeholder {
|
||||
display: inline-block !important;
|
||||
display: flex !important;
|
||||
width: 320px;
|
||||
min-width: 320px;
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
> .as-sortable-drag {
|
||||
background-color: var(--color-main-background $color-main-background);
|
||||
}
|
||||
}
|
||||
|
||||
#controls {
|
||||
@@ -214,9 +260,17 @@ input.input-inline {
|
||||
}
|
||||
|
||||
button {
|
||||
height: inherit;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
padding: 9px;
|
||||
}
|
||||
|
||||
#stack-add form {
|
||||
button {
|
||||
height: auto;
|
||||
width: 32px;
|
||||
}
|
||||
}
|
||||
input[type='text'] {
|
||||
padding: 6px;
|
||||
border: 0 none transparent;
|
||||
@@ -231,7 +285,7 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
#app-navigation-toggle {
|
||||
#app-navigation-toggle-custom {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
cursor: pointer;
|
||||
@@ -257,10 +311,6 @@ input.input-inline {
|
||||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
> button {
|
||||
padding: 16px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-select {
|
||||
@@ -285,7 +335,7 @@ input.input-inline {
|
||||
}
|
||||
|
||||
#stack-add {
|
||||
background-color: $color-lightgrey;
|
||||
background-color: var(--color-background-dark, $color-lightgrey);
|
||||
border-radius: 3px;
|
||||
margin: 3px;
|
||||
display: flex;
|
||||
@@ -330,9 +380,8 @@ input.input-inline {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-size: 12pt;
|
||||
font-weight: 700;
|
||||
border: 0;
|
||||
background-color: $color-main-background;
|
||||
background-color: var(--color-main-background, $color-main-background);
|
||||
min-height: initial;
|
||||
}
|
||||
|
||||
@@ -355,15 +404,20 @@ input.input-inline {
|
||||
}
|
||||
|
||||
.as-sortable-placeholder {
|
||||
margin: 10px 10px 20px 10px;
|
||||
margin: $board-item-margin;
|
||||
border: 1px dashed $color-darkgrey;
|
||||
min-height: 96px;
|
||||
transition: margin 250ms linear;
|
||||
|
||||
&:last-child {
|
||||
margin: 10px;
|
||||
margin: $board-last-item-margin;
|
||||
}
|
||||
}
|
||||
|
||||
&.as-sortable-item {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
> ul {
|
||||
display: flex;
|
||||
@@ -372,17 +426,17 @@ input.input-inline {
|
||||
|
||||
}
|
||||
|
||||
|
||||
.card {
|
||||
background-color: $color-main-background;
|
||||
margin: 10px 10px 20px 10px;
|
||||
background-color: var(--color-main-background, $color-main-background);
|
||||
margin: $board-item-margin;
|
||||
white-space: normal;
|
||||
position: relative;
|
||||
box-shadow: 0 0 3px $color-darkgrey;
|
||||
box-shadow: 0 0 3px var(--color-background-darker, $color-darkgrey);
|
||||
border-radius: 3px;
|
||||
transition: margin 250ms linear;
|
||||
|
||||
&:last-child {
|
||||
margin: 10px;
|
||||
margin: $board-last-item-margin;
|
||||
}
|
||||
|
||||
&.archived .card-upper {
|
||||
@@ -406,7 +460,7 @@ input.input-inline {
|
||||
}
|
||||
|
||||
.card-controls {
|
||||
background: $color-lightgrey;
|
||||
background: var(--color-background-dark, $color-lightgrey);
|
||||
display: flex;
|
||||
position: relative;
|
||||
padding-left: 10px;
|
||||
@@ -419,9 +473,10 @@ input.input-inline {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.icon-filetype-text {
|
||||
.icon-description {
|
||||
margin: 10px;
|
||||
margin-left: 0px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.due {
|
||||
@@ -439,7 +494,7 @@ input.input-inline {
|
||||
|
||||
&.overdue {
|
||||
background-color: $color-error;
|
||||
color: $color-primary-text;
|
||||
color: var(--color-primary-text, $color-primary-text);
|
||||
|
||||
.icon-badge {
|
||||
background-image: url('../img/calendar-white.svg');
|
||||
@@ -457,6 +512,21 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
.card-tasks, .card-files, .card-comments {
|
||||
border-radius: 3px;
|
||||
margin: 4px 4px 4px 0px;
|
||||
padding: 0 2px;
|
||||
font-size: 90%;
|
||||
opacity: 0.5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
background-size: contain;
|
||||
margin-right: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 22px;
|
||||
margin: 0;
|
||||
@@ -471,37 +541,39 @@ input.input-inline {
|
||||
font-weight: normal;
|
||||
font-size: 10pt;
|
||||
padding: 0;
|
||||
margin: 5px;
|
||||
margin: 0 5px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&.has-labels h4 {
|
||||
margin-top: 15px;
|
||||
span {
|
||||
padding: 6px 0;
|
||||
padding-top: 7px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.labels {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 10px;
|
||||
position: relative;
|
||||
margin-left: 5px;
|
||||
|
||||
li {
|
||||
padding: 0;
|
||||
width: 15px;
|
||||
height: 20px;
|
||||
padding: 0 4px;
|
||||
margin: 0 2px 2px 0;
|
||||
border-radius: 3px;
|
||||
font-size: 80%;
|
||||
font-size: 75%;
|
||||
border: none transparent;
|
||||
float: left;
|
||||
|
||||
span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover span {
|
||||
position: absolute;
|
||||
padding: 3px;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
background-color: inherit;
|
||||
line-height: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -599,25 +671,19 @@ input.input-inline {
|
||||
/**
|
||||
* App sidebar
|
||||
*/
|
||||
#app-sidebar {
|
||||
right: -500px;
|
||||
max-width: 100%;
|
||||
width: 500px;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
|
||||
&.details-visible {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#sidebar-header {
|
||||
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: var(--color-main-background, $color-main-background);
|
||||
z-index: 200;
|
||||
|
||||
h3 {
|
||||
font-size: 14pt;
|
||||
padding: 9px 10px;
|
||||
padding: 15px 15px 3px;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background-color: $color-lightgrey;
|
||||
|
||||
input {
|
||||
min-height: 0px;
|
||||
@@ -625,6 +691,12 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
#card-dates {
|
||||
font-size: 80%;
|
||||
opacity: 0.5;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.icon-close {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
@@ -635,11 +707,37 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
.drop-indicator {
|
||||
display: none;
|
||||
}
|
||||
.card .nv-file-over,
|
||||
.drop-indicator.nv-file-over {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: var(--color-main-background, $color-main-background);
|
||||
z-index: 100;
|
||||
opacity: 0.9;
|
||||
text-align: center;
|
||||
|
||||
p {
|
||||
width: calc(100% - 20px);
|
||||
height: calc(100% - 20px);
|
||||
position: absolute;
|
||||
padding: 20px;
|
||||
border: 1px dashed #AAA;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#card-meta { // TODO: use .card-block instead?
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 15px;
|
||||
padding: 0 15px;
|
||||
|
||||
.duedate {
|
||||
display: flex;
|
||||
@@ -679,21 +777,41 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
.section-header-tabbed {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
.tabHeaders {
|
||||
margin: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.tabDetails {
|
||||
display: flex;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
input[type=button] {
|
||||
width: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.save-indicator {
|
||||
border-radius: 3px;
|
||||
float: right;
|
||||
margin: 5px;
|
||||
padding: 0 10px;
|
||||
font-size: 8pt;
|
||||
display: none;
|
||||
align-self: flex-end;
|
||||
text-align: center;
|
||||
&.saved {
|
||||
background-color: $color-success;
|
||||
color: $color-primary-text;
|
||||
}
|
||||
&.unsaved {
|
||||
background-color: $color-lightgrey;
|
||||
color: $color-darkgrey;
|
||||
background-color: var(--color-background-dark, $color-lightgrey);
|
||||
color: var(--color-text-light, $color-darkgrey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,12 +821,6 @@ input.input-inline {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#card-dates {
|
||||
font-size: 80%;
|
||||
opacity: 0.5;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.card-details-assign-users {
|
||||
|
||||
.select2 .ui-select-choices-row-inner {
|
||||
@@ -732,6 +844,101 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
.icon-upload.icon-loading-small {
|
||||
background-image: none;
|
||||
}
|
||||
.attachment-list-wrapper {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba($color-darkgrey, 0.5);
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 300;
|
||||
}
|
||||
.attachment-list {
|
||||
&.selector {
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
width: 30%;
|
||||
max-width: 500px;
|
||||
min-width: 200px;
|
||||
max-height: 50%;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: var(--color-main-background, $color-main-background);
|
||||
z-index: 2;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 0 3px var(--color-background-dark, $color-darkgrey);
|
||||
overflow: scroll;
|
||||
}
|
||||
h3.attachment-selector {
|
||||
margin: 0 0 10px;
|
||||
padding: 0;
|
||||
.icon-close {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
li.attachment {
|
||||
display: flex;
|
||||
padding: 3px;
|
||||
|
||||
&.deleted {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.fileicon {
|
||||
display: inline-block;
|
||||
min-width: 32px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background-size: contain;
|
||||
}
|
||||
.details {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
min-width: 0;
|
||||
flex-basis: 50%;
|
||||
line-height: 110%;
|
||||
padding: 2px;
|
||||
}
|
||||
.filename {
|
||||
width: 70%;
|
||||
display: flex;
|
||||
.basename {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.extension {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
.filesize, .filedate {
|
||||
font-size: 90%;
|
||||
color: $color-darkgrey;
|
||||
}
|
||||
.app-popover-menu-utils {
|
||||
position: relative;
|
||||
right: -10px;
|
||||
button {
|
||||
height: 32px;
|
||||
width: 42px;
|
||||
}
|
||||
}
|
||||
button.icon-history {
|
||||
width: 44px;
|
||||
}
|
||||
progress {
|
||||
margin-top: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-description {
|
||||
&.section-header {
|
||||
.save-indicator {
|
||||
@@ -757,30 +964,76 @@ input.input-inline {
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: $color-main-background;
|
||||
background-color: var(--color-main-background, $color-main-background);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#card-attachments {
|
||||
ul {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.details {
|
||||
font-size: 8pt;
|
||||
padding-left: 15px;
|
||||
.activity-icon {
|
||||
opacity: 1 !important;
|
||||
.avatardiv-container {
|
||||
top: -4px;
|
||||
left: -7px;
|
||||
margin-right: 5px;
|
||||
img {
|
||||
max-width: 24px;
|
||||
max-height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#app-content {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.activitysubject.commentAuthor {
|
||||
margin-left: 26px;
|
||||
margin-right: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.activityTabView {
|
||||
.activity {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.activitytime {
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
.activitysubject .app-popover-menu-utils {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
a {
|
||||
font-weight: normal;
|
||||
}
|
||||
button {
|
||||
opacity: .5;
|
||||
padding: 7px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&.details-visible {
|
||||
margin-right: 500px;
|
||||
#commentsTabView {
|
||||
.newCommentRow .avatardiv-container {
|
||||
left: -7px;
|
||||
}
|
||||
.comment {
|
||||
position: relative;
|
||||
padding: 0 0 15px;
|
||||
|
||||
.avatardiv {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
.newCommentForm {
|
||||
margin-left: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-attachments {
|
||||
.error {
|
||||
padding-left: 38px;
|
||||
margin-bottom: 5px;
|
||||
background-position: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -814,6 +1067,10 @@ input.input-inline {
|
||||
border: none;
|
||||
}
|
||||
|
||||
label.color {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.selected {
|
||||
background-image: url('../../../core/img/actions/checkmark.svg');
|
||||
background-position: center center;
|
||||
@@ -823,6 +1080,22 @@ input.input-inline {
|
||||
background-image: url('../../../core/img/actions/checkmark-white.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.colorselect-label, .colorselect-label-white {
|
||||
background-image: url('../img/color_picker-dark.svg');
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
opacity: 1;
|
||||
input {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
height: 32px;
|
||||
width: 40px;
|
||||
}
|
||||
}
|
||||
.colorselect-label-white {
|
||||
background-image: url('../img/color_picker.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.labels {
|
||||
@@ -888,7 +1161,8 @@ input.input-inline {
|
||||
.colorselect {
|
||||
flex-grow: 1;
|
||||
|
||||
div {
|
||||
div,
|
||||
label {
|
||||
min-width: 32px;
|
||||
}
|
||||
}
|
||||
@@ -1011,6 +1285,16 @@ input.input-inline {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.board-detail__deleted-list__item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
* {
|
||||
flex-basis: 20%;
|
||||
}
|
||||
}
|
||||
|
||||
#board-detail-labels {
|
||||
ul li {
|
||||
input {
|
||||
@@ -1056,12 +1340,23 @@ input.input-inline {
|
||||
|
||||
.tabHeaders {
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
overflow: initial;
|
||||
margin-bottom: 0;
|
||||
.icon {
|
||||
display: inline-block;
|
||||
background-size: contain;
|
||||
margin-right: 5px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.tabsContainer {
|
||||
margin-top: 15px;
|
||||
height: 100%;
|
||||
|
||||
.tab {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-select-offscreen {
|
||||
@@ -1072,7 +1367,7 @@ input.input-inline {
|
||||
padding: 0;
|
||||
float: left !important;
|
||||
display: block;
|
||||
border-radius: 0px 0px 5px 5px !important;
|
||||
border-radius: 3px !important;
|
||||
|
||||
.select-label {
|
||||
color: $color-primary-text;
|
||||
@@ -1101,7 +1396,11 @@ input.input-inline {
|
||||
border: 0 !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
.select2-search-field {
|
||||
margin-right: -10px;
|
||||
}
|
||||
}
|
||||
|
||||
.select2-choice {
|
||||
height: auto;
|
||||
}
|
||||
@@ -1136,6 +1435,8 @@ input.input-inline {
|
||||
*/
|
||||
#markdown {
|
||||
width: 100% !important;
|
||||
min-height: 40px;
|
||||
cursor: text;
|
||||
|
||||
p {
|
||||
margin-bottom: 15px;
|
||||
@@ -1189,7 +1490,7 @@ input.input-inline {
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: $color-lightgrey;
|
||||
background-color: var(--color-background-dark, $color-lightgrey);
|
||||
padding: 3px;
|
||||
overflow: auto;
|
||||
|
||||
@@ -1197,8 +1498,65 @@ input.input-inline {
|
||||
white-space: pre;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 50vh;
|
||||
margin: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
input[type=checkbox] {
|
||||
margin: 0px 10px 0px 0px;
|
||||
line-height: 10px;
|
||||
font-size: 10px;
|
||||
display: inline-block;
|
||||
min-height: 12px;
|
||||
}
|
||||
|
||||
li input[type="checkbox"].checkbox + label::before {
|
||||
margin-left: -15px;
|
||||
|
||||
}
|
||||
input[type="checkbox"].checkbox + label::before {
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
margin-right: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
li input[type="checkbox"].checkbox:not(:checked) + label::before {
|
||||
background-color: $color-main-background;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-bottom: 10px;
|
||||
border-collapse: collapse;
|
||||
|
||||
thead {
|
||||
background-color: var(--color-background-dark, $color-lightgrey);
|
||||
}
|
||||
td, th {
|
||||
border: 1px solid var(--color-background-darker, $color-darkgrey);
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section-wrapper {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.section-label {
|
||||
background-position: 0px center;
|
||||
width:28px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.section-details {
|
||||
flex-grow: 1;
|
||||
}
|
||||
/**
|
||||
* Mobile optimizations
|
||||
*/
|
||||
@@ -1243,3 +1601,27 @@ input.input-inline {
|
||||
.ui-select-dropdown.select2-drop-active {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom app sidebar handling
|
||||
*/
|
||||
body:not(.snapjs-left) {
|
||||
.app-navigation-hide {
|
||||
#app-content {
|
||||
margin-left: 0 !important; /* overwrite margin since we want the translateX to handle it*/
|
||||
}
|
||||
#app-navigation {
|
||||
transform: translateX(-300px);
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 768px) {
|
||||
#app-navigation-toggle-custom {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print settings, better leave them at the eof
|
||||
*/
|
||||
@import 'print.scss';
|
||||
|
||||
27
docs/API-Nextcloud.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Nextcloud APIs
|
||||
|
||||
## Comments
|
||||
|
||||
Comments are stored using the Nextcloud Comments API. You can use the WebDAV endpoint of Nextcloud to fetch, update and delete comments.
|
||||
|
||||
### List comments
|
||||
|
||||
PROPFIND`remote.php/dav/comments/deckCard/{cardId}`
|
||||
|
||||
### Create comment
|
||||
|
||||
POST `remote.php/dav/comments/deckCard/{cardId}`
|
||||
|
||||
### Update comment
|
||||
|
||||
PROPPATCH `remote.php/dav/comments/deckCard/{cardId}/{commentId}`
|
||||
|
||||
### Delete comment
|
||||
|
||||
DELETE `remote.php/dav/comments/deckCard/{cardId}/{commentId}`
|
||||
|
||||
## Activity
|
||||
|
||||
The Nextcloud activity app provides an API to fetch activities filtered for deck: [Activity app API documentation](https://github.com/nextcloud/activity/blob/master/docs/endpoint-v2.md)
|
||||
|
||||
The deck app offers a filter `deck` to only request activity events that are relevant.
|
||||
833
docs/API.md
Normal file
@@ -0,0 +1,833 @@
|
||||
|
||||
The REST API provides access for authenticated users to their data inside the Deck app. To get a better understand of Decks data models and their relations, please have a look at the [data structure](structure.md) documentation.
|
||||
|
||||
# Prequisited
|
||||
|
||||
- All requests require a `OCS-APIRequest` HTTP header to be set to `true` and a `Content-Type` of `application/json`.
|
||||
- The API is located at https://nextcloud.local/index.php/apps/deck/api/v1.0
|
||||
|
||||
## Naming
|
||||
|
||||
- Board is the the project like grouping of tasks that can be shared to different users and groups
|
||||
|
||||
- Stack is the grouping of cards which is rendered in vertical columns in the UI
|
||||
|
||||
- Card is the representation of a single task
|
||||
|
||||
- Labels are defined on a board level and can be assigned to any number of cards
|
||||
|
||||
## Global responses
|
||||
|
||||
### 400 Bad request
|
||||
|
||||
In case the request is invalid, e.g. because a parameter is missing, a 400 error will be returned:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": 400,
|
||||
"message": "title must be provided"
|
||||
}
|
||||
```
|
||||
|
||||
### 403 Permission denied
|
||||
|
||||
In any case a user doesn't have access to a requested entity, a 403 error will be returned:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": 403,
|
||||
"message": "Permission denied"
|
||||
}
|
||||
```
|
||||
|
||||
## Headers
|
||||
|
||||
### If-Modified-Since
|
||||
|
||||
Some index endpoints support limiting the result set to entries that have been changed since the given time.
|
||||
|
||||
Example curl request:
|
||||
|
||||
```bash
|
||||
curl -u admin:admin -X GET \
|
||||
'http://localhost:8000/index.php/apps/deck/api/v1.0/boards/2/stacks' \
|
||||
-H "OCS-APIRequest: true" \
|
||||
-H "If-Modified-Since: Mon, 5 Nov 2018 09:28:00 GMT"
|
||||
```
|
||||
|
||||
# Endpoints
|
||||
|
||||
## Boards
|
||||
|
||||
### GET /boards - Get a list of boards
|
||||
|
||||
#### Headers
|
||||
|
||||
The board list endpoint supports setting an `If-Modified-Since` header to limit the results to entities that are changed after the provided time.
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
Returns an array of board items
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"title": "Board title",
|
||||
"owner": {
|
||||
"primaryKey": "admin",
|
||||
"uid": "admin",
|
||||
"displayname": "Administrator"
|
||||
},
|
||||
"color": "ff0000",
|
||||
"archived": false,
|
||||
"labels": [],
|
||||
"acl": [],
|
||||
"permissions": {
|
||||
"PERMISSION_READ": true,
|
||||
"PERMISSION_EDIT": true,
|
||||
"PERMISSION_MANAGE": true,
|
||||
"PERMISSION_SHARE": true
|
||||
},
|
||||
"users": [],
|
||||
"shared": 0,
|
||||
"deletedAt": 0,
|
||||
"id": 10
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### POST /boards - Create a new board
|
||||
|
||||
#### Request body
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------ | ---------------------------------------------------- |
|
||||
| title | String | The title of the new board |
|
||||
| color | String | The hexadecimal color of the new board (e.g. FF0000) |
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Board title",
|
||||
"color": "ff0000"
|
||||
}
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Board title",
|
||||
"owner": {
|
||||
"primaryKey": "admin",
|
||||
"uid": "admin",
|
||||
"displayname": "Administrator"
|
||||
},
|
||||
"color": "ff0000",
|
||||
"archived": false,
|
||||
"labels": [
|
||||
{
|
||||
"title": "Finished",
|
||||
"color": "31CC7C",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 37
|
||||
},
|
||||
{
|
||||
"title": "To review",
|
||||
"color": "317CCC",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 38
|
||||
},
|
||||
{
|
||||
"title": "Action needed",
|
||||
"color": "FF7A66",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 39
|
||||
},
|
||||
{
|
||||
"title": "Later",
|
||||
"color": "F1DB50",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 40
|
||||
}
|
||||
],
|
||||
"acl": [],
|
||||
"permissions": {
|
||||
"PERMISSION_READ": true,
|
||||
"PERMISSION_EDIT": true,
|
||||
"PERMISSION_MANAGE": true,
|
||||
"PERMISSION_SHARE": true
|
||||
},
|
||||
"users": [],
|
||||
"deletedAt": 0,
|
||||
"id": 10
|
||||
}
|
||||
```
|
||||
|
||||
### GET /boards/{boardId} - Get board details
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------- |
|
||||
| boardId | Integer | The id of the board to fetch |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Board title",
|
||||
"owner": {
|
||||
"primaryKey": "admin",
|
||||
"uid": "admin",
|
||||
"displayname": "Administrator"
|
||||
},
|
||||
"color": "ff0000",
|
||||
"archived": false,
|
||||
"labels": [
|
||||
{
|
||||
"title": "Finished",
|
||||
"color": "31CC7C",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 37
|
||||
},
|
||||
{
|
||||
"title": "To review",
|
||||
"color": "317CCC",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 38
|
||||
},
|
||||
{
|
||||
"title": "Action needed",
|
||||
"color": "FF7A66",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 39
|
||||
},
|
||||
{
|
||||
"title": "Later",
|
||||
"color": "F1DB50",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 40
|
||||
}
|
||||
],
|
||||
"acl": [],
|
||||
"permissions": {
|
||||
"PERMISSION_READ": true,
|
||||
"PERMISSION_EDIT": true,
|
||||
"PERMISSION_MANAGE": true,
|
||||
"PERMISSION_SHARE": true
|
||||
},
|
||||
"users": [
|
||||
{
|
||||
"primaryKey": "admin",
|
||||
"uid": "admin",
|
||||
"displayname": "Administrator"
|
||||
}
|
||||
],
|
||||
"deletedAt": 0,
|
||||
"id": 10
|
||||
}
|
||||
```
|
||||
|
||||
### PUT /boards/{boardId} - Update board details
|
||||
|
||||
#### Request body
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------ | ---------------------------------------------------- |
|
||||
| title | String | The title of the new board |
|
||||
| color | String | The hexadecimal color of the new board (e.g. FF0000) |
|
||||
| archived | Bool | The hexadecimal color of the new board (e.g. FF0000) |
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Board title",
|
||||
"color": "ff0000",
|
||||
"archived": false
|
||||
}
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### DELETE /boards/{boardId} - Delete a board
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------- |
|
||||
| boardId | Integer | The id of the board to fetch |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### POST /boards/{boardId}/undo_delete - Restore a deleted board
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------- |
|
||||
| boardId | Integer | The id of the board to fetch |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
## Stacks
|
||||
|
||||
### GET /board/{boardId}/stacks - Get stacks
|
||||
|
||||
#### Headers
|
||||
|
||||
The board list endpoint supports setting an `If-Modified-Since` header to limit the results to entities that are changed after the provided time.
|
||||
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------- |
|
||||
| boardId | Integer | The id of the board to fetch |
|
||||
|
||||
#### Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"title": "ToDo",
|
||||
"boardId": 2,
|
||||
"deletedAt": 0,
|
||||
"lastModified": 1541426139,
|
||||
"cards": [...],
|
||||
"order": 999,
|
||||
"id": 4
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### GET /board/{boardId}/stacks/archived - Get list of archived stacks
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------- |
|
||||
| boardId | Integer | The id of the board to fetch |
|
||||
|
||||
#### Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"title": "ToDo",
|
||||
"boardId": 2,
|
||||
"deletedAt": 0,
|
||||
"lastModified": 1541426139,
|
||||
"cards": [...],
|
||||
"order": 999,
|
||||
"id": 4
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### GET /board/{boardId}/stacks/{stackId} - Get stack details
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the stack belongs to |
|
||||
| stackId | Integer | The id of the stack |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### POST /board/{boardId}/stacks - Create a new stack
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------- |
|
||||
| boardId | Integer | The id of the board to fetch |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId} - Update stack details
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the stack belongs to |
|
||||
| stackId | Integer | The id of the stack |
|
||||
|
||||
#### Request body
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------------------- |
|
||||
| title | String | The title of the new stack |
|
||||
| order | Integer | Order for sorting the stacks |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### DELETE /board/{boardId}/stacks/{stackId} - Delete a stack
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the stack belongs to |
|
||||
| stackId | Integer | The id of the stack |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
## Cards
|
||||
|
||||
### GET /board/{boardId}/stacks/{stackId}/cards/{cardId} - Get card details
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### POST /board/{boardId}/stacks/{stackId}/cards - Create a new card
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
|
||||
#### Request body
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------------------- |
|
||||
| title | String | The title of the new stack |
|
||||
| type | String | Type of the card (for later use) use 'plain' for now |
|
||||
| order | Integer | Order for sorting the stacks |
|
||||
|
||||
#### Response
|
||||
|
||||
```json
|
||||
{
|
||||
"title":"Test",
|
||||
"description":null,
|
||||
"stackId":6,
|
||||
"type":"plain",
|
||||
"lastModified":1541528026,
|
||||
"createdAt":1541528026,
|
||||
"labels":null,
|
||||
"assignedUsers":null,
|
||||
"attachments":null,
|
||||
"attachmentCount":null,
|
||||
"owner":"admin",
|
||||
"order":999,
|
||||
"archived":false,
|
||||
"duedate":null,
|
||||
"deletedAt":0,
|
||||
"commentsUnread":0,
|
||||
"id":10,
|
||||
"overdue":0
|
||||
}
|
||||
```
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId} - Update card details
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-------------|-----------|------------------------------------------------------|
|
||||
| title | String | The card title |
|
||||
| description | String | The markdown description of the card |
|
||||
| type | String | Type of the card (for later use) use 'plain' for now |
|
||||
| order | Integer | Order for sorting the stacks |
|
||||
| duedate | timestamp | The duedate of the card or null |
|
||||
|
||||
|
||||
```
|
||||
{
|
||||
"title": "Test card",
|
||||
"description": "A card description",
|
||||
"type": "plain",
|
||||
"order": 999,
|
||||
"duedate": null,
|
||||
}
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### DELETE /board/{boardId}/stacks/{stackId}/cards/{cardId} - Delete a card
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId}/assignLabel - Assign a label to a card
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| labelId | Integer | The label id to assign to the card |
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId}/removeLabel - Remove a label to a card
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| labelId | Integer | The label id to remove to the card |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId}/assignUser - Assign a user to a card
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| userId | String | The user id to assign to the card |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId}/unassignUser - Assign a user to a card
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| userId | String | The user id to assign to the card |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId}/reorder - Change the sorting order of a card
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ----------------------------------------------------------- |
|
||||
| order | Integer | The position in the stack where the card should be moved to |
|
||||
| stackId | Integer | The id of the stack where the card should be moved to |
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
## Labels
|
||||
|
||||
### GET /board/{boardId}/labels/{labelId} - Get label details
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
| labelId | Integer | The id of the label |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Abgeschlossen",
|
||||
"color": "31CC7C",
|
||||
"boardId": "2",
|
||||
"cardId": null,
|
||||
"id": 5
|
||||
}
|
||||
```
|
||||
|
||||
### POST /board/{boardId}/labels - Create a new label
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
|
||||
#### Request data
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Finished",
|
||||
"color": "31CC7C"
|
||||
}
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/labels/{labelId} - Update label details
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
| labelId | Integer | The id of the label |
|
||||
|
||||
|
||||
#### Request data
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Finished",
|
||||
"color": "31CC7C"
|
||||
}
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### DELETE /board/{boardId}/labels/{labelId} - Delete a label
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
| labelId | Integer | The id of the label |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
## Attachments
|
||||
|
||||
### GET /board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments - Get a list of attachments
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| boardId | Integer | The id of the board the card belongs to |
|
||||
| stackId | Integer | The id of the stack the card belongs to |
|
||||
| cardId | Integer | The id of the card |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"cardId": 5,
|
||||
"type": "deck_file",
|
||||
"data": "6DADC2C69F4.eml",
|
||||
"lastModified": 1541529048,
|
||||
"createdAt": 1541529048,
|
||||
"createdBy": "admin",
|
||||
"deletedAt": 0,
|
||||
"extendedData": {
|
||||
"filesize": 922258,
|
||||
"mimetype": "application/octet-stream",
|
||||
"info": {
|
||||
"dirname": ".",
|
||||
"basename": "6DADC2C69F4.eml",
|
||||
"extension": "eml",
|
||||
"filename": "6DADC2C69F4"
|
||||
}
|
||||
},
|
||||
"id": 6
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
### GET /board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId} - Get the attachment file
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------------ | ------- | --------------------------------------------- |
|
||||
| boardId | Integer | The id of the board the attachment belongs to |
|
||||
| stackId | Integer | The id of the stack the attachment belongs to |
|
||||
| cardId | Integer | The id of the card the attachment belongs to |
|
||||
| attachmentId | Integer | The id of the attachment |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### POST /board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments - Upload an attachment
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------------- |
|
||||
| boardId | Integer | The id of the board the attachment belongs to |
|
||||
| stackId | Integer | The id of the stack the attachment belongs to |
|
||||
| cardId | Integer | The id of the card the attachment belongs to |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------------- |
|
||||
| type | String | The type of the attachement |
|
||||
| file | Binary | File data to add as an attachment |
|
||||
|
||||
For now only `deck_file` is supported as an attachment type.
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId} - Update an attachment
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------------ | ------- | --------------------------------------------- |
|
||||
| boardId | Integer | The id of the board the attachment belongs to |
|
||||
| stackId | Integer | The id of the stack the attachment belongs to |
|
||||
| cardId | Integer | The id of the card the attachment belongs to |
|
||||
| attachmentId | Integer | The id of the attachment |
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------------- |
|
||||
| type | String | The type of the attachement |
|
||||
| file | Binary | File data to add as an attachment |
|
||||
|
||||
For now only `deck_file` is supported as an attachment type.
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### DELETE /board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId} - Delete an attachment
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------------ | ------- | --------------------------------------------- |
|
||||
| boardId | Integer | The id of the board the attachment belongs to |
|
||||
| stackId | Integer | The id of the stack the attachment belongs to |
|
||||
| cardId | Integer | The id of the card the attachment belongs to |
|
||||
| attachmentId | Integer | The id of the attachment |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
### PUT /board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}/restore - Resore a deleted attachment
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------------ | ------- | --------------------------------------------- |
|
||||
| boardId | Integer | The id of the board the attachment belongs to |
|
||||
| stackId | Integer | The id of the stack the attachment belongs to |
|
||||
| cardId | Integer | The id of the card the attachment belongs to |
|
||||
| attachmentId | Integer | The id of the attachment |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
|
||||
27
docs/Markdown.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## What is Markdown
|
||||
|
||||
The [wikipedia markdown entry](https://en.wikipedia.org/wiki/Markdown) introduced markdown as :
|
||||
|
||||
> Markdown is a lightweight markup language with plain text formatting syntax. It is designed so that it can be converted to HTML and many other formats using a tool by the same name. Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor. As the initial description of Markdown contained ambiguities and unanswered questions, many implementations and extensions of Markdown appeared over the years to answer these issues.
|
||||
|
||||
## Markdown in Deck
|
||||
The Deck application plugin uses the [markdown-it](https://github.com/markdown-it/markdown-it) script to offer support for markdown in the cards description field.
|
||||
|
||||
## Supported Markdown
|
||||
|
||||
Markdown comes in may flavors. The best way to learn markdown and understand how to use it, is simply to [try it](https://markdown-it.github.io) on the original script official playground.
|
||||
That same link offers also a comprehensive list of what is supported, and what is not - rendering it unnecessary to duplicate that content in here.
|
||||
|
||||
[CommonMark Markdown Reference](http://commonmark.org/help/)
|
||||
|
||||
## Known Issues
|
||||
|
||||
As per [issue #127](https://github.com/nextcloud/deck/issues/127) Due to a known limitation of the current script to support markdown, Links that contain the `")"` character will not display well, or will break.
|
||||
The recommended solution is to use `"<"` and `">"` to wrap those links. It should assure their integrity.
|
||||
If you come by another case of broken link, or broken display of links, please report it by opening a new issue.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3
docs/extra.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.subnav ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
1
docs/index.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../README.md
|
||||
BIN
docs/resources/er-diagram.dia
Normal file
BIN
docs/resources/er-diagram.jpg
Normal file
|
After Width: | Height: | Size: 107 KiB |
6
docs/structure.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## Database structure
|
||||
|
||||
Deck stores most of its data inside of the database. The structure and relationships between entities is documented in the following ER diagram:
|
||||
|
||||

|
||||
|
||||
1
img/calendar-dark.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" version="1.1" height="32" viewbox="0 0 32 32"><path fill="#000" d="m8 2c-1.108 0-2 0.892-2 2v4c0 1.108 0.892 2 2 2s2-0.892 2-2v-4c0-1.108-0.892-2-2-2zm16 0c-1.108 0-2 0.892-2 2v4c0 1.108 0.892 2 2 2s2-0.892 2-2v-4c0-1.108-0.892-2-2-2zm-13 4v2c0 1.662-1.338 3-3 3s-3-1.338-3-3v-1.875a3.993 3.993 0 0 0 -3 3.875v16c0 2.216 1.784 4 4 4h20c2.216 0 4-1.784 4-4v-16a3.993 3.993 0 0 0 -3 -3.875v1.875c0 1.662-1.338 3-3 3s-3-1.338-3-3v-2zm-4.906 10h19.812a0.09 0.09 0 0 1 0.094 0.094v9.812a0.09 0.09 0 0 1 -0.094 0.094h-19.812a0.09 0.09 0 0 1 -0.094 -0.094v-9.812a0.09 0.09 0 0 1 0.094 -0.094z"/></svg>
|
||||
|
After Width: | Height: | Size: 646 B |
1
img/color_picker-dark.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 100 100"><path d="M91.645 8.355c-4.474-4.474-11.727-4.474-16.2 0l-13.5 13.501-3.727-3.727a5.015 5.015 0 1 0-7.093 7.093l3.727 3.727-41.51 41.508a11.411 11.411 0 0 0-3.329 7.324c-.073 1.087-.347 3.105-.675 5.292a1.748 1.748 0 0 1-.487.983l-3.105 3.106a2.546 2.546 0 0 0 0 3.6l3.493 3.493a2.546 2.546 0 0 0 3.6 0l3.106-3.105c.277-.275.622-.433.981-.486 2.187-.329 4.205-.602 5.293-.675a11.412 11.412 0 0 0 7.325-3.33l41.508-41.508 3.727 3.727a5.015 5.015 0 1 0 7.093-7.093L69.507 29.419l9.697 7.577 12.44-12.441c4.475-4.473 4.474-11.726.001-16.2zM65.051 42.749l-20.53 20.53a2.546 2.546 0 0 1-3.6 0l-3.27-3.27a2.545 2.545 0 0 0-3.599.001l-.616.616-.002-.002-14.728 14.727c-.337.337-.819.401-1.076.143s-.194-.74.143-1.076l23.841-23.841.004.004 15.633-15.633a2.546 2.546 0 0 1 3.6 0l4.2 4.201a2.546 2.546 0 0 1 0 3.6z"/></svg>
|
||||
|
After Width: | Height: | Size: 897 B |
1
img/color_picker.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="15" height="15" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M91.645 8.355c-4.474-4.474-11.727-4.474-16.2 0l-13.5 13.501-3.727-3.727a5.015 5.015 0 1 0-7.093 7.093l3.727 3.727-41.51 41.508a11.411 11.411 0 0 0-3.329 7.324c-.073 1.087-.347 3.105-.675 5.292a1.748 1.748 0 0 1-.487.983l-3.105 3.106a2.546 2.546 0 0 0 0 3.6l3.493 3.493a2.546 2.546 0 0 0 3.6 0l3.106-3.105c.277-.275.622-.433.981-.486 2.187-.329 4.205-.602 5.293-.675a11.412 11.412 0 0 0 7.325-3.33l41.508-41.508 3.727 3.727a5.015 5.015 0 1 0 7.093-7.093L69.507 29.419l9.697 7.577 12.44-12.441c4.475-4.473 4.474-11.726.001-16.2zM65.051 42.749l-20.53 20.53a2.546 2.546 0 0 1-3.6 0l-3.27-3.27a2.545 2.545 0 0 0-3.599.001l-.616.616-.002-.002-14.728 14.727c-.337.337-.819.401-1.076.143s-.194-.74.143-1.076l23.841-23.841.004.004 15.633-15.633a2.546 2.546 0 0 1 3.6 0l4.2 4.201a2.546 2.546 0 0 1 0 3.6z" fill="#fff"/></svg>
|
||||
|
After Width: | Height: | Size: 910 B |
1
img/description.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" version="1.1" height="16"><path fill="#000" d="m2.5 1c-0.28 0-0.5 0.22-0.5 0.5v13c0 0.28 0.22 0.5 0.5 0.5h11c0.28 0 0.5-0.22 0.5-0.5v-10.5l-3-3h-8.5zm1.5 2h6v1h-6v-1zm0 3h5v1h-5v-1zm0 3h8v1h-8v-1zm0 3h4v1h-4v-1z"/></svg>
|
||||
|
After Width: | Height: | Size: 292 B |
1
img/toggle-view-collapse.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 4.2333 4.2333" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -292.77)" display="none" stroke-width=".23666"><rect x=".28112" y="293.43" width="3.7042" height="1.1906" ry=".20225"/><rect x=".26458" y="295.15" width="3.7042" height="1.1906" ry=".20225"/></g><g transform="translate(0 -292.77)"><g transform="matrix(.040404 0 0 .040404 -3.0978 290.01)"><rect x="83.629" y="114.13" width="91.678" height="13.097" stroke-width="3.9049"/><path d="m155.25 81.388-26.194 26.194-26.194-26.154z" stroke-width="6.5484"/><path d="m155.25 159.97-26.194-26.194-26.194 26.154z" stroke-width="6.5484"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 671 B |
1
img/toggle-view-expand.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 4.2333 4.2333" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -292.77)" display="none" stroke-width=".23666"><rect x=".28112" y="293.43" width="3.7042" height="1.1906" ry=".20225"/><rect x=".26458" y="295.15" width="3.7042" height="1.1906" ry=".20225"/></g><g transform="translate(0 -292.77)"><g transform="matrix(.040404 0 0 .040404 -3.0978 290.01)"><rect x="83.629" y="114.13" width="91.678" height="13.097" stroke-width="3.9049"/><path d="m155.25 107.58-26.194-26.194-26.194 26.154z" stroke-width="6.5484"/><path d="m155.25 133.78-26.194 26.194-26.194-26.154z" stroke-width="6.5484"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 671 B |
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"directory": "vendor"
|
||||
}
|
||||
124
js/Gruntfile.js
@@ -1,124 +0,0 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/* global module */
|
||||
|
||||
module.exports = function(grunt) {
|
||||
'use strict';
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-wrap');
|
||||
grunt.loadNpmTasks('grunt-karma');
|
||||
grunt.loadNpmTasks('grunt-phpunit');
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
meta: {
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
version: '<%= meta.pkg.version %>',
|
||||
configJS: 'config/',
|
||||
buildJS: [
|
||||
'app/**/*.js',
|
||||
'controller/**/*.js',
|
||||
'filters/**/*.js',
|
||||
'directive/**/*.js',
|
||||
'service/**/*.js'
|
||||
],
|
||||
productionJS: 'public/',
|
||||
testsJS: '../tests/js/'
|
||||
},
|
||||
|
||||
concat: {
|
||||
options: {
|
||||
stripBanners: true
|
||||
},
|
||||
dist: {
|
||||
src: ['<%= meta.buildJS %>'],
|
||||
dest: '<%= meta.productionJS %>app.js'
|
||||
}
|
||||
},
|
||||
|
||||
wrap: {
|
||||
app: {
|
||||
src: ['<%= meta.productionJS %>app.js'],
|
||||
dest: '<%= meta.productionJS %>app.js',
|
||||
option: {
|
||||
wrapper: [
|
||||
'(function(angular, $, oc_requesttoken, undefined){\n\n\'use strict\';\n\n',
|
||||
'\n})(angular, jQuery, oc_requesttoken);'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
jshint: {
|
||||
files: [
|
||||
'Gruntfile.js',
|
||||
'<%= meta.buildJS %>**/*.js',
|
||||
'<%= meta.testsJS %>**/*.js'
|
||||
],
|
||||
options: {
|
||||
jshintrc: '.jshintrc',
|
||||
reporter: require('jshint-stylish')
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
concat: {
|
||||
files: ['<%=meta.buildJS%>'],
|
||||
options: {
|
||||
livereload: true
|
||||
},
|
||||
tasks: ['build']
|
||||
}
|
||||
},
|
||||
|
||||
phpunit: {
|
||||
classes: {
|
||||
dir: '../tests/unit'
|
||||
},
|
||||
options: {
|
||||
bootstrap: '../tests/bootstrap.php',
|
||||
colors: true
|
||||
}
|
||||
},
|
||||
|
||||
karma: {
|
||||
unit: {
|
||||
configFile: '<%= meta.testsJS %>config/karma.js'
|
||||
},
|
||||
continuous: {
|
||||
configFile: '<%= meta.testsJS %>config/karma.js',
|
||||
browsers: ['Firefox'],
|
||||
singleRun: true,
|
||||
reporters: ['progress']
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// make tasks available under simpler commands
|
||||
grunt.registerTask('build', ['jshint', 'concat', 'wrap']);
|
||||
grunt.registerTask('js-unit', ['karma:continuous']);
|
||||
|
||||
};
|
||||
@@ -4,20 +4,20 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* global angular */
|
||||
@@ -41,13 +41,24 @@ angular.module('markdown', [])
|
||||
};
|
||||
}]);
|
||||
|
||||
import uirouter from '@uirouter/angularjs';
|
||||
import ngsanitize from 'angular-sanitize';
|
||||
import angularuiselect from 'ui-select';
|
||||
import ngsortable from 'ng-sortable';
|
||||
import md from 'angular-markdown-it';
|
||||
import nganimate from 'angular-animate';
|
||||
import 'angular-file-upload';
|
||||
import ngInfiniteScroll from 'ng-infinite-scroll';
|
||||
import '../legacy/jquery.atwho.min';
|
||||
import '../legacy/jquery.caret.min';
|
||||
|
||||
var app = angular.module('Deck', [
|
||||
'ngRoute',
|
||||
'ngSanitize',
|
||||
'ui.router',
|
||||
'ui.select',
|
||||
'as.sortable',
|
||||
'mdMarkdownIt',
|
||||
'ngAnimate'
|
||||
ngsanitize,
|
||||
uirouter,
|
||||
angularuiselect,
|
||||
ngsortable, md, nganimate,
|
||||
'angularFileUpload',
|
||||
ngInfiniteScroll
|
||||
]);
|
||||
|
||||
export default app;
|
||||
|
||||
@@ -22,18 +22,27 @@
|
||||
|
||||
/* global app oc_requesttoken markdownitLinkTarget */
|
||||
|
||||
app.config(function ($provide, $routeProvider, $interpolateProvider, $httpProvider, $urlRouterProvider, $stateProvider, $compileProvider, markdownItConverterProvider) {
|
||||
import app from './App.js';
|
||||
import md from 'angular-markdown-it';
|
||||
import markdownitLinkTarget from 'markdown-it-link-target';
|
||||
import markdownitCheckbox from 'legacy/markdown-it-checkbox.js';
|
||||
|
||||
app.config(function ($provide, $interpolateProvider, $httpProvider, $urlRouterProvider, $stateProvider, $compileProvider, markdownItConverterProvider) {
|
||||
'use strict';
|
||||
$httpProvider.defaults.headers.common.requesttoken = oc_requesttoken;
|
||||
|
||||
|
||||
$compileProvider.debugInfoEnabled(true);
|
||||
// This should fix adding "unsafe:" prefix to ui-select href links containing javascript
|
||||
// inline JS is blocked by CSP anyway and filtered out by our markdown renderer as well
|
||||
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
|
||||
|
||||
markdownItConverterProvider.config({
|
||||
breaks: true,
|
||||
linkify: true,
|
||||
xhtmlOut: true
|
||||
});
|
||||
markdownItConverterProvider.use(markdownitLinkTarget);
|
||||
markdownItConverterProvider.use(markdownitLinkTarget).use(markdownitCheckbox);
|
||||
|
||||
$urlRouterProvider.otherwise('/');
|
||||
|
||||
@@ -62,19 +71,47 @@ app.config(function ($provide, $routeProvider, $interpolateProvider, $httpProvid
|
||||
tab: {value: 0, dynamic: true},
|
||||
},
|
||||
views: {
|
||||
'sidebarView': {
|
||||
templateUrl: '/board.sidebarView.html'
|
||||
'sidebarView@': {
|
||||
templateUrl: '/board.sidebarView.html',
|
||||
controller: 'BoardController'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('board.card', {
|
||||
url: '/card/:cardId',
|
||||
params: {
|
||||
tab: {value: 0, dynamic: true},
|
||||
},
|
||||
views: {
|
||||
'sidebarView': {
|
||||
'sidebarView@': {
|
||||
templateUrl: '/card.sidebarView.html',
|
||||
controller: 'CardController'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
$provide.decorator('nvFileOverDirective', function ($delegate) {
|
||||
var directive = $delegate[0],
|
||||
link = directive.link;
|
||||
|
||||
directive.compile = function () {
|
||||
return function (scope, element, attrs) {
|
||||
var overClass = attrs.overClass || 'nv-file-over';
|
||||
link.apply(this, arguments);
|
||||
let counter = 0;
|
||||
element.on('dragenter', function (event) {
|
||||
counter++;
|
||||
});
|
||||
element.on('dragleave', function (event) {
|
||||
counter--;
|
||||
if (counter <= 0) {
|
||||
$('.' + overClass).removeClass(overClass);
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
return $delegate;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -4,25 +4,27 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
import app from './App.js';
|
||||
|
||||
/* global Snap */
|
||||
app.run(function ($document, $rootScope, $transitions, BoardService) {
|
||||
'use strict';
|
||||
|
||||
$document.click(function (event) {
|
||||
$rootScope.$broadcast('documentClicked', event);
|
||||
});
|
||||
@@ -54,26 +56,6 @@ app.run(function ($document, $rootScope, $transitions, BoardService) {
|
||||
OC.filePath('deck', 'img', 'app-512.png')
|
||||
);
|
||||
|
||||
$('#app-navigation-toggle').off('click');
|
||||
// App sidebar on mobile
|
||||
var snapper = new Snap({
|
||||
element: document.getElementById('app-content'),
|
||||
disable: 'right',
|
||||
maxPosition: 250,
|
||||
touchToDrag: false
|
||||
});
|
||||
|
||||
$('#app-navigation-toggle').click(function () {
|
||||
if ($(window).width() > 768) {
|
||||
$('#app-navigation').toggle('hidden');
|
||||
} else {
|
||||
if (snapper.state().state === 'left') {
|
||||
snapper.close();
|
||||
} else {
|
||||
snapper.open('left');
|
||||
}
|
||||
}
|
||||
});
|
||||
// Select all elements with data-toggle="tooltips" in the document
|
||||
$('body').tooltip({
|
||||
selector: '[data-toggle="tooltip"]'
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "deck",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"angular": "~1.6.1",
|
||||
"angular-route": "~1.6.1",
|
||||
"angular-mocks": "~1.6.1",
|
||||
"angular-sanitize": "~1.6.1",
|
||||
"angular-animate": "~1.6.1",
|
||||
"ng-sortable": "1.3.8",
|
||||
"jquery": "3.2.x",
|
||||
"es6-shim": "~0.*",
|
||||
"js-url": "~2.*",
|
||||
"angular-ui-select": "~0.19.6",
|
||||
"angular-markdown-it": "~0.6.1",
|
||||
"angular-ui-router": "~1.0.0",
|
||||
"markdown-it-link-target": "~1.0.1",
|
||||
"jquery-timepicker": "883bb2cd94"
|
||||
},
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"ignore": [
|
||||
"'**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
342
js/controller/ActivityController.js
Normal file
@@ -0,0 +1,342 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/* global OC OCA OCP t escapeHTML Handlebars */
|
||||
|
||||
import CommentCollection from '../legacy/commentcollection';
|
||||
import CommentModel from '../legacy/commentmodel';
|
||||
|
||||
class ActivityController {
|
||||
constructor ($scope, CardService, ActivityService, BoardService) {
|
||||
'ngInject';
|
||||
this.cardservice = CardService;
|
||||
this.boardservice = BoardService;
|
||||
this.activityservice = ActivityService;
|
||||
this.$scope = $scope;
|
||||
this.type = '';
|
||||
this.loading = false;
|
||||
this.status = {
|
||||
commentCreateLoading: false
|
||||
};
|
||||
this.$scope.newComment = '';
|
||||
|
||||
this.currentUser = OC.getCurrentUser();
|
||||
|
||||
const self = this;
|
||||
this.$scope.$watch(function () {
|
||||
return self.element.id;
|
||||
}, function (params) {
|
||||
if (self.getData(self.element.id).length === 0) {
|
||||
if (self.type === 'deck_card') {
|
||||
self.activityservice.loadComments(self.element.id);
|
||||
}
|
||||
self.loading = true;
|
||||
self.fetchUntilResults();
|
||||
}
|
||||
self.activityservice.fetchNewerActivities(self.type, self.element.id).then(function () {});
|
||||
if (self.type === 'deck_card') {
|
||||
self.cardservice.getCurrent().commentsUnread = 0;
|
||||
}
|
||||
}, true);
|
||||
|
||||
let $target = $('.newCommentForm .message');
|
||||
this.applyAtWho($target);
|
||||
|
||||
this.activityservice.subscribe(this.$scope, function() {
|
||||
self.$scope.$apply();
|
||||
});
|
||||
|
||||
if (typeof OCA.Activity.Templates !== 'undefined') {
|
||||
OCA.Activity.Templates.userLocal = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper;
|
||||
// Compiled handlesbars template
|
||||
// '<span class="avatar-name-wrapper"><avatar ng-attr-contactsmenu ng-attr-tooltip ng-attr-user="{{ id }}" ng-attr-displayname="{{name}}" ng-attr-size="16"></avatar> {{ name }}</span>';
|
||||
return "<span class=\"avatar-name-wrapper\"><avatar ng-attr-contactsmenu ng-attr-tooltip ng-attr-user=\""
|
||||
+ container.escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\" ng-attr-displayname=\""
|
||||
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ "\" ng-attr-size=\"16\"></avatar> "
|
||||
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ "</span>";
|
||||
},"useData":true});
|
||||
} else {
|
||||
OCA.Activity.RichObjectStringParser._userLocalTemplate = '<span class="avatar-name-wrapper"><avatar ng-attr-contactsmenu ng-attr-tooltip ng-attr-user="{{ id }}" ng-attr-displayname="{{name}}" ng-attr-size="16"></avatar> {{ name }}</span>';
|
||||
}
|
||||
}
|
||||
|
||||
applyAtWho($target) {
|
||||
const self = this;
|
||||
if (!$target) {
|
||||
return;
|
||||
}
|
||||
$target.atwho({
|
||||
at: '@',
|
||||
callbacks: {
|
||||
remoteFilter: function(query, callback) {
|
||||
let uids = self.boardservice.getUsers();
|
||||
uids = uids.filter((x) => x.uid.toLowerCase().includes(query.toLowerCase()) || x.displayname.toLowerCase().includes(query.toLowerCase()));
|
||||
callback(uids);
|
||||
},
|
||||
highlighter: function (li) {
|
||||
// misuse the highlighter callback to instead of
|
||||
// highlighting loads the avatars.
|
||||
var $li = $(li);
|
||||
$li.find('.avatar').avatar(undefined, 32);
|
||||
return $li;
|
||||
},
|
||||
sorter: function (q, items) { return items; }
|
||||
},
|
||||
displayTpl: function (item) {
|
||||
return '<li>' +
|
||||
'<span class="avatar-name-wrapper">' +
|
||||
'<span class="avatar" ' +
|
||||
'data-username="' + escapeHTML(item.uid) + '" ' + // for avatars
|
||||
'data-user="' + escapeHTML(item.uid) + '" ' + // for contactsmenu
|
||||
'data-user-display-name="' + escapeHTML(item.displayname) + '">' +
|
||||
'</span>' +
|
||||
'<strong>' + escapeHTML(item.displayname) + '</strong>' +
|
||||
'</span></li>';
|
||||
},
|
||||
insertTpl: function (item) {
|
||||
return '' +
|
||||
'<span class="avatar-name-wrapper">' +
|
||||
'<span class="avatar" ' +
|
||||
'data-username="' + escapeHTML(item.uid) + '" ' + // for avatars
|
||||
'data-user="' + escapeHTML(item.uid) + '" ' + // for contactsmenu
|
||||
'data-user-display-name="' + escapeHTML(item.displayname) + '">' +
|
||||
'</span>' +
|
||||
'<strong>' + escapeHTML(item.displayname) + '</strong>' +
|
||||
'</span>';
|
||||
},
|
||||
searchKey: 'displayname'
|
||||
});
|
||||
$target.on('inserted.atwho', function (je, $el) {
|
||||
$(je.target).find(
|
||||
'span[data-username="' + $el.find('[data-username]').data('username') + '"]'
|
||||
).avatar(undefined, 16);
|
||||
});
|
||||
$target.on('shown.atwho', function (je) {
|
||||
$target.find('.avatar').avatar(undefined, 16);
|
||||
});
|
||||
}
|
||||
|
||||
commentBodyToPlain(content) {
|
||||
let $comment = $('<div/>').html(content);
|
||||
$comment.find('.avatar-name-wrapper').each(function () {
|
||||
var $this = $(this);
|
||||
var $inserted = $this.parent();
|
||||
$inserted.html('@' + $this.find('.avatar').data('username'));
|
||||
});
|
||||
$comment.html(OCP.Comments.richToPlain($comment.html()));
|
||||
$comment.html($comment.html().replace(/<br\s*[\/]?>/gi, '\n'));
|
||||
return $comment.text();
|
||||
}
|
||||
|
||||
static _composeHTMLMention(uid, displayName) {
|
||||
var avatar = '' +
|
||||
'<span class="avatar" data-username="' + escapeHTML(uid) + '" data-user="' + escapeHTML(uid) + '" ng-attr-size="16" ' +
|
||||
'ng-attr-user="' + escapeHTML(uid) + '" ' +
|
||||
'ng-attr-displayname="' + escapeHTML(displayName) + '" ng-attr-contactsmenu="true">' +
|
||||
'</span>';
|
||||
|
||||
var isCurrentUser = (uid === OC.getCurrentUser().uid);
|
||||
|
||||
return '' +
|
||||
'<span class="atwho-inserted" contenteditable="false">' +
|
||||
'<span class="avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '">' +
|
||||
avatar +
|
||||
'<strong>' + escapeHTML(displayName) + '</strong>' +
|
||||
'</span>' +
|
||||
'</span>';
|
||||
}
|
||||
|
||||
formatMessage(activity) {
|
||||
let message = activity.message;
|
||||
let mentions = activity.commentModel.get('mentions');
|
||||
const editMode = false;
|
||||
message = escapeHTML(message).replace(/\n/g, '<br/>');
|
||||
|
||||
for(var i in mentions) {
|
||||
if(!mentions.hasOwnProperty(i)) {
|
||||
return;
|
||||
}
|
||||
var mention = '@' + mentions[i].mentionId;
|
||||
// escape possible regex characters in the name
|
||||
mention = mention.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
|
||||
const displayName = ActivityController._composeHTMLMention(mentions[i].mentionId, mentions[i].mentionDisplayName);
|
||||
// replace every mention either at the start of the input or after a whitespace
|
||||
// followed by a non-word character.
|
||||
message = message.replace(new RegExp('(^|\\s)(' + mention + ')\\b', 'g'),
|
||||
function(match, p1) {
|
||||
// to get number of whitespaces (0 vs 1) right
|
||||
return p1+displayName;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
if(editMode !== true) {
|
||||
message = OCP.Comments.plainToRich(message);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
postComment() {
|
||||
const self = this;
|
||||
this.status.commentCreateLoading = true;
|
||||
|
||||
let content = this.commentBodyToPlain(self.$scope.newComment);
|
||||
if (content.length < 1) {
|
||||
self.status.commentCreateLoading = false;
|
||||
OC.Notification.showTemporary(t('deck', 'Please provide a content for your comment.'));
|
||||
return;
|
||||
}
|
||||
var model = this.activityservice.commentCollection.create({
|
||||
actorId: OC.getCurrentUser().uid,
|
||||
actorDisplayName: OC.getCurrentUser().displayName,
|
||||
actorType: 'users',
|
||||
verb: 'comment',
|
||||
message: content,
|
||||
creationDateTime: (new Date()).toUTCString()
|
||||
}, {
|
||||
at: 0,
|
||||
// wait for real creation before adding
|
||||
wait: true,
|
||||
success: function() {
|
||||
self.$scope.newComment = '';
|
||||
self.activityservice.fetchNewerActivities(self.type, self.element.id).then(function () {});
|
||||
self.status.commentCreateLoading = false;
|
||||
},
|
||||
error: function() {
|
||||
self.status.commentCreateLoading = false;
|
||||
OC.Notification.showTemporary(t('deck', 'Posting the comment failed.'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
updateComment(item) {
|
||||
item.commentEdit = this.formatMessage(item);
|
||||
let $target = $('.newCommentForm .message');
|
||||
this.applyAtWho($target);
|
||||
/** Workaround to trigger avatar rendering after the view has been updated */
|
||||
window.setTimeout(function () {
|
||||
$target.find('.avatar').avatar(undefined, 16);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
editComment(item) {
|
||||
const self = this;
|
||||
let content = this.commentBodyToPlain(item.commentEdit);
|
||||
if (content.length < 1) {
|
||||
OC.Notification.showTemporary(t('deck', 'Please provide a content for your comment.'));
|
||||
return;
|
||||
}
|
||||
/** We need to save the model and afterwards run a fetch to update the mentions
|
||||
* and call apply to propagate the changes to angular
|
||||
*/
|
||||
item.commentModel.on('sync', function() {
|
||||
item.commentModel.off('sync');
|
||||
item.commentModel.fetch({
|
||||
success: function() {
|
||||
self.$scope.$apply();
|
||||
}
|
||||
});
|
||||
});
|
||||
item.commentModel.save({
|
||||
message: content,
|
||||
});
|
||||
item.message = content;
|
||||
item.commentEdit = undefined;
|
||||
}
|
||||
|
||||
deleteComment(item) {
|
||||
item.commentModel.destroy();
|
||||
item.deleted = true;
|
||||
item.commentModel = undefined;
|
||||
item.message = t('deck', 'The comment has been deleted');
|
||||
}
|
||||
|
||||
getData(id) {
|
||||
return this.activityservice.getData(this.type, id);
|
||||
}
|
||||
|
||||
parseMessage(subject, parameters) {
|
||||
return OCA.Activity.RichObjectStringParser.parseMessage(subject, parameters);
|
||||
}
|
||||
|
||||
fetchUntilResults () {
|
||||
const self = this;
|
||||
let dataLengthBefore = self.getData(self.element.id).length;
|
||||
let _executeFetch = function() {
|
||||
let promise = self.activityservice.fetchMoreActivities(self.type, self.element.id);
|
||||
promise.then(function (data) {
|
||||
let dataLengthAfter = self.getData(self.element.id).length;
|
||||
if (data !== null && (dataLengthAfter <= dataLengthBefore || dataLengthAfter < self.activityservice.RESULT_PER_PAGE)) {
|
||||
_executeFetch();
|
||||
} else {
|
||||
self.loading = false;
|
||||
}
|
||||
}, function () {
|
||||
self.loading = false;
|
||||
self.$scope.$apply();
|
||||
});
|
||||
|
||||
};
|
||||
_executeFetch();
|
||||
}
|
||||
|
||||
getComments() {
|
||||
return this.activityservice.comments;
|
||||
}
|
||||
|
||||
getActivityStream() {
|
||||
let activities = this.activityservice.getData(this.type, this.element.id);
|
||||
return activities;
|
||||
}
|
||||
|
||||
page() {
|
||||
if (!this.activityservice.since[this.type][this.element.id].finished) {
|
||||
this.loading = true;
|
||||
this.fetchUntilResults();
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
loadingNewer() {
|
||||
return this.activityservice.runningNewer;
|
||||
}
|
||||
|
||||
t(text) {
|
||||
return t('deck', text);
|
||||
}
|
||||
}
|
||||
|
||||
let activityComponent = {
|
||||
templateUrl: OC.linkTo('deck', 'templates/part.card.activity.html'),
|
||||
controller: ActivityController,
|
||||
bindings: {
|
||||
type: '@',
|
||||
element: '='
|
||||
}
|
||||
};
|
||||
export default activityComponent;
|
||||
@@ -4,27 +4,41 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
|
||||
/** global: OC */
|
||||
app.controller('AppController', function ($scope, $location, $http, $route, $log, $rootScope) {
|
||||
app.controller('AppController', function ($scope, $location, $http, $log, $rootScope, $attrs) {
|
||||
$rootScope.sidebar = {
|
||||
show: false
|
||||
};
|
||||
$scope.sidebar = $rootScope.sidebar;
|
||||
$scope.user = oc_current_user;
|
||||
});
|
||||
$rootScope.config = JSON.parse($attrs.config);
|
||||
|
||||
$rootScope.compactMode = localStorage.getItem('deck.compactMode') === 'true';
|
||||
|
||||
$scope.appNavigationHide = false;
|
||||
|
||||
$scope.toggleSidebar = function() {
|
||||
if ($(window).width() > 768) {
|
||||
$scope.appNavigationHide = !$scope.appNavigationHide;
|
||||
console.log($scope.appNavigationHide);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
78
js/controller/AttachmentController.js
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/* global OC */
|
||||
|
||||
class AttachmentListController {
|
||||
constructor ($scope, CardService, FileService) {
|
||||
'ngInject';
|
||||
this.cardservice = CardService;
|
||||
this.fileservice = FileService;
|
||||
this.attachments = CardService.getCurrent().attachments;
|
||||
}
|
||||
|
||||
mimetypeForAttachment(attachment) {
|
||||
let url = OC.MimeType.getIconUrl(attachment.extendedData.mimetype);
|
||||
let styles = {
|
||||
'background-image': `url("${url}")`,
|
||||
};
|
||||
return styles;
|
||||
}
|
||||
|
||||
attachmentUrl(attachment) {
|
||||
let cardId = this.cardservice.getCurrent().id;
|
||||
let attachmentId = attachment.id;
|
||||
return OC.generateUrl(`/apps/deck/cards/${cardId}/attachment/${attachmentId}`);
|
||||
}
|
||||
|
||||
getAttachmentMarkdown(attachment) {
|
||||
const inlineMimetypes = ['image/png', 'image/jpg', 'image/jpeg'];
|
||||
let url = this.attachmentUrl(attachment);
|
||||
let filename = attachment.data;
|
||||
let insertText = `[📎 ${filename}](${url})`;
|
||||
if (inlineMimetypes.indexOf(attachment.extendedData.mimetype) > -1) {
|
||||
insertText = ``;
|
||||
}
|
||||
return insertText;
|
||||
}
|
||||
|
||||
select(attachment) {
|
||||
this.onSelect({attachment: this.getAttachmentMarkdown(attachment)});
|
||||
}
|
||||
|
||||
abort() {
|
||||
this.onAbort();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let attachmentListComponent = {
|
||||
templateUrl: '/card.attachments.html',
|
||||
controller: AttachmentListController,
|
||||
bindings: {
|
||||
isFileSelector: '<',
|
||||
attachments: '=',
|
||||
onSelect: '&',
|
||||
onAbort: '&'
|
||||
}
|
||||
};
|
||||
export default attachmentListComponent;
|
||||
@@ -4,24 +4,25 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* global oc_defaults OC */
|
||||
app.controller('BoardController', function ($rootScope, $scope, $stateParams, StatusService, BoardService, StackService, CardService, LabelService, $state, $transitions, $filter) {
|
||||
import app from '../app/App.js';
|
||||
/* global oc_defaults OC OCP OCA */
|
||||
app.controller('BoardController', function ($rootScope, $scope, $stateParams, StatusService, BoardService, StackService, CardService, LabelService, $state, $transitions, $filter, FileService) {
|
||||
|
||||
$scope.sidebar = $rootScope.sidebar;
|
||||
|
||||
@@ -39,6 +40,48 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
$scope.labelservice = LabelService;
|
||||
$scope.defaultColors = ['31CC7C', '317CCC', 'FF7A66', 'F1DB50', '7C31CC', 'CC317C', '3A3B3D', 'CACBCD'];
|
||||
$scope.board = BoardService.getCurrent();
|
||||
$scope.uploader = FileService.uploader;
|
||||
|
||||
$scope.startTitleEdit = function(card) {
|
||||
card.renameTitle = card.title;
|
||||
card.status = card.status || {};
|
||||
card.status.editCard = true;
|
||||
};
|
||||
|
||||
$scope.finishTitleEdit = function(card) {
|
||||
var newTitle;
|
||||
if (!card.renameTitle || !card.renameTitle.trim()) {
|
||||
newTitle = '';
|
||||
} else {
|
||||
newTitle = card.renameTitle.trim();
|
||||
}
|
||||
|
||||
if (newTitle === card.title) {
|
||||
// title unchanged
|
||||
card.status.editCard = false;
|
||||
delete card.renameTitle;
|
||||
} else if (newTitle !== '') {
|
||||
// title changed
|
||||
card.title = newTitle;
|
||||
CardService.update(card).then(function (data) {
|
||||
card.status.editCard = false;
|
||||
delete card.renameTitle;
|
||||
});
|
||||
} else {
|
||||
// empty title
|
||||
card.status.editCard = false;
|
||||
delete card.renameTitle;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.$watch(function() {
|
||||
return $scope.params.tab;
|
||||
}, function (newTab, oldTab) {
|
||||
if (newTab === 2 && oldTab !== 2) {
|
||||
CardService.fetchDeleted($scope.id);
|
||||
StackService.fetchDeleted($scope.id);
|
||||
}
|
||||
});
|
||||
|
||||
// workaround for $stateParams changes not being propagated
|
||||
$scope.$watch(function() {
|
||||
@@ -46,8 +89,24 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
}, function (params) {
|
||||
$scope.params = params;
|
||||
}, true);
|
||||
$scope.params = $state;
|
||||
$scope.params = $state.params;
|
||||
|
||||
/**
|
||||
* Check for markdown checkboxes in description to render the counter
|
||||
*
|
||||
* This should probably be moved to the backend at some point
|
||||
*
|
||||
* @param text
|
||||
* @returns array of [finished, total] checkboxes
|
||||
*/
|
||||
$scope.getCheckboxes = function(text) {
|
||||
const regTotal = /\[(X|\s|\_|\-)\]/igm;
|
||||
const regFinished = /\[(X|\_|\-)\]/igm;
|
||||
return [
|
||||
((text || '').match(regFinished) || []).length,
|
||||
((text || '').match(regTotal) || []).length
|
||||
];
|
||||
};
|
||||
|
||||
$scope.search = function (searchText) {
|
||||
$scope.searchText = searchText;
|
||||
@@ -88,6 +147,11 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
}
|
||||
});
|
||||
|
||||
$scope.toggleCompactMode = function() {
|
||||
$rootScope.compactMode = !$rootScope.compactMode;
|
||||
localStorage.setItem('deck.compactMode', JSON.stringify($rootScope.compactMode));
|
||||
};
|
||||
|
||||
$scope.stacksData = StackService;
|
||||
$scope.stacks = [];
|
||||
$scope.$watch('stacksData', function () {
|
||||
@@ -152,36 +216,101 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
// Create a new Stack
|
||||
$scope.createStack = function () {
|
||||
StackService.create($scope.newStack).then(function (data) {
|
||||
$scope.newStack.title = "";
|
||||
$scope.newStack.title = '';
|
||||
});
|
||||
};
|
||||
|
||||
$scope.createCard = function (stack, title) {
|
||||
var newCard = {
|
||||
'title': title,
|
||||
'stackId': stack,
|
||||
'type': 'plain'
|
||||
};
|
||||
CardService.create(newCard).then(function (data) {
|
||||
$scope.stackservice.addCard(data);
|
||||
$scope.newCard.title = "";
|
||||
});
|
||||
if (this['addCardForm' + stack].$valid) {
|
||||
var newCard = {
|
||||
'title': title,
|
||||
'stackId': stack,
|
||||
'type': 'plain'
|
||||
};
|
||||
CardService.create(newCard).then(function (data) {
|
||||
$scope.stackservice.addCard(data);
|
||||
$scope.newCard.title = '';
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.stackDelete = function (stack) {
|
||||
$scope.stackservice.delete(stack.id);
|
||||
};
|
||||
|
||||
$scope.stackUndoDelete = function (deletedStack) {
|
||||
return StackService.undoDelete(deletedStack);
|
||||
};
|
||||
|
||||
$scope.cardDelete = function (card) {
|
||||
OC.dialogs.confirm(t('deck', 'Are you sure you want to delete this card with all of its data?'), t('deck', 'Delete'), function(state) {
|
||||
if (!state) {
|
||||
return;
|
||||
}
|
||||
CardService.delete(card.id).then(function () {
|
||||
StackService.removeCard(card);
|
||||
});
|
||||
CardService.delete(card.id).then(function () {
|
||||
StackService.removeCard(card);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.cardOrCardAndStackUndoDelete = function (deletedCard) {
|
||||
var associatedDeletedStack = $scope.stackservice.deleted[deletedCard.stackId];
|
||||
if(associatedDeletedStack !== undefined) {
|
||||
$scope.cardAndStackUndoDeleteAskForConfirmation(deletedCard, associatedDeletedStack);
|
||||
} else {
|
||||
$scope.cardUndoDelete(deletedCard);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.cardAndStackUndoDeleteAskForConfirmation = function(deletedCard, associatedDeletedStack) {
|
||||
OC.dialogs.confirm(
|
||||
t('deck', 'The associated stack is deleted as well, it will be restored as well.'),
|
||||
t('deck', 'Restore associated stack'),
|
||||
function(state) {
|
||||
if (state) {
|
||||
$scope.cardAndStackUndoDelete(deletedCard, associatedDeletedStack);
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
$scope.cardAndStackUndoDelete = function(deletedCard, associatedDeletedStack) {
|
||||
$scope.stackUndoDelete(associatedDeletedStack).then(function() {
|
||||
$scope.cardUndoDelete(deletedCard);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.cardUndoDelete = function(deletedCard) {
|
||||
CardService.undoDelete(deletedCard).then(function() {
|
||||
StackService.addCard(deletedCard);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.cardArchive = function (card) {
|
||||
CardService.archive(card);
|
||||
StackService.removeCard(card);
|
||||
};
|
||||
|
||||
$scope.isCurrentUserAssigned = function (card) {
|
||||
if (! CardService.get(card.id).assignedUsers) {
|
||||
return false;
|
||||
}
|
||||
var userList = CardService.get(card.id).assignedUsers.filter(function (obj) {
|
||||
return obj.participant.uid === OC.getCurrentUser().uid;
|
||||
});
|
||||
return userList.length === 1;
|
||||
};
|
||||
|
||||
$scope.cardAssignToMe = function (card) {
|
||||
CardService.assignUser(card, OC.getCurrentUser().uid)
|
||||
.then(
|
||||
function() {StackService.updateCard(card);}
|
||||
);
|
||||
// TODO: remove this jquery call. Fix and use appPopoverMenuUtils instead
|
||||
$('.popovermenu').addClass('hidden');
|
||||
};
|
||||
|
||||
$scope.cardUnassignFromMe = function (card) {
|
||||
CardService.unassignUser(card, OC.getCurrentUser().uid);
|
||||
StackService.updateCard(card);
|
||||
// TODO: remove this jquery call.Fix and use appPopoverMenuUtils instead
|
||||
$('.popovermenu').addClass('hidden');
|
||||
};
|
||||
$scope.cardUnarchive = function (card) {
|
||||
CardService.unarchive(card);
|
||||
StackService.removeCard(card);
|
||||
@@ -194,10 +323,11 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
BoardService.getCurrent().labels.splice(i, 1);
|
||||
// TODO: remove from cards
|
||||
};
|
||||
|
||||
$scope.labelCreate = function (label) {
|
||||
label.boardId = $scope.id;
|
||||
LabelService.create(label).then(function (data) {
|
||||
$scope.newStack.title = "";
|
||||
$scope.newStack.title = '';
|
||||
BoardService.getCurrent().labels.push(data);
|
||||
$scope.status.createLabel = false;
|
||||
$scope.newLabel = {};
|
||||
@@ -213,12 +343,14 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
BoardService.addAcl(sharee);
|
||||
$scope.status.addSharee = null;
|
||||
};
|
||||
|
||||
$scope.aclDelete = function (acl) {
|
||||
BoardService.deleteAcl(acl).then(function(data) {
|
||||
$scope.loadDefault();
|
||||
$scope.refreshData();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.aclUpdate = function (acl) {
|
||||
BoardService.updateAcl(acl);
|
||||
};
|
||||
@@ -243,7 +375,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
itemMoved: function (event) {
|
||||
event.source.itemScope.modelValue.status = event.dest.sortableScope.$parent.column;
|
||||
var order = event.dest.index;
|
||||
var card = event.source.itemScope.c;
|
||||
var card = $scope.cardservice.get(event.source.itemScope.c.id);
|
||||
var newStack = event.dest.sortableScope.$parent.s.id;
|
||||
var oldStack = card.stackId;
|
||||
card.stackId = newStack;
|
||||
@@ -259,7 +391,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
},
|
||||
orderChanged: function (event) {
|
||||
var order = event.dest.index;
|
||||
var card = event.source.itemScope.c;
|
||||
var card = $scope.cardservice.get(event.source.itemScope.c.id);
|
||||
var stack = event.dest.sortableScope.$parent.s.id;
|
||||
CardService.reorder(card, order).then(function (data) {
|
||||
StackService.reorderCard(card, order);
|
||||
@@ -273,7 +405,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
// auto scroll on drag
|
||||
dragMove: function (itemPosition, containment, eventObj) {
|
||||
if (eventObj) {
|
||||
var container = $("#board");
|
||||
var container = $('#board');
|
||||
var offset = container.offset();
|
||||
var targetX = eventObj.pageX - (offset.left || container.scrollLeft());
|
||||
var targetY = eventObj.pageY - (offset.top || container.scrollTop());
|
||||
@@ -308,7 +440,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
containment: '#innerBoard',
|
||||
dragMove: function (itemPosition, containment, eventObj) {
|
||||
if (eventObj) {
|
||||
var container = $("#board");
|
||||
var container = $('#board');
|
||||
var offset = container.offset();
|
||||
var targetX = eventObj.pageX - (offset.left || container.scrollLeft());
|
||||
var targetY = eventObj.pageY - (offset.top || container.scrollTop());
|
||||
@@ -336,4 +468,27 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
};
|
||||
};
|
||||
|
||||
$scope.colorValue = function(color) {
|
||||
const re = /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/;
|
||||
if (re.test(color)) {
|
||||
return color;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
$scope.attachmentCount = function(card) {
|
||||
if (Array.isArray(card.attachments)) {
|
||||
return card.attachments.filter((obj) => obj.deletedAt === 0).length;
|
||||
}
|
||||
return card.attachmentCount;
|
||||
};
|
||||
|
||||
$scope.unreadCommentCount = function(card) {
|
||||
return card.commentsUnread;
|
||||
};
|
||||
|
||||
$scope.isTimelineEnabled = function() {
|
||||
return OCP.Comments && OCA.Activity;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
@@ -4,53 +4,137 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* global app moment */
|
||||
/* global app moment angular OC OCP OCA */
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.controller('CardController', function ($scope, $rootScope, $routeParams, $location, $stateParams, $interval, $timeout, $filter, BoardService, CardService, StackService, StatusService) {
|
||||
app.controller('CardController', function ($scope, $rootScope, $sce, $location, $stateParams, $state, $interval, $timeout, $filter, BoardService, CardService, StackService, StatusService, markdownItConverter, FileService) {
|
||||
$scope.sidebar = $rootScope.sidebar;
|
||||
$scope.status = {
|
||||
renameTitle: '',
|
||||
lastEdit: 0,
|
||||
lastSave: Date.now()
|
||||
};
|
||||
|
||||
$scope.cardservice = CardService;
|
||||
$scope.fileservice = FileService;
|
||||
$scope.cardId = $stateParams.cardId;
|
||||
|
||||
$scope.statusservice = StatusService.getInstance();
|
||||
$scope.boardservice = BoardService;
|
||||
|
||||
$scope.isArray = angular.isArray;
|
||||
// workaround for $stateParams changes not being propagated
|
||||
$scope.$watch(function() {
|
||||
return $state.params;
|
||||
}, function (params) {
|
||||
$scope.params = params;
|
||||
$scope.fileservice.reset();
|
||||
}, true);
|
||||
$scope.params = $state.params;
|
||||
|
||||
$scope.addAttachmentToDescription = function(insertText) {
|
||||
let el = document.querySelectorAll('textarea')[0];
|
||||
let start = el.selectionStart;
|
||||
let end = el.selectionEnd;
|
||||
let text = $scope.status.edit.description || '';
|
||||
let before = text.substring(0, start);
|
||||
let after = text.substring(end, text.length);
|
||||
let newText = before + '\n' + insertText + '\n' + after;
|
||||
$scope.status.edit.description = newText;
|
||||
el.selectionStart = el.selectionEnd = start + newText.length;
|
||||
el.focus();
|
||||
$scope.status.continueEdit = false;
|
||||
$scope.cardEditDescriptionChanged();
|
||||
$scope.status.selectAttachment = false;
|
||||
};
|
||||
|
||||
$scope.abortAttachmentSelection = function() {
|
||||
$scope.status.continueEdit = false;
|
||||
$scope.status.selectAttachment = false;
|
||||
let el = document.querySelectorAll('textarea')[0];
|
||||
el.focus();
|
||||
};
|
||||
|
||||
$scope.statusservice.retainWaiting();
|
||||
|
||||
$scope.description = function() {
|
||||
return $scope.rendered;
|
||||
};
|
||||
|
||||
$scope.updateMarkdown = function(content) {
|
||||
// only trust the html from markdown-it-checkbox
|
||||
$scope.rendered = $sce.trustAsHtml(markdownItConverter.render(content || ''));
|
||||
};
|
||||
|
||||
CardService.fetchOne($scope.cardId).then(function (data) {
|
||||
$scope.statusservice.releaseWaiting();
|
||||
$scope.archived = CardService.getCurrent().archived;
|
||||
$scope.updateMarkdown(CardService.getCurrent().description);
|
||||
}, function (error) {
|
||||
});
|
||||
|
||||
$scope.cardRenameShow = function () {
|
||||
if ($scope.archived || !BoardService.canEdit())
|
||||
{return false;}
|
||||
else {
|
||||
if ($scope.archived || !BoardService.canEdit()) {
|
||||
return false;
|
||||
} else {
|
||||
$scope.status.renameTitle = CardService.getCurrent().title;
|
||||
$scope.status.cardRename = true;
|
||||
}
|
||||
};
|
||||
$scope.cardEditDescriptionShow = function ($event) {
|
||||
|
||||
$scope.toggleCheckbox = function (id) {
|
||||
$('#markdown input[type=checkbox]').attr('disabled', true);
|
||||
$scope.status.edit = angular.copy(CardService.getCurrent());
|
||||
var reg = /\[(X|\s|\_|\-)\]/ig;
|
||||
var nth = 0;
|
||||
$scope.status.edit.description = $scope.status.edit.description.replace(reg, function (match, i, original) {
|
||||
var result = match;
|
||||
if ('' + nth++ === '' + id) {
|
||||
if (match.match(/^\[\s\]/i)) {
|
||||
result = match.replace(/\[\s\]/i, '[x]');
|
||||
}
|
||||
if (match.match(/^\[x\]/i)) {
|
||||
result = match.replace(/\[x\]/i, '[ ]');
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return match;
|
||||
});
|
||||
CardService.update($scope.status.edit).then(function (data) {
|
||||
var header = $('.tabDetails');
|
||||
header.find('.save-indicator.unsaved').hide();
|
||||
header.find('.save-indicator.saved').fadeIn(250).fadeOut(1000);
|
||||
});
|
||||
$('#markdown input[type=checkbox]').removeAttr('disabled');
|
||||
|
||||
};
|
||||
$scope.clickCardDescription = function ($event) {
|
||||
var checkboxId = $($event.target).data('id');
|
||||
if ($event.target.tagName === 'LABEL') {
|
||||
$scope.toggleCheckbox(checkboxId);
|
||||
$event.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
if ($event.target.tagName === 'INPUT') {
|
||||
$event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
if (BoardService.isArchived() || CardService.getCurrent().archived) {
|
||||
return false;
|
||||
}
|
||||
@@ -63,52 +147,68 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
||||
};
|
||||
$scope.cardEditDescriptionChanged = function ($event) {
|
||||
$scope.status.lastEdit = Date.now();
|
||||
var header = $('.section-header.card-description');
|
||||
var header = $('.tabDetails');
|
||||
header.find('.save-indicator.unsaved').show();
|
||||
header.find('.save-indicator.saved').hide();
|
||||
};
|
||||
$interval(function() {
|
||||
var currentTime = Date.now();
|
||||
var timeSinceEdit = currentTime-$scope.status.lastEdit;
|
||||
if (timeSinceEdit > 1000 && $scope.status.lastEdit > $scope.status.lastSave) {
|
||||
if (timeSinceEdit > 1000 && $scope.status.lastEdit > $scope.status.lastSave && !$scope.status.saving) {
|
||||
$scope.status.lastSave = currentTime;
|
||||
var header = $('.section-header.card-description');
|
||||
$scope.status.saving = true;
|
||||
var header = $('.tabDetails');
|
||||
header.find('.save-indicator.unsaved').fadeIn(500);
|
||||
CardService.update($scope.status.edit).then(function (data) {
|
||||
var header = $('.section-header.card-description');
|
||||
var header = $('.tabDetails');
|
||||
header.find('.save-indicator.unsaved').hide();
|
||||
header.find('.save-indicator.saved').fadeIn(250).fadeOut(1000);
|
||||
StackService.updateCard($scope.status.edit);
|
||||
$scope.status.saving = false;
|
||||
});
|
||||
}
|
||||
}, 500, 0, false);
|
||||
|
||||
// handle rename to update information on the board as well
|
||||
$scope.cardRename = function (card) {
|
||||
CardService.rename(card).then(function (data) {
|
||||
StackService.updateCard(card);
|
||||
var newTitle;
|
||||
if (!$scope.status.renameTitle || !$scope.status.renameTitle.trim()) {
|
||||
newTitle = '';
|
||||
} else {
|
||||
newTitle = $scope.status.renameTitle.trim();
|
||||
}
|
||||
|
||||
if (newTitle === card.title) {
|
||||
// title unchanged
|
||||
$scope.status.renameCard = false;
|
||||
});
|
||||
} else if (newTitle !== '') {
|
||||
// title changed
|
||||
card.title = newTitle;
|
||||
CardService.rename(card).then(function (data) {
|
||||
$scope.status.renameCard = false;
|
||||
});
|
||||
} else {
|
||||
// empty title
|
||||
$scope.status.renameTitle = card.title;
|
||||
$scope.status.renameCard = false;
|
||||
}
|
||||
};
|
||||
$scope.cardUpdate = function (card) {
|
||||
CardService.update(card).then(function (data) {
|
||||
$scope.status.cardEditDescription = false;
|
||||
var header = $('.section-content.card-description');
|
||||
$scope.updateMarkdown($scope.status.edit.description);
|
||||
var header = $('.tabDetails');
|
||||
header.find('.save-indicator.unsaved').hide();
|
||||
header.find('.save-indicator.saved').fadeIn(500).fadeOut(1000);
|
||||
StackService.updateCard(card);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.labelAssign = function (element, model) {
|
||||
CardService.assignLabel($scope.cardId, element.id).then(function (data) {
|
||||
StackService.updateCard(CardService.getCurrent());
|
||||
});
|
||||
};
|
||||
|
||||
$scope.labelRemove = function (element, model) {
|
||||
CardService.removeLabel($scope.cardId, element.id).then(function (data) {
|
||||
StackService.updateCard(CardService.getCurrent());
|
||||
});
|
||||
};
|
||||
|
||||
@@ -123,7 +223,6 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
||||
newDate.year(duedate.year());
|
||||
element.duedate = newDate.toISOString();
|
||||
CardService.update(element);
|
||||
StackService.updateCard(element);
|
||||
};
|
||||
$scope.setDuedateTime = function (time) {
|
||||
var element = CardService.getCurrent();
|
||||
@@ -135,16 +234,14 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
||||
newDate.minute(time.minute());
|
||||
element.duedate = newDate.toISOString();
|
||||
CardService.update(element);
|
||||
StackService.updateCard(element);
|
||||
};
|
||||
|
||||
$scope.resetDuedate = function () {
|
||||
var element = CardService.getCurrent();
|
||||
element.duedate = null;
|
||||
CardService.update(element);
|
||||
StackService.updateCard(element);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Show ui-select field when clicking the add button
|
||||
*/
|
||||
@@ -166,14 +263,12 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
||||
|
||||
$scope.addAssignedUser = function(item) {
|
||||
CardService.assignUser(CardService.getCurrent(), item.uid).then(function (data) {
|
||||
StackService.updateCard(CardService.getCurrent());
|
||||
});
|
||||
$scope.status.showAssignUser = false;
|
||||
};
|
||||
|
||||
$scope.removeAssignedUser = function(uid) {
|
||||
CardService.unassignUser(CardService.getCurrent(), uid).then(function (data) {
|
||||
StackService.updateCard(CardService.getCurrent());
|
||||
});
|
||||
};
|
||||
|
||||
@@ -184,4 +279,8 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
||||
};
|
||||
};
|
||||
|
||||
});
|
||||
$scope.isTimelineEnabled = function() {
|
||||
return OCP.Comments && OCA.Activity;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
44
js/controller/ColorPickerController.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Oskar Kurz <oskar.kurz@gmail.com>
|
||||
*
|
||||
* @author Oskar Kurz <oskar.kurz@gmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
|
||||
/* global oc_defaults OC */
|
||||
app.controller('ColorPickerController', ['$scope', function ($scope) {
|
||||
$scope.hashedColor = '';
|
||||
|
||||
$scope.setColor = function (object, color) {
|
||||
object.color = color;
|
||||
object.hashedColor = '#' + color;
|
||||
|
||||
return object;
|
||||
};
|
||||
|
||||
$scope.setHashedColor = function (object) {
|
||||
object.color = object.hashedColor.substr(1);
|
||||
return object;
|
||||
};
|
||||
|
||||
$scope.getCustomBackground = function (color) {
|
||||
return {'background-color': color};
|
||||
};
|
||||
}]);
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/* global app angular */
|
||||
|
||||
app.controller('ListController', function ($scope, $location, $filter, BoardService, $element, $timeout, $stateParams, $state, StatusService) {
|
||||
var ListController = function ($scope, $location, $filter, BoardService, $element, $timeout, $stateParams, $state, StatusService) {
|
||||
|
||||
function calculateNewColor() {
|
||||
var boards = BoardService.getAll();
|
||||
@@ -193,5 +193,6 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
export default ListController;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.directive('appPopoverMenuUtils', function () {
|
||||
'use strict';
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
// OwnCloud Click Handling
|
||||
// https://doc.owncloud.org/server/8.0/developer_manual/app/css.html
|
||||
app.directive('appNavigationEntryUtils', function () {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.directive('autofocusOnInsert', function () {
|
||||
'use strict';
|
||||
|
||||
@@ -4,21 +4,22 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.directive('avatar', function() {
|
||||
'use strict';
|
||||
@@ -31,6 +32,10 @@ app.directive('avatar', function() {
|
||||
link: function(scope, element, attr){
|
||||
scope.uid = attr.displayname;
|
||||
scope.displayname = attr.displayname;
|
||||
scope.size = attr.size;
|
||||
if (typeof scope.size === 'undefined') {
|
||||
scope.size = 32;
|
||||
}
|
||||
var value = attr.user;
|
||||
var avatardiv = $(element).find('.avatardiv');
|
||||
if(typeof attr.contactsmenu !== 'undefined' && attr.contactsmenu !== 'false') {
|
||||
@@ -43,8 +48,8 @@ app.directive('avatar', function() {
|
||||
placement: 'top'
|
||||
});
|
||||
}
|
||||
avatardiv.avatar(value, 32, false, false, false, attr.displayname);
|
||||
avatardiv.avatar(value, scope.size, false, false, false, attr.displayname);
|
||||
},
|
||||
controller: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
38
js/directive/bindHtmlCompile.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.directive('bindHtmlCompile', function ($compile) {
|
||||
'use strict';
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attrs) {
|
||||
scope.$watch(function () {
|
||||
return scope.$eval(attrs.bindHtmlCompile);
|
||||
}, function (value) {
|
||||
element.html(value);
|
||||
$compile(element.contents())(scope);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.directive('contactsmenudelete', function() {
|
||||
'use strict';
|
||||
|
||||
59
js/directive/contenteditable.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App';
|
||||
|
||||
app.directive('ngContenteditable', function($compile) {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
restrict: 'A',
|
||||
scope: {
|
||||
submit: '&ngSubmit'
|
||||
},
|
||||
link: function(scope, element, attrs, ngModel) {
|
||||
|
||||
//read the text typed in the div (syncing model with the view)
|
||||
function read() {
|
||||
ngModel.$setViewValue(element.html());
|
||||
}
|
||||
|
||||
//render the data now in your model into your view
|
||||
//$render is invoked when the modelvalue differs from the viewvalue
|
||||
//see documentation: https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#
|
||||
ngModel.$render = function() {
|
||||
element.html(ngModel.$viewValue || '');
|
||||
};
|
||||
|
||||
//do this whenever someone starts typing
|
||||
element.bind('blur keyup change', function(event) {
|
||||
scope.$apply(read);
|
||||
});
|
||||
|
||||
element.bind('keydown', function(event) {
|
||||
if(event.which === 13 && event.shiftKey) {
|
||||
scope.submit();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
/* global app */
|
||||
/* gloabl t */
|
||||
@@ -29,9 +30,10 @@ app.directive('datepicker', function () {
|
||||
return {
|
||||
link: function (scope, elm, attr) {
|
||||
return elm.datepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
dateFormat: moment.localeData().longDateFormat('L').replace('YYYY', 'YY').toLowerCase(),
|
||||
onSelect: function(date, inst) {
|
||||
scope.setDuedate(moment(date));
|
||||
var selectedDate = $(this).datepicker('getDate');
|
||||
scope.setDuedate(moment(selectedDate));
|
||||
scope.$apply();
|
||||
},
|
||||
beforeShow: function(input, inst) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
// original idea from blockloop: http://stackoverflow.com/a/24090733
|
||||
app.directive('elastic', [
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.directive('search', function ($document, $location) {
|
||||
'use strict';
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
import '../legacy/jquery.ui.timepicker.js';
|
||||
import 'legacy/jquery.ui.timepicker.css';
|
||||
|
||||
/* global app */
|
||||
/* global t */
|
||||
@@ -29,7 +32,7 @@ app.directive('timepicker', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function(scope, elm, attr) {
|
||||
return elm.timepicker({
|
||||
return $(elm).timepicker({
|
||||
onSelect: function(date, inst) {
|
||||
scope.setDuedateTime(moment('2000-01-01 ' + date));
|
||||
scope.$apply();
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.filter('boardFilterAcl', function() {
|
||||
return function(boards) {
|
||||
|
||||
37
js/filters/bytesFilter.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.filter('bytes', function () {
|
||||
return function (bytes, precision) {
|
||||
if (isNaN(parseFloat(bytes, 10)) || !isFinite(bytes)) {
|
||||
return '-';
|
||||
}
|
||||
if (typeof precision === 'undefined') {
|
||||
precision = 2;
|
||||
}
|
||||
var units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'],
|
||||
number = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
|
||||
};
|
||||
});
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
// usage | cardFilter({ member: 'admin'})
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.filter('cardSearchFilter', function() {
|
||||
return function(cards, searchString) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
/* global app */
|
||||
/* global OC */
|
||||
@@ -45,7 +46,8 @@ app.filter('dateToTimestamp', function() {
|
||||
app.filter('parseDate', function() {
|
||||
return function (date) {
|
||||
if(moment(date).isValid()) {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
var dateFormat = moment.localeData().longDateFormat('L');
|
||||
return moment(date).format(dateFormat);
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.filter('iconWhiteFilter', function () {
|
||||
return function (hex) {
|
||||
@@ -31,7 +32,7 @@ app.filter('iconWhiteFilter', function () {
|
||||
b: parseInt(result[3], 16)
|
||||
} : null;
|
||||
if (result === null) {
|
||||
return "";
|
||||
return '';
|
||||
}
|
||||
var r = color.r / 255;
|
||||
var g = color.g / 255;
|
||||
@@ -58,9 +59,9 @@ app.filter('iconWhiteFilter', function () {
|
||||
h /= 6;
|
||||
}
|
||||
if (l < 0.5) {
|
||||
return "-white";
|
||||
return '-white';
|
||||
} else {
|
||||
return "";
|
||||
return '';
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.filter('lightenColorFilter', function() {
|
||||
return function (hex) {
|
||||
@@ -29,9 +30,9 @@ app.filter('lightenColorFilter', function() {
|
||||
b: parseInt(result[3], 16)
|
||||
} : null;
|
||||
if (result !== null) {
|
||||
return "rgba(" + color.r + "," + color.g + "," + color.b + ",0.7)";
|
||||
return 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',0.7)';
|
||||
} else {
|
||||
return "#" + hex;
|
||||
return '#' + hex;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.filter('orderObjectBy', function(){
|
||||
return function(input, attribute) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.filter('textColorFilter', function () {
|
||||
return function (hex) {
|
||||
@@ -56,12 +57,12 @@ app.filter('textColorFilter', function () {
|
||||
h /= 6;
|
||||
}
|
||||
if (l < 0.5) {
|
||||
return "#ffffff";
|
||||
return '#ffffff';
|
||||
} else {
|
||||
return "#000000";
|
||||
return '#000000';
|
||||
}
|
||||
} else {
|
||||
return "#000000";
|
||||
return '#000000';
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
/* global app */
|
||||
/* global angular */
|
||||
|
||||
33
js/init.js
Normal file
@@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
|
||||
/* global __webpack_nonce__ OC */
|
||||
__webpack_nonce__ = btoa(OC.requestToken); // eslint-disable-line no-native-reassign
|
||||
|
||||
// used for building a vendor stylesheet
|
||||
import 'ng-sortable/dist/ng-sortable.css';
|
||||
|
||||
import angular from 'angular';
|
||||
import markdownit from 'markdown-it';
|
||||
global.markdownit = markdownit;
|
||||
|
||||
import app from './app/App.js';
|
||||
import './app/Config.js';
|
||||
import './app/Run.js';
|
||||
|
||||
|
||||
import ListController from 'controller/ListController.js';
|
||||
import attachmentListComponent from './controller/AttachmentController.js';
|
||||
import activityComponent from './controller/ActivityController.js';
|
||||
|
||||
app.controller('ListController', ListController);
|
||||
app.component('attachmentListComponent', attachmentListComponent);
|
||||
app.component('activityComponent', activityComponent);
|
||||
|
||||
|
||||
// require all the js files from subdirectories
|
||||
var context = require.context('.', true, /(controller|service|filters|directive)\/(.*)\.js$/);
|
||||
|
||||
context.keys().forEach(function (key) {
|
||||
context(key);
|
||||
});
|
||||
|
||||
161
js/legacy/commentcollection.js
Normal file
@@ -0,0 +1,161 @@
|
||||
/**
|
||||
* @licence
|
||||
*/
|
||||
|
||||
import CommentModel from './commentmodel.js';
|
||||
import CommentSummaryModel from './commentsummarymodel.js';
|
||||
|
||||
/**
|
||||
* @class CommentCollection
|
||||
* @classdesc
|
||||
*
|
||||
* Collection of comments assigned to a file
|
||||
*
|
||||
*/
|
||||
var CommentCollection = OC.Backbone.Collection.extend(
|
||||
/** @lends OCA.AnnouncementCenter.Comments.CommentCollection.prototype */ {
|
||||
|
||||
sync: OC.Backbone.davSync,
|
||||
|
||||
model: CommentModel,
|
||||
|
||||
/**
|
||||
* Object type
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
_objectType: 'deckCard',
|
||||
|
||||
/**
|
||||
* Object id
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
_objectId: null,
|
||||
|
||||
/**
|
||||
* True if there are no more page results left to fetch
|
||||
*
|
||||
* @type bool
|
||||
*/
|
||||
_endReached: false,
|
||||
|
||||
/**
|
||||
* Number of comments to fetch per page
|
||||
*
|
||||
* @type int
|
||||
*/
|
||||
_limit : 5,
|
||||
|
||||
/**
|
||||
* Initializes the collection
|
||||
*
|
||||
* @param {string} [options.objectType] object type
|
||||
* @param {string} [options.objectId] object id
|
||||
*/
|
||||
initialize: function(models, options) {
|
||||
options = options || {};
|
||||
if (options.objectType) {
|
||||
this._objectType = options.objectType;
|
||||
}
|
||||
if (options.objectId) {
|
||||
this._objectId = options.objectId;
|
||||
}
|
||||
},
|
||||
|
||||
url: function() {
|
||||
return OC.linkToRemote('dav') + '/comments/' +
|
||||
encodeURIComponent(this._objectType) + '/' +
|
||||
encodeURIComponent(this._objectId) + '/';
|
||||
},
|
||||
|
||||
setObjectId: function(objectId) {
|
||||
this._objectId = objectId;
|
||||
},
|
||||
|
||||
hasMoreResults: function() {
|
||||
return !this._endReached;
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
this._endReached = false;
|
||||
this._summaryModel = null;
|
||||
return OC.Backbone.Collection.prototype.reset.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* Fetch the next set of results
|
||||
*/
|
||||
fetchNext: function(options) {
|
||||
var self = this;
|
||||
if (!this.hasMoreResults()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var body = '<?xml version="1.0" encoding="utf-8" ?>\n' +
|
||||
'<oc:filter-comments xmlns:D="DAV:" xmlns:oc="http://owncloud.org/ns">\n' +
|
||||
// load one more so we know there is more
|
||||
' <oc:limit>' + (this._limit + 1) + '</oc:limit>\n' +
|
||||
' <oc:offset>' + this.length + '</oc:offset>\n' +
|
||||
'</oc:filter-comments>\n';
|
||||
|
||||
options = options || {};
|
||||
var success = options.success;
|
||||
options = _.extend({
|
||||
remove: false,
|
||||
parse: true,
|
||||
data: body,
|
||||
davProperties: CommentCollection.prototype.model.prototype.davProperties,
|
||||
success: function(resp) {
|
||||
if (resp.length <= self._limit) {
|
||||
// no new entries, end reached
|
||||
self._endReached = true;
|
||||
} else {
|
||||
// remove last entry, for next page load
|
||||
resp = _.initial(resp);
|
||||
}
|
||||
if (!self.set(resp, options)) {
|
||||
return false;
|
||||
}
|
||||
if (success) {
|
||||
success.apply(null, arguments);
|
||||
}
|
||||
self.trigger('sync', 'REPORT', self, options);
|
||||
}
|
||||
}, options);
|
||||
|
||||
return this.sync('REPORT', this, options);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the matching summary model
|
||||
*
|
||||
* @return {OCA.AnnouncementCenter.Comments.CommentSummaryModel} summary model
|
||||
*/
|
||||
getSummaryModel: function() {
|
||||
if (!this._summaryModel) {
|
||||
this._summaryModel = new CommentSummaryModel({
|
||||
id: this._objectId,
|
||||
objectType: this._objectType
|
||||
});
|
||||
}
|
||||
return this._summaryModel;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the read marker for this comment thread
|
||||
*
|
||||
* @param {Date} [date] optional date, defaults to now
|
||||
* @param {Object} [options] backbone options
|
||||
*/
|
||||
updateReadMarker: function(date, options) {
|
||||
options = options || {};
|
||||
|
||||
return this.getSummaryModel().save({
|
||||
readMarker: (date || new Date()).toUTCString()
|
||||
}, options);
|
||||
}
|
||||
});
|
||||
|
||||
export default CommentCollection;
|
||||
|
||||
119
js/legacy/commentmodel.js
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Copyright (c) 2016
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3
|
||||
* or later.
|
||||
*
|
||||
* See the COPYING-README file.
|
||||
*
|
||||
*/
|
||||
|
||||
var NS_OWNCLOUD = 'http://owncloud.org/ns';
|
||||
/**
|
||||
* @class CommentModel
|
||||
* @classdesc
|
||||
*
|
||||
* Comment
|
||||
*
|
||||
*/
|
||||
var CommentModel = OC.Backbone.Model.extend(
|
||||
/** @lends OCA.Comments.CommentModel.prototype */ {
|
||||
sync: OC.Backbone.davSync,
|
||||
|
||||
/**
|
||||
* Object type
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
_objectType: 'deckCard',
|
||||
|
||||
/**
|
||||
* Object id
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
_objectId: null,
|
||||
|
||||
initialize: function(model, options) {
|
||||
options = options || {};
|
||||
if (options.objectType) {
|
||||
this._objectType = options.objectType;
|
||||
}
|
||||
if (options.objectId) {
|
||||
this._objectId = options.objectId;
|
||||
}
|
||||
},
|
||||
|
||||
defaults: {
|
||||
actorType: 'users',
|
||||
objectType: 'deckCard'
|
||||
},
|
||||
|
||||
davProperties: {
|
||||
'id': '{' + NS_OWNCLOUD + '}id',
|
||||
'message': '{' + NS_OWNCLOUD + '}message',
|
||||
'actorType': '{' + NS_OWNCLOUD + '}actorType',
|
||||
'actorId': '{' + NS_OWNCLOUD + '}actorId',
|
||||
'actorDisplayName': '{' + NS_OWNCLOUD + '}actorDisplayName',
|
||||
'creationDateTime': '{' + NS_OWNCLOUD + '}creationDateTime',
|
||||
'objectType': '{' + NS_OWNCLOUD + '}objectType',
|
||||
'objectId': '{' + NS_OWNCLOUD + '}objectId',
|
||||
'isUnread': '{' + NS_OWNCLOUD + '}isUnread',
|
||||
'mentions': '{' + NS_OWNCLOUD + '}mentions'
|
||||
},
|
||||
|
||||
parse: function(data) {
|
||||
return {
|
||||
id: data.id,
|
||||
message: data.message,
|
||||
actorType: data.actorType,
|
||||
actorId: data.actorId,
|
||||
actorDisplayName: data.actorDisplayName,
|
||||
creationDateTime: data.creationDateTime,
|
||||
objectType: data.objectType,
|
||||
objectId: data.objectId,
|
||||
isUnread: (data.isUnread === 'true'),
|
||||
mentions: this._parseMentions(data.mentions)
|
||||
};
|
||||
},
|
||||
|
||||
_parseMentions: function(mentions) {
|
||||
if(_.isUndefined(mentions)) {
|
||||
return {};
|
||||
}
|
||||
var result = {};
|
||||
for(var i in mentions) {
|
||||
var mention = mentions[i];
|
||||
if(_.isUndefined(mention.localName) || mention.localName !== 'mention') {
|
||||
continue;
|
||||
}
|
||||
result[i] = {};
|
||||
for (var child = mention.firstChild; child; child = child.nextSibling) {
|
||||
if(_.isUndefined(child.localName) || !child.localName.startsWith('mention')) {
|
||||
continue;
|
||||
}
|
||||
result[i][child.localName] = child.textContent;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
url: function() {
|
||||
let baseUrl;
|
||||
if (typeof this.collection === 'undefined') {
|
||||
baseUrl = OC.linkToRemote('dav') + '/comments/' +
|
||||
encodeURIComponent(this.get('objectType')) + '/' +
|
||||
encodeURIComponent(this.get('objectId')) + '/';
|
||||
} else {
|
||||
baseUrl = this.collection.url();
|
||||
}
|
||||
if (typeof this.get('id') !== 'undefined') {
|
||||
return baseUrl + this.get('id');
|
||||
} else {
|
||||
return baseUrl;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default CommentModel;
|
||||
|
||||
54
js/legacy/commentsummarymodel.js
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
var NS_OWNCLOUD = 'http://owncloud.org/ns';
|
||||
/**
|
||||
* @class OCA.AnnouncementCenter.Comments.CommentSummaryModel
|
||||
* @classdesc
|
||||
*
|
||||
* Model containing summary information related to comments
|
||||
* like the read marker.
|
||||
*
|
||||
*/
|
||||
var CommentSummaryModel = OC.Backbone.Model.extend(
|
||||
/** @lends OCA.AnnouncementCenter.Comments.CommentSummaryModel.prototype */ {
|
||||
sync: OC.Backbone.davSync,
|
||||
|
||||
/**
|
||||
* Object type
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
_objectType: 'deckCard',
|
||||
|
||||
/**
|
||||
* Object id
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
_objectId: null,
|
||||
|
||||
davProperties: {
|
||||
'readMarker': '{' + NS_OWNCLOUD + '}readMarker'
|
||||
},
|
||||
|
||||
/**
|
||||
* Initializes the summary model
|
||||
*
|
||||
* @param {string} [options.objectType] object type
|
||||
* @param {string} [options.objectId] object id
|
||||
*/
|
||||
initialize: function(attrs, options) {
|
||||
options = options || {};
|
||||
if (options.objectType) {
|
||||
this._objectType = options.objectType;
|
||||
}
|
||||
},
|
||||
|
||||
url: function() {
|
||||
return OC.linkToRemote('dav') + '/comments/' +
|
||||
encodeURIComponent(this._objectType) + '/' +
|
||||
encodeURIComponent(this.id) + '/';
|
||||
}
|
||||
});
|
||||
|
||||
export default CommentSummaryModel;
|
||||
|
||||
1
js/legacy/jquery.atwho.min.js
vendored
Normal file
561
js/legacy/jquery.caret.min.js
vendored
Normal file
@@ -0,0 +1,561 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
(function($, undefined) {
|
||||
|
||||
var _input = document.createElement('input');
|
||||
|
||||
var _support = {
|
||||
setSelectionRange: ('setSelectionRange' in _input) || ('selectionStart' in _input),
|
||||
createTextRange: ('createTextRange' in _input) || ('selection' in document)
|
||||
};
|
||||
|
||||
var _rNewlineIE = /\r\n/g,
|
||||
_rCarriageReturn = /\r/g;
|
||||
|
||||
var _getValue = function(input) {
|
||||
if (typeof(input.value) !== 'undefined') {
|
||||
return input.value;
|
||||
}
|
||||
return $(input).text();
|
||||
};
|
||||
|
||||
var _setValue = function(input, value) {
|
||||
if (typeof(input.value) !== 'undefined') {
|
||||
input.value = value;
|
||||
} else {
|
||||
$(input).text(value);
|
||||
}
|
||||
};
|
||||
|
||||
var _getIndex = function(input, pos) {
|
||||
var norm = _getValue(input).replace(_rCarriageReturn, '');
|
||||
var len = norm.length;
|
||||
|
||||
if (typeof(pos) === 'undefined') {
|
||||
pos = len;
|
||||
}
|
||||
|
||||
pos = Math.floor(pos);
|
||||
|
||||
// Negative index counts backward from the end of the input/textarea's value
|
||||
if (pos < 0) {
|
||||
pos = len + pos;
|
||||
}
|
||||
|
||||
// Enforce boundaries
|
||||
if (pos < 0) { pos = 0; }
|
||||
if (pos > len) { pos = len; }
|
||||
|
||||
return pos;
|
||||
};
|
||||
|
||||
var _hasAttr = function(input, attrName) {
|
||||
return input.hasAttribute ? input.hasAttribute(attrName) : (typeof(input[attrName]) !== 'undefined');
|
||||
};
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @constructor
|
||||
*/
|
||||
var Range = function(start, end, length, text) {
|
||||
this.start = start || 0;
|
||||
this.end = end || 0;
|
||||
this.length = length || 0;
|
||||
this.text = text || '';
|
||||
};
|
||||
|
||||
Range.prototype.toString = function() {
|
||||
return JSON.stringify(this, null, ' ');
|
||||
};
|
||||
|
||||
var _getCaretW3 = function(input) {
|
||||
return input.selectionStart;
|
||||
};
|
||||
|
||||
/**
|
||||
* @see http://stackoverflow.com/q/6943000/467582
|
||||
*/
|
||||
var _getCaretIE = function(input) {
|
||||
var caret, range, textInputRange, rawValue, len, endRange;
|
||||
|
||||
// Yeah, you have to focus twice for IE 7 and 8. *cries*
|
||||
input.focus();
|
||||
input.focus();
|
||||
|
||||
range = document.selection.createRange();
|
||||
|
||||
if (range && range.parentElement() === input) {
|
||||
rawValue = _getValue(input);
|
||||
|
||||
len = rawValue.length;
|
||||
|
||||
// Create a working TextRange that lives only in the input
|
||||
textInputRange = input.createTextRange();
|
||||
textInputRange.moveToBookmark(range.getBookmark());
|
||||
|
||||
// Check if the start and end of the selection are at the very end
|
||||
// of the input, since moveStart/moveEnd doesn't return what we want
|
||||
// in those cases
|
||||
endRange = input.createTextRange();
|
||||
endRange.collapse(false);
|
||||
|
||||
if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) {
|
||||
caret = rawValue.replace(_rNewlineIE, '\n').length;
|
||||
} else {
|
||||
caret = -textInputRange.moveStart("character", -len);
|
||||
}
|
||||
|
||||
return caret;
|
||||
}
|
||||
|
||||
// NOTE: This occurs when you highlight part of a textarea and then click in the middle of the highlighted portion in IE 6-10.
|
||||
// There doesn't appear to be anything we can do about it.
|
||||
// alert("Your browser is incredibly stupid. I don't know what else to say.");
|
||||
// alert(range + '\n\n' + range.parentElement().tagName + '#' + range.parentElement().id);
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the position of the caret in the given input.
|
||||
* @param {HTMLInputElement|HTMLTextAreaElement} input input or textarea element
|
||||
* @returns {Number}
|
||||
* @see http://stackoverflow.com/questions/263743/how-to-get-cursor-position-in-textarea/263796#263796
|
||||
*/
|
||||
var _getCaret = function(input) {
|
||||
if (!input) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Mozilla, et al.
|
||||
if (_support.setSelectionRange) {
|
||||
return _getCaretW3(input);
|
||||
}
|
||||
// IE
|
||||
else if (_support.createTextRange) {
|
||||
return _getCaretIE(input);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
var _setCaretW3 = function(input, pos) {
|
||||
input.setSelectionRange(pos, pos);
|
||||
};
|
||||
|
||||
var _setCaretIE = function(input, pos) {
|
||||
var range = input.createTextRange();
|
||||
range.move('character', pos);
|
||||
range.select();
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the position of the caret in the given input.
|
||||
* @param {HTMLInputElement|HTMLTextAreaElement} input input or textarea element
|
||||
* @param {Number} pos
|
||||
* @see http://parentnode.org/javascript/working-with-the-cursor-position/
|
||||
*/
|
||||
var _setCaret = function(input, pos) {
|
||||
input.focus();
|
||||
|
||||
pos = _getIndex(input, pos);
|
||||
|
||||
// Mozilla, et al.
|
||||
if (_support.setSelectionRange) {
|
||||
_setCaretW3(input, pos);
|
||||
}
|
||||
// IE
|
||||
else if (_support.createTextRange) {
|
||||
_setCaretIE(input, pos);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts the specified text at the current caret position in the given input.
|
||||
* @param {HTMLInputElement|HTMLTextAreaElement} input input or textarea element
|
||||
* @param {String} text
|
||||
* @see http://parentnode.org/javascript/working-with-the-cursor-position/
|
||||
*/
|
||||
var _insertAtCaret = function(input, text) {
|
||||
var curPos = _getCaret(input);
|
||||
|
||||
var oldValueNorm = _getValue(input).replace(_rCarriageReturn, '');
|
||||
|
||||
var newLength = +(curPos + text.length + (oldValueNorm.length - curPos));
|
||||
var maxLength = +input.getAttribute('maxlength');
|
||||
|
||||
if(_hasAttr(input, 'maxlength') && newLength > maxLength) {
|
||||
var delta = text.length - (newLength - maxLength);
|
||||
text = text.substr(0, delta);
|
||||
}
|
||||
|
||||
_setValue(input, oldValueNorm.substr(0, curPos) + text + oldValueNorm.substr(curPos));
|
||||
|
||||
_setCaret(input, curPos + text.length);
|
||||
};
|
||||
|
||||
var _getInputRangeW3 = function(input) {
|
||||
var range = new Range();
|
||||
|
||||
range.start = input.selectionStart;
|
||||
range.end = input.selectionEnd;
|
||||
|
||||
var min = Math.min(range.start, range.end);
|
||||
var max = Math.max(range.start, range.end);
|
||||
|
||||
range.length = max - min;
|
||||
range.text = _getValue(input).substring(min, max);
|
||||
|
||||
return range;
|
||||
};
|
||||
|
||||
/** @see http://stackoverflow.com/a/3648244/467582 */
|
||||
var _getInputRangeIE = function(input) {
|
||||
var range = new Range();
|
||||
|
||||
input.focus();
|
||||
|
||||
var selection = document.selection.createRange();
|
||||
|
||||
if (selection && selection.parentElement() === input) {
|
||||
var len, normalizedValue, textInputRange, endRange, start = 0, end = 0;
|
||||
var rawValue = _getValue(input);
|
||||
|
||||
len = rawValue.length;
|
||||
normalizedValue = rawValue.replace(/\r\n/g, "\n");
|
||||
|
||||
// Create a working TextRange that lives only in the input
|
||||
textInputRange = input.createTextRange();
|
||||
textInputRange.moveToBookmark(selection.getBookmark());
|
||||
|
||||
// Check if the start and end of the selection are at the very end
|
||||
// of the input, since moveStart/moveEnd doesn't return what we want
|
||||
// in those cases
|
||||
endRange = input.createTextRange();
|
||||
endRange.collapse(false);
|
||||
|
||||
if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) {
|
||||
start = end = len;
|
||||
} else {
|
||||
start = -textInputRange.moveStart("character", -len);
|
||||
start += normalizedValue.slice(0, start).split("\n").length - 1;
|
||||
|
||||
if (textInputRange.compareEndPoints("EndToEnd", endRange) > -1) {
|
||||
end = len;
|
||||
} else {
|
||||
end = -textInputRange.moveEnd("character", -len);
|
||||
end += normalizedValue.slice(0, end).split("\n").length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// normalize newlines
|
||||
start -= (rawValue.substring(0, start).split('\r\n').length - 1);
|
||||
end -= (rawValue.substring(0, end).split('\r\n').length - 1);
|
||||
/// normalize newlines
|
||||
|
||||
range.start = start;
|
||||
range.end = end;
|
||||
range.length = range.end - range.start;
|
||||
range.text = normalizedValue.substr(range.start, range.length);
|
||||
}
|
||||
|
||||
return range;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the selected text range of the given input.
|
||||
* @param {HTMLInputElement|HTMLTextAreaElement} input input or textarea element
|
||||
* @returns {Range}
|
||||
* @see http://stackoverflow.com/a/263796/467582
|
||||
* @see http://stackoverflow.com/a/2966703/467582
|
||||
*/
|
||||
var _getInputRange = function(input) {
|
||||
if (!input) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Mozilla, et al.
|
||||
if (_support.setSelectionRange) {
|
||||
return _getInputRangeW3(input);
|
||||
}
|
||||
// IE
|
||||
else if (_support.createTextRange) {
|
||||
return _getInputRangeIE(input);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
var _setInputRangeW3 = function(input, startPos, endPos) {
|
||||
input.setSelectionRange(startPos, endPos);
|
||||
};
|
||||
|
||||
var _setInputRangeIE = function(input, startPos, endPos) {
|
||||
var tr = input.createTextRange();
|
||||
tr.moveEnd('textedit', -1);
|
||||
tr.moveStart('character', startPos);
|
||||
tr.moveEnd('character', endPos - startPos);
|
||||
tr.select();
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the selected text range of (i.e., highlights text in) the given input.
|
||||
* @param {HTMLInputElement|HTMLTextAreaElement} input input or textarea element
|
||||
* @param {Number} startPos Zero-based index
|
||||
* @param {Number} endPos Zero-based index
|
||||
* @see http://parentnode.org/javascript/working-with-the-cursor-position/
|
||||
* @see http://stackoverflow.com/a/2966703/467582
|
||||
*/
|
||||
var _setInputRange = function(input, startPos, endPos) {
|
||||
startPos = _getIndex(input, startPos);
|
||||
endPos = _getIndex(input, endPos);
|
||||
|
||||
// Mozilla, et al.
|
||||
if (_support.setSelectionRange) {
|
||||
_setInputRangeW3(input, startPos, endPos);
|
||||
}
|
||||
// IE
|
||||
else if (_support.createTextRange) {
|
||||
_setInputRangeIE(input, startPos, endPos);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Replaces the currently selected text with the given string.
|
||||
* @param {HTMLInputElement|HTMLTextAreaElement} input input or textarea element
|
||||
* @param {String} text New text that will replace the currently selected text.
|
||||
* @see http://parentnode.org/javascript/working-with-the-cursor-position/
|
||||
*/
|
||||
var _replaceInputRange = function(input, text) {
|
||||
var $input = $(input);
|
||||
|
||||
var oldValue = $input.val();
|
||||
var selection = _getInputRange(input);
|
||||
|
||||
var newLength = +(selection.start + text.length + (oldValue.length - selection.end));
|
||||
var maxLength = +$input.attr('maxlength');
|
||||
|
||||
if($input.is('[maxlength]') && newLength > maxLength) {
|
||||
var delta = text.length - (newLength - maxLength);
|
||||
text = text.substr(0, delta);
|
||||
}
|
||||
|
||||
// Now that we know what the user selected, we can replace it
|
||||
var startText = oldValue.substr(0, selection.start);
|
||||
var endText = oldValue.substr(selection.end);
|
||||
|
||||
$input.val(startText + text + endText);
|
||||
|
||||
// Reset the selection
|
||||
var startPos = selection.start;
|
||||
var endPos = startPos + text.length;
|
||||
|
||||
_setInputRange(input, selection.length ? startPos : endPos, endPos);
|
||||
};
|
||||
|
||||
var _selectAllW3 = function(elem) {
|
||||
var selection = window.getSelection();
|
||||
var range = document.createRange();
|
||||
range.selectNodeContents(elem);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
};
|
||||
|
||||
var _selectAllIE = function(elem) {
|
||||
var range = document.body.createTextRange();
|
||||
range.moveToElementText(elem);
|
||||
range.select();
|
||||
};
|
||||
|
||||
/**
|
||||
* Select all text in the given element.
|
||||
* @param {HTMLElement} elem Any block or inline element other than a form element.
|
||||
*/
|
||||
var _selectAll = function(elem) {
|
||||
var $elem = $(elem);
|
||||
if ($elem.is('input, textarea') || elem.select) {
|
||||
$elem.select();
|
||||
return;
|
||||
}
|
||||
|
||||
// Mozilla, et al.
|
||||
if (_support.setSelectionRange) {
|
||||
_selectAllW3(elem);
|
||||
}
|
||||
// IE
|
||||
else if (_support.createTextRange) {
|
||||
_selectAllIE(elem);
|
||||
}
|
||||
};
|
||||
|
||||
var _deselectAll = function() {
|
||||
if (document.selection) {
|
||||
document.selection.empty();
|
||||
}
|
||||
else if (window.getSelection) {
|
||||
window.getSelection().removeAllRanges();
|
||||
}
|
||||
};
|
||||
|
||||
$.extend($.fn, {
|
||||
|
||||
/**
|
||||
* Gets or sets the position of the caret or inserts text at the current caret position in an input or textarea element.
|
||||
* @returns {Number|jQuery} The current caret position if invoked as a getter (with no arguments)
|
||||
* or this jQuery object if invoked as a setter or inserter.
|
||||
* @see http://web.archive.org/web/20080704185920/http://parentnode.org/javascript/working-with-the-cursor-position/
|
||||
* @since 1.0.0
|
||||
* @example
|
||||
* <pre>
|
||||
* // Get position
|
||||
* var pos = $('input:first').caret();
|
||||
* </pre>
|
||||
* @example
|
||||
* <pre>
|
||||
* // Set position
|
||||
* $('input:first').caret(15);
|
||||
* $('input:first').caret(-3);
|
||||
* </pre>
|
||||
* @example
|
||||
* <pre>
|
||||
* // Insert text at current position
|
||||
* $('input:first').caret('Some text');
|
||||
* </pre>
|
||||
*/
|
||||
caret: function() {
|
||||
var $inputs = this.filter('input, textarea');
|
||||
|
||||
// getCaret()
|
||||
if (arguments.length === 0) {
|
||||
var input = $inputs.get(0);
|
||||
return _getCaret(input);
|
||||
}
|
||||
// setCaret(position)
|
||||
else if (typeof arguments[0] === 'number') {
|
||||
var pos = arguments[0];
|
||||
$inputs.each(function(_i, input) {
|
||||
_setCaret(input, pos);
|
||||
});
|
||||
}
|
||||
// insertAtCaret(text)
|
||||
else {
|
||||
var text = arguments[0];
|
||||
$inputs.each(function(_i, input) {
|
||||
_insertAtCaret(input, text);
|
||||
});
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets or sets the selection range or replaces the currently selected text in an input or textarea element.
|
||||
* @returns {Range|jQuery} The current selection range if invoked as a getter (with no arguments)
|
||||
* or this jQuery object if invoked as a setter or replacer.
|
||||
* @see http://stackoverflow.com/a/2966703/467582
|
||||
* @since 1.0.0
|
||||
* @example
|
||||
* <pre>
|
||||
* // Get selection range
|
||||
* var range = $('input:first').range();
|
||||
* </pre>
|
||||
* @example
|
||||
* <pre>
|
||||
* // Set selection range
|
||||
* $('input:first').range(15);
|
||||
* $('input:first').range(15, 20);
|
||||
* $('input:first').range(-3);
|
||||
* $('input:first').range(-8, -3);
|
||||
* </pre>
|
||||
* @example
|
||||
* <pre>
|
||||
* // Replace the currently selected text
|
||||
* $('input:first').range('Replacement text');
|
||||
* </pre>
|
||||
*/
|
||||
range: function() {
|
||||
var $inputs = this.filter('input, textarea');
|
||||
|
||||
// getRange() = { start: pos, end: pos }
|
||||
if (arguments.length === 0) {
|
||||
var input = $inputs.get(0);
|
||||
return _getInputRange(input);
|
||||
}
|
||||
// setRange(startPos, endPos)
|
||||
else if (typeof arguments[0] === 'number') {
|
||||
var startPos = arguments[0];
|
||||
var endPos = arguments[1];
|
||||
$inputs.each(function(_i, input) {
|
||||
_setInputRange(input, startPos, endPos);
|
||||
});
|
||||
}
|
||||
// replaceRange(text)
|
||||
else {
|
||||
var text = arguments[0];
|
||||
$inputs.each(function(_i, input) {
|
||||
_replaceInputRange(input, text);
|
||||
});
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Selects all text in each element of this jQuery object.
|
||||
* @returns {jQuery} This jQuery object
|
||||
* @see http://stackoverflow.com/a/11128179/467582
|
||||
* @since 1.5.0
|
||||
* @example
|
||||
* <pre>
|
||||
* // Select the contents of span elements when clicked
|
||||
* $('span').on('click', function() { $(this).highlight(); });
|
||||
* </pre>
|
||||
*/
|
||||
selectAll: function() {
|
||||
return this.each(function(_i, elem) {
|
||||
_selectAll(elem);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$.extend($, {
|
||||
/**
|
||||
* Deselects all text on the page.
|
||||
* @returns {jQuery} The jQuery function
|
||||
* @since 1.5.0
|
||||
* @example
|
||||
* <pre>
|
||||
* // Select some text
|
||||
* $('span').selectAll();
|
||||
*
|
||||
* // Deselect the text
|
||||
* $.deselectAll();
|
||||
* </pre>
|
||||
*/
|
||||
deselectAll: function() {
|
||||
_deselectAll();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
}(window.jQuery || window.Zepto || window.$));
|
||||
57
js/legacy/jquery.ui.timepicker.css
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Timepicker stylesheet
|
||||
* Highly inspired from datepicker
|
||||
* FG - Nov 2010 - Web3R
|
||||
*
|
||||
* version 0.0.3 : Fixed some settings, more dynamic
|
||||
* version 0.0.4 : Removed width:100% on tables
|
||||
* version 0.1.1 : set width 0 on tables to fix an ie6 bug
|
||||
*/
|
||||
|
||||
.ui-timepicker-inline { display: inline; }
|
||||
|
||||
#ui-timepicker-div { padding: 0.2em; }
|
||||
.ui-timepicker-table { display: inline-table; width: 0; }
|
||||
.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
|
||||
|
||||
.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; }
|
||||
|
||||
.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
|
||||
.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
|
||||
.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
|
||||
|
||||
/* span for disabled cells */
|
||||
.ui-timepicker-table td span {
|
||||
display:block;
|
||||
padding:0.2em 0.3em 0.2em 0.5em;
|
||||
width: 1.2em;
|
||||
|
||||
text-align:right;
|
||||
text-decoration:none;
|
||||
}
|
||||
/* anchors for clickable cells */
|
||||
.ui-timepicker-table td a {
|
||||
display:block;
|
||||
padding:0.2em 0.3em 0.2em 0.5em;
|
||||
width: 1.2em;
|
||||
cursor: pointer;
|
||||
text-align:right;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
|
||||
/* buttons and button pane styling */
|
||||
.ui-timepicker .ui-timepicker-buttonpane {
|
||||
background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0;
|
||||
}
|
||||
.ui-timepicker .ui-timepicker-buttonpane button { margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
/* The close button */
|
||||
.ui-timepicker .ui-timepicker-close { float: right }
|
||||
|
||||
/* the now button */
|
||||
.ui-timepicker .ui-timepicker-now { float: left; }
|
||||
|
||||
/* the deselect button */
|
||||
.ui-timepicker .ui-timepicker-deselect { float: left; }
|
||||
|
||||
|
||||
1496
js/legacy/jquery.ui.timepicker.js
vendored
Normal file
120
js/legacy/markdown-it-checkbox.js
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* Original source code from https://github.com/mcecot/markdown-it-checkbox
|
||||
* © 2015 Markus Cecot
|
||||
* licenced under MIT
|
||||
* https://github.com/mcecot/markdown-it-checkbox/blob/master/LICENSE
|
||||
*/
|
||||
var checkboxReplace;
|
||||
|
||||
checkboxReplace = function(md, options, Token) {
|
||||
"use strict";
|
||||
var arrayReplaceAt, createTokens, defaults, lastId, pattern, splitTextToken;
|
||||
arrayReplaceAt = md.utils.arrayReplaceAt;
|
||||
lastId = 0;
|
||||
defaults = {
|
||||
divWrap: false,
|
||||
divClass: 'checkbox',
|
||||
idPrefix: 'checkbox'
|
||||
};
|
||||
options = Object.assign(defaults, options);
|
||||
pattern = /(.*?)(\[(X|\s|\_|\-)\])(.*)/igm;
|
||||
createTokens = function(checked, label, Token, before) {
|
||||
var id, idNumeric, nodes, token;
|
||||
nodes = [];
|
||||
|
||||
token = new Token("text", "", 0);
|
||||
token.content = before;
|
||||
nodes.push(token);
|
||||
|
||||
/**
|
||||
* <div class="checkbox">
|
||||
*/
|
||||
if (options.divWrap) {
|
||||
token = new Token("checkbox_open", "div", 1);
|
||||
token.attrs = [["class", options.divClass]];
|
||||
nodes.push(token);
|
||||
}
|
||||
|
||||
/**
|
||||
* <input type="checkbox" id="checkbox{n}" checked="true">
|
||||
*/
|
||||
id = options.idPrefix + lastId;
|
||||
idNumeric = lastId;
|
||||
lastId += 1;
|
||||
token = new Token("checkbox_input", "input", 0);
|
||||
token.attrs = [["type", "checkbox"], ["id", id], ["data-id", idNumeric]];
|
||||
if (checked === true) {
|
||||
token.attrs.push(["checked", "true"]);
|
||||
}
|
||||
token.attrs.push(["class", "checkbox"]);
|
||||
nodes.push(token);
|
||||
|
||||
/**
|
||||
* <label for="checkbox{n}">
|
||||
*/
|
||||
token = new Token("label_open", "label", 1);
|
||||
token.attrs = [["for", id], ["data-id", idNumeric]];
|
||||
nodes.push(token);
|
||||
|
||||
/**
|
||||
* content of label tag
|
||||
*/
|
||||
token = new Token("text", "", 0);
|
||||
token.content = label;
|
||||
nodes.push(token);
|
||||
|
||||
/**
|
||||
* closing tags
|
||||
*/
|
||||
nodes.push(new Token("label_close", "label", -1));
|
||||
if (options.divWrap) {
|
||||
nodes.push(new Token("checkbox_close", "div", -1));
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
splitTextToken = function(original, Token) {
|
||||
var checked, label, matches, text, value, before;
|
||||
text = original.content;
|
||||
matches = pattern.exec(text);
|
||||
if (matches === null) {
|
||||
return original;
|
||||
}
|
||||
checked = false;
|
||||
before = matches[1];
|
||||
value = matches[3];
|
||||
label = matches[4];
|
||||
if (value === "X" || value === "x") {
|
||||
checked = true;
|
||||
}
|
||||
return createTokens(checked, label, Token, before);
|
||||
};
|
||||
return function(state) {
|
||||
lastId = 0;
|
||||
var blockTokens, i, j, l, token, tokens;
|
||||
blockTokens = state.tokens;
|
||||
j = 0;
|
||||
l = blockTokens.length;
|
||||
while (j < l) {
|
||||
if (blockTokens[j].type !== "inline") {
|
||||
j++;
|
||||
continue;
|
||||
}
|
||||
tokens = blockTokens[j].children;
|
||||
i = 0;
|
||||
while (i < tokens.length) {
|
||||
token = tokens[i];
|
||||
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, splitTextToken(token, state.Token));
|
||||
i++;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/*global module */
|
||||
|
||||
module.exports = function(md, options) {
|
||||
"use strict";
|
||||
md.core.ruler.push("checkbox", checkboxReplace(md, options));
|
||||
};
|
||||
7965
js/package-lock.json
generated
Normal file
@@ -1,29 +1,46 @@
|
||||
{
|
||||
"name": "deck",
|
||||
"description": "Frontend for the Nextcloud Deck app",
|
||||
"repository": "https://github.com/nextcloud/deck",
|
||||
"version": "1.0.0",
|
||||
"main": "Gruntfile.js",
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"@uirouter/angularjs": "^1.0.20",
|
||||
"angular": "^1.7.5",
|
||||
"angular-animate": "^1.7.5",
|
||||
"angular-file-upload": "^2.5.0",
|
||||
"angular-markdown-it": "^0.6.1",
|
||||
"angular-sanitize": "^1.7.5",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"markdown-it": "^8.4.2",
|
||||
"markdown-it-link-target": "^1.0.2",
|
||||
"ng-infinite-scroll": "^1.3.0",
|
||||
"ng-sortable": "^1.3.8",
|
||||
"ui-select": "^0.19.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.8.0",
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-contrib-concat": "^1.0.1",
|
||||
"grunt-contrib-jshint": "^1.1.0",
|
||||
"grunt-contrib-watch": "^1.0.0",
|
||||
"grunt-karma": "^2.0.0",
|
||||
"grunt-phpunit": "^0.3.6",
|
||||
"grunt-wrap": "^0.3.0",
|
||||
"jshint-stylish": "^2.2.1",
|
||||
"karma": "^1.4.1",
|
||||
"node-sass": "^4.5.3"
|
||||
"@babel/core": "^7.1.5",
|
||||
"@babel/polyfill": "^7.0.0",
|
||||
"@babel/preset-env": "^7.1.5",
|
||||
"babel-loader": "^8.0.4",
|
||||
"css-loader": "^1.0.1",
|
||||
"karma": "^3.1.1",
|
||||
"mini-css-extract-plugin": "^0.4.4",
|
||||
"node-sass": "^4.10.0",
|
||||
"webpack": "^4.25.1",
|
||||
"webpack-cli": "^3.1.2",
|
||||
"webpack-merge": "^4.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "./node_modules/webpack-cli/bin/cli.js --mode production --config webpack.prod.config.js",
|
||||
"dev": "./node_modules/webpack-cli/bin/cli.js --mode development --config webpack.dev.config.js",
|
||||
"watch": "./node_modules/webpack-cli/bin/cli.js --mode development --config webpack.dev.config.js --watch",
|
||||
"test": "echo \"Warning: no test specified\" && exit 0"
|
||||
},
|
||||
"author": "",
|
||||
"license": "AGPL-3.0",
|
||||
"keywords": [],
|
||||
"description": ""
|
||||
"keywords": []
|
||||
}
|
||||
|
||||
253
js/service/ActivityService.js
Normal file
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
import CommentCollection from '../legacy/commentcollection';
|
||||
import CommentModel from '../legacy/commentmodel';
|
||||
|
||||
const DECK_ACTIVITY_TYPE_BOARD = 'deck_board';
|
||||
const DECK_ACTIVITY_TYPE_CARD = 'deck_card';
|
||||
|
||||
/* global OC oc_requesttoken */
|
||||
class ActivityService {
|
||||
|
||||
static get RESULT_PER_PAGE() { return 50; }
|
||||
|
||||
constructor ($rootScope, $filter, $http, $q) {
|
||||
this.running = false;
|
||||
this.runningNewer = false;
|
||||
this.$filter = $filter;
|
||||
this.$http = $http;
|
||||
this.$q = $q;
|
||||
this.$rootScope = $rootScope;
|
||||
this.data = {};
|
||||
this.data[DECK_ACTIVITY_TYPE_BOARD] = {};
|
||||
this.data[DECK_ACTIVITY_TYPE_CARD] = {};
|
||||
this.toEnhanceWithComments = [];
|
||||
this.commentCollection = new CommentCollection();
|
||||
this.commentCollection._limit = ActivityService.RESULT_PER_PAGE;
|
||||
this.commentCollection.on('request', function() {
|
||||
}, this);
|
||||
this.commentCollection.on('sync', function(a) {
|
||||
for (let index in this.toEnhanceWithComments) {
|
||||
if (this.toEnhanceWithComments.hasOwnProperty(index)) {
|
||||
let item = this.toEnhanceWithComments[index];
|
||||
item.commentModel = this.commentCollection.get(item.subject_rich[1].comment);
|
||||
if (typeof item.commentModel !== 'undefined') {
|
||||
this.toEnhanceWithComments = this.toEnhanceWithComments.filter((entry) => entry.activity_id !== item.activity_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
var firstUnread = this.commentCollection.findWhere({isUnread: true});
|
||||
if (typeof firstUnread !== 'undefined') {
|
||||
this.commentCollection.updateReadMarker();
|
||||
}
|
||||
this.notify();
|
||||
}, this);
|
||||
this.commentCollection.on('add', function(model, collection, options) {
|
||||
// we need to update the model, because it consists of client data
|
||||
// only, but the server might add meta data, e.g. about mentions
|
||||
model.fetch();
|
||||
}, this);
|
||||
this.since = {
|
||||
deck_card: {
|
||||
|
||||
},
|
||||
deck_board: {
|
||||
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* We need a event here to properly update scope once the external data from
|
||||
* the comments backbone js code has changed
|
||||
*/
|
||||
subscribe(scope, callback) {
|
||||
let handler = this.$rootScope.$on('notify-comment-update', callback);
|
||||
scope.$on('$destroy', handler);
|
||||
}
|
||||
|
||||
notify() {
|
||||
this.$rootScope.$emit('notify-comment-update');
|
||||
}
|
||||
|
||||
static getUrl(type, id, since) {
|
||||
if (type === DECK_ACTIVITY_TYPE_CARD) {
|
||||
return OC.linkToOCS('apps/activity/api/v2/activity', 2) + 'filter?format=json&object_type=deck_card&object_id=' + id + '&limit=' + this.RESULT_PER_PAGE + '&since=' + since;
|
||||
}
|
||||
if (type === DECK_ACTIVITY_TYPE_BOARD) {
|
||||
return OC.linkToOCS('apps/activity/api/v2/activity', 2) + 'deck?format=json&limit=' + this.RESULT_PER_PAGE + '&since=' + since;
|
||||
}
|
||||
}
|
||||
|
||||
fetchCardActivities(type, id, since) {
|
||||
this.running = true;
|
||||
|
||||
this.checkData(type, id);
|
||||
const self = this;
|
||||
return this.$http.get(ActivityService.getUrl(type, id, since)).then(function (response) {
|
||||
const objects = response.data.ocs.data;
|
||||
|
||||
for (let index in objects) {
|
||||
if (objects.hasOwnProperty(index)) {
|
||||
let item = objects[index];
|
||||
self.addItem(type, id, item);
|
||||
if (item.activity_id > self.since[type][id].latest) {
|
||||
self.since[type][id].latest = item.activity_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
self.data[type][id].sort(function(a, b) {
|
||||
return b.activity_id - a.activity_id;
|
||||
});
|
||||
self.since[type][id].oldest = response.headers('X-Activity-Last-Given');
|
||||
self.running = false;
|
||||
return response;
|
||||
}, function (error) {
|
||||
if (error.status === 304 || error.status === 404) {
|
||||
self.since[type][id].finished = true;
|
||||
}
|
||||
self.running = false;
|
||||
});
|
||||
}
|
||||
|
||||
fetchMoreActivities(type, id, success) {
|
||||
const self = this;
|
||||
this.checkData(type, id);
|
||||
if (this.running === true) {
|
||||
return this.runningPromise;
|
||||
}
|
||||
if (!this.since[type][id].finished) {
|
||||
this.runningPromise = this.fetchCardActivities(type, id, this.since[type][id].oldest);
|
||||
this.runningPromise.then(function() {
|
||||
if (type === 'deck_card') {
|
||||
self.commentCollection.fetchNext();
|
||||
}
|
||||
});
|
||||
return this.runningPromise;
|
||||
}
|
||||
return Promise.reject();
|
||||
}
|
||||
checkData(type, id) {
|
||||
if (!Array.isArray(this.data[type][id])) {
|
||||
this.data[type][id] = [];
|
||||
}
|
||||
if (typeof this.since[type][id] === 'undefined') {
|
||||
this.since[type][id] = {
|
||||
latest: -1,
|
||||
oldestCatchedUp: false,
|
||||
oldest: '0',
|
||||
finished: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
addItem(type, id, item) {
|
||||
const self = this;
|
||||
const existingEntry = this.data[type][id].findIndex((entry) => { return entry.activity_id === item.activity_id; });
|
||||
if (existingEntry !== -1) {
|
||||
return;
|
||||
}
|
||||
/** check if the fetched item from all deck activities is actually related */
|
||||
const isUnrelatedBoard = (item.object_type === DECK_ACTIVITY_TYPE_BOARD && item.object_id !== id);
|
||||
const isUnrelatedCard = (item.object_type === DECK_ACTIVITY_TYPE_CARD && item.subject_rich[1].board && item.subject_rich[1].board.id !== id);
|
||||
if (type === DECK_ACTIVITY_TYPE_BOARD && (isUnrelatedBoard || isUnrelatedCard)) {
|
||||
return;
|
||||
}
|
||||
item.timestamp = new Date(item.datetime).getTime();
|
||||
item.type = 'activity';
|
||||
if (item.subject_rich[1].comment) {
|
||||
item.type = 'comment';
|
||||
item.commentModel = this.commentCollection.get(item.subject_rich[1].comment);
|
||||
if (typeof item.commentModel === 'undefined') {
|
||||
this.toEnhanceWithComments.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
this.data[type][id].push(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch newer activities starting from the latest ones that are in cache
|
||||
*
|
||||
* @param type
|
||||
* @param id
|
||||
*/
|
||||
fetchNewerActivities(type, id) {
|
||||
if (this.since[type][id].latest === 0) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
let self = this;
|
||||
return this.fetchNewer(type, id).then(function() {
|
||||
return self.fetchNewerActivities(type, id);
|
||||
});
|
||||
}
|
||||
|
||||
fetchNewer(type, id) {
|
||||
const deferred = this.$q.defer();
|
||||
this.running = true;
|
||||
this.runningNewer = true;
|
||||
const self = this;
|
||||
this.$http.get(ActivityService.getUrl(type, id, this.since[type][id].latest) + '&sort=asc').then(function (response) {
|
||||
let objects = response.data.ocs.data;
|
||||
|
||||
let data = [];
|
||||
for (let index in objects) {
|
||||
if (objects.hasOwnProperty(index)) {
|
||||
let item = objects[index];
|
||||
self.addItem(type, id, item);
|
||||
}
|
||||
}
|
||||
self.data[type][id].sort(function(a, b) {
|
||||
return b.activity_id - a.activity_id;
|
||||
});
|
||||
self.since[type][id].latest = response.headers('X-Activity-Last-Given');
|
||||
self.data[type][id] = data.concat(self.data[type][id]);
|
||||
self.running = false;
|
||||
self.runningNewer = false;
|
||||
deferred.resolve(objects);
|
||||
}, function (error) {
|
||||
self.runningNewer = false;
|
||||
self.running = false;
|
||||
});
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
getData(type, id) {
|
||||
if (!Array.isArray(this.data[type][id])) {
|
||||
return [];
|
||||
}
|
||||
return this.data[type][id];
|
||||
}
|
||||
|
||||
loadComments(id) {
|
||||
this.commentCollection.reset();
|
||||
this.commentCollection.setObjectId(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.service('ActivityService', ActivityService);
|
||||
|
||||
export default ActivityService;
|
||||
export {DECK_ACTIVITY_TYPE_BOARD, DECK_ACTIVITY_TYPE_CARD};
|
||||
@@ -4,34 +4,48 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
/** global: oc_defaults */
|
||||
app.factory('ApiService', function ($http, $q) {
|
||||
var ApiService = function (http, endpoint) {
|
||||
// Consider renaming endpoint to resource
|
||||
this.endpoint = endpoint;
|
||||
this.baseUrl = OC.generateUrl('/apps/deck/' + endpoint);
|
||||
this.baseUrl = this.generateUrl(this.endpoint);
|
||||
this.http = http;
|
||||
this.q = $q;
|
||||
this.data = {};
|
||||
this.deleted = {};
|
||||
this.id = null;
|
||||
this.sorted = [];
|
||||
};
|
||||
|
||||
ApiService.prototype.generateUrl = function(path) {
|
||||
return OC.generateUrl('/apps/deck/' + path);
|
||||
};
|
||||
|
||||
ApiService.prototype.tryAllThenDeleted = function(id) {
|
||||
let object = this.data[id];
|
||||
if (object === undefined) {
|
||||
object = this.deleted[id];
|
||||
}
|
||||
return object;
|
||||
};
|
||||
|
||||
ApiService.prototype.fetchAll = function () {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
@@ -47,6 +61,31 @@ app.factory('ApiService', function ($http, $q) {
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
ApiService.prototype.fetchDeleted = function (scopeId) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
self.deleted = {};
|
||||
$http.get(this.generateUrl(scopeId + '/' + this.endpoint + '/deleted')).then(function (response) {
|
||||
var objects = response.data;
|
||||
objects.forEach(function (obj) {
|
||||
if(self.deleted[obj.id] !== undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.deleted[obj.id] = obj;
|
||||
|
||||
if(self.afterFetch !== undefined) {
|
||||
self.afterFetch(obj);
|
||||
}
|
||||
});
|
||||
deferred.resolve(objects);
|
||||
}, function (error) {
|
||||
deferred.reject('Fetching ' + self.endpoint + ' failed');
|
||||
});
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
|
||||
ApiService.prototype.fetchOne = function (id) {
|
||||
|
||||
this.id = id;
|
||||
@@ -103,39 +142,55 @@ app.factory('ApiService', function ($http, $q) {
|
||||
var self = this;
|
||||
|
||||
$http.delete(this.baseUrl + '/' + id).then(function (response) {
|
||||
self.remove(id);
|
||||
self.deleted[id] = self.data[id];
|
||||
delete self.data[id];
|
||||
|
||||
let deletedAt = response.data.deletedAt;
|
||||
if (deletedAt !== undefined) {
|
||||
self.deleted[id].deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
deferred.resolve(response.data);
|
||||
|
||||
}, function (error) {
|
||||
deferred.reject('Deleting ' + self.endpoint + ' failed');
|
||||
});
|
||||
return deferred.promise;
|
||||
|
||||
};
|
||||
|
||||
ApiService.prototype.undoDelete = function(entity) {
|
||||
var self = this;
|
||||
entity.deletedAt = 0;
|
||||
|
||||
var promise = this.update(entity);
|
||||
|
||||
promise.then(() => {
|
||||
self.data[entity.id] = entity;
|
||||
delete this.deleted[entity.id];
|
||||
});
|
||||
|
||||
return promise;
|
||||
};
|
||||
|
||||
// methods for managing data
|
||||
ApiService.prototype.clear = function () {
|
||||
this.data = {};
|
||||
};
|
||||
|
||||
ApiService.prototype.add = function (entity) {
|
||||
var element = this.data[entity.id];
|
||||
if (element === undefined) {
|
||||
this.data[entity.id] = entity;
|
||||
} else {
|
||||
Object.keys(entity).forEach(function (key) {
|
||||
if (entity[key] !== null) {
|
||||
if (entity[key] !== null && element[key] !== entity[key]) {
|
||||
element[key] = entity[key];
|
||||
}
|
||||
});
|
||||
element.status = {};
|
||||
}
|
||||
};
|
||||
ApiService.prototype.remove = function (id) {
|
||||
if (this.data[id] !== undefined) {
|
||||
delete this.data[id];
|
||||
}
|
||||
};
|
||||
|
||||
ApiService.prototype.addAll = function (entities) {
|
||||
var self = this;
|
||||
angular.forEach(entities, function (entity) {
|
||||
@@ -162,10 +217,14 @@ app.factory('ApiService', function ($http, $q) {
|
||||
return this.data;
|
||||
};
|
||||
|
||||
ApiService.prototype.get = function (id) {
|
||||
return this.data[id];
|
||||
};
|
||||
|
||||
ApiService.prototype.getName = function () {
|
||||
var funcNameRegex = /function (.{1,})\(/;
|
||||
var results = (funcNameRegex).exec((this).constructor.toString());
|
||||
return (results && results.length > 1) ? results[1] : "";
|
||||
return (results && results.length > 1) ? results[1] : '';
|
||||
};
|
||||
|
||||
return ApiService;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
/* global app OC */
|
||||
app.factory('BoardService', function (ApiService, $http, $q) {
|
||||
var BoardService = function ($http, ep, $q) {
|
||||
@@ -198,13 +198,13 @@ app.factory('BoardService', function (ApiService, $http, $q) {
|
||||
return [];
|
||||
}
|
||||
|
||||
var result = [this.getCurrent().owner];
|
||||
this.getCurrent().users = [this.getCurrent().owner];
|
||||
let self = this;
|
||||
angular.forEach(this.getCurrent().acl, function(value, key) {
|
||||
if (value.type === OC.Share.SHARE_TYPE_USER) {
|
||||
result.push(value.participant);
|
||||
self.getCurrent().users.push(value.participant);
|
||||
}
|
||||
});
|
||||
this.getCurrent().users = result;
|
||||
};
|
||||
|
||||
BoardService.prototype.getUsers = function () {
|
||||
|
||||
@@ -4,21 +4,22 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.factory('CardService', function (ApiService, $http, $q) {
|
||||
var CardService = function ($http, ep, $q) {
|
||||
@@ -105,11 +106,11 @@ app.factory('CardService', function (ApiService, $http, $q) {
|
||||
CardService.prototype.assignUser = function (card, user) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
if (self.getCurrent().assignedUsers === null) {
|
||||
self.getCurrent().assignedUsers = [];
|
||||
if (self.get(card.id).assignedUsers === null) {
|
||||
self.get(card.id).assignedUsers = [];
|
||||
}
|
||||
$http.post(this.baseUrl + '/' + card.id + '/assign', {'userId': user}).then(function (response) {
|
||||
self.getCurrent().assignedUsers.push(response.data);
|
||||
self.get(card.id).assignedUsers.push(response.data);
|
||||
deferred.resolve(response.data);
|
||||
}, function (error) {
|
||||
deferred.reject('Error while update ' + self.endpoint);
|
||||
@@ -122,7 +123,7 @@ app.factory('CardService', function (ApiService, $http, $q) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
$http.delete(this.baseUrl + '/' + card.id + '/assign/' + user, {}).then(function (response) {
|
||||
self.getCurrent().assignedUsers = self.getCurrent().assignedUsers.filter(function (obj) {
|
||||
self.get(card.id).assignedUsers = self.get(card.id).assignedUsers.filter(function (obj) {
|
||||
return obj.participant.uid !== user;
|
||||
});
|
||||
deferred.resolve(response.data);
|
||||
@@ -132,6 +133,45 @@ app.factory('CardService', function (ApiService, $http, $q) {
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
CardService.prototype.attachmentRemove = function (attachment) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
$http.delete(this.baseUrl + '/' + this.getCurrent().id + '/attachment/' + attachment.id, {}).then(function (response) {
|
||||
if (response.data.deletedAt > 0) {
|
||||
let currentAttachment = self.getCurrent().attachments.find(function (obj) {
|
||||
if (obj.id === attachment.id) {
|
||||
obj.deletedAt = response.data.deletedAt;
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
self.getCurrent().attachments = self.getCurrent().attachments.filter(function (obj) {
|
||||
return obj.id !== attachment.id;
|
||||
});
|
||||
}
|
||||
deferred.resolve(response.data);
|
||||
}, function (error) {
|
||||
deferred.reject('Error when removing the attachment');
|
||||
});
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
CardService.prototype.attachmentRemoveUndo = function (attachment) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
$http.get(this.baseUrl + '/' + this.getCurrent().id + '/attachment/' + attachment.id + '/restore', {}).then(function (response) {
|
||||
let currentAttachment = self.getCurrent().attachments.find(function (obj) {
|
||||
if (obj.id === attachment.id) {
|
||||
obj.deletedAt = response.data.deletedAt;
|
||||
}
|
||||
});
|
||||
deferred.resolve(response.data);
|
||||
}, function (error) {
|
||||
deferred.reject('Error when restoring the attachment');
|
||||
});
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
var service = new CardService($http, 'cards', $q);
|
||||
return service;
|
||||
});
|
||||
});
|
||||
|
||||
137
js/service/FileService.js
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
|
||||
/* global OC oc_requesttoken */
|
||||
export default class FileService {
|
||||
|
||||
constructor (FileUploader, CardService, $rootScope, $filter) {
|
||||
this.$filter = $filter;
|
||||
this.uploader = new FileUploader();
|
||||
this.cardservice = CardService;
|
||||
this.uploader.onAfterAddingFile = this.onAfterAddingFile.bind(this);
|
||||
this.uploader.onSuccessItem = this.onSuccessItem.bind(this);
|
||||
this.uploader.onErrorItem = this.onErrorItem.bind(this);
|
||||
this.uploader.onCancelItem = this.onCancelItem.bind(this);
|
||||
|
||||
this.maxUploadSize = $rootScope.config.maxUploadSize;
|
||||
this.progress = [];
|
||||
this.status = null;
|
||||
}
|
||||
|
||||
reset () {
|
||||
this.status = null;
|
||||
}
|
||||
|
||||
runUpload (fileItem, attachmentId) {
|
||||
this.status = null;
|
||||
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment?type=deck_file');
|
||||
if (typeof attachmentId !== 'undefined') {
|
||||
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment/' + attachmentId + '?type=deck_file');
|
||||
} else {
|
||||
fileItem.formData = [
|
||||
{
|
||||
requesttoken: oc_requesttoken,
|
||||
type: 'deck_file',
|
||||
}
|
||||
];
|
||||
}
|
||||
fileItem.headers = {requesttoken: oc_requesttoken};
|
||||
|
||||
this.uploader.uploadItem(fileItem);
|
||||
}
|
||||
|
||||
onAfterAddingFile (fileItem) {
|
||||
if (this.maxUploadSize > 0 && fileItem.file.size > this.maxUploadSize) {
|
||||
this.status = {
|
||||
error: t('deck', `Failed to upload {name}`, {name: fileItem.file.name}),
|
||||
message: t('deck', 'Maximum file size of {size} exceeded', {size: this.$filter('bytes')(this.maxUploadSize)})
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
// Fetch card details before trying to upload so we can detect filename collisions properly
|
||||
let self = this;
|
||||
this.progress.push(fileItem);
|
||||
this.cardservice.fetchOne(fileItem.cardId).then(function (data) {
|
||||
let attachments = self.cardservice.get(fileItem.cardId).attachments;
|
||||
let existingFile = attachments.find((attachment) => {
|
||||
return attachment.data === fileItem.file.name;
|
||||
});
|
||||
if (typeof existingFile !== 'undefined') {
|
||||
OC.dialogs.confirm(
|
||||
`A file with the name ${fileItem.file.name} already exists. Do you want to overwrite it?`,
|
||||
'File already exists',
|
||||
function (result) {
|
||||
if (result) {
|
||||
self.runUpload(fileItem, existingFile.id);
|
||||
} else {
|
||||
let fileName = existingFile.extendedData.info.filename;
|
||||
let foundFilesMatching = attachments.filter((attachment) => {
|
||||
return attachment.extendedData.info.extension === existingFile.extendedData.info.extension
|
||||
&& attachment.extendedData.info.filename.startsWith(fileName);
|
||||
});
|
||||
let nextIndex = foundFilesMatching.length + 1;
|
||||
fileItem.file.name = fileName + ' (' + nextIndex + ').' + existingFile.extendedData.info.extension;
|
||||
self.runUpload(fileItem);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
self.runUpload(fileItem);
|
||||
}
|
||||
}, function (error) {
|
||||
this.progress = this.progress.filter((item) => (fileItem.file.name !== item.file.name));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
onSuccessItem (item, response) {
|
||||
let attachments = this.cardservice.get(item.cardId).attachments;
|
||||
let index = attachments.indexOf(attachments.find((attachment) => attachment.id === response.id));
|
||||
if (~index) {
|
||||
attachments = attachments.splice(index, 1);
|
||||
}
|
||||
this.cardservice.get(item.cardId).attachments.push(response);
|
||||
this.progress = this.progress.filter((fileItem) => (fileItem.file.name !== item.file.name));
|
||||
}
|
||||
|
||||
onErrorItem (item, response) {
|
||||
this.progress = this.progress.filter((fileItem) => (fileItem.file.name !== item.file.name));
|
||||
this.status = {
|
||||
error: t('deck', `Failed to upload:`) + ' ' + item.file.name,
|
||||
message: response.message
|
||||
};
|
||||
}
|
||||
|
||||
onCancelItem (item) {
|
||||
this.progress = this.progress.filter((fileItem) => (fileItem.file.name !== item.file.name));
|
||||
}
|
||||
|
||||
getProgressItemsForCard (cardId) {
|
||||
return this.progress.filter((fileItem) => (fileItem.cardId === cardId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.service('FileService', FileService);
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.factory('LabelService', function (ApiService, $http, $q) {
|
||||
var LabelService = function ($http, ep, $q) {
|
||||
|
||||
@@ -4,33 +4,46 @@
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.factory('StackService', function (ApiService, $http, $q) {
|
||||
/* global app angular */
|
||||
app.factory('StackService', function (ApiService, CardService, $http, $q) {
|
||||
var StackService = function ($http, ep, $q) {
|
||||
ApiService.call(this, $http, ep, $q);
|
||||
};
|
||||
StackService.prototype = angular.copy(ApiService.prototype);
|
||||
|
||||
StackService.prototype.afterFetch = function(stack) {
|
||||
CardService.addAll(stack.cards);
|
||||
};
|
||||
|
||||
StackService.prototype.fetchAll = function (boardId) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
$http.get(this.baseUrl + '/' + boardId).then(function (response) {
|
||||
self.clear();
|
||||
self.addAll(response.data);
|
||||
// When loading a stack add cards to the CardService so we can fetch
|
||||
// information from there. That way we don't need to refresh the whole
|
||||
// stack data during digest if some value changes
|
||||
angular.forEach(response.data, function (entity) {
|
||||
CardService.addAll(entity.cards);
|
||||
});
|
||||
deferred.resolve(self.data);
|
||||
}, function (error) {
|
||||
deferred.reject('Error while loading stacks');
|
||||
@@ -44,6 +57,9 @@ app.factory('StackService', function (ApiService, $http, $q) {
|
||||
$http.get(this.baseUrl + '/' + boardId + '/archived').then(function (response) {
|
||||
self.clear();
|
||||
self.addAll(response.data);
|
||||
angular.forEach(response.data, function (entity) {
|
||||
CardService.addAll(entity.cards);
|
||||
});
|
||||
deferred.resolve(self.data);
|
||||
}, function (error) {
|
||||
deferred.reject('Error while loading stacks');
|
||||
@@ -118,27 +134,6 @@ app.factory('StackService', function (ApiService, $http, $q) {
|
||||
}
|
||||
};
|
||||
|
||||
// FIXME: Should not sure popup but proper undo mechanism
|
||||
StackService.prototype.delete = function (id) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
|
||||
OC.dialogs.confirm(t('deck', 'Are you sure you want to delete the stack with all of its data?'), t('deck', 'Delete'), function(state) {
|
||||
if (!state) {
|
||||
return;
|
||||
}
|
||||
$http.delete(self.baseUrl + '/' + id).then(function (response) {
|
||||
self.remove(id);
|
||||
deferred.resolve(response.data);
|
||||
|
||||
}, function (error) {
|
||||
deferred.reject('Deleting ' + self.endpoint + ' failed');
|
||||
});
|
||||
});
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
var service = new StackService($http, 'stacks', $q);
|
||||
return service;
|
||||
});
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
app.factory('StatusService', function () {
|
||||
// Status Helper
|
||||
|
||||
68
js/webpack.config.js
Normal file
@@ -0,0 +1,68 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
|
||||
require('babel-polyfill');
|
||||
|
||||
module.exports = {
|
||||
node: {
|
||||
fs: 'empty',
|
||||
},
|
||||
entry: {
|
||||
deck: ['babel-polyfill', './init.js'],
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: __dirname + '/build'
|
||||
},
|
||||
resolve: {
|
||||
modules: [path.resolve(__dirname), 'node_modules'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
presets: ['@babel/preset-env'],
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
'css-loader'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
/* separate vendor chunk for node_modules and legacy scripts */
|
||||
commons: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
},
|
||||
legacy: {
|
||||
test: /[\\/]legacy[\\/]/,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* use external jQuery from server */
|
||||
externals: {
|
||||
'jquery': 'jQuery'
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin('[name].css'),
|
||||
new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
jQuery: 'jquery'
|
||||
})
|
||||
]
|
||||
};
|
||||
7
js/webpack.dev.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const merge = require('webpack-merge');
|
||||
const baseConfig = require('./webpack.config.js');
|
||||
|
||||
module.exports = merge(baseConfig, {
|
||||
mode: 'development',
|
||||
devtool: 'source-map',
|
||||
});
|
||||
15
js/webpack.prod.config.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const webpack = require('webpack');
|
||||
const merge = require('webpack-merge');
|
||||
const baseConfig = require('./webpack.config.js');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
|
||||
module.exports = merge(baseConfig, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
test: /(vendor\.js)+/i
|
||||
})
|
||||
]
|
||||
}});
|
||||
@@ -4,13 +4,18 @@ exclude = [
|
||||
".git",
|
||||
"js/node_modules",
|
||||
"js/tests",
|
||||
"js/legacy",
|
||||
"js/controller",
|
||||
"js/directive",
|
||||
"js/filters",
|
||||
"js/service",
|
||||
"js/bower.json",
|
||||
"js/.bowerrc",
|
||||
"js/.jshintrc",
|
||||
"js/Gruntfile.js",
|
||||
"js/package.json",
|
||||
"js/package-lock.json",
|
||||
"js/vendor/jquery",
|
||||
"docs/",
|
||||
"tests",
|
||||
".codecov.yml",
|
||||
"composer.json",
|
||||
@@ -24,6 +29,7 @@ exclude = [
|
||||
"issue_template.md",
|
||||
"krankerl.toml",
|
||||
"Makefile",
|
||||
"mkdocs.yml",
|
||||
"run-eslint.sh"
|
||||
]
|
||||
|
||||
|
||||
30
l10n/ast.js
@@ -1,30 +0,0 @@
|
||||
OC.L10N.register(
|
||||
"deck",
|
||||
{
|
||||
"Delete" : "Desaniciar",
|
||||
"Hours" : "Hores",
|
||||
"Minutes" : "Minutos",
|
||||
"Finished" : "Finó",
|
||||
"Action needed" : "Precísase aición",
|
||||
"Later" : "Más sero",
|
||||
"Deck" : "Deck",
|
||||
"Submit" : "Unviar",
|
||||
"Show archived cards" : "Amosar tarxetes archivaes",
|
||||
"Close" : "Zarrar",
|
||||
"Tags" : "Etiquetes",
|
||||
"Select users or groups to share with" : "Esbilla usuarios o grupos colos que compartir",
|
||||
"No matching user or group found." : "Nun s'alcontró dengún usuariu o grupu que concasara.",
|
||||
"Loading" : "Cargando",
|
||||
"Share" : "Compartir",
|
||||
"Edit" : "Editar",
|
||||
"Manage" : "Xestionar",
|
||||
"Discard share" : "Escartar compartición",
|
||||
"Title" : "Títulu",
|
||||
"Members" : "Miembros",
|
||||
"More actions" : "Más aiciones",
|
||||
"by" : "por",
|
||||
"Click to set" : "Primi p'afitar",
|
||||
"Description" : "Descripción",
|
||||
"Saved" : "Guardóse"
|
||||
},
|
||||
"nplurals=2; plural=(n != 1);");
|
||||
@@ -1,28 +0,0 @@
|
||||
{ "translations": {
|
||||
"Delete" : "Desaniciar",
|
||||
"Hours" : "Hores",
|
||||
"Minutes" : "Minutos",
|
||||
"Finished" : "Finó",
|
||||
"Action needed" : "Precísase aición",
|
||||
"Later" : "Más sero",
|
||||
"Deck" : "Deck",
|
||||
"Submit" : "Unviar",
|
||||
"Show archived cards" : "Amosar tarxetes archivaes",
|
||||
"Close" : "Zarrar",
|
||||
"Tags" : "Etiquetes",
|
||||
"Select users or groups to share with" : "Esbilla usuarios o grupos colos que compartir",
|
||||
"No matching user or group found." : "Nun s'alcontró dengún usuariu o grupu que concasara.",
|
||||
"Loading" : "Cargando",
|
||||
"Share" : "Compartir",
|
||||
"Edit" : "Editar",
|
||||
"Manage" : "Xestionar",
|
||||
"Discard share" : "Escartar compartición",
|
||||
"Title" : "Títulu",
|
||||
"Members" : "Miembros",
|
||||
"More actions" : "Más aiciones",
|
||||
"by" : "por",
|
||||
"Click to set" : "Primi p'afitar",
|
||||
"Description" : "Descripción",
|
||||
"Saved" : "Guardóse"
|
||||
},"pluralForm" :"nplurals=2; plural=(n != 1);"
|
||||
}
|
||||
24
l10n/bg.js
@@ -1,24 +0,0 @@
|
||||
OC.L10N.register(
|
||||
"deck",
|
||||
{
|
||||
"Delete" : "Изтриване",
|
||||
"Finished" : "Завършен",
|
||||
"To review" : "За преглед",
|
||||
"Action needed" : "Необходимо е действие",
|
||||
"Later" : "По-късно",
|
||||
"Archive" : "Архивиране",
|
||||
"Unarchive" : "Разархивиране",
|
||||
"Sharing" : "Споделяне",
|
||||
"Select users or groups to share with" : "Избор на потребители и групи за споделяне",
|
||||
"No matching user or group found." : "Не са намерени съвпадащи потребители или групи",
|
||||
"Share" : "Сподели",
|
||||
"Edit" : "Редакция",
|
||||
"Manage" : "Управление",
|
||||
"Discard share" : "Отхвърляне на споделяне",
|
||||
"Members" : "Членове",
|
||||
"Modified:" : "Променен на:",
|
||||
"Created:" : "Създаден на:",
|
||||
"by" : "от",
|
||||
"Saved" : "Запазено"
|
||||
},
|
||||
"nplurals=2; plural=(n != 1);");
|
||||