Compare commits
994 Commits
v4.5.dev.1
...
feature/ne
| Author | SHA1 | Date | |
|---|---|---|---|
| 307e5dcc63 | |||
| 18d8d8258d | |||
| ec01bf8a3a | |||
| f8f9e9cff0 | |||
| 0c02148cb8 | |||
| df7b372b1f | |||
| 7d04bb5252 | |||
| 25ebaf8844 | |||
| b5f8487240 | |||
| 8347133022 | |||
| 4cb48a2db9 | |||
| c180cc7d12 | |||
| d460a65f38 | |||
| 1bae3ba53a | |||
| 63e8029d0d | |||
| f1d1989756 | |||
| c6e2a6bcb2 | |||
| e338311423 | |||
| 35f397de20 | |||
| 6dea1c1422 | |||
| 03f55e661e | |||
| 7a416b107f | |||
| 8135aae7b0 | |||
| a652a9f1f1 | |||
| 650266133e | |||
| 167d8d5059 | |||
| 5ba8c4e8f7 | |||
| 99e41cde5f | |||
| 08072226a5 | |||
| 858e14a47d | |||
| 621319554b | |||
| 88eabbf40d | |||
| c1cad2eb6b | |||
| 5ae9c11bc5 | |||
| 563e02a5ba | |||
| 41daabbe0c | |||
| b2980b5749 | |||
| f84dda21f7 | |||
| c342740d44 | |||
| 0cc832652d | |||
| bdda8a8ed1 | |||
| 263388f1b8 | |||
| b2df1f5a96 | |||
| 61abb4d809 | |||
| b58f33dddf | |||
| c0fd4c00d5 | |||
| c6ba3709aa | |||
| 2205e6252e | |||
| 68f950aac5 | |||
| 05215ffd4b | |||
| e0463ccd17 | |||
| 582a0d0612 | |||
| 63893d2476 | |||
| fa02a16376 | |||
| 4e7f4f2336 | |||
| 3c0384f581 | |||
| 880fa47e49 | |||
| 12a72795ff | |||
| 2dc7b761b2 | |||
| 2a898a8e8d | |||
| 44fc7a8215 | |||
| af16f147ba | |||
| c52dbdde4e | |||
| ab82be9b3d | |||
| 0ae02d8af9 | |||
| 293fbb4802 | |||
| 65f5f6c25e | |||
| ca92b12bd3 | |||
| 272e2f5a15 | |||
| bbdd54712b | |||
| 2cd2251f2c | |||
| 9e34ed7f67 | |||
| eee6246d0c | |||
| 36513d3544 | |||
| fafc3d3d4f | |||
| c1e4abf362 | |||
| 06c1c1bf21 | |||
| 24a2e0bd14 | |||
| 05cd67a2f1 | |||
| 6f691b6b9f | |||
| 85e3f83d84 | |||
| b00a4dba31 | |||
| 4595376ee2 | |||
| 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 | |||
| 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 | |||
| 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 | |||
| 9459d4a7c1 | |||
| 120a0712da | |||
| a536fdf6ab | |||
| 71103b802e | |||
| 0b33ce14f7 | |||
| a945870c6a | |||
| cafaa27e92 | |||
| d22d2ace22 | |||
| 430a16b543 | |||
| d2a89f4a5f | |||
| efda987b55 | |||
| 20827e4d76 | |||
| 16473b4e06 | |||
| 30d26df97d | |||
| 9fb0289af4 | |||
| fa8e2cf975 | |||
| 68f6be2e43 | |||
| 87381123e3 | |||
| 7d79efe1f1 | |||
| 04c3ff5895 | |||
| e3eb837f45 | |||
| c96205b4da | |||
| 2c5ee77c08 | |||
| 4dc137cf96 | |||
| f8003e75ec | |||
| cb2414140a | |||
| d1f63976cb | |||
| 4276caf87d | |||
| d5571a3f2e | |||
| 3582109cf7 | |||
| 10ecddbe61 | |||
| 5a4dea7bfc | |||
| 911da29ecb | |||
| 37fe8eb4d5 | |||
| 633fd6efc9 | |||
| a758d3f294 | |||
| 0245c992a3 | |||
| 04cad3f10f | |||
| cb60398051 | |||
| f46b6a7c8c | |||
| 4872a74d13 | |||
| b00ed15051 | |||
| 0cbc290fbe | |||
| cb065bc4db | |||
| 4712057faa | |||
| 2e9842d559 | |||
| 0078c05a74 | |||
| aa8a143338 | |||
| a999b20588 | |||
| cab5f62201 | |||
| 95d33f3ee7 | |||
| 83c03c97db | |||
| 7b1c56ea2c | |||
| 178133a292 | |||
| f9232788b2 | |||
| c0f8caaf0b | |||
| fbb23a5872 | |||
| ec764e0f0e | |||
| d08d887392 | |||
| b039b16fd9 | |||
| 1df7cc54c1 | |||
| cf6d11bf4e | |||
| 8793235481 | |||
| 232fc0d156 | |||
| b1352bd897 | |||
| d8e1d4d6b7 | |||
| fc2db9b47f | |||
| c0b8e2e578 | |||
| fa4c3e3258 | |||
| 6d1bda75b9 | |||
| db9287263c | |||
| 6e1cef27cc | |||
| ceb4db9de6 | |||
| 68c2ae0444 | |||
| 30bdc7497a | |||
| 67a53ea5c8 | |||
| 043ab4251c | |||
| 20412f0c80 | |||
| 3792599e41 | |||
| 48a5f7ce72 | |||
| f3ee251088 | |||
| 2497acb9f5 | |||
| 6038381f72 | |||
| 7cd8333186 | |||
| 39301f65b6 | |||
| 5209ea55c0 | |||
| fb1715eebc | |||
| 59e78960ea | |||
| 102f34c49e | |||
| d0bbc736af | |||
| 5115995fb9 | |||
| 682ed58528 | |||
| 2114b23900 | |||
| 207f896e25 | |||
| 983c8829fa | |||
| 02afb13601 | |||
| 494bc6b6a4 | |||
| 72db6178ac | |||
| 5c1d925d42 | |||
| fd4dfea7d7 | |||
| ebd309dabc | |||
| f376c50fd9 | |||
| 6088e7d685 | |||
| d143e3c80d | |||
| 56d6388603 | |||
| 54993942bf | |||
| f2301ecbbf | |||
| f09f62103c | |||
| 75c1cc0c83 | |||
| e1e3357748 | |||
| 449020a9a4 | |||
| 22f2f0f922 | |||
| 1aa7e73d79 | |||
| 6eaa290557 | |||
| ed8df66513 | |||
| 16d942a487 | |||
| 5c6d9ec008 | |||
| 8e7f7c20e4 | |||
| b3f7e9861f | |||
| 797696ceea | |||
| af30096d71 | |||
| 8a7193a645 | |||
| 84f5be3556 | |||
| cff90de454 | |||
| 18b7bdb401 | |||
| 75155b4c54 | |||
| 4c3bc0e7ef | |||
| 908affc61c | |||
| c5b227d278 | |||
| 364d24dda2 | |||
| 74537582d7 | |||
| 8057ef7cbc | |||
| 8bab3ecbc6 |
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/csharp-core/wwwroot/assets"]
|
||||
path = web/documentserver-example/csharp-core/wwwroot/assets
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/en
|
||||
271
3rd-Party.license
Normal file
@ -0,0 +1,271 @@
|
||||
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/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
|
||||
|
||||
sync-request - Make synchronous web requests with cross-platform support. (https://github.com/ForbesLindesay/sync-request/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: sync-request.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
|
||||
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
69
Readme.md
@ -1,19 +1,74 @@
|
||||
|
||||
[](https://opensource.org/licenses/MIT) 
|
||||
|
||||
## 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 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.
|
||||
|
||||
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`
|
||||
|
||||
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}` |
|
||||
|
||||
## Project Information
|
||||
|
||||
Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
|
||||
Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx)
|
||||
|
||||
Code repository: [https://github.com/ONLYOFFICE/document-server-integration](https://github.com/ONLYOFFICE/document-server-integration "https://github.com/ONLYOFFICE/document-server-integration")
|
||||
|
||||
SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
|
||||
ONLYOFFICE for developers: [https://www.onlyoffice.com/developer-edition.aspx](https://www.onlyoffice.com/developer-edition.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx)
|
||||
|
||||
## User Feedback and Support
|
||||
|
||||
@ -25,4 +80,4 @@ If you have any problems with or questions about [ONLYOFFICE Document Server][2]
|
||||
|
||||
## 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,44 +4,66 @@
|
||||
<PropertyGroup>
|
||||
<To Condition=" '$(To)' == '' ">..\deploy\</To>
|
||||
<RootDir Condition="$(RootDir)==''">..\..\</RootDir>
|
||||
<NameCSharp>$(To).Net (C#) Example</NameCSharp>
|
||||
<DirCSharp>$(RootDir)web\documentserver-example\csharp\</DirCSharp>
|
||||
<NameMvc>$(To).Net (C# MVC) Example</NameMvc>
|
||||
<DirMvc>$(RootDir)web\documentserver-example\csharp-mvc\</DirMvc>
|
||||
<NameJava>$(To)Java Example</NameJava>
|
||||
<DirJava>$(RootDir)web\documentserver-example\java\</DirJava>
|
||||
<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\**" />
|
||||
</ItemGroup>
|
||||
<Zip Files="@(ZipFilesCSharp)" WorkingDirectory="$(DirCSharp)" ZipFileName="$(To).Net (C#) Example.zip" />
|
||||
<Copy SourceFiles="@(ZipFilesCSharp)" DestinationFiles="@(ZipFilesCSharp->'$(NameCSharp)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameCSharp)" WorkingDirectory="$(To)" ZipFileName="$(NameCSharp).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesMVC Include="$(DirMvc)**" Exclude="$(DirMvc)obj\**" />
|
||||
</ItemGroup>
|
||||
<Zip Files="@(ZipFilesMVC)" WorkingDirectory="$(DirMvc)" ZipFileName="$(To).Net (C# MVC) Example.zip" />
|
||||
<Copy SourceFiles="@(ZipFilesMVC)" DestinationFiles="@(ZipFilesMVC->'$(NameMvc)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameMvc)" WorkingDirectory="$(To)" ZipFileName="$(NameMvc).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesJava Include="$(DirJava)**" />
|
||||
</ItemGroup>
|
||||
<Zip Files="@(ZipFilesJava)" WorkingDirectory="$(DirJava)" ZipFileName="$(To)Java Example.zip" />
|
||||
<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\**" />
|
||||
</ItemGroup>
|
||||
<Zip Files="@(ZipFilesNodeJS)" WorkingDirectory="$(DirNodeJS)" ZipFileName="$(To)Node.js Example.zip" />
|
||||
<Copy SourceFiles="@(ZipFilesNodeJS)" DestinationFiles="@(ZipFilesNodeJS->'$(NameNodeJS)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameNodeJS)" WorkingDirectory="$(To)" ZipFileName="$(NameNodeJS).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesPHP Include="$(DirPHP)**" />
|
||||
</ItemGroup>
|
||||
<Zip Files="@(ZipFilesPHP)" WorkingDirectory="$(DirPHP)" ZipFileName="$(To)PHP Example.zip" />
|
||||
<Copy SourceFiles="@(ZipFilesPHP)" DestinationFiles="@(ZipFilesPHP->'$(NamePHP)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NamePHP)" WorkingDirectory="$(To)" ZipFileName="$(NamePHP).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesRuby Include="$(DirRuby)**" />
|
||||
</ItemGroup>
|
||||
<Zip Files="@(ZipFilesRuby)" WorkingDirectory="$(DirRuby)" ZipFileName="$(To)Ruby Example.zip" />
|
||||
<Copy SourceFiles="@(ZipFilesRuby)" DestinationFiles="@(ZipFilesRuby->'$(NameRuby)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameRuby)" WorkingDirectory="$(To)" ZipFileName="$(NameRuby).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesPython Include="$(DirPython)**" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesPython)" DestinationFiles="@(ZipFilesPython->'$(NamePython)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NamePython)" WorkingDirectory="$(To)" ZipFileName="$(NamePython).zip" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@ -1,22 +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
|
||||
@ -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.
|
||||
|
||||
|
||||
17
web/documentserver-example/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Integration examples
|
||||
|
||||
## To start integrating document editors into your own website you need to do the following:
|
||||
|
||||
1. Download [Document Server installation](https://www.onlyoffice.com/developer-edition-request.aspx?from=api.onlyoffice.com) and set it up on your local server.
|
||||
|
||||
2. Select the programming language and clone the source code for the sample of online editors integration into your web site.
|
||||
|
||||
3. [Edit the configuration files](https://api.onlyoffice.com/editors/advanced) in the sample changing the default path for the one to the editors installed at step 1 and other advanced parameters available for editor configuration.
|
||||
|
||||
4. 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. And you must also make sure that the Document Server in its turn has access to the server with the example installed with the address which you specify instead of **example.com** in the configuration files.
|
||||
|
||||
Please note that the integration examples are used to demonstrate document editors functions and the ways to connect **Document Server** to your own application. **DO NOT USE** these examples on your own server without **PROPER CODE MODIFICATIONS**!
|
||||
|
||||
The result should look like the [demo preview](https://api.onlyoffice.com/editors/demopreview#DemoPreview) on our web site.
|
||||
|
||||
If you have any further questions, please contact us at [integration@onlyoffice.com](mailto:integration@onlyoffice.com).
|
||||
29
web/documentserver-example/csharp-core/3rd-Party.license
Normal file
@ -0,0 +1,29 @@
|
||||
ONLYOFFICE Applications example uses code from the following 3rd party projects:
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Microsoft.AspNetCore.Cors - CORS middleware and policy for ASP.NET Core to enable cross-origin resource sharing (https://raw.githubusercontent.com/aspnet/AspNetCore/2.0.0/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: Microsoft.AspNetCore.Cors.license
|
||||
4
web/documentserver-example/csharp-core/AUTHORS.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Authors
|
||||
|
||||
* Ascensio System SIA: <integration@onlyoffice.com>
|
||||
|
||||
@ -0,0 +1,372 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using OnlineEditorsExampleNetCore.Helpers;
|
||||
using OnlineEditorsExampleNetCore.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly IWebHostEnvironment _environment;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
public HomeController(IWebHostEnvironment environment, IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
_environment = environment;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
DocManagerHelper.ContentPath = _environment.WebRootPath;
|
||||
DocManagerHelper.Context = HttpContext;
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult Editor(string fileName, string editorsMode, string editorsType)
|
||||
{
|
||||
var file = new FileModel
|
||||
{
|
||||
Mode = editorsMode, // editor mode: edit or view
|
||||
Type = editorsType, // editor type: desktop, mobile, embedded
|
||||
FileName = Path.GetFileName(fileName), // file name
|
||||
};
|
||||
return View("Editor", file);
|
||||
}
|
||||
|
||||
public IActionResult Sample(string fileExt, bool? sample)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
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
|
||||
return Redirect(Url.Action("Editor", "Home", new { fileName = fileName }));
|
||||
}
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
||||
[Route("/upload")]
|
||||
public IActionResult Upload(IFormCollection form)
|
||||
{
|
||||
HttpContext.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
var httpPostedFile = form.Files[0];
|
||||
|
||||
var fileName = httpPostedFile.FileName;
|
||||
if (HttpContext.Request.Headers["User-Agent"] == "IE")
|
||||
{
|
||||
var files = httpPostedFile.FileName.Split(new char[] { '\\' });
|
||||
fileName = files[files.Length - 1];
|
||||
}
|
||||
|
||||
var curSize = httpPostedFile.Length;
|
||||
if (DocManagerHelper.MaxFileSize < curSize || curSize <= 0)
|
||||
{
|
||||
throw new Exception("File size is incorrect");
|
||||
}
|
||||
|
||||
var curExt = (Path.GetExtension(fileName) ?? "").ToLower();
|
||||
if (!DocManagerHelper.FileExts.Contains(curExt))
|
||||
{
|
||||
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); // get the storage path to the uploading file
|
||||
using (var fs = System.IO.File.Open(savedFileName, FileMode.Create, FileAccess.ReadWrite))
|
||||
{
|
||||
httpPostedFile.CopyTo(fs); // and save it
|
||||
}
|
||||
|
||||
// get file meta information or create the default one
|
||||
var id = HttpContext.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name);
|
||||
return Json(new Dictionary<string, object>() {
|
||||
{ "filename", fileName },
|
||||
{ "documentType", documentType }
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return Json(new Dictionary<string, object>() { { "error", e.Message } });
|
||||
}
|
||||
}
|
||||
|
||||
[Route("/convert")]
|
||||
public IActionResult Convert()
|
||||
{
|
||||
HttpContext.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
string fileData;
|
||||
|
||||
using (var receiveStream = HttpContext.Request.Body)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
fileData = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(fileData)) return Json(new Dictionary<string, object>() { { "error", "1" }, { "message", "Request stream is empty" } });
|
||||
}
|
||||
|
||||
var body = JsonConvert.DeserializeObject<Dictionary<string, object>>(fileData);
|
||||
|
||||
var fileName = Path.GetFileName(body["filename"].ToString());
|
||||
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);
|
||||
|
||||
// get the url to the converted file
|
||||
string newFileUri;
|
||||
var result = ServiceConverter.GetConvertedUri(fileUri.ToString(), extension, internalExtension, key, true, out newFileUri, filePass);
|
||||
if (result != 100)
|
||||
{
|
||||
return Json(new Dictionary<string, object>() { { "step", result }, { "filename", fileName } });
|
||||
}
|
||||
|
||||
// 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()) // get response stream of the converting file
|
||||
{
|
||||
if (stream == null) throw new Exception("Stream is null");
|
||||
const int bufferSize = 4096;
|
||||
|
||||
using (var fs = System.IO.File.Open(DocManagerHelper.StoragePath(correctName), 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 = HttpContext.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name);
|
||||
}
|
||||
var documentType = FileUtility.GetFileType(fileName).ToString().ToLower();
|
||||
return Json(new Dictionary<string, object>() { { "filename", fileName }, { "documentType", documentType } });
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return Json(new Dictionary<string, object>() { { "error", e.Message } });
|
||||
}
|
||||
}
|
||||
|
||||
// track file changes
|
||||
[Route("/track")]
|
||||
public IActionResult Track([FromQuery] string userAddress, [FromQuery] string fileName)
|
||||
{
|
||||
// read request body
|
||||
var fileData = TrackManager.readBody(HttpContext);
|
||||
|
||||
var status = (WebEditorExtenstions.TrackerStatus)(Int64)fileData["status"]; // get status from the request body
|
||||
var saved = 1; // editing
|
||||
switch (status)
|
||||
{
|
||||
case WebEditorExtenstions.TrackerStatus.Editing:
|
||||
try
|
||||
{
|
||||
var actions = JsonConvert.DeserializeObject<List<object>>(JsonConvert.SerializeObject(fileData["actions"]));
|
||||
var action = JsonConvert.DeserializeObject<Dictionary<string, object>>(JsonConvert.SerializeObject(actions[0]));
|
||||
if (action != null && action["type"].ToString().Equals("0")) // finished edit
|
||||
{
|
||||
var user = action["userid"].ToString(); // the user who finished editing
|
||||
var users = JsonConvert.DeserializeObject<List<object>>(JsonConvert.SerializeObject(fileData["users"]));
|
||||
if (!users.Contains(user))
|
||||
{
|
||||
TrackManager.commandRequest("forcesave", fileData["key"].ToString()); // create a command request with the forcesave method
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
break;
|
||||
|
||||
// MustSave, Corrupted
|
||||
case WebEditorExtenstions.TrackerStatus.MustSave:
|
||||
case WebEditorExtenstions.TrackerStatus.Corrupted:
|
||||
try
|
||||
{
|
||||
// saving a document
|
||||
saved = TrackManager.processSave(fileData, fileName, userAddress);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
saved = 1;
|
||||
}
|
||||
return Json(new Dictionary<string, object>() { { "error", saved } });
|
||||
|
||||
// MustForceSave, CorruptedForceSave
|
||||
case WebEditorExtenstions.TrackerStatus.MustForceSave:
|
||||
case WebEditorExtenstions.TrackerStatus.CorruptedForceSave:
|
||||
try
|
||||
{
|
||||
// force saving a document
|
||||
saved = TrackManager.processForceSave(fileData, fileName, userAddress);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
saved = 1;
|
||||
}
|
||||
return Json(new Dictionary<string, object>() { { "error", saved } });
|
||||
}
|
||||
return Json(new Dictionary<string, object>() { { "error", 0 } });
|
||||
}
|
||||
|
||||
// remove a file
|
||||
[Route("/remove")]
|
||||
public IActionResult Remove([FromQuery] string fileName)
|
||||
{
|
||||
HttpContext.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
WebEditorExtenstions.Remove(fileName);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return Json(new Dictionary<string, object>() { { "error", e.Message } });
|
||||
}
|
||||
return Redirect(Url.Action("Index", "Home"));
|
||||
}
|
||||
|
||||
// get files information
|
||||
[Route("/files")]
|
||||
public IActionResult Files([FromQuery] string fileId)
|
||||
{
|
||||
List<Dictionary<string, object>> files = null;
|
||||
|
||||
try
|
||||
{
|
||||
HttpContext.Response.ContentType = "application/json";
|
||||
|
||||
if (fileId.ToString() == null)
|
||||
{
|
||||
files = DocManagerHelper.GetFilesInfo(); // get the information about the files from the storage path
|
||||
return Json(JsonConvert.SerializeObject(files));
|
||||
}
|
||||
else
|
||||
{
|
||||
files = DocManagerHelper.GetFilesInfo(fileId);
|
||||
if (files.Count == 0)
|
||||
{
|
||||
return Json("File not found");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(JsonConvert.SerializeObject(files));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return Json(new Dictionary<string, object>() { { "error", e.Message } });
|
||||
}
|
||||
}
|
||||
|
||||
// get sample files from the assests
|
||||
[Route("/assets")]
|
||||
public async Task<IActionResult> Assets([FromQuery] string fileName)
|
||||
{
|
||||
var filePath = "assets/sample/" + fileName;
|
||||
await WebEditorExtenstions.DownloadAsync(filePath, HttpContext);
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
||||
// download a csv file
|
||||
[Route("/csv")]
|
||||
public async Task<IActionResult> GetCsv()
|
||||
{
|
||||
var fileName = "csv.csv";
|
||||
var filePath = "assets/sample/" + fileName;
|
||||
await WebEditorExtenstions.DownloadAsync(filePath, HttpContext);
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
||||
// download a file
|
||||
[Route("/download")]
|
||||
public async Task<IActionResult> Download([FromQuery] string fileName, [FromQuery] string userAddress)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
string JWTheader = Startup.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : Startup.AppSettings["files.docservice.header"];
|
||||
|
||||
if (HttpContext.Request.Headers.Keys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var headerToken = HttpContext.Request.Headers[JWTheader].ToString().Substring("Bearer ".Length);
|
||||
string token = JwtManager.Decode(headerToken);
|
||||
if (token == null || token.Equals(""))
|
||||
{
|
||||
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
return Json("JWT validation failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var filePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false); // get the path to the force saved document version
|
||||
if (filePath.Equals(""))
|
||||
{
|
||||
filePath = DocManagerHelper.StoragePath(fileName, userAddress); // or to the original document
|
||||
}
|
||||
await WebEditorExtenstions.DownloadAsync(filePath, HttpContext);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return Json(new Dictionary<string, object>() { { "error", "File not found!" } });
|
||||
}
|
||||
return new EmptyResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,362 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Microsoft.AspNetCore.Http;
|
||||
using System.Web;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System;
|
||||
using OnlineEditorsExampleNetCore.Models;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Helpers
|
||||
{
|
||||
public class DocManagerHelper
|
||||
{
|
||||
public static string ContentPath{ get; set; }
|
||||
public static HttpContext Context {
|
||||
set
|
||||
{
|
||||
Host = value.Request.Host.Host;
|
||||
RequestHost = value.Request.Headers["Host"];
|
||||
Port = value.Request.Host.Port.ToString();
|
||||
}
|
||||
}
|
||||
private static string Host { get; set; }
|
||||
private static string RequestHost { get; set; }
|
||||
private static string Port { get; set; }
|
||||
|
||||
// get max file size
|
||||
public static long MaxFileSize
|
||||
{
|
||||
get
|
||||
{
|
||||
long size;
|
||||
long.TryParse(Startup.AppSettings["filesize-max"], out size);
|
||||
return size > 0 ? size : 5 * 1024 * 1024;
|
||||
}
|
||||
}
|
||||
|
||||
// get all the supported file extensions
|
||||
public static List<string> FileExts
|
||||
{
|
||||
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be viewed
|
||||
public static List<string> ViewedExts
|
||||
{
|
||||
get { return (Startup.AppSettings["files.docservice.viewed-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be edited
|
||||
public static List<string> EditedExts
|
||||
{
|
||||
get { return (Startup.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 (Startup.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 ?? Host, "[^0-9a-zA-Z.=]", "_");
|
||||
}
|
||||
|
||||
// get the storage path of the file
|
||||
public static string StoragePath(string fileName, string userAddress = null)
|
||||
{
|
||||
var directory = ContentPath + "\\" + CurUserHostAddress(userAddress) + "\\";
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
return directory + Path.GetFileName(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 = ContentPath + 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 "";
|
||||
}
|
||||
}
|
||||
|
||||
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 0; // if the history path doesn't exist, then the file version is 0
|
||||
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).ToLower();
|
||||
var name = baseName + ext;
|
||||
|
||||
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; // and add an index to the base name
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
// get all the stored files from the user host address
|
||||
public static List<FileInfo> GetStoredFiles()
|
||||
{
|
||||
var directory = ContentPath + "\\" + CurUserHostAddress(null) + "\\";
|
||||
if (!Directory.Exists(directory)) return new List<FileInfo>();
|
||||
|
||||
var directoryInfo = new DirectoryInfo(directory);
|
||||
|
||||
// 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(ContentPath + "\\" + demoPath + demoName, StoragePath(fileName)); // copy file to the storage directory
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
// create meta information
|
||||
public static void CreateMeta(string fileName, string uid, string uname, string userAddress = null)
|
||||
{
|
||||
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"), JsonConvert.SerializeObject(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 = "/" + fileName,
|
||||
Query = ""
|
||||
};
|
||||
|
||||
return uri.ToString();
|
||||
}
|
||||
|
||||
// get the path url
|
||||
public static string GetPathUri(string path)
|
||||
{
|
||||
var uri = new UriBuilder(GetServerUrl(true))
|
||||
{
|
||||
Path = "/" + path,
|
||||
Query = ""
|
||||
};
|
||||
|
||||
return uri.ToString();
|
||||
}
|
||||
|
||||
// get the server url
|
||||
public static string GetServerUrl(Boolean forDocumentServer)
|
||||
{
|
||||
if (forDocumentServer && !Startup.AppSettings["files.docservice.url.example"].Equals(""))
|
||||
{
|
||||
return Startup.AppSettings["files.docservice.url.example"];
|
||||
}
|
||||
else
|
||||
{
|
||||
var uri = new UriBuilder(Host) { Query = "" };
|
||||
uri = new UriBuilder(uri.Scheme + "://" + RequestHost);
|
||||
return uri.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
// get the callback url
|
||||
public static string GetCallback(string fileName)
|
||||
{
|
||||
var callbackUrl = new UriBuilder(GetServerUrl(true))
|
||||
{
|
||||
Path = "/track",
|
||||
Query = "fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
+ "&userAddress=" + HttpUtility.UrlEncode(Host)
|
||||
};
|
||||
return callbackUrl.ToString();
|
||||
}
|
||||
|
||||
public static string GetCreateUrl(FileUtility.FileType fileType)
|
||||
{
|
||||
var createUrl = new UriBuilder(GetServerUrl(false))
|
||||
{
|
||||
Path = "Home/Sample",
|
||||
Query = "fileExt=" + GetInternalExtension(fileType).Trim('.')
|
||||
};
|
||||
return createUrl.ToString();
|
||||
}
|
||||
|
||||
public static string GetDownloadUrl(string fileName)
|
||||
{
|
||||
var downloadUrl = new UriBuilder(GetServerUrl(true))
|
||||
{
|
||||
Path = "/download",
|
||||
Query = "fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
+ "&userAddress=" + HttpUtility.UrlEncode(Host)
|
||||
};
|
||||
return downloadUrl.ToString();
|
||||
}
|
||||
|
||||
// get an editor internal extension
|
||||
public static string GetInternalExtension(FileUtility.FileType fileType)
|
||||
{
|
||||
switch (fileType)
|
||||
{
|
||||
case FileUtility.FileType.Word: // .docx for word file type
|
||||
return ".docx";
|
||||
case FileUtility.FileType.Cell: // .xlsx for cell file type
|
||||
return ".xlsx";
|
||||
case FileUtility.FileType.Slide: // .pptx for slide file type
|
||||
return ".pptx";
|
||||
default:
|
||||
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 = "\\img\\"
|
||||
};
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,267 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using OnlineEditorsExampleNetCore.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Class service api conversion
|
||||
/// </summary>
|
||||
public static class ServiceConverter
|
||||
{
|
||||
// /// <summary>
|
||||
// /// Static constructor
|
||||
// /// </summary>
|
||||
static ServiceConverter()
|
||||
{
|
||||
DocumentConverterUrl = (Startup.AppSettings["files.docservice.url.site"] ?? "") + (Startup.AppSettings["files.docservice.url.converter"] ?? "");
|
||||
|
||||
Int32.TryParse(Startup.AppSettings["files.docservice.timeout"], out ConvertTimeout);
|
||||
ConvertTimeout = ConvertTimeout > 0 ? ConvertTimeout : 120000;
|
||||
}
|
||||
|
||||
#region private fields
|
||||
|
||||
/// <summary>
|
||||
/// Timeout to request conversion
|
||||
/// </summary>
|
||||
private static readonly int ConvertTimeout;
|
||||
|
||||
/// <summary>
|
||||
/// Url to the service of conversion
|
||||
/// </summary>
|
||||
private static readonly string DocumentConverterUrl;
|
||||
|
||||
#endregion
|
||||
|
||||
#region public method
|
||||
|
||||
/// <summary>
|
||||
/// The method is to convert the file to the required format
|
||||
/// </summary>
|
||||
/// <param name="documentUri">Uri for the document to convert</param>
|
||||
/// <param name="fromExtension">Document extension</param>
|
||||
/// <param name="toExtension">Extension to which to convert</param>
|
||||
/// <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 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);
|
||||
/// </example>
|
||||
/// <exception>
|
||||
/// </exception>
|
||||
public static int GetConvertedUri(string documentUri,
|
||||
string fromExtension,
|
||||
string toExtension,
|
||||
string documentRevisionId,
|
||||
bool isAsync,
|
||||
out string convertedDocumentUri,
|
||||
string filePass = null)
|
||||
{
|
||||
convertedDocumentUri = string.Empty;
|
||||
|
||||
// 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;
|
||||
|
||||
// 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 }
|
||||
};
|
||||
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
// 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 = Startup.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : Startup.AppSettings["files.docservice.header"];
|
||||
request.Headers.Add(JWTheader, "Bearer " + payloadToken);
|
||||
|
||||
body.Add("token", bodyToken);
|
||||
}
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(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
|
||||
}
|
||||
|
||||
string dataResponse;
|
||||
using (var response = request.GetResponse())
|
||||
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(); // and read it
|
||||
}
|
||||
}
|
||||
|
||||
return GetResponseUri(dataResponse, out convertedDocumentUri);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Translation key to a supported form.
|
||||
/// </summary>
|
||||
/// <param name="expectedKey">Expected key</param>
|
||||
/// <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)); // the resulting key length is 20 or less
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private method
|
||||
|
||||
/// <summary>
|
||||
/// Processing document received from the editing service
|
||||
/// </summary>
|
||||
/// <param name="jsonDocumentResponse">The resulting json from editing service</param>
|
||||
/// <param name="responseUri">Uri to the converted document</param>
|
||||
/// <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");
|
||||
|
||||
var responseFromService = JsonConvert.DeserializeObject<ResponseFromConvert>(jsonDocumentResponse);
|
||||
if (jsonDocumentResponse == null) throw new WebException("Invalid answer format");
|
||||
|
||||
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 the conversion is completed
|
||||
{
|
||||
responseUri = responseFromService.FileUrl; // get the file url
|
||||
resultPercent = 100;
|
||||
}
|
||||
else // if the conversion isn't completed
|
||||
{
|
||||
resultPercent = responseFromService.Percent; // get the percentage value
|
||||
if (resultPercent >= 100) resultPercent = 99;
|
||||
}
|
||||
|
||||
return resultPercent;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate an error code table
|
||||
/// </summary>
|
||||
/// <param name="errorCode">Error code</param>
|
||||
private static void ProcessResponseError(int errorCode)
|
||||
{
|
||||
var errorMessage = string.Empty;
|
||||
const string errorMessageTemplate = "Error occurred in the ConvertService.ashx: {0}";
|
||||
|
||||
switch (errorCode)
|
||||
{
|
||||
case -8:
|
||||
// public const int c_nErrorFileVKey = -8;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error document VKey");
|
||||
break;
|
||||
case -7:
|
||||
// public const int c_nErrorFileRequest = -7;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error document request");
|
||||
break;
|
||||
case -6:
|
||||
// public const int c_nErrorDatabase = -6;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error database");
|
||||
break;
|
||||
case -5:
|
||||
// public const int c_nErrorUnexpectedGuid = -5;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Incorrect password");
|
||||
break;
|
||||
case -4:
|
||||
// public const int c_nErrorDownloadError = -4;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error download error");
|
||||
break;
|
||||
case -3:
|
||||
// public const int c_nErrorConvertationError = -3;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error convertation error");
|
||||
break;
|
||||
case -2:
|
||||
// public const int c_nErrorConvertationTimeout = -2;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error convertation timeout");
|
||||
break;
|
||||
case -1:
|
||||
// public const int c_nErrorUnknown = -1;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error convertation unknown");
|
||||
break;
|
||||
case 0:
|
||||
// public const int c_nErrorNo = 0;
|
||||
break;
|
||||
default:
|
||||
errorMessage = "ErrorCode = " + errorCode;
|
||||
break;
|
||||
}
|
||||
|
||||
throw new Exception(errorMessage);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
111
web/documentserver-example/csharp-core/Helpers/JwtManager.cs
Normal file
@ -0,0 +1,111 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Helpers
|
||||
{
|
||||
public static class JwtManager
|
||||
{
|
||||
private static readonly string Secret;
|
||||
public static readonly bool Enabled;
|
||||
|
||||
static JwtManager()
|
||||
{
|
||||
Secret = Startup.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)
|
||||
{
|
||||
// define the hashing algorithm and the token type
|
||||
var header = new Dictionary<string, object>
|
||||
{
|
||||
{ "alg", "HS256" },
|
||||
{ "typ", "JWT" }
|
||||
};
|
||||
|
||||
// three parts of token
|
||||
var encHeader = Base64UrlEncode(JsonConvert.SerializeObject(header)); // header
|
||||
var encPayload = Base64UrlEncode(JsonConvert.SerializeObject(payload)); // payload
|
||||
var hashSum = Base64UrlEncode(CalculateHash(encHeader, encPayload)); // signature
|
||||
|
||||
return string.Format("{0}.{1}.{2}", encHeader, encPayload, hashSum);
|
||||
}
|
||||
|
||||
// decode a token into a payload object using a secret key
|
||||
public static string Decode(string token)
|
||||
{
|
||||
if (!Enabled || string.IsNullOrEmpty(token)) return "";
|
||||
|
||||
var split = token.Split('.');
|
||||
if (split.Length != 3) return "";
|
||||
|
||||
var hashSum = Base64UrlEncode(CalculateHash(split[0], split[1])); // get signature
|
||||
if (hashSum != split[2]) return ""; // and check if it is equal to the signature from the token
|
||||
return Base64UrlDecode(split[1]); // decode payload
|
||||
}
|
||||
|
||||
// generate a hash code based on a key using the HMAC method
|
||||
private static byte[] CalculateHash(string encHeader, string encPayload)
|
||||
{
|
||||
using (var hasher = new HMACSHA256(Encoding.UTF8.GetBytes(Secret)))
|
||||
{
|
||||
var bytes = Encoding.UTF8.GetBytes(string.Format("{0}.{1}", encHeader, encPayload));
|
||||
return hasher.ComputeHash(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
// encode a string into the base64 value
|
||||
private static string Base64UrlEncode(string str)
|
||||
{
|
||||
return Base64UrlEncode(Encoding.UTF8.GetBytes(str));
|
||||
}
|
||||
|
||||
// encode bytes into the base64 value
|
||||
private static string Base64UrlEncode(byte[] bytes)
|
||||
{
|
||||
return Convert.ToBase64String(bytes)
|
||||
.TrimEnd('=').Replace('+', '-').Replace('/', '_');
|
||||
}
|
||||
|
||||
// decode a base64 value into the string
|
||||
private static string Base64UrlDecode(string payload)
|
||||
{
|
||||
var b64 = payload.Replace('_', '/').Replace('-', '+');
|
||||
switch (b64.Length % 4)
|
||||
{
|
||||
case 2:
|
||||
b64 += "==";
|
||||
break;
|
||||
case 3:
|
||||
b64 += "=";
|
||||
break;
|
||||
}
|
||||
var bytes = Convert.FromBase64String(b64);
|
||||
return Encoding.UTF8.GetString(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
308
web/documentserver-example/csharp-core/Helpers/TrackManager.cs
Normal file
@ -0,0 +1,308 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.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.Body)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
body = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(body)) context.Response.WriteAsync("{\"error\":1,\"message\":\"Request stream is empty\"}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new Exception(HttpStatusCode.BadRequest.ToString(), e);
|
||||
}
|
||||
|
||||
var fileData = JsonConvert.DeserializeObject<Dictionary<string, object>>(body);
|
||||
|
||||
// check if the document token is enabled
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
string JWTheader = Startup.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : Startup.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.Keys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase)) // if the Authorization header exists
|
||||
{
|
||||
var headerToken = context.Request.Headers[JWTheader].ToString().Substring("Bearer ".Length);
|
||||
token = JwtManager.Decode(headerToken); // decode its part after Authorization prefix
|
||||
}
|
||||
else // otherwise, an error occurs
|
||||
{
|
||||
context.Response.WriteAsync("{\"error\":1,\"message\":\"JWT expected\"}");
|
||||
}
|
||||
|
||||
if (token != null && !token.Equals("")) // invalid signature error
|
||||
{
|
||||
fileData = (Dictionary<string, object>)JsonConvert.DeserializeObject<Dictionary<string, object>>(token);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Response.WriteAsync("{\"error\":1,\"message\":\"JWT validation failed\"}");
|
||||
}
|
||||
}
|
||||
return fileData;
|
||||
}
|
||||
|
||||
// file saving process
|
||||
public static int processSave(Dictionary<string, object> fileData, string fileName, string userAddress)
|
||||
{
|
||||
var downloadUri = (string)fileData["url"];
|
||||
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
|
||||
string downloadExt = Path.GetExtension(downloadUri).ToLower() ?? ""; // 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);
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
DownloadToFile(downloadUri, storagePath); // save file to the storage directory
|
||||
DownloadToFile((string)fileData["changesurl"], 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"))
|
||||
{
|
||||
hist = JsonConvert.SerializeObject(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
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// file force saving process
|
||||
public static int processForceSave(Dictionary<string, object> fileData, string fileName, string userAddress)
|
||||
{
|
||||
var downloadUri = (string)fileData["url"];
|
||||
|
||||
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
|
||||
string downloadExt = Path.GetExtension(downloadUri).ToLower(); // 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;
|
||||
}
|
||||
}
|
||||
|
||||
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 (forcesavePath.Equals("")) // create forcesave path if it doesn't exist
|
||||
{
|
||||
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, true);
|
||||
}
|
||||
}
|
||||
|
||||
DownloadToFile(downloadUri, forcesavePath);
|
||||
|
||||
if (isSubmitForm)
|
||||
{
|
||||
var actions = JsonConvert.DeserializeObject<List<object>>(JsonConvert.SerializeObject(fileData["actions"]));
|
||||
var action = JsonConvert.DeserializeObject<Dictionary<string, object>>(JsonConvert.SerializeObject(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
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// create a command request
|
||||
public static void commandRequest(string method, string key)
|
||||
{
|
||||
string documentCommandUrl = Startup.AppSettings["files.docservice.url.site"] + Startup.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 }
|
||||
};
|
||||
|
||||
// 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 = Startup.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : Startup.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(JsonConvert.SerializeObject(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 responseObj = JsonConvert.DeserializeObject<Dictionary<string, object>>(dataResponse);
|
||||
if (!responseObj["error"].ToString().Equals("0"))
|
||||
{
|
||||
throw new Exception(dataResponse);
|
||||
}
|
||||
}
|
||||
|
||||
// save file information from the url to the file specified
|
||||
public static void DownloadToFile(string url, string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url)) throw new ArgumentException("url"); // url isn't specified
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentException("path"); // file isn't specified
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(url);
|
||||
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");
|
||||
const int bufferSize = 4096;
|
||||
|
||||
using (var fs = File.Open(path, 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
191
web/documentserver-example/csharp-core/Helpers/Users.cs
Normal file
@ -0,0 +1,191 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.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"
|
||||
};
|
||||
|
||||
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"
|
||||
};
|
||||
|
||||
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"
|
||||
};
|
||||
|
||||
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"
|
||||
};
|
||||
|
||||
private static List<User> users = new List<User>() {
|
||||
new User(
|
||||
"uid-1",
|
||||
"John Smith",
|
||||
"smith@mail.ru",
|
||||
null,
|
||||
null,
|
||||
new Dictionary<string, object>(),
|
||||
null,
|
||||
new List<string>(),
|
||||
descr_user_1,
|
||||
true
|
||||
),
|
||||
new User(
|
||||
"uid-2",
|
||||
"Mark Pottato",
|
||||
"pottato@mail.ru",
|
||||
"group-2",
|
||||
new List<string>() { "group-2", "" },
|
||||
new Dictionary<string, object>()
|
||||
{
|
||||
{ "view", "" },
|
||||
{ "edit", new List<string>() { "group-2", "" } },
|
||||
{ "remove", new List<string>() { "group-2" } }
|
||||
},
|
||||
true,
|
||||
new List<string>(),
|
||||
descr_user_2,
|
||||
false
|
||||
),
|
||||
new User(
|
||||
"uid-3",
|
||||
"Hamish Mitchell",
|
||||
"mitchell@mail.ru",
|
||||
"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>() { } }
|
||||
},
|
||||
false,
|
||||
new List<string>() { "copy", "download", "print" },
|
||||
descr_user_3,
|
||||
false
|
||||
),
|
||||
new User(
|
||||
"uid-0",
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
new Dictionary<string,object>(),
|
||||
null,
|
||||
new List<string>(),
|
||||
descr_user_0,
|
||||
false
|
||||
)
|
||||
};
|
||||
|
||||
public static User getUser(string id)
|
||||
{
|
||||
foreach (User user in users)
|
||||
{
|
||||
if (user.id.Equals(id)) return user;
|
||||
}
|
||||
return users[0];
|
||||
}
|
||||
|
||||
public static List<User> getAllUsers()
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
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 User(string id, string name, string email, string group, List<string> reviewGroups, Dictionary<string, object> commentGroups, 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
web/documentserver-example/csharp-core/Helpers/Utils.cs
Normal file
@ -0,0 +1,45 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Helpers
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
// get the request header or return the default one
|
||||
public static string GetOrDefault(this HttpContext context, string header, string def)
|
||||
{
|
||||
var value = context.Request.Headers[header];
|
||||
if (value != String.Empty) return value.ToString();
|
||||
return def;
|
||||
}
|
||||
|
||||
// get a cookie from the cookie collection or return the default one
|
||||
public static string GetOrDefault(this IRequestCookieCollection cookies, string cookie, string def)
|
||||
{
|
||||
var cook = cookies[cookie];
|
||||
if (cook != null && !string.IsNullOrEmpty(cook)) return cook;
|
||||
return def;
|
||||
}
|
||||
}
|
||||
}
|
||||
201
web/documentserver-example/csharp-core/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.
|
||||
380
web/documentserver-example/csharp-core/Models/FileModel.cs
Normal file
@ -0,0 +1,380 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Microsoft.AspNetCore.Http;
|
||||
using OnlineEditorsExampleNetCore.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Web;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Models
|
||||
{
|
||||
// create file model
|
||||
public class FileModel
|
||||
{
|
||||
public string Mode { get; set; } // editor mode
|
||||
public string Type { get; set; } // editor type
|
||||
|
||||
// get file url for Document Server
|
||||
public string FileUri
|
||||
{
|
||||
get { return DocManagerHelper.GetFileUri(FileName, true); }
|
||||
}
|
||||
|
||||
// get file url for user
|
||||
public string FileUriUser
|
||||
{
|
||||
get { return 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 + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(FileName, null)).GetHashCode()); }
|
||||
}
|
||||
|
||||
// get the callback url
|
||||
public string CallbackUrl
|
||||
{
|
||||
get { return DocManagerHelper.GetCallback(FileName); }
|
||||
}
|
||||
|
||||
public string Ext { get; set; }
|
||||
public string DownloadUrl
|
||||
{
|
||||
get { return DocManagerHelper.GetDownloadUrl(FileName); }
|
||||
}
|
||||
|
||||
// get the document config
|
||||
public string GetDocConfig(HttpContext context, IUrlHelper url)
|
||||
{
|
||||
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 mode = canEdit && editorsMode != "view" ? "edit" : "view"; // set the mode parameter: change it to view if the document can't be edited
|
||||
var submitForm = canEdit && (editorsMode.Equals("edit") || editorsMode.Equals("fillForms")); // check if the Submit form button is displayed or not
|
||||
|
||||
var id = context.Request.Cookies["uid"];
|
||||
var user = Users.getUser(id); // get the user
|
||||
|
||||
// favorite icon state
|
||||
bool? favorite = user.favorite;
|
||||
|
||||
var actionLink = context.GetOrDefault("actionLink", null); // get the action link (comment or bookmark) if it exists
|
||||
var actionData = string.IsNullOrEmpty(actionLink) ? null : JsonConvert.SerializeObject(actionLink); // get action data for the action link
|
||||
|
||||
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 },
|
||||
{ "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") },
|
||||
{ "reviewGroups", user.reviewGroups },
|
||||
{ "commentGroups", user.commentGroups }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"editorConfig", new Dictionary<string, object>
|
||||
{
|
||||
{ "actionLink", actionData },
|
||||
{ "mode", mode },
|
||||
{ "lang", context.Request.Cookies.GetOrDefault("ulang", "en") },
|
||||
{ "callbackUrl", CallbackUrl }, // absolute URL to the document storage service
|
||||
{ "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 },
|
||||
{ "name", user.id.Equals("uid-0") ? "" : user.name },
|
||||
{ "group", user.group }
|
||||
}
|
||||
},
|
||||
{
|
||||
// the parameters for the embedded document type
|
||||
"embedded", new Dictionary<string, object>
|
||||
{
|
||||
{ "saveUrl", FileUriUser }, // the absolute URL that will allow the document to be saved onto the user personal computer
|
||||
{ "embedUrl", FileUriUser }, // the absolute URL to the document serving as a source file for the document embedded into the web page
|
||||
{ "shareUrl", FileUriUser }, // 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
|
||||
{ "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", url.Action("Index", "Home") } // 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 JsonConvert.SerializeObject(config);
|
||||
}
|
||||
|
||||
// get the document history
|
||||
public void GetHistory(out string history, out string historyData)
|
||||
{
|
||||
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 = JsonConvert.DeserializeObject<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"] },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
dataObj.Add("key", key);
|
||||
// write file url to the data object
|
||||
dataObj.Add("url", i == currentVersion ? FileUri : DocManagerHelper.GetPathUri(Directory.GetFiles(verDir, "prev.*")[0].Substring(DocManagerHelper.ContentPath.Length)));
|
||||
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 = JsonConvert.DeserializeObject<Dictionary<string, object>>(File.ReadAllText(Path.Combine(DocManagerHelper.VersionDir(histDir, i - 1), "changes.json")));
|
||||
var changesArray = (JArray)changes["changes"];
|
||||
var change = changesArray.Count > 0
|
||||
? changesArray[0].ToObject<Dictionary<string, object>>()
|
||||
: 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", new Dictionary<string, object>() { // write information about previous file version to the data object
|
||||
{ "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
|
||||
dataObj.Add("changesUrl", DocManagerHelper.GetPathUri(Path.Combine(DocManagerHelper.VersionDir(histDir, i - 1), "diff.zip").Substring(DocManagerHelper.ContentPath.Length)));
|
||||
}
|
||||
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 = JsonConvert.SerializeObject(new Dictionary<string, object>()
|
||||
{
|
||||
{ "currentVersion", currentVersion },
|
||||
{ "history", hist }
|
||||
});
|
||||
historyData = JsonConvert.SerializeObject(histData);
|
||||
}
|
||||
}
|
||||
|
||||
// get a document which will be compared with the current document
|
||||
public void GetCompareFileData(out string compareConfig)
|
||||
{
|
||||
// get the path to the compared file
|
||||
var compareFileUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = "/assets",
|
||||
Query = "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 (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 = JsonConvert.SerializeObject(dataCompareFile);
|
||||
}
|
||||
|
||||
// get a logo config
|
||||
public void GetLogoConfig(out string logoUrl)
|
||||
{
|
||||
// get the path to the logo image
|
||||
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = "\\img\\logo.png"
|
||||
};
|
||||
|
||||
// create a logo config
|
||||
var logoConfig = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "png"},
|
||||
{ "url", mailMergeUrl.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 = JsonConvert.SerializeObject(logoConfig).Replace("{", "").Replace("}", "");
|
||||
}
|
||||
|
||||
// get a mail merge config
|
||||
public void GetMailMergeConfig(out string dataMailMergeRecipients)
|
||||
{
|
||||
// get the path to the recipients data for mail merging
|
||||
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = "/csv"
|
||||
};
|
||||
|
||||
// create a mail merge config
|
||||
var mailMergeConfig = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "csv" },
|
||||
{ "url", mailMergeUrl.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 = JsonConvert.SerializeObject(mailMergeConfig);
|
||||
}
|
||||
|
||||
//get a users for mentions
|
||||
public void GetUsersMentions(HttpRequest request, out string usersForMentions)
|
||||
{
|
||||
var id = request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
usersForMentions = !user.id.Equals("uid-0") ? JsonConvert.SerializeObject(Users.getUsersForMentions(user.id)) : JsonConvert.SerializeObject(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
72
web/documentserver-example/csharp-core/Models/FileUtility.cs
Normal file
@ -0,0 +1,72 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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.IO;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Models
|
||||
{
|
||||
public static class FileUtility
|
||||
{
|
||||
public enum FileType
|
||||
{
|
||||
Word,
|
||||
Cell,
|
||||
Slide
|
||||
}
|
||||
|
||||
// get file type
|
||||
public static FileType GetFileType(string fileName)
|
||||
{
|
||||
var ext = Path.GetExtension(fileName).ToLower();
|
||||
|
||||
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.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", ".xml",
|
||||
".pdf", ".djvu", ".fb2", ".epub", ".xps"
|
||||
};
|
||||
|
||||
// spreadsheet extensions
|
||||
public static readonly List<string> ExtsSpreadsheet = new List<string>
|
||||
{
|
||||
".xls", ".xlsx", ".xlsm",
|
||||
".xlt", ".xltx", ".xltm",
|
||||
".ods", ".fods", ".ots", ".csv"
|
||||
};
|
||||
|
||||
// presentation extensions
|
||||
public static readonly List<string> ExtsPresentation = new List<string>
|
||||
{
|
||||
".pps", ".ppsx", ".ppsm",
|
||||
".ppt", ".pptx", ".pptm",
|
||||
".pot", ".potx", ".potm",
|
||||
".odp", ".fodp", ".otp"
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="192.168.1.2\new.docx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="wwwroot\assets\AUTHORS.md" />
|
||||
<None Include="wwwroot\assets\LICENSE" />
|
||||
<None Include="wwwroot\assets\new\new.docx" />
|
||||
<None Include="wwwroot\assets\new\new.pptx" />
|
||||
<None Include="wwwroot\assets\new\new.xlsx" />
|
||||
<None Include="wwwroot\assets\sample\csv.csv" />
|
||||
<None Include="wwwroot\assets\sample\sample.docx" />
|
||||
<None Include="wwwroot\assets\sample\sample.pptx" />
|
||||
<None Include="wwwroot\assets\sample\sample.xlsx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
|
||||
|
||||
</Project>
|
||||
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31205.134
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlineEditorsExampleNetCore", "OnlineEditorsExampleNetCore.csproj", "{99F3DBD2-90F0-4F99-A450-A9D8E21C6132}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{99F3DBD2-90F0-4F99-A450-A9D8E21C6132}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{99F3DBD2-90F0-4F99-A450-A9D8E21C6132}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{99F3DBD2-90F0-4F99-A450-A9D8E21C6132}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{99F3DBD2-90F0-4F99-A450-A9D8E21C6132}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C16F5484-E16F-462F-9481-64F2A61E0A91}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
38
web/documentserver-example/csharp-core/Program.cs
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
{
|
||||
"profiles": {
|
||||
"OnlineEditorsExampleNetCore": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:8000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
62
web/documentserver-example/csharp-core/README.md
Normal file
@ -0,0 +1,62 @@
|
||||
## Overview
|
||||
|
||||
This example will help you integrate ONLYOFFICE Docs into your web application written in .Net Core.
|
||||
|
||||
It is aimed at testing the editors. Please, do not use it for production without proper modifications.
|
||||
|
||||
## 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 Core code for the editors integration and change base configuration
|
||||
|
||||
Download the [.Net Core example](https://api.onlyoffice.com/editors/demopreview) from our site. Or you can clone git repository using **git** command:
|
||||
```
|
||||
git clone https://github.com/ONLYOFFICE/document-server-integration.git
|
||||
```
|
||||
You need to connect the editors to your web site. Go to the project directory and specify path to the editors installation in the *appsettings.json* file:
|
||||
```
|
||||
"files.docservice.url.site": "https://documentserver/"
|
||||
```
|
||||
where the **documentserver** is the address of the server with the ONLYOFFICE Document Server installed.
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) it the *FileModel.cs* file.
|
||||
|
||||
## Step 3. Install the prerequisites
|
||||
Сheck if your system meets the system requirements:
|
||||
* Microsoft .NET Core: version 3.1 (download it from the [official Microsoft website](https://dotnet.microsoft.com/download/dotnet/3.1));
|
||||
|
||||
You can install the prerequisites using scripts:
|
||||
### For Windows
|
||||
(https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net50#install-with-powershell-automation)
|
||||
|
||||
### For Linux
|
||||
(https://docs.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install)
|
||||
|
||||
Or you can install .NET Core for your OS following this instruction:
|
||||
([instruction](https://docs.microsoft.com/en-us/dotnet/core/install/linux))
|
||||
|
||||
|
||||
## Step 4. Run your website with the editors
|
||||
1. The example listening on http://localhost:8000, but if you want change this value, you need go to folder **Properties** and edit path in the *launchSettings.json* file:
|
||||
```
|
||||
"applicationUrl": "http://localhost:8000",
|
||||
```
|
||||
where the **http://localhost:8000** is the name of you listening address and you can change 8000 port to any available port.
|
||||
|
||||
2. From the current folder where the example is located in your command prompt, run the following command:
|
||||
```
|
||||
dotnet run
|
||||
```
|
||||
The **dotnet run** command will build and start the app. You can stop the app at any time by selecting **Ctrl+C**.
|
||||
If you rebuild and restart the app whenever you make code changes, run the following command:
|
||||
```
|
||||
dotnet watch run
|
||||
```
|
||||
You can stop the app at any time by selecting **Ctrl+C**.
|
||||
|
||||
## 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.
|
||||
@ -0,0 +1,41 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore.Services
|
||||
{
|
||||
public class ResponseFromConvert
|
||||
{
|
||||
[JsonPropertyName("error")]
|
||||
public string Error { get; set; }
|
||||
|
||||
[JsonPropertyName("endConvert")]
|
||||
public bool EndConvert { get; set; }
|
||||
|
||||
[JsonPropertyName("fileUrl")]
|
||||
public string FileUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("percent")]
|
||||
public int Percent { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using OnlineEditorsExampleNetCore.Helpers;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore
|
||||
{
|
||||
public class WebEditorExtenstions
|
||||
{
|
||||
// define tracker status
|
||||
public enum TrackerStatus
|
||||
{
|
||||
NotFound = 0,
|
||||
Editing = 1,
|
||||
MustSave = 2,
|
||||
Corrupted = 3,
|
||||
Closed = 4,
|
||||
MustForceSave = 6,
|
||||
CorruptedForceSave = 7
|
||||
}
|
||||
|
||||
public static void Remove(string fileName)
|
||||
{
|
||||
var path = DocManagerHelper.StoragePath(fileName, null);
|
||||
var histDir = DocManagerHelper.HistoryDir(path);
|
||||
|
||||
if (File.Exists(path)) File.Delete(path);
|
||||
if (Directory.Exists(histDir)) Directory.Delete(histDir, true);
|
||||
}
|
||||
|
||||
public static void DownloadToFile(string url, string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url)) throw new ArgumentException("url");
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentException("path");
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(url);
|
||||
using (var stream = req.GetResponse().GetResponseStream())
|
||||
{
|
||||
if (stream == null) throw new Exception("stream is null");
|
||||
const int bufferSize = 4096;
|
||||
|
||||
using (var fs = File.Open(path, FileMode.Create))
|
||||
{
|
||||
var buffer = new byte[bufferSize];
|
||||
int readed;
|
||||
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
|
||||
{
|
||||
fs.Write(buffer, 0, readed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// download data from the url to the file
|
||||
public static async Task DownloadAsync(string filePath, HttpContext context)
|
||||
{
|
||||
var fileinf = new FileInfo(filePath);
|
||||
context.Response.Headers.Add("Content-Length", fileinf.Length.ToString()); // set headers to the response
|
||||
new FileExtensionContentTypeProvider().TryGetContentType(filePath, out string contentType);
|
||||
context.Response.Headers.Add("Content-Type", contentType);
|
||||
var tmp = HttpUtility.UrlEncode(Path.GetFileName(filePath));
|
||||
tmp = tmp.Replace("+", "%20");
|
||||
context.Response.Headers.Add("Content-Disposition", "attachment; filename*=UTF-8\'\'" + tmp);
|
||||
await context.Response.SendFileAsync(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
114
web/documentserver-example/csharp-core/Startup.cs
Normal file
@ -0,0 +1,114 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace OnlineEditorsExampleNetCore
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public IConfiguration Configuration { get; set; }
|
||||
public IWebHostEnvironment HostEnvironment { get; set; }
|
||||
public static Dictionary<string, string> AppSettings { get; set; }
|
||||
public Startup(IConfiguration configuration, IWebHostEnvironment env)
|
||||
{
|
||||
Configuration = configuration;
|
||||
HostEnvironment = env;
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
AppSettings = Configuration.GetSection("AppSettings").GetChildren()
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
services.AddSingleton(HostEnvironment);
|
||||
|
||||
services.AddHttpContextAccessor();
|
||||
|
||||
services.AddDistributedMemoryCache();
|
||||
|
||||
services.AddSession();
|
||||
|
||||
services.AddCors();
|
||||
|
||||
services.AddSingleton<IFileProvider>(
|
||||
new PhysicalFileProvider(
|
||||
Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")));
|
||||
|
||||
services.AddControllersWithViews();
|
||||
|
||||
// If using Kestrel:
|
||||
services.Configure<KestrelServerOptions>(options =>
|
||||
{
|
||||
options.AllowSynchronousIO = true;
|
||||
});
|
||||
|
||||
// If using IIS:
|
||||
services.Configure<IISServerOptions>(options =>
|
||||
{
|
||||
options.AllowSynchronousIO = true;
|
||||
});
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
}
|
||||
|
||||
app.UseCors(builder =>
|
||||
{
|
||||
builder
|
||||
.AllowAnyOrigin()
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader();
|
||||
});
|
||||
|
||||
app.UseSession();
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
201
web/documentserver-example/csharp-core/Views/Home/Editor.cshtml
Normal file
@ -0,0 +1,201 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
@model FileModel
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head runat="server">
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2020
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
-->
|
||||
|
||||
@await Html.PartialAsync("EditorMetatagsPartial")
|
||||
<link rel="icon" href="@Url.Content("~/img/" + @Model.DocumentType + ".ico")" type="image/x-icon" />
|
||||
<title>@Model.FileName - ONLYOFFICE</title>
|
||||
@await Html.PartialAsync("EditorCssPartial")
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="form">
|
||||
<div id="iframeEditor">
|
||||
</div>
|
||||
</div>
|
||||
<script src="@Startup.AppSettings["files.docservice.url.site"]@Startup.AppSettings["files.docservice.url.api"]"></script>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
var docEditor;
|
||||
|
||||
var innerAlert = function (message) {
|
||||
if (console && console.log)
|
||||
console.log(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("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) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
document.title = (favorite ? "☆" : "") + title;
|
||||
docEditor.setFavorite(favorite); // change the Favorite icon state
|
||||
};
|
||||
|
||||
// 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,
|
||||
@Html.Raw(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(@Html.Raw(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(@Html.Raw(dataMailMergeRecipients)); // insert recipient data for mail merge into the file
|
||||
};
|
||||
|
||||
var config = @Html.Raw(Model.GetDocConfig(Context, 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); }
|
||||
@{ if (!string.IsNullOrEmpty(hist) && !string.IsNullOrEmpty(histData)) }
|
||||
{
|
||||
// the user is trying to show the document version history
|
||||
config.events['onRequestHistory'] = function () {
|
||||
docEditor.refreshHistory(@Html.Raw(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 = @Html.Raw(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();
|
||||
};
|
||||
}
|
||||
|
||||
@{ string usersForMentions; }
|
||||
@{ Model.GetUsersMentions(Context.Request, out usersForMentions); }
|
||||
@{ if (!string.IsNullOrEmpty(usersForMentions)) }
|
||||
{
|
||||
// add mentions for not anonymous users
|
||||
config.events['onRequestUsers'] = function () {
|
||||
docEditor.setUsers({
|
||||
"users": @Html.Raw(usersForMentions)
|
||||
});
|
||||
};
|
||||
config.events['onRequestSendNotify'] = function (event) {
|
||||
var actionLink = JSON.stringify(event.data.actionLink);
|
||||
console.log("onRequestSendNotify:");
|
||||
console.log(event.data);
|
||||
console.log("Link to comment: " + replaceActionLink(location.href, actionLink));
|
||||
};
|
||||
}
|
||||
|
||||
var сonnectEditor = function () {
|
||||
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
|
||||
};
|
||||
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener("load", сonnectEditor);
|
||||
} else if (window.attachEvent) {
|
||||
window.attachEvent("load", сonnectEditor);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,34 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2020
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
-->
|
||||
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Error</title>
|
||||
</head>
|
||||
<body>
|
||||
<hgroup>
|
||||
<h1>Error.</h1>
|
||||
<h2>An error occurred while processing your request.</h2>
|
||||
</hgroup>
|
||||
</body>
|
||||
</html>
|
||||
384
web/documentserver-example/csharp-core/Views/Home/Index.cshtml
Normal file
@ -0,0 +1,384 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
@model FileModel
|
||||
|
||||
<!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">
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2020
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
-->
|
||||
|
||||
@await Html.PartialAsync("IndexMetatagsPartial")
|
||||
<title>ONLYOFFICE</title>
|
||||
<link href="@Url.Content("~/favicon.ico")" rel="shortcut icon" type="image/x-icon" />
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />
|
||||
@await Html.PartialAsync("IndexCssPartial")
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="center">
|
||||
<div class="menu">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
<a href="">
|
||||
<img src="~/img/logo.svg" alt="ONLYOFFICE" />
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<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>
|
||||
</ul>
|
||||
<label class="create-sample">
|
||||
<input id="createSample" class="checkbox" type="checkbox" />With sample content
|
||||
</label>
|
||||
</div>
|
||||
<div class="upload-panel clearFix">
|
||||
<a class="file-upload">
|
||||
Upload file
|
||||
<input type="file" id="fileupload" name="files[]" data-url="@Url.Content("~/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 class="info" data-id="user" data-tooltip="You can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.
|
||||
</br>
|
||||
@foreach (User user in Users.getAllUsers())
|
||||
{
|
||||
<b>
|
||||
@if (@user.name == null)
|
||||
{
|
||||
user.name = "Anonymous";
|
||||
}
|
||||
else @user.name
|
||||
</b>
|
||||
<ul>
|
||||
@foreach (string description in user.descriptions)
|
||||
{
|
||||
<li>@description</li>
|
||||
}
|
||||
</ul>
|
||||
}"
|
||||
src="~/img/info.svg" />
|
||||
<select class="select-user" id="user">
|
||||
@foreach (User user in Users.getAllUsers())
|
||||
{
|
||||
<option value="@user.id">
|
||||
@if (@user.name == null)
|
||||
{
|
||||
user.name = "Anonymous";
|
||||
}
|
||||
else @user.name
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<span class="select-user">Language</span>
|
||||
<img class="info" data-id="language" data-tooltip="Choose the language for ONLYOFFICE editors interface" src="~/img/info.svg" />
|
||||
<select class="select-user" id="language">
|
||||
<option value="en">English</option>
|
||||
<option value="be">Belarusian</option>
|
||||
<option value="bg">Bulgarian</option>
|
||||
<option value="ca">Catalan</option>
|
||||
<option value="zh">Chinese</option>
|
||||
<option value="cs">Czech</option>
|
||||
<option value="da">Danish</option>
|
||||
<option value="nl">Dutch</option>
|
||||
<option value="fi">Finnish</option>
|
||||
<option value="fr">French</option>
|
||||
<option value="de">German</option>
|
||||
<option value="el">Greek</option>
|
||||
<option value="hu">Hungarian</option>
|
||||
<option value="id">Indonesian</option>
|
||||
<option value="it">Italian</option>
|
||||
<option value="ja">Japanese</option>
|
||||
<option value="ko">Korean</option>
|
||||
<option value="lv">Latvian</option>
|
||||
<option value="lo">Lao</option>
|
||||
<option value="nb">Norwegian</option>
|
||||
<option value="pl">Polish</option>
|
||||
<option value="pt">Portuguese</option>
|
||||
<option value="ro">Romanian</option>
|
||||
<option value="ru">Russian</option>
|
||||
<option value="sk">Slovak</option>
|
||||
<option value="sl">Slovenian</option>
|
||||
<option value="sv">Swedish</option>
|
||||
<option value="es">Spanish</option>
|
||||
<option value="tr">Turkish</option>
|
||||
<option value="uk">Ukrainian</option>
|
||||
<option value="vi">Vietnamese</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td class="section">
|
||||
<div class="main-panel">
|
||||
@{ var storedFiles = DocManagerHelper.GetStoredFiles(); }
|
||||
@if (!storedFiles.Any())
|
||||
{
|
||||
<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>
|
||||
}
|
||||
else
|
||||
{
|
||||
<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 editUrl = "Editor?fileID=" + HttpUtility.UrlEncode(storedFile.Name);
|
||||
var docType = FileUtility.GetFileType(storedFile.Name).ToString().ToLower();
|
||||
var canEdir = DocManagerHelper.EditedExts.Contains(System.IO.Path.GetExtension(storedFile.Name).ToLower());
|
||||
var version = DocManagerHelper.GetFileVersion(storedFile.Name, DocManagerHelper.CurUserHostAddress(null));
|
||||
<tr class="tableRow" title="@storedFile.Name [@version]">
|
||||
<td class="contentCells">
|
||||
<a class="stored-edit @docType" href="@Url.Action("Editor", "Home", new { fileName = storedFile.Name })" target="_blank">
|
||||
<span>@storedFile.Name</span>
|
||||
</a>
|
||||
</td>
|
||||
@if (canEdir)
|
||||
{
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="@Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "edit" })" target="_blank">
|
||||
<img src="~/img/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" })" target="_blank">
|
||||
<img src="~/img/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" })" target="_blank">
|
||||
<img src="~/img/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" })" target="_blank">
|
||||
<img src="~/img/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" })" target="_blank">
|
||||
<img src="~/img/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 == "slide")
|
||||
{
|
||||
<td class="contentCells contentCells-icon contentCellsEmpty"></td>
|
||||
}
|
||||
@if (docType == "word")
|
||||
{
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="@Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms" })" target="_blank">
|
||||
<img src="~/img/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-icon "></td>
|
||||
}
|
||||
@if (docType == "word")
|
||||
{
|
||||
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
|
||||
<a href="@Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "blockcontent" })" target="_blank">
|
||||
<img src="~/img/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-shift contentCells-icon firstContentCellShift "></td>
|
||||
}
|
||||
@if (docType == "slide")
|
||||
{
|
||||
<td class="contentCells contentCells-icon "></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" })" target="_blank">
|
||||
<img src="~/img/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" })" target="_blank">
|
||||
<img src="~/img/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" })" target="_blank">
|
||||
<img src="~/img/embeded.svg" alt="Open in embedded mode" title="Open in embedded mode" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift downloadContentCellShift">
|
||||
<a href="@DocManagerHelper.GetDownloadUrl(storedFile.Name)">
|
||||
<img class="icon-download" src="~/img/download.svg" alt="Download" title="Download" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift">
|
||||
<a href="@Url.Action("Remove", "Home", new { fileName = storedFile.Name })">
|
||||
<img class="icon-delete" src="~/img/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="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. Conversion.</span>
|
||||
<span class="step-descr">The file is converted to OOXML so that you can edit it.</span>
|
||||
<br />
|
||||
<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">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<br />
|
||||
<div class="error-message">
|
||||
<b>Upload error: </b><span></span>
|
||||
<br />
|
||||
Please select another file and try again.
|
||||
</div>
|
||||
</div>
|
||||
<iframe id="embeddedView" src="" height="345px" width="432px" frameborder="0" scrolling="no" allowtransparency=allowtransparency></iframe>
|
||||
<br />
|
||||
<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>
|
||||
|
||||
<span id="loadScripts" data-docs="@Startup.AppSettings["files.docservice.url.site"]@Startup.AppSettings["files.docservice.url.preloader"]"></span>
|
||||
|
||||
<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>
|
||||
@ViewBag.NewFileUrl
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</footer>
|
||||
@await Html.PartialAsync("IndexScriptsPartial")
|
||||
<script language="javascript" type="text/javascript">
|
||||
var ConverExtList = '@string.Join(",", DocManagerHelper.ConvertExts.ToArray())';
|
||||
var EditedExtList = '@string.Join(",", DocManagerHelper.EditedExts.ToArray())';
|
||||
var UrlConverter = '@Url.Content("~/convert")';
|
||||
var UrlEditor = '@Url.Action("editor", "Home")';
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1 @@
|
||||
<link href="~/css/editor.css" type="text/css" rel="stylesheet" />
|
||||
@ -0,0 +1,5 @@
|
||||
<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, 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" />
|
||||
@ -0,0 +1,3 @@
|
||||
<link href="~/css/jquery-ui.css" type="text/css" rel="stylesheet" />
|
||||
<link href="~/css/stylesheet.css" type="text/css" rel="stylesheet" />
|
||||
<link href="~/css/media.css" type="text/css" rel="stylesheet" />
|
||||
@ -0,0 +1,3 @@
|
||||
<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" />
|
||||
@ -0,0 +1 @@
|
||||
<script asp-src-include="~/js/*.js"></script>
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2020
|
||||
*
|
||||
* 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 OnlineEditorsExampleNetCore
|
||||
@using OnlineEditorsExampleNetCore.Models
|
||||
@using OnlineEditorsExampleNetCore.Helpers
|
||||
@using System.IO
|
||||
@using Microsoft.AspNetCore.Http
|
||||
@using System.Web
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@ -0,0 +1,21 @@
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2020
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
-->
|
||||
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
27
web/documentserver-example/csharp-core/appsettings.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"AppSettings": {
|
||||
"webpages:Version": "2.0.0.0",
|
||||
"webpages:Enabled": "false",
|
||||
"PreserveLoginUrl": "true",
|
||||
"ClientValidationEnabled": "true",
|
||||
"UnobtrusiveJavaScriptEnabled": "true",
|
||||
|
||||
"filesize-max": "5242880",
|
||||
|
||||
"files.docservice.viewed-docs": ".pdf|.djvu|.xps|.oxps",
|
||||
"files.docservice.edited-docs": ".docx|.xlsx|.csv|.pptx|.txt",
|
||||
"files.docservice.convert-docs": ".docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xltx|.xltm|.xlt|.xls|.ods|.fods|.ots|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.rtf|.mht|.html|.htm|.xml|.epub|.fb2",
|
||||
"files.docservice.timeout": "120000",
|
||||
"files.docservice.secret": "",
|
||||
"files.docservice.header": "Authorization",
|
||||
|
||||
"files.docservice.url.site": "https://documentserver/",
|
||||
|
||||
"files.docservice.url.converter": "ConvertService.ashx",
|
||||
"files.docservice.url.api": "web-apps/apps/api/documents/api.js",
|
||||
"files.docservice.url.preloader": "web-apps/apps/api/documents/cache-scripts.html",
|
||||
"files.docservice.url.command": "coauthoring/CommandService.ashx",
|
||||
|
||||
"files.docservice.url.example": ""
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
ONLYOFFICE Applications example uses code from the following 3rd party projects:
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Microsoft.AspNetCore.Cors - CORS middleware and policy for ASP.NET Core to enable cross-origin resource sharing (https://raw.githubusercontent.com/aspnet/AspNetCore/2.0.0/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: Microsoft.AspNetCore.Cors.license
|
||||
@ -0,0 +1,14 @@
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
All rights reserved.
|
||||
|
||||
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.
|
||||
@ -0,0 +1,14 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2007 James Newton-King
|
||||
|
||||
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.
|
||||
@ -0,0 +1,9 @@
|
||||
Copyright <20> 2007-2013 M. Alsup.
|
||||
|
||||
The BlockUI plugin is dual licensed under the MIT and GPL licenses.
|
||||
|
||||
You may use either license. The MIT license is recommended for most projects because it is simple and easy to understand and it places almost no restrictions on what you can do with the plugin.
|
||||
|
||||
If the GPL suits your project better you are also free to use the plugin under that license.
|
||||
|
||||
You do not have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the BlockUI plugin in commercial projects as long as the copyright header is left intact.
|
||||
@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright <20> 2010 Sebastian Tschan, https://blueimp.net
|
||||
|
||||
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.
|
||||
@ -0,0 +1,43 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/jquery-ui
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
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.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code contained within the demos directory.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules and external directories are
|
||||
externally maintained libraries used by this software which have their
|
||||
own licenses; we recommend you read them, as their terms may differ from
|
||||
the terms above.
|
||||
@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright <20> 2010 Sebastian Tschan, https://blueimp.net
|
||||
|
||||
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.
|
||||
@ -0,0 +1,44 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-family: Arial, Tahoma,sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
464
web/documentserver-example/csharp-core/wwwroot/css/jquery-ui.css
vendored
Normal file
@ -0,0 +1,464 @@
|
||||
/*! jQuery UI - v1.9.2 - 2012-11-23
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
|
||||
* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
||||
.ui-helper-clearfix:after { clear: both; }
|
||||
.ui-helper-clearfix { zoom: 1; }
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-noicons { padding-left: .7em; }
|
||||
.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; }
|
||||
|
||||
.ui-autocomplete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
||||
.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 650px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
|
||||
.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
|
||||
.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
|
||||
.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
|
||||
.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
|
||||
.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
|
||||
.ui-menu .ui-menu-item a.ui-state-focus,
|
||||
.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
|
||||
|
||||
.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
|
||||
.ui-menu .ui-state-disabled a { cursor: default; }
|
||||
|
||||
/* icon support */
|
||||
.ui-menu-icons { position: relative; }
|
||||
.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
|
||||
|
||||
/* left-aligned */
|
||||
.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
|
||||
|
||||
/* right-aligned */
|
||||
.ui-menu .ui-menu-icon { position: static; float: right; }
|
||||
|
||||
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
||||
.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
|
||||
.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
|
||||
.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
|
||||
.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
|
||||
.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
|
||||
.ui-spinner-up { top: 0; }
|
||||
.ui-spinner-down { bottom: 0; }
|
||||
|
||||
/* TR overrides */
|
||||
.ui-spinner .ui-icon-triangle-1-s {
|
||||
/* need to fix icons sprite */
|
||||
background-position:-65px -16px;
|
||||
}
|
||||
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
|
||||
.ui-tooltip {
|
||||
padding: 8px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
max-width: 300px;
|
||||
-webkit-box-shadow: 0 0 5px #aaa;
|
||||
box-shadow: 0 0 5px #aaa;
|
||||
}
|
||||
/* Fades and background-images don't work well together in IE6, drop the image */
|
||||
* html .ui-tooltip {
|
||||
background-image: none;
|
||||
}
|
||||
body .ui-tooltip { border-width: 2px; }
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: 'Open Sans',sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: 'Open Sans',sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff 50% 50% repeat-x; color: #222222; }
|
||||
.ui-widget-content a { color: #222222; }
|
||||
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
||||
.ui-widget-header a { color: #222222; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee 50% 50% repeat-x; color: #363636; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec 50% 50% repeat-x; color: #cd0a0a; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-on { background-position: -96px -144px; }
|
||||
.ui-icon-radio-off { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
||||
596
web/documentserver-example/csharp-core/wwwroot/css/media.css
Normal file
@ -0,0 +1,596 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
@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;
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.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: 69%;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: -6%;
|
||||
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 {
|
||||
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: 100%;
|
||||
}
|
||||
.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%;
|
||||
}
|
||||
}
|
||||
|
||||
.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 ) {
|
||||
.file-upload{
|
||||
width: 100%;
|
||||
}
|
||||
#fileupload{
|
||||
width: 100%;
|
||||
}
|
||||
.tableHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
header .center > a {
|
||||
position: absolute;
|
||||
left: 30px;
|
||||
}
|
||||
|
||||
footer table tr {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
footer table td {
|
||||
padding-top: 16px;
|
||||
padding-right: 32px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.copy {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 61%;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin: 16px 10px 6px;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: -8%;
|
||||
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%;
|
||||
}
|
||||
}
|
||||
|
||||
@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: 1080px) and (min-width: 986px){
|
||||
.tableHeaderCellRemove{
|
||||
padding-left: 6px;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,778 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
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: #333333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
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 {
|
||||
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 {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
height: 100%;
|
||||
list-style: none;
|
||||
padding: 48px 32px 24px;
|
||||
position: relative;
|
||||
width: 896px;
|
||||
}
|
||||
|
||||
.portal-name {
|
||||
color: #FF6F3D;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.portal-descr {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
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 {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.try-editor-list li {
|
||||
margin-bottom: 12px
|
||||
}
|
||||
|
||||
.try-editor {
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
padding-left: 42px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.try-editor.word {
|
||||
background-image: url("/img/file_docx.svg");
|
||||
}
|
||||
|
||||
.try-editor.cell {
|
||||
background-image: url("/img/file_xlsx.svg");
|
||||
}
|
||||
|
||||
.try-editor.slide {
|
||||
background-image: url("/img/file_pptx.svg");
|
||||
}
|
||||
|
||||
.create-sample {
|
||||
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: 600;
|
||||
letter-spacing: 0.08em;
|
||||
line-height: 133%;
|
||||
padding: 8px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
-o-touch-callout: none;
|
||||
-moz-touch-callout: none;
|
||||
-webkit-touch-callout: none;
|
||||
-o-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.button.orange {
|
||||
background: #FF6F3D;
|
||||
border: 1px solid #FF6F3D;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.button.orange.disable {
|
||||
background: #EDC2B3;
|
||||
border: 1px solid #EDC2B3;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.button.orange:not(.disable):hover {
|
||||
background: #ff7a4b;
|
||||
}
|
||||
|
||||
.button.gray {
|
||||
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("/img/file_upload.svg") no-repeat 0 transparent;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
overflow: hidden;
|
||||
padding-left: 42px;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.file-upload input {
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
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: #333333;
|
||||
display: none;
|
||||
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("../img/error.svg") no-repeat scroll 4px 10px;
|
||||
color: #CB0000;
|
||||
display: none;
|
||||
line-height: 160%;
|
||||
letter-spacing: -0.02em;
|
||||
margin: 5px 0;
|
||||
padding: 10px 10px 10px 30px;
|
||||
vertical-align: middle;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.step {
|
||||
background-repeat: no-repeat;
|
||||
background-position: left center;
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
line-height: 167%;
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
.current {
|
||||
background-image: url("../img/loader16.gif");
|
||||
}
|
||||
|
||||
.done {
|
||||
background-image: url("../img/done.svg");
|
||||
}
|
||||
|
||||
.error {
|
||||
background-image: url("../img/notdone.svg");
|
||||
}
|
||||
|
||||
.step-descr {
|
||||
display: block;
|
||||
margin-left: 35px;
|
||||
font-size: 11px;
|
||||
line-height: 188%;
|
||||
}
|
||||
|
||||
.progress-descr {
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
footer {
|
||||
background: #333333;
|
||||
color: #AAAAAA;
|
||||
height: 64px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
footer > .center{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
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 {
|
||||
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("../img/icon_docx.svg");
|
||||
}
|
||||
|
||||
.stored-edit.cell,
|
||||
.uploadFileName.cell {
|
||||
background-image: url("../img/icon_xlsx.svg");
|
||||
}
|
||||
|
||||
.stored-edit.slide,
|
||||
.uploadFileName.slide {
|
||||
background-image: url("../img/icon_pptx.svg");
|
||||
}
|
||||
|
||||
.stored-edit span {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.stored-edit:hover span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.blockTitle {
|
||||
background-color: #333333 !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
-moz-border-radius: 0 !important;
|
||||
-webkit-border-radius: 0 !important;
|
||||
color: #F5F5F5 !important;
|
||||
font-size: 16px !important;
|
||||
font-weight: 600 !important;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
padding: 14px 16px 14px 46px !important;
|
||||
}
|
||||
|
||||
.dialog-close {
|
||||
background: url("../img/close.svg") no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-size: 1px;
|
||||
height: 14px;
|
||||
line-height: 1px;
|
||||
margin-top: 4px;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.blockPage {
|
||||
border: none !important;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
-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;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
background: #FFFFFF;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 7px 25px rgba(85, 85, 85, 0.15);
|
||||
color: #666666;
|
||||
line-height: 160%;
|
||||
max-width: 60vw;
|
||||
padding: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#user-tooltip {
|
||||
overflow-y: overlay;
|
||||
height: 86vh;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.tooltip ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
border-top: 8px solid transparent;
|
||||
border-bottom: 8px solid transparent;
|
||||
border-right: 8px solid #FFFFFF;
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.user-block-table {
|
||||
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 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
max-width: 256px;
|
||||
width: 100%;
|
||||
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;
|
||||
}
|
||||
.menu {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
top: 10px;
|
||||
left: 12px;
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.menu span {
|
||||
content: "";
|
||||
width: 26px;
|
||||
height: 3px;
|
||||
background: rgb(194, 194, 194);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
.tableHeaderCellDownload{
|
||||
width: 12%;
|
||||
}
|
||||
.tableHeaderCellRemove{
|
||||
padding-left: 10px;
|
||||
}
|
||||
BIN
web/documentserver-example/csharp-core/wwwroot/favicon.ico
Normal file
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 452 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="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 |
BIN
web/documentserver-example/csharp-core/wwwroot/img/cell.ico
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
@ -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 |
|
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 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: 1.1 KiB After Width: | Height: | Size: 1.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="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 |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 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="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 |
@ -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 |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -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 |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 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="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 |
@ -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,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 |
@ -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 |
|
After Width: | Height: | Size: 152 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 |
BIN
web/documentserver-example/csharp-core/wwwroot/img/filter-24.png
Normal file
|
After Width: | Height: | Size: 118 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 |
BIN
web/documentserver-example/csharp-core/wwwroot/img/loader16.gif
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
web/documentserver-example/csharp-core/wwwroot/img/logo.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
15
web/documentserver-example/csharp-core/wwwroot/img/logo.svg
Normal file
@ -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 |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.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="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: 145 B After Width: | Height: | Size: 145 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="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 |
BIN
web/documentserver-example/csharp-core/wwwroot/img/slide.ico
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
web/documentserver-example/csharp-core/wwwroot/img/word.ico
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
9440
web/documentserver-example/csharp-core/wwwroot/js/jquery-1.8.2.js
vendored
Normal file
5
web/documentserver-example/csharp-core/wwwroot/js/jquery-ui.js
vendored
Normal file
@ -0,0 +1,576 @@
|
||||
/*!
|
||||
* jQuery blockUI plugin
|
||||
* Version 2.55 (18-JAN-2013)
|
||||
* @requires jQuery v1.7 or later
|
||||
*
|
||||
* Examples at: http://malsup.com/jquery/block/
|
||||
* Copyright (c) 2007-2013 M. Alsup
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
|
||||
*/
|
||||
|
||||
;(function() {
|
||||
"use strict";
|
||||
|
||||
function setup($) {
|
||||
$.fn._fadeIn = $.fn.fadeIn;
|
||||
|
||||
var noOp = $.noop || function() {};
|
||||
|
||||
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
|
||||
// retarded userAgent strings on Vista)
|
||||
var msie = /MSIE/.test(navigator.userAgent);
|
||||
var ie6 = /MSIE 6.0/.test(navigator.userAgent);
|
||||
var mode = document.documentMode || 0;
|
||||
// var setExpr = msie && (($.browser.version < 8 && !mode) || mode < 8);
|
||||
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
|
||||
|
||||
// global $ methods for blocking/unblocking the entire page
|
||||
$.blockUI = function(opts) { install(window, opts); };
|
||||
$.unblockUI = function(opts) { remove(window, opts); };
|
||||
|
||||
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
|
||||
$.growlUI = function(title, message, timeout, onClose) {
|
||||
var $m = $('<div class="growlUI"></div>');
|
||||
if (title) $m.append('<h1>'+title+'</h1>');
|
||||
if (message) $m.append('<h2>'+message+'</h2>');
|
||||
if (timeout === undefined) timeout = 3000;
|
||||
$.blockUI({
|
||||
message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
|
||||
timeout: timeout, showOverlay: false,
|
||||
onUnblock: onClose,
|
||||
css: $.blockUI.defaults.growlCSS
|
||||
});
|
||||
};
|
||||
|
||||
// plugin method for blocking element content
|
||||
$.fn.block = function(opts) {
|
||||
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
this.each(function() {
|
||||
var $el = $(this);
|
||||
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
|
||||
return;
|
||||
$el.unblock({ fadeOut: 0 });
|
||||
});
|
||||
|
||||
return this.each(function() {
|
||||
if ($.css(this,'position') == 'static') {
|
||||
this.style.position = 'relative';
|
||||
$(this).data('blockUI.static', true);
|
||||
}
|
||||
this.style.zoom = 1; // force 'hasLayout' in ie
|
||||
install(this, opts);
|
||||
});
|
||||
};
|
||||
|
||||
// plugin method for unblocking element content
|
||||
$.fn.unblock = function(opts) {
|
||||
return this.each(function() {
|
||||
remove(this, opts);
|
||||
});
|
||||
};
|
||||
|
||||
$.blockUI.version = 2.55; // 2nd generation blocking at no extra cost!
|
||||
|
||||
// override these in your code to change the default behavior and style
|
||||
$.blockUI.defaults = {
|
||||
// message displayed when blocking (use null for no message)
|
||||
message: '<h1>Please wait...</h1>',
|
||||
|
||||
title: null, // title string; only used when theme == true
|
||||
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
|
||||
|
||||
theme: false, // set to true to use with jQuery UI themes
|
||||
|
||||
// styles for the message when blocking; if you wish to disable
|
||||
// these and use an external stylesheet then do this in your code:
|
||||
// $.blockUI.defaults.css = {};
|
||||
css: {
|
||||
padding: 0,
|
||||
margin: 0,
|
||||
width: '30%',
|
||||
top: '40%',
|
||||
left: '35%',
|
||||
textAlign: 'center',
|
||||
color: '#000',
|
||||
border: '3px solid #aaa',
|
||||
backgroundColor:'#fff',
|
||||
cursor: 'wait'
|
||||
},
|
||||
|
||||
// minimal style set used when themes are used
|
||||
themedCSS: {
|
||||
//width: '30%',
|
||||
top: '20%',
|
||||
left: '50%',
|
||||
marginLeft: "-325px"
|
||||
},
|
||||
|
||||
// styles for the overlay
|
||||
overlayCSS: {
|
||||
backgroundColor: '#000',
|
||||
opacity: 0.6,
|
||||
cursor: 'wait'
|
||||
},
|
||||
|
||||
// style to replace wait cursor before unblocking to correct issue
|
||||
// of lingering wait cursor
|
||||
cursorReset: 'default',
|
||||
|
||||
// styles applied when using $.growlUI
|
||||
growlCSS: {
|
||||
width: '350px',
|
||||
top: '10px',
|
||||
left: '',
|
||||
right: '10px',
|
||||
border: 'none',
|
||||
padding: '5px',
|
||||
opacity: 0.6,
|
||||
cursor: 'default',
|
||||
color: '#fff',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius':'10px',
|
||||
'-moz-border-radius': '10px',
|
||||
'border-radius': '10px'
|
||||
},
|
||||
|
||||
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
|
||||
// (hat tip to Jorge H. N. de Vasconcelos)
|
||||
/*jshint scripturl:true */
|
||||
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
|
||||
|
||||
// force usage of iframe in non-IE browsers (handy for blocking applets)
|
||||
forceIframe: false,
|
||||
|
||||
// z-index for the blocking overlay
|
||||
baseZ: 1000,
|
||||
|
||||
// set these to true to have the message automatically centered
|
||||
centerX: true, // <-- only effects element blocking (page block controlled via css above)
|
||||
centerY: true,
|
||||
|
||||
// allow body element to be stetched in ie6; this makes blocking look better
|
||||
// on "short" pages. disable if you wish to prevent changes to the body height
|
||||
allowBodyStretch: true,
|
||||
|
||||
// enable if you want key and mouse events to be disabled for content that is blocked
|
||||
bindEvents: true,
|
||||
|
||||
// be default blockUI will supress tab navigation from leaving blocking content
|
||||
// (if bindEvents is true)
|
||||
constrainTabKey: true,
|
||||
|
||||
// fadeIn time in millis; set to 0 to disable fadeIn on block
|
||||
fadeIn: 200,
|
||||
|
||||
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
|
||||
fadeOut: 400,
|
||||
|
||||
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
|
||||
timeout: 0,
|
||||
|
||||
// disable if you don't want to show the overlay
|
||||
showOverlay: true,
|
||||
|
||||
// if true, focus will be placed in the first available input field when
|
||||
// page blocking
|
||||
focusInput: true,
|
||||
|
||||
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
|
||||
// no longer needed in 2012
|
||||
// applyPlatformOpacityRules: true,
|
||||
|
||||
// callback method invoked when fadeIn has completed and blocking message is visible
|
||||
onBlock: null,
|
||||
|
||||
// callback method invoked when unblocking has completed; the callback is
|
||||
// passed the element that has been unblocked (which is the window object for page
|
||||
// blocks) and the options that were passed to the unblock call:
|
||||
// onUnblock(element, options)
|
||||
onUnblock: null,
|
||||
|
||||
// callback method invoked when the overlay area is clicked.
|
||||
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
|
||||
onOverlayClick: null,
|
||||
|
||||
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
|
||||
quirksmodeOffsetHack: 4,
|
||||
|
||||
// class name of the message block
|
||||
blockMsgClass: 'blockMsg',
|
||||
|
||||
// if it is already blocked, then ignore it (don't unblock and reblock)
|
||||
ignoreIfBlocked: false
|
||||
};
|
||||
|
||||
// private data and functions follow...
|
||||
|
||||
var pageBlock = null;
|
||||
var pageBlockEls = [];
|
||||
|
||||
function install(el, opts) {
|
||||
var css, themedCSS;
|
||||
var full = (el == window);
|
||||
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
|
||||
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
|
||||
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
|
||||
return;
|
||||
|
||||
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
|
||||
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
|
||||
if (opts.onOverlayClick)
|
||||
opts.overlayCSS.cursor = 'pointer';
|
||||
|
||||
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
|
||||
msg = msg === undefined ? opts.message : msg;
|
||||
|
||||
// remove the current block (if there is one)
|
||||
if (full && pageBlock)
|
||||
remove(window, {fadeOut:0});
|
||||
|
||||
// if an existing element is being used as the blocking content then we capture
|
||||
// its current place in the DOM (and current display style) so we can restore
|
||||
// it when we unblock
|
||||
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
|
||||
var node = msg.jquery ? msg[0] : msg;
|
||||
var data = {};
|
||||
$(el).data('blockUI.history', data);
|
||||
data.el = node;
|
||||
data.parent = node.parentNode;
|
||||
data.display = node.style.display;
|
||||
data.position = node.style.position;
|
||||
if (data.parent)
|
||||
data.parent.removeChild(node);
|
||||
}
|
||||
|
||||
$(el).data('blockUI.onUnblock', opts.onUnblock);
|
||||
var z = opts.baseZ;
|
||||
|
||||
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
|
||||
// layer1 is the iframe layer which is used to supress bleed through of underlying content
|
||||
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
|
||||
// layer3 is the message content that is displayed while blocking
|
||||
var lyr1, lyr2, lyr3, s;
|
||||
if (msie || opts.forceIframe)
|
||||
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
|
||||
else
|
||||
lyr1 = $('<div class="blockUI" style="display:none"></div>');
|
||||
|
||||
if (opts.theme)
|
||||
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
|
||||
else
|
||||
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
|
||||
|
||||
if (opts.theme && full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (opts.theme) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
|
||||
}
|
||||
else {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
|
||||
}
|
||||
lyr3 = $(s);
|
||||
|
||||
// if we have a message, style it
|
||||
if (msg) {
|
||||
if (opts.theme) {
|
||||
lyr3.css(themedCSS);
|
||||
lyr3.addClass('ui-widget-content');
|
||||
}
|
||||
else
|
||||
lyr3.css(css);
|
||||
}
|
||||
|
||||
// style the overlay
|
||||
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
|
||||
lyr2.css(opts.overlayCSS);
|
||||
lyr2.css('position', full ? 'fixed' : 'absolute');
|
||||
|
||||
// make iframe layer transparent in IE
|
||||
if (msie || opts.forceIframe)
|
||||
lyr1.css('opacity',0.0);
|
||||
|
||||
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
|
||||
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
|
||||
$.each(layers, function() {
|
||||
this.appendTo($par);
|
||||
});
|
||||
|
||||
if (opts.theme && opts.draggable && $.fn.draggable) {
|
||||
lyr3.draggable({
|
||||
handle: '.ui-dialog-titlebar',
|
||||
cancel: 'li'
|
||||
});
|
||||
}
|
||||
|
||||
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
|
||||
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
|
||||
if (ie6 || expr) {
|
||||
// give body 100% height
|
||||
if (full && opts.allowBodyStretch && $.support.boxModel)
|
||||
$('html,body').css('height','100%');
|
||||
|
||||
// fix ie6 issue when blocked element has a border width
|
||||
if ((ie6 || !$.support.boxModel) && !full) {
|
||||
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
|
||||
var fixT = t ? '(0 - '+t+')' : 0;
|
||||
var fixL = l ? '(0 - '+l+')' : 0;
|
||||
}
|
||||
|
||||
// simulate fixed position
|
||||
$.each(layers, function(i,o) {
|
||||
var s = o[0].style;
|
||||
s.position = 'absolute';
|
||||
if (i < 2) {
|
||||
if (full)
|
||||
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
|
||||
else
|
||||
s.setExpression('height','this.parentNode.offsetHeight + "px"');
|
||||
if (full)
|
||||
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
|
||||
else
|
||||
s.setExpression('width','this.parentNode.offsetWidth + "px"');
|
||||
if (fixL) s.setExpression('left', fixL);
|
||||
if (fixT) s.setExpression('top', fixT);
|
||||
}
|
||||
else if (opts.centerY) {
|
||||
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
|
||||
s.marginTop = 0;
|
||||
}
|
||||
else if (!opts.centerY && full) {
|
||||
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
|
||||
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
|
||||
s.setExpression('top',expression);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// show the message
|
||||
if (msg) {
|
||||
if (opts.theme)
|
||||
lyr3.find('.ui-widget-content').append(msg);
|
||||
else
|
||||
lyr3.append(msg);
|
||||
if (msg.jquery || msg.nodeType)
|
||||
$(msg).show();
|
||||
}
|
||||
|
||||
if ((msie || opts.forceIframe) && opts.showOverlay)
|
||||
lyr1.show(); // opacity is zero
|
||||
if (opts.fadeIn) {
|
||||
var cb = opts.onBlock ? opts.onBlock : noOp;
|
||||
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
|
||||
var cb2 = msg ? cb : noOp;
|
||||
if (opts.showOverlay)
|
||||
lyr2._fadeIn(opts.fadeIn, cb1);
|
||||
if (msg)
|
||||
lyr3._fadeIn(opts.fadeIn, cb2);
|
||||
}
|
||||
else {
|
||||
if (opts.showOverlay)
|
||||
lyr2.show();
|
||||
if (msg)
|
||||
lyr3.show();
|
||||
if (opts.onBlock)
|
||||
opts.onBlock();
|
||||
}
|
||||
|
||||
// bind key and mouse events
|
||||
bind(1, el, opts);
|
||||
|
||||
if (full) {
|
||||
pageBlock = lyr3[0];
|
||||
pageBlockEls = $(':input:enabled:visible',pageBlock);
|
||||
if (opts.focusInput)
|
||||
setTimeout(focus, 20);
|
||||
}
|
||||
else
|
||||
center(lyr3[0], opts.centerX, opts.centerY);
|
||||
|
||||
if (opts.timeout) {
|
||||
// auto-unblock
|
||||
var to = setTimeout(function() {
|
||||
if (full)
|
||||
$.unblockUI(opts);
|
||||
else
|
||||
$(el).unblock(opts);
|
||||
}, opts.timeout);
|
||||
$(el).data('blockUI.timeout', to);
|
||||
}
|
||||
}
|
||||
|
||||
// remove the block
|
||||
function remove(el, opts) {
|
||||
var full = (el == window);
|
||||
var $el = $(el);
|
||||
var data = $el.data('blockUI.history');
|
||||
var to = $el.data('blockUI.timeout');
|
||||
if (to) {
|
||||
clearTimeout(to);
|
||||
$el.removeData('blockUI.timeout');
|
||||
}
|
||||
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
bind(0, el, opts); // unbind events
|
||||
|
||||
if (opts.onUnblock === null) {
|
||||
opts.onUnblock = $el.data('blockUI.onUnblock');
|
||||
$el.removeData('blockUI.onUnblock');
|
||||
}
|
||||
|
||||
var els;
|
||||
if (full) // crazy selector to handle odd field errors in ie6/7
|
||||
els = $('body').children().filter('.blockUI').add('body > .blockUI');
|
||||
else
|
||||
els = $el.find('>.blockUI');
|
||||
|
||||
// fix cursor issue
|
||||
if ( opts.cursorReset ) {
|
||||
if ( els.length > 1 )
|
||||
els[1].style.cursor = opts.cursorReset;
|
||||
if ( els.length > 2 )
|
||||
els[2].style.cursor = opts.cursorReset;
|
||||
}
|
||||
|
||||
if (full)
|
||||
pageBlock = pageBlockEls = null;
|
||||
|
||||
if (opts.fadeOut) {
|
||||
els.fadeOut(opts.fadeOut);
|
||||
setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
|
||||
}
|
||||
else
|
||||
reset(els, data, opts, el);
|
||||
}
|
||||
|
||||
// move blocking element back into the DOM where it started
|
||||
function reset(els,data,opts,el) {
|
||||
var $el = $(el);
|
||||
els.each(function(i,o) {
|
||||
// remove via DOM calls so we don't lose event handlers
|
||||
if (this.parentNode)
|
||||
this.parentNode.removeChild(this);
|
||||
});
|
||||
|
||||
if (data && data.el) {
|
||||
data.el.style.display = data.display;
|
||||
data.el.style.position = data.position;
|
||||
if (data.parent)
|
||||
data.parent.appendChild(data.el);
|
||||
$el.removeData('blockUI.history');
|
||||
}
|
||||
|
||||
if ($el.data('blockUI.static')) {
|
||||
$el.css('position', 'static'); // #22
|
||||
}
|
||||
|
||||
if (typeof opts.onUnblock == 'function')
|
||||
opts.onUnblock(el,opts);
|
||||
|
||||
// fix issue in Safari 6 where block artifacts remain until reflow
|
||||
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
|
||||
body.width(w-1).width(w);
|
||||
body[0].style.width = cssW;
|
||||
}
|
||||
|
||||
// bind/unbind the handler
|
||||
function bind(b, el, opts) {
|
||||
var full = el == window, $el = $(el);
|
||||
|
||||
// don't bother unbinding if there is nothing to unbind
|
||||
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
|
||||
return;
|
||||
|
||||
$el.data('blockUI.isBlocked', b);
|
||||
|
||||
// don't bind events when overlay is not in use or if bindEvents is false
|
||||
if (!opts.bindEvents || (b && !opts.showOverlay))
|
||||
return;
|
||||
|
||||
// bind anchors and inputs for mouse and key events
|
||||
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
|
||||
if (b)
|
||||
$(document).bind(events, opts, handler);
|
||||
else
|
||||
$(document).unbind(events, handler);
|
||||
|
||||
// former impl...
|
||||
// var $e = $('a,:input');
|
||||
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
|
||||
}
|
||||
|
||||
// event handler to suppress keyboard/mouse events when blocking
|
||||
function handler(e) {
|
||||
// allow tab navigation (conditionally)
|
||||
if (e.keyCode && e.keyCode == 9) {
|
||||
if (pageBlock && e.data.constrainTabKey) {
|
||||
var els = pageBlockEls;
|
||||
var fwd = !e.shiftKey && e.target === els[els.length-1];
|
||||
var back = e.shiftKey && e.target === els[0];
|
||||
if (fwd || back) {
|
||||
setTimeout(function(){focus(back);},10);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
var opts = e.data;
|
||||
var target = $(e.target);
|
||||
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
|
||||
opts.onOverlayClick();
|
||||
|
||||
// allow events within the message content
|
||||
if (target.parents('div.' + opts.blockMsgClass).length > 0)
|
||||
return true;
|
||||
|
||||
// allow events for content that is not being blocked
|
||||
return target.parents().children().filter('div.blockUI').length === 0;
|
||||
}
|
||||
|
||||
function focus(back) {
|
||||
if (!pageBlockEls)
|
||||
return;
|
||||
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
|
||||
if (e)
|
||||
e.focus();
|
||||
}
|
||||
|
||||
function center(el, x, y) {
|
||||
var p = el.parentNode, s = el.style;
|
||||
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
|
||||
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
|
||||
if (x) s.left = l > 0 ? (l+'px') : '0';
|
||||
if (y) s.top = t > 0 ? (t+'px') : '0';
|
||||
}
|
||||
|
||||
function sz(el, p) {
|
||||
return parseInt($.css(el,p),10)||0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*global define:true */
|
||||
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
|
||||
define(['jquery'], setup);
|
||||
} else {
|
||||
setup(jQuery);
|
||||
}
|
||||
|
||||
})();
|
||||
@ -0,0 +1,142 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2021
|
||||
*
|
||||
* 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 = {};
|
||||
jQuery.extend({
|
||||
dropdownToggle: function(options) {
|
||||
// default options
|
||||
options = jQuery.extend({
|
||||
//switcherSelector: "#id" or ".class", - button
|
||||
//dropdownID: "id", - drop panel
|
||||
//anchorSelector: "#id" or ".class", - near field
|
||||
//noActiveSwitcherSelector: "#id" or ".class", - dont hide
|
||||
addTop: 0,
|
||||
addLeft: 0,
|
||||
position: "absolute",
|
||||
fixWinSize: true,
|
||||
enableAutoHide: true,
|
||||
showFunction: null,
|
||||
afterShowFunction: null,
|
||||
hideFunction: null,
|
||||
alwaysUp: false,
|
||||
simpleToggle: false,
|
||||
rightPos: false
|
||||
}, options);
|
||||
|
||||
var _toggle = function(switcherObj, dropdownID, addTop, addLeft, fixWinSize, position, anchorSelector, showFunction, alwaysUp, simpleToggle, afterShowFunction) {
|
||||
var dropdownItem = jq("#" + dropdownID);
|
||||
|
||||
if (typeof (simpleToggle) == "undefined" || simpleToggle === false) {
|
||||
fixWinSize = fixWinSize === true;
|
||||
addTop = addTop || 0;
|
||||
addLeft = addLeft || 0;
|
||||
position = position || "absolute";
|
||||
|
||||
var targetPos = jq(anchorSelector || switcherObj).offset();
|
||||
|
||||
if (!targetPos) return;
|
||||
|
||||
var elemPosLeft = targetPos.left;
|
||||
var elemPosTop = targetPos.top + jq(anchorSelector || switcherObj).outerHeight();
|
||||
if (options.rightPos) {
|
||||
elemPosLeft = Math.max(0,targetPos.left - dropdownItem.outerWidth() + jq(anchorSelector || switcherObj).outerWidth());
|
||||
}
|
||||
|
||||
var w = jq(window);
|
||||
var topPadding = w.scrollTop();
|
||||
var leftPadding = w.scrollLeft();
|
||||
|
||||
if (position == "fixed") {
|
||||
addTop -= topPadding;
|
||||
addLeft -= leftPadding;
|
||||
}
|
||||
|
||||
var scrWidth = w.width();
|
||||
var scrHeight = w.height();
|
||||
|
||||
if (fixWinSize && (!options.rightPos)
|
||||
&& (targetPos.left + addLeft + dropdownItem.outerWidth()) > (leftPadding + scrWidth)) {
|
||||
elemPosLeft = Math.max(0, leftPadding + scrWidth - dropdownItem.outerWidth()) - addLeft;
|
||||
}
|
||||
|
||||
if (fixWinSize
|
||||
&& (elemPosTop + dropdownItem.outerHeight()) > (topPadding + scrHeight)
|
||||
&& (targetPos.top - dropdownItem.outerHeight()) > topPadding
|
||||
|| alwaysUp) {
|
||||
elemPosTop = targetPos.top - dropdownItem.outerHeight();
|
||||
}
|
||||
|
||||
dropdownItem.css(
|
||||
{
|
||||
"position": position,
|
||||
"top": elemPosTop + addTop,
|
||||
"left": elemPosLeft + addLeft
|
||||
});
|
||||
}
|
||||
if (typeof showFunction === "function") {
|
||||
showFunction(switcherObj, dropdownItem);
|
||||
}
|
||||
|
||||
dropdownItem.toggle();
|
||||
|
||||
if (typeof afterShowFunction === "function") {
|
||||
afterShowFunction(switcherObj, dropdownItem);
|
||||
}
|
||||
};
|
||||
|
||||
var _registerAutoHide = function(event, switcherSelector, dropdownSelector, hideFunction) {
|
||||
if (jq(dropdownSelector).is(":visible")) {
|
||||
var $targetElement = jq((event.target) ? event.target : event.srcElement);
|
||||
if (!$targetElement.parents().andSelf().is(switcherSelector + ", " + dropdownSelector)) {
|
||||
if (typeof hideFunction === "function")
|
||||
hideFunction($targetElement);
|
||||
jq(dropdownSelector).hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (options.switcherSelector && options.dropdownID) {
|
||||
var toggleFunc = function(e) {
|
||||
_toggle(jq(this), options.dropdownID, options.addTop, options.addLeft, options.fixWinSize, options.position, options.anchorSelector, options.showFunction, options.alwaysUp, options.simpleToggle, options.afterShowFunction);
|
||||
};
|
||||
if (!dropdownToggleHash.hasOwnProperty(options.switcherSelector + options.dropdownID)) {
|
||||
jq(document).on("click", options.switcherSelector, toggleFunc);
|
||||
dropdownToggleHash[options.switcherSelector + options.dropdownID] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (options.enableAutoHide && options.dropdownID) {
|
||||
var hideFunc = function(e) {
|
||||
var allSwitcherSelectors = options.noActiveSwitcherSelector ?
|
||||
options.switcherSelector + ", " + options.noActiveSwitcherSelector : options.switcherSelector;
|
||||
_registerAutoHide(e, allSwitcherSelectors, "#" + options.dropdownID, options.hideFunction);
|
||||
|
||||
};
|
||||
jq(document).unbind("click", hideFunc);
|
||||
jq(document).bind("click", hideFunc);
|
||||
}
|
||||
|
||||
return {
|
||||
toggle: _toggle,
|
||||
registerAutoHide: _registerAutoHide
|
||||
};
|
||||
}
|
||||
});
|
||||
})();
|
||||