mirror of
https://github.com/documize/community.git
synced 2025-08-09 07:25:23 +02:00
Compare commits
1554 commits
Author | SHA1 | Date | |
---|---|---|---|
|
efb092ef8f | ||
|
3fc0a15f87 | ||
|
c841c85478 | ||
|
2dae03332b | ||
|
44b1f263cd | ||
|
982e16737e | ||
|
f641e42434 | ||
|
8895db56af | ||
|
acb59e1b43 | ||
|
f2ba294be8 | ||
|
69940cb7f1 | ||
|
6bfdda7178 | ||
|
027fdf108c | ||
|
1f12df76aa | ||
|
d811b88896 | ||
|
20fb853907 | ||
|
599c53a971 | ||
|
1f462ed4f7 | ||
|
9f122fa79b | ||
|
4210caca48 | ||
|
c62fa4612b | ||
|
510e1bd0bd | ||
|
a32510b8e6 | ||
|
589f3f581f | ||
|
20bba4cd7e | ||
|
cbf5f4be7d | ||
|
dc63639c99 | ||
|
26f435bdc9 | ||
|
a8a82963fa | ||
|
ab8582e807 | ||
|
4fa0566274 | ||
|
f4b45d2aa7 | ||
|
1abc5d3e52 | ||
|
6e463ff2f4 | ||
|
f80b3f3d10 | ||
|
6c218cf087 | ||
|
3d1c8a6c54 | ||
|
576fd5e604 | ||
|
62407a28b4 | ||
|
0adf6d5dc8 | ||
|
15f8a64c86 | ||
|
95c67acaa0 | ||
|
d8f66b5ffb | ||
|
c051e81a99 | ||
|
1d86b98949 | ||
|
0a1cc86907 | ||
|
a49869d35d | ||
|
848afd3263 | ||
|
b9cb99e3bb | ||
|
64261ffcf5 | ||
|
0030418707 | ||
|
0f91ee518e | ||
|
5de1b7a92e | ||
|
a2524f785e | ||
|
f16b9f3810 | ||
|
1c09771c33 | ||
|
13fc5b5015 | ||
|
76c777acc1 | ||
|
ea9ff78411 | ||
|
4a9dd47894 | ||
|
7565779ef1 | ||
|
c07e7b6afc | ||
|
88bdafcb1b | ||
|
5a3cb1b226 | ||
|
6ee8e6c7b4 | ||
|
599c464d2d | ||
|
ae77fa2275 | ||
|
610367aac5 | ||
|
be2c2a7a2c | ||
|
0d28b7ee79 | ||
|
aa8b473018 | ||
|
6993dc678f | ||
|
e0e3f0c141 | ||
|
4c031fe7e4 | ||
|
e4025bee42 | ||
|
876775b395 | ||
|
828c01d189 | ||
|
a69bcc0af6 | ||
|
5ec911dce2 | ||
|
ce07d4d147 | ||
|
f3ef83162e | ||
|
f1a01ec195 | ||
|
01e53c3d27 | ||
|
2cf21a7bea | ||
|
d4c606760c | ||
|
9343d77b26 | ||
|
30aa8aadb6 | ||
|
29bc2677a8 | ||
|
d9827df440 | ||
|
cfd7ebd2bf | ||
|
b510615691 | ||
|
e8641405cf | ||
|
209f1b667e | ||
|
e70019d73b | ||
|
dc26f063c8 | ||
|
68d067ef7b | ||
|
0d52f434d5 | ||
|
ce22c78dac | ||
|
f976ea36f6 | ||
|
1734963693 | ||
|
247a2b2c03 | ||
|
38a790dd04 | ||
|
b77b4abdc2 | ||
|
6b498a74c6 | ||
|
f6dd872782 | ||
|
9473ecba9a | ||
|
1a909dd046 | ||
|
607a2d5797 | ||
|
037dfc40cd | ||
|
65348eee28 | ||
|
78932fb8c7 | ||
|
6c8b10753d | ||
|
e56263564c | ||
|
22b6a4fb78 | ||
|
7e26c003d6 | ||
|
e81cbad385 | ||
|
4494ace0a2 | ||
|
23abcf1585 | ||
|
67070c3bfc | ||
|
77c767a351 | ||
|
17162ce336 | ||
|
7255eb4f56 | ||
|
df534f72fa | ||
|
f4a1350a41 | ||
|
cd15c393fe | ||
|
7f66977ac1 | ||
|
33a9cbb5b0 | ||
|
716343680a | ||
|
5db5f4d63b | ||
|
3d3d50762e | ||
|
20c9168140 | ||
|
ce9c635fb4 | ||
|
f735ae1278 | ||
|
bca7794c00 | ||
|
371706fb49 | ||
|
a236cbb01c | ||
|
93b6f26365 | ||
|
5e687f5ef4 | ||
|
97c4c927ac | ||
|
4885a1b380 | ||
|
e0805d7131 | ||
|
6d735e8579 | ||
|
073ef81e80 | ||
|
38c9a94a9c | ||
|
59dc6ea991 | ||
|
4ab48cc67d | ||
|
53297f7627 | ||
|
4ed2b3902c | ||
|
6968581e5b | ||
|
c09a116e56 | ||
|
7cf672646a | ||
|
29447a2784 | ||
|
479d03ba70 | ||
|
a7dac6911c | ||
|
08f21346c1 | ||
|
ce4f62d346 | ||
|
8a25509019 | ||
|
59c929d251 | ||
|
245c538990 | ||
|
32a9528e6d | ||
|
a15f0c8eb6 | ||
|
eb9fbd25b9 | ||
|
dbef758035 | ||
|
dea25a2b85 | ||
|
fcf38d8af9 | ||
|
ce93a5e623 | ||
|
8df1cc73b0 | ||
|
53ec7c9274 | ||
|
cfe85248ce | ||
|
30c31a1ba7 | ||
|
a97b6b22d9 | ||
|
e985c5f808 | ||
|
4b89f3b1c2 | ||
|
707dc1e052 | ||
|
88211739f0 | ||
|
6b3cdb5033 | ||
|
45f216b8a1 | ||
|
c31c130ffd | ||
|
5d5e212a6b | ||
|
8fa5569ae5 | ||
|
8976bf817b | ||
|
0c3fed2b18 | ||
|
60dfb54d54 | ||
|
c6863201b3 | ||
|
45567e274a | ||
|
dff4c6929b | ||
|
eea8db9288 | ||
|
e19c4ad18a | ||
|
989b7cd62c | ||
|
df8f650319 | ||
|
565a063231 | ||
|
cb46f34503 | ||
|
470e2d3ecf | ||
|
cddba799f8 | ||
|
05df22ed4a | ||
|
a5dfa6ee39 | ||
|
780ce2df61 | ||
|
9f28e1bff2 | ||
|
8ae94295a2 | ||
|
adb7b4d7bf | ||
|
66fcb77d8b | ||
|
972413110f | ||
|
a0a166136e | ||
|
30d12ba756 | ||
|
06bf9efcfc | ||
|
9ed8f79315 | ||
|
73e8c7a278 | ||
|
806efd7eac | ||
|
724f3c88b3 | ||
|
4a7d915ebb | ||
|
c7413da943 | ||
|
4e0218f5ea | ||
|
4fe022aa0c | ||
|
aaa8c3282d | ||
|
5e022dd0b8 | ||
|
bbca180298 | ||
|
cdc7489659 | ||
|
ab95fcc64d | ||
|
9bee58057e | ||
|
bda9719ecb | ||
|
fbd4b17c15 | ||
|
c689379f92 | ||
|
d1774b42bd | ||
|
8ac35a6b74 | ||
|
813f270a9d | ||
|
e014f5b5c1 | ||
|
2b66d0096a | ||
|
50f47f61a5 | ||
|
d26ecdc12f | ||
|
1a89201bd9 | ||
|
accf0a2c63 | ||
|
cafa3ceed0 | ||
|
2b3e9dfbc9 | ||
|
1c1ebee15a | ||
|
6ba4ca9c16 | ||
|
5aaa9f874d | ||
|
51a25adbdb | ||
|
9d025c3f71 | ||
|
a4384210d4 | ||
|
6882491201 | ||
|
d4edcb8b2c | ||
|
f117e91bcb | ||
|
5c1ad25dc9 | ||
|
8970a21b58 | ||
|
0e6f2f1f5e | ||
|
7fc74be7cd | ||
|
faeadb2bbb | ||
|
be50bf9f14 | ||
|
60ef205948 | ||
|
7ae801554d | ||
|
441efd42e9 | ||
|
a19ba46f7a | ||
|
ad361c22ba | ||
|
7954f4b976 | ||
|
2d105f2154 | ||
|
811e239baf | ||
|
c7e71173ea | ||
|
8fa8a3657c | ||
|
a64a219ce8 | ||
|
d7a484a936 | ||
|
017b19141c | ||
|
39f457e90e | ||
|
30d3e6f82e | ||
|
8c2bed283f | ||
|
a3867c617a | ||
|
28424e7e4b | ||
|
7c70274f5e | ||
|
ef5b5cdb32 | ||
|
ccd756aca0 | ||
|
444b89e425 | ||
|
3d0f17386b | ||
|
513fd9f994 | ||
|
5cef58eeba | ||
|
fad1de2e41 | ||
|
6b723568d3 | ||
|
00889f0e0e | ||
|
6629d76453 | ||
|
74300b009b | ||
|
5004e5a85e | ||
|
0524a0c74c | ||
|
b826852137 | ||
|
2c164a135a | ||
|
44febcc25c | ||
|
66e11cefbc | ||
|
5e9eeb5bf9 | ||
|
5b7610d726 | ||
|
0419f3b7b3 | ||
|
5b72da037c | ||
|
d14e8a3ff6 | ||
|
9a3d2c3c28 | ||
|
3b76e10ee0 | ||
|
29d7307537 | ||
|
96e5812fc0 | ||
|
c35eb16fc5 | ||
|
9dd78ca9be | ||
|
891ba07db8 | ||
|
2ee9a9ff46 | ||
|
399c36611f | ||
|
fbb73560c0 | ||
|
15e687841f | ||
|
0a10087160 | ||
|
9d0d4a7861 | ||
|
fc60a5917e | ||
|
285a01508b | ||
|
4f248bf018 | ||
|
32dbab826d | ||
|
b6e1543b7f | ||
|
f8bb879a70 | ||
|
20366e6776 | ||
|
ffacf17c5f | ||
|
bfe4c5d768 | ||
|
0f3a618140 | ||
|
826f6d96a6 | ||
|
6a9fa0140a | ||
|
24619c6a58 | ||
|
ebc8214049 | ||
|
71c1def5c7 | ||
|
fded0014a3 | ||
|
041091504f | ||
|
8c2df6178d | ||
|
02d478c6dd | ||
|
8c99977fc9 | ||
|
9d6b6fec23 | ||
|
4e0e3b5101 | ||
|
e219c97a6b | ||
|
7485f2cef7 | ||
|
627195aae7 | ||
|
f39be2a594 | ||
|
444b4fd1f7 | ||
|
b31f330c41 | ||
|
69077ce419 | ||
|
201d2a339c | ||
|
326019d655 | ||
|
264c25cfe0 | ||
|
595301db64 | ||
|
d6432afdad | ||
|
9c36241b58 | ||
|
c538fc9eb1 | ||
|
f3df43efe0 | ||
|
d04becc1a3 | ||
|
3621e2fb79 | ||
|
411f64c359 | ||
|
ae923e7df1 | ||
|
bfe5262cb5 | ||
|
80f0876b51 | ||
|
b2cd375936 | ||
|
243a170071 | ||
|
fb3f2cc24b | ||
|
946c433018 | ||
|
4d2f30711c | ||
|
887c999a1e | ||
|
b256bf2e9d | ||
|
8f4cd755de | ||
|
64612b825a | ||
|
216866a953 | ||
|
14820df165 | ||
|
f7a738ad84 | ||
|
df2775f8a4 | ||
|
a710839f69 | ||
|
2a45c82b46 | ||
|
7eec01811a | ||
|
ef5e4db298 | ||
|
b1cb0ed155 | ||
|
78fd14b3d3 | ||
|
82ddcc057d | ||
|
a90c5834fa | ||
|
ec8d5c78e2 | ||
|
b75969ae90 | ||
|
9b82f42cc1 | ||
|
b8fee6b962 | ||
|
8baad7e2f0 | ||
|
99a5418dba | ||
|
acd3dd63b5 | ||
|
96872990f9 | ||
|
c59a467cdb | ||
|
715c31a1da | ||
|
40237344e2 | ||
|
91a3c59cd2 | ||
|
fe7548cd97 | ||
|
ca4a9a74ee | ||
|
1e1cbdd843 | ||
|
c8b82c85fe | ||
|
bae7909801 | ||
|
c870547fa1 | ||
|
c0876e7be8 | ||
|
cd9f681adf | ||
|
0240f98eb0 | ||
|
c49707d160 | ||
|
c65eb97948 | ||
|
bc9dab72f2 | ||
|
6ae9414361 | ||
|
e37782e5b7 | ||
|
2bbeaf91a0 | ||
|
de273a38ed | ||
|
08794f8d5f | ||
|
14f313a836 | ||
|
62c3cd03ad | ||
|
bce1c1b166 | ||
|
758bf07272 | ||
|
479508e436 | ||
|
49bf4eeaa0 | ||
|
1c45aef461 | ||
|
a988bc0c3c | ||
|
91ec2f89d8 | ||
|
2477c36f11 | ||
|
e2a3962092 | ||
|
8ecbb9cdee | ||
|
f738077f5a | ||
|
f17de58fff | ||
|
40a0d77f93 | ||
|
072ca0dfed | ||
|
b054addb9c | ||
|
e59e1f060a | ||
|
faf9a555d2 | ||
|
8ab3cbe7e8 | ||
|
86d25b2191 | ||
|
9a53958c8f | ||
|
b971c52469 | ||
|
34d1639899 | ||
|
1fefdaec9f | ||
|
8f1bc8ce1f | ||
|
d151555597 | ||
|
4255291223 | ||
|
86a4e82c12 | ||
|
daa9e08ab4 | ||
|
c666e68c2b | ||
|
e6e3ed71ac | ||
|
89a28ad22f | ||
|
8e4ad6422b | ||
|
4de83beba4 | ||
|
10c57a0ae1 | ||
|
728789195c | ||
|
b5cd378302 | ||
|
7fde947a52 | ||
|
61d0086337 | ||
|
166aeba09b | ||
|
c0ed3c3d04 | ||
|
ab5314d5e1 | ||
|
51a0e1127e | ||
|
e10d04d22e | ||
|
2fffb7869e | ||
|
82ed36478b | ||
|
1da49974cb | ||
|
9e3eac19aa | ||
|
92696c5181 | ||
|
eecf316d50 | ||
|
fa383a58ff | ||
|
b5a5cfd697 | ||
|
2ddd7ada9b | ||
|
8515a77403 | ||
|
f8d97d2a56 | ||
|
e98f7b9218 | ||
|
a41f43c380 | ||
|
64403c402b | ||
|
9ec858286f | ||
|
80aab3ce99 | ||
|
deb579d8ad | ||
|
e6335dd58c | ||
|
e1a8f8b724 | ||
|
e1001bb11e | ||
|
dbee77df56 | ||
|
9c2bff0374 | ||
|
651cbb1dfe | ||
|
a98c3a0fe2 | ||
|
a08b583b22 | ||
|
6738d2c9e1 | ||
|
441001fffe | ||
|
a4e07fbf7f | ||
|
9a41e82aa3 | ||
|
b89a297c70 | ||
|
ca1e281775 | ||
|
c5fc0f93e0 | ||
|
217e8a3a29 | ||
|
1854998c80 | ||
|
f4a371357e | ||
|
1d00f8ac6e | ||
|
0985dbf5b6 | ||
|
b2fcad649e | ||
|
f062005946 | ||
|
36d7136210 | ||
|
0bfde82040 | ||
|
e6e5f75ee7 | ||
|
eb9501014d | ||
|
e35639502d | ||
|
3db4981181 | ||
|
3206eb4176 | ||
|
576e1beade | ||
|
54eefc5132 | ||
|
fbb1e334f8 | ||
|
bb73655327 | ||
|
8c2febd636 | ||
|
395008d06d | ||
|
d009e4ed2a | ||
|
54bf258c61 | ||
|
8332e8a03d | ||
|
a6f8be2928 | ||
|
cbd9fddcfe | ||
|
4013b5ca03 | ||
|
24b1326c31 | ||
|
566807bc14 | ||
|
df8e843bf5 | ||
|
4d0de69489 | ||
|
25c247e99b | ||
|
ed99b0c9f3 | ||
|
8b0bb456d9 | ||
|
e438542cab | ||
|
553c17181e | ||
|
9b06ddecb5 | ||
|
3fd1d793a3 | ||
|
fc17ea5225 | ||
|
f47f09661f | ||
|
4b7d4cf872 | ||
|
c108d0eb30 | ||
|
1f5221ffa0 | ||
|
a888b12ad1 | ||
|
2510972a83 | ||
|
560f786b8b | ||
|
af641b93f1 | ||
|
f4fa63359f | ||
|
f828583b49 | ||
|
af9bc25660 | ||
|
66003dac21 | ||
|
d4f6694933 | ||
|
27030a0dc2 | ||
|
43f515a1f9 | ||
|
9aaea9492a | ||
|
ac84eaf85d | ||
|
9504a8cf6c | ||
|
fbe353475c | ||
|
bbed3e5a08 | ||
|
9f4715a494 | ||
|
d8cb69b6c0 | ||
|
7f2d2c01a6 | ||
|
f3e66b73c1 | ||
|
02ffaa5f99 | ||
|
9219dd9296 | ||
|
5faf6bda9b | ||
|
89a7496c7f | ||
|
c0c3ca18e2 | ||
|
2e443de84e | ||
|
9b51d9990f | ||
|
278572c49b | ||
|
1e217274c6 | ||
|
9fd002b5da | ||
|
f5bdbb49d0 | ||
|
c69020f1e6 | ||
|
0707bdd3d6 | ||
|
36634be6f5 | ||
|
6c71a1f18d | ||
|
6126d4dd5d | ||
|
013d09dda4 | ||
|
c6632fec1d | ||
|
e8735ffc12 | ||
|
c5155da74b | ||
|
e737339090 | ||
|
4f63a32ab1 | ||
|
7cc0b9c9b8 | ||
|
560d00322f | ||
|
b6d9c54667 | ||
|
6c07d2e569 | ||
|
924b707db0 | ||
|
3da4144c1b | ||
|
1ef209b74f | ||
|
d281621d90 | ||
|
d05052a5b4 | ||
|
317e9cbcaa | ||
|
2efd239d14 | ||
|
984aa854e5 | ||
|
ca213ba5d1 | ||
|
c1d796e6bc | ||
|
60fbdfda11 | ||
|
659eb99c0f | ||
|
bc28b36627 | ||
|
f73c2f13d4 | ||
|
0ce10ae5a2 | ||
|
a1d5dcaed9 | ||
|
3beb47fd49 | ||
|
aa0f76d3e2 | ||
|
479a61a3ef | ||
|
c706edec47 | ||
|
5467771542 | ||
|
1d4a20cdfe | ||
|
1b268d42de | ||
|
4ddbe59556 | ||
|
a424bbfcae | ||
|
fb391d49a5 | ||
|
9206e9aaa1 | ||
|
e6ddb1ec24 | ||
|
0b94d55fb9 | ||
|
4d83f5efd7 | ||
|
dd355958a2 | ||
|
90aa9710a6 | ||
|
036f36ba1d | ||
|
a211ba051a | ||
|
fe8068965c | ||
|
5757b2d36e | ||
|
3d0a3cecf9 | ||
|
eb56169fe5 | ||
|
6f495dd1c6 | ||
|
b495041222 | ||
|
92cb03a1db | ||
|
60f8cb7b5b | ||
|
60d2ef57bb | ||
|
61c648a7ac | ||
|
d0f0a12f2d | ||
|
89957c8278 | ||
|
e140caff55 | ||
|
3c81297fc6 | ||
|
2042454e77 | ||
|
329c43eba0 | ||
|
93253be0f2 | ||
|
3d2060ca60 | ||
|
7cdf97aa86 | ||
|
b4b3dbcb4c | ||
|
60e92b63a9 | ||
|
d5b5e015d1 | ||
|
0cc83c13c8 | ||
|
42db78ce14 | ||
|
05a1db9d8a | ||
|
9f35cbb64a | ||
|
d1bc4a5b4c | ||
|
8a654fcf3d | ||
|
0ec0c65002 | ||
|
edb256e754 | ||
|
ff1d737c68 | ||
|
8d525ce733 | ||
|
f442081a41 | ||
|
02102f9bf3 | ||
|
6eb68f84e0 | ||
|
f140e7ef77 | ||
|
adbd00bdd7 | ||
|
c7808d0b5a | ||
|
cf263a4f6a | ||
|
70a3b5915c | ||
|
5cfbf07e55 | ||
|
4b68529090 | ||
|
44d3e40663 | ||
|
0de7efdf20 | ||
|
3b179d5bc0 | ||
|
75a19a80f9 | ||
|
f05a6fc999 | ||
|
f44cda66e6 | ||
|
d7a46ceee6 | ||
|
da0861b3fd | ||
|
34d54745f3 | ||
|
679049d2b1 | ||
|
11e164496b | ||
|
a7e52809dc | ||
|
7428199fdd | ||
|
d499888cfd | ||
|
c152d029f2 | ||
|
5d632712e0 | ||
|
09635b67ab | ||
|
73d91a2dae | ||
|
5153d49ad7 | ||
|
b1865b2318 | ||
|
7e959b448c | ||
|
b37f9d601f | ||
|
0a313be1de | ||
|
1d8bb2d3ad | ||
|
3913995dd0 | ||
|
5e58b56182 | ||
|
cb9fd0940d | ||
|
4df1574663 | ||
|
77ab56dbf8 | ||
|
c0e1bd5045 | ||
|
0a64afd6b5 | ||
|
6a9ad7f540 | ||
|
d1b803b246 | ||
|
745e610bcb | ||
|
db78d75489 | ||
|
e116d3b000 | ||
|
6e4c5194e2 | ||
|
eb57cfbfd6 | ||
|
cccf160d37 | ||
|
4b543733e7 | ||
|
8cc6bf3d40 | ||
|
9c6075c6a4 | ||
|
150f86025b | ||
|
313ed7f90a | ||
|
f950075593 | ||
|
9667e8c2a0 | ||
|
88b84dc5ed | ||
|
cee71cb313 | ||
|
db04057d9e | ||
|
ec1939c01d | ||
|
b3383f46ca | ||
|
516140dd7e | ||
|
71a2860716 | ||
|
e0457b40da | ||
|
66d5e73ed1 | ||
|
4094677792 | ||
|
8bbb0d3e82 | ||
|
4aa3bba7bc | ||
|
49f05746bd | ||
|
8eb930d281 | ||
|
85b3f6e8ee | ||
|
5b4c3ec8cd | ||
|
df0e3c108e | ||
|
ab2cbd4ff7 | ||
|
391c143483 | ||
|
7860bc1808 | ||
|
486395c1ce | ||
|
1c3eef345f | ||
|
c5476d99e9 | ||
|
6dfb1ad2e5 | ||
|
075060d11c | ||
|
97d36fa2c8 | ||
|
58aad87770 | ||
|
8a65567169 | ||
|
97beb3f4d3 | ||
|
b455e5eaf5 | ||
|
d0e005f638 | ||
|
a9e12f3b4c | ||
|
153e38a5d4 | ||
|
fe7389e7ca | ||
|
8ee63de6c7 | ||
|
944fd98421 | ||
|
5376bd88d8 | ||
|
3ea6ae3c37 | ||
|
d67767fcfc | ||
|
4f0cc2f616 | ||
|
28342fcf5e | ||
|
9c2594b1b4 | ||
|
4f525bd634 | ||
|
09de686fcf | ||
|
97d90662dd | ||
|
4c733ce581 | ||
|
2336dab69f | ||
|
cf1e1ff943 | ||
|
3bccd6a537 | ||
|
d7fea2125f | ||
|
2792c8c1da | ||
|
0f19826556 | ||
|
64e6a41353 | ||
|
0847a82fc9 | ||
|
9ee9526a47 | ||
|
53e4861ded | ||
|
8ab23c657b | ||
|
e03497032b | ||
|
ae084ae0bb | ||
|
6e0958b3c3 | ||
|
074eea3aeb | ||
|
63b17f9b88 | ||
|
1ce7e53398 | ||
|
fd167234ae | ||
|
e6b557f43b | ||
|
a7865d0f71 | ||
|
7df0fbcb2b | ||
|
e490407260 | ||
|
e7bff0359a | ||
|
2a2831e576 | ||
|
8d3dfcc3c7 | ||
|
f28b7497fa | ||
|
b1a35b7f75 | ||
|
8a30f3681c | ||
|
6073b24036 | ||
|
1b16be2505 | ||
|
bd2e8ac165 | ||
|
351b8dcc12 | ||
|
2c8b757ff6 | ||
|
abc0b206a4 | ||
|
47bb9d7d74 | ||
|
58fc03f4c1 | ||
|
9987d29b7b | ||
|
7206f721f4 | ||
|
4d1eb952b2 | ||
|
64b1394ec1 | ||
|
7b178a76b2 | ||
|
0f9602e3a0 | ||
|
7878a244d3 | ||
|
0c5ec43c80 | ||
|
39891a0758 | ||
|
63ce324eae | ||
|
b74dfe6385 | ||
|
aaca1c73b1 | ||
|
67bb3bae4f | ||
|
39677791b3 | ||
|
82a5bfe198 | ||
|
9d80c5fc8c | ||
|
4949043df9 | ||
|
b7fa4e1a1a | ||
|
def01b6265 | ||
|
cf0b06923d | ||
|
ef425a6ce2 | ||
|
689e5078b8 | ||
|
f916801008 | ||
|
d0970c153b | ||
|
743eae5aad | ||
|
f884926df7 | ||
|
50c7fabeb6 | ||
|
6617a5de45 | ||
|
4cfbd57871 | ||
|
19736aab04 | ||
|
0743ae002c | ||
|
4130d1f129 | ||
|
10a184ad10 | ||
|
a0f6626367 | ||
|
d5be8ec843 | ||
|
13deb55cbb | ||
|
5ed180396e | ||
|
ad44112359 | ||
|
5d80480d75 | ||
|
ecc306136a | ||
|
419ce1bbb5 | ||
|
3c5065375d | ||
|
dc091fed7b | ||
|
467acec3c4 | ||
|
ae50b889c5 | ||
|
6ff74cf45e | ||
|
785e4c245d | ||
|
5d33860a15 | ||
|
d689cbc281 | ||
|
29534273b8 | ||
|
03be1ce904 | ||
|
30856433f8 | ||
|
27fde0dac8 | ||
|
f70d4b33a3 | ||
|
df9d9e174a | ||
|
6e7f3cceaa | ||
|
8db452a18b | ||
|
0b139c871f | ||
|
5a480479a1 | ||
|
ee28e27b16 | ||
|
ce9d314837 | ||
|
628a633a0a | ||
|
ed6edd8dcb | ||
|
ad2e653f3c | ||
|
2e9734e73e | ||
|
0da8ae9e4a | ||
|
d88adef5b5 | ||
|
acdf2025ab | ||
|
78cdca3266 | ||
|
5fe094a2d7 | ||
|
b316ba80d8 | ||
|
bf305d271e | ||
|
dea7a99aed | ||
|
94a2e2c0f7 | ||
|
2d2296591b | ||
|
b34e41f65c | ||
|
b828145163 | ||
|
9a3259b60e | ||
|
372b3f3692 | ||
|
e68a18395e | ||
|
fcd95cf415 | ||
|
92f8fe550e | ||
|
738b3d94b6 | ||
|
59bc495b56 | ||
|
193d6914d6 | ||
|
06b28991a7 | ||
|
fca6cc7ede | ||
|
716bd062d7 | ||
|
d5157615e0 | ||
|
dc2c7a5f7c | ||
|
f9e2141ed4 | ||
|
b0daabb577 | ||
|
983b84235c | ||
|
25fd13bd3f | ||
|
f20a1d1d5f | ||
|
c7cc36b307 | ||
|
c5561491a2 | ||
|
cfe30dcde5 | ||
|
36be6243ad | ||
|
21ba55a58f | ||
|
3903e58367 | ||
|
5d757c992f | ||
|
a453052087 | ||
|
95323c90ee | ||
|
09d698fd2a | ||
|
31580d883c | ||
|
eb7ebf391d | ||
|
942bc386f4 | ||
|
4045197871 | ||
|
46ee4b1a58 | ||
|
f5b196c334 | ||
|
53c2404822 | ||
|
df1e022e71 | ||
|
3e428de4cc | ||
|
17fc2329df | ||
|
9724f85653 | ||
|
e85744e1b3 | ||
|
c66fae703c | ||
|
e4c075ea4b | ||
|
2066f72258 | ||
|
0f87d5b07e | ||
|
c94fd9cfcf | ||
|
fb193ce9f9 | ||
|
2298ac3376 | ||
|
3b0291d94c | ||
|
c32d094e91 | ||
|
3bc775582d | ||
|
af632615cf | ||
|
85b6e40d8c | ||
|
d746c90624 | ||
|
2b8a7921ad | ||
|
567ee10c5f | ||
|
ba42d5e282 | ||
|
fb8adc6491 | ||
|
455a384eb0 | ||
|
e234471b1e | ||
|
b839a0753c | ||
|
05da8894b9 | ||
|
734e8653dd | ||
|
3e37b9b7e4 | ||
|
b1e0e31a9e | ||
|
f2a903d054 | ||
|
b40db1433e | ||
|
962a8369aa | ||
|
f21c80d960 | ||
|
7b619101f1 | ||
|
08557c369c | ||
|
e47c5e61fc | ||
|
123fce6c17 | ||
|
91c8b05d89 | ||
|
74e9699e1e | ||
|
9235c183c5 | ||
|
bde0091a4a | ||
|
8fb001422a | ||
|
0019e860ad | ||
|
591579251e | ||
|
46f5f25acc | ||
|
94ca80f052 | ||
|
22b6674edb | ||
|
6c8f23792c | ||
|
1887eb8100 | ||
|
1ea30ee8e1 | ||
|
b1d677778b | ||
|
a3157749f0 | ||
|
cc7bcc31be | ||
|
2dce8a89a4 | ||
|
efcc0fe9ac | ||
|
ddd90a4aaf | ||
|
c92ab3a589 | ||
|
5fb41e9fb1 | ||
|
19a916a4b4 | ||
|
b65a00dd1c | ||
|
f2b1b5af03 | ||
|
ca62d74a19 | ||
|
335a1d1f81 | ||
|
c9e429ea1a | ||
|
663ec23c75 | ||
|
c29426f2d7 | ||
|
274b77cb8f | ||
|
01720722d6 | ||
|
2579382280 | ||
|
e19e3682b7 | ||
|
38772f5961 | ||
|
0d78cf3dda | ||
|
18930fb610 | ||
|
ca91cd8e49 | ||
|
ee10e6db3b | ||
|
b4c4decb3b | ||
|
a6828e6b7f | ||
|
4816cf73c0 | ||
|
c138716ff4 | ||
|
527b02e8b3 | ||
|
1944690540 | ||
|
df0a13b6ed | ||
|
30315a36c7 | ||
|
ad4030bc17 | ||
|
e1d2d4c037 | ||
|
c3c4e9820e | ||
|
3e1ee64e6f | ||
|
d45182b382 | ||
|
8077dd939a | ||
|
c31711c130 | ||
|
0b85657536 | ||
|
8d65c2d571 | ||
|
38e8c4665a | ||
|
5c0b87bac5 | ||
|
eaf46f06c1 | ||
|
97cc5374f0 | ||
|
c5acaae677 | ||
|
297ce94546 | ||
|
d9a2b16c2a | ||
|
6ac035f196 | ||
|
7eb99c52f2 | ||
|
f825e9fdc9 | ||
|
eb3bebf20d | ||
|
a7a82d9fe3 | ||
|
bc2cab5721 | ||
|
8466cafe1f | ||
|
ddcc61d5e0 | ||
|
089457f16e | ||
|
ba52dfa11d | ||
|
d9a9a828ed | ||
|
b2e3f2be7e | ||
|
958f4d30b9 | ||
|
4e32bffebe | ||
|
c7ebbff318 | ||
|
359e0e29eb | ||
|
1c4a4424e5 | ||
|
f3e4b4060e | ||
|
e6e099db1a | ||
|
bd43319bb2 | ||
|
99220641f3 | ||
|
b2b3e6fca6 | ||
|
ada775e074 | ||
|
ad3f406876 | ||
|
93b95b9eca | ||
|
22679920d0 | ||
|
d1fdb385e9 | ||
|
7ccb3b4658 | ||
|
0d39f7251e | ||
|
08f0c2cd0b | ||
|
99f0a16d71 | ||
|
f0aed0ba77 | ||
|
ed11c0ad11 | ||
|
0b5ed8fd9e | ||
|
7e6d6366da | ||
|
e4d78904dc | ||
|
0680a72ee2 | ||
|
19b4a3de49 | ||
|
00f415214c | ||
|
f8e47fe1d2 | ||
|
ae6494b4f0 | ||
|
e9e1d76831 | ||
|
92533036a7 | ||
|
421fde56e8 | ||
|
8d4c6a19ee | ||
|
c705e8c299 | ||
|
3993cfeb8e | ||
|
c1667e97b7 | ||
|
fc742a2282 | ||
|
bca306347d | ||
|
fd693f4ff4 | ||
|
0262763c95 | ||
|
1e2c468dc4 | ||
|
26de0551ae | ||
|
b5aef1dc87 | ||
|
8f0440d55f | ||
|
1ef8807b2d | ||
|
9d82682797 | ||
|
7d3473365a | ||
|
0f3de51ad5 | ||
|
f967949513 | ||
|
1370b2f2b5 | ||
|
bd9b7e120e | ||
|
0997655e0a | ||
|
880f39f1cb | ||
|
f61f260db1 | ||
|
c000a66eef | ||
|
c77b5c05ca | ||
|
ce3e5c829b | ||
|
717df79e16 | ||
|
bffdd1f2b1 | ||
|
601262db12 | ||
|
a1833f56a3 | ||
|
9d8b1d2f3c | ||
|
91bab8c710 | ||
|
5295f8a41f | ||
|
8ddc6cedde | ||
|
2d8dc62ca4 | ||
|
412127811e | ||
|
c0d70e38de | ||
|
adef6dfffa | ||
|
88b99979a9 | ||
|
4c80b8877d | ||
|
8ec36cfa49 | ||
|
cb4b6ee6c3 | ||
|
5dd7d9c181 | ||
|
b4fd42da38 | ||
|
b7811eccde | ||
|
c0d19f2531 | ||
|
6409ad0d63 | ||
|
5f59e95495 | ||
|
049b83e0b9 | ||
|
a13b631a7e | ||
|
b9394a4967 | ||
|
f4f32bcfcb | ||
|
58c88e2127 | ||
|
7505904de1 | ||
|
9a804b5666 | ||
|
40ade5c777 | ||
|
0b0cae4a8d | ||
|
cafa410d16 | ||
|
00070d7f0d | ||
|
d0f28daa7c | ||
|
ebdaa9529c | ||
|
e897b078fd | ||
|
c3a2717bfa | ||
|
34d7a97ae8 | ||
|
43d3e84573 | ||
|
50a17256e5 | ||
|
ca783dd323 | ||
|
4de19dcbec | ||
|
8b05e7ab81 | ||
|
44970a7861 | ||
|
0336f84a83 | ||
|
3337db6b27 | ||
|
1ed6427532 | ||
|
5d3ddaa2d9 | ||
|
f72b02cbb2 | ||
|
af7e089764 | ||
|
a728f14d41 | ||
|
9afc4ca98b | ||
|
ab475ede04 | ||
|
e25f23e94c | ||
|
26243a5a55 | ||
|
c449bdcd16 | ||
|
dd45a67537 | ||
|
6f1b0564e2 | ||
|
215f644d11 | ||
|
3329942d8a | ||
|
b339df5125 | ||
|
e158c9f0f8 | ||
|
4cf8c34ebd | ||
|
3f2edcaa96 | ||
|
869884abda | ||
|
daf61dfe9f | ||
|
cc1c216754 | ||
|
5edd08ee04 | ||
|
e61b2d0aa8 | ||
|
66bc874d95 | ||
|
cce1b5ef50 | ||
|
486b5983d9 | ||
|
6cc78f76da | ||
|
c5c988709d | ||
|
5de856e579 | ||
|
2da0089c1c | ||
|
9dcaf697a8 | ||
|
c12d66643c | ||
|
0eef10e586 | ||
|
57b3801f87 | ||
|
35947ffbfc | ||
|
23a6b25b0a | ||
|
db1b3aef8c | ||
|
531e9c88d7 | ||
|
13a879a89b | ||
|
836b7f3fb4 | ||
|
72615ba77b | ||
|
9fd53142f3 | ||
|
666ab3151e | ||
|
8415f11303 | ||
|
60fb4e5008 | ||
|
2d7e3c2904 | ||
|
e8785f5420 | ||
|
7188324714 | ||
|
fbb6f3485d | ||
|
95bb440a65 | ||
|
79531e01b3 | ||
|
75aa00beca | ||
|
fd6b4c051b | ||
|
68f5008a52 | ||
|
2ba948bc82 | ||
|
102f0c3800 | ||
|
533a0f094e | ||
|
1f0fc844a8 | ||
|
1c08a7fbcf | ||
|
e10313b7cc | ||
|
18fc5db8c6 | ||
|
aee9345886 | ||
|
bae1245d47 | ||
|
9cbee80f51 | ||
|
acc947c2ed | ||
|
4bc08cbdee | ||
|
ec5d21be4a | ||
|
b31ab712c1 | ||
|
0f04be4ea1 | ||
|
f35fdab9ba | ||
|
e265323a90 | ||
|
2b642f25d3 | ||
|
5ad905a576 | ||
|
cb6dce9613 | ||
|
1e3f8e51f0 | ||
|
785d12191e | ||
|
38b401f646 | ||
|
c77b384215 | ||
|
f2794a9836 | ||
|
d9eda2a0ff | ||
|
e44837c8db | ||
|
41340a7b15 | ||
|
318abef710 | ||
|
bc72db711f | ||
|
82c381de0d | ||
|
94f52760ec | ||
|
f5c819331d | ||
|
8680237016 | ||
|
b8d848549e | ||
|
b2138d6bdb | ||
|
604bdf78da | ||
|
de384f2412 | ||
|
c8dc284d03 | ||
|
0e00085f81 | ||
|
ab7a515b9d | ||
|
1d2109aa44 | ||
|
7ce3adb65e | ||
|
30321781c2 | ||
|
f5f30d2322 | ||
|
620fe28b27 | ||
|
ba5988dca3 | ||
|
8d761da939 | ||
|
5481de4e1c | ||
|
2cee83d570 | ||
|
a0a1dd396a | ||
|
8f80673cde | ||
|
9ccd0fd19c | ||
|
d6e18b4289 | ||
|
37563632ef | ||
|
1b548ea03e | ||
|
f0582e18f7 | ||
|
508ec00c6a | ||
|
b56d3426d2 | ||
|
3a9675eb14 | ||
|
4d989e2497 | ||
|
3f31d6d15e | ||
|
0c152c219f | ||
|
775990f040 | ||
|
ea38729f55 | ||
|
4874d23f15 | ||
|
a86d52388e | ||
|
6a651770b5 | ||
|
c12c000ef3 | ||
|
c4c95a9d24 | ||
|
cd543a1506 | ||
|
300b617583 | ||
|
ef285c91de | ||
|
5f7c6d211f | ||
|
ae05cacf3f | ||
|
eae1a9a429 | ||
|
c51ba65b1d | ||
|
fbf2222eda | ||
|
2386dcbd83 | ||
|
e92ad317d8 | ||
|
42b86b0513 | ||
|
f4f2f5c032 | ||
|
0de060138d | ||
|
66497d5407 | ||
|
6ecf5a87cd | ||
|
d6a17d5a56 | ||
|
dba57a15a8 | ||
|
a982af6e79 | ||
|
e505bb36e2 | ||
|
d3512b499a | ||
|
8081b60146 | ||
|
63b24aed3f | ||
|
c235fb569e | ||
|
07c8238664 | ||
|
5a2c44717e | ||
|
bf390ed0b9 | ||
|
81cd22e130 | ||
|
866b4eba8a | ||
|
17db964b10 | ||
|
adbe93a28a | ||
|
5b70ffd954 | ||
|
eeb3d8f070 | ||
|
f3c7f0eca7 | ||
|
558d90d2ba | ||
|
574139ae21 | ||
|
a306ca2fcd | ||
|
599b961a38 | ||
|
b2a5bc8451 | ||
|
d4463b5aaa | ||
|
1b96c9093f | ||
|
19ae74b388 | ||
|
2c5f73a486 | ||
|
6c3042fd4e | ||
|
7d0c1a3922 | ||
|
4ff78efef2 | ||
|
4fc83c9734 | ||
|
888569d070 | ||
|
4b24cbc686 | ||
|
00c2d17fcb | ||
|
db1af55c6c | ||
|
d45aa70157 | ||
|
9e20a5f085 | ||
|
557da2847e | ||
|
62b7b149c1 | ||
|
0ee2903608 | ||
|
4046accc23 | ||
|
476403bf46 | ||
|
ecc94f31c9 | ||
|
562872a4a8 | ||
|
e284a46f86 | ||
|
5e2c96bf5b | ||
|
23e111f60d | ||
|
d5bc9bb7cb | ||
|
f7bcf1366c | ||
|
7faf6d6cff | ||
|
65390ab67d | ||
|
7756a50d64 | ||
|
d90b3249c3 | ||
|
72b14def6d | ||
|
27640dffc4 | ||
|
792c3e2ce8 | ||
|
25b576f861 | ||
|
d888962082 | ||
|
76d77bef9b | ||
|
1f713c11b6 | ||
|
3defc062bd | ||
|
5acfae3d0d | ||
|
6fd6bc6d26 | ||
|
56238b00c5 | ||
|
89cfbf3e48 | ||
|
d85218ccd2 | ||
|
bc49041359 | ||
|
763bd1f0e2 | ||
|
68130122e7 | ||
|
dc49dbbeff | ||
|
6a18d18f91 | ||
|
fe05cf7bb5 | ||
|
cf58f8164d | ||
|
7b8cec9a6c | ||
|
23948aa386 | ||
|
bcfe638863 | ||
|
6e1cca8658 | ||
|
b6616d4965 | ||
|
7455a027fc | ||
|
fddaf9effe | ||
|
761d3c212c | ||
|
69e90ec56a | ||
|
34527d76e2 | ||
|
d4062db02d | ||
|
3d6727ff4c | ||
|
a8e8d141d2 | ||
|
7397812307 | ||
|
567d49f794 | ||
|
3c1306d178 | ||
|
b1b1544d60 | ||
|
19baae5a3f | ||
|
d46c32c7a2 | ||
|
86dcbbd684 | ||
|
bbcba8eb18 | ||
|
99b9427b8e | ||
|
65666c5a89 | ||
|
60131df628 | ||
|
88add0ae63 | ||
|
36e8f86488 | ||
|
c797a87eb9 | ||
|
2d5b8e652f | ||
|
92eca1a1ce | ||
|
93ed361705 | ||
|
b6c676149a | ||
|
f48740ec12 | ||
|
f8e091db53 | ||
|
bcabe494e3 | ||
|
740c2ca189 | ||
|
831dfce3cb | ||
|
be02ad2726 | ||
|
4a2147189a | ||
|
ef6b7f429c | ||
|
6944d57707 | ||
|
0829ca6cac | ||
|
972cc688eb | ||
|
f2a672b33d | ||
|
d9cdedad60 | ||
|
6f98db5c29 | ||
|
585c4468c1 | ||
|
ef9097b4f4 | ||
|
658f0105d1 | ||
|
11c2398869 | ||
|
68deb3feaf | ||
|
30730e12ea | ||
|
44a5e31bb7 | ||
|
e97b992fa9 | ||
|
bc630e1e51 | ||
|
96e4b2058c | ||
|
d91811bb3d | ||
|
20ac8ac867 | ||
|
c5443fffb4 | ||
|
c6ca284e6d | ||
|
2d741e9ca7 | ||
|
8852a7b333 | ||
|
22e9d34d7a | ||
|
1e077fdf2e | ||
|
ce42a18fac | ||
|
568cb5ca3c | ||
|
1ec8d7e189 | ||
|
dfe0ab4709 | ||
|
1165e2fe38 | ||
|
21e3f291e4 | ||
|
de4eb2e507 | ||
|
2ea782aaed | ||
|
5bfd3bb247 | ||
|
27ce8507d5 | ||
|
b0fe7aff26 | ||
|
68107a4ea1 | ||
|
eb404db596 | ||
|
4f277c8500 | ||
|
fa0f176613 | ||
|
90eb4f9517 | ||
|
af97efec83 | ||
|
dbba63c6cf | ||
|
3791569d0e | ||
|
30f3644180 | ||
|
872183b35a | ||
|
e5119dd243 | ||
|
2c33c6443b | ||
|
0fedfb199b | ||
|
0f9d673eb5 | ||
|
8c062d592a | ||
|
b2620e80e1 | ||
|
945fadaf00 | ||
|
1c6e1c7bd7 | ||
|
f674631149 | ||
|
8aeb3eaec4 | ||
|
b5f85637a7 | ||
|
a585a55033 | ||
|
74c9e76d09 | ||
|
9d1af37f6e | ||
|
0b51608383 | ||
|
bbf115b9b1 | ||
|
50bba60bf3 | ||
|
2dafa36020 | ||
|
ea1a8000ee | ||
|
2e146cf767 | ||
|
2b7094e404 | ||
|
639e949120 | ||
|
24f3a5ae55 | ||
|
b31c4d4850 | ||
|
5235efdb34 | ||
|
b394d926fc | ||
|
2fa97da47d | ||
|
7ad8cd8370 | ||
|
c5b80071f1 | ||
|
67866a54b3 | ||
|
ed431e9895 | ||
|
079e53ff0d | ||
|
9f7585e2a5 | ||
|
0d9400965d | ||
|
5c8db2a873 | ||
|
8833cd57c3 | ||
|
bff5635698 | ||
|
0539bb332a | ||
|
f24eb5ad42 | ||
|
3f109a9d1d | ||
|
891f0ccd18 | ||
|
91cf0d15ae | ||
|
6d481c335a | ||
|
8d13d78092 | ||
|
2bcef7831d | ||
|
7e7f63e6f4 | ||
|
81fcf0f5df | ||
|
26bc8ba27f | ||
|
a3194ac8fb | ||
|
72e715919e | ||
|
f0590139b1 | ||
|
8d2dcf376f | ||
|
a7ac034d2c | ||
|
be4a95df96 | ||
|
738aaf82c9 | ||
|
5cdc2a0b3c | ||
|
b8a0444f18 | ||
|
9d720a1c65 | ||
|
dfdaa4c6b8 | ||
|
844c457a51 | ||
|
a4e3264e0c | ||
|
edccb39019 | ||
|
3f87401d49 | ||
|
b0d70e2657 | ||
|
1df103e9a8 | ||
|
22a63f7deb | ||
|
76c9513505 | ||
|
e4192caab9 | ||
|
5f2f9d5ae5 | ||
|
af80b39cd0 | ||
|
7c34053e3d | ||
|
33a66c87cf | ||
|
78aa10c001 | ||
|
ea209e387d | ||
|
17b01c2de4 | ||
|
03402d9e4d | ||
|
9b2f081ef2 | ||
|
44844011f6 | ||
|
20e8472d6b | ||
|
b5a595e305 | ||
|
07ee2248d4 | ||
|
fc9127e165 | ||
|
2493a09ba9 | ||
|
bbc2237ef7 | ||
|
b7fa3b9006 | ||
|
fdbf03b25c | ||
|
d89cba4f96 | ||
|
de0cbfd193 | ||
|
2ac778770b | ||
|
deff3e27e8 | ||
|
73073efd9e | ||
|
e31c6e12a2 | ||
|
cb29d5708a | ||
|
f12cdfbd45 | ||
|
b6f74069b5 | ||
|
5cd4497467 | ||
|
2f01c77fa4 | ||
|
f1ba45f203 | ||
|
3b3785ba24 | ||
|
0341e9f805 | ||
|
f12c3dab9a | ||
|
4081982ed2 | ||
|
a5a4d6b276 | ||
|
480e1b6300 | ||
|
ed7f451bc9 | ||
|
87d1334280 | ||
|
ae03928569 | ||
|
815b8a37dd | ||
|
4849dd83de | ||
|
ddb93fae66 | ||
|
a83d6360e4 | ||
|
428ed1bed2 | ||
|
3cfe1b282b | ||
|
eac3788105 | ||
|
36578467c1 | ||
|
b2769efbd4 | ||
|
532a8076f5 | ||
|
1b3a3ebc39 | ||
|
8cc798990a | ||
|
e0d2dd47df | ||
|
7e14651998 | ||
|
0819e04c03 | ||
|
8d1c8db284 | ||
|
39fcb04604 | ||
|
877a6b5096 | ||
|
e0cb767b85 | ||
|
d4cff5682a | ||
|
e02a3ee9f9 | ||
|
deaa553205 | ||
|
e7431954a0 | ||
|
f8de397f33 | ||
|
e7c4b2f40b | ||
|
b68a0ac6d6 | ||
|
43427c65dd | ||
|
0fc2889446 | ||
|
c3b13f1626 | ||
|
f2734edfae | ||
|
876287bc11 | ||
|
9fe115a9bd | ||
|
3965f6e94c | ||
|
8caa53bed7 | ||
|
5c09407d2f | ||
|
fefcfde4ed | ||
|
26bca3bc40 | ||
|
c09e23a0da | ||
|
671a76ac55 | ||
|
db0af750d0 | ||
|
cc353fb53c | ||
|
acb83f2549 | ||
|
355259c157 | ||
|
2bfc558e91 | ||
|
b6afd0602b | ||
|
eabdc24ff2 | ||
|
779a320364 | ||
|
02429e3c45 | ||
|
29e8609025 | ||
|
9259bf0c99 | ||
|
c4dfa42087 | ||
|
b7392b52d2 | ||
|
822dba64f9 | ||
|
92f0a7281a | ||
|
caaa28f243 | ||
|
ed326a58f5 | ||
|
3e44e0863f | ||
|
078e00f3c6 | ||
|
d77e81eb4a | ||
|
69fbfaa431 | ||
|
a159b29416 |
3898 changed files with 594137 additions and 775461 deletions
|
@ -1,3 +1,6 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.git
|
.git
|
||||||
bin
|
bin
|
||||||
|
.idea
|
||||||
|
selfcert
|
||||||
|
gui/dist-prod
|
39
.gitignore
vendored
39
.gitignore
vendored
|
@ -18,8 +18,9 @@ _convert
|
||||||
bin/*
|
bin/*
|
||||||
dist/*
|
dist/*
|
||||||
embed/bindata/*
|
embed/bindata/*
|
||||||
app/dist/*
|
edition/static/*
|
||||||
app/dist-prod/*
|
gui/dist/*
|
||||||
|
gui/dist-prod/*
|
||||||
|
|
||||||
# Architecture specific extensions/prefixes
|
# Architecture specific extensions/prefixes
|
||||||
*.[568vq]
|
*.[568vq]
|
||||||
|
@ -38,29 +39,35 @@ _testmain.go
|
||||||
/plugin-libreoffice/plugin-libreoffice-osx
|
/plugin-libreoffice/plugin-libreoffice-osx
|
||||||
|
|
||||||
# Ember specific
|
# Ember specific
|
||||||
/app/dist
|
/gui/dist
|
||||||
/app/dist-prod
|
/gui/dist-prod
|
||||||
/app/tmp
|
/gui/tmp
|
||||||
/app/bower_components
|
/gui/bower_components
|
||||||
/app/node_modules
|
/gui/node_modules
|
||||||
/app/.sass-cache
|
/gui/.sass-cache
|
||||||
/app/connect.lock
|
/gui/connect.lock
|
||||||
/app/coverage/*
|
/gui/coverage/*
|
||||||
/app/libpeerconnection.log
|
/gui/libpeerconnection.log
|
||||||
/app/npm-debug.log
|
/gui/npm-debug.log
|
||||||
/app/testem.log
|
/gui/testem.log
|
||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
# Misc.
|
# Misc.
|
||||||
build
|
|
||||||
plugin-msword/plugin-msword
|
plugin-msword/plugin-msword
|
||||||
plugin-msword/plugin-msword-osx
|
plugin-msword/plugin-msword-osx
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
debug
|
debug
|
||||||
*.pem
|
*.pem
|
||||||
*.crt
|
*.crt
|
||||||
Dockerfile
|
|
||||||
container.sh
|
container.sh
|
||||||
make.sh
|
make.sh
|
||||||
|
jsconfig.json
|
||||||
|
yarn-error.log
|
||||||
|
testem.log
|
||||||
|
# ember-try
|
||||||
|
.node_modules.ember-try/
|
||||||
|
bower.json.ember-try
|
||||||
|
package.json.ember-try
|
||||||
embed/bindata_assetfs.go
|
embed/bindata_assetfs.go
|
||||||
|
dmz-backup*.zip
|
||||||
|
*.conf
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
{
|
|
||||||
"css": {
|
|
||||||
"indent_size": 4,
|
|
||||||
"indent_level": 0,
|
|
||||||
"indent_with_tabs": true,
|
|
||||||
"preserve_newlines": true,
|
|
||||||
"max_preserve_newlines": 2,
|
|
||||||
"newline_between_rules": true
|
|
||||||
},
|
|
||||||
"html": {
|
|
||||||
"indent_size": 4,
|
|
||||||
"indent_level": 0,
|
|
||||||
"indent_with_tabs": true,
|
|
||||||
"preserve_newlines": true,
|
|
||||||
"max_preserve_newlines": 2,
|
|
||||||
"wrap_line_length": 0,
|
|
||||||
"indent_handlebars": true,
|
|
||||||
"indent_inner_html": false,
|
|
||||||
"indent_scripts": "keep"
|
|
||||||
},
|
|
||||||
"hbs": {
|
|
||||||
"indent_size": 4,
|
|
||||||
"indent_level": 0,
|
|
||||||
"indent_with_tabs": true,
|
|
||||||
"max_preserve_newlines": 2,
|
|
||||||
"preserve_newlines": true,
|
|
||||||
"wrap_line_length": 0
|
|
||||||
},
|
|
||||||
"js": {
|
|
||||||
"indent_size": 4,
|
|
||||||
"indent_level": 0,
|
|
||||||
"indent_with_tabs": true,
|
|
||||||
"preserve_newlines": true,
|
|
||||||
"wrap_line_length": 0,
|
|
||||||
"break_chained_methods": false,
|
|
||||||
"max_preserve_newlines": 2,
|
|
||||||
"jslint_happy": true,
|
|
||||||
"brace_style": "collapse-preserve-inline",
|
|
||||||
"keep_function_indentation": false,
|
|
||||||
"space_after_anon_function": false,
|
|
||||||
"space_before_conditional": true,
|
|
||||||
"space_in_empty_paren": false,
|
|
||||||
"space_in_paren": false
|
|
||||||
},
|
|
||||||
"sql": {
|
|
||||||
"indent_size": 4,
|
|
||||||
"indent_level": 0,
|
|
||||||
"indent_with_tabs": true
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
app/public/tinymce/**
|
|
||||||
app/public/tinymce/
|
|
||||||
app/public/tinymce
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Please see this document for contribution guidelines and process:
|
Please see this document for contribution guidelines and process:
|
||||||
|
|
||||||
https://developers.documize.com/s/leFaXwlU/open-source/d/VzO94aMOCgABGyfe/contributing
|
https://docs.documize.com/s/leFaXwlU/open-source/d/VzO94aMOCgABGyfe/contributing
|
||||||
|
|
32
Dockerfile
Normal file
32
Dockerfile
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
FROM node:16-alpine as frontbuilder
|
||||||
|
WORKDIR /go/src/github.com/documize/community/gui
|
||||||
|
COPY ./gui /go/src/github.com/documize/community/gui
|
||||||
|
RUN npm --network-timeout=100000 install
|
||||||
|
RUN npm run build -- --environment=production --output-path dist-prod --suppress-sizes true
|
||||||
|
|
||||||
|
FROM golang:1.21-alpine as builder
|
||||||
|
WORKDIR /go/src/github.com/documize/community
|
||||||
|
COPY . /go/src/github.com/documize/community
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/assets /go/src/github.com/documize/community/edition/static/public/assets
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/codemirror /go/src/github.com/documize/community/edition/static/public/codemirror
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/prism /go/src/github.com/documize/community/edition/static/public/prism
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/sections /go/src/github.com/documize/community/edition/static/public/sections
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/tinymce /go/src/github.com/documize/community/edition/static/public/tinymce
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/pdfjs /go/src/github.com/documize/community/edition/static/public/pdfjs
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/i18n /go/src/github.com/documize/community/edition/static/public/i18n
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/*.* /go/src/github.com/documize/community/edition/static/
|
||||||
|
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/i18n/*.json /go/src/github.com/documize/community/edition/static/i18n/
|
||||||
|
COPY domain/mail/*.html /go/src/github.com/documize/community/edition/static/mail/
|
||||||
|
COPY core/database/templates/*.html /go/src/github.com/documize/community/edition/static/
|
||||||
|
COPY core/database/scripts/mysql/*.sql /go/src/github.com/documize/community/edition/static/scripts/mysql/
|
||||||
|
COPY core/database/scripts/postgresql/*.sql /go/src/github.com/documize/community/edition/static/scripts/postgresql/
|
||||||
|
COPY core/database/scripts/sqlserver/*.sql /go/src/github.com/documize/community/edition/static/scripts/sqlserver/
|
||||||
|
COPY domain/onboard/*.json /go/src/github.com/documize/community/edition/static/onboard/
|
||||||
|
RUN env GODEBUG=tls13=1 go build -mod=vendor -o bin/documize-community ./edition/community.go
|
||||||
|
|
||||||
|
# build release image
|
||||||
|
FROM alpine:3.16
|
||||||
|
RUN apk add --no-cache ca-certificates
|
||||||
|
COPY --from=builder /go/src/github.com/documize/community/bin/documize-community /documize
|
||||||
|
EXPOSE 5001
|
||||||
|
ENTRYPOINT [ "/documize" ]
|
2572
NOTICES.md
Normal file
2572
NOTICES.md
Normal file
File diff suppressed because it is too large
Load diff
115
README.md
115
README.md
|
@ -1,45 +1,110 @@
|
||||||
# Documize Community Edition
|
Documize Community is an open source, modern, self-hosted, enterprise-grade knowledge management solution.
|
||||||
|
|
||||||
Modern Wiki + Docs integrating data from SaaS tools.
|
- Built for technical and non-technical users
|
||||||
|
- Designed to unify both customer-facing and internal documentation
|
||||||
|
- Organization through labels, spaces and categories
|
||||||
|
|
||||||

|
It's built with Golang + EmberJS and compiled down to a single executable binary that is available for Linux, Windows and Mac.
|
||||||
|
|
||||||
The mission is to bring software dev inspired features (refactoring, testing, linting, metrics, PRs) to those poor souls stuck writing docs in the dark ages.
|
All you need to provide is your database -- PostgreSQL, Microsoft SQL Server or any MySQL variant.
|
||||||
|
|
||||||
## Latest version
|

|
||||||
|
|
||||||
v0.28.0
|
## Latest Release
|
||||||
|
|
||||||
|
[Community edition: v5.13.0](https://github.com/documize/community/releases)
|
||||||
|
|
||||||
|
[Community+ edition: v5.13.0](https://www.documize.com/community/get-started)
|
||||||
|
|
||||||
|
The Community+ edition is the "enterprise" offering with advanced capabilities and customer support:
|
||||||
|
|
||||||
|
- content approval workflows
|
||||||
|
- content organization by label, space and category
|
||||||
|
- content version management
|
||||||
|
- content lifecycle management
|
||||||
|
- content feedback capture
|
||||||
|
- content PDF export
|
||||||
|
- analytics and reporting
|
||||||
|
- activity streams
|
||||||
|
- audit logs
|
||||||
|
- actions assignments
|
||||||
|
- product support
|
||||||
|
|
||||||
|
The Community+ edition is [free](https://www.documize.com/community/get-started) for the first five users -- thereafter pricing starts at just $900 annually for 100 users.
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
||||||
* Windows
|
- Linux
|
||||||
* Linux
|
- Windows
|
||||||
* OSX
|
- macOS
|
||||||
|
- Raspberry Pi (ARM build)
|
||||||
|
|
||||||
## Tech stack
|
Support for AMD and ARM 64 bit architectures.
|
||||||
|
|
||||||
* EmberJS v2.8.1
|
## Database Support
|
||||||
* Go v1.6.2
|
|
||||||
* MySQL v5.7.10+
|
|
||||||
|
|
||||||
## Documentation
|
For all database types, Full-Text Search (FTS) support is mandatory.
|
||||||
|
|
||||||
* [Install from binary guide](https://developers.documize.com/s/VzO9ZqMOCgABGyfW/installation/d/V16L08ucxwABhZF6/install-documize-from-binary-guide)
|
- PostgreSQL (v9.6+)
|
||||||
* [Install for development guide](https://developers.documize.com/s/VzO9ZqMOCgABGyfW/installation/d/V16LOMucxwABhZF1/install-documize-for-development-guide)
|
- Microsoft SQL Server (2016+ with FTS)
|
||||||
* [Configuration guide](https://developers.documize.com/s/VzO9ZqMOCgABGyfW/installation/d/VzSL8cVZ4QAB2B4Y/configure-documize-guide)
|
- Microsoft SQL Azure (v12+)
|
||||||
|
- MySQL (v5.7.10+ and v8.0.12+)
|
||||||
|
- Percona (v5.7.16-10+)
|
||||||
|
- MariaDB (10.3.0+)
|
||||||
|
|
||||||
## Auth0 Integration
|
## Browser Support
|
||||||
|
|
||||||
Documize is compatible with Auth0 identity as a service.
|
- Firefox
|
||||||
|
- Chrome
|
||||||
|
- Safari
|
||||||
|
- Microsoft Edge
|
||||||
|
- Brave
|
||||||
|
- Vivaldi
|
||||||
|
- Opera
|
||||||
|
|
||||||
<a width="150" height="50" href="https://auth0.com/?utm_source=oss&utm_medium=gp&utm_campaign=oss" target="_blank" alt="Single Sign On & Token Based Authentication - Auth0"><img width="150" height="50" alt="JWT Auth for open source projects" src="https://cdn.auth0.com/oss/badges/a0-badge-dark.png"/></a>
|
## Technology Stack
|
||||||
|
|
||||||
## Word Conversion to HTML
|
- Go (v1.23.4)
|
||||||
|
- Ember JS (v3.12.0)
|
||||||
|
|
||||||
* [Code for ```wordconvert``` utility](https://github.com/documize/community/tree/master/cmd/wordconvert)
|
## Authentication Options
|
||||||
|
|
||||||
## Legal
|
Besides email/password login, you can also authenticate via:
|
||||||
|
|
||||||
https://documize.com
|
* LDAP
|
||||||
|
* Active Directory
|
||||||
|
* Red Hat Keycloak
|
||||||
|
* Central Authentication Service (CAS)
|
||||||
|
|
||||||
This software (Documize Community Edition) is licensed under GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html. You can operate outside the AGPL restrictions by purchasing Documize Enterprise Edition and obtaining a commercial license by contacting <sales@documize.com>. Documize® is a registered trade mark of Documize Inc.
|
When using LDAP/Active Directory, you can enable dual-authentication with email/password.
|
||||||
|
|
||||||
|
## Localization
|
||||||
|
|
||||||
|
Languages supported out-of-the-box:
|
||||||
|
|
||||||
|
- English
|
||||||
|
- German
|
||||||
|
- French
|
||||||
|
- Chinese (中文)
|
||||||
|
- Portuguese (Brazil) (Português - Brasil)
|
||||||
|
- Japanese (日本語)
|
||||||
|
- Italian
|
||||||
|
- Spanish Argentinian
|
||||||
|
|
||||||
|
PR's welcome for additional languages.
|
||||||
|
|
||||||
|
## Product/Technical Support
|
||||||
|
|
||||||
|
For both Community and Community+ editions, please contact our help desk for product help, suggestions and other enquiries.
|
||||||
|
|
||||||
|
<support@documize.com>
|
||||||
|
|
||||||
|
We aim to respond within two working days.
|
||||||
|
|
||||||
|
## The Legal Bit
|
||||||
|
|
||||||
|
<https://www.documize.com>
|
||||||
|
|
||||||
|
This software (Documize Community edition) is licensed under GNU AGPL v3 <http://www.gnu.org/licenses/agpl-3.0.en.html>.
|
||||||
|
|
||||||
|
Documize Community uses other open source components and we acknowledge them in [NOTICES](NOTICES.md)
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"directory": "bower_components",
|
|
||||||
"analytics": false
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = tab
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
[*.hbs]
|
|
||||||
insert_final_newline = false
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
17
app/.gitignore
vendored
17
app/.gitignore
vendored
|
@ -1,17 +0,0 @@
|
||||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# compiled output
|
|
||||||
/dist
|
|
||||||
/tmp
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
/node_modules
|
|
||||||
/bower_components
|
|
||||||
|
|
||||||
# misc
|
|
||||||
/.sass-cache
|
|
||||||
/connect.lock
|
|
||||||
/coverage/*
|
|
||||||
/libpeerconnection.log
|
|
||||||
npm-debug.log
|
|
||||||
testem.log
|
|
|
@ -1,6 +0,0 @@
|
||||||
public/tinymce/**
|
|
||||||
public/tinymce/
|
|
||||||
public/tinymce
|
|
||||||
public/codemirror/**
|
|
||||||
public/codemirror/
|
|
||||||
public/codemirror
|
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
"predef": [
|
|
||||||
"server",
|
|
||||||
"document",
|
|
||||||
"window",
|
|
||||||
"-Promise",
|
|
||||||
"moment",
|
|
||||||
"$",
|
|
||||||
"_",
|
|
||||||
"is",
|
|
||||||
"Mousetrap",
|
|
||||||
"CodeMirror",
|
|
||||||
"Intercom",
|
|
||||||
"Materialize",
|
|
||||||
"tinymce",
|
|
||||||
"Tether",
|
|
||||||
"Tooltip",
|
|
||||||
"Drop",
|
|
||||||
"Dropzone",
|
|
||||||
"dragula",
|
|
||||||
"datetimepicker",
|
|
||||||
"Waypoint"
|
|
||||||
],
|
|
||||||
"browser": true,
|
|
||||||
"boss": true,
|
|
||||||
"curly": true,
|
|
||||||
"debug": false,
|
|
||||||
"devel": true,
|
|
||||||
"eqeqeq": true,
|
|
||||||
"evil": true,
|
|
||||||
"forin": false,
|
|
||||||
"immed": false,
|
|
||||||
"laxbreak": false,
|
|
||||||
"newcap": true,
|
|
||||||
"noarg": true,
|
|
||||||
"noempty": false,
|
|
||||||
"nonew": false,
|
|
||||||
"nomen": false,
|
|
||||||
"onevar": false,
|
|
||||||
"plusplus": false,
|
|
||||||
"regexp": false,
|
|
||||||
"undef": true,
|
|
||||||
"sub": true,
|
|
||||||
"strict": false,
|
|
||||||
"white": false,
|
|
||||||
"eqnull": true,
|
|
||||||
"esnext": true,
|
|
||||||
"unused": true
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "0.12"
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- node_modules
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
|
|
||||||
- "npm config set spin false"
|
|
||||||
- "npm install -g npm@^2"
|
|
||||||
|
|
||||||
install:
|
|
||||||
- npm install -g bower
|
|
||||||
- npm install
|
|
||||||
- bower install
|
|
||||||
|
|
||||||
script:
|
|
||||||
- npm test
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"ignore_dirs": ["tmp", "dist", "dist-prod"]
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
# Documize
|
|
||||||
|
|
||||||
This README outlines the details of collaborating on this Ember application.
|
|
||||||
A short introduction of this app could easily go here.
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
You will need the following things properly installed on your computer.
|
|
||||||
|
|
||||||
* [Git](http://git-scm.com/)
|
|
||||||
* [Node.js](http://nodejs.org/) (with NPM)
|
|
||||||
* [Bower](http://bower.io/)
|
|
||||||
* [Ember CLI](http://ember-cli.com/)
|
|
||||||
* [PhantomJS](http://phantomjs.org/)
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
* `git clone <repository-url>` this repository
|
|
||||||
* change into the new directory
|
|
||||||
* `npm install`
|
|
||||||
* `bower install`
|
|
||||||
|
|
||||||
## Running / Development
|
|
||||||
|
|
||||||
* `ember server`
|
|
||||||
* Visit your app at [http://localhost:4200](http://localhost:4200).
|
|
||||||
|
|
||||||
### Code Generators
|
|
||||||
|
|
||||||
Make use of the many generators for code, try `ember help generate` for more details
|
|
||||||
|
|
||||||
### Running Tests
|
|
||||||
|
|
||||||
* `ember test`
|
|
||||||
* `ember test --server`
|
|
||||||
|
|
||||||
### Building
|
|
||||||
|
|
||||||
* `ember build` (development)
|
|
||||||
* `ember build --environment production` (production)
|
|
||||||
|
|
||||||
### Deploying
|
|
||||||
|
|
||||||
Specify what it takes to deploy your app.
|
|
||||||
|
|
||||||
## Further Reading / Useful Links
|
|
||||||
|
|
||||||
* [ember.js](http://emberjs.com/)
|
|
||||||
* [ember-cli](http://ember-cli.com/)
|
|
||||||
* Development Browser Extensions
|
|
||||||
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
|
|
||||||
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
|
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import Base from 'ember-simple-auth/authenticators/base';
|
|
||||||
|
|
||||||
const {
|
|
||||||
RSVP: { resolve }
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Base.extend({
|
|
||||||
restore(data) {
|
|
||||||
return resolve(data);
|
|
||||||
},
|
|
||||||
authenticate(data) {
|
|
||||||
return resolve(data);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,66 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import Base from 'ember-simple-auth/authenticators/base';
|
|
||||||
import encodingUtil from '../utils/encoding';
|
|
||||||
import netUtil from '../utils/net';
|
|
||||||
|
|
||||||
const {
|
|
||||||
isPresent,
|
|
||||||
RSVP: { resolve, reject },
|
|
||||||
inject: { service }
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Base.extend({
|
|
||||||
|
|
||||||
ajax: service(),
|
|
||||||
appMeta: service(),
|
|
||||||
|
|
||||||
restore(data) {
|
|
||||||
// TODO: verify authentication data
|
|
||||||
if (data) {
|
|
||||||
return resolve(data);
|
|
||||||
}
|
|
||||||
return reject();
|
|
||||||
},
|
|
||||||
|
|
||||||
authenticate(credentials) {
|
|
||||||
let domain = netUtil.getSubdomain();
|
|
||||||
let encoded;
|
|
||||||
|
|
||||||
if (typeof credentials === 'object') {
|
|
||||||
let { password, email } = credentials;
|
|
||||||
|
|
||||||
if (!isPresent(password) || !isPresent(email)) {
|
|
||||||
return Ember.RSVP.reject("invalid");
|
|
||||||
}
|
|
||||||
|
|
||||||
encoded = encodingUtil.Base64.encode(`${domain}:${email}:${password}`);
|
|
||||||
} else if (typeof credentials === 'string') {
|
|
||||||
encoded = credentials;
|
|
||||||
} else {
|
|
||||||
return Ember.RSVP.reject("invalid");
|
|
||||||
}
|
|
||||||
|
|
||||||
var headers = {
|
|
||||||
'Authorization': 'Basic ' + encoded
|
|
||||||
};
|
|
||||||
|
|
||||||
return this.get('ajax').post('public/authenticate', {
|
|
||||||
headers
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
invalidate() {
|
|
||||||
return resolve();
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,15 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
});
|
|
|
@ -1,15 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
});
|
|
|
@ -1,20 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
actions: {
|
|
||||||
close() {
|
|
||||||
this.attrs.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,64 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
document: {},
|
|
||||||
meta: [],
|
|
||||||
pages: [],
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let editors = this.get('meta.editors');
|
|
||||||
let toc = this.get('pages');
|
|
||||||
|
|
||||||
if (is.null(editors)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
editors.forEach(function (item) {
|
|
||||||
Ember.set(item, "added", item.action === "add-page");
|
|
||||||
Ember.set(item, "changed", item.action === "update-page");
|
|
||||||
Ember.set(item, "deleted", item.action === "remove-page");
|
|
||||||
|
|
||||||
let page = _.findWhere(toc, {
|
|
||||||
id: item.pageId
|
|
||||||
});
|
|
||||||
let title = "";
|
|
||||||
|
|
||||||
if (is.not.undefined(page)) {
|
|
||||||
title = page.get('title');
|
|
||||||
|
|
||||||
if (item.added) {
|
|
||||||
Ember.set(item, 'changeLabel', "added " + title);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.changed) {
|
|
||||||
Ember.set(item, 'changeLabel', "changed " + title);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Ember.set(item, "deleted", true);
|
|
||||||
|
|
||||||
if (item.added) {
|
|
||||||
Ember.set(item, 'changeLabel', "added section (since removed)");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.changed) {
|
|
||||||
Ember.set(item, 'changeLabel', "changed section (since removed)");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.deleted) {
|
|
||||||
Ember.set(item, 'changeLabel', "removed section");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,178 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
import tocUtil from '../../utils/toc';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|
||||||
document: {},
|
|
||||||
folder: {},
|
|
||||||
pages: [],
|
|
||||||
page: "",
|
|
||||||
state: {
|
|
||||||
actionablePage: false,
|
|
||||||
upDisabled: true,
|
|
||||||
downDisabled: true,
|
|
||||||
indentDisabled: true,
|
|
||||||
outdentDisabled: true
|
|
||||||
},
|
|
||||||
|
|
||||||
didReceiveAttrs: function() {
|
|
||||||
this.set('showToc', is.not.undefined(this.get('pages')) && this.get('pages').get('length') > 2);
|
|
||||||
if (is.not.null(this.get('page'))) {
|
|
||||||
this.send('onEntryClick', this.get('page'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender: function() {
|
|
||||||
if (this.session.authenticated) {
|
|
||||||
this.addTooltip(document.getElementById("toc-up-button"));
|
|
||||||
this.addTooltip(document.getElementById("toc-down-button"));
|
|
||||||
this.addTooltip(document.getElementById("toc-outdent-button"));
|
|
||||||
this.addTooltip(document.getElementById("toc-indent-button"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded');
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.eventBus.unsubscribe('documentPageAdded');
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
// positionToc() {
|
|
||||||
// let s = $(".document-structure");
|
|
||||||
// let pos = s.position();
|
|
||||||
//
|
|
||||||
// $(window).scroll(_.throttle(function() {
|
|
||||||
// let windowpos = $(window).scrollTop();
|
|
||||||
// if (windowpos - 200 >= pos.top) {
|
|
||||||
// s.addClass("stuck-toc");
|
|
||||||
// s.css('width', s.parent().width());
|
|
||||||
// } else {
|
|
||||||
// s.removeClass("stuck-toc");
|
|
||||||
// s.css('width', 'auto');
|
|
||||||
// }
|
|
||||||
// }, 50));
|
|
||||||
// },
|
|
||||||
|
|
||||||
onDocumentPageAdded(pageId) {
|
|
||||||
this.send('onEntryClick', pageId);
|
|
||||||
},
|
|
||||||
|
|
||||||
// Controls what user can do with the toc (left sidebar).
|
|
||||||
// Identifies the target pages.
|
|
||||||
setState(pageId) {
|
|
||||||
this.set('page', pageId);
|
|
||||||
|
|
||||||
let toc = this.get('pages');
|
|
||||||
let page = _.findWhere(toc, { id: pageId });
|
|
||||||
|
|
||||||
let state = tocUtil.getState(toc, page);
|
|
||||||
|
|
||||||
if (!this.get('isEditor') || is.empty(pageId)) {
|
|
||||||
state.actionablePage = state.upDisabled = state.downDisabled = state.indentDisabled = state.outdentDisabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('state', state);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
// Page up - above pages shunt down.
|
|
||||||
pageUp() {
|
|
||||||
if (this.get('state.upDisabled')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let state = this.get('state');
|
|
||||||
let pages = this.get('pages');
|
|
||||||
let page = _.findWhere(pages, { id: this.get('page') });
|
|
||||||
let pendingChanges = tocUtil.moveUp(state, pages, page);
|
|
||||||
|
|
||||||
if (pendingChanges.length > 0) {
|
|
||||||
this.attrs.changePageSequence(pendingChanges);
|
|
||||||
|
|
||||||
this.send('onEntryClick', this.get('page'));
|
|
||||||
this.audit.record("moved-page-up");
|
|
||||||
this.showNotification("Moved up");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Move down -- pages below shift up.
|
|
||||||
pageDown() {
|
|
||||||
if (this.get('state.downDisabled')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let state = this.get('state');
|
|
||||||
var pages = this.get('pages');
|
|
||||||
var page = _.findWhere(pages, { id: this.get('page') });
|
|
||||||
let pendingChanges = tocUtil.moveDown(state, pages, page);
|
|
||||||
|
|
||||||
if (pendingChanges.length > 0) {
|
|
||||||
this.attrs.changePageSequence(pendingChanges);
|
|
||||||
|
|
||||||
this.send('onEntryClick', this.get('page'));
|
|
||||||
this.audit.record("moved-page-down");
|
|
||||||
this.showNotification("Moved down");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Indent - changes a page from H2 to H3, etc.
|
|
||||||
pageIndent() {
|
|
||||||
if (this.get('state.indentDisabled')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let state = this.get('state');
|
|
||||||
var pages = this.get('pages');
|
|
||||||
var page = _.findWhere(pages, { id: this.get('page') });
|
|
||||||
let pendingChanges = tocUtil.indent(state, pages, page);
|
|
||||||
|
|
||||||
if (pendingChanges.length > 0) {
|
|
||||||
this.attrs.changePageLevel(pendingChanges);
|
|
||||||
|
|
||||||
this.showNotification("Indent");
|
|
||||||
this.audit.record("changed-page-sequence");
|
|
||||||
this.send('onEntryClick', this.get('page'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Outdent - changes a page from H3 to H2, etc.
|
|
||||||
pageOutdent() {
|
|
||||||
if (this.get('state.outdentDisabled')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let state = this.get('state');
|
|
||||||
var pages = this.get('pages');
|
|
||||||
var page = _.findWhere(pages, { id: this.get('page') });
|
|
||||||
let pendingChanges = tocUtil.outdent(state, pages, page);
|
|
||||||
|
|
||||||
if (pendingChanges.length > 0) {
|
|
||||||
this.attrs.changePageLevel(pendingChanges);
|
|
||||||
|
|
||||||
this.showNotification("Outdent");
|
|
||||||
this.audit.record("changed-page-sequence");
|
|
||||||
this.send('onEntryClick', this.get('page'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onEntryClick(id) {
|
|
||||||
this.setState(id);
|
|
||||||
this.attrs.gotoPage(id);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -1,17 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
document: {},
|
|
||||||
meta: [],
|
|
||||||
});
|
|
|
@ -1,127 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
|
||||||
documentService: Ember.inject.service('document'),
|
|
||||||
document: {},
|
|
||||||
folder: {},
|
|
||||||
showToc: true,
|
|
||||||
showViews: false,
|
|
||||||
showContributions: false,
|
|
||||||
showSections: false,
|
|
||||||
showScrollTool: false,
|
|
||||||
showingSections: false,
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
if (this.session.authenticated) {
|
|
||||||
this.addTooltip(document.getElementById("owner-avatar"));
|
|
||||||
this.addTooltip(document.getElementById("section-tool"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this.eventBus.subscribe('resized', this, 'positionTool');
|
|
||||||
this.eventBus.subscribe('scrolled', this, 'positionTool');
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
positionTool() {
|
|
||||||
if (this.get('isDestroyed') || this.get('isDestroying')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let s = $(".scroll-tool");
|
|
||||||
let windowpos = $(window).scrollTop();
|
|
||||||
|
|
||||||
if (windowpos >= 300) {
|
|
||||||
this.set('showScrollTool', true);
|
|
||||||
s.addClass("stuck-tool");
|
|
||||||
s.css('left', parseInt($(".zone-sidebar").css('width')) - 18 + 'px');
|
|
||||||
} else {
|
|
||||||
this.set('showScrollTool', false);
|
|
||||||
s.removeClass("stuck-tool");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
// Page up - above pages shunt down.
|
|
||||||
onPageSequenceChange(pendingChanges) {
|
|
||||||
this.attrs.changePageSequence(pendingChanges);
|
|
||||||
},
|
|
||||||
|
|
||||||
// Move down - pages below shift up.
|
|
||||||
onPageLevelChange(pendingChanges) {
|
|
||||||
this.attrs.changePageLevel(pendingChanges);
|
|
||||||
},
|
|
||||||
|
|
||||||
gotoPage(id) {
|
|
||||||
return this.attrs.gotoPage(id);
|
|
||||||
},
|
|
||||||
|
|
||||||
showToc() {
|
|
||||||
this.set('showToc', true);
|
|
||||||
this.set('showViews', false);
|
|
||||||
this.set('showContributions', false);
|
|
||||||
this.set('showSections', false);
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
showViews() {
|
|
||||||
this.set('showToc', false);
|
|
||||||
this.set('showViews', true);
|
|
||||||
this.set('showContributions', false);
|
|
||||||
this.set('showSections', false);
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
showContributions() {
|
|
||||||
this.set('showToc', false);
|
|
||||||
this.set('showViews', false);
|
|
||||||
this.set('showContributions', true);
|
|
||||||
this.set('showSections', false);
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
showSections() {
|
|
||||||
this.set('showToc', false);
|
|
||||||
this.set('showViews', false);
|
|
||||||
this.set('showContributions', false);
|
|
||||||
this.set('showSections', true);
|
|
||||||
this.set('showingSections', true);
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.send('showToc');
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
onAddSection(section) {
|
|
||||||
this.attrs.onAddSection(section);
|
|
||||||
|
|
||||||
this.set('showingSections', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
scrollTop() {
|
|
||||||
this.set('showScrollTool', false);
|
|
||||||
|
|
||||||
$("html,body").animate({
|
|
||||||
scrollTop: 0
|
|
||||||
}, 500, "linear");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,141 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|
||||||
appMeta: Ember.inject.service(),
|
|
||||||
userService: Ember.inject.service('user'),
|
|
||||||
localStorage: Ember.inject.service(),
|
|
||||||
drop: null,
|
|
||||||
users: [],
|
|
||||||
saveTemplate: {
|
|
||||||
name: "",
|
|
||||||
description: ""
|
|
||||||
},
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set('saveTemplate.name', this.get('document.name'));
|
|
||||||
this.set('saveTemplate.description', this.get('document.excerpt'));
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
if (this.get('isEditor')) {
|
|
||||||
this.addTooltip(document.getElementById("attachment-button"));
|
|
||||||
this.addTooltip(document.getElementById("save-template-button"));
|
|
||||||
this.addTooltip(document.getElementById("set-meta-button"));
|
|
||||||
this.addTooltip(document.getElementById("delete-document-button"));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.addTooltip(document.getElementById("print-document-button"));
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
if (this.get('isEditor')) {
|
|
||||||
let self = this;
|
|
||||||
let documentId = this.get('document.id');
|
|
||||||
let url = this.get('appMeta.endpoint');
|
|
||||||
let uploadUrl = `${url}/documents/${documentId}/attachments`;
|
|
||||||
|
|
||||||
let dzone = new Dropzone("#attachment-button > i", {
|
|
||||||
headers: {
|
|
||||||
'Authorization': 'Bearer ' + self.get('session.session.content.authenticated.token')
|
|
||||||
},
|
|
||||||
url: uploadUrl,
|
|
||||||
method: "post",
|
|
||||||
paramName: 'attachment',
|
|
||||||
clickable: true,
|
|
||||||
maxFilesize: 10,
|
|
||||||
parallelUploads: 3,
|
|
||||||
uploadMultiple: false,
|
|
||||||
addRemoveLinks: false,
|
|
||||||
autoProcessQueue: true,
|
|
||||||
|
|
||||||
init: function () {
|
|
||||||
this.on("success", function (file /*, response*/ ) {
|
|
||||||
self.showNotification(`Attached ${file.name}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on("queuecomplete", function () {
|
|
||||||
self.attrs.onAttachmentUpload();
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on("addedfile", function ( /*file*/ ) {
|
|
||||||
self.audit.record('attached-file');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dzone.on("complete", function (file) {
|
|
||||||
dzone.removeFile(file);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop', dzone);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
if (is.not.null(this.get('drop'))) {
|
|
||||||
this.get('drop').destroy();
|
|
||||||
this.set('drop', null);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
deleteDocument() {
|
|
||||||
this.attrs.onDocumentDelete();
|
|
||||||
},
|
|
||||||
|
|
||||||
printDocument() {
|
|
||||||
window.print();
|
|
||||||
},
|
|
||||||
|
|
||||||
saveTemplate() {
|
|
||||||
var name = this.get('saveTemplate.name');
|
|
||||||
var excerpt = this.get('saveTemplate.description');
|
|
||||||
|
|
||||||
if (is.empty(name)) {
|
|
||||||
$("#new-template-name").addClass("error").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is.empty(excerpt)) {
|
|
||||||
$("#new-template-desc").addClass("error").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.showNotification('Template saved');
|
|
||||||
this.attrs.onSaveTemplate(name, excerpt);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
saveMeta() {
|
|
||||||
let doc = this.get('document');
|
|
||||||
|
|
||||||
if (is.empty(doc.get('excerpt'))) {
|
|
||||||
$("meta-excerpt").addClass("error").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
doc.set('excerpt', doc.get('excerpt').substring(0, 250));
|
|
||||||
doc.set('userId', this.get('owner.id'));
|
|
||||||
this.showNotification("Saved");
|
|
||||||
|
|
||||||
this.attrs.onDocumentChange(doc);
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,174 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|
||||||
documentService: Ember.inject.service('document'),
|
|
||||||
sectionService: Ember.inject.service('section'),
|
|
||||||
appMeta: Ember.inject.service(),
|
|
||||||
link: Ember.inject.service(),
|
|
||||||
/* Parameters */
|
|
||||||
document: null,
|
|
||||||
// pages: [],
|
|
||||||
attachments: [],
|
|
||||||
folder: null,
|
|
||||||
folders: [],
|
|
||||||
isEditor: false,
|
|
||||||
/* Internal */
|
|
||||||
drop: null,
|
|
||||||
deleteAttachment: {
|
|
||||||
id: "",
|
|
||||||
name: "",
|
|
||||||
},
|
|
||||||
|
|
||||||
noSections: Ember.computed('pages', function () {
|
|
||||||
return this.get('pages.length') === 0;
|
|
||||||
}),
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.get('sectionService').refresh(this.get('document.id')).then(function (changes) {
|
|
||||||
changes.forEach(function (newPage) {
|
|
||||||
let oldPage = self.get('pages').findBy('id', newPage.get('id'));
|
|
||||||
if (is.not.undefined(oldPage)) {
|
|
||||||
oldPage.set('body', newPage.get('body'));
|
|
||||||
oldPage.set('revised', newPage.get('revised'));
|
|
||||||
self.showNotification(`Refreshed ${oldPage.get('title')}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
this.contentLinkHandler();
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
|
|
||||||
let drop = this.get('drop');
|
|
||||||
|
|
||||||
if (is.not.null(drop)) {
|
|
||||||
drop.destroy();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
contentLinkHandler() {
|
|
||||||
let links = this.get('link');
|
|
||||||
let doc = this.get('document');
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
$("a[data-documize='true']").off('click').on('click', function(e) {
|
|
||||||
let link = links.getLinkObject(self.get('meta.outboundLinks'), this);
|
|
||||||
|
|
||||||
// local link? exists?
|
|
||||||
if (link.linkType === "section" && link.documentId === doc.get('id')) {
|
|
||||||
let exists = self.get('pages').findBy('id', link.targetId);
|
|
||||||
|
|
||||||
if (_.isUndefined(exists)) {
|
|
||||||
link.orphan = true;
|
|
||||||
} else {
|
|
||||||
self.attrs.gotoPage(link.targetId);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (link.orphan) {
|
|
||||||
$(this).addClass('broken-link');
|
|
||||||
self.showNotification('Broken link!');
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
links.linkClick(doc, link);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
confirmDeleteAttachment(id, name) {
|
|
||||||
this.set('deleteAttachment', {
|
|
||||||
id: id,
|
|
||||||
name: name
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".delete-attachment-dialog").css("display", "block");
|
|
||||||
|
|
||||||
let drop = new Drop({
|
|
||||||
target: $(".delete-attachment-" + id)[0],
|
|
||||||
content: $(".delete-attachment-dialog")[0],
|
|
||||||
classes: 'drop-theme-basic',
|
|
||||||
position: "bottom right",
|
|
||||||
openOn: "always",
|
|
||||||
tetherOptions: {
|
|
||||||
offset: "5px 0",
|
|
||||||
targetOffset: "10px 0"
|
|
||||||
},
|
|
||||||
remove: false
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop', drop);
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
|
|
||||||
this.set('deleteAttachment', {
|
|
||||||
id: "",
|
|
||||||
name: ""
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteAttachment() {
|
|
||||||
let attachment = this.get('deleteAttachment');
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
|
|
||||||
this.showNotification(`Deleted ${attachment.name}`);
|
|
||||||
this.attrs.onAttachmentDeleted(this.get('deleteAttachment').id);
|
|
||||||
this.set('deleteAttachment', {
|
|
||||||
id: "",
|
|
||||||
name: ""
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
onDeletePage(id, deleteChildren) {
|
|
||||||
let page = this.get('pages').findBy("id", id);
|
|
||||||
|
|
||||||
if (is.undefined(page)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let params = {
|
|
||||||
id: id,
|
|
||||||
title: page.get('title'),
|
|
||||||
children: deleteChildren
|
|
||||||
};
|
|
||||||
|
|
||||||
this.attrs.onDeletePage(params);
|
|
||||||
},
|
|
||||||
|
|
||||||
// onTagChange event emitted from document/tag-editor component
|
|
||||||
onTagChange(tags) {
|
|
||||||
let doc = this.get('document');
|
|
||||||
doc.set('tags', tags);
|
|
||||||
this.get('documentService').save(doc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,133 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
|
|
||||||
const {
|
|
||||||
inject: { service }
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend(TooltipMixin, {
|
|
||||||
link: service(),
|
|
||||||
linkName: '',
|
|
||||||
keywords: '',
|
|
||||||
selection: null,
|
|
||||||
matches: {
|
|
||||||
documents: [],
|
|
||||||
pages: [],
|
|
||||||
attachments: []
|
|
||||||
},
|
|
||||||
tabs: [
|
|
||||||
{ label: 'Section', selected: true },
|
|
||||||
{ label: 'Attachment', selected: false },
|
|
||||||
{ label: 'Search', selected: false }
|
|
||||||
],
|
|
||||||
|
|
||||||
showSections: Ember.computed('tabs.@each.selected', function () {
|
|
||||||
return this.get('tabs').findBy('label', 'Section').selected;
|
|
||||||
}),
|
|
||||||
showAttachments: Ember.computed('tabs.@each.selected', function () {
|
|
||||||
return this.get('tabs').findBy('label', 'Attachment').selected;
|
|
||||||
}),
|
|
||||||
showSearch: Ember.computed('tabs.@each.selected', function () {
|
|
||||||
return this.get('tabs').findBy('label', 'Search').selected;
|
|
||||||
}),
|
|
||||||
hasMatches: Ember.computed('matches', function () {
|
|
||||||
let m = this.get('matches');
|
|
||||||
return m.documents.length || m.pages.length || m.attachments.length;
|
|
||||||
}),
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this._super(...arguments);
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
let folderId = this.get('folder.id');
|
|
||||||
let documentId = this.get('document.id');
|
|
||||||
let pageId = this.get('page.id');
|
|
||||||
|
|
||||||
this.get('link').getCandidates(folderId, documentId, pageId).then(function (candidates) {
|
|
||||||
self.set('candidates', candidates);
|
|
||||||
self.set('hasSections', is.not.null(candidates.pages) && candidates.pages.length);
|
|
||||||
self.set('hasAttachments', is.not.null(candidates.attachments) && candidates.attachments.length);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
this.addTooltip(document.getElementById("content-linker-button"));
|
|
||||||
this.addTooltip(document.getElementById("content-counter-button"));
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
onKeywordChange: function () {
|
|
||||||
Ember.run.debounce(this, this.fetch, 750);
|
|
||||||
}.observes('keywords'),
|
|
||||||
|
|
||||||
fetch() {
|
|
||||||
let keywords = this.get('keywords');
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
if (_.isEmpty(keywords)) {
|
|
||||||
this.set('matches', { documents: [], pages: [], attachments: [] });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.get('link').searchCandidates(keywords).then(function (matches) {
|
|
||||||
self.set('matches', matches);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
setSelection(i) {
|
|
||||||
let candidates = this.get('candidates');
|
|
||||||
let matches = this.get('matches');
|
|
||||||
|
|
||||||
this.set('selection', i);
|
|
||||||
|
|
||||||
candidates.pages.forEach(c => {
|
|
||||||
Ember.set(c, 'selected', c.id === i.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
candidates.attachments.forEach(c => {
|
|
||||||
Ember.set(c, 'selected', c.id === i.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
matches.documents.forEach(c => {
|
|
||||||
Ember.set(c, 'selected', c.id === i.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
matches.pages.forEach(c => {
|
|
||||||
Ember.set(c, 'selected', c.id === i.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
matches.attachments.forEach(c => {
|
|
||||||
Ember.set(c, 'selected', c.id === i.id);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onInsertLink() {
|
|
||||||
let selection = this.get('selection');
|
|
||||||
|
|
||||||
if (is.null(selection)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.get('onInsertLink')(selection);
|
|
||||||
},
|
|
||||||
|
|
||||||
onTabSelect(tabs) {
|
|
||||||
this.set('tabs', tabs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,86 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
documentService: Ember.inject.service('document'),
|
|
||||||
|
|
||||||
revisions: [],
|
|
||||||
diffReport: "",
|
|
||||||
busy: false,
|
|
||||||
currentRevisionId: "",
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
if (is.undefined(this.get('model'))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.get('documentService').getPageRevisions(this.get('model.documentId'), this.get('model.pageId')).then(function(response) {
|
|
||||||
if (is.array(response)) {
|
|
||||||
self.set('revisions', response);
|
|
||||||
if (response.length > 0) {
|
|
||||||
self.send('produceReport', response[0].id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
let self = this;
|
|
||||||
Ember.run.schedule('afterRender', function() {
|
|
||||||
Mousetrap.bind('esc', function() {
|
|
||||||
self.send('cancelAction');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
produceReport(revisionId) {
|
|
||||||
this.set('busy', true);
|
|
||||||
this.set('diffReport', "");
|
|
||||||
this.set('currentRevisionId', revisionId);
|
|
||||||
|
|
||||||
// visually mark active revision
|
|
||||||
let revisions = this.get('revisions');
|
|
||||||
|
|
||||||
revisions.forEach(function(revision) {
|
|
||||||
Ember.set(revision, 'selected', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
let revision = _.findWhere(revisions, {
|
|
||||||
id: revisionId
|
|
||||||
});
|
|
||||||
Ember.set(revision, 'selected', true);
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.get('documentService').getPageRevisionDiff(this.get('model.documentId'),
|
|
||||||
this.get('model.pageId'), revisionId).then(function(response) {
|
|
||||||
self.set('busy', false);
|
|
||||||
self.set('diffReport', Ember.String.htmlSafe(response));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
cancelAction() {
|
|
||||||
this.attrs.editorClose();
|
|
||||||
},
|
|
||||||
|
|
||||||
primaryAction() {
|
|
||||||
if (this.session.isEditor) {
|
|
||||||
this.attrs.editorAction(this.get('model.pageId'), this.get('currentRevisionId'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,34 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
page: {},
|
|
||||||
tagName: "li",
|
|
||||||
classNames: ["item"],
|
|
||||||
|
|
||||||
// indentLevel: Ember.computed('page', function() {
|
|
||||||
// let nodeLevel = this.get('page.level');
|
|
||||||
// let indent = (nodeLevel - 1) * 20;
|
|
||||||
// return indent;
|
|
||||||
// }),
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
// this.set('classNames', ["item", "margin-left-" + this.get("page.tocIndent")]);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onClick(id) {
|
|
||||||
this.get('onClick')(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,54 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
|
|
||||||
const {
|
|
||||||
computed
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend(TooltipMixin, {
|
|
||||||
deleteChildren: false,
|
|
||||||
|
|
||||||
checkId: computed('page', function () {
|
|
||||||
let id = this.get('page.id');
|
|
||||||
return `delete-check-button-${id}`;
|
|
||||||
}),
|
|
||||||
|
|
||||||
dropTarget: computed('page', function () {
|
|
||||||
let id = this.get('page.id');
|
|
||||||
return `delete-page-button-${id}`;
|
|
||||||
}),
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
if (this.get('isEditor')) {
|
|
||||||
let self = this;
|
|
||||||
$(".page-edit-button, .page-delete-button").each(function (i, el) {
|
|
||||||
self.addTooltip(el);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
editPage(id) {
|
|
||||||
this.attrs.onEditPage(id);
|
|
||||||
},
|
|
||||||
|
|
||||||
deletePage(id) {
|
|
||||||
this.attrs.onDeletePage(id, this.get('deleteChildren'));
|
|
||||||
},
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,43 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, {
|
|
||||||
sectionService: Ember.inject.service('section'),
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let self = this;
|
|
||||||
this.get('sectionService').getAll().then(function(sections) {
|
|
||||||
self.set('sections', sections);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
Mousetrap.bind('esc', function() {
|
|
||||||
self.send('onCancel');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
addSection(section) {
|
|
||||||
this.attrs.onAction(section);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,112 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
documentTags: [],
|
|
||||||
tagz: [],
|
|
||||||
isEditor: false,
|
|
||||||
newTag: "",
|
|
||||||
maxTags: 3,
|
|
||||||
canAdd: false,
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this._super(...arguments);
|
|
||||||
let tagz = [];
|
|
||||||
|
|
||||||
if (this.get('documentTags').length > 1) {
|
|
||||||
let tags = this.get('documentTags').split('#');
|
|
||||||
_.each(tags, function(tag) {
|
|
||||||
if (tag.length > 0) {
|
|
||||||
tagz.pushObject(tag);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('tagz', tagz);
|
|
||||||
this.set('canAdd', this.get('isEditor') && this.get('tagz').get('length') < 3);
|
|
||||||
},
|
|
||||||
|
|
||||||
didUpdateAttrs() {
|
|
||||||
this.set('canAdd', this.get('isEditor') && this.get('tagz').get('length') < 3);
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
$("#add-tag-field").off("keydown");
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onTagEditor() {
|
|
||||||
$("#add-tag-field").off("keydown").on("keydown", function(e) {
|
|
||||||
if (e.shiftKey) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.which === 13 || e.which === 45 || e.which === 189 || e.which === 8 || e.which === 127 || (e.which >= 65 && e.which <= 90) || (e.which >= 97 && e.which <= 122) || (e.which >= 48 && e.which <= 57)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
addTag() {
|
|
||||||
let tags = this.get("tagz");
|
|
||||||
let tag = this.get('newTag');
|
|
||||||
tag = tag.toLowerCase().trim();
|
|
||||||
|
|
||||||
// empty or dupe?
|
|
||||||
if (tag.length === 0 || _.contains(tags, tag) || tags.length >= this.get('maxTags') || tag.startsWith('-')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
tags.pushObject(tag);
|
|
||||||
this.set('tagz', tags);
|
|
||||||
this.set('newTag', '');
|
|
||||||
|
|
||||||
let save = "#";
|
|
||||||
_.each(tags, function(tag) {
|
|
||||||
save = save + tag + "#";
|
|
||||||
});
|
|
||||||
|
|
||||||
this.get('onChange')(save);
|
|
||||||
|
|
||||||
this.audit.record('added-tag');
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
// removeTag removes specified tag from the list of tags associated with this document.
|
|
||||||
removeTag(tagToRemove) {
|
|
||||||
let tags = this.get("tagz");
|
|
||||||
let save = "";
|
|
||||||
|
|
||||||
tags = _.without(tags, tagToRemove);
|
|
||||||
|
|
||||||
_.each(tags, function(tag) {
|
|
||||||
save = save + tag + "#";
|
|
||||||
});
|
|
||||||
|
|
||||||
if (save.length) {
|
|
||||||
save = "#" + save;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('tagz', tags);
|
|
||||||
this.get('onChange')(save);
|
|
||||||
this.audit.record('removed tag');
|
|
||||||
},
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,71 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
isEmpty,
|
|
||||||
computed,
|
|
||||||
set
|
|
||||||
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
titleEmpty: computed.empty('model.title'),
|
|
||||||
firstnameEmpty: computed.empty('model.firstname'),
|
|
||||||
lastnameEmpty: computed.empty('model.lastname'),
|
|
||||||
emailEmpty: computed.empty('model.email'),
|
|
||||||
passwordEmpty: computed.empty('model.password'),
|
|
||||||
hasEmptyTitleError: computed.and('titleEmpty', 'titleError'),
|
|
||||||
hasEmptyFirstnameError: computed.and('firstnameEmpty', 'adminFirstnameError'),
|
|
||||||
hasEmptyLastnameError: computed.and('lastnameEmpty', 'adminLastnameError'),
|
|
||||||
hasEmptyEmailError: computed.and('emailEmpty', 'adminEmailError'),
|
|
||||||
hasEmptyPasswordError: computed.and('passwordEmpty', 'adminPasswordError'),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
save() {
|
|
||||||
if (isEmpty(this.get('model.title'))) {
|
|
||||||
set(this, 'titleError', true);
|
|
||||||
return $("#siteTitle").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty(this.get('model.firstname'))) {
|
|
||||||
set(this, 'adminFirstnameError', true);
|
|
||||||
return $("#adminFirstname").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty(this.get('model.lastname'))) {
|
|
||||||
set(this, 'adminLastnameError', true);
|
|
||||||
return $("#adminLastname").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty(this.get('model.email')) || !is.email(this.get('model.email'))) {
|
|
||||||
set(this, 'adminEmailError', true);
|
|
||||||
return $("#adminEmail").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty(this.get('model.password'))) {
|
|
||||||
set(this, 'adminPasswordError', true);
|
|
||||||
return $("#adminPassword").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.model.allowAnonymousAccess = Ember.$("#allowAnonymousAccess").prop('checked');
|
|
||||||
|
|
||||||
this.get('save')().then(() => {
|
|
||||||
set(this, 'titleError', false);
|
|
||||||
set(this, 'adminFirstnameError', false);
|
|
||||||
set(this, 'adminLastnameError', false);
|
|
||||||
set(this, 'adminEmailError', false);
|
|
||||||
set(this, 'adminPasswordError', false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,134 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import stringUtil from '../utils/string';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
drop: null,
|
|
||||||
target: null,
|
|
||||||
button: "Delete",
|
|
||||||
color: "flat-red",
|
|
||||||
button2: "",
|
|
||||||
color2: "2",
|
|
||||||
open: "click",
|
|
||||||
position: 'bottom right',
|
|
||||||
showCancel: true,
|
|
||||||
contentId: "",
|
|
||||||
focusOn: null, // is there an input field we need to focus?
|
|
||||||
selectOn: null, // is there an input field we need to select?
|
|
||||||
onOpenCallback: null, // callback when opened
|
|
||||||
onAction: null,
|
|
||||||
onAction2: null,
|
|
||||||
offset: "5px 0",
|
|
||||||
targetOffset: "10px 0",
|
|
||||||
constrainToWindow: true,
|
|
||||||
constrainToScrollParent: true,
|
|
||||||
tether: Ember.inject.service(),
|
|
||||||
|
|
||||||
hasSecondButton: Ember.computed('button2', 'color2', function () {
|
|
||||||
return is.not.empty(this.get('button2')) && is.not.empty(this.get('color2'));
|
|
||||||
}),
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set("contentId", 'dropdown-dialog-' + stringUtil.makeId(10));
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this._super(...arguments);
|
|
||||||
// TODO: refactor to eliminate self
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
if (is.null(self.get('target'))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let drop = this.get('tether').createDrop({
|
|
||||||
target: document.getElementById(self.get('target')),
|
|
||||||
content: self.$(".dropdown-dialog")[0],
|
|
||||||
classes: 'drop-theme-basic',
|
|
||||||
position: self.get('position'),
|
|
||||||
openOn: self.get('open'),
|
|
||||||
tetherOptions: {
|
|
||||||
offset: self.offset,
|
|
||||||
targetOffset: self.targetOffset,
|
|
||||||
// optimizations: {
|
|
||||||
// moveElement: false
|
|
||||||
// },
|
|
||||||
constraints: [{
|
|
||||||
to: 'window',
|
|
||||||
attachment: 'together'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
remove: true
|
|
||||||
});
|
|
||||||
|
|
||||||
if (drop) {
|
|
||||||
drop.on('open', function () {
|
|
||||||
if (is.not.null(self.get("focusOn"))) {
|
|
||||||
document.getElementById(self.get("focusOn")).focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is.not.null(self.get("selectOn"))) {
|
|
||||||
document.getElementById(self.get("selectOn")).select();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is.not.null(self.get("onOpenCallback"))) {
|
|
||||||
self.attrs.onOpenCallback(drop);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
self.set('drop', drop);
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
if (drop) {
|
|
||||||
drop.destroy();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onCancel() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
if (drop) {
|
|
||||||
drop.close();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction() {
|
|
||||||
if (this.get('onAction') === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let close = this.attrs.onAction();
|
|
||||||
|
|
||||||
let drop = this.get('drop');
|
|
||||||
if (close && drop) {
|
|
||||||
drop.close();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction2() {
|
|
||||||
if (this.get('onAction2') === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let close = this.attrs.onAction2();
|
|
||||||
|
|
||||||
let drop = this.get('drop');
|
|
||||||
if (close && drop) {
|
|
||||||
drop.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,56 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import stringUtil from '../utils/string';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
target: null,
|
|
||||||
open: "click",
|
|
||||||
position: 'bottom right',
|
|
||||||
contentId: "",
|
|
||||||
drop: null,
|
|
||||||
tether: Ember.inject.service(),
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set("contentId", 'dropdown-menu-' + stringUtil.makeId(10));
|
|
||||||
|
|
||||||
// if (this.session.get('isMobile')) {
|
|
||||||
// this.set('open', "click");
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this._super(...arguments);
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
let drop = this.get('tether').createDrop({
|
|
||||||
target: document.getElementById(self.get('target')),
|
|
||||||
content: self.$(".dropdown-menu")[0],
|
|
||||||
classes: 'drop-theme-menu',
|
|
||||||
position: self.get('position'),
|
|
||||||
openOn: self.get('open'),
|
|
||||||
tetherOptions: {
|
|
||||||
offset: "5px 0",
|
|
||||||
targetOffset: "10px 0"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
self.set('drop', drop);
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
if (drop) {
|
|
||||||
drop.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.TextField.extend({
|
|
||||||
becomeFocused: function() {
|
|
||||||
this.$().focus();
|
|
||||||
}.on('didInsertElement')
|
|
||||||
});
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.TextArea.extend({
|
|
||||||
becomeFocused: function() {
|
|
||||||
this.$().focus();
|
|
||||||
}.on('didInsertElement')
|
|
||||||
});
|
|
|
@ -1,46 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
selectedDocuments: [],
|
|
||||||
|
|
||||||
emptyState: Ember.computed('documents', function() {
|
|
||||||
return this.get('documents.length') === 0;
|
|
||||||
}),
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set('selectedDocuments', []);
|
|
||||||
this.audit.record('viewed-space');
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
selectDocument(documentId) {
|
|
||||||
let doc = this.get('documents').findBy('id', documentId);
|
|
||||||
let list = this.get('selectedDocuments');
|
|
||||||
|
|
||||||
doc.set('selected', !doc.get('selected'));
|
|
||||||
|
|
||||||
if (doc.get('selected')) {
|
|
||||||
list.push(documentId);
|
|
||||||
} else {
|
|
||||||
var index = list.indexOf(documentId);
|
|
||||||
if (index > -1) {
|
|
||||||
list.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('selectedDocuments', list);
|
|
||||||
this.get('onDocumentsChecked')(list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,114 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
inject: { service }
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
folderService: service('folder'),
|
|
||||||
appMeta: service(),
|
|
||||||
users: [],
|
|
||||||
folders: [],
|
|
||||||
folder: {},
|
|
||||||
moveTarget: null,
|
|
||||||
inviteEmail: "",
|
|
||||||
inviteMessage: "",
|
|
||||||
roleMessage: "",
|
|
||||||
permissions: {},
|
|
||||||
|
|
||||||
getDefaultInvitationMessage() {
|
|
||||||
return "Hey there, I am sharing the " + this.folder.get('name') + " (in " + this.get("appMeta.title") + ") with you so we can both access the same documents.";
|
|
||||||
},
|
|
||||||
|
|
||||||
willRender() {
|
|
||||||
if (this.inviteMessage.length === 0) {
|
|
||||||
this.set('inviteMessage', this.getDefaultInvitationMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.roleMessage.length === 0) {
|
|
||||||
this.set('roleMessage', this.getDefaultInvitationMessage());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
rename() {
|
|
||||||
if (is.empty(this.folder.get('name'))) {
|
|
||||||
$("#folderName").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.sendAction("onRename", this.folder);
|
|
||||||
},
|
|
||||||
|
|
||||||
remove() {
|
|
||||||
if (is.null(this.get('moveTarget'))) {
|
|
||||||
$("#delete-target > select").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.sendAction("onRemove", this.get('moveTarget').get('id'));
|
|
||||||
},
|
|
||||||
|
|
||||||
share() {
|
|
||||||
var email = this.get('inviteEmail').trim().replace(/ /g, '');
|
|
||||||
var message = this.get('inviteMessage').trim();
|
|
||||||
|
|
||||||
if (message.length === 0) {
|
|
||||||
message = this.getDefaultInvitationMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (email.length === 0) {
|
|
||||||
$("#inviteEmail").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var result = {
|
|
||||||
Message: message,
|
|
||||||
Recipients: []
|
|
||||||
};
|
|
||||||
|
|
||||||
// Check for multiple email addresses
|
|
||||||
if (email.indexOf(",") > -1) {
|
|
||||||
result.Recipients = email.split(',');
|
|
||||||
}
|
|
||||||
if (email.indexOf(";") > -1 && result.Recipients.length === 0) {
|
|
||||||
result.Recipients = email.split(';');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle just one email address
|
|
||||||
if (result.Recipients.length === 0 && email.length > 0) {
|
|
||||||
result.Recipients.push(email);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('inviteEmail', "");
|
|
||||||
|
|
||||||
this.sendAction("onShare", result);
|
|
||||||
},
|
|
||||||
|
|
||||||
setPermissions() {
|
|
||||||
var message = this.get('roleMessage').trim();
|
|
||||||
|
|
||||||
if (message.length === 0) {
|
|
||||||
message = this.getDefaultInvitationMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.get('permissions').forEach((permission, index) => { /* jshint ignore:line */
|
|
||||||
Ember.set(permission, 'canView', $("#canView-" + permission.userId).prop('checked'));
|
|
||||||
Ember.set(permission, 'canEdit', $("#canEdit-" + permission.userId).prop('checked'));
|
|
||||||
});
|
|
||||||
|
|
||||||
this.sendAction("onPermission", this.get('folder'), message, this.get('permissions'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,182 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
|
|
||||||
const {
|
|
||||||
computed
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
|
||||||
folderService: Ember.inject.service('folder'),
|
|
||||||
documentService: Ember.inject.service('document'),
|
|
||||||
session: Ember.inject.service(),
|
|
||||||
appMeta: Ember.inject.service(),
|
|
||||||
|
|
||||||
showToolbar: false,
|
|
||||||
folder: {},
|
|
||||||
busy: false,
|
|
||||||
importedDocuments: [],
|
|
||||||
isFolderOwner: computed.equal('folder.userId', 'session.user.id'),
|
|
||||||
moveFolderId: "",
|
|
||||||
drop: null,
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set('isFolderOwner', this.get('folder.userId') === this.get("session.user.id"));
|
|
||||||
|
|
||||||
let show = this.get('isFolderOwner') || this.get('hasSelectedDocuments') || this.get('folderService').get('canEditCurrentFolder');
|
|
||||||
this.set('showToolbar', show);
|
|
||||||
|
|
||||||
let targets = _.reject(this.get('folders'), {
|
|
||||||
id: this.get('folder').get('id')
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('movedFolderOptions', targets);
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
if (this.get('hasSelectedDocuments')) {
|
|
||||||
this.addTooltip(document.getElementById("move-documents-button"));
|
|
||||||
this.addTooltip(document.getElementById("delete-documents-button"));
|
|
||||||
} else {
|
|
||||||
if (this.get('isFolderOwner')) {
|
|
||||||
this.addTooltip(document.getElementById("folder-share-button"));
|
|
||||||
this.addTooltip(document.getElementById("folder-settings-button"));
|
|
||||||
}
|
|
||||||
if (this.get('folderService').get('canEditCurrentFolder')) {
|
|
||||||
this.addTooltip(document.getElementById("import-document-button"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didUpdate() {
|
|
||||||
this.setupImport();
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
if (is.not.null(this.get('drop'))) {
|
|
||||||
this.get('drop').destroy();
|
|
||||||
this.set('drop', null);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
setupImport() {
|
|
||||||
// guard against unecessary file upload component init
|
|
||||||
if (this.get('hasSelectedDocuments') || !this.get('folderService').get('canEditCurrentFolder')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// already done init?
|
|
||||||
if (is.not.null(this.get('drop'))) {
|
|
||||||
if (is.not.null(this.get('drop'))) {
|
|
||||||
this.get('drop').destroy();
|
|
||||||
this.set('drop', null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
let folderId = this.get('folder.id');
|
|
||||||
let url = this.get('appMeta.endpoint');
|
|
||||||
let importUrl = `${url}/import/folder/${folderId}`;
|
|
||||||
|
|
||||||
let dzone = new Dropzone("#import-document-button > i", {
|
|
||||||
headers: {
|
|
||||||
'Authorization': 'Bearer ' + self.get('session.session.content.authenticated.token')
|
|
||||||
},
|
|
||||||
url: importUrl,
|
|
||||||
method: "post",
|
|
||||||
paramName: 'attachment',
|
|
||||||
acceptedFiles: ".doc,.docx,.txt,.md,.markdown",
|
|
||||||
clickable: true,
|
|
||||||
maxFilesize: 10,
|
|
||||||
parallelUploads: 3,
|
|
||||||
uploadMultiple: false,
|
|
||||||
addRemoveLinks: false,
|
|
||||||
autoProcessQueue: true,
|
|
||||||
|
|
||||||
init: function () {
|
|
||||||
this.on("success", function (document) {
|
|
||||||
self.send('onDocumentImported', document.name, document);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on("error", function (x) {
|
|
||||||
console.log("Conversion failed for ", x.name, " obj ", x); // TODO proper error handling
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on("queuecomplete", function () {});
|
|
||||||
|
|
||||||
this.on("addedfile", function (file) {
|
|
||||||
self.send('onDocumentImporting', file.name);
|
|
||||||
self.audit.record('converted-document');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dzone.on("complete", function (file) {
|
|
||||||
dzone.removeFile(file);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop', dzone);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onDocumentImporting(filename) {
|
|
||||||
this.send("showNotification", `Importing ${filename}`);
|
|
||||||
|
|
||||||
let documents = this.get('importedDocuments');
|
|
||||||
documents.push(filename);
|
|
||||||
this.set('importedDocuments', documents);
|
|
||||||
},
|
|
||||||
|
|
||||||
onDocumentImported(filename /*, document*/ ) {
|
|
||||||
this.send("showNotification", `${filename} ready`);
|
|
||||||
|
|
||||||
let documents = this.get('importedDocuments');
|
|
||||||
documents.pop(filename);
|
|
||||||
this.set('importedDocuments', documents);
|
|
||||||
|
|
||||||
this.attrs.refresh();
|
|
||||||
|
|
||||||
if (documents.length === 0) {
|
|
||||||
// this.get('showDocument')(this.get('folder'), document);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteDocuments() {
|
|
||||||
this.attrs.onDeleteDocument();
|
|
||||||
},
|
|
||||||
|
|
||||||
setMoveFolder(folderId) {
|
|
||||||
this.set('moveFolderId', folderId);
|
|
||||||
|
|
||||||
let folders = this.get('folders');
|
|
||||||
|
|
||||||
folders.forEach(folder => {
|
|
||||||
folder.set('selected', folder.id === folderId);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
moveDocuments() {
|
|
||||||
if (this.get("moveFolderId") === "") {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.attrs.onMoveDocument(this.get('moveFolderId'));
|
|
||||||
this.set("moveFolderId", "");
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,169 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import constants from '../../utils/constants';
|
|
||||||
import TooltipMixin from '../../mixins/tooltip';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
|
||||||
folderService: Ember.inject.service('folder'),
|
|
||||||
templateService: Ember.inject.service('template'),
|
|
||||||
publicFolders: [],
|
|
||||||
protectedFolders: [],
|
|
||||||
privateFolders: [],
|
|
||||||
savedTemplates: [],
|
|
||||||
hasPublicFolders: false,
|
|
||||||
hasProtectedFolders: false,
|
|
||||||
hasPrivateFolders: false,
|
|
||||||
newFolder: "",
|
|
||||||
showScrollTool: false,
|
|
||||||
showingDocument: false,
|
|
||||||
showingList: true,
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this._super(...arguments);
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
this.get('templateService').getSavedTemplates().then(function(saved) {
|
|
||||||
let emptyTemplate = {
|
|
||||||
id: "0",
|
|
||||||
title: "Empty",
|
|
||||||
description: "An empty canvas for your words",
|
|
||||||
img: "template-blank",
|
|
||||||
locked: true
|
|
||||||
};
|
|
||||||
|
|
||||||
saved.forEach(function(t) {
|
|
||||||
t.img = "template-saved";
|
|
||||||
});
|
|
||||||
|
|
||||||
saved.unshiftObject(emptyTemplate);
|
|
||||||
_this.set('savedTemplates', saved);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
if (this.get('folderService').get('canEditCurrentFolder')) {
|
|
||||||
this.addTooltip(document.getElementById("start-document-button"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this.eventBus.subscribe('resized', this, 'positionTool');
|
|
||||||
this.eventBus.subscribe('scrolled', this, 'positionTool');
|
|
||||||
},
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let folders = this.get('folders');
|
|
||||||
|
|
||||||
// clear out state
|
|
||||||
this.set('publicFolders', []);
|
|
||||||
this.set('protectedFolders', []);
|
|
||||||
this.set('privateFolders', []);
|
|
||||||
|
|
||||||
_.each(folders, folder => {
|
|
||||||
if (folder.get('folderType') === constants.FolderType.Public) {
|
|
||||||
let folders = this.get('publicFolders');
|
|
||||||
folders.pushObject(folder);
|
|
||||||
this.set('publicFolders', folders);
|
|
||||||
}
|
|
||||||
if (folder.get('folderType') === constants.FolderType.Private) {
|
|
||||||
let folders = this.get('privateFolders');
|
|
||||||
folders.pushObject(folder);
|
|
||||||
this.set('privateFolders', folders);
|
|
||||||
}
|
|
||||||
if (folder.get('folderType') === constants.FolderType.Protected) {
|
|
||||||
let folders = this.get('protectedFolders');
|
|
||||||
folders.pushObject(folder);
|
|
||||||
this.set('protectedFolders', folders);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('hasPublicFolders', this.get('publicFolders.length') > 0);
|
|
||||||
this.set('hasPrivateFolders', this.get('privateFolders.length') > 0);
|
|
||||||
this.set('hasProtectedFolders', this.get('protectedFolders.length') > 0);
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
positionTool() {
|
|
||||||
if (this.get('isDestroyed') || this.get('isDestroying')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let s = $(".scroll-space-tool");
|
|
||||||
let windowpos = $(window).scrollTop();
|
|
||||||
|
|
||||||
if (windowpos >= 300) {
|
|
||||||
this.set('showScrollTool', true);
|
|
||||||
s.addClass("stuck-space-tool");
|
|
||||||
s.css('left', parseInt($(".zone-sidebar").css('width')) - 18 + 'px');
|
|
||||||
} else {
|
|
||||||
this.set('showScrollTool', false);
|
|
||||||
s.removeClass("stuck-space-tool");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
navigateToDocument(document) {
|
|
||||||
this.attrs.showDocument(this.get('folder'), document);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
scrollTop() {
|
|
||||||
this.set('showScrollTool', false);
|
|
||||||
|
|
||||||
$("html,body").animate({
|
|
||||||
scrollTop: 0
|
|
||||||
}, 500, "linear");
|
|
||||||
},
|
|
||||||
|
|
||||||
addFolder() {
|
|
||||||
var folderName = this.get('newFolder');
|
|
||||||
|
|
||||||
if (is.empty(folderName)) {
|
|
||||||
$("#new-folder-name").addClass("error").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.attrs.onFolderAdd(folderName);
|
|
||||||
|
|
||||||
this.set('newFolder', "");
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
showDocument() {
|
|
||||||
this.set('showingDocument', true);
|
|
||||||
this.set('showingList', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
showList() {
|
|
||||||
this.set('showingDocument', false);
|
|
||||||
this.set('showingList', true);
|
|
||||||
},
|
|
||||||
|
|
||||||
onEditTemplate(template) {
|
|
||||||
this.navigateToDocument(template);
|
|
||||||
},
|
|
||||||
|
|
||||||
onDocumentTemplate(id /*, title, type*/ ) {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.send("showNotification", "Creating");
|
|
||||||
|
|
||||||
this.get('templateService').importSavedTemplate(this.folder.get('id'), id).then(function(document) {
|
|
||||||
self.navigateToDocument(document);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,34 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, {
|
|
||||||
localStorage: Ember.inject.service(),
|
|
||||||
canEditTemplate: "",
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
editTemplate(template) {
|
|
||||||
this.audit.record('edited-saved-template');
|
|
||||||
this.attrs.onEditTemplate(template);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
startDocument(template) {
|
|
||||||
this.audit.record('used-saved-template');
|
|
||||||
this.attrs.onDocumentTemplate(template.id, template.title, "private");
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,41 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
computed,
|
|
||||||
isEmpty
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
email: "",
|
|
||||||
sayThanks: false,
|
|
||||||
emailEmpty: computed.empty('email'),
|
|
||||||
hasEmptyEmailError: computed.and('emailEmpty', 'emailIsEmpty'),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
forgot() {
|
|
||||||
let email = this.get('email');
|
|
||||||
|
|
||||||
if (isEmpty(email)) {
|
|
||||||
Ember.set(this, 'emailIsEmpty', true);
|
|
||||||
return $("#email").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.get('forgot')(email).then(() => {
|
|
||||||
Ember.set(this, 'sayThanks', true);
|
|
||||||
Ember.set(this, 'email', '');
|
|
||||||
Ember.set(this, 'emailIsEmpty', false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
isEmpty,
|
|
||||||
computed,
|
|
||||||
set
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
titleEmpty: computed.empty('model.general.title'),
|
|
||||||
messageEmpty: computed.empty('model.general.message'),
|
|
||||||
hasTitleInputError: computed.and('titleEmpty', 'titleError'),
|
|
||||||
hasMessageInputError: computed.and('messageEmpty', 'messageError'),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
save() {
|
|
||||||
if (isEmpty(this.get('model.general.title'))) {
|
|
||||||
set(this, 'titleError', true);
|
|
||||||
return $("#siteTitle").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty(this.get('model.general.message'))) {
|
|
||||||
set(this, 'messageError', true);
|
|
||||||
return $("#siteMessage").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.model.general.set('allowAnonymousAccess', Ember.$("#allowAnonymousAccess").prop('checked'));
|
|
||||||
this.get('save')().then(() => {
|
|
||||||
set(this, 'titleError', false);
|
|
||||||
set(this, 'messageError', false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,52 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
computed
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
SMTPHostEmptyError: computed.empty('model.global.host'),
|
|
||||||
SMTPPortEmptyError: computed.empty('model.global.port'),
|
|
||||||
SMTPSenderEmptyError: computed.empty('model.global.sender'),
|
|
||||||
SMTPUserIdEmptyError: computed.empty('model.global.userid'),
|
|
||||||
SMTPPasswordEmptyError: computed.empty('model.global.password'),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
save() {
|
|
||||||
if (this.get('SMTPHostEmptyError')) {
|
|
||||||
$("#smtp-host").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.get('SMTPPortEmptyError')) {
|
|
||||||
$("#smtp-port").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.get('SMTPSenderEmptyError')) {
|
|
||||||
$("#smtp-sender").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.get('SMTPUserIdEmptyError')) {
|
|
||||||
$("#smtp-userid").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.get('SMTPPasswordEmptyError')) {
|
|
||||||
$("#smtp-password").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.get('save')().then(() => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,15 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
});
|
|
|
@ -1,21 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
title: "",
|
|
||||||
message: "",
|
|
||||||
|
|
||||||
hasMessage: Ember.computed('message', function() {
|
|
||||||
return this.get('message').length !== 0;
|
|
||||||
})
|
|
||||||
});
|
|
|
@ -1,48 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import netUtil from '../../utils/net';
|
|
||||||
|
|
||||||
const {
|
|
||||||
inject: { service }
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
folderService: service('folder'),
|
|
||||||
folder: null,
|
|
||||||
appMeta: service(),
|
|
||||||
session: service(),
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this._super(...arguments);
|
|
||||||
|
|
||||||
if (this.get("session.authenticated")) {
|
|
||||||
this.get("session.session.content.authenticated.user.accounts").forEach((account) => {
|
|
||||||
// TODO: do not mutate account.active here
|
|
||||||
account.active = account.orgId === this.get("appMeta.orgId");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
if (this.get('folder') === null) {
|
|
||||||
this.set("folder", this.get('folderService.currentFolder'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
switchAccount(domain) {
|
|
||||||
this.audit.record('switched-account');
|
|
||||||
window.location.href = netUtil.getAppUrl(domain);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,15 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
});
|
|
|
@ -1,124 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import encodingUtil from '../../utils/encoding';
|
|
||||||
import netUtil from '../../utils/net';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
folderService: Ember.inject.service('folder'),
|
|
||||||
|
|
||||||
serial: "",
|
|
||||||
folderId: "",
|
|
||||||
slug: "",
|
|
||||||
processing: false,
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
$("#stage-1-firstname").focus();
|
|
||||||
|
|
||||||
// Stage 1 - person name keypress handler
|
|
||||||
$("#stage-1-firstname, #stage-1-lastname").keyup(function() {
|
|
||||||
if (!$("#stage-1-firstname").val() || !$("#stage-1-lastname").val()) {
|
|
||||||
$(".name-status").attr("src", "/assets/img/onboard/person-red.png");
|
|
||||||
} else {
|
|
||||||
$(".name-status").attr("src", "/assets/img/onboard/person-green.png");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Stage 1 - finish
|
|
||||||
$("#stage-1-next").off('click').on('click', function() {
|
|
||||||
if (!$("#stage-1-firstname").val()) {
|
|
||||||
$("#stage-1-firstname").focus();
|
|
||||||
$("#stage-1-firstname").addClass("error");
|
|
||||||
$(".name-status").attr("src", "/assets/img/onboard/person-red.png");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$("#stage-1-lastname").val()) {
|
|
||||||
$("#stage-1-lastname").focus();
|
|
||||||
$("#stage-1-lastname").addClass("error");
|
|
||||||
$(".name-status").attr("src", "/assets/img/onboard/person-red.png");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.set('processing', false);
|
|
||||||
|
|
||||||
$(".stage-1").fadeOut("slow", function() {
|
|
||||||
if (self.get('processing')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.set('processing', true);
|
|
||||||
|
|
||||||
$(".stage-2").fadeIn();
|
|
||||||
$("#stage-2-password").focus();
|
|
||||||
|
|
||||||
// Stage 2 - password keypress handler
|
|
||||||
$("#stage-2-password-confirm").keyup(function() {
|
|
||||||
if ($("#stage-2-password").val().length < 6 || $("#stage-2-password").val().length > 50 ||
|
|
||||||
($("#stage-2-password").val() !== $("#stage-2-password-confirm").val())) {
|
|
||||||
$(".password-status").attr("src", "/assets/img/onboard/lock-red.png");
|
|
||||||
} else {
|
|
||||||
$(".password-status").attr("src", "/assets/img/onboard/lock-green.png");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Stage 2 - finish
|
|
||||||
$("#stage-2-next").off('click').on('click', function() {
|
|
||||||
if (!$("#stage-2-password").val() || $("#stage-2-password").val().length < 6 || $("#stage-2-password").val().length > 50) {
|
|
||||||
$("#stage-2-password").focus();
|
|
||||||
$("#stage-2-password").addClass("error");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$("#stage-2-password-confirm").val()) {
|
|
||||||
$("#stage-2-password-confirm").focus();
|
|
||||||
$("#stage-2-password-confirm").addClass("error");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($("#stage-2-password-confirm").val() !== $("#stage-2-password").val()) {
|
|
||||||
$(".mismatch").show();
|
|
||||||
$(".password-status").attr("src", "/assets/img/onboard/lock-red.png");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.set('processing', false);
|
|
||||||
|
|
||||||
$(".stage-2").fadeOut("slow", function() {
|
|
||||||
if (self.get('processing')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.set('processing', true);
|
|
||||||
|
|
||||||
$(".stage-3").fadeIn();
|
|
||||||
$("#spinner-1").show();
|
|
||||||
|
|
||||||
var payload = '{ "Password": "' + $("#stage-2-password").val() + '", "Serial": "' + self.serial + '", "Firstname": "' + $("#stage-1-firstname").val() + '", "Lastname": "' + $("#stage-1-lastname").val() + '" }';
|
|
||||||
var password = $("#stage-2-password").val();
|
|
||||||
|
|
||||||
self.get('folderService').onboard(self.folderId, payload).then(function(user) {
|
|
||||||
var credentials = encodingUtil.Base64.encode(netUtil.getSubdomain() + ":" + user.email + ":" + password);
|
|
||||||
self.session.sso(credentials).then(function() {
|
|
||||||
window.location.href = 's/' + self.folderId + "/" + self.slug;
|
|
||||||
});
|
|
||||||
}, function() {
|
|
||||||
window.location.href = "/";
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -1,59 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
isEmpty,
|
|
||||||
isEqual,
|
|
||||||
computed,
|
|
||||||
set
|
|
||||||
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
password: "",
|
|
||||||
passwordConfirm: "",
|
|
||||||
mustMatch: false,
|
|
||||||
passwordEmpty: computed.empty('password'),
|
|
||||||
confirmEmpty: computed.empty('passwordConfirm'),
|
|
||||||
hasPasswordError: computed.and('passwordEmpty', 'passwordIsEmpty'),
|
|
||||||
hasConfirmError: computed.and('confirmEmpty', 'passwordConfirmIsEmpty'),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
reset() {
|
|
||||||
let password = this.get('password');
|
|
||||||
let passwordConfirm = this.get('passwordConfirm');
|
|
||||||
|
|
||||||
if (isEmpty(password)) {
|
|
||||||
set(this, 'passwordIsEmpty', true);
|
|
||||||
return $("#newPassword").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty(passwordConfirm)) {
|
|
||||||
set(this, 'passwordConfirmIsEmpty', true);
|
|
||||||
return $("#passwordConfirm").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isEqual(password, passwordConfirm)) {
|
|
||||||
set(this, 'hasPasswordError', true);
|
|
||||||
set(this, 'hasConfirmError', true);
|
|
||||||
set(this, 'mustMatch', true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.get('reset')(password).then(() => {
|
|
||||||
set(this, 'passwordIsEmpty', false);
|
|
||||||
set(this, 'passwordConfirmIsEmpty', false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,56 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
results: [],
|
|
||||||
resultPhrase: "",
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let results = this.get('results');
|
|
||||||
let temp = _.groupBy(results, 'documentId');
|
|
||||||
let documents = [];
|
|
||||||
|
|
||||||
_.each(temp, function(document) {
|
|
||||||
let refs = [];
|
|
||||||
|
|
||||||
if (document.length > 1) {
|
|
||||||
refs = document.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
_.each(refs, function(ref, index) {
|
|
||||||
ref.comma = index === refs.length-1 ? "" : ", ";
|
|
||||||
});
|
|
||||||
|
|
||||||
let hasRefs = refs.length > 0;
|
|
||||||
|
|
||||||
documents.pushObject( {
|
|
||||||
doc: document[0],
|
|
||||||
ref: refs,
|
|
||||||
hasReferences: hasRefs
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
let phrase = 'Nothing found';
|
|
||||||
|
|
||||||
if (results.length > 0) {
|
|
||||||
let places = documents.length === 1 ? "place" : "places";
|
|
||||||
let references = results.length === 1 ? "secton" : "sections";
|
|
||||||
let i = results.length;
|
|
||||||
let j = documents.length;
|
|
||||||
phrase = `${i} ${references} in ${j} ${places}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('resultPhrase', phrase);
|
|
||||||
this.set('documents', documents);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,34 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
documentTags: [],
|
|
||||||
tagz: [],
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this._super(...arguments);
|
|
||||||
|
|
||||||
let tagz = [];
|
|
||||||
|
|
||||||
if (this.get('documentTags').length > 1) {
|
|
||||||
let tags = this.get('documentTags').split('#');
|
|
||||||
_.each(tags, function(tag) {
|
|
||||||
if (tag.length > 0) {
|
|
||||||
tagz.pushObject(tag);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('tagz', tagz);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,39 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
data: "",
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set("data", this.get("meta.rawBody"));
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
isDirty() {
|
|
||||||
return this.get('meta.rawBody') !== this.get('data');
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('rawBody', this.get("data"));
|
|
||||||
|
|
||||||
this.attrs.onAction(page, meta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,91 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
drop: null,
|
|
||||||
cancelLabel: "Close",
|
|
||||||
actionLabel: "Save",
|
|
||||||
tip: "Short and concise title",
|
|
||||||
busy: false,
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
let self = this;
|
|
||||||
Mousetrap.bind('esc', function () {
|
|
||||||
self.send('onCancel');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
Mousetrap.bind(['ctrl+s', 'command+s'], function () {
|
|
||||||
self.send('onAction');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#page-title").removeClass("error");
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
|
|
||||||
if (is.not.null(drop)) {
|
|
||||||
drop.destroy();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onCancel() {
|
|
||||||
if (this.attrs.isDirty() !== null && this.attrs.isDirty()) {
|
|
||||||
$(".discard-edits-dialog").css("display", "block");
|
|
||||||
|
|
||||||
let drop = new Drop({
|
|
||||||
target: $("#editor-cancel")[0],
|
|
||||||
content: $(".cancel-edits-dialog")[0],
|
|
||||||
classes: 'drop-theme-basic',
|
|
||||||
position: "bottom right",
|
|
||||||
openOn: "always",
|
|
||||||
tetherOptions: {
|
|
||||||
offset: "5px 0",
|
|
||||||
targetOffset: "10px 0"
|
|
||||||
},
|
|
||||||
remove: false
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop', drop);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction() {
|
|
||||||
if (this.get('busy')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is.empty(this.get('page.title'))) {
|
|
||||||
$("#page-title").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.attrs.onAction(this.get('page.title'));
|
|
||||||
},
|
|
||||||
|
|
||||||
keepEditing() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
},
|
|
||||||
|
|
||||||
discardEdits() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set('rendererType', 'section/' + this.get('page.contentType') + '/type-renderer');
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -1,134 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import TooltipMixin from '../../../mixins/tooltip';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(TooltipMixin, {
|
|
||||||
isDirty: false,
|
|
||||||
pageBody: "",
|
|
||||||
codeEditor: null,
|
|
||||||
syntaxOptions: [],
|
|
||||||
codeSyntax: null,
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this._super(...arguments);
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
CodeMirror.modeURL = "codemirror/mode/%N/%N.js";
|
|
||||||
|
|
||||||
let rawBody = this.get('meta.rawBody');
|
|
||||||
let cleanBody = rawBody.replace("</pre>", "");
|
|
||||||
|
|
||||||
cleanBody = cleanBody.replace('<pre class="code-mirror cm-s-solarized cm-s-dark" data-lang="', "");
|
|
||||||
let startPos = cleanBody.indexOf('">');
|
|
||||||
let syntax = {
|
|
||||||
mode: "html",
|
|
||||||
name: "HTML"
|
|
||||||
};
|
|
||||||
|
|
||||||
if (startPos !== -1) {
|
|
||||||
syntax = cleanBody.substring(0, startPos);
|
|
||||||
cleanBody = cleanBody.substring(startPos + 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('pageBody', cleanBody);
|
|
||||||
|
|
||||||
let opts = [];
|
|
||||||
|
|
||||||
_.each(_.sortBy(CodeMirror.modeInfo, 'name'), function(item) {
|
|
||||||
let i = {
|
|
||||||
mode: item.mode,
|
|
||||||
name: item.name
|
|
||||||
};
|
|
||||||
opts.pushObject(i);
|
|
||||||
|
|
||||||
if (item.mode === syntax) {
|
|
||||||
self.set('codeSyntax', i);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('syntaxOptions', opts);
|
|
||||||
|
|
||||||
// default check
|
|
||||||
if (is.null(this.get("codeSyntax"))) {
|
|
||||||
this.set("codeSyntax", opts.findBy("mode", "html"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
this.addTooltip(document.getElementById("set-syntax-zone"));
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
var editor = CodeMirror.fromTextArea(document.getElementById("code-editor"), {
|
|
||||||
theme: "solarized dark",
|
|
||||||
lineNumbers: true,
|
|
||||||
lineWrapping: true,
|
|
||||||
indentUnit: 4,
|
|
||||||
tabSize: 4,
|
|
||||||
value: "",
|
|
||||||
dragDrop: false
|
|
||||||
});
|
|
||||||
|
|
||||||
editor.setSize("100%", $(document).height() - $(".document-editor > .toolbar").height() - 180);
|
|
||||||
|
|
||||||
this.set('codeEditor', editor);
|
|
||||||
|
|
||||||
let syntax = this.get("codeSyntax");
|
|
||||||
|
|
||||||
if (is.not.undefined(syntax)) {
|
|
||||||
CodeMirror.autoLoadMode(editor, syntax.mode);
|
|
||||||
editor.setOption("mode", syntax.mode);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
this.set('codeEditor', null);
|
|
||||||
},
|
|
||||||
|
|
||||||
// Wrap code in PRE tag with language identifier for subsequent rendering.
|
|
||||||
getPRE() {
|
|
||||||
let codeSyntax = this.get("codeSyntax.mode");
|
|
||||||
let body = this.get('codeEditor').getDoc().getValue();
|
|
||||||
|
|
||||||
return `<pre class="code-mirror cm-s-solarized cm-s-dark" data-lang="${codeSyntax}">${body}</pre>`;
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onSyntaxChange(syntax) {
|
|
||||||
let editor = this.get('codeEditor');
|
|
||||||
CodeMirror.autoLoadMode(editor, syntax.mode);
|
|
||||||
editor.setOption("mode", syntax.mode);
|
|
||||||
|
|
||||||
this.set('isDirty', true);
|
|
||||||
this.set('codeSyntax', syntax);
|
|
||||||
},
|
|
||||||
|
|
||||||
isDirty() {
|
|
||||||
return this.get('isDirty');
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('rawBody', this.getPRE());
|
|
||||||
|
|
||||||
this.attrs.onAction(page, meta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,57 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
codeBody: "",
|
|
||||||
codeSyntax: "htmlmixed",
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
CodeMirror.modeURL = "codemirror/mode/%N/%N.js";
|
|
||||||
|
|
||||||
let page = this.get('page');
|
|
||||||
let rawBody = page.get('body');
|
|
||||||
let cleanBody = rawBody.replace("</pre>", "").replace('<pre class="code-mirror cm-s-solarized cm-s-dark" data-lang="', "");
|
|
||||||
let startPos = cleanBody.indexOf('">');
|
|
||||||
|
|
||||||
if (startPos !== -1) {
|
|
||||||
this.set('codeSyntax', cleanBody.substring(0, startPos));
|
|
||||||
this.set('codeBody', cleanBody.substring(startPos + 2));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didRender() {
|
|
||||||
let page = this.get('page');
|
|
||||||
let elem = `page-${page.id}-code`;
|
|
||||||
|
|
||||||
var editor = CodeMirror.fromTextArea(document.getElementById(elem), {
|
|
||||||
theme: "solarized dark",
|
|
||||||
lineNumbers: true,
|
|
||||||
lineWrapping: true,
|
|
||||||
indentUnit: 4,
|
|
||||||
tabSize: 4,
|
|
||||||
value: "",
|
|
||||||
dragDrop: false,
|
|
||||||
readOnly: true
|
|
||||||
});
|
|
||||||
|
|
||||||
let syntax = this.get("codeSyntax");
|
|
||||||
CodeMirror.autoLoadMode(editor, syntax);
|
|
||||||
editor.setOption("mode", syntax);
|
|
||||||
|
|
||||||
this.set('codeEditor', editor);
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.set('codeEditor', null);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,226 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../../mixins/tooltip';
|
|
||||||
import SectionMixin from '../../../mixins/section';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
|
||||||
sectionService: Ember.inject.service('section'),
|
|
||||||
isDirty: false,
|
|
||||||
waiting: false,
|
|
||||||
authenticated: false,
|
|
||||||
user: {},
|
|
||||||
workspaces: [],
|
|
||||||
config: {},
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let config = {};
|
|
||||||
|
|
||||||
try {
|
|
||||||
config = JSON.parse(this.get('meta.config'));
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
if (is.empty(config)) {
|
|
||||||
config = {
|
|
||||||
APIKey: "",
|
|
||||||
filter: {},
|
|
||||||
itemCount: 0,
|
|
||||||
url: "",
|
|
||||||
userId: 0,
|
|
||||||
username: "",
|
|
||||||
workspaceId: 0,
|
|
||||||
workspaceName: "",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('config', config);
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
self.set('waiting', true);
|
|
||||||
this.get('sectionService').fetch(this.get('page'), "secrets", this.get('config'))
|
|
||||||
.then(function (response) {
|
|
||||||
console.log(response);
|
|
||||||
self.set('waiting', false);
|
|
||||||
|
|
||||||
self.set('config.APIKey', response.apikey);
|
|
||||||
self.set('config.url', response.url);
|
|
||||||
self.set('config.username', response.username);
|
|
||||||
|
|
||||||
if (response.apikey.length > 0 && response.url.length > 0 && response.username.length > 0) {
|
|
||||||
self.send('auth');
|
|
||||||
}
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
console.log(reason);
|
|
||||||
self.set('waiting', false);
|
|
||||||
if (self.get('config.userId') > 0) {
|
|
||||||
self.send('auth');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
getWorkspaces() {
|
|
||||||
let page = this.get('page');
|
|
||||||
let self = this;
|
|
||||||
this.set('waiting', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "workspace", this.get('config'))
|
|
||||||
.then(function (response) {
|
|
||||||
// console.log(response);
|
|
||||||
let workspaceId = self.get('config.workspaceId');
|
|
||||||
|
|
||||||
if (response.length > 0 && workspaceId === 0) {
|
|
||||||
workspaceId = response[0].Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.set("config.workspaceId", workspaceId);
|
|
||||||
self.set('workspaces', response);
|
|
||||||
self.selectWorkspace(workspaceId);
|
|
||||||
|
|
||||||
Ember.run.schedule('afterRender', function () {
|
|
||||||
window.scrollTo(0, document.body.scrollHeight);
|
|
||||||
|
|
||||||
response.forEach(function (workspace) {
|
|
||||||
self.addTooltip(document.getElementById("gemini-workspace-" + workspace.Id));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
self.set('waiting', false);
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('workspaces', []);
|
|
||||||
self.set('waiting', false);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
getItems() {
|
|
||||||
let page = this.get('page');
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.set('waiting', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "items", this.get('config'))
|
|
||||||
.then(function (response) {
|
|
||||||
// console.log(response);
|
|
||||||
self.set('items', response);
|
|
||||||
self.set('config.itemCount', response.length);
|
|
||||||
self.set('waiting', false);
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('items', []);
|
|
||||||
self.set('waiting', false);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
selectWorkspace(id) {
|
|
||||||
let self = this;
|
|
||||||
let w = this.get('workspaces');
|
|
||||||
|
|
||||||
w.forEach(function (w) {
|
|
||||||
Ember.set(w, 'selected', w.Id === id);
|
|
||||||
|
|
||||||
if (w.Id === id) {
|
|
||||||
self.set("config.filter", w.Filter);
|
|
||||||
self.set("config.workspaceId", id);
|
|
||||||
self.set("config.workspaceName", w.Title);
|
|
||||||
// console.log(self.get('config'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('workspaces', w);
|
|
||||||
this.getItems();
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
isDirty() {
|
|
||||||
return this.get('isDirty');
|
|
||||||
},
|
|
||||||
|
|
||||||
auth() {
|
|
||||||
// missing data?
|
|
||||||
if (is.empty(this.get('config.url'))) {
|
|
||||||
$("#gemini-url").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (is.empty(this.get('config.username'))) {
|
|
||||||
$("#gemini-username").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (is.empty(this.get('config.APIKey'))) {
|
|
||||||
$("#gemini-apikey").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// knock out spaces
|
|
||||||
this.set('config.url', this.get('config.url').trim());
|
|
||||||
this.set('config.username', this.get('config.username').trim());
|
|
||||||
this.set('config.APIKey', this.get('config.APIKey').trim());
|
|
||||||
|
|
||||||
// remove trailing slash in URL
|
|
||||||
let url = this.get('config.url');
|
|
||||||
if (url.indexOf("/", url.length - 1) !== -1) {
|
|
||||||
this.set('config.url', url.substring(0, url.length - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
let page = this.get('page');
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.set('waiting', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "auth", this.get('config'))
|
|
||||||
.then(function (response) {
|
|
||||||
self.set('authenticated', true);
|
|
||||||
self.set('user', response);
|
|
||||||
self.set('config.userId', response.BaseEntity.id);
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.getWorkspaces();
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.set('user', null);
|
|
||||||
self.set('config.userId', 0);
|
|
||||||
self.set('waiting', false);
|
|
||||||
|
|
||||||
switch (reason.status) {
|
|
||||||
case 400:
|
|
||||||
self.showNotification(`Unable to connect to Gemini URL`);
|
|
||||||
break;
|
|
||||||
case 403:
|
|
||||||
self.showNotification(`Unable to authenticate`);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
self.showNotification(`Something went wrong, try again!`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onWorkspaceChange(id) {
|
|
||||||
this.set('isDirty', true);
|
|
||||||
this.selectWorkspace(id);
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('rawBody', JSON.stringify(this.get("items")));
|
|
||||||
meta.set('config', JSON.stringify(this.get('config')));
|
|
||||||
meta.set('externalSource', true);
|
|
||||||
|
|
||||||
this.attrs.onAction(page, meta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,259 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../../mixins/tooltip';
|
|
||||||
import SectionMixin from '../../../mixins/section';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
|
||||||
sectionService: Ember.inject.service('section'),
|
|
||||||
isDirty: false,
|
|
||||||
busy: false,
|
|
||||||
authenticated: false,
|
|
||||||
config: {},
|
|
||||||
owners: null,
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let self = this;
|
|
||||||
let page = this.get('page');
|
|
||||||
|
|
||||||
if (is.undefined(this.get('config.clientId')) || is.undefined(this.get('config.callbackUrl'))) {
|
|
||||||
self.get('sectionService').fetch(page, "config", {})
|
|
||||||
.then(function (cfg) {
|
|
||||||
let config = {};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
clientId: cfg.clientID,
|
|
||||||
callbackUrl: cfg.authorizationCallbackURL,
|
|
||||||
owner: null,
|
|
||||||
owner_name: "",
|
|
||||||
lists: [],
|
|
||||||
branchSince: "",
|
|
||||||
branchLines: "100",
|
|
||||||
userId: "",
|
|
||||||
pageId: page.get('id'),
|
|
||||||
showMilestones: false,
|
|
||||||
showIssues: false,
|
|
||||||
showCommits: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
|
||||||
let metaConfig = JSON.parse(self.get('meta.config'));
|
|
||||||
config.owner = metaConfig.owner;
|
|
||||||
config.lists = metaConfig.lists;
|
|
||||||
config.branchSince = metaConfig.branchSince;
|
|
||||||
config.userId = metaConfig.userId;
|
|
||||||
config.pageId = metaConfig.pageId;
|
|
||||||
config.showMilestones = metaConfig.showMilestones;
|
|
||||||
config.showIssues = metaConfig.showIssues;
|
|
||||||
config.showCommits = metaConfig.showCommits;
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
self.set('config', config);
|
|
||||||
self.set('config.pageId', page.get('id'));
|
|
||||||
|
|
||||||
// On auth callback capture code
|
|
||||||
let code = window.location.search;
|
|
||||||
|
|
||||||
if (is.not.undefined(code) && is.not.null(code) && is.not.empty(code) && code !== "") {
|
|
||||||
let tok = code.replace("?code=", "");
|
|
||||||
self.get('sectionService').fetch(page, "saveSecret", { "token": tok })
|
|
||||||
.then(function () {
|
|
||||||
console.log("github auth code saved to db");
|
|
||||||
self.send('authStage2');
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
console.log(error);
|
|
||||||
self.send('auth');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if (config.userId !== self.get("session.session.authenticated.user.id")) {
|
|
||||||
console.log("github auth wrong user ID, switching");
|
|
||||||
self.set('config.userId', self.get("session.session.authenticated.user.id"));
|
|
||||||
}
|
|
||||||
self.get('sectionService').fetch(page, "checkAuth", self.get('config'))
|
|
||||||
.then(function () {
|
|
||||||
console.log("github auth code valid");
|
|
||||||
self.send('authStage2');
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
console.log(error);
|
|
||||||
self.send('auth'); // require auth if the db token is invalid
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
getOwnerLists() {
|
|
||||||
this.set('busy', true);
|
|
||||||
|
|
||||||
let owners = this.get('owners');
|
|
||||||
let thisOwner = this.get('config.owner');
|
|
||||||
|
|
||||||
if (is.null(thisOwner) || is.undefined(thisOwner)) {
|
|
||||||
if (owners.length) {
|
|
||||||
thisOwner = owners[0];
|
|
||||||
this.set('config.owner', thisOwner);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.set('config.owner', owners.findBy('id', thisOwner.id));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('owner', thisOwner);
|
|
||||||
|
|
||||||
this.getOrgReposLists();
|
|
||||||
|
|
||||||
if (is.undefined(this.get('initDateTimePicker'))) {
|
|
||||||
$.datetimepicker.setLocale('en');
|
|
||||||
$('#branch-since').datetimepicker();
|
|
||||||
this.set('initDateTimePicker', "Done");
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
getOrgReposLists() {
|
|
||||||
this.set('busy', true);
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
let page = this.get('page');
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "orgrepos", self.get('config'))
|
|
||||||
.then(function (lists) {
|
|
||||||
let savedLists = self.get('config.lists');
|
|
||||||
if (savedLists === null) {
|
|
||||||
savedLists = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lists.length > 0) {
|
|
||||||
let noIncluded = true;
|
|
||||||
|
|
||||||
lists.forEach(function (list) {
|
|
||||||
let included = false;
|
|
||||||
var saved;
|
|
||||||
if (is.not.undefined(savedLists)) {
|
|
||||||
saved = savedLists.findBy("id", list.id);
|
|
||||||
}
|
|
||||||
if (is.not.undefined(saved)) {
|
|
||||||
included = saved.included;
|
|
||||||
noIncluded = false;
|
|
||||||
}
|
|
||||||
list.included = included;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (noIncluded) {
|
|
||||||
lists[0].included = true; // make the first entry the default
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.set('config.lists', lists);
|
|
||||||
self.set('busy', false);
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
self.set('busy', false);
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.showNotification("Unable to fetch repositories");
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
isDirty() {
|
|
||||||
return this.get('isDirty');
|
|
||||||
},
|
|
||||||
|
|
||||||
onListCheckbox(id) { // select one repository only
|
|
||||||
let lists = this.get('config.lists');
|
|
||||||
let list = lists.findBy('id', id);
|
|
||||||
|
|
||||||
lists.forEach(function (entry) {
|
|
||||||
Ember.set(entry, 'included', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (list !== null) {
|
|
||||||
Ember.set(list, 'included', true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
authStage2() {
|
|
||||||
let self = this;
|
|
||||||
self.set('config.userId', self.get("session.session.authenticated.user.id"));
|
|
||||||
self.set('authenticated', true);
|
|
||||||
self.set('busy', true);
|
|
||||||
let page = this.get('page');
|
|
||||||
|
|
||||||
self.get('sectionService').fetch(page, "owners", self.get('config'))
|
|
||||||
.then(function (owners) {
|
|
||||||
self.set('busy', false);
|
|
||||||
self.set('owners', owners);
|
|
||||||
self.getOwnerLists();
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
self.set('busy', false);
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.showNotification("Unable to fetch owners");
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
auth() {
|
|
||||||
let self = this;
|
|
||||||
self.set('busy', true);
|
|
||||||
self.set('authenticated', false);
|
|
||||||
let target = "https://github.com/login/oauth/authorize?client_id=" + self.get('config.clientId') +
|
|
||||||
"&scope=repo&redirect_uri=" + encodeURIComponent(self.get('config.callbackUrl')) +
|
|
||||||
"&state=" + encodeURIComponent(window.location.href);
|
|
||||||
window.location.href = target;
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
onOwnerChange(thisOwner) {
|
|
||||||
this.set('isDirty', true);
|
|
||||||
this.set('config.owner', thisOwner);
|
|
||||||
this.set('config.lists', []);
|
|
||||||
this.getOwnerLists();
|
|
||||||
},
|
|
||||||
|
|
||||||
onStateChange(thisState) {
|
|
||||||
this.set('config.state', thisState);
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
this.set('busy', true);
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('rawBody', '');
|
|
||||||
meta.set('config', JSON.stringify(this.get('config')));
|
|
||||||
meta.set('externalSource', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, 'content', this.get('config'))
|
|
||||||
.then(function (response) {
|
|
||||||
meta.set('rawBody', JSON.stringify(response));
|
|
||||||
self.set('busy', false);
|
|
||||||
self.attrs.onAction(page, meta);
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('busy', false);
|
|
||||||
self.attrs.onAction(page, meta);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,81 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import miscUtil from '../../../utils/misc';
|
|
||||||
|
|
||||||
const {
|
|
||||||
inject: { service }
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
link: service(),
|
|
||||||
|
|
||||||
isDirty: false,
|
|
||||||
pageBody: "",
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set("pageBody", this.get("meta.rawBody"));
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
let height = $(document).height() - $(".document-editor > .toolbar").height() - 130;
|
|
||||||
$("#section-markdown-editor, #section-markdown-preview").css("height", height);
|
|
||||||
|
|
||||||
this.renderPreview();
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
$("#section-markdown-editor").off("keyup").on("keyup", function () {
|
|
||||||
self.renderPreview();
|
|
||||||
self.set('isDirty', true);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
$("#section-markdown-editor").off("keyup");
|
|
||||||
},
|
|
||||||
|
|
||||||
renderPreview() {
|
|
||||||
let md = window.markdownit({
|
|
||||||
linkify: true
|
|
||||||
});
|
|
||||||
let result = md.render(this.get("pageBody"));
|
|
||||||
$("#section-markdown-preview").html(result);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onInsertLink(link) {
|
|
||||||
let linkMarkdown = this.get('link').buildLink(link);
|
|
||||||
|
|
||||||
miscUtil.insertAtCursor($("#section-markdown-editor")[0], linkMarkdown);
|
|
||||||
this.set('pageBody', $("#section-markdown-editor").val());
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
isDirty() {
|
|
||||||
return this.get('isDirty');
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('rawBody', this.get("pageBody"));
|
|
||||||
|
|
||||||
this.attrs.onAction(page, meta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,187 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../../mixins/tooltip';
|
|
||||||
import SectionMixin from '../../../mixins/section';
|
|
||||||
import netUtil from '../../../utils/net';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
|
||||||
sectionService: Ember.inject.service('section'),
|
|
||||||
isDirty: false,
|
|
||||||
waiting: false,
|
|
||||||
authenticated: false,
|
|
||||||
config: {},
|
|
||||||
items: {},
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let config = {};
|
|
||||||
|
|
||||||
try {
|
|
||||||
config = JSON.parse(this.get('meta.config'));
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
if (is.empty(config)) {
|
|
||||||
config = {
|
|
||||||
APIToken: "",
|
|
||||||
query: "",
|
|
||||||
max: 10,
|
|
||||||
group: null,
|
|
||||||
system: null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('config', config);
|
|
||||||
|
|
||||||
this.send('auth');
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
displayError(reason) {
|
|
||||||
if (netUtil.isAjaxAccessError(reason)) {
|
|
||||||
this.showNotification(`Unable to authenticate`);
|
|
||||||
} else {
|
|
||||||
this.showNotification(`Something went wrong, try again!`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
isDirty() {
|
|
||||||
return this.get('isDirty');
|
|
||||||
},
|
|
||||||
|
|
||||||
auth() {
|
|
||||||
let page = this.get('page');
|
|
||||||
let config = this.get('config');
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
this.set('waiting', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "auth", config)
|
|
||||||
.then(function (response) {
|
|
||||||
self.set('authenticated', true);
|
|
||||||
self.set('items', response);
|
|
||||||
self.set('config.APIToken', '********'); // reset the api token once it has been sent to the host
|
|
||||||
console.log("auth token OK");
|
|
||||||
|
|
||||||
self.get('sectionService').fetch(page, "options", config)
|
|
||||||
.then(function (response) {
|
|
||||||
self.set('options', response);
|
|
||||||
self.set('waiting', false);
|
|
||||||
|
|
||||||
let options = self.get('options');
|
|
||||||
let group = {};
|
|
||||||
if (is.not.null(config.group)) {
|
|
||||||
group = _.findWhere(options.groups, { id: config.group.id });
|
|
||||||
} else {
|
|
||||||
group = options.groups[0];
|
|
||||||
}
|
|
||||||
if (is.not.undefined(group)) {
|
|
||||||
Ember.set(config, 'group', group);
|
|
||||||
}
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.set('config.APIToken', ''); // clear the api token
|
|
||||||
self.displayError(reason);
|
|
||||||
console.log("get options call failed");
|
|
||||||
});
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.set('config.APIToken', ''); // clear the api token
|
|
||||||
self.displayError(reason);
|
|
||||||
console.log("auth token invalid");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onGroupsChange(group) {
|
|
||||||
let config = this.get('config');
|
|
||||||
let page = this.get('page');
|
|
||||||
let self = this;
|
|
||||||
this.set('isDirty', true);
|
|
||||||
this.set('config.group', group);
|
|
||||||
this.set('waiting', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "auth", config)
|
|
||||||
.then(function (response) {
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.set('items', response);
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.displayError(reason);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onSystemsChange(system) {
|
|
||||||
let config = this.get('config');
|
|
||||||
let page = this.get('page');
|
|
||||||
let self = this;
|
|
||||||
this.set('isDirty', true);
|
|
||||||
this.set('config.system', system);
|
|
||||||
this.set('waiting', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "auth", config)
|
|
||||||
.then(function (response) {
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.set('items', response);
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.displayError(reason);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
let self = this;
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('externalSource', true);
|
|
||||||
|
|
||||||
let config = this.get('config');
|
|
||||||
let max = 10;
|
|
||||||
if (is.number(parseInt(config.max))) {
|
|
||||||
max = parseInt(config.max);
|
|
||||||
}
|
|
||||||
|
|
||||||
Ember.set(config, 'max', max);
|
|
||||||
this.set('waiting', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "auth", this.get('config'))
|
|
||||||
.then(function (response) {
|
|
||||||
self.set('items', response);
|
|
||||||
let items = self.get('items');
|
|
||||||
|
|
||||||
if (items.events.length > max) {
|
|
||||||
items.events = items.events.slice(0, max);
|
|
||||||
}
|
|
||||||
|
|
||||||
meta.set('config', JSON.stringify(config));
|
|
||||||
meta.set('rawBody', JSON.stringify(items));
|
|
||||||
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.attrs.onAction(page, meta);
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.set('waiting', false);
|
|
||||||
self.showNotification(`Something went wrong, try again!`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,72 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
isDirty: false,
|
|
||||||
pageBody: "",
|
|
||||||
defaultTable: '<table class="wysiwyg-table" style="width: 100%;"><thead><tr><th><br></th><th><br></th><th><br></th><th><br></th></tr></thead><tbody><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr></tbody></table>',
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set('pageBody', this.get('meta.rawBody'));
|
|
||||||
|
|
||||||
if (is.empty(this.get('pageBody'))) {
|
|
||||||
this.set('pageBody', this.get('defaultTable'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
$('#table-editor').froalaEditor({
|
|
||||||
toolbarButtons: [],
|
|
||||||
height: this.get('editorHeight') - 260,
|
|
||||||
toolbarInline: true,
|
|
||||||
tableResizerOffset: 10
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table-editor').on('froalaEditor.contentChanged', function () {
|
|
||||||
self.set('isDirty', true);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
$('#table-editor').froalaEditor('destroy');
|
|
||||||
$('#table-editor').off('froalaEditor.contentChanged');
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
isDirty() {
|
|
||||||
return this.get('isDirty');
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
|
|
||||||
let body = $("#table-editor").froalaEditor('html.get', true);
|
|
||||||
page.set('title', title);
|
|
||||||
|
|
||||||
if (is.empty(body)) {
|
|
||||||
body = this.get('defaultTable');
|
|
||||||
}
|
|
||||||
|
|
||||||
meta.set('rawBody', body);
|
|
||||||
|
|
||||||
this.attrs.onAction(page, meta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,264 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
/*global Trello*/
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../../../mixins/notifier';
|
|
||||||
import TooltipMixin from '../../../mixins/tooltip';
|
|
||||||
import SectionMixin from '../../../mixins/section';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
|
||||||
sectionService: Ember.inject.service('section'),
|
|
||||||
isDirty: false,
|
|
||||||
busy: false,
|
|
||||||
authenticated: false,
|
|
||||||
config: {},
|
|
||||||
boards: null,
|
|
||||||
noBoards: false,
|
|
||||||
appKey: "",
|
|
||||||
|
|
||||||
boardStyle: Ember.computed('config.board', function () {
|
|
||||||
let board = this.get('config.board');
|
|
||||||
|
|
||||||
if (is.null(board) || is.undefined(board)) {
|
|
||||||
return "#4c4c4c";
|
|
||||||
}
|
|
||||||
|
|
||||||
let color = board.prefs.backgroundColor;
|
|
||||||
return Ember.String.htmlSafe("background-color: " + color);
|
|
||||||
}),
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
let page = this.get('page');
|
|
||||||
let config = {};
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
try {
|
|
||||||
config = JSON.parse(this.get('meta.config'));
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
if (is.empty(config)) {
|
|
||||||
config = {
|
|
||||||
token: "",
|
|
||||||
user: null,
|
|
||||||
board: null,
|
|
||||||
lists: [],
|
|
||||||
boards: []
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('config', config);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "config", {})
|
|
||||||
.then(function (s) {
|
|
||||||
self.set('appKey', s.appKey);
|
|
||||||
self.set('config.token', s.token); // the user's own token has been stored in the DB
|
|
||||||
|
|
||||||
// On auth callback capture user token
|
|
||||||
let hashToken = window.location.hash;
|
|
||||||
if (is.not.undefined(hashToken) && is.not.null(hashToken)) {
|
|
||||||
let token = hashToken.replace("#token=", "");
|
|
||||||
if (is.not.empty(token)) {
|
|
||||||
self.set('config.token', token);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self.get('appKey') !== "" && self.get('config.token') !== "") {
|
|
||||||
self.send('auth');
|
|
||||||
} else {
|
|
||||||
Ember.$.getScript("https://api.trello.com/1/client.js?key=" + self.get('appKey'), function () {
|
|
||||||
Trello.deauthorize();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.destroyTooltips();
|
|
||||||
},
|
|
||||||
|
|
||||||
getBoardLists() {
|
|
||||||
this.set('busy', true);
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
let boards = this.get('boards');
|
|
||||||
let board = this.get('config.board');
|
|
||||||
let page = this.get('page');
|
|
||||||
|
|
||||||
if (is.null(boards) || is.undefined(boards) || boards.length === 0) {
|
|
||||||
this.set('noBoards', true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set('noBoards', false);
|
|
||||||
|
|
||||||
if (is.undefined(self.get('initDateTimePicker'))) {
|
|
||||||
$.datetimepicker.setLocale('en');
|
|
||||||
$('#trello-since').datetimepicker();
|
|
||||||
self.set('initDateTimePicker', "Done");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is.null(board) || is.undefined(board)) {
|
|
||||||
if (boards.length) {
|
|
||||||
board = boards[0];
|
|
||||||
this.set('config.board', board);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.set('config.board', boards.findBy('id', board.id));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is.null(board.id) || is.undefined(board.id)) {
|
|
||||||
self.set('busy', false);
|
|
||||||
} else {
|
|
||||||
this.get('sectionService').fetch(page, "lists", self.get('config'))
|
|
||||||
.then(function (lists) {
|
|
||||||
let savedLists = self.get('config.lists');
|
|
||||||
if (savedLists === null) {
|
|
||||||
savedLists = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
lists.forEach(function (list) {
|
|
||||||
let saved = savedLists.findBy("id", list.id);
|
|
||||||
let included = true;
|
|
||||||
if (is.not.undefined(saved)) {
|
|
||||||
included = saved.included;
|
|
||||||
}
|
|
||||||
list.included = included;
|
|
||||||
});
|
|
||||||
|
|
||||||
self.set('config.lists', lists);
|
|
||||||
self.set('busy', false);
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
self.set('busy', false);
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.showNotification("Unable to fetch board lists");
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
isDirty() {
|
|
||||||
return this.get('isDirty');
|
|
||||||
},
|
|
||||||
|
|
||||||
onListCheckbox(id) {
|
|
||||||
let lists = this.get('config.lists');
|
|
||||||
let list = lists.findBy('id', id);
|
|
||||||
|
|
||||||
if (list !== null) {
|
|
||||||
Ember.set(list, 'included', !list.included);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onBoardCheckbox(id) {
|
|
||||||
let boards = this.get('config.boards');
|
|
||||||
let board = boards.findBy('id', id);
|
|
||||||
|
|
||||||
if (board !== null) {
|
|
||||||
Ember.set(board, 'included', !board.included);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
auth() {
|
|
||||||
if (this.get('appKey') === "") {
|
|
||||||
$("#trello-appkey").addClass('error').focus();
|
|
||||||
this.set('authenticated', false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
let page = this.get('page');
|
|
||||||
|
|
||||||
self.set('busy', true);
|
|
||||||
|
|
||||||
Ember.$.getScript("https://api.trello.com/1/client.js?key=" + this.get('appKey'), function () {
|
|
||||||
Trello.authorize({
|
|
||||||
type: "redirect",
|
|
||||||
interactive: true,
|
|
||||||
name: "Documize",
|
|
||||||
scope: {
|
|
||||||
read: true,
|
|
||||||
write: false
|
|
||||||
},
|
|
||||||
expiration: "never",
|
|
||||||
persist: true,
|
|
||||||
success: function () {
|
|
||||||
self.set('authenticated', true);
|
|
||||||
self.set('config.token', Trello.token());
|
|
||||||
self.set('busy', true);
|
|
||||||
|
|
||||||
Trello.members.get("me", function (user) {
|
|
||||||
self.set('config.user', user);
|
|
||||||
}, function (error) {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
|
|
||||||
self.get('sectionService').fetch(page, "boards", self.get('config'))
|
|
||||||
.then(function (boards) {
|
|
||||||
self.set('busy', false);
|
|
||||||
boards.unshift({ id: null, namePath: "< do not show >", backgroundColor: "white" }); // add the non-selection to the front
|
|
||||||
self.set('config.boards', boards); // save the boards in the config too
|
|
||||||
self.set('boards', boards);
|
|
||||||
self.getBoardLists();
|
|
||||||
}, function (error) { //jshint ignore: line
|
|
||||||
self.set('busy', false);
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.showNotification("Unable to fetch boards");
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error: function (error) {
|
|
||||||
self.set('busy', false);
|
|
||||||
self.set('authenticated', false);
|
|
||||||
self.showNotification("Unable to authenticate");
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onBoardChange(board) {
|
|
||||||
this.set('isDirty', true);
|
|
||||||
this.set('config.board', board);
|
|
||||||
this.set('config.lists', []);
|
|
||||||
this.getBoardLists();
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
this.set('busy', true);
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('rawBody', '');
|
|
||||||
meta.set('config', JSON.stringify(this.get('config')));
|
|
||||||
meta.set('externalSource', true);
|
|
||||||
|
|
||||||
this.get('sectionService').fetch(page, "cards", this.get('config'))
|
|
||||||
.then(function (response) {
|
|
||||||
meta.set('rawBody', JSON.stringify(response));
|
|
||||||
self.set('busy', false);
|
|
||||||
self.attrs.onAction(page, meta);
|
|
||||||
}, function (reason) { //jshint ignore: line
|
|
||||||
self.set('busy', false);
|
|
||||||
self.attrs.onAction(page, meta);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,117 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
inject: { service }
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
appMeta: service(),
|
|
||||||
link: service(),
|
|
||||||
pageBody: "",
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.set('pageBody', this.get('meta.rawBody'));
|
|
||||||
},
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
let maxHeight = $(document).height() - $(".document-editor > .toolbar").height() - 200;
|
|
||||||
|
|
||||||
let options = {
|
|
||||||
selector: "#rich-text-editor",
|
|
||||||
relative_urls: false,
|
|
||||||
cache_suffix: "?v=443",
|
|
||||||
browser_spellcheck: false,
|
|
||||||
gecko_spellcheck: false,
|
|
||||||
theme: "modern",
|
|
||||||
statusbar: false,
|
|
||||||
height: maxHeight,
|
|
||||||
entity_encoding: "raw",
|
|
||||||
paste_data_images: true,
|
|
||||||
image_advtab: true,
|
|
||||||
image_caption: true,
|
|
||||||
media_live_embeds: true,
|
|
||||||
fontsize_formats: "8px 10px 12px 14px 18px 24px 36px 40px 50px 60px",
|
|
||||||
formats: {
|
|
||||||
bold: {
|
|
||||||
inline: 'b'
|
|
||||||
},
|
|
||||||
italic: {
|
|
||||||
inline: 'i'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
extended_valid_elements: "b,i,b/strong,i/em",
|
|
||||||
plugins: [
|
|
||||||
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
|
|
||||||
'searchreplace wordcount visualblocks visualchars code codesample fullscreen',
|
|
||||||
'insertdatetime media nonbreaking save table directionality',
|
|
||||||
'template paste textcolor colorpicker textpattern imagetools'
|
|
||||||
],
|
|
||||||
menu: {},
|
|
||||||
menubar: false,
|
|
||||||
toolbar1: "bold italic underline strikethrough superscript subscript | outdent indent bullist numlist forecolor backcolor | alignleft aligncenter alignright alignjustify | link unlink | table image media | hr codesample",
|
|
||||||
toolbar2: "formatselect fontselect fontsizeselect",
|
|
||||||
save_onsavecallback: function () {
|
|
||||||
Mousetrap.trigger('ctrl+s');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (typeof tinymce === 'undefined') {
|
|
||||||
$.getScript("/tinymce/tinymce.min.js?v=443", function () {
|
|
||||||
window.tinymce.dom.Event.domLoaded = true;
|
|
||||||
tinymce.baseURL = "//" + window.location.host + "/tinymce";
|
|
||||||
tinymce.suffix = ".min";
|
|
||||||
tinymce.init(options);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
tinymce.init(options);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
tinymce.remove();
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onInsertLink(link) {
|
|
||||||
let userSelection = tinymce.activeEditor.selection.getContent();
|
|
||||||
|
|
||||||
if (is.not.empty(userSelection)) {
|
|
||||||
Ember.set(link, 'title', userSelection);
|
|
||||||
}
|
|
||||||
|
|
||||||
let linkHTML = this.get('link').buildLink(link);
|
|
||||||
tinymce.activeEditor.insertContent(linkHTML);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
isDirty() {
|
|
||||||
return is.not.undefined(tinymce) && is.not.undefined(tinymce.activeEditor) && tinymce.activeEditor.isDirty();
|
|
||||||
},
|
|
||||||
|
|
||||||
onCancel() {
|
|
||||||
this.attrs.onCancel();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAction(title) {
|
|
||||||
let page = this.get('page');
|
|
||||||
let meta = this.get('meta');
|
|
||||||
|
|
||||||
page.set('title', title);
|
|
||||||
meta.set('rawBody', tinymce.activeEditor.getContent());
|
|
||||||
|
|
||||||
this.attrs.onAction(page, meta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({});
|
|
|
@ -1,148 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
editUser: null,
|
|
||||||
deleteUser: null,
|
|
||||||
drop: null,
|
|
||||||
password: {},
|
|
||||||
|
|
||||||
didReceiveAttrs() {
|
|
||||||
this.users.forEach(user => {
|
|
||||||
user.set('me', user.get('id') === this.get('session.session.authenticated.user.id'));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
|
|
||||||
if (is.not.null(drop)) {
|
|
||||||
drop.destroy();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
toggleActive(id) {
|
|
||||||
let user = this.users.findBy("id", id);
|
|
||||||
user.set('active', !user.get('active'));
|
|
||||||
this.attrs.onSave(user);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleEditor(id) {
|
|
||||||
let user = this.users.findBy("id", id);
|
|
||||||
user.set('editor', !user.get('editor'));
|
|
||||||
this.attrs.onSave(user);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleAdmin(id) {
|
|
||||||
let user = this.users.findBy("id", id);
|
|
||||||
user.set('admin', !user.get('admin'));
|
|
||||||
this.attrs.onSave(user);
|
|
||||||
},
|
|
||||||
|
|
||||||
edit(id) {
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
let user = this.users.findBy("id", id);
|
|
||||||
let userCopy = user.getProperties('id', 'created', 'revised', 'firstname', 'lastname', 'email', 'initials', 'active', 'editor', 'admin', 'accounts');
|
|
||||||
this.set('editUser', userCopy);
|
|
||||||
this.set('password', {
|
|
||||||
password: "",
|
|
||||||
confirmation: ""
|
|
||||||
});
|
|
||||||
$(".edit-user-dialog").css("display", "block");
|
|
||||||
$("input").removeClass("error");
|
|
||||||
|
|
||||||
let drop = new Drop({
|
|
||||||
target: $(".edit-button-" + id)[0],
|
|
||||||
content: $(".edit-user-dialog")[0],
|
|
||||||
classes: 'drop-theme-basic',
|
|
||||||
position: "bottom right",
|
|
||||||
openOn: "always",
|
|
||||||
tetherOptions: {
|
|
||||||
offset: "5px 0",
|
|
||||||
targetOffset: "10px 0"
|
|
||||||
},
|
|
||||||
remove: false
|
|
||||||
});
|
|
||||||
|
|
||||||
self.set('drop', drop);
|
|
||||||
|
|
||||||
drop.on('open', function () {
|
|
||||||
self.$("#edit-firstname").focus();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
confirmDelete(id) {
|
|
||||||
let user = this.users.findBy("id", id);
|
|
||||||
this.set('deleteUser', user);
|
|
||||||
$(".delete-user-dialog").css("display", "block");
|
|
||||||
|
|
||||||
let drop = new Drop({
|
|
||||||
target: $(".delete-button-" + id)[0],
|
|
||||||
content: $(".delete-user-dialog")[0],
|
|
||||||
classes: 'drop-theme-basic',
|
|
||||||
position: "bottom right",
|
|
||||||
openOn: "always",
|
|
||||||
tetherOptions: {
|
|
||||||
offset: "5px 0",
|
|
||||||
targetOffset: "10px 0"
|
|
||||||
},
|
|
||||||
remove: false
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop', drop);
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
},
|
|
||||||
|
|
||||||
save() {
|
|
||||||
let user = this.get('editUser');
|
|
||||||
let password = this.get('password');
|
|
||||||
|
|
||||||
if (is.empty(user.firstname)) {
|
|
||||||
$("#edit-firstname").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (is.empty(user.lastname)) {
|
|
||||||
$("#edit-lastname").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (is.empty(user.email)) {
|
|
||||||
$("#edit-email").addClass("error").focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
|
|
||||||
this.attrs.onSave(user);
|
|
||||||
|
|
||||||
if (is.not.empty(password.password) && is.not.empty(password.confirmation) &&
|
|
||||||
password.password === password.confirmation) {
|
|
||||||
this.attrs.onPassword(user, password.password);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
delete() {
|
|
||||||
let drop = this.get('drop');
|
|
||||||
drop.close();
|
|
||||||
|
|
||||||
let user = this.get('deleteUser');
|
|
||||||
this.attrs.onDelete(user);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,16 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
tagName: 'span'
|
|
||||||
});
|
|
|
@ -1,15 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
});
|
|
|
@ -1,32 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
myWidth: Ember.computed('tabs', function() {
|
|
||||||
let count = this.get('tabs.length');
|
|
||||||
let width = 95 / count;
|
|
||||||
return Ember.String.htmlSafe("width: " + `${width}%;`);
|
|
||||||
}),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
onTabSelect(tab) {
|
|
||||||
this.get('tabs').forEach(t => {
|
|
||||||
Ember.set(t, 'selected', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
Ember.set(tab, 'selected', true);
|
|
||||||
|
|
||||||
this.attrs.onTabSelect(this.get('tabs'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,52 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import miscUtil from '../utils/misc';
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
notifications: [],
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this.eventBus.subscribe('notifyUser', this, 'showNotification');
|
|
||||||
},
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this.eventBus.unsubscribe('notifyUser');
|
|
||||||
},
|
|
||||||
|
|
||||||
showNotification(msg) {
|
|
||||||
let self = this;
|
|
||||||
let notifications = this.get('notifications');
|
|
||||||
notifications.pushObject(msg);
|
|
||||||
this.set('notifications', notifications);
|
|
||||||
|
|
||||||
let elem = this.$(".user-notification")[0];
|
|
||||||
|
|
||||||
Ember.run(() => {
|
|
||||||
self.$(elem).show();
|
|
||||||
|
|
||||||
// FIXME: need a more robust solution
|
|
||||||
miscUtil.interval(function() {
|
|
||||||
let notifications = self.get('notifications');
|
|
||||||
|
|
||||||
if (notifications.length > 0) {
|
|
||||||
notifications.removeAt(0);
|
|
||||||
self.set('notifications', notifications);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (notifications.length === 0) {
|
|
||||||
self.$(elem).hide();
|
|
||||||
}
|
|
||||||
}, 2500, self.get('notifications').length);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -1,83 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
computed,
|
|
||||||
isEmpty,
|
|
||||||
isEqual,
|
|
||||||
isPresent
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
password: { password: "", confirmation: "" },
|
|
||||||
hasFirstnameError: computed.empty('model.firstname'),
|
|
||||||
hasLastnameError: computed.empty('model.lastname'),
|
|
||||||
hasEmailError: computed.empty('model.email'),
|
|
||||||
hasPasswordError: computed('passwordError', 'password.password', {
|
|
||||||
get() {
|
|
||||||
if (isPresent(this.get('passwordError'))) {
|
|
||||||
return `error`;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty(this.get('password.password'))) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
hasConfirmPasswordError: computed('confirmPasswordError', {
|
|
||||||
get() {
|
|
||||||
if (isPresent(this.get("confirmPasswordError"))) {
|
|
||||||
return `error`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
save() {
|
|
||||||
let password = this.get('password.password');
|
|
||||||
let confirmation = this.get('password.confirmation');
|
|
||||||
|
|
||||||
if (isEmpty(this.get('model.firstname'))) {
|
|
||||||
return $("#firstname").focus();
|
|
||||||
}
|
|
||||||
if (isEmpty(this.get('model.lastname'))) {
|
|
||||||
return $("#lastname").focus();
|
|
||||||
}
|
|
||||||
if (isEmpty(this.get('model.email'))) {
|
|
||||||
return $("#email").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isPresent(password) && isEmpty(confirmation)) {
|
|
||||||
Ember.set(this, 'confirmPasswordError', 'error');
|
|
||||||
return $("#confirmPassword").focus();
|
|
||||||
}
|
|
||||||
if (isEmpty(password) && isPresent(confirmation)) {
|
|
||||||
Ember.set(this, 'passwordError', 'error');
|
|
||||||
return $("#password").focus();
|
|
||||||
}
|
|
||||||
if (!isEqual(password, confirmation)) {
|
|
||||||
Ember.set(this, 'passwordError', 'error');
|
|
||||||
return $("#password").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
let passwords = this.get('password');
|
|
||||||
|
|
||||||
this.get('save')(passwords).finally(() => {
|
|
||||||
Ember.set(this, 'password.password', '');
|
|
||||||
Ember.set(this, 'password.confirmation', '');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,56 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
const {
|
|
||||||
isEmpty,
|
|
||||||
computed,
|
|
||||||
set,
|
|
||||||
get
|
|
||||||
} = Ember;
|
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
|
||||||
newUser: { firstname: "", lastname: "", email: "", active: true },
|
|
||||||
firstnameEmpty: computed.empty('newUser.firstname'),
|
|
||||||
lastnameEmpty: computed.empty('newUser.lastname'),
|
|
||||||
emailEmpty: computed.empty('newUser.email'),
|
|
||||||
hasFirstnameEmptyError: computed.and('firstnameEmpty', 'firstnameError'),
|
|
||||||
hasLastnameEmptyError: computed.and('lastnameEmpty', 'lastnameError'),
|
|
||||||
hasEmailEmptyError: computed.and('emailEmpty', 'emailError'),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
add() {
|
|
||||||
if (isEmpty(this.get('newUser.firstname'))) {
|
|
||||||
set(this, 'firstnameError', true);
|
|
||||||
return $("#newUserFirstname").focus();
|
|
||||||
}
|
|
||||||
if (isEmpty(this.get('newUser.lastname'))) {
|
|
||||||
set(this, 'lastnameError', true);
|
|
||||||
return $("#newUserLastname").focus();
|
|
||||||
}
|
|
||||||
if (isEmpty(this.get('newUser.email')) || is.not.email(this.get('newUser.email'))) {
|
|
||||||
set(this, 'emailError', true);
|
|
||||||
return $("#newUserEmail").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
let user = get(this, 'newUser');
|
|
||||||
|
|
||||||
get(this, 'add')(user).then(() => {
|
|
||||||
this.set('newUser', { firstname: "", lastname: "", email: "", active: true });
|
|
||||||
set(this, 'firstnameError', false);
|
|
||||||
set(this, 'lastnameError', false);
|
|
||||||
set(this, 'emailError', false);
|
|
||||||
$("#newUserFirstname").focus();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,55 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
// Copyright (c) 2015 Documize Inc.
|
|
||||||
import Ember from 'ember';
|
|
||||||
import NotifierMixin from '../mixins/notifier';
|
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, {
|
|
||||||
drop1: null,
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this._super(...arguments);
|
|
||||||
new Tooltip({
|
|
||||||
target: document.getElementById("sample-1")
|
|
||||||
});
|
|
||||||
new Tooltip({
|
|
||||||
target: document.getElementById("sample-2")
|
|
||||||
});
|
|
||||||
new Tooltip({
|
|
||||||
target: document.getElementById("sample-3")
|
|
||||||
});
|
|
||||||
new Tooltip({
|
|
||||||
target: document.getElementById("sample-4")
|
|
||||||
});
|
|
||||||
|
|
||||||
let drop1 = new Drop({
|
|
||||||
target: document.getElementById('sample-dropdown-1'),
|
|
||||||
content: document.getElementById('sample-dropdown-content-1'),
|
|
||||||
classes: 'drop-theme-basic',
|
|
||||||
position: 'bottom middle',
|
|
||||||
openOn: 'click'
|
|
||||||
});
|
|
||||||
|
|
||||||
this.set('drop1', drop1);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
dropClose() {
|
|
||||||
this.get('drop1').close();
|
|
||||||
},
|
|
||||||
|
|
||||||
addFolder() {
|
|
||||||
console.log("adding folder!");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,19 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import dateUtil from '../utils/date';
|
|
||||||
|
|
||||||
export function formattedDate(params) {
|
|
||||||
return dateUtil.toIsoDate(params[0], params[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Ember.Helper.helper(formattedDate);
|
|
|
@ -1,16 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Helper.helper(function([object, path]) {
|
|
||||||
return Ember.get(object, path);
|
|
||||||
});
|
|
|
@ -1,20 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
import dateUtil from '../utils/date';
|
|
||||||
|
|
||||||
// {{time-ago createdAt}}
|
|
||||||
export function timeAgo(params) {
|
|
||||||
return dateUtil.timeAgo(params[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Ember.Helper.helper(timeAgo);
|
|
|
@ -1,33 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
{{content-for 'head'}}
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<title>Documize</title>
|
|
||||||
<meta property="dbname" content="{{.DBname}}" />
|
|
||||||
<meta property="dbhash" content="{{.DBhash}}" />
|
|
||||||
<meta name="author" content="Documize" />
|
|
||||||
<meta name="description" content="Documize">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
||||||
<link rel="shortcut icon" href="/favicon.ico?v=1.1" />
|
|
||||||
<link rel="icon" type="image/png" href="/favicon-32x32.png?v=1.1" sizes="32x32" />
|
|
||||||
<link rel="stylesheet" href="/assets/vendor.css">
|
|
||||||
<link rel="stylesheet" href="/assets/documize.css">
|
|
||||||
{{content-for 'head-footer'}}
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{{content-for 'body'}}
|
|
||||||
<script src="/assets/vendor.js"></script>
|
|
||||||
<script src="/assets/documize.js"></script>
|
|
||||||
<script src="/codemirror/lib/codemirror.js"></script>
|
|
||||||
<script src="/codemirror/mode/meta.js"></script>
|
|
||||||
<script src="/codemirror/addon/mode/loadmode.js"></script>
|
|
||||||
<script src="/codemirror/addon/runmode/runmode.js"></script>
|
|
||||||
<script src="/codemirror/addon/runmode/colorize.js"></script>
|
|
||||||
{{content-for 'body-footer'}}
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,28 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
export function initialize( /*application*/ ) {
|
|
||||||
// address insecure jquery defaults (kudos: @nathanhammond)
|
|
||||||
$.globalEval = function() {};
|
|
||||||
$.ajaxSetup({
|
|
||||||
crossDomain: true,
|
|
||||||
converters: {
|
|
||||||
'text script': text => text
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Dropzone.autoDiscover = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'application',
|
|
||||||
initialize: initialize
|
|
||||||
};
|
|
|
@ -1,22 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
export function initialize(application) {
|
|
||||||
application.inject('route', 'audit', 'service:audit');
|
|
||||||
application.inject('controller', 'audit', 'service:audit');
|
|
||||||
application.inject('component', 'audit', 'service:audit');
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'audit',
|
|
||||||
after: 'session',
|
|
||||||
initialize: initialize
|
|
||||||
};
|
|
|
@ -1,24 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
export function initialize(application) {
|
|
||||||
application.inject('route', 'session', 'service:session');
|
|
||||||
application.inject('controller', 'session', 'service:session');
|
|
||||||
application.inject('component', 'session', 'service:session');
|
|
||||||
application.inject('mixin', 'session', 'service:session');
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'session',
|
|
||||||
after: 'application',
|
|
||||||
before: 'audit',
|
|
||||||
initialize: initialize
|
|
||||||
};
|
|
|
@ -1,24 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Mixin.create({
|
|
||||||
showNotification(msg) {
|
|
||||||
this.eventBus.publish('notifyUser', msg);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
showNotification(msg) {
|
|
||||||
this.eventBus.publish('notifyUser', msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Mixin.create({
|
|
||||||
isReadonly: function () {
|
|
||||||
if (this.get('page.userId') === this.get('session.session.authenticated.user.id')) {
|
|
||||||
return undefined;
|
|
||||||
} else {
|
|
||||||
return "readonly";
|
|
||||||
}
|
|
||||||
}.property('page'),
|
|
||||||
|
|
||||||
isMine: function () {
|
|
||||||
return this.get('page.userId') === this.get('session.session.authenticated.user.id');
|
|
||||||
}.property('page')
|
|
||||||
});
|
|
|
@ -1,42 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.Mixin.create({
|
|
||||||
tooltips: [],
|
|
||||||
|
|
||||||
addTooltip(elem) {
|
|
||||||
|
|
||||||
if(elem == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let t = new Tooltip({
|
|
||||||
target: elem
|
|
||||||
});
|
|
||||||
|
|
||||||
let tt = this.get('tooltips');
|
|
||||||
tt.push(t);
|
|
||||||
},
|
|
||||||
|
|
||||||
destroyTooltips() {
|
|
||||||
let tt = this.get('tooltips');
|
|
||||||
|
|
||||||
tt.forEach(t => {
|
|
||||||
t.destroy();
|
|
||||||
});
|
|
||||||
|
|
||||||
tt.length = 0;
|
|
||||||
|
|
||||||
this.set('tooltips', tt);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,36 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Model from 'ember-data/model';
|
|
||||||
import attr from 'ember-data/attr';
|
|
||||||
import Ember from 'ember';
|
|
||||||
import stringUtil from '../utils/string';
|
|
||||||
// import { belongsTo, hasMany } from 'ember-data/relationships';
|
|
||||||
|
|
||||||
export default Model.extend({
|
|
||||||
name: attr('string'),
|
|
||||||
excerpt: attr('string'),
|
|
||||||
job: attr('string'),
|
|
||||||
location: attr('string'),
|
|
||||||
orgId: attr('string'),
|
|
||||||
folderId: attr('string'),
|
|
||||||
userId: attr('string'),
|
|
||||||
tags: attr('string'),
|
|
||||||
template: attr('boolean'),
|
|
||||||
|
|
||||||
// client-side property
|
|
||||||
selected: attr('boolean', { defaultValue: false }),
|
|
||||||
slug: Ember.computed('name', function () {
|
|
||||||
return stringUtil.makeSlug(this.get('name'));
|
|
||||||
}),
|
|
||||||
created: attr(),
|
|
||||||
revised: attr()
|
|
||||||
});
|
|
|
@ -1,23 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Model from 'ember-data/model';
|
|
||||||
import attr from 'ember-data/attr';
|
|
||||||
// import { belongsTo, hasMany } from 'ember-data/relationships';
|
|
||||||
|
|
||||||
export default Model.extend({
|
|
||||||
orgId: attr('string'),
|
|
||||||
folderId: attr('string'),
|
|
||||||
userId: attr('string'),
|
|
||||||
fullname: attr('string'),
|
|
||||||
canView: attr('boolean', { defaultValue: false }),
|
|
||||||
canEdit: attr('boolean', { defaultValue: false })
|
|
||||||
});
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Model from 'ember-data/model';
|
|
||||||
import attr from 'ember-data/attr';
|
|
||||||
import constants from '../utils/constants';
|
|
||||||
import stringUtil from '../utils/string';
|
|
||||||
import Ember from 'ember';
|
|
||||||
// import { belongsTo, hasMany } from 'ember-data/relationships';
|
|
||||||
|
|
||||||
export default Model.extend({
|
|
||||||
name: attr('string'),
|
|
||||||
orgId: attr('string'),
|
|
||||||
userId: attr('string'),
|
|
||||||
folderType: attr('number', { defaultValue: 2 }),
|
|
||||||
|
|
||||||
slug: Ember.computed('name', function () {
|
|
||||||
return stringUtil.makeSlug(this.get('name'));
|
|
||||||
}),
|
|
||||||
|
|
||||||
markAsRestricted() {
|
|
||||||
this.set('folderType', constants.FolderType.Protected);
|
|
||||||
},
|
|
||||||
|
|
||||||
markAsPrivate() {
|
|
||||||
this.set('folderType', constants.FolderType.Private);
|
|
||||||
},
|
|
||||||
|
|
||||||
markAsPublic() {
|
|
||||||
this.set('folderType', constants.FolderType.Public);
|
|
||||||
},
|
|
||||||
|
|
||||||
// client-side prop that holds who can see this folder
|
|
||||||
sharedWith: attr(),
|
|
||||||
created: attr(),
|
|
||||||
revised: attr()
|
|
||||||
});
|
|
|
@ -1,23 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Model from 'ember-data/model';
|
|
||||||
import attr from 'ember-data/attr';
|
|
||||||
// import { belongsTo, hasMany } from 'ember-data/relationships';
|
|
||||||
|
|
||||||
export default Model.extend({
|
|
||||||
title: attr('string'),
|
|
||||||
message: attr('string'),
|
|
||||||
email: attr('string'),
|
|
||||||
allowAnonymousAccess: attr('boolean', { defaultValue: false }),
|
|
||||||
created: attr(),
|
|
||||||
revised: attr()
|
|
||||||
});
|
|
|
@ -1,44 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Model from 'ember-data/model';
|
|
||||||
import attr from 'ember-data/attr';
|
|
||||||
import Ember from 'ember';
|
|
||||||
// import { hasMany } from 'ember-data/relationships';
|
|
||||||
|
|
||||||
export default Model.extend({
|
|
||||||
documentId: attr('string'),
|
|
||||||
orgId: attr('string'),
|
|
||||||
contentType: attr('string'),
|
|
||||||
level: attr('number', { defaultValue: 1 }),
|
|
||||||
sequence: attr('number', { defaultValue: 0 }),
|
|
||||||
revisions: attr('number', { defaultValue: 0 }),
|
|
||||||
title: attr('string'),
|
|
||||||
body: attr('string'),
|
|
||||||
rawBody: attr('string'),
|
|
||||||
meta: attr(),
|
|
||||||
// meta: hasMany('page-meta'),
|
|
||||||
|
|
||||||
tagName: Ember.computed('level', function () {
|
|
||||||
return "h" + this.get('level');
|
|
||||||
}),
|
|
||||||
|
|
||||||
tocIndent: Ember.computed('level', function () {
|
|
||||||
return (this.get('level') - 1) * 20;
|
|
||||||
}),
|
|
||||||
|
|
||||||
tocIndentCss: Ember.computed('tocIndent', function () {
|
|
||||||
let tocIndent = this.get('tocIndent');
|
|
||||||
return `margin-left-${tocIndent}`;
|
|
||||||
}),
|
|
||||||
created: attr(),
|
|
||||||
revised: attr()
|
|
||||||
});
|
|
|
@ -1,29 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Model from 'ember-data/model';
|
|
||||||
import attr from 'ember-data/attr';
|
|
||||||
import Ember from 'ember';
|
|
||||||
// import { belongsTo, hasMany } from 'ember-data/relationships';
|
|
||||||
|
|
||||||
export default Model.extend({
|
|
||||||
contentType: attr('string'),
|
|
||||||
title: attr('string'),
|
|
||||||
description: attr('string'),
|
|
||||||
iconFont: attr('string'),
|
|
||||||
iconFile: attr('string'),
|
|
||||||
|
|
||||||
hasImage: Ember.computed('iconFont', 'iconFile', function () {
|
|
||||||
return this.get('iconFile').length > 0;
|
|
||||||
}),
|
|
||||||
created: attr(),
|
|
||||||
revised: attr()
|
|
||||||
});
|
|
|
@ -1,30 +0,0 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
||||||
//
|
|
||||||
// This software (Documize Community Edition) is licensed under
|
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
||||||
//
|
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
|
||||||
// by contacting <sales@documize.com>.
|
|
||||||
//
|
|
||||||
// https://documize.com
|
|
||||||
|
|
||||||
import Model from 'ember-data/model';
|
|
||||||
import attr from 'ember-data/attr';
|
|
||||||
import stringUtil from '../utils/string';
|
|
||||||
import Ember from 'ember';
|
|
||||||
// import { belongsTo, hasMany } from 'ember-data/relationships';
|
|
||||||
|
|
||||||
export default Model.extend({
|
|
||||||
author: attr('string'),
|
|
||||||
dated: attr(),
|
|
||||||
description: attr('string'),
|
|
||||||
title: attr('string'),
|
|
||||||
type: attr('number', { defaultValue: 0 }),
|
|
||||||
|
|
||||||
slug: Ember.computed('title', function () {
|
|
||||||
return stringUtil.makeSlug(this.get('title'));
|
|
||||||
}),
|
|
||||||
created: attr(),
|
|
||||||
revised: attr()
|
|
||||||
});
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue