Compare commits
2059 Commits
v5.3.1.6
...
feature/ja
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ac382d3c0 | |||
| 5933aa83ad | |||
| 2e1854f6c1 | |||
| 2d9a7ed502 | |||
| 78bd037486 | |||
| 17beef45f4 | |||
| b11a1be481 | |||
| a3e140981d | |||
| e0386f7cf9 | |||
| 0521f20413 | |||
| 61b5746ddf | |||
| 57d823acb1 | |||
| 4d99e2e406 | |||
| bec48ed834 | |||
| e856f5bcb1 | |||
| c57a710bca | |||
| 248e9213a1 | |||
| a035adcbd9 | |||
| 7fd1b65fec | |||
| 8ee0aa45b9 | |||
| dfcf244dc8 | |||
| 0563795494 | |||
| b6b6e80ffb | |||
| bd3b91d02f | |||
| 555f8d43cd | |||
| 3f48a8d492 | |||
| bb921e7eff | |||
| 13d5e6fa94 | |||
| cbfcf5de96 | |||
| 4771d96819 | |||
| d2aa6f0653 | |||
| cf2a00a374 | |||
| bdfb75dc84 | |||
| 9e21ca625c | |||
| 02def07f23 | |||
| fc4dac6c4b | |||
| 486a09f3b2 | |||
| 9a22fc854b | |||
| ac4d5561a2 | |||
| 98cdda06c4 | |||
| 744fccf913 | |||
| 349ff5d61d | |||
| dbba22df23 | |||
| 2ddd822b24 | |||
| 6b4d6baf4b | |||
| 2c8d151cc7 | |||
| 60c7c025a3 | |||
| 7aaf5243cb | |||
| 44b0f4d53d | |||
| b765d43612 | |||
| 70b63636e3 | |||
| 8d4582e379 | |||
| a1ec2cf366 | |||
| 4907e9d3c8 | |||
| 88f3d6da59 | |||
| 481b111cb2 | |||
| a1e13f3315 | |||
| d1dd289c77 | |||
| 7b4e40c4e4 | |||
| 6d4cad2215 | |||
| f43a4471ef | |||
| 0cf90e86c7 | |||
| 406de99b01 | |||
| f4bcb15d33 | |||
| d2a0164738 | |||
| a49ef4cc13 | |||
| 3ca29cd402 | |||
| c398b30e33 | |||
| 8caea9fab0 | |||
| f44c62540c | |||
| 7644db80e3 | |||
| 880497cd01 | |||
| 34f8174d9d | |||
| 99bc9d3fdf | |||
| 165c292ab8 | |||
| 8fe41cd8e6 | |||
| 705ea097e2 | |||
| f4799bebb4 | |||
| 4ffa524de0 | |||
| cd055317e0 | |||
| b1941c5980 | |||
| 83bc0fed5e | |||
| 8b71bb0433 | |||
| 5620f49f8f | |||
| d9fefef834 | |||
| 37591d847c | |||
| 77290d88f3 | |||
| 6befd87761 | |||
| f3e270c1ad | |||
| f5f1e4b391 | |||
| 8ba389d02f | |||
| 45910ff1f3 | |||
| 3bd6f51edc | |||
| fe9791f03d | |||
| 531137dca4 | |||
| e267b30b26 | |||
| 8733baa04b | |||
| 8cec9fc465 | |||
| 7ec969f4d9 | |||
| c7e13ef8a8 | |||
| 3d488f89b2 | |||
| cc00af1510 | |||
| f8aa55143c | |||
| 1b44c04893 | |||
| 1585d1821e | |||
| e996c4d265 | |||
| cc0c6189bd | |||
| ef7662c069 | |||
| 79ff84a4cc | |||
| e4bab17b08 | |||
| c734f5dd69 | |||
| d79feca18c | |||
| 3181c7449d | |||
| 8ea2edefb9 | |||
| 1a51759154 | |||
| 77c4caa26f | |||
| 5944e41cb4 | |||
| 09ccde3f84 | |||
| b27e532a83 | |||
| e9632eb5e2 | |||
| 8807328180 | |||
| 827e96c506 | |||
| 491cbbc843 | |||
| 68d26c9c66 | |||
| 80924be536 | |||
| 0ca829181c | |||
| 64f085d4b7 | |||
| 39c2267468 | |||
| 22af4e097f | |||
| 1a1cde0f67 | |||
| 1265ecdee1 | |||
| 19d11a97f9 | |||
| bf6f3373a6 | |||
| 1fb4d759a3 | |||
| de33efa599 | |||
| 6fa150ade6 | |||
| 88f4b6327d | |||
| 82905fca6c | |||
| ccb67ad73d | |||
| 5a233b8dc7 | |||
| 127183bb16 | |||
| 8924304bdb | |||
| 68dd1fc369 | |||
| 7251cb1681 | |||
| a82e4b6bdf | |||
| d2f2031fa7 | |||
| 4a902dff94 | |||
| f26220683c | |||
| c3e4533d1a | |||
| f6618c8c92 | |||
| efd710c6c0 | |||
| e106677efb | |||
| ecd02e07c0 | |||
| 847902fad9 | |||
| d4b5f86822 | |||
| 7c35d8127d | |||
| d023b23fc9 | |||
| 8b10c5ac2e | |||
| 54bc536329 | |||
| 07d7e5d887 | |||
| 009577b52e | |||
| c1fd896be4 | |||
| 033126583b | |||
| 3140d31e9c | |||
| 92ea5151ad | |||
| ae4e4c14ad | |||
| 9a9d3c0b35 | |||
| 13d3fe97d9 | |||
| 5bfe32f796 | |||
| 5a1ad9139f | |||
| 91fbc384f3 | |||
| 9d275ebe6c | |||
| 09a5d802ec | |||
| b548ffb97e | |||
| 50b0c3d29e | |||
| 93b4560c31 | |||
| 2e9807814a | |||
| d0cfd03bf8 | |||
| 72c14a4e7b | |||
| 44a3f29a79 | |||
| 98dceacc4c | |||
| 05f4063ba6 | |||
| d5797f7c02 | |||
| 5f40faac2a | |||
| c062e554db | |||
| 41e44985d6 | |||
| 95e1135e86 | |||
| cafb79c8d5 | |||
| 1dbc275a57 | |||
| 6dd44d2094 | |||
| b74a3c5565 | |||
| 27e5fa8482 | |||
| 46dab40432 | |||
| ebd4ead751 | |||
| 9014f96da3 | |||
| 273e4d5b77 | |||
| d8b6cdcf78 | |||
| 6e0899daaf | |||
| a5d459a744 | |||
| dcb48f3849 | |||
| c8b3ed761e | |||
| 01c8b23d1d | |||
| bf9373842b | |||
| 7eaf4f5ae7 | |||
| e09f258f25 | |||
| 054e144d93 | |||
| 3b698eb974 | |||
| c356d952be | |||
| b1f3704624 | |||
| 1dd545dc9c | |||
| 1f6dfb0677 | |||
| b59874f54b | |||
| 4d9f02c606 | |||
| c344a1d6a6 | |||
| a53f36eca3 | |||
| ca49e5bdda | |||
| 4882459f51 | |||
| 0a0f5b556c | |||
| fdefc25479 | |||
| 2502c2a979 | |||
| be85920ce4 | |||
| 7d7c10b3bc | |||
| 1cbc6eca2e | |||
| df83585352 | |||
| 6979ec815e | |||
| d007b0a969 | |||
| 63f032d924 | |||
| 96a9dd7990 | |||
| 91d8fc2487 | |||
| ae64081f97 | |||
| 820cafe202 | |||
| e0d7e416d3 | |||
| 806aba967c | |||
| 3ec226109e | |||
| b1f0fa6ecc | |||
| b02ffff33e | |||
| f74f0ba376 | |||
| 96d3bf2e63 | |||
| daf4f62acd | |||
| ade8a07e95 | |||
| 8b613627d1 | |||
| 3d3a10005c | |||
| 801c451899 | |||
| df034c2af2 | |||
| 9726c06c84 | |||
| 3a45e1b0f3 | |||
| ed8d0194b7 | |||
| a59da2d5df | |||
| f5c9a9e924 | |||
| 7b12b970c0 | |||
| 87a11c8633 | |||
| 01e0cefae5 | |||
| 98d42249fa | |||
| fd9454dd5f | |||
| fbf4153dea | |||
| 83b0411a4d | |||
| c60e4e25e2 | |||
| 4ebbecf580 | |||
| 6dbf383e2d | |||
| 1012bf13a6 | |||
| a24e081564 | |||
| 187ee212a9 | |||
| 106d9bfed3 | |||
| 13e243f900 | |||
| 4ccc3fa35e | |||
| be1fa2da14 | |||
| b6645427a8 | |||
| 39d7c366e3 | |||
| 075f464701 | |||
| 9414dff70c | |||
| 05b8989a87 | |||
| 43b6f53652 | |||
| c22c0d72aa | |||
| d61c112aa2 | |||
| ae3def67f5 | |||
| 7c22ba4e9e | |||
| 320881f1cf | |||
| 90c31eb887 | |||
| 702d0f1aa8 | |||
| dbf1047f29 | |||
| 0d27d142d4 | |||
| 807cbbf236 | |||
| e6b0bfd0be | |||
| 943d059c7c | |||
| 399ab0714d | |||
| 8cabbe9c71 | |||
| e40b6b2e28 | |||
| 0a390094e5 | |||
| f7bb668f8b | |||
| 808712ad34 | |||
| 2b0ba914dc | |||
| 249adaab48 | |||
| ee99a80ead | |||
| d61fdaaa53 | |||
| 270cbee160 | |||
| e9721dd655 | |||
| a31a24a871 | |||
| df0e197cb5 | |||
| 09802afc6f | |||
| 1c43679d87 | |||
| 573eeb6e18 | |||
| 78cf6c35f8 | |||
| c7f5003d69 | |||
| 19baff4340 | |||
| cc5c912658 | |||
| 64f2d605c2 | |||
| c9fca685bf | |||
| 820883a584 | |||
| 05a00a33a3 | |||
| 613cb713cc | |||
| 9216ff3a97 | |||
| dbaa7c5113 | |||
| d6ad145111 | |||
| 456df162e6 | |||
| 50fd47cf7c | |||
| f9c0da1696 | |||
| a7807513c6 | |||
| 128430d698 | |||
| 8077a66f16 | |||
| b3d8695a26 | |||
| 00872758ee | |||
| 3301c24de5 | |||
| dd0c049a70 | |||
| 44fb3a089c | |||
| 513bf99adb | |||
| 6f92633ef8 | |||
| b67e768dce | |||
| 751a886bfa | |||
| 66ea4b144b | |||
| 7a73422231 | |||
| 5319e18fb5 | |||
| 93accdac7c | |||
| def268f5f2 | |||
| 6054bffb3f | |||
| a7c917db3f | |||
| 30481005a1 | |||
| 5544768500 | |||
| 14e53970c8 | |||
| 82efd0f18a | |||
| 8ce90d89ed | |||
| 2b184972dc | |||
| 0fb9da4d89 | |||
| 9277d3de58 | |||
| baf7a1e5dd | |||
| e2a14a74db | |||
| 848cfb20bc | |||
| ddd3ec82a8 | |||
| 0ed08fd7b2 | |||
| e1c5907003 | |||
| 9dd2d7c0db | |||
| 8f0cbb78af | |||
| 72e48914aa | |||
| 82a282029a | |||
| 9b7c12b5c0 | |||
| 6ea5546099 | |||
| 92fbd1e293 | |||
| 855c1ed9f9 | |||
| 7e60ec15fd | |||
| 3697a4a888 | |||
| 0b8107d167 | |||
| 885850ee33 | |||
| 98c61250a6 | |||
| 457487844c | |||
| ff72956b68 | |||
| 1593df6aec | |||
| cda8a86c2a | |||
| 16584c0abb | |||
| 1ddda89001 | |||
| 5b76d798fb | |||
| e96200df85 | |||
| de75b11e18 | |||
| f27afe1535 | |||
| 59e17079ff | |||
| 1bdb3c03bc | |||
| 111dc14f2b | |||
| 4a656c025f | |||
| ce9930e5bc | |||
| 9da22d7803 | |||
| d78c677c99 | |||
| b204142c13 | |||
| fd1c26ab9f | |||
| 5993d10bee | |||
| c5771c9008 | |||
| 2fad227272 | |||
| ada438ff0b | |||
| 0dbd65a577 | |||
| 48e5b8d4e0 | |||
| 7f08a96681 | |||
| 3549b4bc2a | |||
| c9265d9ddc | |||
| 44d9ca88c6 | |||
| d964b43087 | |||
| 5a0debd9e8 | |||
| 3b0f942eee | |||
| 4ee110c2d5 | |||
| ad1d93dd20 | |||
| d2d98df5ab | |||
| 7805f7dc91 | |||
| 51ec27d67c | |||
| 9e94716df0 | |||
| 988a8339b1 | |||
| a482635e3f | |||
| d2c679f6b1 | |||
| 1da452d857 | |||
| d9b8d2b7e9 | |||
| 24aee6d194 | |||
| bd108a9c77 | |||
| e737e8ed48 | |||
| b425d15f0a | |||
| 0f8dec1e6e | |||
| 193b31fe75 | |||
| 583403cf78 | |||
| 641e45e24f | |||
| 53c30fbb7d | |||
| 87a1755729 | |||
| 752a2a2364 | |||
| d1affa2911 | |||
| 0ef2a4f3fd | |||
| 675d3f318a | |||
| 05512ffa23 | |||
| 2eeed5d26d | |||
| 9e3dbd5eb5 | |||
| efbab7c113 | |||
| b8f0f6447c | |||
| 8779a90433 | |||
| b3162ee410 | |||
| 42edd5e208 | |||
| e041baeef7 | |||
| 5bf682a007 | |||
| 6dacf49faa | |||
| 63c9c4242e | |||
| b5e345ed50 | |||
| 33f8436d42 | |||
| c5217242ab | |||
| c910d5193b | |||
| 58c27f8f2f | |||
| 1ec831789b | |||
| 0510fd1354 | |||
| 25238b5614 | |||
| 901bb61883 | |||
| 7f3e6c6364 | |||
| b3512ea0ce | |||
| 642a1bd19a | |||
| ac471588de | |||
| 17674ef5bc | |||
| dc2ee2a997 | |||
| c358fa814a | |||
| 143a73e083 | |||
| c266592434 | |||
| 19ed666d56 | |||
| 84b9202af0 | |||
| 8fb698bb75 | |||
| 00f46ef080 | |||
| 5c194da95d | |||
| 0d5cebe28e | |||
| dacf72cae2 | |||
| 208b8926be | |||
| 55c4853f04 | |||
| ccae7c6a06 | |||
| dc84dd3b29 | |||
| 65d3671b09 | |||
| 1fb5ef8bfd | |||
| b630c3802b | |||
| ad3993b532 | |||
| 35ee61e011 | |||
| ee59ab3dfd | |||
| 500f076e38 | |||
| e578f29d9d | |||
| 9de9bc90a4 | |||
| 7a9ebdbbe5 | |||
| 887089bcad | |||
| 680e53823a | |||
| 33e1489cd6 | |||
| 8c90737bf6 | |||
| e5f1bc8ed6 | |||
| 985b179475 | |||
| 775d15132f | |||
| 4a4298ca10 | |||
| cdbd264ed5 | |||
| e61f6cae89 | |||
| 22039078ef | |||
| 62793a42ab | |||
| f49f96a2c2 | |||
| 2031d65adb | |||
| 7f54659d3b | |||
| a3bc13bb6e | |||
| 29ea16c124 | |||
| 6d4c8b926e | |||
| 22d2031426 | |||
| fcc51e8154 | |||
| 8cd85ad63c | |||
| 1d51688884 | |||
| 2c63a85b00 | |||
| d1545c4db4 | |||
| bd8e4d6ec7 | |||
| e1c815b574 | |||
| 4042d2bb8a | |||
| 8c9d2d80bd | |||
| 3a9259d713 | |||
| 39129a537e | |||
| dfaf552bf8 | |||
| cc8b6f3716 | |||
| 13726b3c2f | |||
| 8bcc15e320 | |||
| 8fca045dd7 | |||
| a018cc5787 | |||
| 054236ef8a | |||
| 05a3110c99 | |||
| e662c765e6 | |||
| 058bb0d2e2 | |||
| 8bafa3ff3a | |||
| 56679a3b75 | |||
| d4d758770f | |||
| ac78d1fc08 | |||
| 874ebff886 | |||
| 070dac6878 | |||
| 4f2f877f0e | |||
| cfa0fb1b74 | |||
| 1d624e6831 | |||
| fe83e98b37 | |||
| f9ea7f7b50 | |||
| 328ea46693 | |||
| 41ec2742a7 | |||
| 76fc55c2d4 | |||
| e10f3962b6 | |||
| b9859ef5ca | |||
| 1cb2b586b1 | |||
| e5d31eebbf | |||
| 1ac40c539f | |||
| 371366befa | |||
| 0bee4817e7 | |||
| ad941e0ba4 | |||
| 93c69e51ed | |||
| 8b8b7d3938 | |||
| f8f01a033e | |||
| f497f10913 | |||
| 8b2478ac71 | |||
| 391c347419 | |||
| 5a08009b7b | |||
| 4e5b65f673 | |||
| 13e3d7673b | |||
| c0a46866ce | |||
| e7b76729a4 | |||
| 5cc6b4cb15 | |||
| 7a70a44bcb | |||
| ce2e7f97d6 | |||
| e42bd53664 | |||
| 23e616aade | |||
| f035da0db4 | |||
| 3e12ec4ebe | |||
| 589ca9b601 | |||
| 32f1ec82d1 | |||
| 54bb5b0a24 | |||
| 8274c16f6d | |||
| 7a982fc785 | |||
| 6f5800fbde | |||
| 8ec632eebd | |||
| b6ca4535ce | |||
| 089fc8bfa0 | |||
| 0b4c17ea0a | |||
| 405be2847b | |||
| f809c7e525 | |||
| 44061c82a9 | |||
| ef4e283804 | |||
| 4b0ad1a192 | |||
| 60469b0dba | |||
| f5ac95e1cc | |||
| c4c2fbb945 | |||
| 99b5fcd562 | |||
| 7e34067410 | |||
| a44787c625 | |||
| 105afb2c34 | |||
| 002f9b958e | |||
| 56d5913808 | |||
| 6664864bed | |||
| 6c9e6e9304 | |||
| 416b1fde8c | |||
| 383f240825 | |||
| 642e145142 | |||
| 8f09dadfa0 | |||
| 495f1cf49a | |||
| cf01b5e0ae | |||
| 0673fed928 | |||
| 9b0b30a0b0 | |||
| 200187edce | |||
| 23176ddf07 | |||
| 9857cef8fc | |||
| 204f770401 | |||
| 61834e3ec6 | |||
| 2ca6185ac4 | |||
| e818bb978b | |||
| 3a4cf5e6e6 | |||
| 7ec16b90e3 | |||
| fcfb6efda7 | |||
| e4c72c98d1 | |||
| c2bbda542a | |||
| 2c12393c78 | |||
| 4e93f6ebac | |||
| d10ba9f773 | |||
| a0bf7db118 | |||
| e40e7cc41c | |||
| f616655f4c | |||
| 4ba708631e | |||
| b9c1bc0f42 | |||
| 215ade01a3 | |||
| 4d25418fc8 | |||
| 4539bac5db | |||
| eb196613e7 | |||
| 7ac788f589 | |||
| 55119458af | |||
| 3c18add1fc | |||
| 6bf63b7166 | |||
| 32df2d3e34 | |||
| 97c7859db5 | |||
| 492f9c7baa | |||
| e0c0595796 | |||
| 40b8fb88a8 | |||
| b0df0d72df | |||
| 1053add1d9 | |||
| f1fc0e5fae | |||
| a192c6ce1f | |||
| e8aec0b68c | |||
| d9667f9757 | |||
| 3a985da120 | |||
| a88f84ddac | |||
| 6525d7210f | |||
| 6b93311ce5 | |||
| 999561ffd6 | |||
| e539c1205f | |||
| 9a52a538cb | |||
| e8038a8e88 | |||
| 1045b314b6 | |||
| 1636732521 | |||
| daa9a5f3fa | |||
| 9bf3973215 | |||
| cad2a20cdf | |||
| 82a5a68e6c | |||
| 0e1a580a86 | |||
| c09f3fc4b9 | |||
| d4d7c4e222 | |||
| 14429c5b05 | |||
| 131e33c6af | |||
| 8a04e5fbc4 | |||
| 1b6435a7dc | |||
| b8eecab45f | |||
| a55cb60542 | |||
| f7259409a2 | |||
| 0ea9e68c7c | |||
| 4b72e0a664 | |||
| f4ae62e02d | |||
| 935377a941 | |||
| 3690aacb66 | |||
| b8b375a19a | |||
| 69d2e14438 | |||
| fec77a9e75 | |||
| f0171cbb18 | |||
| fe49aeb815 | |||
| 8416f36581 | |||
| b9f3bfd2e2 | |||
| 02b22e9e26 | |||
| f43f08012d | |||
| 1c27610e8d | |||
| 148caf6225 | |||
| b24e4503bc | |||
| 58378827d4 | |||
| 502f14c7be | |||
| ded2d19672 | |||
| 6116f05625 | |||
| 1e2a9cf4f2 | |||
| 1d7775f25b | |||
| 05c7a5a6db | |||
| c3500e39fd | |||
| 23169c6fea | |||
| f2fddc75c6 | |||
| f542e9dcfc | |||
| 6737a7e0d0 | |||
| e9c17c55da | |||
| f334bf4b19 | |||
| f2139949de | |||
| 48314b2c7f | |||
| 8804844281 | |||
| 3a21d29568 | |||
| b6a08e242d | |||
| 596235d34b | |||
| 254fbaccea | |||
| 69c07a30a7 | |||
| 6283ff934d | |||
| db231faca0 | |||
| a3dd0394d2 | |||
| f9fd73fc7e | |||
| 0931936b3c | |||
| b91b49c8fa | |||
| b0a0050201 | |||
| 1c780a639f | |||
| ad6ac4dedd | |||
| 8ba33f524b | |||
| 2f5b25d6ab | |||
| 44eef53a03 | |||
| 08388f739c | |||
| 1d8175b88f | |||
| 1400ec5a4b | |||
| e5f61ec95e | |||
| 7c669cca19 | |||
| 81f8bd1a9b | |||
| c4c819c513 | |||
| 03332b3cd9 | |||
| ebc864736d | |||
| af86ec1ca3 | |||
| d1d9915953 | |||
| c663bfe464 | |||
| 1bb7dd152a | |||
| a52000fc97 | |||
| 88b7fbf55c | |||
| f9449f7742 | |||
| 9d2b8c4830 | |||
| 4068e23556 | |||
| fc760af338 | |||
| c55ab7cc75 | |||
| 00c9b3e2b9 | |||
| 47074c588d | |||
| 018d1bbead | |||
| 82713572ab | |||
| 34d06235f4 | |||
| 468488c384 | |||
| ff4b387acf | |||
| 20012c7678 | |||
| 382160f2fc | |||
| 761e578faf | |||
| 7b7cbebc75 | |||
| dbc5ebf098 | |||
| c5d61b685b | |||
| f3acca4b4b | |||
| b92c4191f9 | |||
| 5b6f2696d2 | |||
| 625df85b51 | |||
| 6716d38a40 | |||
| 84d574906d | |||
| 3c760c3136 | |||
| bf28236d0d | |||
| 6d71a553be | |||
| fed5598294 | |||
| 02351113e1 | |||
| a07edeb5de | |||
| 5bbc4c6232 | |||
| 770c2fe551 | |||
| 4916537977 | |||
| 77ec1649a5 | |||
| 204ff947c3 | |||
| d36fe2466a | |||
| e927da28f5 | |||
| 17b5c6e4c9 | |||
| 03f853dfef | |||
| 1d7e65b2ba | |||
| 8ebb67c925 | |||
| 8524ff27ed | |||
| 7bedc4b877 | |||
| f25c211630 | |||
| 0f4785d14f | |||
| 288add4d45 | |||
| 1ee492838c | |||
| f9ce3d1d33 | |||
| 5f6687571a | |||
| a1e5a4d48e | |||
| 6e9518631f | |||
| 88d8086853 | |||
| d22f4f11ca | |||
| 29cbe66d09 | |||
| c2410268eb | |||
| 57cd71095d | |||
| 224d2bc570 | |||
| c7f18f1085 | |||
| fb05ad32ab | |||
| bac989efd1 | |||
| 8a203ac062 | |||
| 7e1386008b | |||
| 8ff206a411 | |||
| 83a0330725 | |||
| c5269a53cf | |||
| f86b26928d | |||
| f8d77947c8 | |||
| a62ac23aeb | |||
| a900183056 | |||
| 67d34f4bfa | |||
| 507a7f3162 | |||
| 703281aa07 | |||
| aefec3e105 | |||
| 8cc211b011 | |||
| 68ec626970 | |||
| 065f338a79 | |||
| 43548c04b9 | |||
| c7c95ecfbe | |||
| 064c0dcc35 | |||
| 9a01f465d0 | |||
| 2d85a4166e | |||
| 77c598049c | |||
| c1baac3d6f | |||
| c5e30b6512 | |||
| 0fa6f43716 | |||
| edc43bdf31 | |||
| f75453bf2d | |||
| d03326a1e1 | |||
| 8be501a0ab | |||
| a4c71eb69a | |||
| 132545c655 | |||
| 5caaf0b1c6 | |||
| 8f18cc8ab2 | |||
| db976766cc | |||
| 57f6028829 | |||
| 05706ff038 | |||
| 9cf7ce276e | |||
| 0b35179ef0 | |||
| d396f92f4d | |||
| 1e78da4cfc | |||
| a8c9c331c1 | |||
| 0b2e09cf1d | |||
| f81ae23a64 | |||
| 6f90ff3391 | |||
| 4f3882f892 | |||
| 727418277f | |||
| 2f795de6ad | |||
| bb28257a2d | |||
| 379dba8b7c | |||
| 05ea165f77 | |||
| 7a61fac6b7 | |||
| 31c3e050af | |||
| 0c677f3d65 | |||
| 6efa357c19 | |||
| 3b33846f9d | |||
| 3de8463359 | |||
| e05ead7ce6 | |||
| cdc8647f21 | |||
| c2b333fac7 | |||
| cae75d9888 | |||
| ee674e6a57 | |||
| 7207a9d860 | |||
| 8cc5f685af | |||
| a61a8ccb4f | |||
| e857a2bed7 | |||
| 514303d053 | |||
| 7d4f511a5d | |||
| 9b11e8b098 | |||
| 8351905cee | |||
| 15b7a07963 | |||
| ef1c53d330 | |||
| 9bcb871132 | |||
| 25a4b9c97b | |||
| a21fbd6802 | |||
| c7249ab27f | |||
| 450d37161b | |||
| ee46a77684 | |||
| 3b7e3c9258 | |||
| 783ad9f2de | |||
| 78571f6c23 | |||
| a5c0b9bfb1 | |||
| 5047e64f3b | |||
| d115e4092f | |||
| e7a1c2c6eb | |||
| 85f95ba4b9 | |||
| 133013dfde | |||
| 6acdc34e10 | |||
| 19304920d1 | |||
| 13b3eed5ed | |||
| d9c1c7e051 | |||
| 2d0b17e334 | |||
| 384381cebc | |||
| 16d830baf4 | |||
| efcfaf95e8 | |||
| 606f7d2d44 | |||
| 357c14b6d4 | |||
| c5a2b72b39 | |||
| dab9e4bb16 | |||
| 27b6cb3293 | |||
| 058b0c4f23 | |||
| 05c62bbdf3 | |||
| 425bd81f08 | |||
| 096102fa59 | |||
| c612320a65 | |||
| e0b60a6956 | |||
| 16a0846248 | |||
| 71e1b28f47 | |||
| 182f5f378e | |||
| 9d3f4b2300 | |||
| ab3d385c61 | |||
| 8d194b78a1 | |||
| b8e726a7be | |||
| dfd2d49e6c | |||
| fbe0c18315 | |||
| ec6ea72069 | |||
| 2accdeac3b | |||
| 63f4b6fbb6 | |||
| 642caddae8 | |||
| dac09bd1e1 | |||
| c6e3af5d3b | |||
| 183fb80077 | |||
| 63c3337938 | |||
| 0268298f2b | |||
| 32ea01784c | |||
| 8e4a2c6359 | |||
| 71041fea9f | |||
| 8b25a7a869 | |||
| dd20d79236 | |||
| 299a68e0bd | |||
| 9ad27d2cf0 | |||
| 828115e5b0 | |||
| 461a005cfa | |||
| 24cfd661ef | |||
| 6481ac7e13 | |||
| a194af0d19 | |||
| c0d240728d | |||
| 89c0f03318 | |||
| bc1c9f455c | |||
| df1a5f38c1 | |||
| 6559c76fbd | |||
| a7db14811f | |||
| abffa3e75f | |||
| 631f70148f | |||
| c7e7c9c19d | |||
| f2d4eb2a42 | |||
| 778cb91317 | |||
| beb9885b03 | |||
| 65e34e52f9 | |||
| b453aa19f0 | |||
| 600570f7c7 | |||
| 20f28afec1 | |||
| 2768ca5f6c | |||
| 7841822c54 | |||
| f3e24a8b5e | |||
| 2425898cc8 | |||
| 8d85281be8 | |||
| 081d704a8b | |||
| d3b962dcb8 | |||
| 2949d24b49 | |||
| 2f0d783ba6 | |||
| 644d9b8ba6 | |||
| 7184928a6c | |||
| 2d7df99daf | |||
| 5339b60226 | |||
| 5e0f54be68 | |||
| 3cee92d3a3 | |||
| 77c6715481 | |||
| 95ea50210f | |||
| d3639d1697 | |||
| 40016395a8 | |||
| b6c0bf4db0 | |||
| 3be5035ab3 | |||
| ad9d627c82 | |||
| a26a559921 | |||
| cf2f60f8cd | |||
| 80e1be2261 | |||
| a3e84f50fa | |||
| 796433cf8a | |||
| 7309d942d6 | |||
| b5c90ee7d5 | |||
| 8688ef1db5 | |||
| 56a4f6073d | |||
| 6d67b740b6 | |||
| e97fe56914 | |||
| 946819926f | |||
| e89b6040fb | |||
| d673fd86e0 | |||
| 901b2a83fa | |||
| 08119d7458 | |||
| d1fee87d8d | |||
| 83cefae85b | |||
| f1a64c92d2 | |||
| 8f2c2f96d2 | |||
| f9dbe89fd9 | |||
| c3a4c0a66b | |||
| cb583e48e3 | |||
| c3878a9431 | |||
| 50821067d7 | |||
| 18bd45e4ab | |||
| 79aac3ccd6 | |||
| fac436f5e6 | |||
| a4600b31a6 | |||
| b52196ec91 | |||
| 2314e74ade | |||
| 59801951e6 | |||
| 3233e257cb | |||
| 6b4f56373e | |||
| cd1a312aba | |||
| 8cd0297917 | |||
| 4568dcfdce | |||
| ace2677062 | |||
| d3cd62f5ae | |||
| c7cd0ba828 | |||
| 5cb3267660 | |||
| 1a2c68abe8 | |||
| cbaebe50c0 | |||
| c8aac65af6 | |||
| 5f8e9370a7 | |||
| 7fd0882c06 | |||
| c6a8cd0ff1 | |||
| 73797dcf31 | |||
| 19ebecd4d0 | |||
| bee95b4e6a | |||
| 4418d8e5d5 | |||
| 873267a784 | |||
| 605028151f | |||
| 2429668b57 | |||
| 5ecb4226e8 | |||
| 7f4165f958 | |||
| 7cd7f1bf66 | |||
| 608c21c60b | |||
| f44af24267 | |||
| be7a1e8ab2 | |||
| 9bab8edc3c | |||
| 4d852a23cd | |||
| a497401b30 | |||
| 94cb70c0db | |||
| 8e60c60e46 | |||
| 1cd275188b | |||
| edd423cd87 | |||
| e026a7027b | |||
| 70836bb67d | |||
| 0de0b172c0 | |||
| adc549bf7e | |||
| 8de69d18cb | |||
| 11e8f40f8c | |||
| bf18854ec0 | |||
| 08d1080527 | |||
| 9ca242fe82 | |||
| b3c02a5afd | |||
| ec65ebbfb8 | |||
| 8544974202 | |||
| 90eeae5334 | |||
| 970cfa6dd0 | |||
| f04a26a0f4 | |||
| 02eceb6565 | |||
| 53a58e2666 | |||
| f5371db950 | |||
| 0ab0762aa5 | |||
| 64f82872b3 | |||
| 7ff4c65a91 | |||
| f272654532 | |||
| 39e7cea624 | |||
| b36f96f9c8 | |||
| 8b3b3268bf | |||
| 5d2abdb634 | |||
| 3556073f5c | |||
| b724366c33 | |||
| aeff6a4e9e | |||
| 97dad58428 | |||
| 2ce861d39b | |||
| 9d21924160 | |||
| 48239b29aa | |||
| b2545c6289 | |||
| c7907e13be | |||
| 7bea2f6e49 | |||
| 4b79d778de | |||
| 1fe0769a2c | |||
| e25f27c304 | |||
| ed22141a63 | |||
| 589e59c13c | |||
| 1e6585e324 | |||
| 3b283d6e80 | |||
| 15576a53a5 | |||
| 2e812c4584 | |||
| c578099c03 | |||
| 35ab4b678d | |||
| 4446196919 | |||
| 90a6514b6e | |||
| 693941a949 | |||
| e5cbac6d89 | |||
| 43d60f2adc | |||
| 4aeef2b873 | |||
| 60c03c1403 | |||
| a82258269a | |||
| b9654f722e | |||
| 0f82f8bc30 | |||
| c20bf3a527 | |||
| a597c37684 | |||
| 5206171a70 | |||
| 4ebe9b5832 | |||
| 3a11a42f9e | |||
| 841fd9f27f | |||
| 79326160a6 | |||
| 6112ff4d02 | |||
| f84a031581 | |||
| 375d916fe2 | |||
| a9e2df73ca | |||
| fd456f59e8 | |||
| d4f4b2bd95 | |||
| 35afb7a8fe | |||
| 8d1c4d8042 | |||
| b969944ede | |||
| da7450c732 | |||
| 1db5e865a6 | |||
| 34b066f846 | |||
| 9e9f177508 | |||
| 1392a567d7 | |||
| 8ed261dabc | |||
| 27982b0aa6 | |||
| 08edfca9b0 | |||
| a4122c1393 | |||
| a412f3f591 | |||
| 01132d78c2 | |||
| b61e7574bb | |||
| f148233e64 | |||
| 92a322f2a7 | |||
| 689ac66bba | |||
| 6dbbcd7c99 | |||
| 0b0919568c | |||
| c3774d8cb6 | |||
| 8b965a657d | |||
| 1e72167e7d | |||
| 67c1922698 | |||
| f978efd88f | |||
| e3304792c4 | |||
| ffa883644a | |||
| c2dd09ccdb | |||
| 17f54c133a | |||
| 971cf5745e | |||
| e3c6bfdd1c | |||
| 1b6d08e9bb | |||
| 6168691469 | |||
| c464064837 | |||
| 35f6b2bdfa | |||
| a1f26cb828 | |||
| bb9411a82c | |||
| e2a04ffb89 | |||
| 1463e88024 | |||
| b965ec08aa | |||
| 347dc710ea | |||
| 418a7a2712 | |||
| f40d8a4a64 | |||
| bee5e4724b | |||
| e1753a154d | |||
| 7327c4bfc2 | |||
| 45afbe3f56 | |||
| 83efab84ad | |||
| 8da151ff7c | |||
| 7fbcdb1d7f | |||
| 69ac7771d5 | |||
| 04f5cac85d | |||
| ce18f76698 | |||
| f542048aeb | |||
| 222749da15 | |||
| d64a2b3a47 | |||
| 110dc6808b | |||
| 75329fa198 | |||
| 7083e8f973 | |||
| c196360933 | |||
| 8abd7e69a9 | |||
| ccdd2a4cdc | |||
| 7e06add085 | |||
| 9193cf1d4b | |||
| d6bddd86f3 | |||
| 5a95fb26d4 | |||
| 3ab0f5fc7a | |||
| 42859d7a28 | |||
| d3581658b7 | |||
| 7027970b65 | |||
| 8774286d8e | |||
| 33140a2ca6 | |||
| f0087361b6 | |||
| 4f07072824 | |||
| ce0231f5f2 | |||
| 774a9fd209 | |||
| 24d138fdb5 | |||
| 53357938d2 | |||
| 09628fc5e9 | |||
| 62bc35de61 | |||
| 9fce208ce3 | |||
| 2942324696 | |||
| 07fda35106 | |||
| d8e229df2c | |||
| 5b3f62a011 | |||
| 3639e9706f | |||
| a7ccb0b8ca | |||
| b1a00854de | |||
| a546f1a1f4 | |||
| 7a6afed510 | |||
| 07e2d7f3f1 | |||
| 344f5e1652 | |||
| 2ef34bc769 | |||
| 43783ba4a6 | |||
| fbada5f99a | |||
| 093fadaf74 | |||
| 463d85d222 | |||
| fbc2941dae | |||
| 28e2f61dc4 | |||
| e165c695fb | |||
| b979f667f2 | |||
| 29f2d63b32 | |||
| 75f4e80b54 | |||
| 9ba69f6aef | |||
| 1749ae6a52 | |||
| 873a9a386b | |||
| ece446d191 | |||
| f0a86d924f | |||
| 90c4d54460 | |||
| f897d9194f | |||
| cfa859a65f | |||
| ade7d05270 | |||
| 6a75f23020 | |||
| 9baa4c59b3 | |||
| 1ef88d1f6d | |||
| 92b1972f2b | |||
| e0c69705bb | |||
| d4e841468a | |||
| fdcc6e24db | |||
| 37712e31e6 | |||
| 3142b86d9e | |||
| f12ead863f | |||
| 3df2773867 | |||
| 2d51ddde3d | |||
| d5f5079c22 | |||
| df7598956e | |||
| efbde68bf8 | |||
| 17f254db48 | |||
| 6a16c85acb | |||
| f5f0ce4e06 | |||
| beb66bf818 | |||
| f709b20590 | |||
| c99f189af3 | |||
| fd110429d3 | |||
| 4b7a04834b | |||
| c1a76cf652 | |||
| ed8296bd34 | |||
| d0df3c5420 | |||
| ca47ac870d | |||
| 78f24a06f1 | |||
| 9cd4591987 | |||
| 563e02a5ba | |||
| 41daabbe0c | |||
| 6b8708ca50 | |||
| b2980b5749 | |||
| 8e2f6b8003 | |||
| 239f0e2528 | |||
| 38cf6c333d | |||
| c28ded60a0 | |||
| 8858128f34 | |||
| fdca204790 | |||
| 606eee6903 | |||
| b2df1f5a96 | |||
| 61abb4d809 | |||
| b58f33dddf | |||
| e3353fd778 | |||
| c6ba3709aa | |||
| 2205e6252e | |||
| 68f950aac5 | |||
| 05215ffd4b | |||
| e0463ccd17 | |||
| 038c74664a | |||
| 582a0d0612 | |||
| d1903e4354 | |||
| f9bb10c3df | |||
| e5fb3f4c6f | |||
| 0ce61cc07b | |||
| 183e737847 | |||
| 12a72795ff | |||
| 2dc7b761b2 | |||
| 2a898a8e8d | |||
| 44fc7a8215 | |||
| af16f147ba | |||
| c52dbdde4e | |||
| ab82be9b3d | |||
| 0ae02d8af9 | |||
| 293fbb4802 | |||
| 65f5f6c25e | |||
| ca92b12bd3 | |||
| 1178ee7e85 | |||
| aeaf3dee06 | |||
| 76100c7c02 | |||
| 92f601f702 | |||
| af1d06f47c | |||
| 2c03521148 | |||
| 9e34ed7f67 | |||
| eee6246d0c | |||
| 36513d3544 | |||
| fafc3d3d4f | |||
| c1e4abf362 | |||
| 06c1c1bf21 | |||
| 24a2e0bd14 | |||
| 05cd67a2f1 | |||
| 6f691b6b9f | |||
| 85e3f83d84 | |||
| b00a4dba31 | |||
| 3d12d3c38c | |||
| 5d0f190dc8 | |||
| 2782f8f9bd | |||
| 54ed6d8913 | |||
| 75e14c9452 | |||
| e1b800aa69 | |||
| 4e69a7dfa5 | |||
| 61cbba05f3 | |||
| ab03bb5490 | |||
| 1deeade91e | |||
| 417bd3b9f2 | |||
| c3fa000cea | |||
| f8484cfe0e | |||
| b396419d05 | |||
| 2d4490e21a | |||
| 61295628de | |||
| 90c7a8440e | |||
| 40eada3a17 | |||
| 66d977abaf | |||
| e259b303be | |||
| 4d091e892e | |||
| 34bc5d53ee | |||
| 3b514b7f5f | |||
| ee0c1571f6 | |||
| ba5a4e64f5 | |||
| 500f93deb8 | |||
| b732f6e8cc | |||
| a815d30725 | |||
| c38c3ab0d6 | |||
| b9e70b913a | |||
| 31cd3c2dad | |||
| 2082d24132 | |||
| cdf629e863 | |||
| 6b8623795d | |||
| 38e32a69f8 | |||
| 3180d00b2d | |||
| 9d3f4731d6 | |||
| f44659ac7c | |||
| badc6644c2 | |||
| 3bf8d72454 | |||
| aebcbe058e | |||
| 15de3e414f | |||
| f3718a0f44 | |||
| 6227d9c965 | |||
| 90e7922d7c | |||
| e3f42fffba | |||
| 6ea3293a96 | |||
| b36668468e | |||
| 5c3c0b4361 | |||
| a9b82a299a | |||
| 07d11f0bae | |||
| 60992ecb38 | |||
| af4cfa8074 | |||
| 922143bf37 | |||
| 6d0312feee | |||
| d876e04b9e | |||
| 9295d83609 | |||
| 6c022134d0 | |||
| 97fc45a15c | |||
| 487adb11a7 | |||
| c052bbae31 | |||
| 667ff98142 | |||
| 304d628dbe | |||
| 50b9aa4296 | |||
| 76dd0b6d7b | |||
| 25ccda7e89 | |||
| b3dd5bc15d | |||
| 57144dfd61 | |||
| 62b880e02d | |||
| 46961db654 | |||
| 4790aa074e | |||
| 0392ffbc9a | |||
| b6b980de92 | |||
| a56bb0ddac | |||
| 06e93c5b0f | |||
| d75bcb85c9 | |||
| c1bd8458fb | |||
| bd2a94176e | |||
| c16359b1c0 | |||
| 73f7b31bfa | |||
| 2ea4dbf289 | |||
| cb54ca9821 | |||
| 0278fd05e2 | |||
| 511301260b | |||
| 0e454c8def | |||
| 334f60cdac | |||
| 6b54e18aad | |||
| d0977de4ca | |||
| d38b1afe34 | |||
| bdb2cfd2a7 | |||
| 8f95634af5 | |||
| faac6d58e6 | |||
| 771cc25c18 | |||
| fecc69a00e | |||
| 22cf4c7c24 | |||
| c780ed127c | |||
| 9cea54a949 | |||
| 4d3059ffa0 | |||
| 22179d6c4f | |||
| 9dd43e892b | |||
| 675511fb0e | |||
| bfc7ee2ad6 | |||
| c03e4f3896 | |||
| f23f0bd3d3 | |||
| f451a7032d | |||
| 85255d878e | |||
| 312209cd5a | |||
| fa346a0c27 | |||
| 74d01268e7 | |||
| e57d6d0495 | |||
| 2809fc5408 | |||
| c391683cb3 | |||
| 0d276a5141 | |||
| 138673fc80 | |||
| 18ad1fa8c6 | |||
| 7606f5f9bd | |||
| 16a3578c15 | |||
| 3bb3f6e878 | |||
| 942c455af8 | |||
| 12f88044b7 | |||
| 0e0eea3ebd | |||
| b5ef247245 | |||
| 5645a0fc2c | |||
| f183f8fc30 | |||
| 6898f65fd7 | |||
| 99a7c667b3 | |||
| 69c16e0441 | |||
| f691ac8069 | |||
| 48ce83c494 | |||
| 0309203b72 | |||
| a2b10800fc | |||
| 06a48dcd4a | |||
| a9a48d5816 | |||
| 7204c49b85 | |||
| c39aacbc6c | |||
| 0dec9d930d | |||
| da92bf531d | |||
| 22ca55b4c3 | |||
| f42480dfd2 | |||
| a655bf002a | |||
| d55e9beabe | |||
| a852056e87 | |||
| f908bba727 | |||
| c679f7ddd3 | |||
| ebdd865f73 | |||
| 2132798ee3 | |||
| 9ff5523631 | |||
| 6d44c1d2de | |||
| 49a9f10972 | |||
| b6cb5150dd | |||
| 0b0cdd395c | |||
| 667b9abc0d | |||
| e34cdf0098 | |||
| d8590783d8 | |||
| ba9d927fc0 | |||
| 8f5797cd72 | |||
| 3706659949 | |||
| e321503dca | |||
| 4d64347fb9 | |||
| bfb202dd4f | |||
| 495435c8ff | |||
| 5928ed1756 | |||
| 9125aca0ae | |||
| 15bba720d4 | |||
| 1364654e2b | |||
| fac010d4bd | |||
| 82adaf6ad0 | |||
| 8d34ff2ed2 | |||
| fb38127ebc | |||
| 27093c5c7a | |||
| a2116bf3f7 | |||
| 1a825b9f17 | |||
| 0ba090e5ba | |||
| fe803efd35 | |||
| f2714cb554 | |||
| 0997d2fef5 | |||
| 56a65a9f3e | |||
| 026237d286 | |||
| beaffd40de | |||
| 592d8addc2 | |||
| 6a1ecf8d0b | |||
| aff257ac8d | |||
| 47478fc3c5 | |||
| 4ec3b7fb58 | |||
| 03635575ab | |||
| 389023cefb | |||
| 1c5b0df480 | |||
| 5f14f206bb | |||
| 3bcfc0e714 | |||
| 2e2a45266d | |||
| c48039970a | |||
| 1c8b4442d3 | |||
| ea47d65231 | |||
| 487c54e471 | |||
| b417633c3f | |||
| 9332035b33 | |||
| f2bc452196 | |||
| d3c89ba6cf | |||
| 2f7a2bd545 | |||
| 55f7adcdc7 | |||
| b5cb5d864b | |||
| d9d0147990 | |||
| f0fef85852 | |||
| d8d068d260 | |||
| 9db75e7f4e | |||
| 72ec12d297 | |||
| 6ea6e35d54 | |||
| ac4ef8fca5 | |||
| b94225e3e1 | |||
| cfec08c9d1 | |||
| dbf0d8bd67 | |||
| 5dedcedb60 | |||
| 0dcdad7dad | |||
| 4fa5b7d864 | |||
| a85ea5c551 | |||
| 492b8b6c81 | |||
| a899483e5c | |||
| 7d766da6f0 | |||
| 1f7b085455 | |||
| d6db3cae2b | |||
| c89fa0e869 | |||
| 83395efc2b | |||
| e51b331736 | |||
| 7ed7263bc3 | |||
| 376de19dae | |||
| 71a70f335e | |||
| 388e473e3f | |||
| e3c5f2008b | |||
| 8751461695 | |||
| 2277c060bb | |||
| ef064992f2 | |||
| e71acd9947 | |||
| f22c698cb6 | |||
| f788379eb5 | |||
| 6eaa948d3a | |||
| b8af9b7d95 | |||
| 56ec61ff43 | |||
| c46028c026 | |||
| 77c9817dba | |||
| ebc6a8a344 | |||
| 22d71b8923 | |||
| 3bd85fd747 | |||
| 9f5c4b479b | |||
| 8a0a1d3a42 | |||
| 9d46cb6b4e | |||
| 243b9daafc | |||
| 54565a4848 | |||
| 18d2a7f511 | |||
| ab5163f237 | |||
| 8ab2ba4edc | |||
| 4996de1aea | |||
| 5e6d45cfd0 | |||
| b67bc6164a | |||
| 0a909ed4f7 | |||
| f55bbab827 | |||
| 193b0aeb80 | |||
| abe807f288 | |||
| db8d816660 | |||
| 1aa00012bf | |||
| 4f44082456 | |||
| 578ecec9af | |||
| 25804d0c0a | |||
| 6b27f4c221 | |||
| bfa0984daf | |||
| b4d19b2f1e | |||
| ce4a6ec67e | |||
| ba172dd5d4 | |||
| 1fb48547ed | |||
| 7884f3c64c | |||
| 4f2d7f0a3f | |||
| d4e984e6b3 | |||
| 93df5adba2 | |||
| 87089d3fd1 | |||
| 8ca58370e9 | |||
| 599da25503 | |||
| 1bfe1b383b | |||
| 0645fba83d | |||
| 7dade2ff46 | |||
| d2b5335de9 | |||
| 4a617b516b | |||
| f4331cbd0a | |||
| 3665ead0b7 | |||
| 1baf3617b0 | |||
| 367629d01f | |||
| 76b4693a54 | |||
| f54e505aad | |||
| c8b17785e7 | |||
| d8452548f0 | |||
| 1dda4bbe5e | |||
| 899df4f39f | |||
| c416712ac3 | |||
| b5b7cd91c4 | |||
| e8c17005bb | |||
| 53ec97b0c8 | |||
| 0646e25240 | |||
| e7445dbc46 | |||
| 42b24e4307 | |||
| 1ba0577521 | |||
| 3335a135a0 | |||
| c2a75b3e28 | |||
| 4e2fe9e607 | |||
| 3eb2061b9f | |||
| fcdcefe662 | |||
| 8aa32308c0 | |||
| 94beb67552 | |||
| 3c1eab070d | |||
| 714b514f66 | |||
| 89e6ac8571 | |||
| 988e336f43 | |||
| 9f9ac0c30d | |||
| 9ab94ee9c3 | |||
| fe02c4914c | |||
| 82981d3ce2 | |||
| 879d8f64fb | |||
| 6870923b94 | |||
| 7d5c90e9cf | |||
| b541936473 | |||
| a2e59cf705 | |||
| dc074d4baf | |||
| 1cf5b1eea5 | |||
| 2635306e2e | |||
| f0cc80fd53 | |||
| c9f58e3ca6 | |||
| 821e481734 | |||
| f0309615d6 | |||
| 47588d135e | |||
| 8e6ae3b915 | |||
| 8fc9d6125c | |||
| b427594248 | |||
| 5c43308e14 | |||
| c5b67b4b00 | |||
| 8442def83c | |||
| 2cb91eb8d5 | |||
| cf82b0ffc9 | |||
| ffcf787f94 | |||
| ce2714c684 | |||
| 4ccd78053f | |||
| 7602183cf9 | |||
| 1a6744a814 | |||
| 6a89a073fa | |||
| 353119145c | |||
| 0aaaedc4d6 | |||
| 246ddc9f9c | |||
| 3e8b6aaffa | |||
| c95439c0db | |||
| 62873e4ce4 | |||
| e04155e7ad | |||
| 733f798968 | |||
| f7f0a07239 | |||
| ee79e02c54 | |||
| d8afda9b56 | |||
| 0569dc7271 | |||
| fef62baa2b | |||
| be82ae7078 | |||
| 0a4fcc0cdc | |||
| 823374e2fe | |||
| 3b89aae808 | |||
| cc488187b4 | |||
| 0e191eed91 | |||
| 6d27c1866b | |||
| 845b111a85 | |||
| 79d12ecd02 | |||
| 61c388a7af | |||
| c6deb13712 | |||
| 13250e18b3 | |||
| 7d373fa1a9 | |||
| 8af2607e62 | |||
| c2db28fbcf | |||
| 212fd26807 | |||
| c9ef51a361 | |||
| f25e4ea614 | |||
| e4eb8366bd | |||
| bcfa08b43c | |||
| 193238fbdb | |||
| 37e36f7fef | |||
| ec90b2ff98 | |||
| 758f0c08e5 | |||
| b76c532569 | |||
| 856613d644 | |||
| 75c11f4ee8 | |||
| 1e023e58b2 | |||
| f9f757bd0d | |||
| a213b635f2 | |||
| 96d6c521ef | |||
| 7d2469cfe9 | |||
| 2f7352c296 | |||
| 6ec262e221 | |||
| 5fdbd2954b | |||
| 758291fd71 | |||
| 2a856c6919 | |||
| d075855065 | |||
| f026d0ef60 | |||
| 2ec0a3798d | |||
| 506b55a201 | |||
| 90dd2c837f | |||
| 75d828a6ae | |||
| fe3b5558df | |||
| 3d49eabaf0 | |||
| 51f712b900 | |||
| a565da4035 | |||
| 7db6983167 | |||
| b7262ff874 | |||
| 50921b278b | |||
| 9d16bee672 | |||
| 1a63a7f65f | |||
| 4ba7b3f02e | |||
| f8f15d2191 | |||
| 2b217de9b4 | |||
| 6f64d40e5d | |||
| 620a097faa | |||
| 9759839cd0 | |||
| e6ee57e09b | |||
| 50daec31b4 | |||
| bcd114d089 | |||
| 49592f66bf | |||
| e854b78884 | |||
| 4dd5f9d9f6 | |||
| abee34981b | |||
| 768f45f4fb | |||
| c3bb70aa9a | |||
| e53dac1e2b | |||
| 71ab72299a | |||
| eb4e6b4bc0 | |||
| 4f02a4957f | |||
| 469c2b6ced | |||
| 8b9a2d2481 | |||
| e921c936b8 | |||
| a5929897ad | |||
| 00a1c64353 | |||
| 6c18acdf97 | |||
| c0f459132e | |||
| d780a61e52 | |||
| 361b8bd0f4 | |||
| 48694f0f31 | |||
| 9ed7b0e96e | |||
| a2a094a22c | |||
| 9d9afce3ce | |||
| bb19ea1a6f | |||
| d667a62a24 | |||
| a92907135d | |||
| 71fde6f7b9 | |||
| 9ac78b77dc | |||
| dae246e8a2 | |||
| 7f95d59394 | |||
| 7bfa4229de | |||
| 1c6c45606b | |||
| 1c0a742f54 | |||
| 4eb4753c01 | |||
| 979f001fd0 | |||
| d0edb368ac | |||
| ac36df16d1 | |||
| e845cc498b | |||
| 606ce23228 | |||
| dcd4adf5ad | |||
| 6e81fa8996 | |||
| 15580ee144 | |||
| 422bb36b53 | |||
| e74811a755 | |||
| 4c987fbfce | |||
| e90ba356fe | |||
| 54c6025bc5 | |||
| b867d75bac | |||
| 2748dbf5b3 | |||
| 8b5aab3c63 | |||
| ee23e7948e | |||
| badcd6e110 | |||
| 53e1fbe9ef | |||
| c28e12e31e | |||
| b94704adf8 | |||
| 255ec7afe9 | |||
| 7996ea4825 | |||
| 1fc1fb2b76 | |||
| 267fe7d260 | |||
| b8f5485201 | |||
| d19eaf0ef4 | |||
| 9ee379e8df | |||
| a4b75554bd | |||
| 854f5e7045 | |||
| 8cf4eb2fc2 | |||
| eba3f15587 | |||
| 3f52fd5563 | |||
| b439a5f729 | |||
| 848229f79c | |||
| 491f600dc0 | |||
| 38055f0b85 | |||
| 0e3c759806 | |||
| 6427db4ea6 | |||
| d624cdf0f6 | |||
| 930338f5fc | |||
| 0875ca8d89 | |||
| 193bbe2cb7 | |||
| 533ee1af91 | |||
| db0339d4e4 | |||
| 1a46b8a215 | |||
| 022f1bb16d | |||
| c01afdec17 | |||
| b2ee170ecb | |||
| a104aa6c61 | |||
| 3f13590f55 | |||
| aa7132e467 | |||
| 60ddcb433c | |||
| 14840847bf | |||
| 06cf08822b | |||
| c4e2921040 | |||
| ea455421f7 | |||
| 90abe267bf | |||
| 4e2a5fb175 | |||
| c54b760526 | |||
| a92963aed1 | |||
| feee808453 | |||
| d19ee9d4c1 | |||
| 1a7fbe656b | |||
| 500be4f8e4 | |||
| c96659ed9c | |||
| 1b2cec44ac | |||
| ecfe99f7ed | |||
| 81450a883f | |||
| fec328ad9d | |||
| b197f4c258 | |||
| 0b03093c53 | |||
| 3bf8952b1a | |||
| 23b42ed070 | |||
| 25906383e2 | |||
| 1de2571c1b | |||
| c597e914a9 | |||
| a2c0527882 | |||
| a7f7b3ebf7 | |||
| 95dfc9796d | |||
| 125d9a2ab4 | |||
| 4dd4453599 | |||
| 7e2d83f04e | |||
| b7d2775733 | |||
| aa5f1e3df4 | |||
| 4193089de4 | |||
| 18a4dc20eb | |||
| 7ced0591bd | |||
| a010088395 | |||
| d5a6c1e605 | |||
| ab68d95f5d | |||
| 301775aafd | |||
| b7bda80f48 | |||
| 51c180726c | |||
| aee637b980 | |||
| 63af540fe8 | |||
| 2819cbc5e3 | |||
| 02db6fa76a | |||
| 1feb56e397 | |||
| 502f001cfa | |||
| 7c10a0fe82 | |||
| aa16df8de7 | |||
| bbff0206c1 | |||
| e08e6f5f27 | |||
| 38cc631e2e | |||
| 6250902a55 | |||
| 7b017c15f8 | |||
| b21d179f4b | |||
| c75f9166c5 | |||
| 0f2695fba0 | |||
| aca8e94f2a | |||
| 9876e745e5 | |||
| eb8cf75bc0 | |||
| 62060d2538 | |||
| 0ad9907eb6 | |||
| 2090bad807 | |||
| 2368354c6d | |||
| 31337cc9c9 | |||
| 17cad4a0dc | |||
| 539023bd25 | |||
| 0ada5484bb | |||
| b4e4a7ba53 | |||
| 48fa83b850 | |||
| 2017c45c19 | |||
| 74505f5c44 | |||
| 6f6e80cf68 | |||
| d5a8cdc760 | |||
| ca5ba06506 | |||
| 720c61c7b7 | |||
| 6e03e71b59 | |||
| ea22efdac8 | |||
| 5521cd44dd | |||
| 773aa62478 | |||
| 280d9e3dba | |||
| ee5fe30010 | |||
| c0b520e440 | |||
| fd95aca32b | |||
| 791f2b53a9 | |||
| 02ee872d4c | |||
| a76ec17e70 | |||
| 9591995b9c | |||
| 9f806aa48a | |||
| 85dd8f8b77 | |||
| e91beb5518 | |||
| 39fbf43019 | |||
| 74af4cf734 | |||
| e8eb607325 | |||
| cefcba3b04 | |||
| fb4bc9c38e | |||
| cb245efbb2 | |||
| 0a2056b1b1 | |||
| 974840bbac | |||
| be5f6e3a6e | |||
| 19debed4d1 | |||
| 4903c017f4 | |||
| 6c3f31c32a | |||
| 73d79c1f61 | |||
| 65b4e453a4 | |||
| 157e6d3121 | |||
| d62a760439 | |||
| 4ef5f7d290 | |||
| 9b7d54fdfb | |||
| 4e17421c7e | |||
| 2b4513d68b | |||
| 47c0b04de1 | |||
| ee077978b9 | |||
| 1dc5e67da6 | |||
| cf4dd454f6 | |||
| 858b437e80 | |||
| 0512243be0 | |||
| ba3b3b4ce6 | |||
| e79cb3c3f3 | |||
| ddb31bd4e8 | |||
| 57e813d0ce | |||
| 1d24a4a309 | |||
| fe7e7640b5 | |||
| 7a7503be6a | |||
| 651e161680 | |||
| 67b93909ac | |||
| 2e3fd4725a | |||
| 17f651c47a | |||
| 928cc7480a | |||
| bf8e59ddee | |||
| 986c51483d | |||
| 1ea1a3f904 | |||
| 715ab7d690 | |||
| 4c62e12822 | |||
| 951f5f9887 | |||
| 1184402f94 | |||
| 5c0d8b8dd9 | |||
| cadeb19ece | |||
| 001b9a2cf6 | |||
| 5e852e024d | |||
| 875dfaaec4 | |||
| c9def721d2 | |||
| 8050ec572a | |||
| 6918016dda | |||
| fb039100e1 | |||
| 4a6b549eaa | |||
| 3d09910cf3 | |||
| fa0aad779d | |||
| 5cefe5c3b2 | |||
| 0cf0171721 | |||
| f8a1587109 | |||
| 44142da370 | |||
| ecbae22fcc | |||
| b3a79deef8 | |||
| c4f278d58a | |||
| b0ea8ed388 | |||
| 220516c930 | |||
| 3be28877ab | |||
| b3a96f15ab | |||
| 14a68befd2 | |||
| b1af12a78d | |||
| 83bab147d0 | |||
| 80670a0d64 | |||
| 75f137470b | |||
| 870a3ee799 | |||
| c3c1689170 | |||
| a271b847d5 | |||
| 45ea1a8c1d | |||
| 1b90f16eb5 | |||
| 422429e742 | |||
| 29072e3d5c | |||
| b82c2c68d5 | |||
| 67d6eaa18b | |||
| cb91ba1620 | |||
| 0e91256847 | |||
| ce16625091 | |||
| 4d538fc35d | |||
| 36c9583a2c | |||
| 1bde1f66d3 | |||
| fddc08c24b | |||
| 06305ee262 | |||
| e55e27cee8 | |||
| 8fa77cb9ba | |||
| f038327928 | |||
| 0adaf8a84b | |||
| 85cb88b0fc | |||
| 4c8ac0457f | |||
| 3ba6072b3e | |||
| ad966cfc28 | |||
| 1f9b2b8230 | |||
| 61826dc813 | |||
| 3dc4a6d6a3 | |||
| 4de89aa858 | |||
| 8b9f07e46e | |||
| af7101844a | |||
| b58bf412fa | |||
| a1c524df00 | |||
| 710d4f4059 | |||
| be25001479 | |||
| 7466aba10f | |||
| c4fc8c85e2 | |||
| 007efef742 | |||
| a4bf9d76f6 | |||
| 7c5faa7c8a | |||
| 3497eeea9f | |||
| 7717cb35f8 | |||
| 1c59409ce2 | |||
| bd4c3543d7 | |||
| 8770526316 | |||
| 51ecf3afeb | |||
| 8887edefb3 | |||
| 7ab292bc13 | |||
| 6ab006e409 | |||
| 582ed3f61b | |||
| d06cffabfb | |||
| 5545568e04 | |||
| 6ba9b33606 | |||
| 178477f9fb | |||
| 8d657a0101 | |||
| c1454eff13 | |||
| f7867e4bc3 | |||
| f94e057492 | |||
| a5371faa27 | |||
| 34527f0b3e | |||
| b9dd792672 | |||
| 13c3164ca1 | |||
| ceed4ac712 | |||
| 6a16a9392a | |||
| 48043e5d70 | |||
| d7809b848e | |||
| d5466f1070 | |||
| f639971861 | |||
| 95ee0bf128 | |||
| 03efbf468e | |||
| 60cb77136a | |||
| d1d7d1e416 | |||
| a60e7b9b6b | |||
| 79d5682a02 | |||
| 96994fd0dc | |||
| 668a0e323a | |||
| 057d38d063 | |||
| 1ecf16085e | |||
| 945c09f5d4 | |||
| b642053bc3 | |||
| fef0179c7e | |||
| c0366c0134 | |||
| 584fb155b7 | |||
| 95a15661d0 | |||
| ca17dd1128 | |||
| e375404e25 | |||
| a58c1483b3 | |||
| 9b6e90718a | |||
| 14f8419f00 | |||
| 0899644f32 | |||
| 036c0fb19a | |||
| 5382c43ec5 | |||
| 8af7c45e7d | |||
| aa289a6d85 | |||
| b93aeebe3c | |||
| fe38ca4a08 | |||
| df74cdeb66 | |||
| 1f022f12a1 | |||
| 1217de89b3 | |||
| cd94eb0401 | |||
| 118a4d74b0 | |||
| 31c23fbf49 | |||
| 95b4556884 | |||
| 96bfe3c58a | |||
| 0f549db065 | |||
| c064b8fa57 | |||
| 490a6cd8b6 | |||
| 097a99b947 | |||
| 88fa94c090 | |||
| 507bf0098a | |||
| 9bbcdf599d | |||
| d4f07aee2a | |||
| d12897930c | |||
| 314dfb7811 | |||
| f5b4a1f78d |
31
.github/workflows/lint-java.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Lint Java
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/java
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Java 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
|
||||
- name: Run linter
|
||||
run: |
|
||||
mvn -version
|
||||
mvn package
|
||||
35
.github/workflows/lint-nodejs.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: ESLint
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/nodejs/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/nodejs/**']
|
||||
|
||||
env:
|
||||
NODE_VERSION: 16
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/nodejs
|
||||
steps:
|
||||
- name: Install NodeJS
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Code Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Code Linting
|
||||
run: npm run lint
|
||||
31
.github/workflows/lint-php.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: PHPCs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/php/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/php/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/php
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
tools: cs2pr, phpcs
|
||||
|
||||
- name: Run phpcs
|
||||
run: |
|
||||
phpcs --version
|
||||
phpcs -q --extensions=php,module,inc,install,test,profile,theme,info --ignore=node_modules,bower_components,vendor,css,js,lib --standard=./ruleset.xml ./
|
||||
40
.github/workflows/lint-python.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: PyLint
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/python/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/python/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/python
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8
|
||||
pip install pylint
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
|
||||
- name: Lint Flake8
|
||||
run: |
|
||||
flake8 ./**/*.py --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 ./**/*.py --count --max-complexity=10 --max-line-length=79 --statistics
|
||||
|
||||
- name: Lint Pylint
|
||||
run: |
|
||||
pylint ./**/*.py
|
||||
31
.github/workflows/lint-ruby.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Rubocop
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/ruby/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/ruby/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/ruby
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
bundler-cache: true
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bundle install
|
||||
- name: Rubocop
|
||||
run: |
|
||||
gem install rubocop
|
||||
rubocop
|
||||
31
.github/workflows/lint-spring.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Lint Spring
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java-spring/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java-spring/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/java-spring
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Java 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
|
||||
- name: Run linter
|
||||
run: |
|
||||
mvn -version
|
||||
mvn package
|
||||
8
.gitignore
vendored
@ -5,8 +5,12 @@
|
||||
/build/deploy
|
||||
/build/*.log
|
||||
/web/documentserver-example/nodejs/node_modules
|
||||
/web/documentserver-example/nodejs/public/files
|
||||
/web/documentserver-example/nodejs/files
|
||||
/web/documentserver-example/nodejs/config/local.json
|
||||
/web/documentserver-example/nodejs/example
|
||||
**/.vscode/
|
||||
**/.vs/
|
||||
**/.idea
|
||||
/web/documentserver-example/java/target/
|
||||
/web/documentserver-example/java/target/
|
||||
/web/documentserver-example/csharp/packages
|
||||
/web/documentserver-example/csharp-mvc/packages
|
||||
|
||||
32
.gitmodules
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
[submodule "web/documentserver-example/nodejs/public/assets"]
|
||||
path = web/documentserver-example/nodejs/public/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
[submodule "web/documentserver-example/java/src/main/resources/assets"]
|
||||
path = web/documentserver-example/java/src/main/resources/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
[submodule "web/documentserver-example/php/assets"]
|
||||
path = web/documentserver-example/php/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
[submodule "web/documentserver-example/python/assets"]
|
||||
path = web/documentserver-example/python/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
[submodule "web/documentserver-example/csharp-mvc/assets"]
|
||||
path = web/documentserver-example/csharp-mvc/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
[submodule "web/documentserver-example/csharp/assets"]
|
||||
path = web/documentserver-example/csharp/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
[submodule "web/documentserver-example/ruby/public/assets"]
|
||||
path = web/documentserver-example/ruby/public/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
[submodule "web/documentserver-example/java-spring/src/main/resources/assets"]
|
||||
path = web/documentserver-example/java-spring/src/main/resources/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
334
3rd-Party.license
Normal file
@ -0,0 +1,334 @@
|
||||
Document Server integration example uses code from the following 3rd party projects.
|
||||
|
||||
|
||||
web/documentserver-example/csharp
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
|
||||
web/documentserver-example/csharp-mvc
|
||||
|
||||
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
|
||||
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
|
||||
License File: EntityFramework.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
|
||||
License: MS-EULA License
|
||||
License File: Microsoft.Web.Infrastructure.license
|
||||
|
||||
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
|
||||
License: MIT
|
||||
License File: Newtonsoft.Json.license
|
||||
|
||||
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
|
||||
License: MICROSOFT .NET LIBRARY LICENSE
|
||||
License File: WebGrease.license
|
||||
|
||||
|
||||
web/documentserver-example/java
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: prime-jwt.license
|
||||
|
||||
|
||||
web/documentserver-example/java-spring
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: prime-jwt.license
|
||||
|
||||
Spring Boot - Helps create Spring-powered, production-grade applications and services. Has external dependencies on Spring Framework. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-boot.license
|
||||
|
||||
Spring Boot Devtools - Provides fast application restarts, LiveReload, and configurations for enhanced development experience. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-boot.license
|
||||
|
||||
Spring Boot Starter Thymeleaf - A modern server-side Java template engine for both web and standalone environments. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-boot.license
|
||||
|
||||
Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate. (https://github.com/spring-projects/spring-data-jpa/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-data-jpa.license
|
||||
|
||||
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
|
||||
License: MPL 2.0 or EPL 1.0
|
||||
License File: h2database.license
|
||||
|
||||
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: JSON.simple.license
|
||||
|
||||
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: gson.license
|
||||
|
||||
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: jackson-databind.license
|
||||
|
||||
|
||||
web/documentserver-example/nodejs
|
||||
|
||||
body-parser - Node.js body parsing middleware. (https://github.com/expressjs/body-parser/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: body-parser.license
|
||||
|
||||
config - Node-config organizes hierarchical configurations for your app deployments. (https://github.com/lorenwest/node-config/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: config.license
|
||||
|
||||
debug - A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. (https://github.com/visionmedia/debug/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: debug.license
|
||||
|
||||
ejs - Embedded JavaScript templates (https://github.com/mde/ejs/blob/main/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: ejs.license
|
||||
|
||||
express - Fast, unopinionated, minimalist web framework for node. (https://github.com/mde/ejs/blob/main/LICENSE)
|
||||
License: MIT
|
||||
License File: express.license
|
||||
|
||||
fast-xml-parser - Validate XML, Parse XML to JS/JSON and vice versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback. (https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: fast-xml-parser.license
|
||||
|
||||
formidable - A Node.js module for parsing form data, especially file uploads. (https://github.com/node-formidable/formidable/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: formidable.license
|
||||
|
||||
he - a robust HTML entity encoder/decoder written in JavaScript. (https://github.com/mathiasbynens/he/blob/master/LICENSE-MIT.txt)
|
||||
License: MIT
|
||||
License File: he.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
jsonwebtoken - An implementation of JSON Web Tokens. (https://github.com/auth0/node-jsonwebtoken/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: jsonwebtoken.license
|
||||
|
||||
jwa - A JSON Web Algorithms implementation focusing (exclusively, at this point) on the algorithms necessary for JSON Web Signatures. (https://github.com/auth0/node-jwa/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: jwa.license
|
||||
|
||||
log4js - This is a conversion of the log4js framework to work with node. (https://github.com/log4js-node/log4js-node/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: log4js.license
|
||||
|
||||
mime - A comprehensive, compact MIME type module. (https://github.com/broofa/mime/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: mime.license
|
||||
|
||||
serve-favicon - Node.js middleware for serving a favicon. (https://github.com/expressjs/serve-favicon/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: serve-favicon.license
|
||||
|
||||
urllib - Request HTTP URLs in a complex world — basic and digest authentication, redirections, cookies, timeout and more. (https://github.com/node-modules/urllib/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: urllib.license
|
||||
|
||||
|
||||
web/documentserver-example/php
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
JWT - JSON Web Token implementation (https://github.com/firebase/php-jwt/blob/master/LICENSE)
|
||||
License: BSD-3-Clause
|
||||
License File: jwt.license
|
||||
|
||||
PHP_CodeSniffer - PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent. (https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt)
|
||||
License: BSD-3-Clause
|
||||
License File: PHP_CodeSniffer.license
|
||||
|
||||
|
||||
web/documentserver-example/ruby
|
||||
|
||||
byebug - Byebug is a Ruby debugger. (https://github.com/deivid-rodriguez/byebug/blob/master/LICENSE)
|
||||
License: BSD-2-Clause
|
||||
License File: byebug.license
|
||||
|
||||
coffee-rails - CoffeeScript adapter for the Rails asset pipeline. (https://github.com/rails/coffee-rails/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: coffee-rails.license
|
||||
|
||||
jbuilder - Create JSON structures via a Builder-style DSL (https://github.com/rails/jbuilder/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: jbuilder.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
jquery-rails - This gem provides jQuery and the jQuery-ujs driver for your Rails 4+ application. (https://github.com/rails/jquery-rails/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: jquery-rails.license
|
||||
|
||||
rails - Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. (https://github.com/rails/rails/blob/v6.0.3.2/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: rails.license
|
||||
|
||||
sass-rails - This gem provides official integration for Ruby on Rails projects with the Sass stylesheet language. (https://github.com/rails/sass-rails/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: sass-rails.license
|
||||
|
||||
sdoc - rdoc generator html with javascript search index. (https://github.com/zzak/sdoc/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: sdoc.license
|
||||
|
||||
sqlite3 - This module allows Ruby programs to interface with the SQLite3 database engine (www.sqlite.org). (https://github.com/sparklemotion/sqlite3-ruby/blob/master/LICENSE)
|
||||
License: BSD-3-Clause
|
||||
License File: sqlite3.license
|
||||
|
||||
turbolinks - Rails engine for Turbolinks 5 support (https://github.com/turbolinks/turbolinks-rails/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: turbolinks.license
|
||||
|
||||
tzinfo-data - TZInfo::Data contains data from the IANA Time Zone database packaged as Ruby modules for use with TZInfo. (https://github.com/tzinfo/tzinfo-data/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: tzinfo-data.license
|
||||
|
||||
uglifier - Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in Ruby (https://github.com/lautis/uglifier/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: uglifier.license
|
||||
|
||||
uuid - UUID generator for producing universally unique identifiers based on RFC 4122 (https://github.com/assaf/uuid/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: uuid.license
|
||||
|
||||
web-console - A debugging tool for your Ruby on Rails applications. (https://github.com/rails/web-console/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: web-console.license
|
||||
@ -1,30 +0,0 @@
|
||||
Document Server integration example uses code from the following 3rd party projects.
|
||||
|
||||
|
||||
1. jQuery - Query is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. (http://jquery.com/)
|
||||
|
||||
License: The MIT License (MIT)
|
||||
License File: web\documentserver-example\csharp\licenses\MIT-LICENSE.txt
|
||||
License File: web\documentserver-example\csharp-mvc\licenses\MIT-LICENSE.txt
|
||||
|
||||
|
||||
2. jQuery BlockUI Plugin - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (http://malsup.com/jquery/block/)
|
||||
|
||||
License: MIT, GPL
|
||||
|
||||
|
||||
3. jQuery UI - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice. (http://jqueryui.com/)
|
||||
|
||||
License: MIT
|
||||
|
||||
|
||||
4. jQuery-File-Upload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload)
|
||||
|
||||
License: MIT
|
||||
|
||||
|
||||
5. Open Sans - Open Sans is a humanist sans serif typeface designed by Steve Matteson, Type Director of Ascender Corp. This version contains the complete 897 character set, which includes the standard ISO Latin 1, Latin CE, Greek and Cyrillic character sets. Open Sans was designed with an upright stress, open forms and a neutral, yet friendly appearance. It was optimized for print, web, and mobile interfaces, and has excellent legibility characteristics in its letterforms.
|
||||
Steve Matteson
|
||||
|
||||
License: Apache License, version 2.0
|
||||
|
||||
49
CHANGELOG.md
Normal file
@ -0,0 +1,49 @@
|
||||
# Change Log
|
||||
|
||||
- php: linter refactoring
|
||||
|
||||
## 1.5.0
|
||||
- nodejs: added wopi putRelativeFile action
|
||||
- nodejs: wopi editnew action for exisiting file
|
||||
- nodejs: fix wopi actions after restart
|
||||
- setting an unavailable language
|
||||
- description in the tooltip on the main page
|
||||
- nodejs: referenceData
|
||||
- option to send directUrl
|
||||
|
||||
## 1.4.0
|
||||
- nodejs: option to send directUrl
|
||||
- opening file on client by directUrl
|
||||
- offline viewer for anonymous
|
||||
- added hy, eu, zh-TW, ms, pt-PT
|
||||
|
||||
## 1.3.1
|
||||
- charp: fix references
|
||||
- ruby: update rails
|
||||
|
||||
## 1.3.0
|
||||
- update empty files
|
||||
- anonymous without chat
|
||||
- changed jwt implementation in csharp, csharp-mvc, php, ruby
|
||||
|
||||
## 1.2.0
|
||||
- ruby v3.0
|
||||
- set filetype in setHistoryData
|
||||
- read filetype from input request
|
||||
- creating file on WOPI
|
||||
- upload on WOPI page
|
||||
- fix xss
|
||||
- set userInfoGroups
|
||||
- check JWT on downloading history
|
||||
- upload dialog on mobile
|
||||
- anonymous without id
|
||||
- renaming from editor
|
||||
- new skin languages
|
||||
- ignore certificate
|
||||
|
||||
## 1.1.0
|
||||
- creating docxf
|
||||
- opening docxf, oform
|
||||
|
||||
## 1.0.0
|
||||
- added java spring
|
||||
201
LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
87
Readme.md
@ -1,20 +1,81 @@
|
||||
## Integration examples
|
||||
|
||||
[](https://opensource.org/licenses/MIT) 
|
||||
Test examples are simple document management systems that can be built into your application for testing.
|
||||
Do NOT use these integration examples on your own server without proper code modifications!
|
||||
In case you enabled any of the test examples, disable it before going for production.
|
||||
|
||||
## Document Server integration example
|
||||
|
||||
These examples show the way to integrate [ONLYOFFICE Document Server][2] into your own website or application using one of the programming languages. The package contains examples written in .Net (C# MVC), .Net (C#), Java, Node.js, PHP and Ruby.
|
||||
These examples show the way to integrate [ONLYOFFICE Docs][2] into your own website or application using one of the programming languages.
|
||||
The package contains examples written in .Net (C# MVC), .Net (C#), Java, Node.js, PHP and Ruby.
|
||||
|
||||
You should change `http://documentserver` to your server address in these files:
|
||||
* .Net (C# MVC) - `web/documentserver-example/csharp-mvc/web.appsettings.config`
|
||||
* .Net (C#) - `web/documentserver-example/csharp/settings.config`
|
||||
* Java - `web/documentserver-example/java/src/main/resources/settings.properties`
|
||||
* Node.js - `web/documentserver-example/nodejs/config/default.json`
|
||||
* PHP - `web/documentserver-example/php/config.php`
|
||||
* Ruby - `web/documentserver-example/ruby/config/application.rb`
|
||||
* [.Net (C# MVC)](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/csharp-mvc) - `web/documentserver-example/csharp-mvc/web.appsettings.config`
|
||||
* [.Net (C#)](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/csharp) - `web/documentserver-example/csharp/settings.config`
|
||||
* [Java](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/java) - `web/documentserver-example/java/src/main/resources/settings.properties`
|
||||
* [Node.js](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/nodejs) - `web/documentserver-example/nodejs/config/default.json`
|
||||
* [PHP](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/php) - `web/documentserver-example/php/config.php`
|
||||
* [Ruby](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/ruby) - `web/documentserver-example/ruby/config/application.rb`
|
||||
|
||||
More information on how to use these examples can be found here: [http://api.onlyoffice.com/editors/demopreview](http://api.onlyoffice.com/editors/demopreview "http://api.onlyoffice.com/editors/demopreview")
|
||||
|
||||
## API methods for test examples
|
||||
|
||||
The methods described below are available for all of the test examples.
|
||||
|
||||
### POST `/upload`
|
||||
|
||||
| | |
|
||||
| ---------------------- | ------------------------------------------------------------ |
|
||||
| **Summary** | Upload file to test example via request |
|
||||
| **URL** | /upload |
|
||||
| **Method** | POST |
|
||||
| **Request<br>Headers** | `Content-Type: multipart/form-data` |
|
||||
| **Request<br>Body** | `uploadedFile=@<filepath>`<br> `filepath` - file for uploading<br />Multipart body with the file binary contents |
|
||||
| **Response** | **Code:** 200 OK <br />**Content on success:**<br /> `{ "filename": <filename>}`<br />**Content on error:**<br /> `{ "error": "Uploaded file not found" }` <br /> Or <br /> `{ "error": "File size is incorrect" }` |
|
||||
| **Sample** | `curl -X POST -F uploadedFile=@filename.docx http://localhost/upload` |
|
||||
|
||||
|
||||
### DELETE `/file`
|
||||
|
||||
| | |
|
||||
| ------------------ | ------------------------------------------------------------ |
|
||||
| **Summary** | Delete one file or all files |
|
||||
| **URL** | /file |
|
||||
| **Method** | DELETE |
|
||||
| ****URL Params**** | **Optional:**<br /> `filename=[string]` - file for deleting. <br /> *WARNING! Without this parameter, all files will be deleted* |
|
||||
| **Response** | **Code:** 200 OK <br /> **Success:**<br /> `{ "success": true }` |
|
||||
| **Sample** | **Delete one file:**<br />`curl -X DELETE http://localhost/file?filename=filename.docx`<br />**Delete all files:**<br />`curl -X DELETE http://localhost/file`<br /> |
|
||||
|
||||
|
||||
### GET `/files`
|
||||
|
||||
| | |
|
||||
| ------------------ | ------------------------------------------------------------ |
|
||||
| **Summary** | Get information about all files |
|
||||
| **URL** | /files |
|
||||
| **Method** | GET |
|
||||
| **Response** | **Code:** 200 OK <br /> **Success:**<br /> `[{ "version": <file_version>, "id": <file_id>, "contentLength": <file_size_in_kilobytes>, "pureContentLength": <file_size_in_bytes>, "title": <file_name>, "updated": <last_change_date>}, ..., {...}]` |
|
||||
| **Sample** | `curl -X GET http://localhost/files/` |
|
||||
|
||||
|
||||
### GET `/files/file/{fileId}`
|
||||
|
||||
| | |
|
||||
| ------------------ | ------------------------------------------------------------ |
|
||||
| **Summary** | Get information about a file by file id |
|
||||
| **URL** | /files/file/{fileId} |
|
||||
| **Method** | GET |
|
||||
| **Response** | **Code:** 200 OK <br />**Content on success:**<br /> `[{ "version": <file_version>, "id": <file_id>, "contentLength": <file_size_in_kilobytes>, "pureContentLength": <file_size_in_bytes>, "title": <file_name>, "updated": <last_change_date>}]`<br />**Content on error:**<br /> `"File not found"` |
|
||||
| **Sample** | `curl -X GET http://localhost/files/{fileId}` |
|
||||
|
||||
## Important security info
|
||||
|
||||
Please keep in mind the following security aspects when you are using test examples:
|
||||
|
||||
* There is no protection of the storage from unauthorized access since there is no need for authorization.
|
||||
* There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
|
||||
* There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
|
||||
* There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.
|
||||
|
||||
## Project Information
|
||||
|
||||
Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx)
|
||||
@ -25,12 +86,12 @@ ONLYOFFICE for developers: [https://www.onlyoffice.com/developer-edition.aspx](h
|
||||
|
||||
## User Feedback and Support
|
||||
|
||||
If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
|
||||
If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [forum.onlyoffice.com][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
|
||||
|
||||
[1]: http://dev.onlyoffice.org
|
||||
[1]: https://forum.onlyoffice.com
|
||||
[2]: https://github.com/ONLYOFFICE/DocumentServer
|
||||
[3]: http://stackoverflow.com/questions/tagged/onlyoffice
|
||||
|
||||
## License
|
||||
|
||||
document-server-integration is released under the MIT License. See the LICENSE.txt file for more information.
|
||||
document-server-integration is released under the Apache-2.0 License. See the LICENSE file for more information.
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<UsingTask AssemblyFile="App_Data\MSBuild.Community.Tasks.dll" TaskName="MSBuild.Community.Tasks.Zip" />
|
||||
|
||||
<PropertyGroup>
|
||||
<To Condition=" '$(To)' == '' ">..\deploy\</To>
|
||||
|
||||
@ -11,8 +9,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectToBuild Include="$(DirCSharp)OnlineEditorsExample.csproj"/>
|
||||
<ProjectToBuild Include="$(DirMvc)OnlineEditorsExampleMVC.csproj"/>
|
||||
<ProjectToBuild Include="$(DirCSharp)OnlineEditorsExample.sln"/>
|
||||
<ProjectToBuild Include="$(DirMvc)OnlineEditorsExampleMVC.sln"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
|
||||
@ -4,58 +4,74 @@
|
||||
<PropertyGroup>
|
||||
<To Condition=" '$(To)' == '' ">..\deploy\</To>
|
||||
<RootDir Condition="$(RootDir)==''">..\..\</RootDir>
|
||||
<NameCSharp>$(To).Net (C#) Example</NameCSharp>
|
||||
<NameCSharp>$(To)DotNet (Csharp) Example</NameCSharp>
|
||||
<DirCSharp>$(RootDir)web\documentserver-example\csharp\</DirCSharp>
|
||||
<NameMvc>$(To).Net (C# MVC) Example</NameMvc>
|
||||
<NameMvc>$(To)DotNet (Csharp MVC) Example</NameMvc>
|
||||
<DirMvc>$(RootDir)web\documentserver-example\csharp-mvc\</DirMvc>
|
||||
<NameJava>$(To)Java Example</NameJava>
|
||||
<DirJava>$(RootDir)web\documentserver-example\java\</DirJava>
|
||||
<NameSpring>$(To)Java Spring Example</NameSpring>
|
||||
<DirSpring>$(RootDir)web\documentserver-example\java-spring\</DirSpring>
|
||||
<NameNodeJS>$(To)Node.js Example</NameNodeJS>
|
||||
<DirNodeJS>$(RootDir)web\documentserver-example\nodejs\</DirNodeJS>
|
||||
<NamePHP>$(To)PHP Example</NamePHP>
|
||||
<DirPHP>$(RootDir)web\documentserver-example\php\</DirPHP>
|
||||
<NameRuby>$(To)Ruby Example</NameRuby>
|
||||
<DirRuby>$(RootDir)web\documentserver-example\ruby\</DirRuby>
|
||||
<NamePython>$(To)Python Example</NamePython>
|
||||
<DirPython>$(RootDir)web\documentserver-example\python\</DirPython>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<RemoveDir Directories="$(To)" ContinueOnError="true" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesCSharp Include="$(DirCSharp)**" Exclude="$(DirCSharp)obj\**" />
|
||||
<ZipFilesCSharp Include="$(DirCSharp)**" Exclude="$(DirCSharp).vs\**;$(DirCSharp)bin\*.pdb;$(DirCSharp)bin\*.xml;$(DirCSharp)obj\**;$(DirCSharp)packages\**;$(DirCSharp)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesCSharp)" DestinationFiles="@(ZipFilesCSharp->'$(NameCSharp)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameCSharp)" WorkingDirectory="$(To)" ZipFileName="$(NameCSharp).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesMVC Include="$(DirMvc)**" Exclude="$(DirMvc)obj\**" />
|
||||
<ZipFilesMVC Include="$(DirMvc)**" Exclude="$(DirMvc).vs\**;$(DirMvc)bin\*.pdb;$(DirMvc)bin\*.xml;$(DirMvc)obj\**;$(DirMvc)packages\**;$(DirMvc)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesMVC)" DestinationFiles="@(ZipFilesMVC->'$(NameMvc)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameMvc)" WorkingDirectory="$(To)" ZipFileName="$(NameMvc).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesJava Include="$(DirJava)**" />
|
||||
<ZipFilesJava Include="$(DirJava)**" Exclude="$(DirJava)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesJava)" DestinationFiles="@(ZipFilesJava->'$(NameJava)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameJava)" WorkingDirectory="$(To)" ZipFileName="$(NameJava).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesNodeJS Include="$(DirNodeJS)**" Exclude="$(DirNodeJS)node_modules\**" />
|
||||
<ZipFilesSpring Include="$(DirSpring)**" Exclude="$(DirSpring)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesSpring)" DestinationFiles="@(ZipFilesSpring->'$(NameSpring)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameSpring)" WorkingDirectory="$(To)" ZipFileName="$(NameSpring).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesNodeJS Include="$(DirNodeJS)**" Exclude="$(DirNodeJS)node_modules\**;$(DirNodeJS)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesNodeJS)" DestinationFiles="@(ZipFilesNodeJS->'$(NameNodeJS)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameNodeJS)" WorkingDirectory="$(To)" ZipFileName="$(NameNodeJS).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesPHP Include="$(DirPHP)**" />
|
||||
<ZipFilesPHP Include="$(DirPHP)**" Exclude="$(DirPHP)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesPHP)" DestinationFiles="@(ZipFilesPHP->'$(NamePHP)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NamePHP)" WorkingDirectory="$(To)" ZipFileName="$(NamePHP).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesRuby Include="$(DirRuby)**" />
|
||||
<ZipFilesRuby Include="$(DirRuby)**" Exclude="$(DirRuby)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesRuby)" DestinationFiles="@(ZipFilesRuby->'$(NameRuby)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameRuby)" WorkingDirectory="$(To)" ZipFileName="$(NameRuby).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesPython Include="$(DirPython)**" Exclude="$(DirPython)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesPython)" DestinationFiles="@(ZipFilesPython->'$(NamePython)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NamePython)" WorkingDirectory="$(To)" ZipFileName="$(NamePython).zip" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@ -1,27 +0,0 @@
|
||||
DocumentServerIntegration uses code from the following 3rd party projects.
|
||||
|
||||
|
||||
1. Ionic.Zip.dll - The Zip, implementation for .NET. (http://dotnetzip.codeplex.com/)
|
||||
|
||||
License: MS-PL
|
||||
License File: DotNetZip.license
|
||||
|
||||
|
||||
2. jQuery - Query is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. (http://jquery.com/)
|
||||
|
||||
License: MIT License
|
||||
License File: jQuery.license
|
||||
|
||||
3. jQuery BlockUI Plugin - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (http://malsup.com/jquery/block/)
|
||||
|
||||
License: MIT, GPL
|
||||
|
||||
|
||||
4. jQuery UI - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice. (http://jqueryui.com/)
|
||||
|
||||
License: MIT
|
||||
|
||||
|
||||
5. Prime JWT - Prime JWT is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson.
|
||||
|
||||
License: Apache-2.0
|
||||
@ -1,33 +0,0 @@
|
||||
Microsoft Public License (Ms-PL)
|
||||
|
||||
This license governs use of the accompanying software, the DotNetZip library ("the software"). If you use the software, you accept this license. If you do not accept the license, do not use the software.
|
||||
|
||||
1. Definitions
|
||||
|
||||
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
|
||||
|
||||
A "contribution" is the original software, or any additions or changes to the software.
|
||||
|
||||
A "contributor" is any person that distributes its contribution under this license.
|
||||
|
||||
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
|
||||
2. Grant of Rights
|
||||
|
||||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
|
||||
|
||||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
|
||||
|
||||
3. Conditions and Limitations
|
||||
|
||||
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
|
||||
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
|
||||
|
||||
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
|
||||
|
||||
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
|
||||
|
||||
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
||||
|
||||
|
||||
41
web/documentserver-example/csharp-mvc/3rd-Party.license
Normal file
@ -0,0 +1,41 @@
|
||||
ONLYOFFICE Applications example uses code from the following 3rd party projects:
|
||||
|
||||
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
|
||||
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
|
||||
License File: EntityFramework.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
|
||||
License: MIT
|
||||
License File: JWT.license
|
||||
|
||||
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
|
||||
License: MS-EULA License
|
||||
License File: Microsoft.Web.Infrastructure.license
|
||||
|
||||
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
|
||||
License: MIT
|
||||
License File: Newtonsoft.Json.license
|
||||
|
||||
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
|
||||
License: MICROSOFT .NET LIBRARY LICENSE
|
||||
License File: WebGrease.license
|
||||
@ -1,28 +1,20 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System.Web.Optimization;
|
||||
|
||||
@ -30,8 +22,10 @@ namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public class BundleConfig
|
||||
{
|
||||
// register bundles
|
||||
public static void RegisterBundles(BundleCollection bundles)
|
||||
{
|
||||
// create a jquery script bundle
|
||||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
|
||||
"~/Scripts/jquery-{version}.js",
|
||||
"~/Scripts/jquery-ui.js",
|
||||
@ -41,15 +35,19 @@ namespace OnlineEditorsExampleMVC
|
||||
"~/Scripts/jquery.dropdownToggle.js"
|
||||
));
|
||||
|
||||
// create the main script bundle
|
||||
bundles.Add(new ScriptBundle("~/bundles/scripts").Include(
|
||||
"~/Scripts/jscript.js"
|
||||
));
|
||||
|
||||
// create a style bundle
|
||||
bundles.Add(new StyleBundle("~/Content/css").Include(
|
||||
"~/Content/stylesheet.css",
|
||||
"~/Content/jquery-ui.css"
|
||||
"~/Content/jquery-ui.css",
|
||||
"~/Content/media.css"
|
||||
));
|
||||
|
||||
// create an editor style bundle
|
||||
bundles.Add(new StyleBundle("~/Content/editor").Include(
|
||||
"~/Content/editor.css"
|
||||
));
|
||||
|
||||
@ -1,28 +1,20 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System.Web.Mvc;
|
||||
|
||||
@ -30,6 +22,7 @@ namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public class FilterConfig
|
||||
{
|
||||
// register global filters
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||
{
|
||||
filters.Add(new HandleErrorAttribute());
|
||||
|
||||
@ -1,28 +1,20 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
@ -31,10 +23,12 @@ namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
// register routes
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
|
||||
// create a route map
|
||||
routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{action}",
|
||||
|
||||
@ -1,28 +1,20 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System.Web.Http;
|
||||
|
||||
|
||||
@ -1,30 +1,22 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
html {
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="3" y="11" width="4" height="1" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 13V10H10V8H1C0.447715 8 0 8.44772 0 9V14C0 14.5523 0.447715 15 1 15H10V13H2Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5243 10.5534L22.2366 10.3386C22.143 9.95592 22.0065 9.59014 21.8288 9.24897L22.6532 8.22679C22.8285 8.01077 22.8205 7.69994 22.6357 7.49145L22.1235 6.91502C21.9379 6.70675 21.63 6.6627 21.3952 6.81106L20.2939 7.50337C19.8095 7.16494 19.2608 6.91502 18.6689 6.77L18.4535 5.4753C18.4083 5.20115 18.171 5 17.8926 5H17.1207C16.8428 5 16.6048 5.20115 16.5606 5.4753L16.344 6.77041C15.8546 6.89023 15.3958 7.08363 14.9771 7.33835L13.9297 6.59088C13.704 6.42961 13.394 6.45483 13.197 6.65139L12.6517 7.19707C12.4552 7.39406 12.4299 7.7041 12.5916 7.92983L13.3408 8.97921C13.0885 9.39477 12.8971 9.85099 12.7773 10.336L11.4753 10.5534C11.2015 10.5986 11 10.8359 11 11.1144V11.8856C11 12.1641 11.2015 12.4014 11.4753 12.4466L12.7773 12.664C12.8757 13.0631 13.0185 13.4444 13.2083 13.7978L12.3877 14.8142C12.213 15.0301 12.2203 15.3411 12.4051 15.5494L12.9169 16.1258C13.1026 16.3345 13.4106 16.3778 13.6455 16.2298L14.7626 15.528C15.2353 15.8513 15.7701 16.0889 16.344 16.2298L16.5606 17.5247C16.6048 17.7988 16.8428 18 17.1207 18H17.8926C18.171 18 18.4083 17.7989 18.4535 17.5247L18.6693 16.2298C19.1525 16.1116 19.6055 15.9215 20.0205 15.6712L21.1115 16.4504C21.3368 16.6122 21.6471 16.5868 21.8439 16.3897L22.3894 15.8442C22.5857 15.6478 22.6123 15.3379 22.4492 15.1118L21.6725 14.0227C21.9255 13.6058 22.118 13.1487 22.237 12.6616L23.5248 12.4465C23.7993 12.4013 24 12.1641 24 11.8856V11.1143C23.9996 10.8359 23.7989 10.5986 23.5243 10.5534ZM17.5204 13.9375C16.1745 13.9375 15.0829 12.8457 15.0829 11.5C15.0829 10.1541 16.1745 9.0625 17.5204 9.0625C18.866 9.0625 19.9578 10.1541 19.9578 11.5C19.9578 12.8457 18.866 13.9375 17.5204 13.9375Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 197 B |
@ -0,0 +1,3 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.294404 0.294466C-0.0961199 0.68499 -0.0998005 1.32183 0.290724 1.71236L5.57837 7L5.57841 7.00005L0.29081 12.2877C-0.0997145 12.6782 -0.0960336 13.315 0.294491 13.7055C0.685015 14.0961 1.32186 14.0997 1.71238 13.7092L6.99999 8.42162L12.2876 13.7092C12.6781 14.0997 13.315 14.0961 13.7055 13.7055C14.096 13.315 14.0997 12.6782 13.7092 12.2877L8.42156 7.00005L8.42161 7L13.7093 1.71236C14.0998 1.32183 14.0961 0.68499 13.7056 0.294466C13.315 -0.0960591 12.6782 -0.0997395 12.2877 0.290785L7.00003 5.57843L6.99999 5.57847L6.99994 5.57843L1.7123 0.290785C1.32177 -0.0997395 0.684928 -0.0960591 0.294404 0.294466Z" fill="#AAAAAA"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 781 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 6C4.44772 6 4 6.44772 4 7V16.4074C4 16.9597 4.44772 17.4074 5 17.4074H6.72783C7.02679 17.4074 7.31006 17.5412 7.50002 17.772L8.56115 19.0616C8.96117 19.5477 9.7055 19.5477 10.1055 19.0616L11.1667 17.772C11.3566 17.5412 11.6399 17.4074 11.9388 17.4074H19C19.5523 17.4074 20 16.9597 20 16.4074V7C20 6.44772 19.5523 6 19 6H5ZM17 9H7V10H17V9ZM17 11H7V12H17V11ZM7 13H15V14H7V13Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 547 B |
|
Before Width: | Height: | Size: 232 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 18.0001L17.9952 16.401L13.5964 12.0025L17.9998 7.59937L17.9998 6L16.4004 6.00008L11.997 10.4032L7.59925 6.00568L5.99999 6.00013L5.99988 7.60497L10.3977 12.0025L6.00447 16.3954L6.00001 18.0001L7.60384 17.9947L11.997 13.6018L16.3958 18.0003L18 18.0001Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 425 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M19 6H5L5 15H19V6ZM5 4C3.89543 4 3 4.89543 3 6V15C3 16.1046 3.89543 17 5 17H10V18H6V20H18V18H14V17H19C20.1046 17 21 16.1046 21 15V6C21 4.89543 20.1046 4 19 4H5Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 631 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.3765 15.128C9.98789 15.5187 9.35642 15.5214 8.96449 15.134L6.14517 12.3473C5.75561 11.9622 5.12876 11.9622 4.7392 12.3473L4.72038 12.3659C4.32403 12.7576 4.32441 13.3978 4.72124 13.7891L8.96526 17.974C9.35702 18.3603 9.98726 18.3576 10.3757 17.9679L20.2877 8.02323C20.6801 7.6296 20.67 6.9855 20.2729 6.59668C19.8804 6.21243 19.2454 6.21063 18.8581 6.60005L10.3765 15.128Z" fill="#8BB825"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 507 B |
@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 16V13H7.2V11H5C4.44772 11 4 11.4477 4 12V17C4 17.5523 4.44772 18 5 18H19C19.5523 18 20 17.5523 20 17V12C20 11.4477 19.5523 11 19 11H16.8V13H18V16H6Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.9996 8.5L15.2025 8.5C15.7911 8.5 16 8.49063 16 8.75503C16 8.94763 15.8986 9.29489 15.6987 9.4874L12.6667 12.6478C12.179 13.1174 11.821 13.1174 11.3333 12.6478L8.30133 9.4874C8.10142 9.29489 8 8.94763 8 8.75503C8 8.49056 8.20889 8.5 8.79749 8.5C8.79749 8.5 9.4909 8.5 9.99708 8.5C9.99708 8.28638 9.99708 5 9.99708 5L13.9996 5C13.9996 5 13.9996 8.29916 13.9996 8.5Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 757 B |
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="4" y="6" width="16" height="13" rx="1" stroke="#444444" stroke-width="2"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.148 8.69651C13.8858 8.43384 13.4601 8.43384 13.1979 8.69651V8.69651C12.9362 8.95858 12.9362 9.38302 13.1979 9.64509L15.3401 11.7908C15.7296 12.1809 15.7299 12.8126 15.3409 13.2031L13.1967 15.3554C12.9357 15.6173 12.9357 16.041 13.1967 16.3029V16.3029C13.4591 16.5663 13.8855 16.5663 14.1478 16.3029L17.3302 13.1086V13.1086C17.668 12.7702 17.668 12.2222 17.3302 11.8838L14.148 8.69651Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.85199 16.3035C10.1142 16.5662 10.5399 16.5662 10.8021 16.3035V16.3035C11.0638 16.0414 11.0638 15.617 10.8021 15.3549L8.65987 13.2092C8.2704 12.8191 8.27006 12.1874 8.65911 11.7969L10.8033 9.64461C11.0643 9.38266 11.0643 8.959 10.8033 8.69706V8.69706C10.5409 8.43371 10.1145 8.43371 9.85218 8.69706L6.66983 11.8914V11.8914C6.33201 12.2298 6.33201 12.7778 6.66983 13.1162L9.85199 16.3035Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99857 1.6C4.46508 1.6 1.6 4.46548 1.6 8.00029C1.6 9.70508 2.26458 11.2515 3.35202 12.3999C4.52033 13.6337 6.16874 14.4 7.99857 14.4C11.5348 14.4 14.4 11.5335 14.4 8.00029C14.4 4.46592 11.5348 1.6 7.99857 1.6ZM0 8.00029C0 3.58219 3.58105 0 7.99857 0C12.4184 0 16 3.58219 16 8.00029C16 12.4172 12.4184 16 7.99857 16C5.71117 16 3.64805 15.0395 2.19023 13.5C0.83265 12.0663 0 10.1304 0 8.00029ZM7 4H9V9H7V4ZM9 10H7V12H9V10Z" fill="#CB0000"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 593 B |
|
Before Width: | Height: | Size: 682 B |
@ -0,0 +1,8 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H21.674C22.4697 0 23.2327 0.316071 23.7953 0.87868L29.1213 6.20465C29.6839 6.76726 30 7.53032 30 8.32597V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#3779A6"/>
|
||||
<path d="M22.9167 0L30.0001 7.08333H25.9167C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#1D5880"/>
|
||||
<path d="M6.17627 14.7059H23.8233V15.8823H6.17627V14.7059Z" fill="white"/>
|
||||
<path d="M6.17627 18.5294H23.8233V19.7059H6.17627V18.5294Z" fill="white"/>
|
||||
<path d="M6.17627 22.3529H23.8233V23.5294H6.17627V22.3529Z" fill="white"/>
|
||||
<path d="M6.17627 26.1765H23.8233V27.3529H6.17627V26.1765Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 738 B |
@ -0,0 +1,6 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#27ABA3"/>
|
||||
<path d="M22.9165 0L29.9998 7.08333H25.9165C24.2597 7.08333 22.9165 5.74019 22.9165 4.08333V0Z" fill="#008078"/>
|
||||
<rect x="6.5" y="15.5" width="17" height="5" stroke="white"/>
|
||||
<rect x="6.5" y="23.5" width="17" height="5" stroke="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 728 B |
@ -0,0 +1,8 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#F36700"/>
|
||||
<path d="M22.9167 0L30.0001 7.08333H25.9168C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#AB531F"/>
|
||||
<path d="M6.17627 16.1275H23.8233V17.3039H6.17627V16.1275Z" fill="white"/>
|
||||
<path d="M6.17627 28.7745L6.17627 16.1275L7.35274 16.1275L7.35274 28.7745H6.17627Z" fill="white"/>
|
||||
<path d="M23.8233 16.1275V28.7745H22.6469V16.1275L23.8233 16.1275Z" fill="white"/>
|
||||
<path d="M6.17627 27.598H23.8233V28.7745H6.17627L6.17627 27.598Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 691 B |
@ -0,0 +1,6 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M30 7.44186L22 0H3C1.22739 0 0 0.822551 0 2.32558V37.2093C0 38.7123 1.22739 40 3 40H27C28.7726 40 30 38.7123 30 37.2093V7.44186Z" fill="#D0D5DA"/>
|
||||
<path d="M24.1042 7.27273H29.9631L22 0V5.32334C22 6.4105 22.949 7.27273 24.1042 7.27273Z" fill="#646464"/>
|
||||
<path d="M16.9562 22.3485H12.9746V17.803H10.9839L14.9654 14.1667L18.947 17.803H16.9562V22.3485Z" fill="#646464"/>
|
||||
<path d="M20.9378 23.7121C20.9378 24.1666 20.4401 24.6212 19.9424 24.6212H9.98848C9.49078 24.6212 8.99309 24.1666 8.99309 23.7121V22.3485C8.99309 21.8939 9.49078 21.4394 9.98848 21.4394H10.9839V20.0757H9.49078C8.49539 20.0757 7.5 20.9848 7.5 21.8939V24.1666C7.5 25.0757 8.61982 25.9848 9.49078 25.9848H20.4401C21.3111 25.9848 22.4309 25.0757 22.4309 24.1666V21.8939C22.4309 20.9848 21.4355 20.0757 20.4401 20.0757H18.947V21.4394H19.9424C20.4401 21.4394 20.9378 21.8939 20.9378 22.3485V23.7121Z" fill="#646464"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 992 B |
|
Before Width: | Height: | Size: 744 B |
@ -0,0 +1,12 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#78A73B"/>
|
||||
<path d="M22.9167 0L30.0001 7.08333H25.9168C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#5A7D2B"/>
|
||||
<path d="M6.17644 15.2941H23.8235V16.4706H6.17644V15.2941Z" fill="white"/>
|
||||
<path d="M6.17644 19.1177H23.8235V20.2941H6.17644V19.1177Z" fill="white"/>
|
||||
<path d="M6.17644 22.9412H23.8235V24.1177H6.17644V22.9412Z" fill="white"/>
|
||||
<path d="M6.17644 26.7647H23.8235V27.9412H6.17644V26.7647Z" fill="white"/>
|
||||
<path d="M5.88232 27.9412L5.88232 15.2941L7.0588 15.2941L7.0588 27.9412H5.88232Z" fill="white"/>
|
||||
<path d="M11.4706 27.9412L11.4706 15.2941L12.647 15.2941V27.9412H11.4706Z" fill="white"/>
|
||||
<path d="M17.0588 27.9412L17.0588 15.2941L18.2353 15.2941V27.9412H17.0588Z" fill="white"/>
|
||||
<path d="M22.647 27.9412V15.2941H23.8235V27.9412H22.647Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1004 B |
@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 16V13H7V11H5C4.44772 11 4 11.4477 4 12V17C4 17.5523 4.44772 18 5 18H19C19.5523 18 20 17.5523 20 17V12C20 11.4477 19.5523 11 19 11H17V13H18V16H6Z" fill="#444444"/>
|
||||
<path d="M11 15H9V13L16 6H17V7H18V8L11 15Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 379 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.4 10.4L4 4H20L13.6 10.4V17.8667V21.0667L10.4 17.8667V10.4Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 233 B |
@ -0,0 +1,12 @@
|
||||
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.84616 1H10.8462L14.8462 5V15H2.84616V1Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8462 5L10.8462 1H2.84616V15H14.8462V5ZM10.8462 0L15.8462 5V16H1.84616V0H10.8462Z" fill="#BFBFBF"/>
|
||||
<rect x="3.84616" y="10" width="10" height="4" fill="#3779A6"/>
|
||||
<path d="M3.84616 4H4.84616V5H3.84616V4Z" fill="#BFBFBF"/>
|
||||
<path d="M3.84616 6H4.84616V7H3.84616V6Z" fill="#BFBFBF"/>
|
||||
<path d="M4.84616 8H3.84616V9H4.84616V8Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8462 8H5.84616V9H12.8462V8Z" fill="#BFBFBF"/>
|
||||
<path d="M7.84616 6H5.84616V7H7.84616V6Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8462 4H5.84616V5H12.8462V4Z" fill="#BFBFBF"/>
|
||||
<path opacity="0.3" d="M9.84616 1H10.8462V4H14.8462L15.8462 5H9.84616V1Z" fill="#333333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@ -0,0 +1,12 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 1H10L14 5V15H2V1Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 5L10 1H2V15H14V5ZM10 0L15 5V16H1V0H10Z" fill="#BFBFBF"/>
|
||||
<rect x="3" y="10" width="10" height="4" fill="#F36700"/>
|
||||
<path d="M3 4H4V5H3V4Z" fill="#BFBFBF"/>
|
||||
<path d="M3 6H4V7H3V6Z" fill="#BFBFBF"/>
|
||||
<path d="M4 8H3V9H4V8Z" fill="#BFBFBF"/>
|
||||
<path d="M12 8H5V9H12V8Z" fill="#BFBFBF"/>
|
||||
<path d="M7 6H5V7H7V6Z" fill="#BFBFBF"/>
|
||||
<path d="M12 4H5V5H12V4Z" fill="#BFBFBF"/>
|
||||
<path opacity="0.3" d="M9 1H10V4H14L15 5H9V1Z" fill="#333333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 631 B |
@ -0,0 +1,12 @@
|
||||
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.84592 1H10.8459L14.8459 5V15H2.84592V1Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8459 5L10.8459 1H2.84592V15H14.8459V5ZM10.8459 0L15.8459 5V16H1.84592V0H10.8459Z" fill="#BFBFBF"/>
|
||||
<rect x="3.84592" y="10" width="10" height="4" fill="#78A73B"/>
|
||||
<path d="M3.84592 4H4.84592V5H3.84592V4Z" fill="#BFBFBF"/>
|
||||
<path d="M3.84592 6H4.84592V7H3.84592V6Z" fill="#BFBFBF"/>
|
||||
<path d="M4.84592 8H3.84592V9H4.84592V8Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8459 8H5.84592V9H12.8459V8Z" fill="#BFBFBF"/>
|
||||
<path d="M7.84592 6H5.84592V7H7.84592V6Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8459 4H5.84592V5H12.8459V4Z" fill="#BFBFBF"/>
|
||||
<path opacity="0.3" d="M9.84592 1H10.8459V4H14.8459L15.8459 5H9.84592V1Z" fill="#333333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@ -0,0 +1,3 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM5 6C5 5.44772 5.44772 5 6 5C6.55228 5 7 5.44772 7 6V9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9V6ZM6 2C5.44772 2 5 2.44772 5 3C5 3.55228 5.44772 4 6 4C6.55228 4 7 3.55228 7 3C7 2.44772 6.55228 2 6 2Z" fill="#D0D5DA"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,15 @@
|
||||
<svg width="153" height="28" viewBox="0 0 153 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 27.6567L0.801116 21.8897C-0.267039 21.3862 -0.267039 20.6081 0.801116 20.1504L5.16662 18.1365L13.2939 21.8897C14.362 22.3932 16.0804 22.3932 17.1021 21.8897L25.2294 18.1365L29.5949 20.1504C30.663 20.6539 30.663 21.432 29.5949 21.8897L17.0556 27.6567C16.0804 28.1144 14.362 28.1144 13.3403 27.6567Z" fill="#FF6F3D"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 20.5623L0.801116 14.7953C-0.267039 14.2918 -0.267039 13.5137 0.801116 13.056L5.07373 11.0879L13.3403 14.8868C14.4085 15.3903 16.1268 15.3903 17.1485 14.8868L25.4151 11.0879L29.6877 13.056C30.7559 13.5595 30.7559 14.3376 29.6877 14.7953L17.1485 20.5623C16.0804 21.0658 14.362 21.0658 13.3403 20.5623Z" fill="#95C038"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 13.651L0.801116 7.88393C-0.267039 7.38045 -0.267039 6.60236 0.801116 6.14466L13.3403 0.377605C14.4085 -0.125868 16.1268 -0.125868 17.1485 0.377605L29.6877 6.14466C30.7559 6.64813 30.7559 7.42622 29.6877 7.88393L17.1485 13.651C16.0804 14.1087 14.362 14.1087 13.3403 13.651Z" fill="#5DC0E8"/>
|
||||
<path d="M38.1528 13.9433C38.1528 11.5581 38.8442 9.75803 40.2731 8.58797C41.6559 7.3729 43.3152 6.78787 45.2051 6.78787C47.0949 6.78787 48.7081 7.3729 50.0909 8.58797C51.4737 9.80304 52.1651 11.5581 52.1651 13.9883C52.1651 16.3734 51.4737 18.1735 50.0909 19.3436C48.7081 20.5586 47.0488 21.1437 45.2051 21.1437C43.3152 21.1437 41.702 20.5586 40.2731 19.3436C38.8442 18.1285 38.1528 16.3284 38.1528 13.9433ZM41.195 13.9433C41.195 15.6084 41.5176 16.7784 42.1168 17.5435C42.7621 18.3085 43.4535 18.8035 44.191 18.9835C44.3754 19.0285 44.5137 19.0735 44.698 19.0735C44.8363 19.0735 45.0207 19.1185 45.159 19.1185C45.3433 19.1185 45.4816 19.1185 45.666 19.0735C45.8504 19.0735 45.9886 19.0285 46.173 18.9835C46.9105 18.8035 47.6019 18.3085 48.2011 17.5435C48.8003 16.7784 49.123 15.5633 49.123 13.9883C49.123 12.3682 48.8003 11.1981 48.2011 10.4331C47.6019 9.66803 46.9105 9.173 46.173 8.99299C45.9886 8.94799 45.8043 8.90299 45.666 8.90299C45.4816 8.90299 45.3433 8.85798 45.159 8.85798C44.9746 8.85798 44.8363 8.85798 44.698 8.90299C44.5598 8.90299 44.3754 8.94799 44.191 8.99299C43.4535 9.173 42.7621 9.66803 42.1168 10.4331C41.5176 11.1081 41.195 12.3232 41.195 13.9433Z" fill="white"/>
|
||||
<path d="M53.6863 6.92288H57.4659L62.444 15.7434L63.1814 17.6785H63.2275L63.1814 15.1583V6.92288H66.0853V20.9636H62.3057L57.3276 11.7831L56.5901 10.2081H56.544L56.5901 12.6832V20.9636H53.6863V6.92288Z" fill="white"/>
|
||||
<path d="M69.0813 6.92288H71.9852V18.5785H77.7007V20.9636H69.0813V6.92288Z" fill="white"/>
|
||||
<path d="M75.9031 6.92288H79.2679L82.2178 11.8281L82.6787 12.8182H82.7709L83.2319 11.8281L86.2279 6.92288H89.3161L84.1076 15.2483V20.9636H81.2038V15.2033L75.9031 6.92288Z" fill="white"/>
|
||||
<path d="M88.9473 13.9433C88.9473 11.5581 89.6387 9.75803 91.0675 8.58797C92.4503 7.3729 94.1097 6.78787 95.9995 6.78787C97.8893 6.78787 99.5026 7.3729 100.885 8.58797C102.268 9.80304 102.96 11.5581 102.96 13.9883C102.96 16.3734 102.268 18.1735 100.885 19.3436C99.5026 20.5586 97.8432 21.1437 95.9995 21.1437C94.1097 21.1437 92.4964 20.5586 91.0675 19.3436C89.6848 18.1285 88.9473 16.3284 88.9473 13.9433ZM91.9894 13.9433C91.9894 15.6084 92.3121 16.7784 92.9113 17.5435C93.5566 18.3085 94.2019 18.8035 94.9855 18.9835C95.1698 19.0285 95.3081 19.0735 95.4925 19.0735C95.6308 19.0735 95.8151 19.1185 95.9534 19.1185C96.1378 19.1185 96.2761 19.1185 96.4604 19.0735C96.6448 19.0735 96.7831 19.0285 96.9675 18.9835C97.7049 18.8035 98.3963 18.3085 98.9955 17.5435C99.5948 16.7784 99.9174 15.5633 99.9174 13.9883C99.9174 12.3682 99.5948 11.1981 98.9955 10.4331C98.3963 9.66803 97.7049 9.173 96.9675 8.99299C96.7831 8.94799 96.5987 8.90299 96.4604 8.90299C96.2761 8.90299 96.1378 8.85798 95.9534 8.85798C95.769 8.85798 95.6308 8.85798 95.4925 8.90299C95.3542 8.90299 95.1698 8.94799 94.9855 8.99299C94.248 9.173 93.5566 9.66803 92.9113 10.4331C92.3121 11.1081 91.9894 12.3232 91.9894 13.9433Z" fill="white"/>
|
||||
<path d="M104.988 6.92288H113.008V9.26301H107.891V12.6832H112.777V15.0683H107.891V20.9636H104.988V6.92288Z" fill="white"/>
|
||||
<path d="M115.174 6.92288H123.195V9.26301H118.078V12.6832H122.964V15.0683H118.078V20.9636H115.174V6.92288Z" fill="white"/>
|
||||
<path d="M124.9 20.9636V6.92288H127.804V20.9636H124.9Z" fill="white"/>
|
||||
<path d="M140.599 7.2378V9.66793C140.092 9.48792 139.585 9.35291 139.032 9.26291C138.478 9.1729 137.833 9.1279 137.188 9.1279C135.667 9.1279 134.515 9.57792 133.685 10.523C132.855 11.423 132.44 12.5931 132.44 13.9882C132.44 15.3382 132.809 16.4633 133.593 17.3633C134.376 18.2634 135.482 18.7584 136.911 18.7584C137.418 18.7584 137.925 18.7134 138.525 18.6684C139.124 18.5784 139.723 18.4434 140.368 18.1734L140.553 20.5585C140.46 20.6035 140.322 20.6485 140.184 20.6935C140 20.7385 139.815 20.7835 139.585 20.8285C139.216 20.9185 138.755 20.9635 138.202 21.0535C137.649 21.0985 137.096 21.1436 136.497 21.1436C136.404 21.1436 136.312 21.1436 136.266 21.1436C136.174 21.1436 136.082 21.1436 136.036 21.1436C134.376 21.0535 132.855 20.4235 131.472 19.3435C130.09 18.2184 129.398 16.4633 129.398 14.1232C129.398 11.828 130.09 10.0279 131.426 8.76788C132.763 7.50781 134.607 6.87778 136.865 6.87778C137.464 6.87778 138.018 6.87778 138.478 6.92278C138.986 6.96778 139.446 7.05779 139.953 7.14779C140.046 7.19279 140.184 7.19279 140.276 7.2378C140.368 7.19279 140.46 7.2378 140.599 7.2378Z" fill="white"/>
|
||||
<path d="M142.903 6.92294H151.523V9.12806H145.853V12.6383H150.97V14.7984H145.853V18.7586H151.523V20.9637H142.903V6.92294Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 5C5 3.89543 5.89543 3 7 3H16C17.1046 3 18 3.89543 18 5V8H17V6H6V18H17V16H18V19C18 20.1046 17.1046 21 16 21H7C5.89543 21 5 20.1046 5 19V5ZM13 4H10V5H13V4ZM12 19.5C12 19.7761 11.7761 20 11.5 20C11.2239 20 11 19.7761 11 19.5C11 19.2239 11.2239 19 11.5 19C11.7761 19 12 19.2239 12 19.5Z" fill="#444444"/>
|
||||
<rect x="7" y="9" width="1" height="6" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 8V9L11 9V15H12V16H9V15H10V9H9V8H12Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 10H18V14H15H14H13V15H14H18C18.5523 15 19 14.5523 19 14V10C19 9.44772 18.5523 9 18 9H14H13V10H14H15Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 790 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 3C6.89543 3 6 3.89543 6 5V19C6 20.1046 6.89543 21 8 21H16C17.1046 21 18 20.1046 18 19V5C18 3.89543 17.1046 3 16 3H8ZM16.8462 6H7.15385V18H16.8462V6ZM10.3846 4H13.6154V5H10.3846V4ZM12 20C12.2974 20 12.5385 19.7761 12.5385 19.5C12.5385 19.2239 12.2974 19 12 19C11.7026 19 11.4615 19.2239 11.4615 19.5C11.4615 19.7761 11.7026 20 12 20Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 506 B |
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.3">
|
||||
<path d="M10.3826 15.3872C9.9926 15.7862 9.35162 15.7889 8.95828 15.3933L6.15133 12.5701C5.76034 12.1768 5.12403 12.1768 4.73304 12.5701L4.70185 12.6015C4.31371 12.9918 4.31409 13.6225 4.7027 14.0124L8.95904 18.2831C9.35223 18.6776 9.99196 18.6749 10.3817 18.277L20.3062 8.14519C20.6903 7.75301 20.6865 7.12447 20.2976 6.73701L20.273 6.71257C19.8791 6.32014 19.2408 6.32437 18.8521 6.722L10.3826 15.3872Z" fill="#444444"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 5C5.44772 5 5 5.44772 5 6V18C5 18.5523 5.44772 19 6 19H17C17.5523 19 18 18.5523 18 18V13.4142L14.4142 17H11V15H8V14H11V13.5858L11.5858 13H8V12H12.5858L13.5858 11H8V10H14.5858L18 6.58579V6C18 5.44772 17.5523 5 17 5H6ZM8 8H15V9H8V8ZM12 16H14L21 9V8H20V7H19L12 14V16Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
684
web/documentserver-example/csharp-mvc/Content/media.css
Normal file
@ -0,0 +1,684 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
@media (min-width: 1280px) and (max-width: 1380px) {
|
||||
.copy {
|
||||
margin-right: 6.5%;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: 6.5%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1280px) and (min-width: 1080px) {
|
||||
|
||||
.tableRow td:first-child {
|
||||
flex-grow: 1;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 29%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
width: 21%;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
padding-left: 13px;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
.copy {
|
||||
margin-right: 5%;
|
||||
padding-right: 32px;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
margin-left: 48px;
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1080px) {
|
||||
.copy {
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
padding-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1008px) {
|
||||
.left-panel {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: -1%;
|
||||
padding: 48px 26px 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 769px) and (min-width: 593px) {
|
||||
.contentCells-icon{
|
||||
width: 5%;
|
||||
}
|
||||
.tableRow {
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
.tableRow td:first-child {
|
||||
border: none;
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.tableHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: calc(100% - 128px);
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: 0;
|
||||
padding: 48px 18px 24px;
|
||||
}
|
||||
|
||||
footer table td {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding-right: 4px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.copy {
|
||||
margin:auto;
|
||||
padding-right: 3%;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: auto;
|
||||
padding-left: 1%;
|
||||
margin-right: 1.5%;
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 715px) {
|
||||
.tableRow {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 670px) and (min-width: 620px){
|
||||
.main-panel{
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 681px) and (min-width: 593px) {
|
||||
|
||||
.left-panel {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: 2%;
|
||||
padding: 48px 0 24px;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin: 48px 20px 24px;
|
||||
}
|
||||
.file-upload{
|
||||
width: 100%;
|
||||
}
|
||||
#fileupload{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1080px) and (min-width: 970px) {
|
||||
.tableHeader {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.tableRow td:first-child {
|
||||
flex-grow: 0;
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
text-align: right;
|
||||
width: 37%;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
padding-right: 22px;
|
||||
width: 22%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 986px) and (min-width: 890px) {
|
||||
.tableHeader {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 26%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 27%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
padding-right: 18px;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
padding-right: 38px;
|
||||
}
|
||||
|
||||
.tableRow td:first-child {
|
||||
flex-grow: 0;
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
width: 3%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 890px) and (min-width: 769px ) {
|
||||
.left-panel{
|
||||
width: 20%;
|
||||
}
|
||||
.contentCells-shift {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
width: 580px;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.tableHeader {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 22%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
padding-right: 4px;
|
||||
width: 20%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
text-align: left;
|
||||
width: 31%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 18%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 890px) {
|
||||
.tableRow td:first-child {
|
||||
max-width: 17%;
|
||||
}
|
||||
#portal-info {
|
||||
max-width: 60vw;
|
||||
}
|
||||
}
|
||||
|
||||
.downloadContentCellShift:after {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
content: "";
|
||||
background: #e5e5e5;
|
||||
height: 1px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 769px) {
|
||||
.tableRow td:first-child {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 593px ) {
|
||||
#portal-info {
|
||||
width: 50vw;
|
||||
}
|
||||
.file-upload{
|
||||
width: 100%;
|
||||
}
|
||||
#fileupload{
|
||||
width: 100%;
|
||||
}
|
||||
.tableHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
}
|
||||
|
||||
footer table tr {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
footer table td {
|
||||
padding-top: 16px;
|
||||
padding-right: 32px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: calc(100% - 128px);
|
||||
}
|
||||
|
||||
.copy {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin: 16px 10px 6px;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: 2%;
|
||||
padding: 16px 0 6px;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.tableRow td {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
border: none;
|
||||
flex-basis: 10%;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 7%;
|
||||
margin-right: -11px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
width: 12%;
|
||||
padding-right: 40px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 35px;
|
||||
}
|
||||
|
||||
.downloadContentCellShift:after {
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.firstContentCellViewers {
|
||||
margin-left: 0;
|
||||
border-bottom: 1px solid #e5e5e5 !important;
|
||||
}
|
||||
|
||||
.firstContentCellViewers ~ td {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
.tableRow td:first-child{
|
||||
border: none;
|
||||
width: 85%;
|
||||
}
|
||||
.contentCellsEmpty{
|
||||
display: none;
|
||||
width: 1%;
|
||||
}
|
||||
/* Mobile Upload*/
|
||||
.blockUI.blockMsg.blockPage.ui-dialog.ui-widget.ui-corner-all.ui-widget-content.ui-draggable {
|
||||
width: 344px !important;
|
||||
box-shadow: 0px 7px 15px rgba(85, 85, 85, 0.1);
|
||||
border-radius: 2px;
|
||||
top: 10% !important;
|
||||
margin-left: -172px !important;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar {
|
||||
padding: 0;
|
||||
}
|
||||
.ui-dialog .ui-dialog-content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
#mainProgress {
|
||||
margin: 24px 16px 0 !important;
|
||||
}
|
||||
.blockTitle {
|
||||
padding: 10px 10px 6px 16px !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
#mainProgress .describeUpload {
|
||||
padding: 8px 0 !important;
|
||||
}
|
||||
.dialog-close {
|
||||
margin: 0 !important;
|
||||
}
|
||||
.step-descr{
|
||||
line-height: 150%;
|
||||
}
|
||||
.step {
|
||||
line-height: 160%;
|
||||
}
|
||||
.buttonsMobile{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.button.gray{
|
||||
margin: 0;
|
||||
}
|
||||
.button, .button:hover{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0 !important;
|
||||
width: 144px;
|
||||
height: 56px;
|
||||
margin-bottom: 24px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) and (min-width: 510px) {
|
||||
.contentCells-icon {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
padding-right: 45px;
|
||||
max-width: 4%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 510px) and (min-width: 470px) {
|
||||
.tableRow {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.tableRow td:first-child{
|
||||
width: 83%;
|
||||
}
|
||||
.contentCells-icon {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 6%;
|
||||
padding-right: 37px;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
flex-basis: 9%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 470px) and (min-width: 420px) {
|
||||
.tableRow {
|
||||
width: 30%;
|
||||
}
|
||||
.tableRow td:first-child{
|
||||
width: 85%;
|
||||
}
|
||||
.contentCells-icon {
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 3%;
|
||||
padding-right: 37px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
margin-left: 1px;
|
||||
flex-basis: 14%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
width: 5%;
|
||||
padding-right: 63px;
|
||||
}
|
||||
.firstContentCellViewers{
|
||||
padding-right: 2px;
|
||||
width: 12%;
|
||||
}
|
||||
.contentCellsEmpty{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 420px) and (min-width: 320px) {
|
||||
.tableRow {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
width: 6%;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 4%;
|
||||
margin-right: -18px;
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
flex-basis: 2%;
|
||||
}
|
||||
|
||||
.contentCells-icon{
|
||||
width: 10%;
|
||||
}
|
||||
footer table td {
|
||||
margin: 0;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.copy {
|
||||
padding-right: 5px;
|
||||
margin: 0;
|
||||
}
|
||||
.firstContentCellViewers{
|
||||
padding-right: 2px;
|
||||
width: 11%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1160px) {
|
||||
.left-panel {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 593px) {
|
||||
.contentCellsEmpty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 769px) and (min-width: 715px){
|
||||
.tableRow{
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 510px) {
|
||||
.tableRow td:first-child{
|
||||
flex-grow: 0;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1100px) and (min-width: 890px){
|
||||
.main-panel > span{
|
||||
max-width: 70%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 780px) and (min-width: 600px) {
|
||||
.main-panel{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.main-panel > span{
|
||||
max-width: 45%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) and (min-width: 320px) {
|
||||
.main-panel{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
@media (max-width:600px) and (min-width:500px){
|
||||
.main-panel > span{
|
||||
max-width:35%;
|
||||
}
|
||||
}
|
||||
@media (max-width:500px) and (min-width:400px){
|
||||
.main-panel > span{
|
||||
max-width:20%;
|
||||
}
|
||||
}
|
||||
@media (max-width:400px) and (min-width:320px){
|
||||
.main-panel > span{
|
||||
max-width:15%;
|
||||
}
|
||||
}
|
||||
@ -1,114 +1,134 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
html {
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-family: 'Open Sans', Tahoma,sans-serif;
|
||||
display: block;
|
||||
background: #FFFFFF;
|
||||
color: #333333;
|
||||
font-family: Open Sans;
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow-y: overlay;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
overflow-x:hidden;
|
||||
}
|
||||
|
||||
form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a, a:hover, a:visited {
|
||||
color: #333;
|
||||
|
||||
a,
|
||||
a:hover,
|
||||
a:visited {
|
||||
color: #333333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.top-panel {
|
||||
background: url("images/logo.png") no-repeat 30px center #3D4A6B;
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
header {
|
||||
background: #333333;
|
||||
height: 48px;
|
||||
margin: 0 auto;
|
||||
min-width: 1152px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
header img {
|
||||
margin: 10px 0 22px 32px;
|
||||
}
|
||||
|
||||
.center {
|
||||
position:relative;
|
||||
margin: 0 auto 0;
|
||||
width: 1152px;
|
||||
}
|
||||
|
||||
.main {
|
||||
display: table;
|
||||
height: calc(100% - 112px);
|
||||
min-height: 536px;
|
||||
}
|
||||
|
||||
.table-main {
|
||||
border-spacing: 0;
|
||||
height: 100%;
|
||||
min-height: 536px;
|
||||
}
|
||||
|
||||
.section {
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
margin: 80px auto;
|
||||
width: 600px;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
height: 100%;
|
||||
list-style: none;
|
||||
padding: 48px 32px 24px;
|
||||
position: relative;
|
||||
width: 896px;
|
||||
}
|
||||
|
||||
#portal-info {
|
||||
max-width: 65vw;
|
||||
}
|
||||
|
||||
.portal-name {
|
||||
font-size: 20px;
|
||||
color: #FF6F3D;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.portal-descr {
|
||||
display: inline-block;
|
||||
line-height: 20px;
|
||||
margin-bottom: 24px;
|
||||
width: 600px;
|
||||
}
|
||||
.save-original {
|
||||
color: #929597;
|
||||
line-height: 20px;
|
||||
margin-left: 16px;
|
||||
white-space: nowrap;
|
||||
width: 272px;
|
||||
}
|
||||
label .checkbox {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.question {
|
||||
background: url("images/question_small.png") no-repeat center center transparent;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
#hint {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #8E908F;
|
||||
display: none;
|
||||
margin: 4px 0 0 -32px;
|
||||
max-width: 415px;
|
||||
padding: 10px 15px 15px;
|
||||
word-wrap: break-word;
|
||||
z-index: 255;
|
||||
}
|
||||
.corner {
|
||||
background: url("images/corner.png") no-repeat scroll 0 0 transparent;
|
||||
height: 6px;
|
||||
left: 35px;
|
||||
margin-top: -15px;
|
||||
position: absolute;
|
||||
width: 9px;
|
||||
z-index: 261;
|
||||
}
|
||||
.try-descr {
|
||||
font-size: 16px;
|
||||
white-space : nowrap;
|
||||
line-height: 160%;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.header-list {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
label .checkbox {
|
||||
margin: 0 5px 3px 0;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.try-editor-list {
|
||||
@ -116,195 +136,368 @@ label .checkbox {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.try-editor-list li {
|
||||
float: left;
|
||||
margin: 25px;
|
||||
width: 150px;
|
||||
margin-bottom: 12px
|
||||
}
|
||||
|
||||
.try-editor {
|
||||
background-color: transparent;
|
||||
background-position: center 0;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
height: 45px;
|
||||
padding-top: 100px;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
padding-left: 42px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.try-editor.document {
|
||||
background-image: url("images/file_docx.png");
|
||||
}
|
||||
.try-editor.spreadsheet {
|
||||
background-image: url("images/file_xlsx.png");
|
||||
}
|
||||
.try-editor.presentation {
|
||||
background-image: url("images/file_pptx.png");
|
||||
}
|
||||
|
||||
.button, .button:visited, .button:hover, .button:active {
|
||||
.try-editor.word {
|
||||
background-image: url("images/file_docx.svg");
|
||||
}
|
||||
|
||||
.try-editor.cell {
|
||||
background-image: url("images/file_xlsx.svg");
|
||||
}
|
||||
|
||||
.try-editor.slide {
|
||||
background-image: url("images/file_pptx.svg");
|
||||
}
|
||||
|
||||
.try-editor.form {
|
||||
background-image: url("images/file_docxf.svg");
|
||||
}
|
||||
|
||||
.side-option {
|
||||
color: #666666;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.button,
|
||||
.button:visited,
|
||||
.button:hover,
|
||||
.button:active {
|
||||
align-items: center;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
line-height: 133%;
|
||||
padding: 8px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
cursor:pointer;
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
touch-callout: none;
|
||||
text-transform: uppercase;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
-o-touch-callout: none;
|
||||
-moz-touch-callout: none;
|
||||
-webkit-touch-callout: none;
|
||||
user-select: none;
|
||||
-o-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
margin-right: 3px;
|
||||
padding: 4px 12px;
|
||||
|
||||
color: #fff;
|
||||
|
||||
background: #3D96C6;
|
||||
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #3D96C6;
|
||||
}
|
||||
|
||||
.button.disable {
|
||||
.button.orange {
|
||||
background: #FF6F3D;
|
||||
border: 1px solid #FF6F3D;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.button.orange.disable {
|
||||
background: #EDC2B3;
|
||||
border: 1px solid #EDC2B3;
|
||||
cursor: default;
|
||||
background: #BADDEF;
|
||||
border: 1px solid #BADDEF;
|
||||
}
|
||||
|
||||
.button.orange:not(.disable):hover {
|
||||
background: #ff7a4b;
|
||||
}
|
||||
|
||||
.button.gray {
|
||||
background: #888;
|
||||
border: 1px solid #E9EAEA;
|
||||
border: 1px solid #AAAAAA;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.button.gray.disable {
|
||||
border: 1px solid #E5E5E5;
|
||||
color: #B5B5B5;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.button.gray:not(.disable):hover {
|
||||
border: 1px solid #FF6F3D;
|
||||
color: #FF6F3D;
|
||||
}
|
||||
|
||||
.upload-panel {
|
||||
float: left;
|
||||
padding: 24px 0;
|
||||
}
|
||||
|
||||
.file-upload {
|
||||
background: url("images/file_upload.svg") no-repeat 0 transparent;
|
||||
cursor: pointer;
|
||||
margin-bottom: 8px;
|
||||
padding: 0 !important;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
overflow: hidden;
|
||||
padding-left: 42px;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
}
|
||||
.file-upload span {
|
||||
line-height: 21px;
|
||||
margin: 2px 12px;
|
||||
}
|
||||
|
||||
.file-upload input {
|
||||
cursor: pointer;
|
||||
font-size: 23px;
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transform: translate(-300px, 0) scale(4);
|
||||
transform: translate(0px, -21px) scale(2);
|
||||
width: 192px;
|
||||
}
|
||||
|
||||
.create-panel {
|
||||
float: left;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.upload-panel,
|
||||
.create-panel {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #D0D5DA;
|
||||
}
|
||||
|
||||
#mainProgress {
|
||||
color: #979b9f;
|
||||
color: #333333;
|
||||
display: none;
|
||||
margin: 15px;
|
||||
font-size: 12px;
|
||||
margin: 30px 40px;
|
||||
}
|
||||
|
||||
#mainProgress .uploadFileName {
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 160%;
|
||||
overflow: hidden;
|
||||
padding-left: 28px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#mainProgress .describeUpload {
|
||||
line-height: 150%;
|
||||
letter-spacing: -0.02em;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
#mainProgress #embeddedView {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mainProgress.embedded #embeddedView {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#mainProgress.embedded #uploadSteps {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
background: url("images/alert.png") no-repeat scroll 4px 10px #FFECE3;
|
||||
color: #666668 !important;
|
||||
background: url("images/error.svg") no-repeat scroll 4px 10px;
|
||||
color: #CB0000;
|
||||
display: none;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
line-height: 160%;
|
||||
letter-spacing: -0.02em;
|
||||
margin: 5px 0;
|
||||
padding: 10px 10px 10px 30px;
|
||||
vertical-align: middle;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
#mainProgress .error-message a {
|
||||
color: #666668;
|
||||
}
|
||||
|
||||
.step {
|
||||
background-repeat: no-repeat;
|
||||
background-position: left center;
|
||||
background-color: transparent;
|
||||
color: #979B9F;
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
padding-left: 25px;
|
||||
font-weight: bold;
|
||||
line-height: 167%;
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
.current {
|
||||
background-image: url("images/loader16.gif");
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.done {
|
||||
background-image: url("images/done.png");
|
||||
color: #333;
|
||||
background-image: url("images/done.svg");
|
||||
}
|
||||
|
||||
.error {
|
||||
background-image: url("images/alert.png");
|
||||
background-image: url("images/notdone.svg");
|
||||
}
|
||||
|
||||
.step-descr {
|
||||
display: block;
|
||||
margin-left: 45px;
|
||||
}
|
||||
#mainProgress .step-descr a {
|
||||
color: #979B9F;
|
||||
margin-left: 35px;
|
||||
font-size: 11px;
|
||||
line-height: 188%;
|
||||
}
|
||||
|
||||
.progress-descr {
|
||||
color: #333;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
.bottom-panel {
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
text-align: right;
|
||||
|
||||
footer {
|
||||
background: #333333;
|
||||
color: #AAAAAA;
|
||||
height: 64px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
footer > .center {
|
||||
width: 100%;
|
||||
}
|
||||
.help-block span {
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
footer table {
|
||||
width:100%;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
footer table tr {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
flex-wrap: wrap;
|
||||
width: 100vw;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
footer table td {
|
||||
display: block;
|
||||
position:relative;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
footer a,
|
||||
footer a:hover,
|
||||
footer a:visited {
|
||||
color: #FF6F3D;
|
||||
font-size: 14px;
|
||||
line-height: 120%;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
footer table tr td:first-child {
|
||||
margin-left: 14%;
|
||||
}
|
||||
.copy {
|
||||
color:#aaaaaa;
|
||||
width:max-content;
|
||||
position:relative;
|
||||
margin-left:auto;
|
||||
margin-right:14%;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin: 48px 32px 24px;
|
||||
}
|
||||
|
||||
.help-block span {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 19px;
|
||||
}
|
||||
|
||||
.stored-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.stored-edit {
|
||||
background-color: transparent;
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
max-width: 250px;
|
||||
overflow: hidden;
|
||||
padding: 8px 0 1px 26px;
|
||||
text-decoration: none;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.stored-edit.word,
|
||||
.uploadFileName.word {
|
||||
background-image: url("images/icon_docx.svg");
|
||||
}
|
||||
|
||||
.stored-edit.cell,
|
||||
.uploadFileName.cell {
|
||||
background-image: url("images/icon_xlsx.svg");
|
||||
}
|
||||
|
||||
.stored-edit.slide,
|
||||
.uploadFileName.slide {
|
||||
background-image: url("images/icon_pptx.svg");
|
||||
}
|
||||
|
||||
.stored-edit span {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.stored-edit:hover span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.blockTitle {
|
||||
background-color: #E2E2E2 !important;
|
||||
background-color: #333333 !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
-moz-border-radius: 0 !important;
|
||||
-webkit-border-radius: 0 !important;
|
||||
color: #333 !important;
|
||||
color: #F5F5F5 !important;
|
||||
font-size: 16px !important;
|
||||
font-weight: normal !important;
|
||||
padding: 15px 25px !important;
|
||||
font-weight: 600 !important;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
padding: 14px 16px 14px 46px !important;
|
||||
}
|
||||
|
||||
.dialog-close {
|
||||
background: url("images/close.png") no-repeat scroll left top #E2E2E2;
|
||||
background: url("images/close.svg") no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-size: 1px;
|
||||
height: 12px;
|
||||
height: 14px;
|
||||
line-height: 1px;
|
||||
margin-top: 4px;
|
||||
width: 12px;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.blockPage {
|
||||
border: none !important;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
@ -312,4 +505,263 @@ label .checkbox {
|
||||
-moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.clearFix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
background: transparent;
|
||||
-moz-transition: all 0.2s ease-in-out;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
-ms-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.tableRow:hover {
|
||||
background-color: #ECECEC;
|
||||
}
|
||||
|
||||
.tableHeader {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.tableHeader tr {
|
||||
background: transparent;
|
||||
cursor: default;
|
||||
height: 40px;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.tableHeaderCell {
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
padding: 2px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
text-align: left;
|
||||
width: 37%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 29%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
width: 13%;
|
||||
text-align: right;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.contentCells {
|
||||
display: block;
|
||||
border-bottom: 1px solid #EFEFEF;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
padding: 4px;
|
||||
white-space: nowrap;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 44px;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
width: 4%;
|
||||
}
|
||||
|
||||
.select-user {
|
||||
color: #444444;
|
||||
font-family: Open Sans;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
line-height: 16px !important;
|
||||
}
|
||||
|
||||
.info {
|
||||
cursor: pointer;
|
||||
margin: -2px 5px;
|
||||
}
|
||||
|
||||
.user-block-table {
|
||||
height: 100%;
|
||||
padding-top: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.user-block-table td {
|
||||
background-color: #F4F4F4;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.user-block-table td select {
|
||||
border: 1px solid #D0D5DA;
|
||||
box-sizing: border-box;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
margin-top: 5px;
|
||||
padding: 2px 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.icon-delete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 256px;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.scroll-table-body {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin-top: 0px;
|
||||
overflow-x: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.scroll-table-body::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.scroll-table-body::-webkit-scrollbar-thumb {
|
||||
background: #D0D5DA;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.descrFilePass {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
line-height: 167%;
|
||||
}
|
||||
|
||||
#filePass {
|
||||
border: 1px solid #D0D5DA;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
height: 33px;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 150%;
|
||||
margin-right: 8px;
|
||||
outline: none;
|
||||
padding: 7px 8px;
|
||||
vertical-align: bottom;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.errorInput {
|
||||
border-color: #CB0000 !important;
|
||||
}
|
||||
|
||||
.errorPass {
|
||||
color: #CB0000;
|
||||
display: block;
|
||||
line-height: 160%;
|
||||
letter-spacing: -0.02em;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
html {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
.tableRow {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.tableRow td:first-child {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
max-width: 25%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 28%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
text-align: center;
|
||||
width: 18%
|
||||
}
|
||||
|
||||
.firstContentCellViewers {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.user-descr {
|
||||
display: inline-table;
|
||||
width: 30vw;
|
||||
min-width: 200px;
|
||||
max-width: 400px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.user-descr > b {
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
background: #FFFFFF;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 7px 25px rgba(85, 85, 85, 0.15);
|
||||
color: #666666;
|
||||
line-height: 160%;
|
||||
max-width: 455px;
|
||||
padding: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tooltip ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
border-top: 8px solid transparent;
|
||||
border-bottom: 8px solid transparent;
|
||||
border-right: 8px solid #FFFFFF;
|
||||
left: -4px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
@ -1,29 +1,23 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
using OnlineEditorsExampleMVC.Helpers;
|
||||
using OnlineEditorsExampleMVC.Models;
|
||||
@ -37,22 +31,27 @@ namespace OnlineEditorsExampleMVC.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Editor(string fileName, string mode)
|
||||
// viewing file in the editor
|
||||
public ActionResult Editor(string fileName, string editorsMode, string editorsType, string directUrl)
|
||||
{
|
||||
mode = mode ?? string.Empty;
|
||||
|
||||
var file = new FileModel
|
||||
{
|
||||
TypeDesktop = mode != "embedded",
|
||||
FileName = fileName
|
||||
Mode = editorsMode, // editor mode: edit or view
|
||||
Type = editorsType, // editor type: desktop, mobile, embedded
|
||||
FileName = Path.GetFileName(fileName), // file name
|
||||
IsEnabledDirectUrl = directUrl != null ? Convert.ToBoolean(directUrl) : false
|
||||
};
|
||||
|
||||
return View("Editor", file);
|
||||
}
|
||||
|
||||
public ActionResult Sample(string fileExt)
|
||||
// creating a sample document
|
||||
public ActionResult Sample(string fileExt, bool? sample)
|
||||
{
|
||||
var fileName = DocManagerHelper.CreateDemo(fileExt);
|
||||
var fileName = DocManagerHelper.CreateDemo(fileExt, sample ?? false); // create a sample document
|
||||
var id = Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name); // create meta information for the sample document
|
||||
Response.Redirect(Url.Action("Editor", "Home", new { fileName = fileName }));
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1,28 +1,20 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
@ -1,44 +1,37 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Web.Caching;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Script.Serialization;
|
||||
using OnlineEditorsExampleMVC.Models;
|
||||
using System.Net;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public class DocManagerHelper
|
||||
{
|
||||
// get max file size
|
||||
public static long MaxFileSize
|
||||
{
|
||||
get
|
||||
@ -49,70 +42,208 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
// get all the supported file extensions
|
||||
public static List<string> FileExts
|
||||
{
|
||||
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).ToList(); }
|
||||
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).Concat(FillFormExts).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be viewed
|
||||
public static List<string> ViewedExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.viewed-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
public static List<string> FillFormExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.fillform-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be edited
|
||||
public static List<string> EditedExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.edited-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be converted
|
||||
public static List<string> ConvertExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.convert-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
// get current user host address
|
||||
public static string CurUserHostAddress(string userAddress = null)
|
||||
{
|
||||
return Regex.Replace(userAddress ?? HttpContext.Current.Request.UserHostAddress, "[^0-9a-zA-Z.=]", "_");
|
||||
}
|
||||
|
||||
// get the storage path of the file
|
||||
public static string StoragePath(string fileName, string userAddress = null)
|
||||
{
|
||||
var directory = HttpRuntime.AppDomainAppPath + CurUserHostAddress(userAddress) + "\\";
|
||||
var directory = "";
|
||||
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
|
||||
{
|
||||
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
|
||||
}
|
||||
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
return directory + fileName;
|
||||
return directory + (fileName.Contains("\\") ? fileName : Path.GetFileName(fileName));
|
||||
}
|
||||
|
||||
public static string GetCorrectName(string fileName)
|
||||
// get the path to the forcesaved file version
|
||||
public static string ForcesavePath(string fileName, string userAddress, Boolean create)
|
||||
{
|
||||
// create the directory to this file version
|
||||
var directory = "";
|
||||
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
|
||||
{
|
||||
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
|
||||
}
|
||||
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
// create the directory to the history of this file version
|
||||
directory = directory + Path.GetFileName(fileName) + "-hist" + "\\";
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
if (create)
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// get the path to the given file
|
||||
directory = directory + Path.GetFileName(fileName);
|
||||
if (!File.Exists(directory))
|
||||
{
|
||||
if (!create)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
return directory;
|
||||
}
|
||||
|
||||
// get the history directory
|
||||
public static string HistoryDir(string storagePath)
|
||||
{
|
||||
return storagePath += "-hist";
|
||||
}
|
||||
|
||||
// get the path to the file version by the history path and file version
|
||||
public static string VersionDir(string histPath, int version)
|
||||
{
|
||||
return Path.Combine(histPath, version.ToString());
|
||||
}
|
||||
|
||||
// get the path to the file version by the file name, user address and file version
|
||||
public static string VersionDir(string fileName, string userAddress, int version)
|
||||
{
|
||||
return VersionDir(HistoryDir(StoragePath(fileName, userAddress)), version);
|
||||
}
|
||||
|
||||
// get the file version by the history path
|
||||
public static int GetFileVersion(string historyPath)
|
||||
{
|
||||
if (!Directory.Exists(historyPath)) return 1; // if the history path doesn't exist, then the file version is 1
|
||||
return Directory.EnumerateDirectories(historyPath).Count() + 1; // take only directories from the history folder and count them
|
||||
}
|
||||
|
||||
// get the file version by the file name and user address
|
||||
public static int GetFileVersion(string fileName, string userAddress)
|
||||
{
|
||||
return GetFileVersion(HistoryDir(StoragePath(fileName, userAddress)));
|
||||
}
|
||||
|
||||
// get a file name with an index if the file with such a name already exists
|
||||
public static string GetCorrectName(string fileName, string userAddress = null)
|
||||
{
|
||||
var baseName = Path.GetFileNameWithoutExtension(fileName);
|
||||
var ext = Path.GetExtension(fileName);
|
||||
var ext = Path.GetExtension(fileName).ToLower();
|
||||
var name = baseName + ext;
|
||||
|
||||
for (var i = 1; File.Exists(StoragePath(name)); i++)
|
||||
for (var i = 1; File.Exists(StoragePath(name, userAddress)); i++) // run through all the files with such a name in the storage directory
|
||||
{
|
||||
name = baseName + " (" + i + ")" + ext;
|
||||
name = baseName + " (" + i + ")" + ext; // and add an index to the base name
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public static string CreateDemo(string fileExt)
|
||||
// get all the stored files from the user host address
|
||||
public static List<FileInfo> GetStoredFiles()
|
||||
{
|
||||
var demoName = "sample." + fileExt;
|
||||
var directory = "";
|
||||
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
|
||||
{
|
||||
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(null) + "\\";
|
||||
}
|
||||
|
||||
if (!Directory.Exists(directory)) return new List<FileInfo>();
|
||||
|
||||
var fileName = GetCorrectName(demoName);
|
||||
var directoryInfo = new DirectoryInfo(directory);
|
||||
|
||||
File.Copy(HttpRuntime.AppDomainAppPath + "app_data\\" + demoName, StoragePath(fileName));
|
||||
// take files from the root directory
|
||||
List<FileInfo> storedFiles = directoryInfo.GetFiles("*.*", SearchOption.TopDirectoryOnly).ToList();
|
||||
|
||||
return storedFiles;
|
||||
}
|
||||
|
||||
// create demo document
|
||||
public static string CreateDemo(string fileExt, bool withContent)
|
||||
{
|
||||
var demoName = (withContent ? "sample." : "new.") + fileExt; // create sample or new template file with the necessary extension
|
||||
var demoPath = "assets\\" + (withContent ? "sample\\" : "new\\"); // get the path to the sample document
|
||||
|
||||
var fileName = GetCorrectName(demoName); // get a file name with an index if the file with such a name already exists
|
||||
|
||||
File.Copy(HttpRuntime.AppDomainAppPath + demoPath + demoName, StoragePath(fileName)); // copy file to the storage directory
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public static string GetFileUri(string fileName)
|
||||
// create meta information
|
||||
public static void CreateMeta(string fileName, string uid, string uname, string userAddress = null)
|
||||
{
|
||||
var uri = new UriBuilder(HttpContext.Current.Request.Url)
|
||||
var histDir = HistoryDir(StoragePath(fileName, userAddress)); // create history directory
|
||||
Directory.CreateDirectory(histDir);
|
||||
// create createdInfo.json file with meta information in the history directory (creation time, user id and name)
|
||||
File.WriteAllText(Path.Combine(histDir, "createdInfo.json"), new JavaScriptSerializer().Serialize(new Dictionary<string, object> {
|
||||
{ "created", DateTime.Now.ToString("yyyy'-'MM'-'dd HH':'mm':'ss") },
|
||||
{ "id", uid },
|
||||
{ "name", uname }
|
||||
}));
|
||||
}
|
||||
|
||||
// get file url
|
||||
public static string GetFileUri(string fileName, Boolean forDocumentServer)
|
||||
{
|
||||
var uri = new UriBuilder(GetServerUrl(forDocumentServer))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath + "/"
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ CurUserHostAddress() + "/"
|
||||
+ fileName,
|
||||
Query = ""
|
||||
@ -121,9 +252,40 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
return uri.ToString();
|
||||
}
|
||||
|
||||
// get the path url
|
||||
public static string GetPathUri(string path)
|
||||
{
|
||||
var uri = new UriBuilder(GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath + "/" + path,
|
||||
Query = ""
|
||||
};
|
||||
|
||||
return uri.ToString();
|
||||
}
|
||||
|
||||
// get the server url
|
||||
public static string GetServerUrl(Boolean forDocumentServer)
|
||||
{
|
||||
if (forDocumentServer && !WebConfigurationManager.AppSettings["files.docservice.url.example"].Equals(""))
|
||||
{
|
||||
return WebConfigurationManager.AppSettings["files.docservice.url.example"];
|
||||
}
|
||||
else
|
||||
{
|
||||
var uri = new UriBuilder(HttpContext.Current.Request.Url) { Query = "" };
|
||||
var requestHost = HttpContext.Current.Request.Headers["Host"];
|
||||
if (!string.IsNullOrEmpty(requestHost))
|
||||
uri = new UriBuilder(uri.Scheme + "://" + requestHost);
|
||||
|
||||
return uri.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
// get the callback url
|
||||
public static string GetCallback(string fileName)
|
||||
{
|
||||
var callbackUrl = new UriBuilder(HttpContext.Current.Request.Url)
|
||||
var callbackUrl = new UriBuilder(GetServerUrl(true))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
@ -131,24 +293,160 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=track"
|
||||
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
+ "&userAddress=" + HttpUtility.UrlEncode(HttpContext.Current.Request.UserHostAddress)
|
||||
+ "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))
|
||||
};
|
||||
return callbackUrl.ToString();
|
||||
}
|
||||
|
||||
// get url to the created file
|
||||
public static string GetCreateUrl(FileUtility.FileType fileType)
|
||||
{
|
||||
var createUrl = new UriBuilder(GetServerUrl(false))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Sample",
|
||||
Query = "fileExt=" + DocManagerHelper.GetInternalExtension(fileType).Trim('.')
|
||||
};
|
||||
return createUrl.ToString();
|
||||
}
|
||||
|
||||
// create the public history url
|
||||
public static string GetHistoryDownloadUrl(string filename, string version, string file, Boolean isServer = true)
|
||||
{
|
||||
var userAddress = "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress));
|
||||
var downloadUrl = new UriBuilder(GetServerUrl(isServer))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=downloadhistory"
|
||||
+ "&fileName=" + HttpUtility.UrlEncode(filename)
|
||||
+ userAddress
|
||||
+ "&ver=" + version
|
||||
+ "&file="+ file
|
||||
};
|
||||
return downloadUrl.ToString();
|
||||
}
|
||||
|
||||
// get url to download a file
|
||||
public static string GetDownloadUrl(string fileName, Boolean isServer = true)
|
||||
{
|
||||
var userAddress = isServer ? "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)) : "";
|
||||
var downloadUrl = new UriBuilder(GetServerUrl(isServer))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=download"
|
||||
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
+ userAddress
|
||||
};
|
||||
return downloadUrl.ToString();
|
||||
}
|
||||
|
||||
// get an editor internal extension
|
||||
public static string GetInternalExtension(FileUtility.FileType fileType)
|
||||
{
|
||||
switch (fileType)
|
||||
{
|
||||
case FileUtility.FileType.Text:
|
||||
case FileUtility.FileType.Word: // .docx for word file type
|
||||
return ".docx";
|
||||
case FileUtility.FileType.Spreadsheet:
|
||||
case FileUtility.FileType.Cell: // .xlsx for cell file type
|
||||
return ".xlsx";
|
||||
case FileUtility.FileType.Presentation:
|
||||
case FileUtility.FileType.Slide: // .pptx for slide file type
|
||||
return ".pptx";
|
||||
default:
|
||||
return ".docx";
|
||||
return ".docx"; // the default file type is .docx
|
||||
}
|
||||
}
|
||||
|
||||
// get image url for templates
|
||||
public static string GetTemplateImageUrl(FileUtility.FileType fileType)
|
||||
{
|
||||
var path = new UriBuilder(GetServerUrl(true)) // templates image url in the "From Template" section
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Content\\images\\"
|
||||
};
|
||||
switch (fileType)
|
||||
{
|
||||
case FileUtility.FileType.Word: // for word file type
|
||||
return path + "file_docx.svg";
|
||||
case FileUtility.FileType.Cell: // for cell file type
|
||||
return path + "file_xlsx.svg";
|
||||
case FileUtility.FileType.Slide: // for slide file type
|
||||
return path + "file_pptx.svg";
|
||||
default:
|
||||
return path + "file_docx.svg"; // the default value
|
||||
}
|
||||
}
|
||||
|
||||
// get file information
|
||||
public static List<Dictionary<string, object>> GetFilesInfo(string fileId = null)
|
||||
{
|
||||
var files = new List<Dictionary<string, object>>();
|
||||
|
||||
// run through all the stored files
|
||||
foreach (var file in GetStoredFiles())
|
||||
{
|
||||
// write all the parameters to the map
|
||||
var dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("version", GetFileVersion(file.Name, null));
|
||||
dictionary.Add("id", ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + file.Name + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(file.Name, null)).GetHashCode()));
|
||||
dictionary.Add("contentLength", Math.Round(file.Length / 1024.0, 2) + " KB");
|
||||
dictionary.Add("pureContentLength", file.Length);
|
||||
dictionary.Add("title", file.Name);
|
||||
dictionary.Add("updated", file.LastWriteTime.ToString());
|
||||
|
||||
// get file information by its id
|
||||
if (fileId != null)
|
||||
{
|
||||
if (fileId.Equals(dictionary["id"]))
|
||||
{
|
||||
files.Add(dictionary);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
files.Add(dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
// enable certificate ignore
|
||||
public static void VerifySSL()
|
||||
{
|
||||
// hack. http://ubuntuforums.org/showthread.php?t=1841740
|
||||
if(WebConfigurationManager.AppSettings["files.docservice.verify-peer-off"].Equals("true")) {
|
||||
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
|
||||
}
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetLanguages()
|
||||
{
|
||||
var languages = new Dictionary<string, string>();
|
||||
String[] couples = (WebConfigurationManager.AppSettings["files.docservice.languages"] ?? "").Split('|');
|
||||
foreach (string couple in couples)
|
||||
{
|
||||
String[] tmp = couple.Split(':');
|
||||
languages.Add(tmp[0],tmp[1]);
|
||||
}
|
||||
return languages;
|
||||
}
|
||||
|
||||
public static string GetDirectUrl()
|
||||
{
|
||||
string isEnabledDirectUrl = HttpUtility.ParseQueryString(HttpContext.Current.Request.Url.Query).Get("directUrl");
|
||||
return isEnabledDirectUrl != null ? isEnabledDirectUrl : "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,36 +1,30 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
@ -44,7 +38,7 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
/// </summary>
|
||||
static ServiceConverter()
|
||||
{
|
||||
DocumentConverterUrl = WebConfigurationManager.AppSettings["files.docservice.url.converter"] ?? "";
|
||||
DocumentConverterUrl = (WebConfigurationManager.AppSettings["files.docservice.url.site"] ?? "") + (WebConfigurationManager.AppSettings["files.docservice.url.converter"] ?? "");
|
||||
|
||||
Int32.TryParse(WebConfigurationManager.AppSettings["files.docservice.timeout"], out ConvertTimeout);
|
||||
ConvertTimeout = ConvertTimeout > 0 ? ConvertTimeout : 120000;
|
||||
@ -75,7 +69,7 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
/// <param name="documentRevisionId">Key for caching on service</param>
|
||||
/// <param name="isAsync">Perform conversions asynchronously</param>
|
||||
/// <param name="convertedDocumentUri">Uri to the converted document</param>
|
||||
/// <returns>The percentage of completion of conversion</returns>
|
||||
/// <returns>The percentage of conversion completion</returns>
|
||||
/// <example>
|
||||
/// string convertedDocumentUri;
|
||||
/// GetConvertedUri("http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", ".pdf", ".docx", "http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", false, out convertedDocumentUri);
|
||||
@ -87,50 +81,79 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
string toExtension,
|
||||
string documentRevisionId,
|
||||
bool isAsync,
|
||||
out string convertedDocumentUri)
|
||||
out string convertedDocumentUri,
|
||||
string filePass = null,
|
||||
string lang = null)
|
||||
{
|
||||
convertedDocumentUri = string.Empty;
|
||||
|
||||
fromExtension = string.IsNullOrEmpty(fromExtension) ? Path.GetExtension(documentUri) : fromExtension;
|
||||
// check if the fromExtension parameter is defined; if not, get it from the document url
|
||||
fromExtension = string.IsNullOrEmpty(fromExtension) ? Path.GetExtension(documentUri).ToLower() : fromExtension;
|
||||
|
||||
// check if the file name parameter is defined; if not, get random uuid for this file
|
||||
var title = Path.GetFileName(documentUri);
|
||||
title = string.IsNullOrEmpty(title) ? Guid.NewGuid().ToString() : title;
|
||||
|
||||
// get document key
|
||||
documentRevisionId = string.IsNullOrEmpty(documentRevisionId)
|
||||
? documentUri
|
||||
: documentRevisionId;
|
||||
documentRevisionId = GenerateRevisionId(documentRevisionId);
|
||||
|
||||
// specify request parameters
|
||||
var request = (HttpWebRequest)WebRequest.Create(DocumentConverterUrl);
|
||||
request.Method = "POST";
|
||||
request.ContentType = "application/json";
|
||||
request.Accept = "application/json";
|
||||
request.Timeout = ConvertTimeout;
|
||||
|
||||
var bodyString = string.Format("{{\"async\": {0},\"filetype\": \"{1}\",\"key\": \"{2}\",\"outputtype\": \"{3}\",\"title\": \"{4}\",\"url\": \"{5}\"}}",
|
||||
isAsync.ToString().ToLower(),
|
||||
fromExtension.Trim('.'),
|
||||
documentRevisionId,
|
||||
toExtension.Trim('.'),
|
||||
title,
|
||||
documentUri);
|
||||
// write all the necessary parameters to the body object
|
||||
var body = new Dictionary<string, object>() {
|
||||
{ "async", isAsync },
|
||||
{ "filetype", fromExtension.Trim('.') },
|
||||
{ "key", documentRevisionId },
|
||||
{ "outputtype", toExtension.Trim('.') },
|
||||
{ "title", title },
|
||||
{ "url", documentUri },
|
||||
{ "password", filePass },
|
||||
{ "region", lang }
|
||||
};
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(bodyString);
|
||||
request.ContentLength = bytes.Length;
|
||||
using (var requestStream = request.GetRequestStream())
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
requestStream.Write(bytes, 0, bytes.Length);
|
||||
// create payload object
|
||||
var payload = new Dictionary<string, object>
|
||||
{
|
||||
{ "payload", body }
|
||||
};
|
||||
|
||||
var payloadToken = JwtManager.Encode(payload); // encode the payload object to the payload token
|
||||
var bodyToken = JwtManager.Encode(body); // encode the body object to the body token
|
||||
// create header token
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
request.Headers.Add(JWTheader, "Bearer " + payloadToken);
|
||||
|
||||
body.Add("token", bodyToken);
|
||||
}
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(new JavaScriptSerializer().Serialize(body));
|
||||
request.ContentLength = bytes.Length;
|
||||
using (var requestStream = request.GetRequestStream()) // get the request stream
|
||||
{
|
||||
requestStream.Write(bytes, 0, bytes.Length); // and write the serialized body object to it
|
||||
}
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
string dataResponse;
|
||||
using (var response = request.GetResponse())
|
||||
using (var stream = response.GetResponseStream())
|
||||
using (var stream = response.GetResponseStream()) // get the response stream
|
||||
{
|
||||
if (stream == null) throw new Exception("Response is null");
|
||||
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
dataResponse = reader.ReadToEnd();
|
||||
dataResponse = reader.ReadToEnd(); // and read it
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,9 +167,10 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
/// <returns>Supported key</returns>
|
||||
public static string GenerateRevisionId(string expectedKey)
|
||||
{
|
||||
// if the expected key length is greater than 20, it is hashed and a fixed length value is stored in the string format
|
||||
if (expectedKey.Length > 20) expectedKey = expectedKey.GetHashCode().ToString();
|
||||
var key = Regex.Replace(expectedKey, "[^0-9-.a-zA-Z_=]", "_");
|
||||
return key.Substring(key.Length - Math.Min(key.Length, 20));
|
||||
return key.Substring(key.Length - Math.Min(key.Length, 20)); // the resulting key length is 20 or less
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -158,7 +182,7 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
/// </summary>
|
||||
/// <param name="jsonDocumentResponse">The resulting json from editing service</param>
|
||||
/// <param name="responseUri">Uri to the converted document</param>
|
||||
/// <returns>The percentage of completion of conversion</returns>
|
||||
/// <returns>The percentage of conversion completion</returns>
|
||||
private static int GetResponseUri(string jsonDocumentResponse, out string responseUri)
|
||||
{
|
||||
if (string.IsNullOrEmpty(jsonDocumentResponse)) throw new ArgumentException("Invalid param", "jsonDocumentResponse");
|
||||
@ -166,21 +190,22 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
var responseFromService = Json.Decode(jsonDocumentResponse);
|
||||
if (jsonDocumentResponse == null) throw new WebException("Invalid answer format");
|
||||
|
||||
var errorElement = responseFromService.error;
|
||||
if (errorElement != null) ProcessResponseError(Convert.ToInt32(errorElement));
|
||||
var errorElement = responseFromService.error; // if an error occurs
|
||||
if (errorElement != null) ProcessResponseError(Convert.ToInt32(errorElement)); // then get an error message
|
||||
|
||||
// check if the conversion is completed and save the result to a variable
|
||||
var isEndConvert = responseFromService.endConvert;
|
||||
|
||||
int resultPercent;
|
||||
responseUri = string.Empty;
|
||||
if (isEndConvert)
|
||||
if (isEndConvert) // if the conversion is completed
|
||||
{
|
||||
responseUri = responseFromService.fileUrl;
|
||||
responseUri = responseFromService.fileUrl; // get the file url
|
||||
resultPercent = 100;
|
||||
}
|
||||
else
|
||||
else // if the conversion isn't completed
|
||||
{
|
||||
resultPercent = responseFromService.percent;
|
||||
resultPercent = responseFromService.percent; // get the percentage value
|
||||
if (resultPercent >= 100) resultPercent = 99;
|
||||
}
|
||||
|
||||
@ -212,7 +237,7 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
break;
|
||||
case -5:
|
||||
// public const int c_nErrorUnexpectedGuid = -5;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error unexpected guid");
|
||||
errorMessage = String.Format(errorMessageTemplate, "Incorrect password");
|
||||
break;
|
||||
case -4:
|
||||
// public const int c_nErrorDownloadError = -4;
|
||||
|
||||
60
web/documentserver-example/csharp-mvc/Helpers/JwtManager.cs
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using JWT;
|
||||
using JWT.Algorithms;
|
||||
using JWT.Builder;
|
||||
using JWT.Serializers;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Configuration;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public static class JwtManager
|
||||
{
|
||||
private static readonly string Secret;
|
||||
public static readonly bool Enabled;
|
||||
|
||||
static JwtManager()
|
||||
{
|
||||
Secret = WebConfigurationManager.AppSettings["files.docservice.secret"] ?? ""; // get token secret from the config parameters
|
||||
Enabled = !string.IsNullOrEmpty(Secret); // check if the token is enabled
|
||||
}
|
||||
|
||||
// encode a payload object into a token using a secret key
|
||||
public static string Encode(IDictionary<string, object> payload)
|
||||
{
|
||||
var encoder = new JwtEncoder(new HMACSHA256Algorithm(),
|
||||
new JsonNetSerializer(),
|
||||
new JwtBase64UrlEncoder());
|
||||
return encoder.Encode(payload, Secret);
|
||||
}
|
||||
|
||||
// decode a token into a payload object using a secret key
|
||||
public static string Decode(string token)
|
||||
{
|
||||
if (!Enabled || string.IsNullOrEmpty(token)) return "";
|
||||
|
||||
return JwtBuilder.Create()
|
||||
.WithAlgorithm(new HMACSHA256Algorithm())
|
||||
.WithSecret(Secret)
|
||||
.MustVerifySignature()
|
||||
.Decode(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
360
web/documentserver-example/csharp-mvc/Helpers/TrackManager.cs
Normal file
@ -0,0 +1,360 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.Configuration;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Text;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public class TrackManager
|
||||
{
|
||||
// read request body
|
||||
public static Dictionary<string, object> readBody(HttpContext context)
|
||||
{
|
||||
string body;
|
||||
try
|
||||
{
|
||||
// read request body by streams and check if it is correct
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
body = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(body)) context.Response.Write("{\"error\":1,\"message\":\"Request stream is empty\"}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
|
||||
|
||||
// check if the document token is enabled
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
|
||||
string token = null;
|
||||
|
||||
// if the document token is in the data
|
||||
if (fileData.ContainsKey("token"))
|
||||
{
|
||||
token = JwtManager.Decode(fileData["token"].ToString()); // decode it
|
||||
}
|
||||
else if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase)) // if the Authorization header exists
|
||||
{
|
||||
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
|
||||
token = JwtManager.Decode(headerToken); // decode its part after Authorization prefix
|
||||
}
|
||||
else // otherwise, an error occurs
|
||||
{
|
||||
context.Response.Write("{\"error\":1,\"message\":\"JWT expected\"}");
|
||||
}
|
||||
|
||||
if (token != null && !token.Equals("")) // invalid signature error
|
||||
{
|
||||
fileData = jss.Deserialize<Dictionary<string, object>>(token);
|
||||
if (fileData.ContainsKey("payload"))
|
||||
fileData = (Dictionary<string, object>)fileData["payload"];
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Response.Write("{\"error\":1,\"message\":\"JWT validation failed\"}");
|
||||
}
|
||||
}
|
||||
|
||||
return fileData;
|
||||
}
|
||||
|
||||
// file saving process
|
||||
public static int processSave(Dictionary<string, object> fileData, string fileName, string userAddress)
|
||||
{
|
||||
if (string.IsNullOrEmpty((string)fileData["url"])) {
|
||||
throw new Exception("DownloadUrl is null");
|
||||
}
|
||||
var downloadUri = (string)fileData["url"];
|
||||
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
|
||||
|
||||
var downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
|
||||
|
||||
var newFileName = fileName;
|
||||
|
||||
// convert downloaded file to the file with the current extension if these extensions aren't equal
|
||||
if (!curExt.Equals(downloadExt, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
try
|
||||
{
|
||||
// convert file and give url to a new file
|
||||
string newFileUri;
|
||||
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
|
||||
if (string.IsNullOrEmpty(newFileUri))
|
||||
{
|
||||
// get the correct file name if it already exists
|
||||
newFileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
|
||||
}
|
||||
else
|
||||
{
|
||||
downloadUri = newFileUri;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
newFileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
|
||||
}
|
||||
}
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
try
|
||||
{
|
||||
var bytesFile = DownloadFile(downloadUri); // download document file
|
||||
var storagePath = DocManagerHelper.StoragePath(newFileName, userAddress); // get the file path
|
||||
|
||||
var histDir = DocManagerHelper.HistoryDir(storagePath); // get the path to the history directory
|
||||
if (!Directory.Exists(histDir)) Directory.CreateDirectory(histDir);
|
||||
|
||||
var versionDir = DocManagerHelper.VersionDir(histDir, DocManagerHelper.GetFileVersion(histDir)); // get the path to the file version
|
||||
if (!Directory.Exists(versionDir)) Directory.CreateDirectory(versionDir); // if the path doesn't exist, create it
|
||||
|
||||
// get the path to the previous file version and move it to the storage directory
|
||||
File.Move(DocManagerHelper.StoragePath(fileName, userAddress), Path.Combine(versionDir, "prev" + curExt));
|
||||
|
||||
SaveFile(bytesFile, storagePath);// save document file
|
||||
|
||||
byte[] bytesChanges = DownloadFile((string)fileData["changesurl"]); // download changes file
|
||||
SaveFile(bytesChanges, Path.Combine(versionDir, "diff.zip")); // save file changes to the diff.zip archive
|
||||
|
||||
var hist = fileData.ContainsKey("changeshistory") ? (string)fileData["changeshistory"] : null;
|
||||
if (string.IsNullOrEmpty(hist) && fileData.ContainsKey("history"))
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
hist = jss.Serialize(fileData["history"]);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(hist))
|
||||
{
|
||||
File.WriteAllText(Path.Combine(versionDir, "changes.json"), hist); // write the history changes to the changes.json file
|
||||
}
|
||||
|
||||
File.WriteAllText(Path.Combine(versionDir, "key.txt"), (string)fileData["key"]); // write the key value to the key.txt file
|
||||
|
||||
string forcesavePath = DocManagerHelper.ForcesavePath(newFileName, userAddress, false); // get the path to the forcesaved file version
|
||||
if (!forcesavePath.Equals("")) // if the forcesaved file version exists
|
||||
{
|
||||
File.Delete(forcesavePath); // remove it
|
||||
}
|
||||
|
||||
} catch (Exception)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// file force saving process
|
||||
public static int processForceSave(Dictionary<string, object> fileData, string fileName, string userAddress)
|
||||
{
|
||||
if ( string.IsNullOrEmpty((string)fileData["url"])) {
|
||||
throw new Exception("DownloadUrl is null");
|
||||
}
|
||||
var downloadUri = (string)fileData["url"];
|
||||
|
||||
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
|
||||
|
||||
var downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
|
||||
|
||||
Boolean newFileName = false;
|
||||
|
||||
// convert downloaded file to the file with the current extension if these extensions aren't equal
|
||||
if (!curExt.Equals(downloadExt))
|
||||
{
|
||||
try
|
||||
{
|
||||
// convert file and give url to a new file
|
||||
string newFileUri;
|
||||
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
|
||||
if (string.IsNullOrEmpty(newFileUri))
|
||||
{
|
||||
newFileName = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
downloadUri = newFileUri;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
newFileName = true;
|
||||
}
|
||||
}
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
try
|
||||
{
|
||||
var bytesFile = DownloadFile(downloadUri); // download document file
|
||||
|
||||
string forcesavePath = "";
|
||||
Boolean isSubmitForm = fileData["forcesavetype"].ToString().Equals("3"); // SubmitForm
|
||||
|
||||
if (isSubmitForm) // if the form is submitted
|
||||
{
|
||||
if (newFileName)
|
||||
{
|
||||
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + downloadExt, userAddress); // get the correct file name if it already exists
|
||||
} else
|
||||
{
|
||||
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + curExt, userAddress);
|
||||
}
|
||||
forcesavePath = DocManagerHelper.StoragePath(fileName, userAddress);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newFileName)
|
||||
{
|
||||
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
|
||||
}
|
||||
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false);
|
||||
if (string.IsNullOrEmpty(forcesavePath)) // create forcesave path if it doesn't exist
|
||||
{
|
||||
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, true);
|
||||
}
|
||||
}
|
||||
|
||||
SaveFile(bytesFile, forcesavePath);// save document file
|
||||
|
||||
if (isSubmitForm)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
var actions = jss.Deserialize<List<object>>(jss.Serialize(fileData["actions"]));
|
||||
var action = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(actions[0]));
|
||||
var user = action["userid"].ToString(); // get the user id
|
||||
DocManagerHelper.CreateMeta(fileName, user, "Filling Form", userAddress); // create meta data for the forcesaved file
|
||||
}
|
||||
} catch (Exception)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// create a command request
|
||||
public static void commandRequest(string method, string key, object meta = null)
|
||||
{
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
string documentCommandUrl = WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.command"];
|
||||
|
||||
var request = (HttpWebRequest)WebRequest.Create(documentCommandUrl);
|
||||
request.Method = "POST";
|
||||
request.ContentType = "application/json";
|
||||
|
||||
var body = new Dictionary<string, object>() {
|
||||
{ "c", method },
|
||||
{ "key", key }
|
||||
};
|
||||
|
||||
if (meta != null)
|
||||
{
|
||||
body.Add("meta", meta);
|
||||
}
|
||||
|
||||
// check if a secret key to generate token exists or not
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
var payload = new Dictionary<string, object>
|
||||
{
|
||||
{ "payload", body }
|
||||
};
|
||||
|
||||
var payloadToken = JwtManager.Encode(payload); // encode a payload object into a header token
|
||||
var bodyToken = JwtManager.Encode(body); // encode body into a body token
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
request.Headers.Add(JWTheader, "Bearer " + payloadToken); // add a header Authorization with a header token and Authorization prefix in it
|
||||
|
||||
body.Add("token", bodyToken);
|
||||
}
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(new JavaScriptSerializer().Serialize(body));
|
||||
request.ContentLength = bytes.Length;
|
||||
using (var requestStream = request.GetRequestStream())
|
||||
{
|
||||
// write bytes to the output stream
|
||||
requestStream.Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
string dataResponse;
|
||||
using (var response = request.GetResponse()) // get the response
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
if (stream == null) throw new Exception("Response is null");
|
||||
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
dataResponse = reader.ReadToEnd(); // and read it
|
||||
}
|
||||
}
|
||||
|
||||
// convert stream to json string
|
||||
var jss = new JavaScriptSerializer();
|
||||
var responseObj = jss.Deserialize<Dictionary<string, object>>(dataResponse);
|
||||
if (!responseObj["error"].ToString().Equals("0"))
|
||||
{
|
||||
throw new Exception(dataResponse);
|
||||
}
|
||||
}
|
||||
|
||||
// save file
|
||||
private static void SaveFile(byte[] data, string path)
|
||||
{
|
||||
using (var fs = File.Open(path, FileMode.Create))
|
||||
{
|
||||
fs.Write(data, 0, data.Length);
|
||||
}
|
||||
}
|
||||
|
||||
// save file information from the url to the file specified
|
||||
private static byte[] DownloadFile(string url)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url)) throw new ArgumentException("url"); // url isn't specified
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(url);
|
||||
req.Timeout = 5000;
|
||||
using (var stream = req.GetResponse().GetResponseStream()) // get input stream of the file information from the url
|
||||
{
|
||||
if (stream == null) throw new Exception("stream is null");
|
||||
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
stream.CopyTo(memoryStream);
|
||||
return memoryStream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
204
web/documentserver-example/csharp-mvc/Helpers/Users.cs
Normal file
@ -0,0 +1,204 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public class Users
|
||||
{
|
||||
static List<string> descr_user_1 = new List<string>()
|
||||
{
|
||||
"File author by default",
|
||||
"Doesn’t belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"The file favorite state is undefined",
|
||||
"Can create files from templates using data from the editor",
|
||||
"Can see the information about all users"
|
||||
};
|
||||
|
||||
static List<string> descr_user_2 = new List<string>()
|
||||
{
|
||||
"Belongs to Group2",
|
||||
"Can review only his own changes or changes made by users with no group",
|
||||
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
|
||||
"This file is marked as favorite",
|
||||
"Can create new files from the editor",
|
||||
"Can see the information about users from Group2 and users who don’t belong to any group"
|
||||
};
|
||||
|
||||
static List<string> descr_user_3 = new List<string>()
|
||||
{
|
||||
"Belongs to Group3",
|
||||
"Can review changes made by Group2 users",
|
||||
"Can view comments left by Group2 and Group3 users. Can edit comments left by the Group2 users",
|
||||
"This file isn’t marked as favorite",
|
||||
"Can’t copy data from the file to clipboard",
|
||||
"Can’t download the file",
|
||||
"Can’t print the file",
|
||||
"Can create new files from the editor",
|
||||
"Can see the information about Group2 users"
|
||||
};
|
||||
|
||||
static List<string> descr_user_0 = new List<string>()
|
||||
{
|
||||
"The name is requested when the editor is opened",
|
||||
"Doesn’t belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"The file favorite state is undefined",
|
||||
"Can't mention others in comments",
|
||||
"Can't create new files from the editor",
|
||||
"Can’t see anyone’s information",
|
||||
"Can't rename files from the editor",
|
||||
"Can't view chat",
|
||||
"View file without collaboration",
|
||||
};
|
||||
|
||||
private static List<User> users = new List<User>() {
|
||||
new User(
|
||||
"uid-1",
|
||||
"John Smith",
|
||||
"smith@example.com",
|
||||
"",
|
||||
null,
|
||||
new Dictionary<string, object>(),
|
||||
null,
|
||||
null,
|
||||
new List<string>(),
|
||||
descr_user_1,
|
||||
true
|
||||
),
|
||||
new User(
|
||||
"uid-2",
|
||||
"Mark Pottato",
|
||||
"pottato@example.com",
|
||||
"group-2",
|
||||
new List<string>() { "group-2", "" },
|
||||
new Dictionary<string, object>()
|
||||
{
|
||||
{ "view", "" },
|
||||
{ "edit", new List<string>() { "group-2", "" } },
|
||||
{ "remove", new List<string>() { "group-2" } }
|
||||
},
|
||||
new List<string>() { "group-2", "" },
|
||||
true,
|
||||
new List<string>(),
|
||||
descr_user_2,
|
||||
false
|
||||
),
|
||||
new User(
|
||||
"uid-3",
|
||||
"Hamish Mitchell",
|
||||
"mitchell@example.com",
|
||||
"group-3",
|
||||
new List<string>() { "group-2" },
|
||||
new Dictionary<string,object>()
|
||||
{
|
||||
{ "view", new List<string>() { "group-2", "group-3" } },
|
||||
{ "edit", new List<string>() { "group-2" } },
|
||||
{ "remove", new List<string>() { } }
|
||||
},
|
||||
new List<string>() { "group-2" },
|
||||
false,
|
||||
new List<string>() { "copy", "download", "print" },
|
||||
descr_user_3,
|
||||
false
|
||||
),
|
||||
new User(
|
||||
"uid-0",
|
||||
null,
|
||||
null,
|
||||
"",
|
||||
null,
|
||||
new Dictionary<string,object>(),
|
||||
new List<string>(),
|
||||
null,
|
||||
new List<string>(),
|
||||
descr_user_0,
|
||||
false
|
||||
)
|
||||
};
|
||||
|
||||
// get a user by id specified
|
||||
public static User getUser(string id)
|
||||
{
|
||||
foreach(User user in users)
|
||||
{
|
||||
if (user.id.Equals(id)) return user;
|
||||
}
|
||||
return users[0];
|
||||
}
|
||||
|
||||
// get a list of all the users
|
||||
public static List<User> getAllUsers()
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
// get a list of users with their names and emails for mentions
|
||||
public static List<Dictionary<string, object>> getUsersForMentions(string id)
|
||||
{
|
||||
List<Dictionary<string, object>> usersData = new List<Dictionary<string, object>>();
|
||||
foreach (User user in users)
|
||||
{
|
||||
if (!user.id.Equals(id) && user.name != null && user.email != null)
|
||||
{
|
||||
usersData.Add(new Dictionary<string, object>()
|
||||
{
|
||||
{"name", user.name },
|
||||
{"email", user.email }
|
||||
});
|
||||
}
|
||||
}
|
||||
return usersData;
|
||||
}
|
||||
}
|
||||
|
||||
public class User
|
||||
{
|
||||
public string id;
|
||||
public string name;
|
||||
public string email;
|
||||
public string group;
|
||||
public List<string> reviewGroups;
|
||||
public Dictionary<string, object> commentGroups;
|
||||
public bool? favorite;
|
||||
public List<string> deniedPermissions;
|
||||
public List<string> descriptions;
|
||||
public bool templates;
|
||||
public List<string> userInfoGroups;
|
||||
|
||||
public User(string id, string name, string email, string group, List<string> reviewGroups, Dictionary<string, object> commentGroups, List<string> userInfoGroups, bool? favorite, List<string> deniedPermissions, List<string> descriptions, bool templates)
|
||||
{
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.email = email;
|
||||
this.group = group;
|
||||
this.reviewGroups = reviewGroups;
|
||||
this.commentGroups = commentGroups;
|
||||
this.favorite = favorite;
|
||||
this.deniedPermissions = deniedPermissions;
|
||||
this.descriptions = descriptions;
|
||||
this.templates = templates;
|
||||
this.userInfoGroups = userInfoGroups;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
web/documentserver-example/csharp-mvc/Helpers/Utils.cs
Normal file
@ -0,0 +1,41 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Web;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
// get the request header or return the default one
|
||||
public static string GetOrDefault(this HttpRequest request, string header, string def)
|
||||
{
|
||||
var value = request[header];
|
||||
if (value != null) return value;
|
||||
return def;
|
||||
}
|
||||
|
||||
// get a cookie from the cookie collection or return the default one
|
||||
public static string GetOrDefault(this HttpCookieCollection cookies, string cookie, string def)
|
||||
{
|
||||
var cook = cookies[cookie];
|
||||
if (cook != null && !string.IsNullOrEmpty(cook.Value)) return cook.Value;
|
||||
return def;
|
||||
}
|
||||
}
|
||||
}
|
||||
201
web/documentserver-example/csharp-mvc/LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
476
web/documentserver-example/csharp-mvc/Models/FileModel.cs
Normal file → Executable file
@ -1,60 +1,482 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Script.Serialization;
|
||||
using OnlineEditorsExampleMVC.Helpers;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Models
|
||||
{
|
||||
// create file model
|
||||
public class FileModel
|
||||
{
|
||||
public bool TypeDesktop { get; set; }
|
||||
public string Mode { get; set; } // editor mode
|
||||
public string Type { get; set; } // editor type
|
||||
public bool IsEnabledDirectUrl { get; set; } // is enabled direct url
|
||||
|
||||
// get file url for Document Server
|
||||
public string FileUri
|
||||
{
|
||||
get { return DocManagerHelper.GetFileUri(FileName); }
|
||||
get { return DocManagerHelper.GetFileUri(FileName, true); }
|
||||
}
|
||||
|
||||
public string FileName { get; set; }
|
||||
// get file url for user
|
||||
public string FileUriUser
|
||||
{
|
||||
get { return Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? DownloadUrl + "&dmode=emb" : DocManagerHelper.GetFileUri(FileName, false); }
|
||||
}
|
||||
|
||||
public string FileName { get; set; } // file name
|
||||
|
||||
// get document type
|
||||
public string DocumentType
|
||||
{
|
||||
get { return FileUtility.GetFileType(FileName).ToString().ToLower(); }
|
||||
}
|
||||
|
||||
// get document key
|
||||
public string Key
|
||||
{
|
||||
get { return ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + FileName); }
|
||||
get { return ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + FileName + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(FileName, null)).GetHashCode()); }
|
||||
}
|
||||
|
||||
// get the callback url
|
||||
public string CallbackUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return DocManagerHelper.GetCallback(FileName);
|
||||
get { return DocManagerHelper.GetCallback(FileName); }
|
||||
}
|
||||
|
||||
public string DownloadUrl
|
||||
{
|
||||
get { return DocManagerHelper.GetDownloadUrl(FileName); }
|
||||
}
|
||||
|
||||
// get the document config
|
||||
public string GetDocConfig(HttpRequest request, UrlHelper url)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
var ext = Path.GetExtension(FileName).ToLower(); // get file extension
|
||||
var editorsMode = Mode ?? "edit"; // get editor mode
|
||||
|
||||
var canEdit = DocManagerHelper.EditedExts.Contains(ext); // check if the file with such an extension can be edited
|
||||
|
||||
var id = request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id); // get the user
|
||||
|
||||
if ((!canEdit && editorsMode.Equals("edit") || editorsMode.Equals("fillForms")) && DocManagerHelper.FillFormExts.Contains(ext)) {
|
||||
editorsMode = "fillForms";
|
||||
canEdit = true;
|
||||
}
|
||||
var submitForm = editorsMode.Equals("fillForms") && id.Equals("uid-1") && false; // check if the Submit form button is displayed or not
|
||||
var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // set the mode parameter: change it to view if the document can't be edited
|
||||
|
||||
// favorite icon state
|
||||
bool? favorite = user.favorite;
|
||||
|
||||
var actionLink = request.GetOrDefault("actionLink", null); // get the action link (comment or bookmark) if it exists
|
||||
var actionData = string.IsNullOrEmpty(actionLink) ? null : jss.DeserializeObject(actionLink); // get action data for the action link
|
||||
|
||||
var directUrl = DocManagerHelper.GetDownloadUrl(FileName, false);
|
||||
var createUrl = DocManagerHelper.GetCreateUrl(FileUtility.GetFileType(FileName));
|
||||
var templatesImageUrl = DocManagerHelper.GetTemplateImageUrl(FileUtility.GetFileType(FileName)); // image url for templates
|
||||
var templates = new List<Dictionary<string, string>>
|
||||
{
|
||||
new Dictionary<string, string>()
|
||||
{
|
||||
{ "image", "" },
|
||||
{ "title", "Blank" },
|
||||
{ "url", createUrl },
|
||||
},
|
||||
new Dictionary<string, string>()
|
||||
{
|
||||
{ "image", templatesImageUrl },
|
||||
{ "title", "With sample content" },
|
||||
{ "url", createUrl + "&sample=true" },
|
||||
}
|
||||
};
|
||||
|
||||
// specify the document config
|
||||
var config = new Dictionary<string, object>
|
||||
{
|
||||
{ "type", Type ?? "desktop" },
|
||||
{ "documentType", DocumentType },
|
||||
{
|
||||
"document", new Dictionary<string, object>
|
||||
{
|
||||
{ "title", FileName },
|
||||
{ "url", DownloadUrl },
|
||||
{ "directUrl", IsEnabledDirectUrl ? directUrl : "" },
|
||||
{ "fileType", ext.Trim('.') },
|
||||
{ "key", Key },
|
||||
{
|
||||
"info", new Dictionary<string, object>
|
||||
{
|
||||
{ "owner", "Me" },
|
||||
{ "uploaded", DateTime.Now.ToShortDateString() },
|
||||
{ "favorite", favorite}
|
||||
}
|
||||
},
|
||||
{
|
||||
// the permission for the document to be edited and downloaded or not
|
||||
"permissions", new Dictionary<string, object>
|
||||
{
|
||||
{ "comment", editorsMode != "view" && editorsMode != "fillForms" && editorsMode != "embedded" && editorsMode != "blockcontent" },
|
||||
{ "copy", !user.deniedPermissions.Contains("copy") },
|
||||
{ "download", !user.deniedPermissions.Contains("download") },
|
||||
{ "edit", canEdit && (editorsMode == "edit" || editorsMode == "view" || editorsMode == "filter" || editorsMode == "blockcontent") },
|
||||
{ "print", !user.deniedPermissions.Contains("print") },
|
||||
{ "fillForms", editorsMode != "view" && editorsMode != "comment" && editorsMode != "embedded" && editorsMode != "blockcontent" },
|
||||
{ "modifyFilter", editorsMode != "filter" },
|
||||
{ "modifyContentControl", editorsMode != "blockcontent" },
|
||||
{ "review", canEdit && (editorsMode == "edit" || editorsMode == "review") },
|
||||
{ "chat", !user.id.Equals("uid-0") },
|
||||
{ "reviewGroups", user.reviewGroups },
|
||||
{ "commentGroups", user.commentGroups },
|
||||
{ "userInfoGroups", user.userInfoGroups }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"editorConfig", new Dictionary<string, object>
|
||||
{
|
||||
{ "actionLink", actionData },
|
||||
{ "mode", mode },
|
||||
{ "lang", request.Cookies.GetOrDefault("ulang", "en") },
|
||||
{ "callbackUrl", CallbackUrl }, // absolute URL to the document storage service
|
||||
{ "coEditing", editorsMode == "view" && user.id.Equals("uid-0") ?
|
||||
new Dictionary<string, object>{
|
||||
{"mode", "strict"},
|
||||
{"change", false}
|
||||
} : null },
|
||||
{ "createUrl", !user.id.Equals("uid-0") ? createUrl : null },
|
||||
{ "templates", user.templates ? templates : null },
|
||||
{
|
||||
// the user currently viewing or editing the document
|
||||
"user", new Dictionary<string, object>
|
||||
{
|
||||
{ "id", !user.id.Equals("uid-0") ? user.id : null },
|
||||
{ "name", user.name },
|
||||
{ "group", user.group }
|
||||
}
|
||||
},
|
||||
{
|
||||
// the parameters for the embedded document type
|
||||
"embedded", new Dictionary<string, object>
|
||||
{
|
||||
{ "saveUrl", directUrl }, // the absolute URL that will allow the document to be saved onto the user personal computer
|
||||
{ "embedUrl", directUrl }, // the absolute URL to the document serving as a source file for the document embedded into the web page
|
||||
{ "shareUrl", directUrl }, // the absolute URL that will allow other users to share this document
|
||||
{ "toolbarDocked", "top" } // the place for the embedded viewer toolbar (top or bottom)
|
||||
}
|
||||
},
|
||||
{
|
||||
// the parameters for the editor interface
|
||||
"customization", new Dictionary<string, object>
|
||||
{
|
||||
{ "about", true }, // the About section display
|
||||
{ "comments", true },
|
||||
{ "feedback", true }, // the Feedback & Support menu button display
|
||||
{ "forcesave", false }, // adds the request for the forced file saving to the callback handler
|
||||
{ "submitForm", submitForm }, // if the Submit form button is displayed or not
|
||||
{
|
||||
"goback", new Dictionary<string, object> // settings for the Open file location menu button and upper right corner button
|
||||
{
|
||||
{ "url", DocManagerHelper.GetServerUrl(false) } // the absolute URL to the website address which will be opened when clicking the Open file location menu button
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// if the secret key to generate token exists
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
// encode the document config into a token
|
||||
var token = JwtManager.Encode(config);
|
||||
config.Add("token", token);
|
||||
}
|
||||
|
||||
return jss.Serialize(config);
|
||||
}
|
||||
|
||||
// get the document history
|
||||
public void GetHistory(out string history, out string historyData)
|
||||
{
|
||||
var storagePath = WebConfigurationManager.AppSettings["storage-path"];
|
||||
var jss = new JavaScriptSerializer();
|
||||
var histDir = DocManagerHelper.HistoryDir(DocManagerHelper.StoragePath(FileName, null));
|
||||
|
||||
history = null;
|
||||
historyData = null;
|
||||
|
||||
if (DocManagerHelper.GetFileVersion(histDir) > 0) // if the file was modified (the file version is greater than 0)
|
||||
{
|
||||
var currentVersion = DocManagerHelper.GetFileVersion(histDir);
|
||||
var hist = new List<Dictionary<string, object>>();
|
||||
var histData = new Dictionary<string, object>();
|
||||
|
||||
for (var i = 1; i <= currentVersion; i++) // run through all the file versions
|
||||
{
|
||||
var obj = new Dictionary<string, object>();
|
||||
var dataObj = new Dictionary<string, object>();
|
||||
var verDir = DocManagerHelper.VersionDir(histDir, i); // get the path to the given file version
|
||||
|
||||
var key = i == currentVersion ? Key : File.ReadAllText(Path.Combine(verDir, "key.txt")); // get document key
|
||||
|
||||
obj.Add("key", key);
|
||||
obj.Add("version", i);
|
||||
|
||||
if (i == 1) // check if the version number is equal to 1
|
||||
{
|
||||
var infoPath = Path.Combine(histDir, "createdInfo.json"); // get meta data of this file
|
||||
|
||||
if (File.Exists(infoPath))
|
||||
{
|
||||
var info = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(infoPath));
|
||||
obj.Add("created", info["created"]); // write meta information to the object (user information and creation date)
|
||||
obj.Add("user", new Dictionary<string, object>() {
|
||||
{ "id", info["id"] },
|
||||
{ "name", info["name"] },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var ext = Path.GetExtension(FileName).ToLower();
|
||||
dataObj.Add("fileType", ext.Replace(".", ""));
|
||||
dataObj.Add("key", key);
|
||||
// write file url to the data object
|
||||
string prevFileUrl;
|
||||
string directPrevFileUrl;
|
||||
if (Path.IsPathRooted(storagePath) && !string.IsNullOrEmpty(storagePath))
|
||||
{
|
||||
prevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext)
|
||||
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""));
|
||||
directPrevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext, false)
|
||||
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""), false);
|
||||
}
|
||||
else {
|
||||
prevFileUrl = i == currentVersion ? FileUri
|
||||
: DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext);
|
||||
directPrevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext, false)
|
||||
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""), false);
|
||||
}
|
||||
|
||||
dataObj.Add("url", prevFileUrl);
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
dataObj.Add("directUrl", directPrevFileUrl);
|
||||
}
|
||||
dataObj.Add("version", i);
|
||||
if (i > 1) // check if the version number is greater than 1 (the file was modified)
|
||||
{
|
||||
// get the path to the changes.json file
|
||||
var changes = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(Path.Combine(DocManagerHelper.VersionDir(histDir, i - 1), "changes.json")));
|
||||
var changesArray = (ArrayList)changes["changes"];
|
||||
var change = changesArray.Count > 0
|
||||
? (Dictionary<string, object>)changesArray[0]
|
||||
: new Dictionary<string, object>();
|
||||
|
||||
// write information about changes to the object
|
||||
obj.Add("changes", change.Count > 0 ? changes["changes"] : null);
|
||||
obj.Add("serverVersion", changes["serverVersion"]);
|
||||
obj.Add("created", change.Count > 0 ? change["created"] : null);
|
||||
obj.Add("user", change.Count > 0 ? change["user"] : null);
|
||||
|
||||
var prev = (Dictionary<string, object>)histData[(i - 2).ToString()]; // get the history data from the previous file version
|
||||
dataObj.Add("previous", IsEnabledDirectUrl ? new Dictionary<string, object>() { // write information about previous file version to the data object with direct url
|
||||
{ "fileType", prev["fileType"] },
|
||||
{ "key", prev["key"] }, // write key and url information about previous file version
|
||||
{ "url", prev["url"] },
|
||||
{ "directUrl", prev["directUrl"] },
|
||||
} : new Dictionary<string, object>() { // write information about previous file version to the data object without direct url
|
||||
{ "fileType", prev["fileType"] },
|
||||
{ "key", prev["key"] }, // write key and url information about previous file version
|
||||
{ "url", prev["url"] },
|
||||
});
|
||||
// write the path to the diff.zip archive with differences in this file version
|
||||
var changesUrl = DocManagerHelper.GetHistoryDownloadUrl(FileName, (i - 1).ToString(), "diff.zip");
|
||||
dataObj.Add("changesUrl", changesUrl);
|
||||
}
|
||||
if(JwtManager.Enabled)
|
||||
{
|
||||
var token = JwtManager.Encode(dataObj);
|
||||
dataObj.Add("token", token);
|
||||
}
|
||||
hist.Add(obj); // add object dictionary to the hist list
|
||||
histData.Add((i - 1).ToString(), dataObj); // write data object information to the history data
|
||||
}
|
||||
|
||||
// write history information about the current file version to the history object
|
||||
history = jss.Serialize(new Dictionary<string, object>()
|
||||
{
|
||||
{ "currentVersion", currentVersion },
|
||||
{ "history", hist }
|
||||
});
|
||||
historyData = jss.Serialize(histData);
|
||||
}
|
||||
}
|
||||
|
||||
// get a document which will be compared with the current document
|
||||
public void GetCompareFileData(out string compareConfig)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
// get the path to the compared file
|
||||
var compareFileUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx")
|
||||
};
|
||||
|
||||
var directCompareFileUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx")
|
||||
};
|
||||
|
||||
// create an object with the information about the compared file
|
||||
var dataCompareFile = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "docx" },
|
||||
{ "url", compareFileUrl.ToString() }
|
||||
};
|
||||
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
dataCompareFile.Add("directUrl", directCompareFileUrl.ToString());
|
||||
}
|
||||
|
||||
if (JwtManager.Enabled) // if the secret key to generate token exists
|
||||
{
|
||||
var compareFileToken = JwtManager.Encode(dataCompareFile); // encode the dataCompareFile object into the token
|
||||
dataCompareFile.Add("token", compareFileToken); // and add it to the dataCompareFile object
|
||||
}
|
||||
|
||||
compareConfig = jss.Serialize(dataCompareFile);
|
||||
}
|
||||
|
||||
// get a logo config
|
||||
public void GetLogoConfig(out string logoUrl)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
// get the path to the logo image
|
||||
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Content\\images\\logo.png"
|
||||
};
|
||||
|
||||
var directMailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Content\\images\\logo.png"
|
||||
};
|
||||
|
||||
// create a logo config
|
||||
var logoConfig = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "png"},
|
||||
{ "url", mailMergeUrl.ToString()}
|
||||
};
|
||||
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
logoConfig.Add("directUrl", directMailMergeUrl.ToString());
|
||||
}
|
||||
|
||||
if (JwtManager.Enabled) // if the secret key to generate token exists
|
||||
{
|
||||
var token = JwtManager.Encode(logoConfig); // encode logoConfig into the token
|
||||
logoConfig.Add("token", token); // and add it to the logo config
|
||||
}
|
||||
|
||||
logoUrl = jss.Serialize(logoConfig).Replace("{", "").Replace("}", "");
|
||||
}
|
||||
|
||||
// get a mail merge config
|
||||
public void GetMailMergeConfig(out string dataMailMergeRecipients)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
// get the path to the recipients data for mail merging
|
||||
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=csv"
|
||||
};
|
||||
|
||||
var directMailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=csv"
|
||||
};
|
||||
|
||||
// create a mail merge config
|
||||
var mailMergeConfig = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "csv" },
|
||||
{ "url", mailMergeUrl.ToString()}
|
||||
};
|
||||
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
mailMergeConfig.Add("directUrl", directMailMergeUrl.ToString());
|
||||
}
|
||||
|
||||
if (JwtManager.Enabled) // if the secret key to generate token exists
|
||||
{
|
||||
var mailmergeToken = JwtManager.Encode(mailMergeConfig); // encode mailMergeConfig into the token
|
||||
mailMergeConfig.Add("token", mailmergeToken); // and add it to the mail merge config
|
||||
}
|
||||
|
||||
dataMailMergeRecipients = jss.Serialize(mailMergeConfig);
|
||||
}
|
||||
|
||||
//get a users for mentions
|
||||
public void GetUsersMentions(HttpRequest request, out string usersForMentions)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
var id = request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
usersForMentions = !user.id.Equals("uid-0") ? jss.Serialize(Users.getUsersForMentions(user.id)) : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,28 +1,20 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -33,38 +25,42 @@ namespace OnlineEditorsExampleMVC.Models
|
||||
{
|
||||
public enum FileType
|
||||
{
|
||||
Text,
|
||||
Spreadsheet,
|
||||
Presentation
|
||||
Word,
|
||||
Cell,
|
||||
Slide
|
||||
}
|
||||
|
||||
// get file type
|
||||
public static FileType GetFileType(string fileName)
|
||||
{
|
||||
var ext = Path.GetExtension(fileName).ToLower();
|
||||
|
||||
if (ExtsDocument.Contains(ext)) return FileType.Text;
|
||||
if (ExtsSpreadsheet.Contains(ext)) return FileType.Spreadsheet;
|
||||
if (ExtsPresentation.Contains(ext)) return FileType.Presentation;
|
||||
if (ExtsDocument.Contains(ext)) return FileType.Word; // word type for document extensions
|
||||
if (ExtsSpreadsheet.Contains(ext)) return FileType.Cell; // cell type for spreadsheet extensions
|
||||
if (ExtsPresentation.Contains(ext)) return FileType.Slide; // slide type for presentation extensions
|
||||
|
||||
return FileType.Text;
|
||||
return FileType.Word; // the default type is word
|
||||
}
|
||||
|
||||
// document extensions
|
||||
public static readonly List<string> ExtsDocument = new List<string>
|
||||
{
|
||||
".doc", ".docx", ".docm",
|
||||
".dot", ".dotx", ".dotm",
|
||||
".odt", ".fodt", ".ott", ".rtf", ".txt",
|
||||
".html", ".htm", ".mht",
|
||||
".pdf", ".djvu", ".fb2", ".epub", ".xps"
|
||||
".html", ".htm", ".mht", ".xml",
|
||||
".pdf", ".djvu", ".fb2", ".epub", ".xps", ".oxps", ".oform"
|
||||
};
|
||||
|
||||
// spreadsheet extensions
|
||||
public static readonly List<string> ExtsSpreadsheet = new List<string>
|
||||
{
|
||||
".xls", ".xlsx", ".xlsm",
|
||||
".xls", ".xlsx", ".xlsm", ".xlsb",
|
||||
".xlt", ".xltx", ".xltm",
|
||||
".ods", ".fods", ".ots", ".csv"
|
||||
};
|
||||
|
||||
// presentation extensions
|
||||
public static readonly List<string> ExtsPresentation = new List<string>
|
||||
{
|
||||
".pps", ".ppsx", ".ppsm",
|
||||
|
||||
@ -13,13 +13,17 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OnlineEditorsExampleMVC</RootNamespace>
|
||||
<AssemblyName>OnlineEditorsExampleMVC</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<Use64BitIISExpress />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -39,90 +43,60 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="JWT, Version=9.0.0.0, Culture=neutral, PublicKeyToken=6f98bca0f40f2ecf, processorArchitecture=MSIL">
|
||||
<HintPath>packages\JWT.9.0.3\lib\net46\JWT.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Entity" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="EntityFramework">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\EntityFramework.dll</HintPath>
|
||||
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Mvc.FixedDisplayModes">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http">
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Net.Http.Formatting.dll</HintPath>
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.WebRequest">
|
||||
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.Http.dll</HintPath>
|
||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.Http.WebHost.dll</HintPath>
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.Mvc.dll</HintPath>
|
||||
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.Optimization.dll</HintPath>
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Providers">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.Providers.dll</HintPath>
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.Razor.dll</HintPath>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.Helpers.dll</HintPath>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebGrease">
|
||||
<Private>True</Private>
|
||||
<HintPath>bin\WebGrease.dll</HintPath>
|
||||
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -134,8 +108,12 @@
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\TrackManager.cs" />
|
||||
<Compile Include="Helpers\DocManagerHelper.cs" />
|
||||
<Compile Include="Helpers\DocumentConverter.cs" />
|
||||
<Compile Include="Helpers\JwtManager.cs" />
|
||||
<Compile Include="Helpers\Users.cs" />
|
||||
<Compile Include="Helpers\Utils.cs" />
|
||||
<Compile Include="Models\FileModel.cs" />
|
||||
<Compile Include="Models\FileUtility.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@ -145,22 +123,42 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\editor.css" />
|
||||
<Content Include="Content\images\alert.png" />
|
||||
<Content Include="Content\images\close.png" />
|
||||
<Content Include="Content\images\corner.png" />
|
||||
<Content Include="Content\images\done.png" />
|
||||
<Content Include="Content\images\file_docx.png" />
|
||||
<Content Include="Content\images\file_pptx.png" />
|
||||
<Content Include="Content\images\file_xlsx.png" />
|
||||
<Content Include="Content\images\block-content.svg" />
|
||||
<Content Include="Content\images\cell.ico" />
|
||||
<Content Include="Content\images\close.svg" />
|
||||
<Content Include="Content\images\comment.svg" />
|
||||
<Content Include="Content\images\delete.svg" />
|
||||
<Content Include="Content\images\desktop.svg" />
|
||||
<Content Include="Content\images\done.svg" />
|
||||
<Content Include="Content\images\download.svg" />
|
||||
<Content Include="Content\images\embeded.svg" />
|
||||
<Content Include="Content\images\error.svg" />
|
||||
<Content Include="Content\images\file_docx.svg" />
|
||||
<Content Include="Content\images\file_docxf.svg" />
|
||||
<Content Include="Content\images\file_pptx.svg" />
|
||||
<Content Include="Content\images\file_upload.svg" />
|
||||
<Content Include="Content\images\file_xlsx.svg" />
|
||||
<Content Include="Content\images\fill-forms.svg" />
|
||||
<Content Include="Content\images\filter.svg" />
|
||||
<Content Include="Content\images\icon_docx.svg" />
|
||||
<Content Include="Content\images\icon_pptx.svg" />
|
||||
<Content Include="Content\images\icon_xlsx.svg" />
|
||||
<Content Include="Content\images\info.svg" />
|
||||
<Content Include="Content\images\loader16.gif" />
|
||||
<Content Include="Content\images\logo.png" />
|
||||
<Content Include="Content\images\question_small.png" />
|
||||
<Content Include="Content\images\logo.svg" />
|
||||
<Content Include="Content\images\mobile-fill-forms.svg" />
|
||||
<Content Include="Content\images\mobile.svg" />
|
||||
<Content Include="Content\images\notdone.svg" />
|
||||
<Content Include="Content\images\review.svg" />
|
||||
<Content Include="Content\images\slide.ico" />
|
||||
<Content Include="Content\images\word.ico" />
|
||||
<Content Include="Content\jquery-ui.css" />
|
||||
<Content Include="Content\media.css" />
|
||||
<Content Include="Content\stylesheet.css" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="LICENSE.txt" />
|
||||
<Content Include="ReadMe.txt" />
|
||||
<Content Include="LICENSE" />
|
||||
<Content Include="Scripts\jquery-1.8.2.js" />
|
||||
<Content Include="Scripts\jquery-ui.js" />
|
||||
<Content Include="Scripts\jquery.blockUI.js" />
|
||||
@ -178,20 +176,31 @@
|
||||
<Content Include="licenses\EntityFramework.license" />
|
||||
<Content Include="licenses\Microsoft.Web.Infrastructure.license" />
|
||||
<Content Include="licenses\Newtonsoft.Json.license" />
|
||||
<Content Include="licenses\jquery.license" />
|
||||
<Content Include="licenses\WebGrease.license" />
|
||||
<Content Include="web.appsettings.config" />
|
||||
<Content Include="WebEditor.ashx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Content Include="assets\AUTHORS.md" />
|
||||
<Content Include="assets\LICENSE" />
|
||||
<Content Include="assets\new\new.docx" />
|
||||
<Content Include="assets\new\new.docxf" />
|
||||
<Content Include="assets\new\new.pptx" />
|
||||
<Content Include="assets\new\new.xlsx" />
|
||||
<Content Include="assets\sample\csv.csv" />
|
||||
<Content Include="assets\sample\sample.docx" />
|
||||
<Content Include="assets\sample\sample.docxf" />
|
||||
<Content Include="assets\sample\sample.pptx" />
|
||||
<Content Include="assets\sample\sample.xlsx" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">16.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
|
||||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
|
||||
</Target>
|
||||
@ -213,10 +222,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target> -->
|
||||
</Project>
|
||||
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30523.141
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlineEditorsExampleMVC", "OnlineEditorsExampleMVC.csproj", "{D2C16047-E658-444A-A45D-23CEE79CB8F3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {808AEE5A-E969-411D-8326-9C1F7734DC70}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Ascensio System SIA")]
|
||||
[assembly: AssemblyProduct("OnlineEditorsExampleMVC")]
|
||||
[assembly: AssemblyCopyright("Ascensio System SIA 2019")]
|
||||
[assembly: AssemblyCopyright("Ascensio System SIA 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
81
web/documentserver-example/csharp-mvc/README.md
Normal file
@ -0,0 +1,81 @@
|
||||
## Overview
|
||||
|
||||
This example will help you integrate ONLYOFFICE Docs into your web application written in .Net (C# MVC).
|
||||
|
||||
**Please note**: It is intended for testing purposes and demonstrating functionality of the editors. Do NOT use this integration example on your own server without proper code modifications! In case you enabled the test example, disable it before going for production.
|
||||
|
||||
## Step 1. Install ONLYOFFICE Docs
|
||||
|
||||
Download and install ONLYOFFICE Docs (packaged as Document Server).
|
||||
|
||||
See the detailed guide to learn how to install Document Server [for Windows](https://helpcenter.onlyoffice.com/installation/docs-developer-install-windows.aspx), [for Linux](https://helpcenter.onlyoffice.com/installation/docs-developer-install-ubuntu.aspx), or [for Docker](https://helpcenter.onlyoffice.com/server/developer-edition/docker/docker-installation.aspx).
|
||||
|
||||
## Step 2. Download the .Net (C# MVC) code for the editors integration
|
||||
|
||||
Download the [.Net (C# MVC) example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *settings.config* file:
|
||||
```
|
||||
<add key="storage-path" value=""/>
|
||||
<add key="files.docservice.url.site" value="https://documentserver/" />
|
||||
```
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-path** is the path where files will be created and stored. You can set an absolute path.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *DocEditor.aspx* file.
|
||||
|
||||
## Step 3. Install the prerequisites
|
||||
Сheck if your system meets the system requirements:
|
||||
* **Microsoft .NET Framework**: version 4.5 (download it from the [official Microsoft website](https://www.microsoft.com/en-US/download/details.aspx?id=30653));
|
||||
* **Internet Information Services**: version 7 or later.
|
||||
|
||||
Configure the IIS components for the server to work correctly:
|
||||
1. Open Windows features:
|
||||
|
||||
**Start** -> **Control Panel** -> **Programs** -> **Programs and Features** -> **Turn Windows features on or off**
|
||||
|
||||
2. In the opened window, find **Internet Information Services** and choose all the necessary features. To do this, open the **World Wide Web Services** list and check the following components:
|
||||
* **Application Development Features**: .NET Extensibility 4.8, ASP.NET 4.8, ISAPI Extensions, ISAPI Filters,
|
||||
* **Common HTTP Features**: Default Document,
|
||||
* **Security**: Request Filtering.
|
||||
|
||||
## Step 4. Run your website with the editors
|
||||
1. Run the Internet Information Service (IIS) Manager:
|
||||
|
||||
**Start** -> **Control Panel** -> **System and Security** -> **Administrative Tools** -> **Internet Information Services (IIS) Manager**
|
||||
2. Add your website in the IIS Manager.
|
||||
|
||||
On the **Connections** panel right-click the **Sites** node in the tree, then click **Add Website**.
|
||||
|
||||

|
||||
3. In the **Add Website** dialog box specify the name of the folder with the .Net (C# MVC) project in the **Site name** box.
|
||||
|
||||
Specify the path to the folder with your project in the **Physical Path** box.
|
||||
|
||||
Specify the unique value used only for this website in the **Port** box.
|
||||
|
||||

|
||||
4. Check for the .NET platform version specified in IIS Manager for you website. Choose **v4.0.** version.
|
||||
|
||||
**Application Pools** -> right-click the platform name -> **Set application Pool defaults** -> **.NET CLR version**
|
||||
|
||||

|
||||
5. Browse your website with the IIS Manager:
|
||||
|
||||
Right-click the site -> **Manage Website** -> **Browse**
|
||||
|
||||

|
||||
|
||||
## Step 5. Check accessibility
|
||||
|
||||
In case the example and Document Server are installed on different computers, make sure that your server with the example installed has access to the Document Server with the address which you specify instead of **documentserver** in the configuration files.
|
||||
|
||||
Make sure that the Document Server has access to the server with the example installed with the address which you specify instead of **example.com** in the configuration files.
|
||||
|
||||
## Important security info
|
||||
|
||||
Please keep in mind the following security aspects when you are using test examples:
|
||||
|
||||
* There is no protection of the storage from unauthorized access since there is no need for authorization.
|
||||
* There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
|
||||
* There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
|
||||
* There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.
|
||||
@ -1,16 +0,0 @@
|
||||
For the ONLYOFFICE Applications example to work properly you need to do the following:
|
||||
|
||||
1. Download and extract the Example.zip into a directory selected for it, for instance, C:\OnlyofficeExample
|
||||
|
||||
2. Run the IIS Manager (C:\Windows\system32\inetsrv\InetMgr.exe or Start -> All Programs -> Administrative Tools -> Internet Information Services (IIS) Manager for Windows Server 2003)
|
||||
|
||||
3. Add the unpacked Example to the list of sites with the physical path to the C:\OnlyofficeExample (or the one you selected) folder.
|
||||
|
||||
4. Make sure that the user account under which the IIS NetworkService process is executed has the write access rights for the C:\OnlyofficeExample\App_Data folder (this is significant for the IIS later than 6.0).
|
||||
|
||||
5. Make the created ONLYOFFIC<49> Applications example available through IP or domain name so that it could be connected from the web by the document service for proper document rendering.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,3 +1,21 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
;(function() {
|
||||
var
|
||||
dropdownToggleHash = {};
|
||||
|
||||
@ -1,32 +1,39 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
var directUrl;
|
||||
|
||||
if (typeof jQuery != "undefined") {
|
||||
jq = jQuery.noConflict();
|
||||
|
||||
directUrl = getUrlVars()["directUrl"] == "true";
|
||||
|
||||
mustReload = false;
|
||||
|
||||
if (directUrl)
|
||||
jq("#directUrl").prop("checked", directUrl);
|
||||
else
|
||||
directUrl = jq("#directUrl").prop("checked");
|
||||
|
||||
jq("#directUrl").change(function () {
|
||||
window.location = "?directUrl=" + jq(this).prop("checked");
|
||||
});
|
||||
|
||||
jq(function () {
|
||||
jq('#fileupload').fileupload({
|
||||
dataType: 'json',
|
||||
@ -36,14 +43,16 @@ if (typeof jQuery != "undefined") {
|
||||
jq(".current").removeClass("current");
|
||||
jq("#step1").addClass("current");
|
||||
jq("#mainProgress .error-message").hide().find("span").text("");
|
||||
jq("#blockPassword").hide();
|
||||
jq("#mainProgress").removeClass("embedded");
|
||||
jq("#uploadFileName").text("");
|
||||
|
||||
jq.blockUI({
|
||||
theme: true,
|
||||
title: "Getting ready to load the file" + "<div class=\"dialog-close\"></div>",
|
||||
title: "File upload" + "<div class=\"dialog-close\"></div>",
|
||||
message: jq("#mainProgress"),
|
||||
overlayCSS: { "background-color": "#aaa" },
|
||||
themedCSS: { width: "656px", top: "20%", left: "50%", marginLeft: "-328px" }
|
||||
themedCSS: { width: "539px", top: "20%", left: "50%", marginLeft: "-269px" }
|
||||
});
|
||||
jq("#beginEdit, #beginView, #beginEmbedded").addClass("disable");
|
||||
|
||||
@ -63,17 +72,23 @@ if (typeof jQuery != "undefined") {
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(response.filename);
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#uploadFileName").addClass(response.documentType);
|
||||
|
||||
mustReload = true;
|
||||
|
||||
jq("#step1").addClass("done").removeClass("current");
|
||||
jq("#step2").addClass("current");
|
||||
|
||||
checkConvert();
|
||||
}
|
||||
});
|
||||
|
||||
initSelectors();
|
||||
});
|
||||
|
||||
var timer = null;
|
||||
var checkConvert = function () {
|
||||
var checkConvert = function (filePass) {
|
||||
filePass = filePass ? filePass : null;
|
||||
if (timer != null) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
@ -81,46 +96,56 @@ if (typeof jQuery != "undefined") {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step2").addClass("current");
|
||||
jq("#filePass").val("");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
var posExt = fileName.lastIndexOf('.');
|
||||
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : '';
|
||||
|
||||
if (ConverExtList.indexOf(posExt) == -1) {
|
||||
loadScripts();
|
||||
return;
|
||||
}
|
||||
|
||||
if (jq("#checkOriginalFormat").is(":checked")) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
return;
|
||||
}
|
||||
|
||||
timer = setTimeout(function () {
|
||||
var requestAddress = UrlConverter
|
||||
+ "&filename=" + encodeURIComponent(jq("#hiddenFileName").val());
|
||||
|
||||
jq.ajax({
|
||||
async: true,
|
||||
contentType: "text/xml",
|
||||
type: "get",
|
||||
url: requestAddress,
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({ filename: fileName, filePass: filePass }),
|
||||
url: UrlConverter,
|
||||
complete: function (data) {
|
||||
var responseText = data.responseText;
|
||||
var response = jq.parseJSON(responseText);
|
||||
if (response.error) {
|
||||
jq(".current").removeClass("current");
|
||||
jq(".step:not(.done)").addClass("error");
|
||||
jq("#mainProgress .error-message").show().find("span").text(response.error);
|
||||
jq('#hiddenFileName').val("");
|
||||
return;
|
||||
if (response.error.includes("Incorrect password")) {
|
||||
jq(".current").removeClass("current");
|
||||
jq("#step2").addClass("error");
|
||||
jq("#blockPassword").show();
|
||||
if (filePass) {
|
||||
jq("#filePass").addClass("errorInput");
|
||||
jq(".errorPass").text("The password is incorrect, please try again.");
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
jq(".current").removeClass("current");
|
||||
jq(".step:not(.done)").addClass("error");
|
||||
jq("#mainProgress .error-message").show().find("span").text(response.error);
|
||||
jq('#hiddenFileName').val("");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(response.filename);
|
||||
|
||||
if (response.step && response.step < 100) {
|
||||
checkConvert();
|
||||
checkConvert(filePass);
|
||||
} else {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
}
|
||||
}
|
||||
@ -132,7 +157,6 @@ if (typeof jQuery != "undefined") {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
@ -157,14 +181,58 @@ if (typeof jQuery != "undefined") {
|
||||
var posExt = fileName.lastIndexOf('.');
|
||||
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : '';
|
||||
|
||||
if (EditedExtList.indexOf(posExt) != -1) {
|
||||
if (EditedExtList.indexOf(posExt) != -1 || FillExtList.indexOf(posExt) != -1) {
|
||||
jq("#beginEdit").removeClass("disable");
|
||||
}
|
||||
};
|
||||
|
||||
var initSelectors = function () {
|
||||
var userSel = jq("#user");
|
||||
var langSel = jq("#language");
|
||||
|
||||
function getCookie(name) {
|
||||
let matches = document.cookie.match(new RegExp(
|
||||
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
|
||||
));
|
||||
return matches ? decodeURIComponent(matches[1]) : null;
|
||||
}
|
||||
function setCookie(name, value) {
|
||||
document.cookie = name + "=" + value + "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 7).toUTCString(); //week
|
||||
}
|
||||
|
||||
var userId = getCookie("uid");
|
||||
if (userId) userSel.val(userId);
|
||||
var langId = getCookie("ulang");
|
||||
if (langId) langSel.val(langId);
|
||||
|
||||
userSel.on("change", function () {
|
||||
setCookie("uid", userSel.val());
|
||||
});
|
||||
langSel.on("change", function () {
|
||||
setCookie("ulang", langSel.val());
|
||||
});
|
||||
};
|
||||
|
||||
jq(document).on("click", "#enterPass", function () {
|
||||
var filePass = jq("#filePass").val();
|
||||
if (filePass) {
|
||||
jq("#step2").removeClass("error");
|
||||
jq("#blockPassword").hide();
|
||||
checkConvert(filePass);
|
||||
} else {
|
||||
jq("#filePass").addClass("errorInput");
|
||||
jq(".errorPass").text("Password can't be blank.");
|
||||
}
|
||||
});
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
|
||||
var url = UrlEditor + "?fileName=" + fileId;
|
||||
var url = UrlEditor + "?fileName=" + fileId + "&directUrl=" + directUrl;
|
||||
window.open(url, "_blank");
|
||||
jq('#hiddenFileName').val("");
|
||||
jq.unblockUI();
|
||||
@ -172,7 +240,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
jq(document).on("click", "#beginView:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
|
||||
var url = UrlEditor + "?mode=view&fileName=" + fileId;
|
||||
var url = UrlEditor + "?editorsMode=view&fileName=" + fileId + "&directUrl=" + directUrl;
|
||||
window.open(url, "_blank");
|
||||
jq('#hiddenFileName').val("");
|
||||
jq.unblockUI();
|
||||
@ -180,7 +248,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
|
||||
var url = UrlEditor + "?mode=embedded&fileName=" + fileId;
|
||||
var url = UrlEditor + "?editorsType=embedded&editorsMode=embedded&fileName=" + fileId + "&directUrl=" + directUrl;
|
||||
|
||||
jq("#mainProgress").addClass("embedded");
|
||||
jq("#beginEmbedded").addClass("disable");
|
||||
@ -192,10 +260,110 @@ if (typeof jQuery != "undefined") {
|
||||
jq('#hiddenFileName').val("");
|
||||
jq("#embeddedView").attr("src", "");
|
||||
jq.unblockUI();
|
||||
if (mustReload) {
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
jq.dropdownToggle({
|
||||
switcherSelector: ".question",
|
||||
dropdownID: "hint"
|
||||
jq(document).on("click", ".try-editor", function (e) {
|
||||
var url = jq(".try-editor-list")[0].attributes["data-link"].value;
|
||||
url += "?fileExt=" + e.target.attributes["data-type"].value;
|
||||
if (jq("#createSample").is(":checked")) {
|
||||
url += "&sample=true";
|
||||
}
|
||||
var w = window.open(url, "_blank");
|
||||
w.onload = function () {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
jq(document).on("click", ".delete-file", function () {
|
||||
var requestAddress = "webeditor.ashx"
|
||||
+ "?type=remove"
|
||||
+ "&filename=" + encodeURIComponent(jq(this).attr("data-filename"));
|
||||
|
||||
jq.ajax({
|
||||
async: true,
|
||||
contentType: "text/xml",
|
||||
url: requestAddress,
|
||||
complete: function (data) {
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function showUserTooltip (isMobile) {
|
||||
if ( jq("div#portal-info").is(":hidden") ) {
|
||||
jq("div#portal-info").show();
|
||||
jq("div.stored-list").hide();
|
||||
} else if (isMobile && jq("div#portal-info").is(":visible")) {
|
||||
jq("div#portal-info").hide();
|
||||
jq("div.stored-list").show();
|
||||
}
|
||||
};
|
||||
|
||||
function getUrlVars() {
|
||||
var vars = [], hash;
|
||||
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
||||
for (var i = 0; i < hashes.length; i++) {
|
||||
hash = hashes[i].split('=');
|
||||
vars.push(hash[0]);
|
||||
vars[hash[0]] = hash[1];
|
||||
}
|
||||
return vars;
|
||||
};
|
||||
|
||||
var fileList = jq("tr.tableRow");
|
||||
|
||||
var mouseIsOverTooltip = false;
|
||||
var hideTooltipTimeout = null;
|
||||
if (/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i
|
||||
.test(navigator.userAgent)) {
|
||||
if (fileList.length > 0) {
|
||||
if (hideTooltipTimeout != null) {
|
||||
clearTimeout(hideTooltipTimeout);
|
||||
}
|
||||
jq("#info").on("touchend", function () {
|
||||
showUserTooltip(true);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
jq("#info").mouseover(function (event) {
|
||||
if (fileList.length > 0) {
|
||||
if (hideTooltipTimeout != null) {
|
||||
clearTimeout(hideTooltipTimeout);
|
||||
}
|
||||
showUserTooltip(false);
|
||||
|
||||
jq("div#portal-info").mouseenter(function () {
|
||||
mouseIsOverTooltip = true;
|
||||
}).mouseleave(function () {
|
||||
mouseIsOverTooltip = false;
|
||||
jq("div.stored-list").show();
|
||||
jq("div#portal-info").hide();
|
||||
})
|
||||
}
|
||||
}).mouseleave(function () {
|
||||
hideTooltipTimeout = setTimeout(function () {
|
||||
if (mouseIsOverTooltip == false && fileList.length > 0) {
|
||||
jq("div.stored-list").show();
|
||||
jq("div#portal-info").hide();
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
jq(".info-tooltip").mouseover(function (event) {
|
||||
var target = event.target;
|
||||
var id = target.dataset.id ? target.dataset.id : target.id;
|
||||
var tooltip = target.dataset.tooltip;
|
||||
|
||||
jq("<div class='tooltip'>" + tooltip + "<div class='arrow'></div></div>").appendTo("body");
|
||||
|
||||
var top = jq("#" + id).offset().top + jq("#" + id).outerHeight() / 2 - jq("div.tooltip").outerHeight() / 2;
|
||||
var left = jq("#" + id).offset().left + jq("#" + id).outerWidth() + 20;
|
||||
jq("div.tooltip").css({ "top": top, "left": left });
|
||||
}).mouseout(function () {
|
||||
jq("div.tooltip").remove();
|
||||
});
|
||||
}
|
||||
@ -1,30 +1,4 @@
|
||||
<!--*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*-->
|
||||
|
||||
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage<OnlineEditorsExampleMVC.Models.FileModel>" %>
|
||||
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage<OnlineEditorsExampleMVC.Models.FileModel>" %>
|
||||
<%@ Import Namespace="System.IO" %>
|
||||
<%@ Import Namespace="System.Web.Configuration" %>
|
||||
<%@ Import Namespace="OnlineEditorsExampleMVC.Helpers" %>
|
||||
@ -35,8 +9,27 @@
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" href="~/favicon.ico" type="image/x-icon" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
-->
|
||||
<link rel="icon" href="<%= "content/images/" + Model.DocumentType + ".ico" %>" type="image/x-icon" />
|
||||
<title><%= Model.FileName + " - ONLYOFFICE" %></title>
|
||||
|
||||
<%: Styles.Render("~/Content/editor") %>
|
||||
@ -48,101 +41,218 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%: Scripts.Render(new []{ WebConfigurationManager.AppSettings["files.docservice.url.api"] }) %>
|
||||
<%: Scripts.Render(new []{ WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.api"] }) %>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
var docEditor;
|
||||
var fileName = "<%= Model.FileName %>";
|
||||
var fileType = "<%= Path.GetExtension(Model.FileName).Trim('.') %>";
|
||||
var config;
|
||||
|
||||
var innerAlert = function (message) {
|
||||
var innerAlert = function (message, inEditor) {
|
||||
if (console && console.log)
|
||||
console.log(message);
|
||||
if (inEditor && docEditor)
|
||||
docEditor.showMessage(message);
|
||||
};
|
||||
|
||||
// the application is loaded into the browser
|
||||
var onAppReady = function () {
|
||||
innerAlert("Document editor ready");
|
||||
};
|
||||
|
||||
// the document is modified
|
||||
var onDocumentStateChange = function (event) {
|
||||
var title = document.title.replace(/\*$/g, "");
|
||||
document.title = title + (event.data ? "*" : "");
|
||||
};
|
||||
|
||||
// the user is trying to switch the document from the viewing into the editing mode
|
||||
var onRequestEditRights = function () {
|
||||
location.href = location.href.replace(RegExp("action=view\&?", "i"), "");
|
||||
location.href = location.href.replace(RegExp("editorsMode=view\&?", "i"), "");
|
||||
};
|
||||
|
||||
// an error or some other specific event occurs
|
||||
var onError = function (event) {
|
||||
if (event)
|
||||
innerAlert(event.data);
|
||||
};
|
||||
|
||||
// the document is opened for editing with the old document.key value
|
||||
var onOutdatedVersion = function (event) {
|
||||
location.reload(true);
|
||||
};
|
||||
|
||||
// replace the link to the document which contains a bookmark
|
||||
var replaceActionLink = function(href, linkParam) {
|
||||
var link;
|
||||
var actionIndex = href.indexOf("&actionLink=");
|
||||
if (actionIndex != -1) {
|
||||
var endIndex = href.indexOf("&", actionIndex + "&actionLink=".length);
|
||||
if (endIndex != -1) {
|
||||
link = href.substring(0, actionIndex) + href.substring(endIndex) + "&actionLink=" + encodeURIComponent(linkParam);
|
||||
} else {
|
||||
link = href.substring(0, actionIndex) + "&actionLink=" + encodeURIComponent(linkParam);
|
||||
}
|
||||
} else {
|
||||
link = href + "&actionLink=" + encodeURIComponent(linkParam);
|
||||
}
|
||||
return link;
|
||||
}
|
||||
|
||||
// the user is trying to get link for opening the document which contains a bookmark, scrolling to the bookmark position
|
||||
var onMakeActionLink = function (event) {
|
||||
var actionData = event.data;
|
||||
var linkParam = JSON.stringify(actionData);
|
||||
docEditor.setActionLink(replaceActionLink(location.href, linkParam)); // set the link to the document which contains a bookmark
|
||||
};
|
||||
|
||||
// the meta information of the document is changed via the meta command
|
||||
var onMetaChange = function (event) {
|
||||
if (event.data.favorite) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
document.title = (favorite ? "☆" : "") + title;
|
||||
docEditor.setFavorite(favorite); // change the Favorite icon state
|
||||
}
|
||||
|
||||
innerAlert("onMetaChange: " + JSON.stringify(event.data));
|
||||
};
|
||||
|
||||
// the user is trying to insert an image by clicking the Image from Storage button
|
||||
var onRequestInsertImage = function (event) {
|
||||
<% string logoUrl;%>
|
||||
<% Model.GetLogoConfig(out logoUrl); %>
|
||||
docEditor.insertImage({ // insert an image into the file
|
||||
"c": event.data.c,
|
||||
<%= logoUrl%>
|
||||
})
|
||||
};
|
||||
|
||||
// the user is trying to select document for comparing by clicking the Document from Storage button
|
||||
var onRequestCompareFile = function () {
|
||||
<% string compareFileData; %>
|
||||
<% Model.GetCompareFileData(out compareFileData); %>
|
||||
docEditor.setRevisedFile(<%=compareFileData%>); // select a document for comparing
|
||||
};
|
||||
|
||||
// the user is trying to select recipients data by clicking the Mail merge button
|
||||
var onRequestMailMergeRecipients = function (event) {
|
||||
<% string dataMailMergeRecipients; %>
|
||||
<% Model.GetMailMergeConfig(out dataMailMergeRecipients); %>
|
||||
docEditor.setMailMergeRecipients(<%= dataMailMergeRecipients%>); // insert recipient data for mail merge into the file
|
||||
};
|
||||
|
||||
var onRequestSaveAs = function (event) { // the user is trying to save file by clicking Save Copy as... button
|
||||
var title = event.data.title;
|
||||
var url = event.data.url;
|
||||
var data = {
|
||||
title: title,
|
||||
url: url
|
||||
};
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "webeditor.ashx?type=saveas");
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify(data));
|
||||
xhr.onload = function () {
|
||||
innerAlert(xhr.responseText);
|
||||
innerAlert(JSON.parse(xhr.responseText).file, true);
|
||||
}
|
||||
};
|
||||
|
||||
var onRequestRename = function(event) { // the user is trying to rename file by clicking Rename... button
|
||||
innerAlert("onRequestRename: " + JSON.stringify(event.data));
|
||||
|
||||
var newfilename = event.data;
|
||||
var data = {
|
||||
newfilename: newfilename,
|
||||
dockey: config.document.key,
|
||||
ext: config.document.fileType
|
||||
};
|
||||
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "webeditor.ashx?type=rename");
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify(data));
|
||||
xhr.onload = function () {
|
||||
innerAlert(xhr.responseText);
|
||||
}
|
||||
};
|
||||
|
||||
config = <%= Model.GetDocConfig(Request, Url) %>;
|
||||
|
||||
config.width = "100%";
|
||||
config.height = "100%";
|
||||
|
||||
config.events = {
|
||||
'onAppReady': onAppReady,
|
||||
'onDocumentStateChange': onDocumentStateChange,
|
||||
'onRequestEditRights': onRequestEditRights,
|
||||
'onError': onError,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
"onMakeActionLink": onMakeActionLink,
|
||||
"onMetaChange": onMetaChange,
|
||||
"onRequestInsertImage": onRequestInsertImage,
|
||||
"onRequestCompareFile": onRequestCompareFile,
|
||||
"onRequestMailMergeRecipients": onRequestMailMergeRecipients,
|
||||
};
|
||||
|
||||
<% string hist, histData; %>
|
||||
<% Model.GetHistory(out hist, out histData); %>
|
||||
|
||||
<% string usersForMentions; %>
|
||||
<% Model.GetUsersMentions(Request, out usersForMentions); %>
|
||||
|
||||
if (config.editorConfig.user.id) {
|
||||
<% if (!string.IsNullOrEmpty(hist) && !string.IsNullOrEmpty(histData))
|
||||
{ %>
|
||||
// the user is trying to show the document version history
|
||||
config.events['onRequestHistory'] = function () {
|
||||
docEditor.refreshHistory(<%= hist %>); // show the document version history
|
||||
};
|
||||
// the user is trying to click the specific document version in the document version history
|
||||
config.events['onRequestHistoryData'] = function (event) {
|
||||
var ver = event.data;
|
||||
var histData = <%= histData %>;
|
||||
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
|
||||
};
|
||||
// the user is trying to go back to the document from viewing the document version history
|
||||
config.events['onRequestHistoryClose '] = function () {
|
||||
document.location.reload();
|
||||
};
|
||||
<% } %>
|
||||
|
||||
// add mentions for not anonymous users
|
||||
<% if (!string.IsNullOrEmpty(usersForMentions))
|
||||
{ %>
|
||||
config.events['onRequestUsers'] = function () {
|
||||
docEditor.setUsers({ // set a list of users to mention in the comments
|
||||
"users": <%= usersForMentions %>
|
||||
});
|
||||
};
|
||||
<% } %>
|
||||
|
||||
// the user is mentioned in a comment
|
||||
config.events['onRequestSendNotify'] = function (event) {
|
||||
event.data.actionLink = replaceActionLink(location.href, JSON.stringify(event.data.actionLink));
|
||||
var data = JSON.stringify(event.data);
|
||||
innerAlert("onRequestSendNotify: " + data);
|
||||
};
|
||||
// prevent file renaming for anonymous users
|
||||
config.events['onRequestRename'] = onRequestRename;
|
||||
}
|
||||
|
||||
if (config.editorConfig.createUrl) {
|
||||
config.events.onRequestSaveAs = onRequestSaveAs;
|
||||
};
|
||||
|
||||
var сonnectEditor = function () {
|
||||
if ((config.document.fileType === "docxf" || config.document.fileType === "oform")
|
||||
&& DocsAPI.DocEditor.version().split(".")[0] < 7) {
|
||||
innerAlert("Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online.");
|
||||
return;
|
||||
}
|
||||
|
||||
docEditor = new DocsAPI.DocEditor("iframeEditor",
|
||||
{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
|
||||
type: '<%= Request["mode"] != "embedded" ? "desktop" : "embedded" %>',
|
||||
documentType: "<%= Model.DocumentType %>",
|
||||
document: {
|
||||
title: fileName,
|
||||
url: "<%= Model.FileUri %>",
|
||||
fileType: fileType,
|
||||
key: "<%= Model.Key %>",
|
||||
|
||||
info: {
|
||||
author: "Me",
|
||||
created: "<%= DateTime.Now.ToShortDateString() %>",
|
||||
},
|
||||
|
||||
permissions: {
|
||||
edit: "<%= DocManagerHelper.EditedExts.Contains(Path.GetExtension(Model.FileName)) %>" == "True",
|
||||
download: true,
|
||||
}
|
||||
},
|
||||
editorConfig: {
|
||||
mode: '<%= DocManagerHelper.EditedExts.Contains(Path.GetExtension(Model.FileName)) && Request["mode"] != "view" ? "edit" : "view" %>',
|
||||
|
||||
lang: "en",
|
||||
|
||||
callbackUrl: "<%= Model.CallbackUrl %>",
|
||||
|
||||
user: {
|
||||
id: "<%= DocManagerHelper.CurUserHostAddress() %>",
|
||||
name: "John Smith",
|
||||
},
|
||||
|
||||
embedded: {
|
||||
saveUrl: "<%= Model.FileUri %>",
|
||||
embedUrl: "<%= Model.FileUri %>",
|
||||
shareUrl: "<%= Model.FileUri %>",
|
||||
toolbarDocked: "top",
|
||||
},
|
||||
|
||||
customization: {
|
||||
about: true,
|
||||
feedback: true,
|
||||
goback: {
|
||||
url: "<%= Url.Action("Index", "Home") %>",
|
||||
},
|
||||
},
|
||||
},
|
||||
events: {
|
||||
'onAppReady': onAppReady,
|
||||
'onDocumentStateChange': onDocumentStateChange,
|
||||
'onRequestEditRights': onRequestEditRights,
|
||||
'onError': onError,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
}
|
||||
});
|
||||
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
|
||||
};
|
||||
|
||||
if (window.addEventListener) {
|
||||
|
||||
@ -1,41 +1,35 @@
|
||||
<!--*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*-->
|
||||
|
||||
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
|
||||
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
|
||||
|
||||
<%@ Import Namespace="System.IO" %>
|
||||
<%@ Import Namespace="System.Web.Configuration" %>
|
||||
<%@ Import Namespace="OnlineEditorsExampleMVC.Helpers" %>
|
||||
<%@ Import Namespace="OnlineEditorsExampleMVC.Models" %>
|
||||
<%@ Import Namespace="System.Collections.Generic" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
-->
|
||||
<title>ONLYOFFICE</title>
|
||||
|
||||
<link href="<%: Url.Content("~/favicon.ico") %>" rel="shortcut icon" type="image/x-icon" />
|
||||
@ -45,92 +39,324 @@
|
||||
<%: Styles.Render("~/Content/css") %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="top-panel"></div>
|
||||
<div class="main-panel">
|
||||
<span class="portal-name">ONLYOFFICE Document Editors</span>
|
||||
<br />
|
||||
<br />
|
||||
<span class="portal-descr">Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors. You may upload your own documents for testing using the "Choose file" button and selecting the necessary files on your PC.</span>
|
||||
|
||||
<div class="file-upload button gray">
|
||||
<span>Choose file</span>
|
||||
<input type="file" id="fileupload" name="files[]" data-url="<%= Url.Content("~/webeditor.ashx?type=upload") %>" />
|
||||
<header>
|
||||
<div class="center">
|
||||
<a href="">
|
||||
<img src ="content/images/logo.svg" alt="ONLYOFFICE" />
|
||||
</a>
|
||||
</div>
|
||||
<label class="save-original">
|
||||
<input type="checkbox" id="checkOriginalFormat" class="checkbox" />Save document in original format
|
||||
</label>
|
||||
<span class="question"></span>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="try-descr">You are also enabled to view and edit documents pre-uploaded to the portal.</span>
|
||||
</header>
|
||||
|
||||
<ul class="try-editor-list">
|
||||
<li><a class="try-editor document" href="<%= Url.Action("sample", "Home", new { fileExt = "docx" }) %>" target="_blank">Create<br />Sample Document</a></li>
|
||||
<li><a class="try-editor spreadsheet" href="<%= Url.Action("sample", "Home", new { fileExt = "xlsx" }) %>" target="_blank">Create<br />Sample Spreadsheet</a></li>
|
||||
<li><a class="try-editor presentation" href="<%= Url.Action("sample", "Home", new { fileExt = "pptx" }) %>" target="_blank">Create<br />Sample Presentation</a></li>
|
||||
</ul>
|
||||
<div class="center main">
|
||||
<table class="table-main">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="left-panel section">
|
||||
<div class="help-block">
|
||||
<span>Create new</span>
|
||||
<div class="clearFix">
|
||||
<div class="create-panel">
|
||||
<ul class="try-editor-list clearFix" data-link="<%= Url.Action("sample", "Home") %>">
|
||||
<li>
|
||||
<a class="try-editor word" data-type="docx">Document</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="try-editor cell" data-type="xlsx">Spreadsheet</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="try-editor slide" data-type="pptx">Presentation</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="try-editor form" data-type="docxf">Form template</a>
|
||||
</li>
|
||||
</ul>
|
||||
<label class="side-option">
|
||||
<input id="createSample" class="checkbox" type="checkbox" />With sample content
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<div class="help-block">
|
||||
<span>Want to learn how it works?</span>
|
||||
<br />
|
||||
Read the editor <a href="http://api.onlyoffice.com/editors/howitworks">API Documentation</a>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<div class="help-block">
|
||||
<span>Any questions?</span>
|
||||
<br />
|
||||
Please, <a href="mailto:sales@onlyoffice.com">submit your request</a> and we'll help you shortly.
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-panel clearFix">
|
||||
<a class="file-upload">Upload file
|
||||
<input type="file" id="fileupload" name="files[]" data-url="<%= Url.Content("~/webeditor.ashx?type=upload") %>" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="user-block-table" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<span class="select-user">Username</span>
|
||||
<img id="info" class="info" src="content/images/info.svg" />
|
||||
<select class="select-user" id="user">
|
||||
<% foreach (User user in Users.getAllUsers())
|
||||
{ %>
|
||||
<option value="<%= user.id %>"><%= user.name.IsEmpty() ? "Anonymous" : user.name %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<span class="select-user">Language</span>
|
||||
<img class="info info-tooltip" data-id="language"
|
||||
data-tooltip="Choose the language for ONLYOFFICE editors interface"
|
||||
src="content/images/info.svg" />
|
||||
<select class="select-user" id="language">
|
||||
<% Dictionary<string, string> languages = DocManagerHelper.GetLanguages();
|
||||
foreach (var lang in languages)
|
||||
{ %>
|
||||
<option value="<%= lang.Key %>"><%= lang.Value %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<label class="side-option">
|
||||
<input id="directUrl" type="checkbox" class="checkbox" />Try opening on client
|
||||
<img id="directUrlInfo" class="info info-tooltip" data-id="directUrlInfo" data-tooltip="Some files can be opened in the user's browser without connecting to the document server." src="content/images/info.svg" />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td class="section">
|
||||
<div class="main-panel">
|
||||
<% var storedFiles = DocManagerHelper.GetStoredFiles(); %>
|
||||
<div id="portal-info" style="display: <%= storedFiles.Any() ? "none" : "table-cell" %>">
|
||||
<span class="portal-name">ONLYOFFICE Document Editors – Welcome!</span>
|
||||
<span class="portal-descr">
|
||||
Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
|
||||
<br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
|
||||
</span>
|
||||
<span class="portal-descr">Please do NOT use this integration example on your own server without proper code modifications, it is intended for testing purposes only. In case you enabled this test example, disable it before going for production.</span>
|
||||
<span class="portal-descr">You can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.</span>
|
||||
<% foreach (User user in Users.getAllUsers())
|
||||
{ %>
|
||||
<div class="user-descr">
|
||||
<b><%= user.name.IsEmpty() ? "Anonymous" : user.name %></b>
|
||||
<ul>
|
||||
<% foreach (string description in user.descriptions)
|
||||
{ %>
|
||||
<li><%= description %></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<%
|
||||
if (storedFiles.Any())
|
||||
{ %>
|
||||
<div class="stored-list">
|
||||
<span class="header-list">Your documents</span>
|
||||
<table class="tableHeader" cellspacing="0" cellpadding="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="tableHeaderCell tableHeaderCellFileName">Filename</td>
|
||||
<td class="tableHeaderCell tableHeaderCellEditors contentCells-shift">Editors</td>
|
||||
<td class="tableHeaderCell tableHeaderCellViewers">Viewers</td>
|
||||
<td class="tableHeaderCell tableHeaderCellDownload">Download</td>
|
||||
<td class="tableHeaderCell tableHeaderCellRemove">Remove</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="scroll-table-body">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<% foreach (var storedFile in storedFiles)
|
||||
{
|
||||
var isEnabledDirectUrl = DocManagerHelper.GetDirectUrl();
|
||||
var editUrl = "doceditor.aspx?fileID=" + HttpUtility.UrlEncode(storedFile.Name);
|
||||
var docType = FileUtility.GetFileType(storedFile.Name).ToString().ToLower();
|
||||
var ext = Path.GetExtension(storedFile.Name).ToLower();
|
||||
var canEdit = DocManagerHelper.EditedExts.Contains(ext);
|
||||
var isFillFormDoc = DocManagerHelper.FillFormExts.Contains(ext);
|
||||
%>
|
||||
|
||||
<div id="hint">
|
||||
<div class="corner"></div>
|
||||
If you check this option the file will be saved both in the original and converted into Office Open XML format for faster viewing and editing. In other case the document will be overwritten by its copy in Office Open XML format.
|
||||
<tr class="tableRow" title="<%= storedFile.Name %> [<%= DocManagerHelper.GetFileVersion(storedFile.Name, HttpContext.Current.Request.UserHostAddress.Replace(':', '_')) %>]">
|
||||
<td class="contentCells">
|
||||
<a class="stored-edit <%= docType %>" href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<span><%= storedFile.Name %></span>
|
||||
</a>
|
||||
</td>
|
||||
<% if (canEdit) { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "edit", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/desktop.svg" alt="Open in editor for full size screens" title="Open in editor for full size screens"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "edit", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/mobile.svg" alt="Open in editor for mobile devices" title="Open in editor for mobile devices"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "comment", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/comment.svg" alt="Open in editor for comment" title="Open in editor for comment"/>
|
||||
</a>
|
||||
</td>
|
||||
<% if (docType == "word") { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "review", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/review.svg" alt="Open in editor for review" title="Open in editor for review"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else if (docType == "cell") { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "filter", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/filter.svg" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
|
||||
</a>
|
||||
</td>
|
||||
<% } %>
|
||||
<% if (docType == "word") { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "blockcontent", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/block-content.svg" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td class="contentCells contentCells-icon"></td>
|
||||
<% } %>
|
||||
<% if (docType != "word" && docType != "cell") { %>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<% } %>
|
||||
<% if (isFillFormDoc) { %>
|
||||
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift"></td>
|
||||
<% } %>
|
||||
<% } else if (isFillFormDoc) { %>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/mobile-fill-forms.svg" alt="Open in editor for filling in forms for mobile devices" title="Open in editor for filling in forms for mobile devices"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td class="contentCells contentCells-shift contentCells-icon contentCellsEmpty" colspan="6"></td>
|
||||
<% } %>
|
||||
<td class="contentCells contentCells-icon firstContentCellViewers">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "view", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/desktop.svg" alt="Open in viewer for full size screens" title="Open in viewer for full size screens"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "view", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/mobile.svg" alt="Open in viewer for mobile devices" title="Open in viewer for mobile devices"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "embedded", editorsMode = "embedded", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/embeded.svg" alt="Open in embedded mode" title="Open in embedded mode"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift downloadContentCellShift">
|
||||
<a href="webeditor.ashx?type=download&fileName=<%= HttpUtility.UrlEncode(storedFile.Name) %>">
|
||||
<img class="icon-download" src="content/images/download.svg" alt="Download" title="Download" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift">
|
||||
<a class="delete-file" data-filename="<%= storedFile.Name %>">
|
||||
<img class="icon-delete" src="content/images/delete.svg" alt="Delete" title="Delete" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% } %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="mainProgress">
|
||||
<div id="uploadSteps">
|
||||
<span id="step1" class="step">1. Loading the file</span>
|
||||
<span class="step-descr">The file loading process will take some time depending on the file size, presence or absence of additional elements in it (macros, etc.) and the connection speed.</span>
|
||||
<span id="uploadFileName" class="uploadFileName"></span>
|
||||
<div class="describeUpload">After these steps are completed, you can work with your document.</div>
|
||||
<span id="step1" class="step">1. Loading the file.</span>
|
||||
<span class="step-descr">The loading speed depends on file size and additional elements it contains.</span>
|
||||
<br />
|
||||
<span id="step2" class="step">2. File conversion</span>
|
||||
<span class="step-descr">The file is being converted into Office Open XML format for the document faster viewing and editing.</span>
|
||||
<span id="step2" class="step">2. Conversion.</span>
|
||||
<span class="step-descr">The file is converted to OOXML so that you can edit it.</span>
|
||||
<br />
|
||||
<span id="step3" class="step">3. Loading editor scripts</span>
|
||||
<span class="step-descr">The scripts for the editor are loaded only once and are will be cached on your computer in future. It might take some time depending on the connection speed.</span>
|
||||
<div id="blockPassword">
|
||||
<span class="descrFilePass">The file is password protected.</span>
|
||||
<br />
|
||||
<div>
|
||||
<input id="filePass" type="password"/>
|
||||
<div id="enterPass" class="button orange">Enter</div>
|
||||
<div id="skipPass" class="button gray">Skip</div>
|
||||
</div>
|
||||
<span class="errorPass"></span>
|
||||
<br />
|
||||
</div>
|
||||
<span id="step3" class="step">3. Loading editor scripts.</span>
|
||||
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
<br />
|
||||
<br />
|
||||
<span class="progress-descr">Please note, that the speed of all operations greatly depends on the server and the client locations. In case they differ or are located in differernt countries/continents, there might be lack of speed and greater wait time. The best results are achieved when the server and client computers are located in one and the same place (city).</span>
|
||||
<br />
|
||||
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<div class="error-message">
|
||||
<span></span>
|
||||
<b>Upload error: </b><span></span>
|
||||
<br />
|
||||
Please select another file and try again. If you have questions please <a href="mailto:sales@onlyoffice.com">contact us.</a>
|
||||
Please select another file and try again.
|
||||
</div>
|
||||
</div>
|
||||
<iframe id="embeddedView" src="" height="345px" width="600px" frameborder="0" scrolling="no" allowtransparency></iframe>
|
||||
<iframe id="embeddedView" src="" height="345px" width="432px" frameborder="0" scrolling="no" allowtransparency></iframe>
|
||||
<br />
|
||||
<div id="beginEmbedded" class="button disable">Embedded view</div>
|
||||
<div id="beginView" class="button disable">View</div>
|
||||
<div id="beginEdit" class="button disable">Edit</div>
|
||||
<div id="cancelEdit" class="button gray">Cancel</div>
|
||||
<div class="buttonsMobile">
|
||||
<div id="beginEdit" class="button orange disable">Edit</div>
|
||||
<div id="beginView" class="button gray disable">View</div>
|
||||
<div id="beginEmbedded" class="button gray disable">Embedded view</div>
|
||||
<div id="cancelEdit" class="button gray">Cancel</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span>
|
||||
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span>
|
||||
|
||||
<div class="bottom-panel">© Ascensio System SIA <%= DateTime.Now.Year.ToString() %>. All rights reserved.</div>
|
||||
<footer>
|
||||
<div class="center">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
</td>
|
||||
<td class="copy">
|
||||
© Ascensio System SIA <%= DateTime.Now.Year.ToString() %>. All rights reserved.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<%: Scripts.Render("~/bundles/jquery", "~/bundles/scripts") %>
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
var FillExtList = '<%= string.Join(",", DocManagerHelper.FillFormExts.ToArray()) %>';
|
||||
var ConverExtList = '<%= string.Join(",", DocManagerHelper.ConvertExts.ToArray()) %>';
|
||||
var EditedExtList = '<%= string.Join(",", DocManagerHelper.EditedExts.ToArray()) %>';
|
||||
var UrlConverter = '<%= Url.Content("~/webeditor.ashx?type=convert") %>';
|
||||
|
||||
@ -3,6 +3,23 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
-->
|
||||
<title>Error</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
<configuration>
|
||||
<configSections>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<appSettings configSource="web.appsettings.config" />
|
||||
<system.web>
|
||||
<httpRuntime targetFramework="4.5" />
|
||||
<httpRuntime maxRequestLength="51200" targetFramework="4.5" />
|
||||
<compilation debug="true" targetFramework="4.5" />
|
||||
<pages>
|
||||
<namespaces>
|
||||
@ -26,20 +26,49 @@
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<add name="Access-Control-Allow-Origin" value="*" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<requestLimits maxAllowedContentLength="52428800" />
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
||||
</entityFramework>
|
||||
</configuration>
|
||||
@ -1,38 +1,34 @@
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2019
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.Services;
|
||||
using System.Web.Configuration;
|
||||
using OnlineEditorsExampleMVC.Helpers;
|
||||
using OnlineEditorsExampleMVC.Models;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
@ -42,32 +38,135 @@ namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
// define functions for each type of operation
|
||||
switch (context.Request["type"])
|
||||
{
|
||||
case "upload":
|
||||
Upload(context);
|
||||
break;
|
||||
case "download":
|
||||
Download(context);
|
||||
break;
|
||||
case "downloadhistory":
|
||||
DownloadHistory(context);
|
||||
break;
|
||||
case "convert":
|
||||
Convert(context);
|
||||
break;
|
||||
case "track":
|
||||
Track(context);
|
||||
break;
|
||||
case "remove":
|
||||
Remove(context);
|
||||
break;
|
||||
case "assets":
|
||||
Assets(context);
|
||||
break;
|
||||
case "csv":
|
||||
GetCsv(context);
|
||||
break;
|
||||
case "files":
|
||||
Files(context);
|
||||
break;
|
||||
case "saveas":
|
||||
SaveAs(context);
|
||||
break;
|
||||
case "rename":
|
||||
Rename(context);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SaveAs(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
string fileData;
|
||||
try
|
||||
{
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
fileData = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":\"Request stream is empty\"}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
|
||||
var fileUrl = (string) body["url"];
|
||||
var title = (string) body["title"];
|
||||
var fileName = DocManagerHelper.GetCorrectName(title);
|
||||
var extension = "." + (Path.GetExtension(fileName).ToLower() ?? "").Trim('.');
|
||||
|
||||
var allExt = DocManagerHelper.ConvertExts
|
||||
.Concat(DocManagerHelper.EditedExts)
|
||||
.Concat(DocManagerHelper.ViewedExts)
|
||||
.Concat(DocManagerHelper.FillFormExts)
|
||||
.ToArray();
|
||||
|
||||
if (!allExt.Contains(extension))
|
||||
{
|
||||
context.Response.Write("{\"error\":\"File type is not supported\"}");
|
||||
}
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(fileUrl);
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
using (var stream = req.GetResponse().GetResponseStream())
|
||||
{
|
||||
|
||||
if (stream == null || req.GetResponse().ContentLength <= 0 || req.GetResponse().ContentLength > DocManagerHelper.MaxFileSize)
|
||||
{
|
||||
context.Response.Write("{\"error\": \"File size is incorrect\"}");
|
||||
}
|
||||
const int bufferSize = 4096;
|
||||
|
||||
using (var fs = File.Open(DocManagerHelper.StoragePath(fileName, null), FileMode.Create))
|
||||
{
|
||||
var buffer = new byte[bufferSize];
|
||||
int readed;
|
||||
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
|
||||
{
|
||||
fs.Write(buffer, 0, readed); // write bytes to the output stream
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var id = context.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id); // get the user
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name, null);
|
||||
|
||||
context.Response.Write("{ \"file\": \"" + fileName + "\"}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"" + 1 + "\", \"message\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// upload a file
|
||||
private static void Upload(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
var httpPostedFile = context.Request.Files[0];
|
||||
string fileName;
|
||||
|
||||
// check from which browser the request came for
|
||||
if (HttpContext.Current.Request.Browser.Browser.ToUpper() == "IE")
|
||||
{
|
||||
var files = httpPostedFile.FileName.Split(new char[] { '\\' });
|
||||
fileName = files[files.Length - 1];
|
||||
fileName = files[files.Length - 1]; // get file name
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -75,23 +174,28 @@ namespace OnlineEditorsExampleMVC
|
||||
}
|
||||
|
||||
var curSize = httpPostedFile.ContentLength;
|
||||
if (DocManagerHelper.MaxFileSize < curSize || curSize <= 0)
|
||||
if (DocManagerHelper.MaxFileSize < curSize || curSize <= 0) // check if the file size exceeds the maximum file size
|
||||
{
|
||||
throw new Exception("File size is incorrect");
|
||||
}
|
||||
|
||||
var curExt = (Path.GetExtension(fileName) ?? "").ToLower();
|
||||
if (!DocManagerHelper.FileExts.Contains(curExt))
|
||||
if (!DocManagerHelper.FileExts.Contains(curExt)) // check if the file extension is supported by the editor
|
||||
{
|
||||
throw new Exception("File type is not supported");
|
||||
}
|
||||
|
||||
fileName = DocManagerHelper.GetCorrectName(fileName);
|
||||
fileName = DocManagerHelper.GetCorrectName(fileName); // get the correct file name if such a name already exists
|
||||
var documentType = FileUtility.GetFileType(fileName).ToString().ToLower();
|
||||
|
||||
var savedFileName = DocManagerHelper.StoragePath(fileName);
|
||||
httpPostedFile.SaveAs(savedFileName);
|
||||
var savedFileName = DocManagerHelper.StoragePath(fileName); // get the storage path to the uploading file
|
||||
httpPostedFile.SaveAs(savedFileName); // and save it
|
||||
// get file meta information or create the default one
|
||||
var id = context.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name);
|
||||
|
||||
context.Response.Write("{ \"filename\": \"" + fileName + "\"}");
|
||||
context.Response.Write("{ \"filename\": \"" + fileName + "\", \"documentType\": \"" + documentType + "\"}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -99,35 +203,64 @@ namespace OnlineEditorsExampleMVC
|
||||
}
|
||||
}
|
||||
|
||||
// convert a file
|
||||
private static void Convert(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
var fileName = context.Request["filename"];
|
||||
var fileUri = DocManagerHelper.GetFileUri(fileName);
|
||||
string fileData;
|
||||
|
||||
var extension = (Path.GetExtension(fileUri) ?? "").Trim('.');
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
fileData = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":1,\"message\":\"Request stream is empty\"}");
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
|
||||
|
||||
var fileName = Path.GetFileName(body["filename"].ToString());
|
||||
var lang = context.Request.Cookies.GetOrDefault("ulang", null);
|
||||
var filePass = body["filePass"] != null ? body["filePass"].ToString() : null;
|
||||
var fileUri = DocManagerHelper.GetDownloadUrl(fileName);
|
||||
|
||||
var extension = (Path.GetExtension(fileName).ToLower() ?? "").Trim('.');
|
||||
var internalExtension = DocManagerHelper.GetInternalExtension(FileUtility.GetFileType(fileName)).Trim('.');
|
||||
|
||||
// check if the file with such an extension can be converted
|
||||
if (DocManagerHelper.ConvertExts.Contains("." + extension)
|
||||
&& !string.IsNullOrEmpty(internalExtension))
|
||||
{
|
||||
// generate document key
|
||||
var key = ServiceConverter.GenerateRevisionId(fileUri);
|
||||
|
||||
var downloadUri = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=download&fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
};
|
||||
|
||||
// get the url to the converted file
|
||||
string newFileUri;
|
||||
var result = ServiceConverter.GetConvertedUri(fileUri, extension, internalExtension, key, true, out newFileUri);
|
||||
var result = ServiceConverter.GetConvertedUri(downloadUri.ToString(), extension, internalExtension, key, true, out newFileUri, filePass, lang);
|
||||
if (result != 100)
|
||||
{
|
||||
context.Response.Write("{ \"step\" : \"" + result + "\", \"filename\" : \"" + fileName + "\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
// get a file name of an internal file extension with an index if the file with such a name already exists
|
||||
var correctName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "." + internalExtension);
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(newFileUri);
|
||||
|
||||
using (var stream = req.GetResponse().GetResponseStream())
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
using (var stream = req.GetResponse().GetResponseStream()) // get response stream of the converting file
|
||||
{
|
||||
if (stream == null) throw new Exception("Stream is null");
|
||||
const int bufferSize = 4096;
|
||||
@ -138,16 +271,20 @@ namespace OnlineEditorsExampleMVC
|
||||
int readed;
|
||||
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
|
||||
{
|
||||
fs.Write(buffer, 0, readed);
|
||||
fs.Write(buffer, 0, readed); // write bytes to the output stream
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File.Delete(DocManagerHelper.StoragePath(fileName));
|
||||
fileName = correctName;
|
||||
Remove(fileName); // remove the original file and its history if it exists
|
||||
fileName = correctName; // create meta information about the converted file with user id and name specified
|
||||
var id = context.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name);
|
||||
}
|
||||
|
||||
context.Response.Write("{ \"filename\" : \"" + fileName + "\"}");
|
||||
var documentType = FileUtility.GetFileType(fileName).ToString().ToLower();
|
||||
context.Response.Write("{ \"filename\" : \"" + fileName + "\", \"documentType\": \"" + documentType + "\" }");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -155,6 +292,7 @@ namespace OnlineEditorsExampleMVC
|
||||
}
|
||||
}
|
||||
|
||||
// define tracker status
|
||||
private enum TrackerStatus
|
||||
{
|
||||
NotFound = 0,
|
||||
@ -162,74 +300,296 @@ namespace OnlineEditorsExampleMVC
|
||||
MustSave = 2,
|
||||
Corrupted = 3,
|
||||
Closed = 4,
|
||||
MustForceSave = 6,
|
||||
CorruptedForceSave = 7
|
||||
}
|
||||
|
||||
// track file changes
|
||||
private static void Track(HttpContext context)
|
||||
{
|
||||
// read request body
|
||||
var fileData = TrackManager.readBody(context);
|
||||
|
||||
var userAddress = context.Request["userAddress"];
|
||||
var fileName = context.Request["fileName"];
|
||||
var fileName = Path.GetFileName(context.Request["fileName"]);
|
||||
var status = (TrackerStatus) (int) fileData["status"]; // get status from the request body
|
||||
var saved = 0;
|
||||
switch (status)
|
||||
{
|
||||
case TrackerStatus.Editing:
|
||||
try
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
var actions = jss.Deserialize <List<object>> (jss.Serialize(fileData["actions"]));
|
||||
var action = jss.Deserialize <Dictionary<string, object>> (jss.Serialize(actions[0]));
|
||||
if (action != null && action["type"].ToString().Equals("0")) // finished edit
|
||||
{
|
||||
var user = action["userid"].ToString(); // the user who finished editing
|
||||
var users = jss.Deserialize<List<object>>(jss.Serialize(fileData["users"]));
|
||||
if (!users.Contains(user))
|
||||
{
|
||||
TrackManager.commandRequest("forcesave", fileData["key"].ToString()); // create a command request with the forcesave method
|
||||
}
|
||||
|
||||
var storagePath = DocManagerHelper.StoragePath(fileName, userAddress);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
break;
|
||||
|
||||
string body;
|
||||
// MustSave, Corrupted
|
||||
case TrackerStatus.MustSave:
|
||||
case TrackerStatus.Corrupted:
|
||||
try
|
||||
{
|
||||
// saving a document
|
||||
saved = TrackManager.processSave(fileData, fileName, userAddress);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
saved = 1;
|
||||
}
|
||||
context.Response.Write("{\"error\":" + saved + "}");
|
||||
return;
|
||||
|
||||
// MustForceSave, CorruptedForceSave
|
||||
case TrackerStatus.MustForceSave:
|
||||
case TrackerStatus.CorruptedForceSave:
|
||||
try
|
||||
{
|
||||
// force saving a document
|
||||
saved = TrackManager.processForceSave(fileData, fileName, userAddress);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
saved = 1;
|
||||
}
|
||||
context.Response.Write("{\"error\":" + saved + "}");
|
||||
return;
|
||||
}
|
||||
|
||||
context.Response.Write("{\"error\":" + saved + "}");
|
||||
}
|
||||
|
||||
// remove a file
|
||||
private static void Remove(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
var fileName = Path.GetFileName(context.Request["fileName"]);
|
||||
Remove(fileName); // remove a file and its history if it exists
|
||||
|
||||
context.Response.Write("{ \"success\": true }");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// remove a file by its name
|
||||
private static void Remove(string fileName)
|
||||
{
|
||||
var path = DocManagerHelper.StoragePath(fileName, null); // delete file
|
||||
var histDir = DocManagerHelper.HistoryDir(path); // delete file history
|
||||
|
||||
if (File.Exists(path)) File.Delete(path);
|
||||
if (Directory.Exists(histDir)) Directory.Delete(histDir, true);
|
||||
}
|
||||
|
||||
// get files information
|
||||
private static void Files(HttpContext context)
|
||||
{
|
||||
List<Dictionary<string, object>> files = null;
|
||||
|
||||
try
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
context.Response.ContentType = "application/json";
|
||||
|
||||
if (context.Request["fileId"] == null)
|
||||
{
|
||||
body = readStream.ReadToEnd();
|
||||
files = DocManagerHelper.GetFilesInfo(); // get the information about the files from the storage path
|
||||
context.Response.Write(jss.Serialize(files));
|
||||
}
|
||||
else
|
||||
{
|
||||
var fileId = context.Request["fileId"]; // get file id from the request
|
||||
files = DocManagerHelper.GetFilesInfo(fileId);
|
||||
if (files.Count == 0)
|
||||
{
|
||||
context.Response.Write("\"File not found\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Response.Write(jss.Serialize(files));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new HttpException((int) HttpStatusCode.BadRequest, e.Message);
|
||||
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
if (string.IsNullOrEmpty(body)) return;
|
||||
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
|
||||
var status = (TrackerStatus) (int) fileData["status"];
|
||||
// get sample files from the assests
|
||||
private static void Assets(HttpContext context)
|
||||
{
|
||||
var fileName = Path.GetFileName(context.Request["filename"]);
|
||||
var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName;
|
||||
download(filePath, context);
|
||||
}
|
||||
|
||||
switch (status)
|
||||
// download a csv file
|
||||
private static void GetCsv(HttpContext context)
|
||||
{
|
||||
var fileName = "csv.csv";
|
||||
var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName;
|
||||
download(filePath, context);
|
||||
}
|
||||
|
||||
// download a file
|
||||
private static void Download(HttpContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
case TrackerStatus.MustSave:
|
||||
case TrackerStatus.Corrupted:
|
||||
var downloadUri = (string) fileData["url"];
|
||||
var fileName = Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? context.Request["fileName"]
|
||||
: Path.GetFileName(context.Request["fileName"]);
|
||||
var userAddress = context.Request["userAddress"];
|
||||
var isEmbedded = context.Request["dmode"];
|
||||
|
||||
var req = (HttpWebRequest) WebRequest.Create(downloadUri);
|
||||
if (JwtManager.Enabled && isEmbedded == null && userAddress != null)
|
||||
{
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
|
||||
var saved = 1;
|
||||
try
|
||||
string token = "";
|
||||
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
|
||||
{
|
||||
using (var stream = req.GetResponse().GetResponseStream())
|
||||
{
|
||||
if (stream == null) throw new Exception("stream is null");
|
||||
const int bufferSize = 4096;
|
||||
|
||||
using (var fs = File.Open(storagePath, FileMode.Create))
|
||||
{
|
||||
var buffer = new byte[bufferSize];
|
||||
int readed;
|
||||
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
|
||||
{
|
||||
fs.Write(buffer, 0, readed);
|
||||
}
|
||||
}
|
||||
}
|
||||
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
|
||||
token = JwtManager.Decode(headerToken);
|
||||
}
|
||||
catch (Exception)
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
saved = 0;
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Response.Write("JWT validation failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
var filePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false); // get the path to the force saved document version
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
filePath = DocManagerHelper.StoragePath(fileName, userAddress); // or to the original document
|
||||
}
|
||||
download(filePath, context);
|
||||
}
|
||||
context.Response.Write("{\"error\":0}");
|
||||
catch (Exception)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"File not found!\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// download data from the url to the file
|
||||
private static void download(string filePath, HttpContext context)
|
||||
{
|
||||
var fileinf = new FileInfo(filePath);
|
||||
context.Response.AddHeader("Content-Length", fileinf.Length.ToString()); // set headers to the response
|
||||
context.Response.AddHeader("Content-Type", MimeMapping.GetMimeMapping(filePath));
|
||||
var tmp = HttpUtility.UrlEncode(Path.GetFileName(filePath));
|
||||
tmp = tmp.Replace("+", "%20");
|
||||
context.Response.AddHeader("Content-Disposition", "attachment; filename*=UTF-8\'\'" + tmp);
|
||||
context.Response.TransmitFile(filePath);
|
||||
}
|
||||
|
||||
public bool IsReusable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
// download a history file
|
||||
private static void DownloadHistory(HttpContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
var fileName = Path.GetFileName(context.Request["fileName"]);
|
||||
var userAddress = Path.GetFileName(context.Request["userAddress"]);
|
||||
var version = System.Convert.ToInt32(context.Request["ver"]);
|
||||
var file = Path.GetFileName(context.Request["file"]);
|
||||
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
|
||||
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
|
||||
string token = JwtManager.Decode(headerToken);
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Response.Write("JWT validation failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Response.Write("JWT validation failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
var histPath = DocManagerHelper.HistoryDir(DocManagerHelper.StoragePath(fileName, userAddress));
|
||||
var filePath = Path.Combine(DocManagerHelper.VersionDir(histPath, version), file); // get the path to document version
|
||||
|
||||
download(filePath, context);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"File not found!\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// rename a file
|
||||
private static void Rename(HttpContext context)
|
||||
{
|
||||
// read request body
|
||||
context.Response.ContentType = "text/plain";
|
||||
string fileData;
|
||||
try
|
||||
{
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
fileData = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":\"Request stream is empty\"}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
|
||||
var newFileName = (string) body["newfilename"];
|
||||
var docKey = (string) body["dockey"];
|
||||
|
||||
var origExt = '.' + (string) body["ext"];
|
||||
var curExt = Path.GetExtension(newFileName).ToLower();
|
||||
|
||||
if (string.Compare(origExt, curExt, true) != 0)
|
||||
{
|
||||
newFileName += origExt;
|
||||
}
|
||||
var meta = new Dictionary<string, object>() {
|
||||
{ "title", newFileName }
|
||||
};
|
||||
TrackManager.commandRequest("meta", docKey, meta);
|
||||
context.Response.Write("{ \"result\": \"OK\"}");
|
||||
}
|
||||
}
|
||||
}
|
||||