Compare commits

...

1263 Commits

Author SHA1 Message Date
1ac382d3c0 java-spring: https 2023-02-10 10:39:03 +03:00
5933aa83ad Merge remote-tracking branch 'remotes/origin/master' into develop 2023-02-09 12:27:46 +05:00
2e1854f6c1 Merge pull request #342 from ONLYOFFICE/fix/actions-on
fix: remove on develop pull request
2023-02-09 10:27:10 +03:00
2d9a7ed502 fix: remove on develop pull request 2023-02-09 11:49:50 +05:00
78bd037486 Merge pull request #340 from ONLYOFFICE/refactor/linter-formatting
Refactor/linter formatting
2023-02-09 09:31:32 +03:00
17beef45f4 php: linter to changelog 2023-02-09 11:30:13 +05:00
b11a1be481 php: PSR1.Files.SideEffects disabled in ruleset.xml 2023-02-09 09:16:46 +03:00
a3e140981d php: correct license type 2023-02-08 22:53:48 +05:00
e0386f7cf9 php: added licenses of new dependency (PHP_CodeSniffer) 2023-02-03 17:25:17 +03:00
0521f20413 php: deleted unused ruleset (uses - ruleset.xml) 2023-02-03 17:23:02 +03:00
61b5746ddf php: deleted dependency: cs-fixer 2023-02-03 17:17:40 +03:00
57d823acb1 Merge branch 'develop' into refactor/linter-formatting 2023-02-03 14:47:29 +03:00
4d99e2e406 php: example namespace for class User (users.php) added 2023-02-03 12:01:22 +03:00
bec48ed834 php: spaces in "mixed"-php files auto-fixed 2023-02-03 11:17:45 +03:00
e856f5bcb1 php: fixed spaces and new lines for multi-line functions 2023-02-03 11:06:05 +03:00
c57a710bca Merge pull request #339 from ONLYOFFICE/fix/phpcs-ruleset
ci: custom ruleset
2023-02-03 09:09:39 +03:00
248e9213a1 ci: custom ruleset 2023-02-03 11:06:55 +05:00
a035adcbd9 php: function names converted to camelCase (exclude mime_content_type) 2023-02-02 17:23:42 +03:00
7fd1b65fec php: fixed doc comments and multi-line assignments 2023-02-02 16:48:58 +03:00
8ee0aa45b9 php: line exceeds maximum limit of 120 characters 2023-02-02 15:28:05 +03:00
dfcf244dc8 php: comments for functions are standardized to PEAR Docblock Comment standards 2023-02-02 14:14:57 +03:00
0563795494 php: spaces and new lines around operators fixed 2023-02-02 11:27:14 +03:00
b6b6e80ffb php: no additional blank lines at end of doc comment 2023-02-02 10:53:15 +03:00
bd3b91d02f php: include/require and file path should be divided with a single space 2023-02-02 10:34:58 +03:00
555f8d43cd php: braces after functions and oop constructs on the next line 2023-02-01 16:46:31 +03:00
3f48a8d492 php: trailing whitespace at the end of blank line removed 2023-02-01 15:57:27 +03:00
bb921e7eff php: method argument spaces normalized 2023-02-01 14:48:48 +03:00
13d5e6fa94 php: binary operators should be surrounded by single space 2023-02-01 14:12:28 +03:00
cbfcf5de96 php: no spaces after function name 2023-02-01 14:06:41 +03:00
4771d96819 php: unary operators should be placed adjacent to their operands 2023-02-01 13:47:04 +03:00
d2aa6f0653 php: used null coalescing operator ?? where possible 2023-02-01 13:44:26 +03:00
cf2a00a374 php: used operator ?: where possible 2023-02-01 13:39:40 +03:00
bdfb75dc84 php: standardized spaces around ternary operator 2023-02-01 13:37:03 +03:00
9e21ca625c Merge pull request #334 from ONLYOFFICE/feature/token-and-address-required-on-download
Feature/token and address required on download
2023-02-01 12:59:22 +03:00
02def07f23 php: require user address on download 2023-02-01 14:30:54 +05:00
fc4dac6c4b java-spring: token and user address required on download 2023-02-01 14:29:52 +05:00
486a09f3b2 java: token and address required on download 2023-02-01 14:28:28 +05:00
9a22fc854b csharp-mvc: user address required on download 2023-02-01 14:27:32 +05:00
ac4d5561a2 c-sharp: user address required on download 2023-02-01 14:26:37 +05:00
98cdda06c4 ruby: user address required on download 2023-02-01 14:25:24 +05:00
744fccf913 python: user address required on download 2023-02-01 14:24:34 +05:00
349ff5d61d php: all classes must be final, except abstract ones and doctrine entities 2023-02-01 11:22:29 +03:00
dbba22df23 php: array_push() converted to short usage 2023-02-01 09:21:35 +03:00
2ddd822b24 php: replace non multibyte-safe functions with corresponding mb function 2023-02-01 09:09:58 +03:00
6b4d6baf4b php: short scalar cast 2023-01-31 17:29:58 +03:00
2c8d151cc7 php: there must be no trailing spaces inside comment or PHPDoc 2023-01-31 17:10:22 +03:00
60c7c025a3 Merge remote-tracking branch 'remotes/origin/hotfix/v7.3.1' into develop 2023-01-31 18:44:33 +05:00
7aaf5243cb Merge pull request #337 from ONLYOFFICE/feature/add-oform-parameter
nodejs: disable oform module
2023-01-31 16:15:43 +03:00
44b0f4d53d php: There must not be a space after the opening parenthesis 2023-01-31 16:05:35 +03:00
b765d43612 nodejs: disable oform module 2023-01-31 18:01:46 +05:00
70b63636e3 php: there must not be spaces around offset brace 2023-01-31 16:00:00 +03:00
8d4582e379 php: each statement must be indented 2023-01-31 15:54:07 +03:00
a1ec2cf366 php: remove trailing whitespace at the end of non-blank lines 2023-01-31 15:46:55 +03:00
4907e9d3c8 php: header comment needed 2023-01-31 15:43:37 +03:00
88f3d6da59 php: closing ?> tag must be omitted from files containing only PHP 2023-01-31 15:20:22 +03:00
481b111cb2 php: multi-line arrays must have a trailing comma 2023-01-31 15:14:01 +03:00
a1e13f3315 php: visibility must be declared on all methods 2023-01-31 14:58:18 +03:00
d1dd289c77 php: replace control structure alternative syntax to use braces 2023-01-31 14:52:04 +03:00
7b4e40c4e4 php: keyword elseif should be used instead of else if 2023-01-31 12:56:57 +03:00
6d4cad2215 php: curly opening braces after control structures and oop-structures on the same line 2023-01-31 12:31:33 +03:00
f43a4471ef php: whitespace after each comma in array declaration 2023-01-31 11:42:13 +03:00
0cf90e86c7 php: trim array spaces 2023-01-31 11:32:59 +03:00
406de99b01 php: single space or none should be between cast and variable 2023-01-31 10:30:26 +03:00
f4bcb15d33 php: each element of an array must be indented exactly once 2023-01-31 10:17:54 +03:00
d2a0164738 Merge branch 'refactor/linter-formatting' of https://github.com/ONLYOFFICE/document-server-integration into refactor/linter-formatting 2023-01-31 10:02:56 +03:00
a49ef4cc13 php: lower case for constants "true", "false" and "null" 2023-01-31 09:59:37 +03:00
3ca29cd402 Merge branch 'feature/deploy' into develop 2023-01-31 00:48:16 +05:00
c398b30e33 build: exclude packages from csharp examples 2023-01-31 00:45:02 +05:00
8caea9fab0 java: fix dockerfile path 2023-01-31 00:45:02 +05:00
f44c62540c php: lower case for constants "true", "false" and "null" 2023-01-30 17:33:48 +03:00
7644db80e3 php: no multiple statements per line 2023-01-30 17:26:31 +03:00
880497cd01 php: curly opening braces on the same line 2023-01-30 17:18:37 +03:00
34f8174d9d php: no mixed "print" and "echo" 2023-01-30 17:02:09 +03:00
99bc9d3fdf php: useless "else" deleted 2023-01-30 16:36:58 +03:00
165c292ab8 php: extra blank lines deleted 2023-01-30 16:26:04 +03:00
8fe41cd8e6 php: used short syntax for arrays 2023-01-30 15:23:00 +03:00
705ea097e2 php: used PSR-2 standart for linter 2023-01-30 14:56:32 +03:00
f4799bebb4 php: added needed dependencies 2023-01-30 14:42:05 +03:00
4ffa524de0 Merge pull request #336 from ONLYOFFICE/bugfix/java-dockerfile
java: fix dockerfile path
2023-01-30 13:16:21 +03:00
cd055317e0 java: fix dockerfile path 2023-01-30 09:46:27 +00:00
b1941c5980 Merge branch 'develop' of https://github.com/ONLYOFFICE/document-server-integration into develop 2023-01-30 08:58:52 +03:00
83bc0fed5e Merge remote-tracking branch 'remotes/origin/master' into develop 2023-01-27 18:54:25 +05:00
8b71bb0433 Merge pull request #335 from ONLYOFFICE/release/1.5.0
Release/1.5.0
2023-01-27 13:48:34 +03:00
5620f49f8f Merge pull request #321 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/loofah-2.19.1
build(deps): bump loofah from 2.19.0 to 2.19.1 in /web/documentserver-example/ruby
2023-01-27 11:53:41 +03:00
d9fefef834 Merge branch 'develop' into dependabot/bundler/web/documentserver-example/ruby/loofah-2.19.1 2023-01-27 10:40:40 +03:00
37591d847c Merge pull request #323 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/rails-html-sanitizer-1.4.4
build(deps): bump rails-html-sanitizer from 1.4.3 to 1.4.4 in /web/documentserver-example/ruby
2023-01-26 17:36:27 +03:00
77290d88f3 build(deps): bump rails-html-sanitizer
Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/rails/rails-html-sanitizer/releases)
- [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: rails-html-sanitizer
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-26 19:35:36 +05:00
6befd87761 Merge pull request #330 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/rack-2.2.6.2
build(deps): bump rack from 2.2.4 to 2.2.6.2 in /web/documentserver-example/ruby
2023-01-26 17:13:57 +03:00
f3e270c1ad Merge pull request #332 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/globalid-1.0.1
build(deps): bump globalid from 1.0.0 to 1.0.1 in /web/documentserver-example/ruby
2023-01-26 17:13:11 +03:00
f5f1e4b391 Merge pull request #333 from ONLYOFFICE/bugfix/saving-file
Bugfix/saving file
2023-01-26 15:20:30 +03:00
8ba389d02f Merge pull request #328 from ONLYOFFICE/bugfix/php-example-warnings
php: empty GET parameters warnings fixed
2023-01-25 22:33:06 +03:00
45910ff1f3 php: empty GET parameters warnings fixed
Empty GET-parameters "user", "directUrl",  "fileUrl", "fileExt" no longer give a warning, the example can work without them.
2023-01-26 00:11:03 +05:00
3bd6f51edc 1.5.0 2023-01-24 00:55:41 +05:00
fe9791f03d Merge pull request #320 from ONLYOFFICE/feature/putRelativeFile
Feature/put relative file
2023-01-22 11:57:22 +03:00
531137dca4 nodejs: log X-WOPI-FileConversion header 2023-01-22 13:57:01 +05:00
e267b30b26 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.3.0 2023-01-22 13:14:39 +05:00
8733baa04b Merge pull request #327 from ONLYOFFICE/dependabot/npm_and_yarn/web/documentserver-example/nodejs/jsonwebtoken-9.0.0
build(deps): bump jsonwebtoken from 8.5.1 to 9.0.0 in /web/documentserver-example/nodejs
2023-01-22 11:11:08 +03:00
8cec9fc465 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.3.0 2023-01-22 12:57:46 +05:00
7ec969f4d9 ruby: check file availability when saving 2023-01-22 12:51:46 +05:00
c7e13ef8a8 python: check file availability when saving 2023-01-22 12:51:46 +05:00
3d488f89b2 java: check file availability when saving 2023-01-22 12:50:30 +05:00
cc00af1510 java-spring: check file availability when saving 2023-01-22 12:23:07 +05:00
f8aa55143c csharp: check file availability when saving 2023-01-22 02:16:20 +05:00
1b44c04893 csharp-mvc: check file availability when saving 2023-01-22 02:16:20 +05:00
1585d1821e Merge pull request #325 from ONLYOFFICE/refactor/java-linter
Refactor/java linter
2023-01-22 00:01:26 +03:00
e996c4d265 Merge remote-tracking branch 'remotes/origin/develop' into refactor/java-linter
# Conflicts:
#	web/documentserver-example/java/src/main/java/entities/CommentGroups.java
#	web/documentserver-example/java/src/main/java/helpers/TrackManager.java
2023-01-22 01:59:44 +05:00
cc0c6189bd Merge pull request #324 from ONLYOFFICE/refactor/java-spring-linter
Refactor/java spring linter
2023-01-21 23:47:25 +03:00
ef7662c069 java-spring: Header formatting 2023-01-22 01:46:01 +05:00
79ff84a4cc Merge remote-tracking branch 'remotes/origin/develop' into refactor/java-spring-linter
# Conflicts:
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/managers/callback/DefaultCallbackManager.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/managers/history/DefaultHistoryManager.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/models/filemodel/Template.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/storage/FileStorageMutator.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/storage/FileStoragePathBuilder.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/util/Misc.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/util/SSLUtils.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/dto/ChangesHistory.java
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/dto/ChangesUser.java
2023-01-22 01:40:46 +05:00
e4bab17b08 Merge pull request #326 from ONLYOFFICE/fix/java-spring-example-link
Java Spring example fix in Readme
2023-01-21 23:20:53 +03:00
c734f5dd69 Merge pull request #322 from ONLYOFFICE/feature/remove-parsing-url
Feature/remove parsing url
2023-01-21 22:14:07 +03:00
d79feca18c remove parsing url for getting ext 2023-01-22 00:11:47 +05:00
3181c7449d Copyright 2023 2023-01-20 15:27:03 +05:00
8ea2edefb9 python: apache (8050ec572a) 2023-01-20 15:25:28 +05:00
1a51759154 build(deps): bump globalid in /web/documentserver-example/ruby
Bumps [globalid](https://github.com/rails/globalid) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/rails/globalid/releases)
- [Commits](https://github.com/rails/globalid/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: globalid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-19 23:00:11 +00:00
77c4caa26f Merge branch 'feature/referenceData' into release/v7.3.0
# Conflicts:
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/nodejs/views/editor.ejs
2023-01-19 10:27:07 +05:00
5944e41cb4 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.3.0 2023-01-19 10:26:40 +05:00
09ccde3f84 nodejs: token in referenceData 2023-01-19 10:25:28 +05:00
b27e532a83 nodejs: referenceData 2023-01-19 10:15:41 +05:00
e9632eb5e2 nodejs: fileType in empty history (a7db14811f) 2023-01-19 10:03:31 +05:00
8807328180 build(deps): bump rack in /web/documentserver-example/ruby
Bumps [rack](https://github.com/rack/rack) from 2.2.4 to 2.2.6.2.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.4...v2.2.6.2)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-19 01:22:30 +00:00
827e96c506 Merge branch 'develop' into release/v7.3.0 2023-01-17 13:45:43 +05:00
491cbbc843 nodejs: require token on download 2023-01-17 13:45:29 +05:00
68d26c9c66 Merge branch 'release/v7.3.0' into feature/putRelativeFile 2023-01-14 12:26:35 +05:00
80924be536 Merge branch 'develop' into release/v7.3.0 2023-01-14 12:25:50 +05:00
0ca829181c nodejs: convert icon
# Conflicts:
#	web/documentserver-example/nodejs/views/wopiIndex.ejs
2023-01-14 12:24:53 +05:00
64f085d4b7 build(deps): bump jsonwebtoken in /web/documentserver-example/nodejs
Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) from 8.5.1 to 9.0.0.
- [Release notes](https://github.com/auth0/node-jsonwebtoken/releases)
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v8.5.1...v9.0.0)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-11 03:15:32 +00:00
39c2267468 fixed commands for Java Spring example 2023-01-09 18:22:57 +03:00
22af4e097f java: MissingJavadocMethod suppress 2022-12-22 11:22:15 +03:00
1a1cde0f67 java: JavadocVariable suppress 2022-12-22 11:21:14 +03:00
1265ecdee1 java-spring: removed constant EXT_LENGTH_PART 2022-12-22 11:18:18 +03:00
19d11a97f9 java-spring: MissingJavadocMethod suppress 2022-12-22 11:15:58 +03:00
bf6f3373a6 java-spring: JavadocVariable suppress 2022-12-22 11:14:51 +03:00
1fb4d759a3 java-spring: JavadocPackage suppress 2022-12-22 10:49:28 +03:00
de33efa599 java: suppress JavadocPackage 2022-12-22 10:25:00 +03:00
6fa150ade6 java-spring: LineLength formatting 2022-12-22 09:49:09 +03:00
88f4b6327d java-spring: changing LineLength rules 2022-12-22 01:45:17 +03:00
82905fca6c java: LineLength formatting 2022-12-22 01:39:33 +03:00
ccb67ad73d java: changing fileExtensions rules
Max length lines is 120
2022-12-21 17:30:38 +03:00
5a233b8dc7 Revert "java: adding check files by ext"
This reverts commit 8924304bdb.
2022-12-21 17:00:40 +03:00
127183bb16 java: Header formatting 2022-12-21 16:55:10 +03:00
8924304bdb java: adding check files by ext 2022-12-21 16:51:09 +03:00
68dd1fc369 java: filling onlyoffice.header 2022-12-21 16:49:47 +03:00
7251cb1681 java: enable Header rule with template 2022-12-21 16:41:47 +03:00
a82e4b6bdf java: AvoidStarImport formatting 2022-12-21 16:36:32 +03:00
d2f2031fa7 java: HideUtilityClassConstructor formatting 2022-12-21 16:31:04 +03:00
4a902dff94 java: VisibilityModifier formatting 2022-12-21 16:22:54 +03:00
f26220683c java: MagicNumber formatting 2022-12-21 13:14:47 +03:00
c3e4533d1a java: suppress DesignForExtension 2022-12-21 12:15:00 +03:00
f6618c8c92 java: suppress ParameterNumber 2022-12-21 12:14:11 +03:00
efd710c6c0 java: added checkstyle-suppressions.xml 2022-12-21 12:12:06 +03:00
e106677efb java: FinalParameters formatting 2022-12-21 12:08:52 +03:00
ecd02e07c0 java: HiddenField formatting 2022-12-21 11:36:42 +03:00
847902fad9 java: ConstantName formatting 2022-12-21 11:29:45 +03:00
d4b5f86822 java: LocalVariableName formatting 2022-12-21 11:24:50 +03:00
7c35d8127d java: MethodName formatting 2022-12-21 11:03:59 +03:00
d023b23fc9 java: StaticVariableName formatting 2022-12-20 22:04:46 +03:00
8b10c5ac2e java: RegexpSingleline formatting 2022-12-20 22:00:15 +03:00
54bc536329 java: MethodParamPad formatting 2022-12-20 21:54:33 +03:00
07d7e5d887 java: ParenPad formatting 2022-12-20 21:50:49 +03:00
009577b52e java: NoWhitespaceAfter formatting 2022-12-20 21:49:05 +03:00
c1fd896be4 java: WhitespaceAfter formatting 2022-12-20 21:45:04 +03:00
033126583b java: WhitespaceAround formatting 2022-12-20 21:40:20 +03:00
3140d31e9c java: UpperEll formatting 2022-12-20 19:18:05 +03:00
92ea5151ad java: ParameterName formatting 2022-12-20 19:16:33 +03:00
ae4e4c14ad java: OperatorWrap formatting 2022-12-20 19:14:57 +03:00
9a9d3c0b35 java: NewlineAtEndOfFile formatting 2022-12-20 19:12:53 +03:00
13d3fe97d9 java: RightCurly formatting 2022-12-20 19:10:43 +03:00
5bfe32f796 java: MemberName formatting 2022-12-20 19:05:07 +03:00
5a1ad9139f java: SimplifyBooleanExpression formatting 2022-12-20 19:00:54 +03:00
91fbc384f3 java: MissingSwitchDefault formatting 2022-12-20 18:58:27 +03:00
9d275ebe6c java: NeedBraces formatting 2022-12-20 18:56:18 +03:00
09a5d802ec java: InnerAssignment formatting 2022-12-20 18:30:27 +03:00
b548ffb97e java: LeftCurly formatting 2022-12-20 18:23:24 +03:00
50b0c3d29e java: UnusedImports formatting 2022-12-20 16:40:47 +03:00
93b4560c31 java: EmptyBlock formatting 2022-12-20 16:38:24 +03:00
2e9807814a java: used custom checkstyle rules 2022-12-20 16:36:48 +03:00
d0cfd03bf8 java: updated maven-checkstyle-plugin to 3.2.0 2022-12-20 16:34:51 +03:00
72c14a4e7b java: used oracle rules for linter 2022-12-20 16:16:51 +03:00
44a3f29a79 java-spring: Header formatting 2022-12-20 12:09:37 +03:00
98dceacc4c java-spring: add header rule template 2022-12-20 12:08:50 +03:00
05f4063ba6 java-spring: enable Header rule 2022-12-20 12:07:19 +03:00
d5797f7c02 java-spring: HiddenField formatting 2022-12-20 11:41:06 +03:00
5f40faac2a java-spring: AvoidStarImport formatting 2022-12-20 11:34:36 +03:00
c062e554db java-spring: suppress ParameterNumber 2022-12-20 11:23:42 +03:00
41e44985d6 java-spring: suppress DesignForExtension 2022-12-20 11:22:35 +03:00
95e1135e86 java-spring: MagicNumber formatting 2022-12-20 11:18:57 +03:00
cafb79c8d5 java-spring: RegexpSingleline formatting 2022-12-19 18:50:55 +03:00
1dbc275a57 java-spring: FinalParameters formatting 2022-12-19 18:46:30 +03:00
6dd44d2094 java-spring: WhitespaceAfter formatting 2022-12-19 16:20:47 +03:00
b74a3c5565 java-spring: LocalVariableName formatting 2022-12-19 15:41:06 +03:00
27e5fa8482 java-spring: MemberName formatting 2022-12-19 12:35:04 +03:00
46dab40432 java-spring: UpperEll formatting 2022-12-19 12:27:20 +03:00
ebd4ead751 java-spring: NoWhitespaceAfter formatting 2022-12-19 12:23:37 +03:00
9014f96da3 java-spring: FileTabCharacter formatting 2022-12-19 12:19:59 +03:00
273e4d5b77 java-spring: OperatorWrap formatting 2022-12-19 12:14:07 +03:00
d8b6cdcf78 java-spring: TodoComment formatting 2022-12-19 11:57:33 +03:00
6e0899daaf java-spring: NewlineAtEndOfFile formatting 2022-12-19 11:49:15 +03:00
a5d459a744 java-spring: ParenPad formatting 2022-12-19 11:43:41 +03:00
dcb48f3849 java-spring: VisibilityModifier formatting 2022-12-19 11:36:09 +03:00
c8b3ed761e java-spring: WhitespaceAround formatting 2022-12-19 11:23:28 +03:00
01c8b23d1d java-spring: suppress HideUtilityClassConstructor 2022-12-16 16:32:16 +03:00
bf9373842b java-spring: added checkstyle-suppressions.xml 2022-12-16 16:30:19 +03:00
7eaf4f5ae7 java-spring: SimplifyBooleanExpression formatting 2022-12-16 16:22:22 +03:00
e09f258f25 java-spring: EqualsHashCode formatting 2022-12-16 16:16:17 +03:00
054e144d93 java-spring: EmptyStatement formatting 2022-12-16 16:12:00 +03:00
3b698eb974 java-spring: RightCurly formatting 2022-12-16 16:11:11 +03:00
c356d952be java-spring: LeftCurly formatting 2022-12-16 16:04:04 +03:00
b1f3704624 java-spring: NeedBraces formatting 2022-12-16 15:47:51 +03:00
1dd545dc9c java-spring: removed nested blocks 2022-12-16 15:07:25 +03:00
1f6dfb0677 java-spring: removed unused imports 2022-12-16 15:03:26 +03:00
b59874f54b java-spring: updated maven-checkstyle-plugin to 3.2.0 2022-12-16 14:46:43 +03:00
4d9f02c606 java-spring: used oracle rules for linter 2022-12-16 14:37:13 +03:00
c344a1d6a6 Merge branch 'feature/referenceData' into release/v7.3.0
# Conflicts:
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/nodejs/views/config.ejs
2022-12-15 17:24:42 +03:00
a53f36eca3 nodejs: referenceData 2022-12-15 17:22:30 +03:00
ca49e5bdda build(deps): bump loofah in /web/documentserver-example/ruby
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.19.0 to 2.19.1.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.19.0...v2.19.1)

---
updated-dependencies:
- dependency-name: loofah
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 20:48:42 +00:00
4882459f51 Merge branch 'feature/referenceData' into release/v7.3.0
# Conflicts:
#	web/documentserver-example/nodejs/app.js
2022-12-13 16:28:15 +03:00
0a0f5b556c nodejs: referenceData 2022-12-13 16:27:18 +03:00
fdefc25479 Merge branch 'release/v7.3.0' into feature/putRelativeFile
# Conflicts:
#	web/documentserver-example/nodejs/views/wopiIndex.ejs
2022-12-12 17:34:05 +03:00
2502c2a979 Merge branch 'develop' into release/v7.3.0 2022-12-12 17:31:17 +03:00
be85920ce4 nodejs: rename wopi icons 2022-12-12 17:30:24 +03:00
7d7c10b3bc nodejs: update wopi editnew icon 2022-12-12 17:26:34 +03:00
1cbc6eca2e nodejs: wopi embedview icon 2022-12-12 17:25:10 +03:00
df83585352 nodejs: putRelativeFile to changelog 2022-12-09 14:37:35 +03:00
6979ec815e Merge remote-tracking branch 'remotes/origin/release/v7.3.0' into feature/putRelativeFile
# Conflicts:
#	web/documentserver-example/nodejs/views/wopiIndex.ejs
2022-12-09 14:36:02 +03:00
d007b0a969 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.3.0 2022-12-09 14:34:36 +03:00
63f032d924 nodejs: revert editnew for existing file (ee46a77684) 2022-12-09 14:34:19 +03:00
96a9dd7990 [wopi] proper putRelativeFile realizaion 2022-12-09 13:35:45 +03:00
91d8fc2487 [wopi] Add putRelativeFile handler 2022-12-09 13:35:12 +03:00
ae64081f97 nodejs: convert icon 2022-12-09 11:44:06 +03:00
820cafe202 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.3.0 2022-12-09 11:24:36 +03:00
e0d7e416d3 nodejs: format condition 2022-12-09 11:23:33 +03:00
806aba967c csharp: replace equal("") 2022-12-09 10:45:41 +03:00
3ec226109e Merge remote-tracking branch 'remotes/origin/feature/referenceData' into release/v7.3.0 2022-12-01 12:14:12 +03:00
b1f0fa6ecc nodejs: referenceData 2022-12-01 11:55:32 +03:00
b02ffff33e nodejs: do not send link in referenceData 2022-12-01 11:17:49 +03:00
f74f0ba376 Merge branch 'develop' into release/v7.3.0
# Conflicts:
#	.github/workflows/lint-python.yml
#	.github/workflows/lint-ruby.yml
#	CHANGELOG.md
#	web/documentserver-example/nodejs/app.js
2022-12-01 10:54:40 +03:00
96d3bf2e63 Merge remote-tracking branch 'remotes/origin/master' into develop
# Conflicts:
#	.github/workflows/lint-python.yml
#	.github/workflows/lint-ruby.yml
2022-12-01 10:49:29 +03:00
daf4f62acd nodejs: normal wopi url after release v7.1 (fd456f59e8) 2022-12-01 10:46:35 +03:00
ade8a07e95 nodejs: fix wopi after restart 2022-12-01 10:46:34 +03:00
8b613627d1 ci: github actions 2022-12-01 10:46:34 +03:00
3d3a10005c lang to changelog 2022-12-01 10:46:34 +03:00
801c451899 tooltip to changelog 2022-12-01 10:46:34 +03:00
df034c2af2 csharp-mvc: fixed tooltip 2022-12-01 10:46:33 +03:00
9726c06c84 csharp: fixed tooltip 2022-12-01 10:46:33 +03:00
3a45e1b0f3 python: fixed tooltip 2022-12-01 10:46:33 +03:00
ed8d0194b7 ruby: fixed tooltip 2022-12-01 10:46:32 +03:00
a59da2d5df php: fixed tooltip 2022-12-01 10:46:32 +03:00
f5c9a9e924 java: fixed tooltip 2022-12-01 10:46:32 +03:00
7b12b970c0 java-spring: fixed tooltip 2022-12-01 10:46:32 +03:00
87a11c8633 ruby: deleting uid cookie 2022-12-01 10:46:31 +03:00
01e0cefae5 ruby: deleting uid cookie 2022-12-01 10:46:31 +03:00
98d42249fa node: added fake language 2022-12-01 10:46:31 +03:00
fd9454dd5f csharp: added fake language 2022-12-01 10:46:30 +03:00
fbf4153dea csharp-mvc: added fake language 2022-12-01 10:46:30 +03:00
83b0411a4d php: added fake language 2022-12-01 10:46:30 +03:00
c60e4e25e2 python: added fake language 2022-12-01 10:46:30 +03:00
4ebbecf580 ruby: added fake language 2022-12-01 10:46:29 +03:00
6dbf383e2d java-spring: added fake language 2022-12-01 10:46:29 +03:00
1012bf13a6 java: added fake language 2022-12-01 10:46:29 +03:00
a24e081564 php: added request timeout for download 2022-12-01 10:46:28 +03:00
187ee212a9 csharp-mvc: added request timeout for download 2022-12-01 10:46:28 +03:00
106d9bfed3 csharp: added request timeout for download 2022-12-01 10:46:28 +03:00
13e243f900 python: added request status check for file 2022-12-01 10:46:28 +03:00
4ccc3fa35e ruby: added request status check for file 2022-12-01 10:46:27 +03:00
be1fa2da14 java: added request status check for file 2022-12-01 10:46:27 +03:00
b6645427a8 java-spring: added request status check for file 2022-12-01 10:46:27 +03:00
39d7c366e3 nodejs: init type argument (fix ab03bb5490) 2022-12-01 10:46:26 +03:00
075f464701 fix changelog about directUrl task 2022-12-01 10:46:26 +03:00
9414dff70c Change CHANGELOG.md 2022-12-01 10:46:26 +03:00
05b8989a87 csharp: option to send directUrl 2022-12-01 10:46:26 +03:00
43b6f53652 csharp-mvc: fix label for aspx 2022-12-01 10:46:25 +03:00
c22c0d72aa Change CHANGELOG.md 2022-12-01 10:46:25 +03:00
d61c112aa2 Change CHANGELOG.md 2022-12-01 10:46:25 +03:00
ae3def67f5 python: option to send directUrl 2022-12-01 10:46:24 +03:00
7c22ba4e9e csharp-mvc: option to send directUrl 2022-12-01 10:46:24 +03:00
320881f1cf Change CHANGELOG.md 2022-12-01 10:46:24 +03:00
90c31eb887 php: option to send directUrl 2022-12-01 10:46:24 +03:00
702d0f1aa8 Change CHANGELOG.md 2022-12-01 10:46:23 +03:00
dbf1047f29 ruby: option to send directUrl 2022-12-01 10:46:23 +03:00
0d27d142d4 Change CHANGELOG.md 2022-12-01 10:46:23 +03:00
807cbbf236 java: option to send directUrl 2022-12-01 10:46:23 +03:00
e6b0bfd0be Change CHANGELOG.md 2022-12-01 10:46:22 +03:00
943d059c7c java-spring: fix option to send directUrl 2022-12-01 10:46:22 +03:00
399ab0714d java-spring: option to send directUrl 2022-12-01 10:46:22 +03:00
8cabbe9c71 java-spring: tooltip fix 2022-12-01 10:46:21 +03:00
e40b6b2e28 java-spring: option to send directUrl 2022-12-01 10:46:21 +03:00
0a390094e5 java-spring: option to send directUrl 2022-12-01 10:46:21 +03:00
f7bb668f8b Merge pull request #317 from ONLYOFFICE/feature/fix-linter
Feature/fix linter
2022-12-01 09:52:11 +03:00
808712ad34 fix: rubocop 2022-12-01 09:48:00 +03:00
2b0ba914dc fix: pylint 2022-12-01 09:48:00 +03:00
249adaab48 fix: java linter 2022-12-01 09:48:00 +03:00
ee99a80ead fix: nodejs eslint 2022-12-01 09:48:00 +03:00
d61fdaaa53 nodejs: normal wopi url after release v7.1 (fd456f59e8) 2022-11-30 11:04:27 +03:00
270cbee160 nodejs: fix wopi after restart 2022-11-30 10:37:34 +03:00
e9721dd655 ci: github actions 2022-11-29 13:14:57 +03:00
a31a24a871 Merge pull request #313 from ONLYOFFICE/feature/actions
feature/actions
2022-11-29 13:13:50 +03:00
df0e197cb5 Merge pull request #315 from ONLYOFFICE/feature/fake-language
Feature/fake language
2022-11-28 16:53:24 +03:00
09802afc6f lang to changelog 2022-11-28 16:52:06 +03:00
1c43679d87 Merge remote-tracking branch 'remotes/origin/develop' into feature/fake-language 2022-11-28 16:50:53 +03:00
573eeb6e18 node: added fake language 2022-11-28 16:49:47 +03:00
78cf6c35f8 csharp: added fake language 2022-11-28 16:49:47 +03:00
c7f5003d69 csharp-mvc: added fake language 2022-11-28 16:49:46 +03:00
19baff4340 php: added fake language 2022-11-28 16:49:46 +03:00
cc5c912658 Merge pull request #312 from ONLYOFFICE/bugfix/tooltip-fix
Bugfix/tooltip fix
2022-11-28 16:34:22 +03:00
64f2d605c2 tooltip to changelog 2022-11-28 16:33:43 +03:00
c9fca685bf Merge pull request #311 from ONLYOFFICE/bugfix/delete-uid-cookie
ruby: deleting uid cookie
2022-11-28 16:22:37 +03:00
820883a584 python: added fake language 2022-11-24 13:15:33 +03:00
05a00a33a3 ruby: added fake language 2022-11-24 13:14:19 +03:00
613cb713cc java-spring: added fake language 2022-11-24 13:13:45 +03:00
9216ff3a97 java: added fake language 2022-11-24 13:12:51 +03:00
dbaa7c5113 Merge pull request #310 from ONLYOFFICE/bugfix/file-request-status
Bugfix/file request status
2022-11-21 13:25:47 +03:00
d6ad145111 nodejs: init type argument (fix ab03bb5490) 2022-11-18 13:51:11 +03:00
456df162e6 ci: github actions 2022-11-16 17:53:02 +05:00
50fd47cf7c csharp-mvc: fixed tooltip 2022-11-15 14:33:15 +03:00
f9c0da1696 csharp: fixed tooltip 2022-11-15 14:31:57 +03:00
a7807513c6 python: fixed tooltip 2022-11-15 13:55:25 +03:00
128430d698 ruby: fixed tooltip 2022-11-15 13:52:52 +03:00
8077a66f16 php: fixed tooltip 2022-11-15 13:51:15 +03:00
b3d8695a26 java: fixed tooltip 2022-11-15 13:23:24 +03:00
00872758ee java-spring: fixed tooltip 2022-11-15 13:00:15 +03:00
3301c24de5 ruby: deleting uid cookie 2022-11-15 12:09:03 +03:00
dd0c049a70 ruby: deleting uid cookie 2022-11-15 10:55:02 +03:00
44fb3a089c php: added request timeout for download 2022-11-11 14:58:36 +03:00
513bf99adb csharp-mvc: added request timeout for download 2022-11-11 12:23:39 +03:00
6f92633ef8 csharp: added request timeout for download 2022-11-11 12:23:28 +03:00
b67e768dce python: added request status check for file 2022-11-10 19:07:17 +03:00
751a886bfa ruby: added request status check for file 2022-11-10 19:06:29 +03:00
66ea4b144b java: added request status check for file 2022-11-10 19:05:32 +03:00
7a73422231 java-spring: added request status check for file 2022-11-10 19:04:49 +03:00
5319e18fb5 Merge pull request #309 from ONLYOFFICE/release/1.4.0
Release/1.4.0
2022-11-08 16:37:37 +03:00
93accdac7c nodejs: do not send key in referenceData 2022-11-08 16:33:19 +03:00
def268f5f2 Merge remote-tracking branch 'remotes/origin/release/1.4.0' into develop 2022-11-08 10:42:00 +03:00
6054bffb3f Merge pull request #305 from ONLYOFFICE/dependabot/maven/web/documentserver-example/java-spring/com.fasterxml.jackson.core-jackson-databind-2.13.4.1
build(deps): bump jackson-databind from 2.12.6.1 to 2.13.4.1 in /web/documentserver-example/java-spring
2022-11-08 10:31:57 +03:00
a7c917db3f Merge remote-tracking branch 'remotes/origin/release/1.4.0' into develop 2022-11-08 09:18:02 +03:00
30481005a1 removed enum Language (Fix Bug 59624) 2022-11-08 09:17:30 +03:00
5544768500 set language from cookies (Fix Bug 59352) 2022-11-08 09:17:22 +03:00
14e53970c8 update pyjwt=2.6.0 (Fix Bug 59369) 2022-11-08 09:16:37 +03:00
82efd0f18a fix 848cfb20bc 2022-11-07 14:23:01 +03:00
8ce90d89ed removed enum Language (Fix Bug 59624) 2022-11-07 13:07:34 +03:00
2b184972dc Merge pull request #306 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.13.9
build(deps): bump nokogiri from 1.13.8 to 1.13.9 in /web/documentserver-example/ruby
2022-11-03 14:46:55 +03:00
0fb9da4d89 update pom.xml 2022-11-03 14:11:05 +03:00
9277d3de58 Merge branch 'feature/optionDirectUrl' into develop 2022-11-03 13:34:47 +03:00
baf7a1e5dd fix changelog about directUrl task 2022-11-03 13:34:15 +03:00
e2a14a74db Merge pull request #308 from ONLYOFFICE/feature/optionDirectUrl
Feature/option direct url
2022-11-03 13:33:20 +03:00
848cfb20bc set language from cookies (Fix Bug 59352) 2022-11-03 12:05:53 +03:00
ddd3ec82a8 update pyjwt=2.6.0 (Fix Bug 59369) 2022-11-03 10:47:39 +03:00
0ed08fd7b2 Change CHANGELOG.md 2022-11-02 14:58:12 +03:00
e1c5907003 csharp: option to send directUrl 2022-11-02 14:54:33 +03:00
9dd2d7c0db csharp-mvc: fix label for aspx 2022-11-02 14:49:40 +03:00
8f0cbb78af Change CHANGELOG.md 2022-11-02 13:10:39 +03:00
72e48914aa Merge branch 'feature/optionDirectUrl' of https://github.com/ONLYOFFICE/document-server-integration into feature/optionDirectUrl 2022-11-02 13:05:45 +03:00
82a282029a csharp-mvc: option to send directUrl 2022-11-02 13:05:08 +03:00
9b7c12b5c0 Change CHANGELOG.md 2022-11-01 23:10:46 +03:00
6ea5546099 python: option to send directUrl 2022-11-01 23:09:36 +03:00
92fbd1e293 Change CHANGELOG.md 2022-10-28 16:48:05 +03:00
855c1ed9f9 php: option to send directUrl 2022-10-28 16:47:08 +03:00
7e60ec15fd Change CHANGELOG.md 2022-10-28 13:56:28 +03:00
3697a4a888 ruby: option to send directUrl 2022-10-28 13:55:48 +03:00
0b8107d167 Change CHANGELOG.md 2022-10-28 13:52:11 +03:00
885850ee33 java: option to send directUrl 2022-10-27 14:32:21 +03:00
98c61250a6 Change CHANGELOG.md 2022-10-26 16:54:16 +03:00
457487844c java-spring: fix option to send directUrl 2022-10-26 16:47:43 +03:00
ff72956b68 java-spring: option to send directUrl 2022-10-26 16:41:59 +03:00
1593df6aec build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.8 to 1.13.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.8...v1.13.9)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 10:46:51 +00:00
cda8a86c2a Merge remote-tracking branch 'remotes/origin/release/1.4.0' into develop 2022-10-26 13:40:30 +03:00
16584c0abb Merge remote-tracking branch 'remotes/origin/hotfix/1.3.1' into release/1.4.0
# Conflicts:
#	CHANGELOG.md
#	web/documentserver-example/csharp/settings.config
#	web/documentserver-example/ruby/config/application.rb
2022-10-26 13:39:29 +03:00
1ddda89001 Merge pull request #307 from ONLYOFFICE/hotfix/1.3.1
Hotfix/1.3.1
2022-10-26 13:37:19 +03:00
5b76d798fb 1.3.1 2022-10-26 13:28:18 +03:00
e96200df85 java-spring: tooltip fix 2022-10-26 11:53:50 +03:00
de75b11e18 java-spring: option to send directUrl 2022-10-26 11:48:11 +03:00
f27afe1535 java-spring: option to send directUrl 2022-10-25 19:44:39 +03:00
59e17079ff build(deps): bump jackson-databind
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.6.1 to 2.13.4.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-19 07:08:15 +00:00
1bdb3c03bc Merge remote-tracking branch 'remotes/origin/feature/referenceData' into develop 2022-10-14 10:22:24 +03:00
111dc14f2b nodejs: referenceData 2022-10-14 10:20:45 +03:00
4a656c025f 1.4.0 2022-10-14 10:12:48 +03:00
ce9930e5bc java-spring: fixed footer positioning 2022-10-12 11:12:59 +03:00
9da22d7803 java-spring: fixed sorting of the list of languages 2022-10-12 11:00:01 +03:00
d78c677c99 java: fixed sorting of the list of languages 2022-10-12 10:59:41 +03:00
b204142c13 csharp: include assets 2022-10-11 18:04:21 +03:00
fd1c26ab9f csharp-mvc: reload refs 2022-10-11 17:53:14 +03:00
5993d10bee csharp-mvc: fix ref 2022-10-11 17:23:16 +03:00
c5771c9008 sharp-mvc: Fix merge 24aee6d194 2022-10-11 17:22:49 +03:00
2fad227272 Merge remote-tracking branch 'remotes/origin/release/v7.2.0' into develop 2022-10-05 13:33:43 +03:00
ada438ff0b Merge remote-tracking branch 'remotes/origin/develop' into release/v7.2.0 2022-09-28 09:13:23 +03:00
0dbd65a577 ruby: rails 7.0.3.1 2022-09-27 19:03:26 +03:00
48e5b8d4e0 Merge pull request #304 from ONLYOFFICE/dependabot/nuget/web/documentserver-example/csharp/Newtonsoft.Json-13.0.1
build(deps): bump Newtonsoft.Json from 10.0.3 to 13.0.1 in /web/documentserver-example/csharp
2022-09-27 18:26:31 +03:00
7f08a96681 Merge remote-tracking branch 'remotes/origin/develop' into dependabot/nuget/web/documentserver-example/csharp/Newtonsoft.Json-13.0.1
# Conflicts:
#	web/documentserver-example/csharp/packages.config
2022-09-27 18:26:07 +03:00
3549b4bc2a csharp: Newtonsoft.Json update 2022-09-27 18:24:53 +03:00
c9265d9ddc csharp-mvc: fix dep path 2022-09-27 18:08:47 +03:00
44d9ca88c6 build(deps): bump Newtonsoft.Json in /web/documentserver-example/csharp
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 10.0.3 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/10.0.3...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-27 14:59:15 +00:00
d964b43087 Merge pull request #303 from ONLYOFFICE/develop
Release/v1.3.0
2022-09-27 17:58:46 +03:00
5a0debd9e8 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.2.0 2022-09-27 17:55:26 +03:00
3b0f942eee Merge pull request #302 from ONLYOFFICE/feature/ruby-3.0.0
support ruby v.3
2022-09-27 17:54:59 +03:00
4ee110c2d5 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.2.0
# Conflicts:
#	web/documentserver-example/nodejs/views/config.ejs
#	web/documentserver-example/ruby/app/models/document_helper.rb
2022-09-15 17:17:24 +03:00
ad1d93dd20 Merge pull request #301 from ONLYOFFICE/bugfix/file-request
added request status check for file
2022-09-15 14:43:19 +03:00
d2d98df5ab support ruby v.3 2022-09-01 16:56:38 +03:00
7805f7dc91 added request status check for file 2022-09-01 09:34:30 +03:00
51ec27d67c nodejs: removed trailing comma 2022-08-25 15:47:10 +03:00
9e94716df0 nodejs: reorder config items 2022-08-16 10:15:39 +03:00
988a8339b1 ruby: ERB::Util.url instead URI::encode 2022-08-15 11:10:02 +03:00
a482635e3f Merge branch 'feature/directUrl' into release/v7.2.0 2022-08-03 12:20:57 +03:00
d2c679f6b1 nodejs: option to send directUrl 2022-08-03 12:20:39 +03:00
1da452d857 Merge branch 'feature/directUrl' into release/v7.2.0 2022-08-03 12:20:18 +03:00
d9b8d2b7e9 directUrl to changelog 2022-08-03 12:14:16 +03:00
24aee6d194 Merge branch 'release/v7.2.0' into feature/directUrl
# Conflicts:
#	web/documentserver-example/csharp-mvc/Helpers/DocManagerHelper.cs
#	web/documentserver-example/csharp/DocEditor.aspx.cs
2022-08-03 12:13:12 +03:00
bd108a9c77 fix changelog 2022-08-03 12:11:01 +03:00
e737e8ed48 Merge remote-tracking branch 'remotes/origin/develop' into release/v7.2.0 2022-08-03 12:10:20 +03:00
b425d15f0a Merge branch 'feature/tooltip' into develop 2022-08-03 12:09:47 +03:00
0f8dec1e6e nodejs: revert tooltip for language (e1753a154d) 2022-08-03 12:08:10 +03:00
193b31fe75 nodejs: id to info block 2022-08-03 11:59:58 +03:00
583403cf78 update empty files (Fix Bug 58202) 2022-08-02 16:50:01 +03:00
641e45e24f 1.3.0 2022-08-02 15:35:18 +03:00
53c30fbb7d Merge branch 'develop' into release/v7.2.0
# Conflicts:
#	CHANGELOG.md
#	web/documentserver-example/csharp-mvc/Helpers/Users.cs
#	web/documentserver-example/csharp/Users.cs
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/ExampleData.java
#	web/documentserver-example/java/src/main/java/helpers/Users.java
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/nodejs/helpers/users.js
#	web/documentserver-example/php/users.php
#	web/documentserver-example/python/src/utils/users.py
#	web/documentserver-example/ruby/app/models/users.rb
2022-08-02 15:04:09 +03:00
87a1755729 Merge pull request #300 from ONLYOFFICE/feature/ruby-bundle-update
ruby: bundle update
2022-08-02 14:32:40 +03:00
752a2a2364 Merge pull request #298 from ONLYOFFICE/fix/notification-incorrect-file-size
Fix/notification incorrect file size
2022-08-02 14:32:40 +03:00
d1affa2911 Merge pull request #297 from ONLYOFFICE/feature/refactoring-jwt-manager
Feature/refactoring jwt manager
# Conflicts:
#	CHANGELOG.md
2022-08-02 14:32:31 +03:00
0ef2a4f3fd Merge pull request #292 from ONLYOFFICE/Build(deps)/bot-recommendations
changes - ruby - raise gem version
2022-08-02 14:25:18 +03:00
675d3f318a Merge pull request #294 from ONLYOFFICE/dependabot/nuget/web/documentserver-example/csharp-mvc/Newtonsoft.Json-13.0.1
build(deps): bump Newtonsoft.Json from 12.0.3 to 13.0.1 in /web/documentserver-example/csharp-mvc
2022-08-02 14:25:18 +03:00
05512ffa23 Merge pull request #288 from ONLYOFFICE/feature/localhost-for-client
Localhost for client urls
2022-08-02 14:25:17 +03:00
2eeed5d26d Fix #287 Fix #285 Fix #284 Fix #280
Build(deps)/bot recommendations
2022-08-02 14:24:11 +03:00
9e3dbd5eb5 Merge pull request #290 from ONLYOFFICE/fix/php-convert-manager
fix - php - add substrings to string
2022-08-02 14:21:09 +03:00
efbab7c113 nodejs: fix embed link for client request 2022-08-02 14:20:48 +03:00
b8f0f6447c nodejs: remove getlocalFileUri 2022-08-02 14:20:48 +03:00
8779a90433 nodejs: fix history url for server request 2022-08-02 14:20:48 +03:00
b3162ee410 Merge pull request #278 from ONLYOFFICE/dependabot/maven/web/documentserver-example/java-spring/com.fasterxml.jackson.core-jackson-databind-2.12.6.1
build(deps): bump jackson-databind from 2.12.2 to 2.12.6.1 in /web/documentserver-example/java-spring
2022-08-02 14:18:23 +03:00
42edd5e208 Merge pull request #276 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.13.4
build(deps): bump nokogiri from 1.12.5 to 1.13.4 in /web/documentserver-example/ruby
2022-08-02 14:18:23 +03:00
e041baeef7 Merge branch 'feature/extension-on-rename' into develop 2022-08-02 14:18:22 +03:00
5bf682a007 nodejs: package lock 2022-08-02 14:18:22 +03:00
6dacf49faa ruby: fix (23e616aade) 2022-08-02 14:18:22 +03:00
63c9c4242e Merge pull request #291 from ONLYOFFICE/feature/chat
Feature/chat
# Conflicts:
#	CHANGELOG.md
2022-08-02 14:18:21 +03:00
b5e345ed50 Merge branch 'feature/chat' into develop 2022-08-02 14:18:21 +03:00
33f8436d42 changelog 2022-08-02 14:18:20 +03:00
c5217242ab Merge pull request #300 from ONLYOFFICE/feature/ruby-bundle-update
ruby: bundle update
2022-08-01 14:34:39 +03:00
c910d5193b Merge remote-tracking branch 'remotes/origin/dependabot/bundler/web/documentserver-example/ruby/rails-html-sanitizer-1.4.3' into feature/ruby-bundle-update
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2022-08-01 14:34:05 +03:00
58c27f8f2f ruby: bundle update 2022-08-01 12:56:57 +03:00
1ec831789b Merge pull request #298 from ONLYOFFICE/fix/notification-incorrect-file-size
Fix/notification incorrect file size
2022-07-29 17:37:36 +03:00
0510fd1354 [fix] - node.js - don't send file size limit to incoming form
Revert "nodejs: upload big file"
This reverts commit fa4c3e3258.
2022-07-29 17:31:22 +03:00
25238b5614 Merge pull request #293 from ONLYOFFICE/feature/liveview
Feature/liveview
2022-07-29 17:23:48 +03:00
901bb61883 Merge remote-tracking branch 'remotes/origin/develop' into feature/liveview
# Conflicts:
#	CHANGELOG.md
2022-07-29 17:21:54 +03:00
7f3e6c6364 Merge pull request #291 from ONLYOFFICE/feature/chat
Feature/chat
2022-07-29 17:18:24 +03:00
b3512ea0ce Merge remote-tracking branch 'remotes/origin/develop' into feature/chat
# Conflicts:
#	CHANGELOG.md
2022-07-29 17:16:54 +03:00
642a1bd19a Merge pull request #297 from ONLYOFFICE/feature/refactoring-jwt-manager
Feature/refactoring jwt manager
2022-07-29 17:13:08 +03:00
ac471588de jwt to changelog 2022-07-29 17:12:20 +03:00
17674ef5bc ruby: licenses 2022-07-29 17:12:12 +03:00
dc2ee2a997 php: jwt 2022-07-29 17:12:02 +03:00
c358fa814a csharp-mvc: jwt 2022-07-29 17:11:05 +03:00
143a73e083 csharp: jwt 2022-07-29 17:10:37 +03:00
c266592434 Merge pull request #292 from ONLYOFFICE/Build(deps)/bot-recommendations
changes - ruby - raise gem version
2022-07-29 11:55:36 +03:00
19ed666d56 Merge pull request #294 from ONLYOFFICE/dependabot/nuget/web/documentserver-example/csharp-mvc/Newtonsoft.Json-13.0.1
build(deps): bump Newtonsoft.Json from 12.0.3 to 13.0.1 in /web/documentserver-example/csharp-mvc
2022-07-29 11:53:18 +03:00
84b9202af0 Merge pull request #288 from ONLYOFFICE/feature/localhost-for-client
Localhost for client urls
2022-07-29 11:51:09 +03:00
8fb698bb75 Basque (Spain), Armenian and Malay (Malaysia) lang 2022-07-29 11:38:25 +03:00
00f46ef080 build(deps): bump rails-html-sanitizer
Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/rails/rails-html-sanitizer/releases)
- [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.4.2...v1.4.3)

---
updated-dependencies:
- dependency-name: rails-html-sanitizer
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-06 12:11:57 +00:00
5c194da95d [add] - java - directUrl 2022-07-04 19:46:34 +03:00
0d5cebe28e [add] - java spring - directUrl 2022-07-04 19:45:37 +03:00
dacf72cae2 [add] - csharp mvc - directUrl 2022-07-01 19:29:52 +03:00
208b8926be [add] - csharp - directUrl 2022-07-01 19:28:55 +03:00
55c4853f04 [add] - php - directUrl 2022-07-01 17:30:18 +03:00
ccae7c6a06 [add] - python - directUrl 2022-06-30 20:29:04 +03:00
dc84dd3b29 [add] - ruby - fix 2022-06-30 19:53:44 +03:00
65d3671b09 [add] - ruby - directUrl 2022-06-30 19:15:15 +03:00
1fb5ef8bfd build(deps): bump Newtonsoft.Json
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/12.0.3...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-23 00:47:07 +00:00
b630c3802b fix - ruby - coEditing from permissions to editorConfig 2022-06-16 16:56:18 +03:00
ad3993b532 fix - ruby - coEditing from permissions to editorConfig 2022-06-16 16:52:51 +03:00
35ee61e011 fix - python - checking mode view insert edit 2022-06-16 16:48:01 +03:00
ee59ab3dfd fix - python - coEditing from permissions to editorConfig 2022-06-16 16:43:48 +03:00
500f076e38 fix - csharp - coEditing from permissions to editorConfig 2022-06-16 16:36:51 +03:00
e578f29d9d fix - csharp mvc - coEditing from permissions to editorConfig 2022-06-16 16:35:57 +03:00
9de9bc90a4 fix - java - checking mode view insert edit 2022-06-16 16:32:36 +03:00
7a9ebdbbe5 fix - java - coEditing from permissions to editorConfig 2022-06-16 16:26:03 +03:00
887089bcad add - java spring - anonymous without liveview 2022-06-16 16:11:29 +03:00
680e53823a add - java - anonymous without liveview 2022-06-15 21:08:18 +03:00
33e1489cd6 add - charp mvc - anonymous without liveview 2022-06-15 20:41:32 +03:00
8c90737bf6 add - charp - anonymous without liveview 2022-06-15 20:38:16 +03:00
e5f1bc8ed6 add - php - anonymous without liveview 2022-06-15 20:23:52 +03:00
985b179475 add - python - anonymous without liveview 2022-06-15 20:03:07 +03:00
775d15132f add - ruby - json transform 2022-06-15 19:39:00 +03:00
4a4298ca10 add - ruby - anonymous without liveview 2022-06-15 19:30:36 +03:00
cdbd264ed5 Merge branch 'feature/chat' into feature/liveview
# Conflicts:
#	CHANGELOG.md
2022-06-15 19:21:30 +03:00
e61f6cae89 changes - ruby - raise gem version 2022-06-15 19:10:58 +03:00
22039078ef Merge remote-tracking branch 'remotes/origin/develop' into feature/chat 2022-06-15 18:38:12 +03:00
62793a42ab add - java spring - anonymous without permissions.chat 2022-06-15 18:09:14 +03:00
f49f96a2c2 add - java - anonymous without permissions.chat 2022-06-14 20:16:06 +03:00
2031d65adb add - csharp mvc - anonymous without permissions.chat 2022-06-14 19:53:12 +03:00
7f54659d3b add - csharp - anonymous without permissions.chat 2022-06-14 19:50:44 +03:00
a3bc13bb6e add - php - anonymous without permissions.chat 2022-06-14 19:45:46 +03:00
29ea16c124 add - python - anonymous without permissions.chat 2022-06-14 19:37:42 +03:00
6d4c8b926e add - ruby - anonymous without permissions.chat 2022-06-14 19:25:53 +03:00
22d2031426 fix - csharp - replace with regex 2022-06-14 18:10:18 +03:00
fcc51e8154 fix - csharp-mvc - check if '/' exist + replace with regex 2022-06-14 18:08:46 +03:00
8cd85ad63c Fix #287 Fix #285 Fix #284 Fix #280
Build(deps)/bot recommendations
2022-06-14 17:20:47 +03:00
1d51688884 Merge pull request #290 from ONLYOFFICE/fix/php-convert-manager
fix - php - add substrings to string
2022-06-14 17:05:02 +03:00
2c63a85b00 fix - php - add substrings to string 2022-06-14 16:55:12 +03:00
d1545c4db4 csharp-mvc-fix folder display for localhost 2022-06-10 18:37:17 +03:00
bd8e4d6ec7 csharp-fix goback 2022-06-10 18:31:22 +03:00
e1c815b574 Fix folder display for localhost 2022-06-10 18:29:44 +03:00
4042d2bb8a Merge remote-tracking branch 'remotes/origin/dependabot/maven/web/documentserver-example/java-spring/com.google.code.gson-gson-2.8.9' into build(deps)/bot-recommendations 2022-06-10 16:14:14 +03:00
8c9d2d80bd Merge remote-tracking branch 'remotes/origin/dependabot/maven/web/documentserver-example/java/com.google.code.gson-gson-2.8.9' into build(deps)/bot-recommendations 2022-06-10 16:13:53 +03:00
3a9259d713 Merge remote-tracking branch 'remotes/origin/dependabot/bundler/web/documentserver-example/ruby/rack-2.2.3.1' into build(deps)/bot-recommendations
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2022-06-10 16:13:02 +03:00
39129a537e Merge remote-tracking branch 'remotes/origin/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.13.6' into build(deps)/bot-recommendations
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2022-06-10 16:07:32 +03:00
dfaf552bf8 ruby-fix - use client URL in goBack 2022-06-09 19:30:43 +03:00
cc8b6f3716 nodejs: directUrl 2022-06-09 13:23:43 +03:00
13726b3c2f nodejs: fix embed link for client request 2022-06-09 13:18:06 +03:00
8bcc15e320 nodejs: remove getlocalFileUri 2022-06-09 13:07:02 +03:00
8fca045dd7 nodejs: fix history url for server request 2022-06-09 12:15:04 +03:00
a018cc5787 Merge remote-tracking branch 'remotes/origin/master' into develop 2022-06-03 11:09:35 +03:00
054236ef8a build(deps): bump rack in /web/documentserver-example/ruby
Bumps [rack](https://github.com/rack/rack) from 2.2.3 to 2.2.3.1.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.3...2.2.3.1)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-27 16:45:08 +00:00
05a3110c99 Remove workflow and disable build nodejs docker (#286)
* Remove workflow and disable build

* Remove Dockerfile
2022-05-27 15:34:59 +03:00
e662c765e6 build(deps): bump gson in /web/documentserver-example/java-spring
Bumps [gson](https://github.com/google/gson) from 2.8.5 to 2.8.9.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.5...gson-parent-2.8.9)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 22:07:08 +00:00
058bb0d2e2 build(deps): bump gson in /web/documentserver-example/java
Bumps [gson](https://github.com/google/gson) from 2.8.5 to 2.8.9.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.5...gson-parent-2.8.9)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 20:58:39 +00:00
8bafa3ff3a Add submodule-init (#283) 2022-05-19 17:02:51 +03:00
56679a3b75 Change target repo (#282)
* Change target repo

* Add latest tag
2022-05-19 15:59:11 +03:00
d4d758770f Add docs-example multiarch build (#281)
* Add multiarch build

* Cosmetic changes

* Cosmetic changes
2022-05-19 14:17:28 +03:00
ac78d1fc08 build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.3 to 1.13.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.3...v1.13.6)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 03:44:52 +00:00
874ebff886 Fix the launch of the example container (#279)
* Fix the launch of the example container

* Change the user home directory

* Change the command for create a user
2022-05-16 17:26:24 +03:00
070dac6878 Merge remote-tracking branch 'remotes/origin/master' into develop 2022-05-12 13:22:41 +03:00
4f2f877f0e docxf update 2022-05-12 13:22:15 +03:00
cfa0fb1b74 Merge pull request #278 from ONLYOFFICE/dependabot/maven/web/documentserver-example/java-spring/com.fasterxml.jackson.core-jackson-databind-2.12.6.1
build(deps): bump jackson-databind from 2.12.2 to 2.12.6.1 in /web/documentserver-example/java-spring
2022-04-25 16:57:39 +03:00
1d624e6831 Merge pull request #276 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.13.4
build(deps): bump nokogiri from 1.12.5 to 1.13.4 in /web/documentserver-example/ruby
2022-04-25 16:56:55 +03:00
fe83e98b37 Merge branch 'feature/extension-on-rename' into develop 2022-04-25 14:27:32 +03:00
f9ea7f7b50 nodejs: package lock 2022-04-25 14:27:28 +03:00
328ea46693 format 2022-04-25 14:20:41 +03:00
41ec2742a7 csharp-mvc: with ext 2022-04-25 14:06:27 +03:00
76fc55c2d4 csharp: with ext 2022-04-25 14:04:01 +03:00
e10f3962b6 java: with ext 2022-04-25 13:28:35 +03:00
b9859ef5ca java-spring: with ext 2022-04-25 12:53:28 +03:00
1cb2b586b1 ruby: with ext 2022-04-25 11:45:21 +03:00
e5d31eebbf nodejs: fix 2022-04-25 11:43:52 +03:00
1ac40c539f python: with ext 2022-04-25 11:13:09 +03:00
371366befa nodejs: with ext 2022-04-25 10:41:59 +03:00
0bee4817e7 php: with ext 2022-04-25 09:38:12 +03:00
ad941e0ba4 ruby: fix (23e616aade) 2022-04-20 10:19:34 +03:00
93c69e51ed changelog: offline viewer for anonymous 2022-04-18 15:37:45 +03:00
8b8b7d3938 Merge branch 'feature/liveview' into develop 2022-04-18 15:35:36 +03:00
f8f01a033e nodejs: anonymous without liveview 2022-04-18 15:34:18 +03:00
f497f10913 changelog: anonymous without chat 2022-04-18 15:26:44 +03:00
8b2478ac71 Merge branch 'feature/chat' into develop 2022-04-18 15:25:42 +03:00
391c347419 nodejs: anonymous without permissions.chat 2022-04-18 15:25:04 +03:00
5a08009b7b changelog: zh-TW, pt-PT 2022-04-18 15:24:31 +03:00
4e5b65f673 changelog 2022-04-18 15:23:43 +03:00
13e3d7673b Merge pull request #275 from ONLYOFFICE/feature/new-langs-7.2
added langs
2022-04-18 15:20:53 +03:00
c0a46866ce build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.5 to 1.13.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.13.4/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.5...v1.13.4)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 11:18:07 +00:00
e7b76729a4 build(deps): bump jackson-databind
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.2 to 2.12.6.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 11:17:36 +00:00
5cc6b4cb15 Merge pull request #277 from ONLYOFFICE/develop
Release/1.2.0
2022-04-18 14:16:23 +03:00
7a70a44bcb 1.2.0 2022-04-18 13:59:07 +03:00
ce2e7f97d6 added langs 2022-04-11 15:28:55 +03:00
e42bd53664 Merge pull request #274 from ONLYOFFICE/feature/languages-fix
languages sort fix
2022-04-11 10:42:55 +03:00
23e616aade languages sort fix 2022-04-11 10:38:26 +03:00
f035da0db4 nodejs: disable X-Powered-By 2022-04-05 15:16:45 +03:00
3e12ec4ebe Merge pull request #272 from ONLYOFFICE/feature/ignore-self-signed-certificate
Feature/ignore self signed certificate
2022-03-30 14:34:02 +03:00
589ca9b601 Merge branch 'develop' into feature/ignore-self-signed-certificate 2022-03-28 16:00:59 +03:00
32f1ec82d1 Merge pull request #271 from ONLYOFFICE/feature/uid-0-fix
Feature/uid 0 fix
2022-03-28 13:26:38 +03:00
54bb5b0a24 format 2022-03-28 13:26:17 +03:00
8274c16f6d Merge pull request #273 from ONLYOFFICE/feature/update-readme
Update README.md
2022-03-28 13:09:24 +03:00
7a982fc785 format 2022-03-28 13:09:13 +03:00
6f5800fbde Updated Readme files in examples 2022-03-28 12:05:45 +03:00
8ec632eebd csharp-mvc: function created 2022-03-28 10:12:46 +03:00
b6ca4535ce csharp: function created 2022-03-28 09:58:59 +03:00
089fc8bfa0 ruby: function created 2022-03-28 09:31:01 +03:00
0b4c17ea0a Update README.md 2022-03-25 17:57:11 +03:00
405be2847b java-spring: ignoring self-signed certificate was added 2022-03-25 16:54:04 +03:00
f809c7e525 python: certificate ignore was added 2022-03-25 13:26:00 +03:00
44061c82a9 csharp-mvc: ignore certificate in config 2022-03-24 11:24:46 +03:00
ef4e283804 csharp: ignore certificate in config 2022-03-24 10:26:31 +03:00
4b0ad1a192 csharp + csharp-mvc 2022-03-23 16:56:41 +03:00
60469b0dba java: ignore certificate in config 2022-03-23 15:39:11 +03:00
f5ac95e1cc nodejs: ignore certificate in config 2022-03-23 15:11:30 +03:00
c4c2fbb945 ruby: certificate was ignored 2022-03-23 14:25:53 +03:00
99b5fcd562 python 2022-03-23 13:29:24 +03:00
7e34067410 java 2022-03-23 12:38:38 +03:00
a44787c625 java-spring 2022-03-23 11:11:03 +03:00
105afb2c34 php 2022-03-23 10:57:33 +03:00
002f9b958e nodejs 2022-03-23 10:53:51 +03:00
56d5913808 ruby 2022-03-23 10:48:28 +03:00
6664864bed nodejs 2022-03-22 13:52:28 +03:00
6c9e6e9304 Merge pull request #268 from ONLYOFFICE/feature/language-update
Feature/language update
2022-03-22 12:21:43 +03:00
416b1fde8c Merge pull request #270 from ONLYOFFICE/feature/hide-history-for-anonymous
Feature/hide history for anonymous
2022-03-22 11:54:12 +03:00
383f240825 Merge pull request #269 from ONLYOFFICE/feature/ban-renaming-for-anonymous
Feature/ban renaming for anonymous
2022-03-22 11:48:57 +03:00
642e145142 php: certificate was ignored 2022-03-22 11:15:09 +03:00
8f09dadfa0 ruby: java-spring: bugfix 2022-03-21 17:10:11 +03:00
495f1cf49a nodejs: split filename 2022-03-21 11:18:30 +03:00
cf01b5e0ae csharp: csharp-mvc: version history button was hidden 2022-03-21 09:38:48 +03:00
0673fed928 java: java-spring: version history button was hidden 2022-03-21 09:35:58 +03:00
9b0b30a0b0 nodejs: version history button was hidden 2022-03-21 09:32:27 +03:00
200187edce python: version history button was hidden 2022-03-21 09:29:32 +03:00
23176ddf07 ruby: version history button was hidden 2022-03-21 09:27:26 +03:00
9857cef8fc php: version history button was hidden 2022-03-21 09:22:31 +03:00
204f770401 java-spring: bugfix 2022-03-18 15:58:02 +03:00
61834e3ec6 Merge branch 'feature/language-update' of github.com:ONLYOFFICE/document-server-integration into feature/language-update 2022-03-18 15:24:45 +03:00
2ca6185ac4 php: bugfix 2022-03-18 15:24:30 +03:00
e818bb978b csharp: removed rename action for anonymous 2022-03-18 15:08:20 +03:00
3a4cf5e6e6 csharp-mvc: removed rename action for anonymous 2022-03-18 15:06:46 +03:00
7ec16b90e3 java: removed rename action for anonymous 2022-03-18 15:04:28 +03:00
fcfb6efda7 java-spring: removed rename action for anonymous 2022-03-18 15:02:45 +03:00
e4c72c98d1 nodejs: removed rename action for anonymous 2022-03-18 14:59:27 +03:00
c2bbda542a python: removed rename action for anonymous 2022-03-18 14:56:17 +03:00
2c12393c78 ruby: removed rename action for anonymous 2022-03-18 14:52:59 +03:00
4e93f6ebac php: fix 2022-03-18 14:47:59 +03:00
d10ba9f773 Merge branch 'develop' into feature/ban-renaming-for-anonymous 2022-03-18 14:40:38 +03:00
a0bf7db118 php: removed rename action 2022-03-18 14:36:46 +03:00
e40e7cc41c csharp-mvc: move languages to config 2022-03-18 11:25:54 +03:00
f616655f4c csharp: move languages to config 2022-03-18 11:14:49 +03:00
4ba708631e Merge pull request #266 from ONLYOFFICE/feature/renaming-files
Feature/renaming files
2022-03-18 10:31:19 +03:00
b9c1bc0f42 java-spring: changing arguments 2022-03-18 09:50:59 +03:00
215ade01a3 java: changing arguments 2022-03-18 09:32:34 +03:00
4d25418fc8 java: move languages to config 2022-03-17 14:05:56 +03:00
4539bac5db Merge pull request #267 from ONLYOFFICE/feature/customization
Feature/customization
2022-03-17 11:10:14 +03:00
eb196613e7 format 2022-03-17 10:36:38 +03:00
7ac788f589 csharp: jwt in body 2022-03-17 10:27:47 +03:00
55119458af java-spring: move languages to config 2022-03-17 10:14:02 +03:00
3c18add1fc Merge remote-tracking branch 'remotes/origin/release/v7.1.0' into develop 2022-03-17 09:56:20 +03:00
6bf63b7166 nodejs: move languages to config 2022-03-16 16:30:56 +03:00
32df2d3e34 php: move languages to config 2022-03-16 15:41:45 +03:00
97c7859db5 ruby: move languages to config 2022-03-16 15:32:47 +03:00
492f9c7baa python: config 2022-03-16 14:58:16 +03:00
e0c0595796 removed chat 2022-03-16 13:06:37 +03:00
40b8fb88a8 Merge branch 'feature/renaming-files' of github.com:ONLYOFFICE/document-server-integration into feature/renaming-files 2022-03-16 11:36:17 +03:00
b0df0d72df java-spring: refactoring 2022-03-16 10:48:43 +03:00
1053add1d9 csharp-mvc: refactoring 2022-03-16 09:47:49 +03:00
f1fc0e5fae csharp: refactoring 2022-03-16 09:38:30 +03:00
a192c6ce1f ruby: refactoring 2022-03-15 18:45:35 +03:00
e8aec0b68c java: php: python: refactoring 2022-03-15 18:10:02 +03:00
d9667f9757 nodejs: fix 2022-03-15 15:17:19 +03:00
3a985da120 Merge branch 'feature/renaming-files' of github.com:ONLYOFFICE/document-server-integration into feature/renaming-files 2022-03-15 14:19:34 +03:00
a88f84ddac nodejs: use commandRequest 2022-03-15 14:19:16 +03:00
6525d7210f micro fix 2022-03-15 13:33:33 +03:00
6b93311ce5 customization change 2022-03-15 13:10:34 +03:00
999561ffd6 Merge branch 'feature/renaming-files' of github.com:ONLYOFFICE/document-server-integration into feature/renaming-files 2022-03-15 10:51:43 +03:00
e539c1205f python: nodejs: jwt fix 2022-03-15 10:51:26 +03:00
9a52a538cb csharp-mvc: jwt fix 2022-03-15 08:24:11 +03:00
e8038a8e88 csharp: jwt fix 2022-03-15 08:18:34 +03:00
1045b314b6 Merge pull request #265 from ONLYOFFICE/bugfix/wopi
fix wopi
2022-03-14 17:50:35 +03:00
1636732521 nodejs: fix userHost in wopi 2022-03-14 17:48:32 +03:00
daa9a5f3fa fix wopi 2022-03-14 15:49:24 +03:00
9bf3973215 csharp-mvc: meta command 2022-03-14 14:00:05 +03:00
cad2a20cdf csharp: meta command 2022-03-14 13:41:12 +03:00
82a5a68e6c java: meta command 2022-03-11 14:59:10 +03:00
0e1a580a86 refactoring 2022-03-11 14:13:09 +03:00
c09f3fc4b9 Merge branch 'feature/renaming-files' of github.com:ONLYOFFICE/document-server-integration into feature/renaming-files 2022-03-11 11:02:39 +03:00
d4d7c4e222 java-spring: meta command 2022-03-11 10:58:54 +03:00
14429c5b05 php: rename refactoring 2022-03-11 09:45:42 +03:00
131e33c6af Merge pull request #264 from ONLYOFFICE/feature/fix-mentions
Feature/fix mentions
2022-03-10 16:19:50 +03:00
8a04e5fbc4 ruby:meta command 2022-03-09 13:50:47 +03:00
1b6435a7dc python:meta command 2022-03-08 10:50:05 +03:00
b8eecab45f nodejs:meta command 2022-03-07 22:01:03 +03:00
a55cb60542 nodejs: file download url was incorrectly formed when converting file 69d2e14438 2022-03-05 16:03:13 +03:00
f7259409a2 php:jwt 2022-03-04 14:34:50 +03:00
0ea9e68c7c meta command 2022-03-04 11:15:43 +03:00
4b72e0a664 php: add request rename in doceditor + add function renamefile() in webeditor 2022-03-03 14:34:57 +03:00
f4ae62e02d nodejs: missing line for 69d2e14438 2022-03-03 11:25:38 +03:00
935377a941 all: fix link in mentions 2022-03-02 17:42:12 +03:00
3690aacb66 nodejs: fix link in mentions 2022-03-02 17:10:41 +03:00
b8b375a19a Merge pull request #263 from ONLYOFFICE/feature/scroll
fixed scrolling due to footer : ab82be9b3d
2022-03-02 16:40:13 +03:00
69d2e14438 nodejs: fixed an issue when subfolders wouldn't create if storagefolder was set to an absolute path 2022-03-02 16:27:58 +03:00
fec77a9e75 fixed scrolling due to footer : ab82be9b3d 2022-03-02 14:30:57 +03:00
f0171cbb18 Merge pull request #262 from ONLYOFFICE/feature/anonymus-without-id
new branch + anonymus without id
2022-03-02 13:55:20 +03:00
fe49aeb815 Merge pull request #260 from ONLYOFFICE/feature/mobile-upload
Feature/mobile upload
2022-03-02 13:54:16 +03:00
8416f36581 mobile-upload:centering 2022-03-02 13:48:01 +03:00
b9f3bfd2e2 new branch + anonymus without id 2022-03-02 11:16:24 +03:00
02b22e9e26 Merge remote-tracking branch 'remotes/origin/develop' into feature/mobile-upload 2022-03-01 16:01:30 +03:00
f43f08012d Merge pull request #261 from ONLYOFFICE/budfix/php-device-display
Budfix/php device display
2022-03-01 15:58:40 +03:00
1c27610e8d Ruby - fix body display 2022-03-01 15:47:24 +03:00
148caf6225 Python - fix body display 2022-03-01 15:47:11 +03:00
b24e4503bc Java Spring - fix body display 2022-03-01 15:46:53 +03:00
58378827d4 Java - fix body display 2022-03-01 15:46:34 +03:00
502f14c7be C# mvc - fix body display 2022-03-01 15:46:15 +03:00
ded2d19672 C# - fix body display 2022-03-01 15:45:55 +03:00
6116f05625 Java - Add viewport device display on index page 2022-03-01 15:45:18 +03:00
1e2a9cf4f2 Java Spring - Add viewport device display on index page 2022-03-01 15:44:56 +03:00
1d7775f25b C# - Add viewport device display on index page 2022-03-01 15:44:00 +03:00
05c7a5a6db fix body display 2022-03-01 13:51:31 +03:00
c3500e39fd Add viewport device display on index page 2022-03-01 13:50:44 +03:00
23169c6fea block height fix:upload for mobile 2022-03-01 10:45:29 +03:00
f2fddc75c6 nodejs:fix 2022-02-28 18:29:54 +03:00
f542e9dcfc csharp:upload for mobile 2022-02-28 18:27:42 +03:00
6737a7e0d0 csharp-mvc:upload for mobile 2022-02-28 18:22:31 +03:00
e9c17c55da java:upload for mobile 2022-02-28 18:20:14 +03:00
f334bf4b19 java-spring:upload for mobile 2022-02-28 18:17:52 +03:00
f2139949de nodejs:upload for mobile 2022-02-28 18:14:23 +03:00
48314b2c7f ruby:upload for mobile 2022-02-28 18:09:20 +03:00
8804844281 python:upload for mobile 2022-02-28 17:59:15 +03:00
3a21d29568 php: fix centering 2022-02-28 17:17:30 +03:00
b6a08e242d Add licenses of mimemagic on ruby (7a61fac6b7)
# Conflicts:
#	web/documentserver-example/ruby/licenses/mimemagic.license
2022-02-28 16:59:02 +03:00
596235d34b php:upload for mobile 2022-02-28 16:40:55 +03:00
254fbaccea Merge pull request #259 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.13.3
build(deps): bump nokogiri from 1.12.5 to 1.13.3 in /web/documentserver-example/ruby
2022-02-28 12:03:45 +03:00
69c07a30a7 Merge remote-tracking branch 'remotes/origin/develop' into dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.13.3
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2022-02-28 12:02:41 +03:00
6283ff934d build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.5 to 1.13.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.5...v1.13.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-26 03:34:12 +00:00
db231faca0 nodejs: pdf without comment and fillform permissions 2022-02-22 14:31:14 +03:00
a3dd0394d2 nodejs: remove unused code 2022-02-22 11:46:40 +03:00
f9fd73fc7e nodejs: remove unused (aadac3cca6) 2022-02-22 11:32:06 +03:00
0931936b3c nodejs: remove unused (5c1d925d42) 2022-02-22 11:29:34 +03:00
b91b49c8fa nodejs: fix (b0a0050201) 2022-02-22 11:24:19 +03:00
b0a0050201 Merge pull request #258 from ONLYOFFICE/bugfix/non-static-docmanager
Bugfix Non static Docmanager
2022-02-22 11:06:10 +03:00
1c780a639f nodejs: don't clean tmp folder while others uploads might be happening 2022-02-16 11:55:01 +03:00
ad6ac4dedd nodejs: non static docmanager 2022-02-16 11:54:22 +03:00
8ba33f524b Merge pull request #240 from ONLYOFFICE/feature/jwtHistoryFiles
Feature/jwt history files
2022-02-15 16:32:21 +03:00
2f5b25d6ab Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtHistoryFiles
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2022-02-15 16:31:57 +03:00
44eef53a03 python: fixed history path building 2022-02-14 12:41:37 +03:00
08388f739c python: fixed cors issue when downloading history files 2022-02-14 12:41:14 +03:00
1d8175b88f Merge pull request #256 from ONLYOFFICE/feature/ruby-deps-version
ruby: update dependencies version
2022-02-11 13:01:44 +03:00
1400ec5a4b nodejs: fix opening history 2022-02-11 12:54:59 +03:00
e5f61ec95e php format 2022-02-11 12:34:46 +03:00
7c669cca19 mvc: fix opening history 2022-02-11 12:20:05 +03:00
81f8bd1a9b fix help 2022-02-11 11:31:00 +03:00
c4c819c513 format 2022-02-11 10:54:03 +03:00
03332b3cd9 csharp: revert coediting 2022-02-11 10:36:48 +03:00
ebc864736d Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtHistoryFiles
# Conflicts:
#	web/documentserver-example/java/README.md
2022-02-11 10:22:04 +03:00
af86ec1ca3 update submodule 2022-02-11 10:19:44 +03:00
d1d9915953 Merge pull request #257 from ONLYOFFICE/feature/userInfoGroups
Feature/user info groups
2022-02-11 10:15:35 +03:00
c663bfe464 Merge remote-tracking branch 'remotes/origin/develop' into feature/userInfoGroups
# Conflicts:
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/ExampleData.java
#	web/documentserver-example/java/src/main/java/helpers/Users.java
#	web/documentserver-example/php/users.php
#	web/documentserver-example/python/src/utils/users.py
#	web/documentserver-example/ruby/app/models/users.rb
2022-02-11 10:14:06 +03:00
1bb7dd152a Merge pull request #231 from ONLYOFFICE/feature/page-icons-layout
nodejs: change position of icons for mobile editor and filling forms
2022-02-11 10:10:37 +03:00
a52000fc97 java-spring: userInfoGroups 2022-02-11 01:22:15 +03:00
88b7fbf55c csharp: userInfoGroups 2022-02-11 00:43:01 +03:00
f9449f7742 csharp-mvc: userInfoGroups 2022-02-11 00:38:55 +03:00
9d2b8c4830 php: userInfoGroups 2022-02-11 00:28:22 +03:00
4068e23556 ruby: userInfoGroups 2022-02-11 00:20:29 +03:00
fc760af338 python: userInfoGroups 2022-02-11 00:00:58 +03:00
c55ab7cc75 java: userInfoGroups 2022-02-10 23:56:09 +03:00
00c9b3e2b9 nodejs: userInfoGroups to help 2022-02-10 15:01:21 +03:00
47074c588d nodejs: userInfoGroups 2022-02-10 14:25:51 +03:00
018d1bbead ruby: update dependencies version 2022-02-09 11:43:22 +03:00
82713572ab Merge pull request #255 from ONLYOFFICE/feature/update-readme
Update README.md
2022-02-09 10:59:07 +03:00
34d06235f4 format 2022-02-09 10:58:53 +03:00
468488c384 note to index page 2022-02-09 10:55:02 +03:00
ff4b387acf Update README.md 2022-02-09 10:50:20 +03:00
20012c7678 change note in readme 2022-02-09 10:17:36 +03:00
382160f2fc Merge remote-tracking branch 'remotes/origin/release/v7.1.0' into develop
# Conflicts:
#	web/documentserver-example/csharp-mvc/assets
#	web/documentserver-example/csharp/assets
#	web/documentserver-example/java-spring/src/main/resources/assets
#	web/documentserver-example/java/src/main/resources/assets
#	web/documentserver-example/nodejs/public/assets
#	web/documentserver-example/php/assets
#	web/documentserver-example/python/assets
#	web/documentserver-example/ruby/public/assets
2022-02-09 10:05:10 +03:00
761e578faf update submodule 2022-02-07 16:14:53 +03:00
7b7cbebc75 Merge pull request #254 from ONLYOFFICE/feature/changing-wopi-edit-view-icons
Node.js(wopi): Change wopi icons for editing and viewing actions
2022-02-07 15:53:47 +03:00
dbc5ebf098 Node.js(wopi): Change wopi icons for editing and viewing actions 2022-02-07 15:52:53 +03:00
c5d61b685b Merge pull request #253 from ONLYOFFICE/bugfix/xss
fix xss vulnerability
2022-02-06 16:32:39 +03:00
f3acca4b4b python: fix xss vulnerability 2022-02-06 16:31:16 +03:00
b92c4191f9 xss in lang 2022-02-06 16:25:52 +03:00
5b6f2696d2 xss in type 2022-02-06 16:16:51 +03:00
625df85b51 xss in actionLink 2022-02-06 15:52:58 +03:00
6716d38a40 support xlsb 2022-02-06 11:15:20 +03:00
84d574906d Python: remove unnecessary import 2022-02-03 17:32:26 +03:00
3c760c3136 Python: update pyjwt, fix jwtManager (remove decode) 2022-02-03 17:29:47 +03:00
bf28236d0d Python: fix urls (accidental deletion of a path saveus) 2022-02-01 17:13:27 +03:00
6d71a553be С#: add absolute path support for document history 2022-02-01 17:03:16 +03:00
fed5598294 С#: remove unnecessary construction 2022-02-01 16:00:50 +03:00
02351113e1 С# mvc: remove unnecessary functions and constructions 2022-02-01 15:55:36 +03:00
a07edeb5de Python: linux support (bug with json jwt decoding) 2022-02-01 15:19:15 +03:00
5bbc4c6232 Ruby: remove unnecessary action (version encoding) 2022-01-31 16:28:34 +03:00
770c2fe551 PHP: fix code 2022-01-31 15:03:41 +03:00
4916537977 Java-spring: fix the code 2022-01-31 15:01:39 +03:00
77ec1649a5 Java: fix the code and remove the encoding of the url version 2022-01-31 15:00:27 +03:00
204ff947c3 Python: fix code 2022-01-31 14:02:06 +03:00
d36fe2466a C#: add time for unique key 2022-01-27 11:53:10 +03:00
e927da28f5 C# mvc: add time for unique key 2022-01-27 11:52:49 +03:00
17b5c6e4c9 C#: Add history creation for the first version of the file 2022-01-27 11:50:30 +03:00
03f853dfef C# mvc: Add history creation for the first version of the file 2022-01-27 11:49:21 +03:00
1d7e65b2ba Python: fix bug with absolute storage path 2022-01-26 15:02:31 +03:00
8ebb67c925 Python: fix merge diff + prev 2022-01-26 14:59:40 +03:00
8524ff27ed Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtHistoryFiles 2022-01-26 13:45:33 +03:00
7bedc4b877 Merge pull request #250 from ONLYOFFICE/feature/add-wopi-users
Node.js (wopi): Add selected user to editor
2022-01-24 13:14:40 +03:00
f25c211630 Merge pull request #251 from ONLYOFFICE/feature/filetype
Feature/filetype
2022-01-24 12:12:12 +03:00
0f4785d14f python: correct code (Support old versions) 2022-01-24 11:07:28 +03:00
288add4d45 python: correct code (Support old versions) 2022-01-24 10:56:57 +03:00
1ee492838c python: correct filetype arg 2022-01-21 16:35:33 +03:00
f9ce3d1d33 nodejs: correct filetype arg 2022-01-21 15:51:16 +03:00
5f6687571a Node.js (wopi): changing the receipt of a wopi query 2022-01-20 17:11:59 +03:00
a1e5a4d48e Node.js (wopi): Add selected user to editor 2022-01-19 19:05:21 +03:00
6e9518631f Merge pull request #246 from ONLYOFFICE/feature/add-upload-wopi
Feature/add upload wopi
2022-01-19 18:07:31 +03:00
88d8086853 Node.js (wopi): Add support InternetExplorer 2022-01-19 17:59:31 +03:00
d22f4f11ca Java-Spring: jwt prev + diff 2022-01-19 17:20:48 +03:00
29cbe66d09 Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtHistoryFiles 2022-01-18 18:16:53 +03:00
c2410268eb Java: Merge jwt prev + diff 2022-01-18 17:41:59 +03:00
57cd71095d С# mvc: Merge jwt prev + diff 2022-01-18 17:00:56 +03:00
224d2bc570 С#: Merge jwt prev + diff 2022-01-18 16:25:13 +03:00
c7f18f1085 Node.js (wopi): Fix filter 2022-01-18 15:39:16 +03:00
fb05ad32ab Merge remote-tracking branch 'remotes/origin/develop' into feature/add-upload-wopi 2022-01-18 14:49:28 +03:00
bac989efd1 Node.js (wopi): Filter extensions from config that are in discovery for edit action (+ Checking the Fano condition) 2022-01-17 18:36:47 +03:00
8a203ac062 Node.js (wopi): button layout for upload 2022-01-17 18:33:49 +03:00
7e1386008b Merge pull request #249 from ONLYOFFICE/feature/wopi-layout
Feature/wopi layout
2022-01-17 15:15:10 +03:00
8ff206a411 Node.js wopi: add information when hovering over the info icon 2022-01-17 14:06:59 +03:00
83a0330725 Merge pull request #245 from ONLYOFFICE/feature/wopi-editing
Feature/wopi editing
2022-01-17 11:23:27 +03:00
c5269a53cf Merge pull request #244 from ONLYOFFICE/bugfix/customization-fix-JavaExample
fix Customization in Java and JavaSpringExample
2022-01-17 11:12:32 +03:00
f86b26928d Node.js(wopi): create a unique version code 2022-01-14 19:29:46 +03:00
f8d77947c8 Node.js(wopi): layout of the index page (delete extra info users and checkbox simple) 2022-01-14 19:28:09 +03:00
a62ac23aeb PHP: Merge jwt prev + diff (There is a bug with the history display) 2022-01-14 18:02:28 +03:00
a900183056 Merge pull request #241 from ONLYOFFICE/feature/fileTypeInsteadParsing
Feature/file type instead parsing
2022-01-14 16:52:30 +03:00
67d34f4bfa format 2022-01-14 16:52:12 +03:00
507a7f3162 Ruby: Merge jwt prev + diff 2022-01-13 18:08:40 +03:00
703281aa07 Node.js: Fix code. The direct link has been replaced with a stream output 2022-01-13 16:00:19 +03:00
aefec3e105 Python: Merge jwt prev + diff 2022-01-12 18:14:48 +03:00
8cc211b011 Node.js: Merge jwt prew + diff 2022-01-12 17:49:52 +03:00
68ec626970 C# mvc: fix code 2022-01-11 18:19:14 +03:00
065f338a79 C#: fix code 2022-01-11 18:18:54 +03:00
43548c04b9 Node.js: fix code (Made links through ready-made functions) 2022-01-11 17:52:40 +03:00
c7c95ecfbe Node.js: fix upload page (links [edit, view] ) for wopi upload files 2022-01-11 17:34:34 +03:00
064c0dcc35 C#: fix code 2022-01-11 16:42:26 +03:00
9a01f465d0 C# mvc: fix code 2022-01-11 16:42:01 +03:00
2d85a4166e Ruby: fix code 2022-01-11 15:07:19 +03:00
77c598049c I added universal content type in JavaSpringExample 2022-01-11 13:09:17 +03:00
c1baac3d6f content type Python Example FIX Commit 2022-01-11 12:58:32 +03:00
c5e30b6512 fix Application header in Node JS example 2022-01-11 12:55:19 +03:00
0fa6f43716 FixCommit content-type for Ruby 2022-01-11 12:48:28 +03:00
edc43bdf31 fix commit С# and C# MVC content type 2022-01-11 12:42:03 +03:00
f75453bf2d I fixed JWT for diff.zip Node JS Example 2022-01-11 12:35:26 +03:00
d03326a1e1 I fixed check JWT for Diff.zip in C# MVC Example 2022-01-11 11:39:43 +03:00
8be501a0ab Fix Commit for Diff.zip JWT in C# 2022-01-11 11:26:59 +03:00
a4c71eb69a JWT for diff.zip fix commit 2022-01-11 10:58:13 +03:00
132545c655 I added jwt check before giving diff in Python Example FIX Commit 2022-01-11 10:43:40 +03:00
5caaf0b1c6 Merge branch 'develop' into feature/jwtHistoryFiles 2022-01-10 19:00:27 +03:00
8f18cc8ab2 Merge branch 'feature/fileTypeInsteadParsing' of github.com:ONLYOFFICE/document-server-integration into feature/fileTypeInsteadParsing
# Conflicts:
#	web/documentserver-example/csharp-mvc/Helpers/TrackManager.cs
2022-01-10 18:49:43 +03:00
db976766cc Ruby: fix[support old version] fileType instead parsing 2022-01-10 18:47:02 +03:00
57f6028829 Python: fix[support old version] fileType instead parsing 2022-01-10 18:46:03 +03:00
05706ff038 PHP: fix[support old version] fileType instead parsing 2022-01-10 18:45:27 +03:00
9cf7ce276e Node.js: fix[support old version] fileType instead parsing 2022-01-10 18:45:03 +03:00
0b35179ef0 Java-spring: fix[support old version] fileType instead parsing 2022-01-10 18:44:35 +03:00
d396f92f4d Java : fix[support old version] fileType instead parsing 2022-01-10 18:44:01 +03:00
1e78da4cfc C#: fix[support old version] fileType instead parsing 2022-01-10 18:42:41 +03:00
a8c9c331c1 C# mvc: fix[support old version] fileType instead parsing 2022-01-10 18:41:54 +03:00
0b2e09cf1d Ruby JWT FIX for diff.zip 2022-01-10 17:40:05 +03:00
f81ae23a64 Merge branch 'feature/jwtHistoryFiles' of github.com:ONLYOFFICE/document-server-integration into feature/jwtHistoryFiles
# Conflicts:
#	web/documentserver-example/csharp-mvc/Models/FileModel.cs
#	web/documentserver-example/csharp/DocEditor.aspx.cs
#	web/documentserver-example/ruby/licenses/3rd-Party.license
2022-01-10 17:08:45 +03:00
6f90ff3391 Check JWT in JavaSpringExample 2022-01-10 16:37:54 +03:00
4f3882f892 Merge pull request #248 from ONLYOFFICE/feature/ruby-add-mimemagic
Add licenses of mimemagic on ruby
2022-01-10 16:08:31 +03:00
727418277f ruby: correct license 2022-01-10 16:08:14 +03:00
2f795de6ad Merge pull request #247 from ONLYOFFICE/feature/fileType
Feature/file type
2022-01-10 16:03:35 +03:00
bb28257a2d Merge remote-tracking branch 'remotes/origin/develop' into feature/fileType
# Conflicts:
#	web/documentserver-example/php/doceditor.php
2022-01-10 16:03:18 +03:00
379dba8b7c Merge branch 'feature/jwtForDiffZip' of https://github.com/ONLYOFFICE/document-server-integration into feature/jwtForDiffZip 2022-01-10 16:00:49 +03:00
05ea165f77 format 2022-01-10 16:00:41 +03:00
7a61fac6b7 Add licenses of mimemagic on ruby 2022-01-10 15:57:57 +03:00
31c3e050af I do check diff.zip for javaExample 2022-01-10 15:45:40 +03:00
0c677f3d65 Delete mimemagic on Ruby to do it on a new branch 2022-01-10 15:41:09 +03:00
6efa357c19 Delete mimemagic on Ruby in order to add in a new branch 2022-01-10 15:36:13 +03:00
3b33846f9d fix fileRemove and links on wopi (node.js) 2022-01-10 15:27:16 +03:00
3de8463359 Add ConverExtList and EditedExtList for wopi upload files 2022-01-10 14:18:55 +03:00
e05ead7ce6 Review and change jwt signature on python (via handler) 2022-01-10 13:01:12 +03:00
cdc8647f21 LICENSE for mimemagic on Ruby 2022-01-10 13:01:11 +03:00
c2b333fac7 fix commit 2022-01-10 13:01:11 +03:00
cae75d9888 jwt signature for prev.* files C# mvc (via handler) on Net4.8 2022-01-10 12:59:18 +03:00
ee674e6a57 jwt signature for prev.* files C# (via handler) 2022-01-10 12:57:22 +03:00
7207a9d860 jwt signature for prev.* files java-spring (via handler) 2022-01-10 12:53:41 +03:00
8cc5f685af Add link(handler) to onRequestHistoryData jwt Java 2022-01-10 12:53:41 +03:00
a61a8ccb4f jwt signature for prev.* files. Java (via handler) + README.md (Build point) 2022-01-10 12:53:41 +03:00
e857a2bed7 jwt signature for prev.* files. PHP (via handler) 2022-01-10 12:53:40 +03:00
514303d053 jwt signature for prev.* files. Ruby (by redirection) 2022-01-10 12:53:40 +03:00
7d4f511a5d jwt signature for prev.* files. Python 2022-01-10 12:53:40 +03:00
9b11e8b098 jwt signature for prev.* files node.js 2022-01-10 12:53:39 +03:00
8351905cee Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtForDiffZip 2022-01-10 12:32:09 +03:00
15b7a07963 Merge pull request #242 from ONLYOFFICE/feature/bugRubyEditor
Feature/bug ruby editor
2022-01-10 12:30:47 +03:00
ef1c53d330 ruby: fix bug of displaying the editor 2022-01-10 12:30:28 +03:00
9bcb871132 nodejs: format 2022-01-10 11:22:56 +03:00
25a4b9c97b revert assets after merge d115e4092f 2022-01-10 11:07:46 +03:00
a21fbd6802 java-spring: revert format 2022-01-10 10:58:25 +03:00
c7249ab27f Add upload files for wopi on the node.js 2021-12-30 18:28:55 +03:00
450d37161b Preparing a wopi task for PR 2021-12-30 16:53:30 +03:00
ee46a77684 Removing link to "editnew" in the file line 2021-12-29 19:20:33 +03:00
3b7e3c9258 Аdd action processing ("editnew" and "edit") and Create files only through "editnew" 2021-12-29 19:20:08 +03:00
783ad9f2de fix Customization in Java and JavaSpringExample 2021-12-29 13:30:11 +03:00
78571f6c23 FixCommit 2021-12-28 18:35:52 +03:00
a5c0b9bfb1 FixCommit 2021-12-28 18:31:48 +03:00
5047e64f3b php: revert format 2021-12-28 14:32:35 +03:00
d115e4092f Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtForDiffZip
# Conflicts:
#	web/documentserver-example/csharp-mvc/Models/FileModel.cs
#	web/documentserver-example/csharp/DocEditor.aspx.cs
#	web/documentserver-example/java/src/main/java/entities/FileModel.java
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/php/common.php
#	web/documentserver-example/php/doceditor.php
#	web/documentserver-example/php/webeditor-ajax.php
#	web/documentserver-example/ruby/Gemfile
#	web/documentserver-example/ruby/app/models/document_helper.rb
2021-12-28 14:29:37 +03:00
e7a1c2c6eb c# example check JWT for diff.zip 2021-12-28 11:34:45 +03:00
85f95ba4b9 C# MVC I Added header fileName = diff.zip 2021-12-28 11:34:16 +03:00
133013dfde Check JWT for diff.zip C# test-example 2021-12-28 11:11:58 +03:00
6acdc34e10 Start C# Example for diff.zip 2021-12-27 10:29:45 +03:00
19304920d1 fileType instead parsing url to save doc in C# MVC (take fileType out of body) 2021-12-24 18:13:12 +03:00
13b3eed5ed fileType instead parsing url to save doc in C# (take fileType out of body) 2021-12-24 18:12:40 +03:00
d9c1c7e051 fileType instead parsing url to save doc in Java-Spring (take fileType out of body) 2021-12-24 17:54:41 +03:00
2d0b17e334 fileType instead parsing url to save doc in Java (take fileType out of body) 2021-12-24 17:13:28 +03:00
384381cebc fileType instead parsing url to save doc in PHP (take fileType out of body) 2021-12-24 16:52:10 +03:00
16d830baf4 [fix] fileType instead parsing url to save doc in Python (take fileType out of body) 2021-12-24 16:51:48 +03:00
efcfaf95e8 [fix] fileType instead parsing url to save doc in node.js (take fileType out of body) 2021-12-24 16:50:23 +03:00
606f7d2d44 [fix] fileType instead parsing url to save doc in Ruby (take fileType out of body) 2021-12-24 16:47:57 +03:00
357c14b6d4 Check JWT for diff.zip in Ruby Example 2021-12-23 18:43:24 +03:00
c5a2b72b39 fileType instead parsing url to save doc in Ruby (take fileType out of body) 2021-12-23 18:29:31 +03:00
dab9e4bb16 fileType instead parsing url to save doc in Python (take fileType out of body) 2021-12-23 18:24:28 +03:00
27b6cb3293 Review and change jwt signature on python (via handler) 2021-12-23 17:49:26 +03:00
058b0c4f23 fileType in body Instead Parsing url on node.js 2021-12-22 20:21:08 +03:00
05c62bbdf3 LICENSE for mimemagic on Ruby 2021-12-22 19:01:25 +03:00
425bd81f08 fix commit 2021-12-22 18:20:29 +03:00
096102fa59 Merge branch 'develop' into feature/jwtHistoryFiles 2021-12-22 17:13:10 +03:00
c612320a65 JWT for diff.zip php example - good working example 2021-12-22 14:05:19 +03:00
e0b60a6956 JWT for diff.zip php example 2021-12-22 11:06:10 +03:00
16a0846248 jwt signature for prev.* files C# mvc (via handler) on Net4.8 2021-12-21 18:24:02 +03:00
71e1b28f47 jwt signature for prev.* files C# (via handler) 2021-12-21 17:45:42 +03:00
182f5f378e I added jwt for diff.zip 2021-12-21 13:28:05 +03:00
9d3f4b2300 jwt signature for prev.* files java-spring (via handler) 2021-12-20 18:41:38 +03:00
ab3d385c61 I added JWT validation for diff.zip in JavaSpring Example 2021-12-20 14:20:15 +03:00
8d194b78a1 Update samples 2021-12-20 11:29:02 +03:00
b8e726a7be Update pptx sample 2021-12-20 11:02:24 +03:00
dfd2d49e6c Add link(handler) to onRequestHistoryData jwt Java 2021-12-17 15:39:38 +03:00
fbe0c18315 Merge pull request #238 from ONLYOFFICE/feature/update-readme
Readme
2021-12-16 18:10:38 +03:00
ec6ea72069 small fixes for readme files 2021-12-16 17:51:01 +03:00
2accdeac3b jwt signature for prev.* files. Java (via handler) + README.md (Build point) 2021-12-16 17:43:01 +03:00
63f4b6fbb6 I added jwt check before giving diff in Python Example 2021-12-15 17:37:15 +03:00
642caddae8 jwt signature for prev.* files. PHP (via handler) 2021-12-15 16:23:23 +03:00
dac09bd1e1 jwt signature for prev.* files. Ruby (by redirection) 2021-12-14 19:26:56 +03:00
c6e3af5d3b Merge pull request #236 from ONLYOFFICE/feature/csharp-server-configuration
csharp and csharp-mvc readme
2021-12-13 16:59:39 +03:00
183fb80077 jwt signature for prev.* files. Python 2021-12-13 16:53:05 +03:00
63c3337938 Merge pull request #226 from ONLYOFFICE/bugfix/java-fixes
Bugfix/java fixes
2021-12-13 16:34:08 +03:00
0268298f2b Merge remote-tracking branch 'remotes/origin/develop' into bugfix/java-fixes
# Conflicts:
#	web/documentserver-example/java-spring/README.md
2021-12-13 16:32:54 +03:00
32ea01784c Merge pull request #234 from ONLYOFFICE/bugfix/group-fix
replace group value null with empty string
2021-12-13 16:27:14 +03:00
8e4a2c6359 I added jwt check before giving diff 2021-12-13 16:21:15 +03:00
71041fea9f Merge pull request #233 from ONLYOFFICE/feature/pptx-xpath
Feature/pptx xpath
2021-12-13 16:16:54 +03:00
8b25a7a869 ruby: v 3.0 2021-12-13 16:02:48 +03:00
dd20d79236 Merge pull request #230 from ONLYOFFICE/feature/ruby-3.0
ruby 3.0 version
2021-12-13 15:47:25 +03:00
299a68e0bd Merge pull request #229 from ONLYOFFICE/bugfix/layout-fixes
fix layout
2021-12-13 15:42:15 +03:00
9ad27d2cf0 Merge pull request #216 from ONLYOFFICE/feature/change-files-folder
Feature/change files folder
2021-12-13 15:39:26 +03:00
828115e5b0 Merge remote-tracking branch 'remotes/origin/develop' into feature/change-files-folder
# Conflicts:
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/storage/LocalFileStorage.java
2021-12-13 15:38:37 +03:00
461a005cfa Merge pull request #237 from ONLYOFFICE/develop
Release/1.1.0
2021-12-13 11:45:38 +03:00
24cfd661ef 1.1.0 2021-12-13 11:34:05 +03:00
6481ac7e13 update presentation sample 2021-12-13 11:21:56 +03:00
a194af0d19 jwt signature for prev.* files node.js 2021-12-10 20:29:15 +03:00
c0d240728d edit (fileType in setHistoryData for php) 2021-12-10 17:49:09 +03:00
89c0f03318 csharp: added information about the IIS components 2021-12-09 17:22:39 +03:00
bc1c9f455c fileType in setHistoryData for ruby (+ Gemfile) 2021-12-08 17:25:43 +03:00
df1a5f38c1 fileType in setHistoryData for python 2021-12-08 17:25:01 +03:00
6559c76fbd fileType in setHistoryData for php 2021-12-08 17:24:30 +03:00
a7db14811f fileType in setHistoryData for node.js 2021-12-08 17:23:37 +03:00
abffa3e75f fileType in setHistoryData for java 2021-12-08 17:23:00 +03:00
631f70148f fileType in setHistoryData for java-spring 2021-12-08 17:22:36 +03:00
c7e7c9c19d fileType in setHistoryData for C# 2021-12-08 17:21:54 +03:00
f2d4eb2a42 fileType in setHistoryData for C# mvc 2021-12-08 17:20:19 +03:00
778cb91317 Merge pull request #235 from ONLYOFFICE/feature/docserv_old_version
docxf and oform since v7.0
2021-12-08 14:03:12 +03:00
beb9885b03 docxf and oform since v7.0 2021-12-08 14:00:04 +03:00
65e34e52f9 nodejs: docxf and oform since v7.0 2021-12-07 18:41:42 +03:00
b453aa19f0 replace group value null with empty string 2021-12-02 17:39:48 +03:00
600570f7c7 Merge pull request #232 from ONLYOFFICE/feature/rename-master-form
Feature/rename master form
2021-12-02 11:54:00 +03:00
20f28afec1 rename master form to form template 2021-12-02 11:32:07 +03:00
2768ca5f6c nodejs: rename master form to form template 2021-12-02 11:21:53 +03:00
7841822c54 delete unused block 2021-12-02 10:37:05 +03:00
f3e24a8b5e nodejs: delete unused block 2021-12-01 22:31:08 +03:00
2425898cc8 nodejs: doc is not fillable format 2021-11-30 09:07:43 +03:00
8d85281be8 nodejs: frame allow attributes 2021-11-29 11:16:05 +03:00
081d704a8b nodejs: frame sanbox attributes 2021-11-29 11:00:53 +03:00
d3b962dcb8 fix layout 2021-11-26 15:45:53 +03:00
2949d24b49 Merge pull request #228 from ONLYOFFICE/bugfix/wopi-hover-fix
nodejs: wopi fix layout on hover
2021-11-26 10:20:10 +03:00
2f0d783ba6 nodejs: wopi fix layout on hover 2021-11-25 17:51:17 +03:00
644d9b8ba6 nodejs: create docxf(wopi) 2021-11-25 16:12:40 +03:00
7184928a6c update assets 2021-11-25 11:02:20 +03:00
2d7df99daf python: fix readme 2021-11-22 11:21:53 +03:00
5339b60226 Merge pull request #227 from ONLYOFFICE/bugfix/fix-styles
ruby and java: fix media styles
2021-11-22 10:03:35 +03:00
5e0f54be68 ruby and java: fix media styles 2021-11-21 14:13:46 +03:00
3cee92d3a3 nodejs: change position of icons for mobile editor and filling forms 2021-11-19 16:15:58 +03:00
77c6715481 Merge pull request #223 from ONLYOFFICE/feature/java-spring-comments
Comments for Java Spring
2021-11-18 13:03:07 +03:00
95ea50210f Merge remote-tracking branch 'remotes/origin/develop' into feature/change-files-folder
# Conflicts:
#	web/documentserver-example/csharp-mvc/web.appsettings.config
#	web/documentserver-example/java/src/main/java/helpers/DocumentManager.java
2021-11-18 12:54:57 +03:00
d3639d1697 java-sprong: added comments 2021-11-18 12:47:26 +03:00
40016395a8 java-spring: update README.md, set empty server.address 2021-11-18 12:35:29 +03:00
b6c0bf4db0 Merge pull request #225 from ONLYOFFICE/feature/docxf
Feature/docxf
2021-11-17 18:31:47 +03:00
3be5035ab3 php: docxf 2021-11-17 16:52:10 +03:00
ad9d627c82 csharp: docxf 2021-11-17 16:46:09 +03:00
a26a559921 csharp-mvc: docxf 2021-11-17 16:34:20 +03:00
cf2f60f8cd ruby: docxf 2021-11-17 16:24:46 +03:00
80e1be2261 python: docxf 2021-11-17 15:38:14 +03:00
a3e84f50fa java: docxf 2021-11-17 15:28:19 +03:00
796433cf8a java-spring: docxf 2021-11-17 15:15:31 +03:00
7309d942d6 java-spring: fix permissions 2021-11-17 15:12:04 +03:00
b5c90ee7d5 Merge remote-tracking branch 'remotes/origin/develop' into feature/docxf 2021-11-17 13:04:36 +03:00
8688ef1db5 Merge pull request #224 from ONLYOFFICE/feature/oform
Feature/oform
2021-11-17 13:01:49 +03:00
56a4f6073d php: opening uploaded form 2021-11-17 12:14:32 +03:00
6d67b740b6 php: filling on mobile 2021-11-17 12:10:18 +03:00
e97fe56914 php: revert filling in docx 2021-11-17 12:06:34 +03:00
946819926f php: hide submit button 2021-11-17 11:55:18 +03:00
e89b6040fb php: oform 2021-11-17 11:53:52 +03:00
d673fd86e0 csharp: opening uploaded form 2021-11-17 11:10:14 +03:00
901b2a83fa csharp: filling on mobile 2021-11-17 11:08:22 +03:00
08119d7458 csharp: revert filling in docx 2021-11-17 11:00:49 +03:00
d1fee87d8d python, csharp-mvc: fix layout 2021-11-17 11:00:26 +03:00
83cefae85b csharp: hide submit button 2021-11-17 10:48:36 +03:00
f1a64c92d2 csharp: oform 2021-11-17 10:47:50 +03:00
8f2c2f96d2 java: fix docker 2021-11-17 00:10:28 +03:00
f9dbe89fd9 java-spring: fix docker, clean up application.properties 2021-11-16 18:48:52 +03:00
c3a4c0a66b java: add fields owner and uploaded for document info 2021-11-16 17:52:07 +03:00
cb583e48e3 csharp-mvc: opening uploaded form 2021-11-16 17:43:47 +03:00
c3878a9431 csharp-mvc: filling on mobile 2021-11-16 17:37:05 +03:00
50821067d7 csharp-mvc: revert filling in docx 2021-11-16 17:32:09 +03:00
18bd45e4ab csharp-mvc: hide submit button 2021-11-16 17:28:06 +03:00
79aac3ccd6 csharp-mvc: oform 2021-11-16 16:55:49 +03:00
fac436f5e6 python: opening uploaded form 2021-11-16 16:20:08 +03:00
a4600b31a6 python: filling on mobile 2021-11-16 16:16:15 +03:00
b52196ec91 python: revert filling in docx 2021-11-16 16:13:39 +03:00
2314e74ade python: hide submit button 2021-11-16 16:08:40 +03:00
59801951e6 python: oform 2021-11-16 16:07:30 +03:00
3233e257cb ruby: opening uploaded form 2021-11-16 15:20:09 +03:00
6b4f56373e ruby: filling on mobile 2021-11-16 15:17:20 +03:00
cd1a312aba ruby: revert filling in docx 2021-11-16 15:13:32 +03:00
8cd0297917 ruby: hide submit button 2021-11-16 15:06:03 +03:00
4568dcfdce ruby: oform 2021-11-16 15:05:06 +03:00
ace2677062 java: revert filling in docx 2021-11-16 13:56:06 +03:00
d3cd62f5ae java: opening uploaded form 2021-11-16 13:35:55 +03:00
c7cd0ba828 java: filling on mobile 2021-11-16 13:32:15 +03:00
5cb3267660 java: hide submit button 2021-11-16 13:25:33 +03:00
1a2c68abe8 java: oform 2021-11-16 13:24:37 +03:00
cbaebe50c0 Merge pull request #222 from ONLYOFFICE/feature/save-as
Feature/save as
2021-11-16 13:02:36 +03:00
c8aac65af6 java-spring: opening uploaded form 2021-11-16 12:56:28 +03:00
5f8e9370a7 java-spring: mobile-fill-forms.svg 2021-11-16 12:52:39 +03:00
7fd0882c06 java-spring: filling on mobile 2021-11-16 12:51:52 +03:00
c6a8cd0ff1 java-spring: revert filling in docx 2021-11-16 12:32:21 +03:00
73797dcf31 java-spring: hide submit button 2021-11-16 12:22:06 +03:00
19ebecd4d0 java-spring: oform 2021-11-16 12:20:00 +03:00
bee95b4e6a php: add Copy File as... 2021-11-15 18:15:30 +03:00
4418d8e5d5 csharp and csharp-mvc: fix error messages 2021-11-15 17:38:46 +03:00
873267a784 csharp-mvc: add Copy File as... 2021-11-15 17:08:24 +03:00
605028151f csharp: add Copy File as... 2021-11-15 17:00:04 +03:00
2429668b57 ruby: add Copy File as... 2021-11-15 16:02:11 +03:00
5ecb4226e8 python: add Save Copy as... 2021-11-15 14:24:03 +03:00
7f4165f958 java: add Save Copy as... 2021-11-15 13:49:30 +03:00
7cd7f1bf66 java-spring: add Save Copy as... 2021-11-15 13:12:42 +03:00
608c21c60b Merge remote-tracking branch 'remotes/origin/develop' into feature/save-as 2021-11-15 12:17:25 +03:00
f44af24267 nodejs: docxf 2021-11-15 12:15:34 +03:00
be7a1e8ab2 nodejs: opening uploaded form 2021-11-15 12:15:09 +03:00
9bab8edc3c using innerAlert in onRequestSendNotify 2021-11-15 11:48:17 +03:00
4d852a23cd nodejs: filling on mobile 2021-11-15 11:20:08 +03:00
a497401b30 nodejs: revert filling in docx 2021-11-15 11:20:07 +03:00
94cb70c0db nodejs: hide submit button 2021-11-15 11:20:07 +03:00
8e60c60e46 nodejs: oform 2021-11-15 11:20:06 +03:00
1cd275188b nodejs: onRequestSaveAs event 2021-11-15 11:20:05 +03:00
edd423cd87 Merge remote-tracking branch 'remotes/origin/develop' into feature/change-files-folder
# Conflicts:
#	web/documentserver-example/csharp-mvc/web.appsettings.config
#	web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/documentserver/managers/document/DefaultDocumentManager.java
2021-11-09 19:04:30 +03:00
e026a7027b java-spring: check if storage directory does not exist 2021-11-09 18:31:09 +03:00
70836bb67d nodejs: using innerAlert 2021-11-09 14:42:35 +03:00
0de0b172c0 Merge pull request #221 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.12.5
build(deps): bump nokogiri from 1.11.5 to 1.12.5 in /web/documentserver-example/ruby
2021-11-08 11:48:48 +03:00
adc549bf7e Merge remote-tracking branch 'remotes/origin/develop' into dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.12.5
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2021-11-08 11:46:30 +03:00
8de69d18cb build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.5 to 1.12.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.5...v1.12.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-04 19:39:12 +00:00
11e8f40f8c ruby: fix embedded mode; fix media.css connect 2021-11-02 18:13:45 +03:00
bf18854ec0 csharp-mvc: fix embedded mode 2021-11-02 17:46:41 +03:00
08d1080527 csharp: fix embedded mode 2021-11-02 17:40:00 +03:00
9ca242fe82 python: fix storage path and embedded mode 2021-11-02 16:59:20 +03:00
b3c02a5afd php: fix embedded 2021-11-02 16:13:00 +03:00
ec65ebbfb8 php: layout fix 2021-11-02 16:01:39 +03:00
8544974202 java: layout fix 2021-11-02 16:01:16 +03:00
90eeae5334 php: fix file upload 2021-11-02 15:35:25 +03:00
970cfa6dd0 nodejs: fix embedded 2021-11-02 15:24:44 +03:00
f04a26a0f4 nodejs: fix file upload 2021-11-02 15:11:34 +03:00
02eceb6565 Merge pull request #220 from ONLYOFFICE/bugfix/fix-discovery
nodejs: check discovery["wopi-discovery"] is exist
2021-11-02 14:50:45 +03:00
53a58e2666 java: fix embedded mode 2021-11-02 14:33:29 +03:00
f5371db950 nodejs: check discovery["wopi-discovery"] is exist 2021-11-02 13:53:36 +03:00
0ab0762aa5 java: remove urlUser param from config 2021-11-02 11:26:11 +03:00
64f82872b3 Merge pull request #215 from ONLYOFFICE/bugfix/java-spring-fix
Bugfix/java spring fix
2021-11-02 10:03:39 +03:00
7ff4c65a91 Merge pull request #219 from ONLYOFFICE/bugfix/csharp-mvc-fix
csharp-mvc: fix select user
2021-11-02 09:52:21 +03:00
f272654532 Merge pull request #207 from ONLYOFFICE/bugfix/wopi-host
nodejs: wopi userhost from header
2021-11-02 09:46:02 +03:00
39e7cea624 java-spring: fix save file 2021-11-01 17:41:25 +03:00
b36f96f9c8 java-spring: fix create sample file 2021-11-01 16:44:42 +03:00
8b3b3268bf java-spring: fix ability to create new file from editor for Anonymous 2021-11-01 16:05:15 +03:00
5d2abdb634 java-spring: remove random favorite flag 2021-11-01 15:23:39 +03:00
3556073f5c java-spring: fix switch to edit mode from editor 2021-11-01 15:08:04 +03:00
b724366c33 java-spring: fix casting date 2021-11-01 13:16:27 +03:00
aeff6a4e9e java-spring: replace from DefaultCallbackManager.java to LocalFileStorage.java 2021-11-01 13:06:21 +03:00
97dad58428 java-spring: fix filename 2021-11-01 12:44:51 +03:00
2ce861d39b java-spring: replace if by switch 2021-11-01 12:42:55 +03:00
9d21924160 csharp-mvc: fix select user 2021-10-29 17:35:52 +03:00
48239b29aa Merge pull request #218 from ONLYOFFICE/bugfix/csharp-mvc
csharp-mvc: fix view mode on upload
2021-10-29 16:03:53 +03:00
b2545c6289 csharp-mvc: fix view mode on upload 2021-10-28 16:42:56 +03:00
c7907e13be Merge pull request #213 from ONLYOFFICE/feature/replace-syncrequest
Feature/replace syncrequest
2021-10-27 17:50:26 +03:00
7bea2f6e49 nodejs: delete sync-request.license (e25f27c304) 2021-10-27 15:46:17 +03:00
4b79d778de nodejs: wait actions data from discovery 2021-10-27 15:21:48 +03:00
1fe0769a2c nodejs: check callback data 2021-10-27 14:27:16 +03:00
e25f27c304 nodejs: delete sync-request.license 2021-10-27 13:43:39 +03:00
ed22141a63 Merge pull request #217 from ONLYOFFICE/bugfix/view-mode
csharp: fix view mode on upload
2021-10-26 18:13:25 +03:00
589e59c13c Merge pull request #214 from ONLYOFFICE/feature/file-maxsize
csharp and csharp-mvc: update max file size
2021-10-26 18:10:22 +03:00
1e6585e324 Merge pull request #212 from ONLYOFFICE/bugfix/password (b1a00854de)
Bugfix/password
2021-10-26 18:05:39 +03:00
3b283d6e80 Merge pull request #211 from ONLYOFFICE/bugfix/included-files
csharp and csharp-mvc: clean up included files
2021-10-26 17:56:59 +03:00
15576a53a5 csharp: fix view mode on upload 2021-10-25 12:24:14 +03:00
2e812c4584 java-spring: fix forcesave 2021-10-25 11:07:30 +03:00
c578099c03 java-spring: document info 2021-10-25 10:19:33 +03:00
35ab4b678d java-spring: fix deleting history folder 2021-10-22 17:17:38 +03:00
4446196919 java-spring: fix creating file 2021-10-21 18:55:13 +03:00
90a6514b6e http protocol
Revert "https://documentserver/"

This reverts commit ceb4db9de6.

# Conflicts:
#	web/documentserver-example/csharp-mvc/web.appsettings.config
#	web/documentserver-example/csharp/settings.config
#	web/documentserver-example/java/src/main/resources/settings.properties
#	web/documentserver-example/nodejs/config/default.json
#	web/documentserver-example/php/config.php
#	web/documentserver-example/ruby/config/application.rb
2021-10-21 12:19:48 +03:00
693941a949 java-spring: fix coediting 2021-10-21 11:08:08 +03:00
e5cbac6d89 java-spring: fix deleting files 2021-10-20 18:40:39 +03:00
43d60f2adc csharp and csharp-mvc: update max file size 2021-10-20 16:05:00 +03:00
4aeef2b873 php: fix highlighting of changes in history 2021-10-19 12:40:21 +03:00
60c03c1403 csharp-mvc: fix history 2021-10-19 11:41:28 +03:00
a82258269a nodejs: replace syncRequest by urllib 2021-10-18 16:10:13 +03:00
b9654f722e filePass fix 2021-10-18 15:33:44 +03:00
0f82f8bc30 nodejs: replace syncRequest by urlLib 2021-10-18 15:28:10 +03:00
c20bf3a527 nodejs: fix filePass 2021-10-18 14:55:44 +03:00
a597c37684 Merge branch 'develop' of https://github.com/ONLYOFFICE/document-server-integration into feature/change-files-folder 2021-10-17 15:38:48 +03:00
5206171a70 php: add ability to use custom path for files storage 2021-10-17 15:38:02 +03:00
4ebe9b5832 csharp and csharp-mvc: clean up included files 2021-10-16 13:41:57 +03:00
3a11a42f9e Merge pull request #210 from ONLYOFFICE/bugfix/sharp-mvc-fix
csharp-mvc: fix
2021-10-15 16:37:01 +03:00
841fd9f27f Merge remote-tracking branch 'remotes/origin/bugfix/sharp-mvc-fix' into develop
# Conflicts:
#	web/documentserver-example/csharp-mvc/Views/Home/Index.aspx
2021-10-15 16:36:22 +03:00
79326160a6 csharp-mvc: fix 2021-10-15 16:28:52 +03:00
6112ff4d02 nodejs: stop retrying get discovery (eee6246d0c) 2021-10-15 16:20:41 +03:00
f84a031581 Merge pull request #209 from ONLYOFFICE/feature/conversion-region
Feature/conversion region
2021-10-15 16:04:57 +03:00
375d916fe2 csharp-mvc: add ability to use custom path for files storage 2021-10-15 14:34:35 +03:00
a9e2df73ca add region(lang) param to convert 2021-10-15 13:50:15 +03:00
fd456f59e8 nodejs: wopi workaround (1e72167e7d) (waiting ONLYOFFICE/document-server-package#218) 2021-10-15 13:20:04 +03:00
d4f4b2bd95 nodejs: change address builder 2021-10-15 13:19:56 +03:00
35afb7a8fe csharp: add ability to custom path for files storage 2021-10-15 13:12:58 +03:00
8d1c4d8042 java-spring: add ability to use custom path for files storage 2021-10-14 12:28:36 +03:00
b969944ede python: update readme.md 2021-10-14 12:21:42 +03:00
da7450c732 ruby: add ability to use custom path for files storage 2021-10-14 12:19:45 +03:00
1db5e865a6 Merge remote-tracking branch 'remotes/origin/develop' into feature/change-files-folder 2021-10-14 12:11:38 +03:00
34b066f846 nodejs: add region parameter to conversation 2021-10-13 18:51:41 +03:00
9e9f177508 nodejs: adding events before initialization (07d11f0bae) 2021-10-12 15:04:47 +03:00
1392a567d7 nodejs: display error message 2021-10-12 10:43:43 +03:00
8ed261dabc Merge pull request #206 from ONLYOFFICE/bugfix/info-block-max-width
add max-width to portal info block
2021-10-12 10:23:19 +03:00
27982b0aa6 remove unused 2021-10-12 10:10:34 +03:00
08edfca9b0 Merge pull request #208 from ONLYOFFICE/bugfix/layout-misprint
fix layout misprints
2021-10-12 10:06:32 +03:00
a4122c1393 csharp and csharp-mvc: layout misprint 2021-10-11 17:22:08 +03:00
a412f3f591 ruby and php: delete misprint quotes 2021-10-11 14:19:02 +03:00
01132d78c2 add max-width to portal info block 2021-10-08 16:15:16 +03:00
b61e7574bb Merge pull request #204 from ONLYOFFICE/bugfix/hide-tooltip
replace hiding portal-info block from js to templates
2021-10-07 09:49:28 +03:00
f148233e64 Merge pull request #198 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.12.5
build(deps): bump nokogiri from 1.11.1 to 1.12.5 in /web/documentserver-example/ruby
2021-10-07 08:22:18 +03:00
92a322f2a7 build: fix sharp name 2021-10-06 17:41:38 +03:00
689ac66bba build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.1 to 1.12.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.1...v1.12.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-06 13:58:35 +00:00
6dbbcd7c99 Merge pull request #205 from ONLYOFFICE/release/1.0.0
Release/1.0.0
2021-10-06 16:57:25 +03:00
0b0919568c 1.0.0 2021-10-06 16:48:03 +03:00
c3774d8cb6 replace hiding portal-info block from js to templates 2021-10-06 15:14:45 +03:00
8b965a657d nodejs: wopi: filename open new tab 2021-10-05 17:09:03 +03:00
1e72167e7d nodejs: absolute host for ds on request the discovery 2021-10-05 16:55:06 +03:00
67c1922698 Merge pull request #203 from ONLYOFFICE/bugfix/spring-readme
java-spring: README.md misprint
2021-10-05 08:49:15 +03:00
f978efd88f java-spring: README.md misprint 2021-10-04 19:30:41 +03:00
e3304792c4 0.0.0 2021-10-04 14:05:11 +03:00
ffa883644a format config 2021-10-04 14:02:34 +03:00
c2dd09ccdb spring: default address 2021-10-04 13:56:49 +03:00
17f54c133a nodejs: unavailable wopi 2021-10-04 13:16:42 +03:00
971cf5745e fix rebase (e2a04ffb89) 2021-10-04 13:15:46 +03:00
e3c6bfdd1c Merge pull request #201 from ONLYOFFICE/bugfix/emails
rename email.com to example.com
2021-10-01 12:56:37 +03:00
1b6d08e9bb rename email.com to example.com 2021-10-01 12:41:12 +03:00
6168691469 spring to zip 2021-10-01 11:20:51 +03:00
c464064837 Merge pull request #176 from ONLYOFFICE/feature/java-spring
Feature/java spring
2021-10-01 11:10:03 +03:00
35f6b2bdfa Merge pull request #200 from ONLYOFFICE/bugfix/mail-rename
rename mails
2021-10-01 11:08:39 +03:00
a1f26cb828 rename emails 2021-09-30 18:57:10 +03:00
bb9411a82c rename mails 2021-09-30 18:55:22 +03:00
e2a04ffb89 Merge pull request #193 from ONLYOFFICE/bugfix/users-tooltip-layout
fix users tooltip size
2021-09-29 11:19:54 +03:00
1463e88024 csharp-mvc: user tooltip layout 2021-09-29 10:57:14 +03:00
b965ec08aa csharp: user tooltip layout 2021-09-29 10:56:56 +03:00
347dc710ea java: user tooltip layout 2021-09-29 10:56:33 +03:00
418a7a2712 ruby: user tooltip layout 2021-09-29 10:56:13 +03:00
f40d8a4a64 php: user tooltip layout 2021-09-29 10:55:52 +03:00
bee5e4724b python: user tooltip layout 2021-09-29 10:55:27 +03:00
e1753a154d nodejs: users tooltip layout 2021-09-29 10:54:55 +03:00
7327c4bfc2 java-spring: user tooltip layout 2021-09-28 23:12:40 +03:00
45afbe3f56 Merge pull request #196 from ONLYOFFICE/feature/server-url-to-links
add serverUrl to links
2021-09-28 12:35:20 +03:00
83efab84ad Merge remote-tracking branch 'remotes/origin/master' into develop 2021-09-28 12:30:33 +03:00
8da151ff7c Merge branch hotfix/v6.4.1 into master 2021-09-28 08:03:23 +00:00
7fbcdb1d7f Merge pull request #197 from ONLYOFFICE/bugfix/cors-regexp
cors, fix regexp, fix manifest
2021-09-27 12:33:45 +03:00
69ac7771d5 nodejs: add ability to use custom path for storage-folder 2021-09-24 17:53:59 +03:00
04f5cac85d java: fix; update README.md, add media.css to index.jsp 2021-09-24 17:51:43 +03:00
ce18f76698 cors, fix regexp, fix manifest 2021-09-23 21:56:08 +03:00
f542048aeb add serverUrl to links 2021-09-23 21:45:13 +03:00
222749da15 fix path to templates, set username as "", if anonymous 2021-09-23 11:46:18 +03:00
d64a2b3a47 users tooltip layout 2021-09-21 23:33:29 +03:00
110dc6808b java-spring: docserver url 2021-09-21 18:05:06 +05:00
75329fa198 java-spring: cleanup 2021-09-21 18:01:19 +05:00
7083e8f973 Merge pull request #194 from ONLYOFFICE/bugfix/python-example-fix
python: remade detecting document type
2021-09-20 17:13:06 +03:00
c196360933 Merge pull request #195 from ONLYOFFICE/feature/readme-ruby
Ruby version
2021-09-20 16:40:47 +03:00
8abd7e69a9 misprint 2021-09-20 12:33:46 +03:00
ccdd2a4cdc ruby 3.0 version 2021-09-20 12:29:55 +03:00
7e06add085 ruby: changed the command 2021-09-17 18:01:51 +03:00
9193cf1d4b ruby: specified the Ruby version 2021-09-17 17:08:03 +03:00
d6bddd86f3 python: remade detecting document type 2021-09-16 16:33:44 +03:00
5a95fb26d4 java-spring: fix user tooltip size 2021-09-14 12:28:11 +03:00
3ab0f5fc7a java-spring: add .oxps 2021-09-14 10:17:17 +03:00
42859d7a28 Merge remote-tracking branch 'remotes/origin/hotfix/v6.4.1' into develop 2021-09-14 09:29:48 +03:00
d3581658b7 update templates 2021-09-14 09:29:20 +03:00
7027970b65 support oxps 2021-09-14 09:29:19 +03:00
8774286d8e Merge pull request #191 from ONLYOFFICE/feature/update-readme-link
Update Readme.md
2021-09-14 08:41:46 +03:00
33140a2ca6 java: added ability to use absolute path for storage-folder in settings.properties, updated README.md 2021-09-13 18:49:38 +03:00
f0087361b6 Update Readme.md 2021-09-10 17:14:35 +03:00
4f07072824 Merge pull request #190 from ONLYOFFICE/feature/wopi-fix
fix wopi url context, fix layout
2021-09-08 11:41:18 +03:00
ce0231f5f2 fix wopi url context, fix layout 2021-09-07 17:59:35 +03:00
774a9fd209 fix path to diff.zip 2021-09-06 18:50:42 +03:00
24d138fdb5 fix misprint 2021-09-03 17:00:09 +03:00
53357938d2 fix creating history folder 2021-09-03 15:42:53 +03:00
09628fc5e9 fix deleting file folder when deleting file 2021-09-03 15:31:20 +03:00
62bc35de61 Merge pull request #189 from ONLYOFFICE/feature/layout-fix
layout fix
2021-09-03 09:51:38 +03:00
9fce208ce3 layout fix 2021-09-02 13:44:57 +03:00
2942324696 layout fix 2021-09-02 13:41:14 +03:00
07fda35106 Merge remote-tracking branch 'remotes/origin/hotfix/v6.4.1' into develop 2021-08-30 18:57:43 +03:00
a7ccb0b8ca Merge pull request #188 from ONLYOFFICE/feature/filepass-fix
replace set filepass null
2021-08-30 17:14:58 +03:00
b1a00854de replace set filepass null 2021-08-30 16:53:05 +03:00
a546f1a1f4 Merge pull request #187 from ONLYOFFICE/feature/ie11-layout-fix
update layout for ie11
2021-08-29 15:43:25 +03:00
7a6afed510 Merge pull request #185 from ONLYOFFICE/feature/new-comments
New comments
2021-08-29 15:39:13 +03:00
07e2d7f3f1 Merge remote-tracking branch 'remotes/origin/feature/wopi-url-fix' into develop 2021-08-29 15:36:06 +03:00
344f5e1652 Merge pull request #183 from ONLYOFFICE/feature/corrupt-url
Feature/corrupt url
2021-08-29 15:32:45 +03:00
2ef34bc769 Merge pull request #182 from ONLYOFFICE/feature/header-height
set header height 48px
2021-08-29 15:27:10 +03:00
43783ba4a6 deploy: ignore .git 2021-08-29 15:24:01 +03:00
fbada5f99a update layout for ie11 2021-08-26 20:24:19 +03:00
093fadaf74 update layout for ie11 2021-08-26 20:09:59 +03:00
463d85d222 Merge pull request #163 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.11.5
build(deps): bump nokogiri from 1.10.10 to 1.11.5 in /web/documentserver-example/ruby
2021-08-26 16:38:50 +03:00
fbc2941dae Merge remote-tracking branch 'remotes/origin/master' into develop 2021-08-26 16:35:51 +03:00
e165c695fb ruby: new comments 2021-08-26 14:00:52 +03:00
b979f667f2 python: new comments 2021-08-26 13:52:21 +03:00
29f2d63b32 php: new comments 2021-08-26 13:45:11 +03:00
75f4e80b54 nodejs: new comments 2021-08-26 13:32:59 +03:00
1749ae6a52 Merge remote-tracking branch 'remotes/origin/develop' into dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.11.5
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2021-08-24 14:18:48 +03:00
873a9a386b java: new comments 2021-08-24 14:14:25 +03:00
ece446d191 csharp-mvc: new comments 2021-08-24 13:13:35 +03:00
f0a86d924f saving without url 2021-08-24 13:08:08 +03:00
90c4d54460 csharp: new comments 2021-08-24 12:40:41 +03:00
f897d9194f nodejs: saving without url 2021-08-24 11:14:10 +03:00
cfa859a65f java-spring: version fix 2021-08-23 23:31:22 +03:00
ade7d05270 java-spring: set header height 48px 2021-08-23 16:59:12 +03:00
6a75f23020 set header height 48px 2021-08-23 16:56:42 +03:00
9baa4c59b3 java-spring: refactoring 2021-08-20 16:25:49 +03:00
92b1972f2b Merge branch hotfix/v6.3.2 into develop 2021-08-10 12:24:30 +00:00
e0c69705bb Merge pull request #181 from ONLYOFFICE/feature/editor-initialization-fix-ie11
fix for IE 11
2021-08-10 10:59:54 +03:00
d4e841468a fix for IE 11 2021-08-09 20:01:50 +03:00
fdcc6e24db Merge pull request #180 from ONLYOFFICE/feature/readme
Readme
2021-08-06 12:31:03 +03:00
37712e31e6 new screenshot 2021-08-05 17:53:08 +03:00
3142b86d9e some changed for readme 2021-08-05 17:44:29 +03:00
f12ead863f Merge pull request #178 from ONLYOFFICE/feature/blank-templates-image-url
change image url to "" for Blank template
2021-08-02 17:27:46 +03:00
3df2773867 change image url to "" for Blank template 2021-07-29 13:48:55 +03:00
2d51ddde3d java-spring: add createUrl to editorConfig and creating from templates 2021-07-29 13:32:23 +03:00
d5f5079c22 java-spring: remove templates field from Permissions, fix version history 2021-07-29 12:34:12 +03:00
df7598956e java-spring: add LICENSE file 2021-07-27 20:24:19 +03:00
efbde68bf8 csharp-mvc: fix getting extension 2021-07-20 14:35:32 +03:00
17f254db48 Merge pull request #177 from ONLYOFFICE/feature/adaptive-fix
Feature/adaptive fix
2021-07-20 14:34:06 +03:00
6a16c85acb node-js: fix left submenu height when with wopi button 2021-07-20 13:50:27 +03:00
f5f0ce4e06 adaptive layout: add media for main-panel 2021-07-20 12:34:06 +03:00
beb66bf818 Merge branch 'feature/java-spring' of https://github.com/ONLYOFFICE/document-server-integration into feature/java-spring 2021-07-20 12:10:13 +03:00
f709b20590 java-spring: add position relative to "center" class 2021-07-20 12:09:18 +03:00
c99f189af3 java-spring: update readme 2021-07-16 17:39:48 +03:00
fd110429d3 java-spring: change TrackManagerRequestBody cast from token, add new fields 2021-07-16 15:54:11 +03:00
4b7a04834b java-spring: add cast from jwt-token body to entity, replace switch with setFavorite 2021-07-15 14:13:33 +03:00
c1a76cf652 java-spring: ActionObject class change type String to Action, add if sample flag check, remove setFavorite from constructor of Document, fix main-panel width(media.css) 2021-07-14 18:46:09 +03:00
ed8296bd34 csharp-mvc: using method from class 2021-07-14 14:42:19 +03:00
d0df3c5420 delete screenshot 2021-07-14 11:21:01 +03:00
ca47ac870d java-spring: fix misprints 2021-07-14 11:19:36 +03:00
78f24a06f1 java-spring: add README.md, docker-compose and Dockerfile 2021-07-14 11:14:41 +03:00
9cd4591987 java-spring: set default select option and cookie language(English) 2021-07-13 17:55:55 +03:00
563e02a5ba Merge pull request #175 from ONLYOFFICE/feature/converter-downloadUrl-fix
fix downloadUrl for convert
2021-07-13 15:05:56 +03:00
41daabbe0c php: replace get download url 2021-07-13 15:00:00 +03:00
6b8708ca50 java-spring: fix documentUrl for convert 2021-07-13 14:39:15 +03:00
b2980b5749 fix downloadUrl for convert 2021-07-13 14:32:39 +03:00
8e2f6b8003 java-spring: set John Smith as default user, fix file url encode/decode 2021-07-13 13:03:02 +03:00
239f0e2528 java-spring: fix edit, comment, review, fillForms mode permissions 2021-07-12 11:31:16 +03:00
38cf6c333d java-spring: added Anonymous(uid-4), set default person John, fix favorite 2021-07-12 11:28:38 +03:00
c28ded60a0 java-spring: fix delete file 2021-07-12 11:25:23 +03:00
8858128f34 java-spring: added templates submodule 2021-07-09 17:59:45 +03:00
fdca204790 java-spring: file version on index page when hovering filename, tableHeader position fix 2021-07-09 17:32:58 +03:00
606eee6903 Merge remote-tracking branch 'remotes/origin/develop' into feature/java-spring 2021-07-09 17:05:37 +03:00
b2df1f5a96 Merge pull request #174 from ONLYOFFICE/feature/files-version
file versions on index page fix
2021-07-09 16:58:14 +03:00
61abb4d809 comment fix and square brackets 2021-07-09 16:56:00 +03:00
b58f33dddf file versions on index page fix 2021-07-09 16:32:12 +03:00
e3353fd778 java-spring: change media from 970px to 986px 2021-07-09 15:36:27 +03:00
c6ba3709aa Merge pull request #173 from ONLYOFFICE/feature/mobile-design
Feature/mobile design
2021-07-08 16:26:12 +03:00
2205e6252e footer content margin 596-610px fix 2021-07-08 15:25:38 +03:00
68f950aac5 adaptive layout: change media from 970px to 986px 2021-07-08 14:58:56 +03:00
05215ffd4b adaptive layout: long file names width fix on smallscreen 2021-07-08 11:10:51 +03:00
e0463ccd17 node.js: wopi not ooxml fix margin-left 2021-07-08 10:37:50 +03:00
038c74664a java-spring: fix favorite, add templates permission, 2021-07-06 18:07:27 +03:00
582a0d0612 adaptive layout: border line fix 2021-07-06 15:41:01 +03:00
d1903e4354 java-spring: favorite flag, file creation and file samples, separated class for "/track" (TrackManager and FileController) 2021-07-06 15:23:13 +03:00
f9bb10c3df java-spring: users for mentions, gson to jackson, rename documentManager to segregated documentManagerExts 2021-07-05 15:46:07 +03:00
e5fb3f4c6f java-spring: change File entity name to FileModel, add GetHistory 2021-07-02 17:28:40 +03:00
0ce61cc07b java-spring: documentManager interface separation 2021-07-02 11:09:57 +03:00
183e737847 java-spring: adaptive layout 2021-07-02 10:19:35 +03:00
12a72795ff java: class names fix 2021-06-30 10:44:55 +03:00
2dc7b761b2 nodejs: wopi line height fix 2021-06-29 20:06:17 +03:00
2a898a8e8d nodejs: wopi layout fix 2021-06-29 17:56:03 +03:00
44fc7a8215 line space fix 2021-06-29 15:56:55 +03:00
af16f147ba ruby: adaptive layout 2021-06-29 15:31:12 +03:00
c52dbdde4e python: adaptive layout 2021-06-29 15:28:41 +03:00
ab82be9b3d php: adaptive layout and tag a fix 2021-06-29 15:27:06 +03:00
0ae02d8af9 nodejs: adaptive layout 2021-06-29 15:25:37 +03:00
293fbb4802 csharp: adaptive layout 2021-06-29 15:22:44 +03:00
65f5f6c25e c#-mvc: adaptive layout 2021-06-29 15:20:31 +03:00
ca92b12bd3 java: adaptive layout 2021-06-29 15:15:55 +03:00
1178ee7e85 java-spring: 3rd-party license 2021-06-23 12:07:53 +03:00
aeaf3dee06 java-spring: copyright 2021-06-22 09:51:29 +03:00
76100c7c02 java-spring: default settings 2021-06-22 09:51:12 +03:00
92f601f702 java-spring: bugfix 2021-06-22 07:58:38 +02:00
af1d06f47c java-spring: null pointer fix 2021-06-21 19:05:49 +02:00
2c03521148 java-spring: Integration example 2021-06-21 17:33:24 +02:00
57144dfd61 build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.10 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.10...v1.11.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-20 12:00:01 +00:00
428 changed files with 46191 additions and 5467 deletions

31
.github/workflows/lint-java.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Lint Java
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/java/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/java
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Run linter
run: |
mvn -version
mvn package

35
.github/workflows/lint-nodejs.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: ESLint
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/nodejs/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/nodejs/**']
env:
NODE_VERSION: 16
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/nodejs
steps:
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Code Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: npm ci
- name: Code Linting
run: npm run lint

31
.github/workflows/lint-php.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: PHPCs
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/php/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/php/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/php
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: cs2pr, phpcs
- name: Run phpcs
run: |
phpcs --version
phpcs -q --extensions=php,module,inc,install,test,profile,theme,info --ignore=node_modules,bower_components,vendor,css,js,lib --standard=./ruleset.xml ./

40
.github/workflows/lint-python.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: PyLint
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/python/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/python/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/python
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install pylint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint Flake8
run: |
flake8 ./**/*.py --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 ./**/*.py --count --max-complexity=10 --max-line-length=79 --statistics
- name: Lint Pylint
run: |
pylint ./**/*.py

31
.github/workflows/lint-ruby.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Rubocop
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/ruby/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/ruby/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/ruby
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Install dependencies
run: |
bundle install
- name: Rubocop
run: |
gem install rubocop
rubocop

31
.github/workflows/lint-spring.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Lint Spring
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java-spring/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/java-spring/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/java-spring
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Run linter
run: |
mvn -version
mvn package

4
.gitmodules vendored
View File

@ -26,3 +26,7 @@
path = web/documentserver-example/ruby/public/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/java-spring/src/main/resources/assets"]
path = web/documentserver-example/java-spring/src/main/resources/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en

View File

@ -90,6 +90,65 @@ License: Apache 2.0
License File: prime-jwt.license
web/documentserver-example/java-spring
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
License: Apache 2.0
License File: prime-jwt.license
Spring Boot - Helps create Spring-powered, production-grade applications and services. Has external dependencies on Spring Framework. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Boot Devtools - Provides fast application restarts, LiveReload, and configurations for enhanced development experience. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Boot Starter Thymeleaf - A modern server-side Java template engine for both web and standalone environments. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate. (https://github.com/spring-projects/spring-data-jpa/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-data-jpa.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license
web/documentserver-example/nodejs
body-parser - Node.js body parsing middleware. (https://github.com/expressjs/body-parser/blob/master/LICENSE)
@ -164,10 +223,6 @@ serve-favicon - Node.js middleware for serving a favicon. (https://github.com/ex
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
@ -195,6 +250,14 @@ jQuery.UI - jQuery UI is an open source library of interface components —
License: MIT
License File: jQuery.UI.license
JWT - JSON Web Token implementation (https://github.com/firebase/php-jwt/blob/master/LICENSE)
License: BSD-3-Clause
License File: jwt.license
PHP_CodeSniffer - PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent. (https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt)
License: BSD-3-Clause
License File: PHP_CodeSniffer.license
web/documentserver-example/ruby

49
CHANGELOG.md Normal file
View File

@ -0,0 +1,49 @@
# Change Log
- php: linter refactoring
## 1.5.0
- nodejs: added wopi putRelativeFile action
- nodejs: wopi editnew action for exisiting file
- nodejs: fix wopi actions after restart
- setting an unavailable language
- description in the tooltip on the main page
- nodejs: referenceData
- option to send directUrl
## 1.4.0
- nodejs: option to send directUrl
- opening file on client by directUrl
- offline viewer for anonymous
- added hy, eu, zh-TW, ms, pt-PT
## 1.3.1
- charp: fix references
- ruby: update rails
## 1.3.0
- update empty files
- anonymous without chat
- changed jwt implementation in csharp, csharp-mvc, php, ruby
## 1.2.0
- ruby v3.0
- set filetype in setHistoryData
- read filetype from input request
- creating file on WOPI
- upload on WOPI page
- fix xss
- set userInfoGroups
- check JWT on downloading history
- upload dialog on mobile
- anonymous without id
- renaming from editor
- new skin languages
- ignore certificate
## 1.1.0
- creating docxf
- opening docxf, oform
## 1.0.0
- added java spring

View File

@ -1,14 +1,19 @@
## Document Server integration example
## Integration examples
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.
Test examples are simple document management systems that can be built into your application for testing.
Do NOT use these integration examples on your own server without proper code modifications!
In case you enabled any of the test examples, disable it before going for production.
These examples show the way to integrate [ONLYOFFICE Docs][2] into your own website or application using one of the programming languages.
The package contains examples written in .Net (C# MVC), .Net (C#), Java, Node.js, PHP and Ruby.
You should change `http://documentserver` to your server address in these files:
* .Net (C# MVC) - `web/documentserver-example/csharp-mvc/web.appsettings.config`
* .Net (C#) - `web/documentserver-example/csharp/settings.config`
* Java - `web/documentserver-example/java/src/main/resources/settings.properties`
* Node.js - `web/documentserver-example/nodejs/config/default.json`
* PHP - `web/documentserver-example/php/config.php`
* Ruby - `web/documentserver-example/ruby/config/application.rb`
* [.Net (C# MVC)](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/csharp-mvc) - `web/documentserver-example/csharp-mvc/web.appsettings.config`
* [.Net (C#)](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/csharp) - `web/documentserver-example/csharp/settings.config`
* [Java](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/java) - `web/documentserver-example/java/src/main/resources/settings.properties`
* [Node.js](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/nodejs) - `web/documentserver-example/nodejs/config/default.json`
* [PHP](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/php) - `web/documentserver-example/php/config.php`
* [Ruby](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/ruby) - `web/documentserver-example/ruby/config/application.rb`
More information on how to use these examples can be found here: [http://api.onlyoffice.com/editors/demopreview](http://api.onlyoffice.com/editors/demopreview "http://api.onlyoffice.com/editors/demopreview")
@ -62,6 +67,15 @@ The methods described below are available for all of the test examples.
| **Response** | **Code:** 200 OK <br />**Content on success:**<br /> `[{ "version": <file_version>, "id": <file_id>, "contentLength": <file_size_in_kilobytes>, "pureContentLength": <file_size_in_bytes>, "title": <file_name>, "updated": <last_change_date>}]`<br />**Content on error:**<br /> `"File not found"` |
| **Sample** | `curl -X GET http://localhost/files/{fileId}` |
## Important security info
Please keep in mind the following security aspects when you are using test examples:
* There is no protection of the storage from unauthorized access since there is no need for authorization.
* There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
* There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
* There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.
## Project Information
Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx)
@ -72,9 +86,9 @@ ONLYOFFICE for developers: [https://www.onlyoffice.com/developer-edition.aspx](h
## User Feedback and Support
If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [forum.onlyoffice.com][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
[1]: http://dev.onlyoffice.org
[1]: https://forum.onlyoffice.com
[2]: https://github.com/ONLYOFFICE/DocumentServer
[3]: http://stackoverflow.com/questions/tagged/onlyoffice

View File

@ -4,12 +4,14 @@
<PropertyGroup>
<To Condition=" '$(To)' == '' ">..\deploy\</To>
<RootDir Condition="$(RootDir)==''">..\..\</RootDir>
<NameCSharp>$(To).Net (C#) Example</NameCSharp>
<NameCSharp>$(To)DotNet (Csharp) Example</NameCSharp>
<DirCSharp>$(RootDir)web\documentserver-example\csharp\</DirCSharp>
<NameMvc>$(To).Net (C# MVC) Example</NameMvc>
<NameMvc>$(To)DotNet (Csharp MVC) Example</NameMvc>
<DirMvc>$(RootDir)web\documentserver-example\csharp-mvc\</DirMvc>
<NameJava>$(To)Java Example</NameJava>
<DirJava>$(RootDir)web\documentserver-example\java\</DirJava>
<NameSpring>$(To)Java Spring Example</NameSpring>
<DirSpring>$(RootDir)web\documentserver-example\java-spring\</DirSpring>
<NameNodeJS>$(To)Node.js Example</NameNodeJS>
<DirNodeJS>$(RootDir)web\documentserver-example\nodejs\</DirNodeJS>
<NamePHP>$(To)PHP Example</NamePHP>
@ -24,43 +26,49 @@
<RemoveDir Directories="$(To)" ContinueOnError="true" />
<ItemGroup>
<ZipFilesCSharp Include="$(DirCSharp)**" Exclude="$(DirCSharp)obj\**" />
<ZipFilesCSharp Include="$(DirCSharp)**" Exclude="$(DirCSharp).vs\**;$(DirCSharp)bin\*.pdb;$(DirCSharp)bin\*.xml;$(DirCSharp)obj\**;$(DirCSharp)packages\**;$(DirCSharp)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesCSharp)" DestinationFiles="@(ZipFilesCSharp->'$(NameCSharp)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NameCSharp)" WorkingDirectory="$(To)" ZipFileName="$(NameCSharp).zip" />
<ItemGroup>
<ZipFilesMVC Include="$(DirMvc)**" Exclude="$(DirMvc)obj\**" />
<ZipFilesMVC Include="$(DirMvc)**" Exclude="$(DirMvc).vs\**;$(DirMvc)bin\*.pdb;$(DirMvc)bin\*.xml;$(DirMvc)obj\**;$(DirMvc)packages\**;$(DirMvc)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesMVC)" DestinationFiles="@(ZipFilesMVC->'$(NameMvc)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NameMvc)" WorkingDirectory="$(To)" ZipFileName="$(NameMvc).zip" />
<ItemGroup>
<ZipFilesJava Include="$(DirJava)**" />
<ZipFilesJava Include="$(DirJava)**" Exclude="$(DirJava)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesJava)" DestinationFiles="@(ZipFilesJava->'$(NameJava)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NameJava)" WorkingDirectory="$(To)" ZipFileName="$(NameJava).zip" />
<ItemGroup>
<ZipFilesNodeJS Include="$(DirNodeJS)**" Exclude="$(DirNodeJS)node_modules\**" />
<ZipFilesSpring Include="$(DirSpring)**" Exclude="$(DirSpring)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesSpring)" DestinationFiles="@(ZipFilesSpring->'$(NameSpring)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NameSpring)" WorkingDirectory="$(To)" ZipFileName="$(NameSpring).zip" />
<ItemGroup>
<ZipFilesNodeJS Include="$(DirNodeJS)**" Exclude="$(DirNodeJS)node_modules\**;$(DirNodeJS)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesNodeJS)" DestinationFiles="@(ZipFilesNodeJS->'$(NameNodeJS)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NameNodeJS)" WorkingDirectory="$(To)" ZipFileName="$(NameNodeJS).zip" />
<ItemGroup>
<ZipFilesPHP Include="$(DirPHP)**" />
<ZipFilesPHP Include="$(DirPHP)**" Exclude="$(DirPHP)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesPHP)" DestinationFiles="@(ZipFilesPHP->'$(NamePHP)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NamePHP)" WorkingDirectory="$(To)" ZipFileName="$(NamePHP).zip" />
<ItemGroup>
<ZipFilesRuby Include="$(DirRuby)**" />
<ZipFilesRuby Include="$(DirRuby)**" Exclude="$(DirRuby)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesRuby)" DestinationFiles="@(ZipFilesRuby->'$(NameRuby)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NameRuby)" WorkingDirectory="$(To)" ZipFileName="$(NameRuby).zip" />
<ItemGroup>
<ZipFilesPython Include="$(DirPython)**" />
<ZipFilesPython Include="$(DirPython)**" Exclude="$(DirPython)**\.git" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesPython)" DestinationFiles="@(ZipFilesPython->'$(NamePython)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NamePython)" WorkingDirectory="$(To)" ZipFileName="$(NamePython).zip" />

View File

@ -1,17 +0,0 @@
# 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).

View File

@ -24,11 +24,15 @@ jQuery.UI - jQuery UI is an open source library of interface components —
License: MIT
License File: jQuery.UI.license
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
License: MIT
License File: JWT.license
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
License: MS-EULA License
License File: Microsoft.Web.Infrastructure.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
License: MIT
License File: Newtonsoft.Json.license

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -43,7 +43,8 @@ namespace OnlineEditorsExampleMVC
// create a style bundle
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/stylesheet.css",
"~/Content/jquery-ui.css"
"~/Content/jquery-ui.css",
"~/Content/media.css"
));
// create an editor style bundle

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -0,0 +1,6 @@
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#27ABA3"/>
<path d="M22.9165 0L29.9998 7.08333H25.9165C24.2597 7.08333 22.9165 5.74019 22.9165 4.08333V0Z" fill="#008078"/>
<rect x="6.5" y="15.5" width="17" height="5" stroke="white"/>
<rect x="6.5" y="23.5" width="17" height="5" stroke="white"/>
</svg>

After

Width:  |  Height:  |  Size: 477 B

View File

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 5C5 3.89543 5.89543 3 7 3H16C17.1046 3 18 3.89543 18 5V8H17V6H6V18H17V16H18V19C18 20.1046 17.1046 21 16 21H7C5.89543 21 5 20.1046 5 19V5ZM13 4H10V5H13V4ZM12 19.5C12 19.7761 11.7761 20 11.5 20C11.2239 20 11 19.7761 11 19.5C11 19.2239 11.2239 19 11.5 19C11.7761 19 12 19.2239 12 19.5Z" fill="#444444"/>
<rect x="7" y="9" width="1" height="6" fill="#444444"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 8V9L11 9V15H12V16H9V15H10V9H9V8H12Z" fill="#444444"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 10H18V14H15H14H13V15H14H18C18.5523 15 19 14.5523 19 14V10C19 9.44772 18.5523 9 18 9H14H13V10H14H15Z" fill="#444444"/>
</svg>

After

Width:  |  Height:  |  Size: 790 B

View File

@ -0,0 +1,684 @@
/**
*
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
@media (min-width: 1280px) and (max-width: 1380px) {
.copy {
margin-right: 6.5%;
}
footer table tr td:first-child {
margin-left: 6.5%;
}
}
@media (max-width: 1280px) and (min-width: 1080px) {
.tableRow td:first-child {
flex-grow: 1;
width: 25%;
}
.tableHeaderCellFileName {
width: 25%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
width: 29%;
text-align: right;
}
.tableHeaderCellDownload {
width: 21%;
padding-right: 18px;
}
.tableHeaderCellRemove {
padding-left: 13px;
}
footer table tr td:first-child {
margin-left: 5%;
}
.copy {
margin-right: 5%;
padding-right: 32px;
}
.left-panel {
margin-left: 48px;
width: 20%;
}
}
@media (max-width: 1080px) {
.copy {
margin-right: 32px;
}
footer table tr td:first-child {
margin-left: 0;
}
.tableRow {
width: 90%;
}
.tableHeaderCellFileName {
width: 16%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
width: 38%;
}
.tableHeaderCellDownload {
width: 23%;
}
.tableHeaderCellRemove {
padding-left: 0px;
}
}
@media (max-width: 1008px) {
.left-panel {
margin-left: 0;
}
.main-panel {
left: -1%;
padding: 48px 26px 24px;
}
}
@media (max-width: 769px) and (min-width: 593px) {
.contentCells-icon{
width: 5%;
}
.tableRow {
width: 55%;
}
.tableRow td:first-child {
border: none;
flex-grow: 1;
width: 100%;
max-width: 100%;
}
.tableHeader {
display: none;
}
.scroll-table-body {
top: 31px;
}
footer {
height: 80px;
}
.main {
height: calc(100% - 128px);
}
.main-panel {
left: 0;
padding: 48px 18px 24px;
}
footer table td {
margin-left: 0;
margin-right: 0;
padding-right: 4px;
padding-left: 4px;
}
.copy {
margin:auto;
padding-right: 3%;
}
footer table tr td:first-child {
margin-left: auto;
padding-left: 1%;
margin-right: 1.5%;
}
.contentCells-shift {
padding-right: 22px;
}
}
@media (max-width: 715px) {
.tableRow {
width: 45%;
}
}
@media (max-width: 670px) and (min-width: 620px){
.main-panel{
width: 90%;
}
}
@media (max-width: 681px) and (min-width: 593px) {
.left-panel {
width: 10%;
}
.main-panel {
left: 2%;
padding: 48px 0 24px;
}
.help-block {
margin: 48px 20px 24px;
}
.file-upload{
width: 100%;
}
#fileupload{
width: 100%;
}
}
@media (max-width: 1080px) and (min-width: 970px) {
.tableHeader {
width: 90%;
}
.tableRow td:first-child {
flex-grow: 0;
width: 15%;
}
.tableHeaderCellFileName {
width: 16%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
text-align: right;
width: 37%;
}
.tableHeaderCellDownload {
padding-right: 22px;
width: 22%;
}
}
@media (max-width: 986px) and (min-width: 890px) {
.tableHeader {
width: 75%;
}
.tableHeaderCellEditors {
width: 26%;
text-align: left;
}
.tableHeaderCellFileName {
width: 17%;
}
.tableHeaderCellViewers {
width: 27%;
text-align: right;
}
.tableHeaderCellDownload {
padding-right: 18px;
width: 20%;
}
.tableHeaderCellRemove {
padding-left: 0;
}
.tableRow {
width: 75%;
}
.tableRow td:last-child {
padding-right: 38px;
}
.tableRow td:first-child {
flex-grow: 0;
width: 15%;
}
.contentCells-icon {
width: 3%;
}
}
@media (max-width: 890px) and (min-width: 769px ) {
.left-panel{
width: 20%;
}
.contentCells-shift {
padding-right: 28px;
}
.main-panel {
width: 580px;
}
.tableRow {
width: 95%;
}
.tableHeader {
width: 95%;
}
.tableHeaderCellViewers {
width: 22%;
text-align: right;
}
.tableHeaderCellDownload {
padding-right: 4px;
width: 20%;
text-align: right;
}
.tableHeaderCellFileName {
width: 20%;
}
.tableHeaderCellEditors {
text-align: left;
width: 31%;
}
.tableHeaderCellViewers {
width: 18%;
}
}
@media (max-width: 890px) {
.tableRow td:first-child {
max-width: 17%;
}
#portal-info {
max-width: 60vw;
}
}
.downloadContentCellShift:after {
bottom: 0;
left: 0;
content: "";
background: #e5e5e5;
height: 1px;
position: absolute;
width: 100%;
}
@media (max-width: 769px) {
.tableRow td:first-child {
max-width: 100%;
}
}
@media (max-width: 593px ) {
#portal-info {
width: 50vw;
}
.file-upload{
width: 100%;
}
#fileupload{
width: 100%;
}
.tableHeader {
display: none;
}
.scroll-table-body {
top: 31px;
}
footer table tr {
justify-content: center;
}
footer table td {
padding-top: 16px;
padding-right: 32px;
padding-left: 32px;
}
footer {
height: 80px;
}
.main {
height: calc(100% - 128px);
}
.copy {
width: 100%;
text-align: center;
margin: 0;
}
.left-panel {
width: 10%;
}
.help-block {
margin: 16px 10px 6px;
}
.main-panel {
left: 2%;
padding: 16px 0 6px;
}
.tableRow {
width: 40%;
}
.tableRow td {
border: none;
}
.firstContentCellShift {
border: none;
flex-basis: 10%;
flex-grow: 1;
}
.downloadContentCellShift {
max-width: 7%;
margin-right: -11px;
margin-left: auto;
}
.contentCells-icon {
width: 13%;
}
.tableRow td:last-child {
width: 12%;
padding-right: 40px;
border: none;
}
.contentCells-shift {
padding-right: 35px;
}
.downloadContentCellShift:after {
width: 85%;
}
.firstContentCellViewers {
margin-left: 0;
border-bottom: 1px solid #e5e5e5 !important;
}
.firstContentCellViewers ~ td {
border-bottom: 1px solid #e5e5e5;
}
.tableRow td:first-child{
border: none;
width: 85%;
}
.contentCellsEmpty{
display: none;
width: 1%;
}
/* Mobile Upload*/
.blockUI.blockMsg.blockPage.ui-dialog.ui-widget.ui-corner-all.ui-widget-content.ui-draggable {
width: 344px !important;
box-shadow: 0px 7px 15px rgba(85, 85, 85, 0.1);
border-radius: 2px;
top: 10% !important;
margin-left: -172px !important;
}
.ui-dialog .ui-dialog-titlebar {
padding: 0;
}
.ui-dialog .ui-dialog-content {
padding: 0 !important;
}
#mainProgress {
margin: 24px 16px 0 !important;
}
.blockTitle {
padding: 10px 10px 6px 16px !important;
font-size: 14px !important;
}
#mainProgress .describeUpload {
padding: 8px 0 !important;
}
.dialog-close {
margin: 0 !important;
}
.step-descr{
line-height: 150%;
}
.step {
line-height: 160%;
}
.buttonsMobile{
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}
.button.gray{
margin: 0;
}
.button, .button:hover{
display: flex;
justify-content: center;
padding: 0 !important;
width: 144px;
height: 56px;
margin-bottom: 24px !important;
}
}
@media (max-width: 560px) and (min-width: 510px) {
.contentCells-icon {
width: 13%;
}
.downloadContentCellShift {
padding-right: 45px;
max-width: 4%;
}
}
@media (max-width: 510px) and (min-width: 470px) {
.tableRow {
width: 35%;
}
.tableRow td:first-child{
width: 83%;
}
.contentCells-icon {
width: 13%;
}
.downloadContentCellShift {
max-width: 6%;
padding-right: 37px;
}
.firstContentCellShift {
flex-basis: 9%;
}
.tableRow td:last-child {
padding-right: 28px;
}
}
@media (max-width: 470px) and (min-width: 420px) {
.tableRow {
width: 30%;
}
.tableRow td:first-child{
width: 85%;
}
.contentCells-icon {
width: 11%;
}
.downloadContentCellShift {
max-width: 3%;
padding-right: 37px;
padding-left: 0;
}
.firstContentCellShift {
margin-left: 1px;
flex-basis: 14%;
}
.tableRow td:last-child {
width: 5%;
padding-right: 63px;
}
.firstContentCellViewers{
padding-right: 2px;
width: 12%;
}
.contentCellsEmpty{
display: none;
}
}
@media (max-width: 420px) and (min-width: 320px) {
.tableRow {
width: 25%;
}
.tableRow td:last-child {
width: 6%;
padding-right: 16px;
}
.downloadContentCellShift {
max-width: 4%;
margin-right: -18px;
margin-left: -1px;
}
.firstContentCellShift {
flex-basis: 2%;
}
.contentCells-icon{
width: 10%;
}
footer table td {
margin: 0;
padding-right: 5px;
padding-left: 5px;
}
.copy {
padding-right: 5px;
margin: 0;
}
.firstContentCellViewers{
padding-right: 2px;
width: 11%;
}
}
@media (max-width: 1160px) {
.left-panel {
margin-left: 0;
}
}
@media (min-width: 593px) {
.contentCellsEmpty {
display: none;
}
}
@media (max-width: 769px) and (min-width: 715px){
.tableRow{
width: 50%;
}
}
@media (max-width: 510px) {
.tableRow td:first-child{
flex-grow: 0;
}
}
@media (max-width: 1100px) and (min-width: 890px){
.main-panel > span{
max-width: 70%;
}
}
@media (max-width: 780px) and (min-width: 600px) {
.main-panel{
display: flex;
flex-direction: column;
}
.main-panel > span{
max-width: 45%;
}
}
@media (max-width: 600px) and (min-width: 320px) {
.main-panel{
display: flex;
flex-direction: column;
}
}
@media (max-width:600px) and (min-width:500px){
.main-panel > span{
max-width:35%;
}
}
@media (max-width:500px) and (min-width:400px){
.main-panel > span{
max-width:20%;
}
}
@media (max-width:400px) and (min-width:320px){
.main-panel > span{
max-width:15%;
}
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -22,6 +22,7 @@
}
body {
display: block;
background: #FFFFFF;
color: #333333;
font-family: Open Sans;
@ -33,6 +34,7 @@ body {
overflow-y: overlay;
padding: 0;
text-decoration: none;
overflow-x:hidden;
}
form {
@ -53,23 +55,25 @@ a:visited {
header {
background: #333333;
height: 72px;
height: 48px;
margin: 0 auto;
min-width: 1152px;
width: auto;
}
header img {
margin: 22px 0 22px 32px;
margin: 10px 0 22px 32px;
}
.center {
position:relative;
margin: 0 auto 0;
width: 1152px;
}
.main {
height: calc(100% - 136px);
display: table;
height: calc(100% - 112px);
min-height: 536px;
}
@ -95,6 +99,10 @@ header img {
width: 896px;
}
#portal-info {
max-width: 65vw;
}
.portal-name {
color: #FF6F3D;
font-size: 24px;
@ -155,7 +163,11 @@ label .checkbox {
background-image: url("images/file_pptx.svg");
}
.create-sample {
.try-editor.form {
background-image: url("images/file_docxf.svg");
}
.side-option {
color: #666666;
line-height: 24px;
}
@ -354,19 +366,33 @@ footer {
background: #333333;
color: #AAAAAA;
height: 64px;
min-width: 1152px;
width: auto;
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;
}
@ -381,9 +407,15 @@ footer a:visited {
footer a:hover {
text-decoration: none;
}
footer table tr td:first-child {
margin-left: 14%;
}
.copy {
padding-left: 510px;
color:#aaaaaa;
width:max-content;
position:relative;
margin-left:auto;
margin-right:14%;
}
.help-block {
@ -540,6 +572,7 @@ footer a:hover {
}
.contentCells {
display: block;
border-bottom: 1px solid #EFEFEF;
font-family: 'Open Sans', sans-serif;
font-size: 16px;
@ -569,31 +602,7 @@ footer a:hover {
.info {
cursor: pointer;
padding: 3px 5px;
position: absolute;
}
.tooltip {
background: #FFFFFF;
border-radius: 5px;
box-shadow: 0px 7px 25px rgba(85, 85, 85, 0.15);
color: #666666;
line-height: 160%;
max-width: 455px;
padding: 14px;
position: absolute;
}
.tooltip ul {
margin: 0;
}
.arrow {
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-right: 8px solid #FFFFFF;
position: absolute;
transform: translate(-50%, -50%);
margin: -2px 5px;
}
.user-block-table {
@ -681,4 +690,78 @@ footer a:hover {
line-height: 160%;
letter-spacing: -0.02em;
word-wrap: break-word;
}
}
html {
overflow-x: hidden;
}
.tableRow {
width: 100%;
display: flex;
flex-wrap: wrap;
flex-direction: row;
position: relative;
}
.tableRow td:first-child {
display: flex;
flex-grow: 1;
max-width: 25%;
}
.tableHeaderCellFileName {
width: 30%;
}
.tableHeaderCellEditors {
width: 28%;
}
.tableHeaderCellViewers {
text-align: center;
width: 18%
}
.firstContentCellViewers {
margin-left: auto;
}
.user-descr {
display: inline-table;
width: 30vw;
min-width: 200px;
max-width: 400px;
margin-top: 20px;
}
.user-descr > b {
margin-left: 25px;
}
.tooltip {
background: #FFFFFF;
border-radius: 5px;
box-shadow: 0px 7px 25px rgba(85, 85, 85, 0.15);
color: #666666;
line-height: 160%;
max-width: 455px;
padding: 14px;
position: absolute;
}
.tooltip ul {
margin: 0;
}
.arrow {
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-right: 8px solid #FFFFFF;
left: -4px;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,6 +16,7 @@
*
*/
using System;
using System.IO;
using System.Web.Mvc;
using OnlineEditorsExampleMVC.Helpers;
@ -31,13 +32,14 @@ namespace OnlineEditorsExampleMVC.Controllers
}
// viewing file in the editor
public ActionResult Editor(string fileName, string editorsMode, string editorsType)
public ActionResult Editor(string fileName, string editorsMode, string editorsType, string directUrl)
{
var file = new FileModel
{
Mode = editorsMode, // editor mode: edit or view
Type = editorsType, // editor type: desktop, mobile, embedded
FileName = Path.GetFileName(fileName) // file name
FileName = Path.GetFileName(fileName), // file name
IsEnabledDirectUrl = directUrl != null ? Convert.ToBoolean(directUrl) : false
};
return View("Editor", file);

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -25,6 +25,7 @@ using System.Web;
using System.Web.Configuration;
using System.Web.Script.Serialization;
using OnlineEditorsExampleMVC.Models;
using System.Net;
namespace OnlineEditorsExampleMVC.Helpers
{
@ -44,7 +45,7 @@ namespace OnlineEditorsExampleMVC.Helpers
// get all the supported file extensions
public static List<string> FileExts
{
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).ToList(); }
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).Concat(FillFormExts).ToList(); }
}
// get file extensions that can be viewed
@ -53,6 +54,11 @@ namespace OnlineEditorsExampleMVC.Helpers
get { return (WebConfigurationManager.AppSettings["files.docservice.viewed-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
}
public static List<string> FillFormExts
{
get { return (WebConfigurationManager.AppSettings["files.docservice.fillform-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
}
// get file extensions that can be edited
public static List<string> EditedExts
{
@ -74,19 +80,37 @@ namespace OnlineEditorsExampleMVC.Helpers
// get the storage path of the file
public static string StoragePath(string fileName, string userAddress = null)
{
var directory = HttpRuntime.AppDomainAppPath + CurUserHostAddress(userAddress) + "\\";
var directory = "";
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
{
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
}
else
{
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
}
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
}
return directory + Path.GetFileName(fileName);
return directory + (fileName.Contains("\\") ? fileName : 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 = HttpRuntime.AppDomainAppPath + CurUserHostAddress(userAddress) + "\\";
var directory = "";
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
{
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
}
else
{
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
}
if (!Directory.Exists(directory))
{
return "";
@ -106,6 +130,7 @@ namespace OnlineEditorsExampleMVC.Helpers
}
}
// get the path to the given file
directory = directory + Path.GetFileName(fileName);
if (!File.Exists(directory))
{
@ -139,7 +164,7 @@ namespace OnlineEditorsExampleMVC.Helpers
// 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
if (!Directory.Exists(historyPath)) return 1; // if the history path doesn't exist, then the file version is 1
return Directory.EnumerateDirectories(historyPath).Count() + 1; // take only directories from the history folder and count them
}
@ -166,7 +191,16 @@ namespace OnlineEditorsExampleMVC.Helpers
// get all the stored files from the user host address
public static List<FileInfo> GetStoredFiles()
{
var directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(null) + "\\";
var directory = "";
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
{
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
}
else
{
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(null) + "\\";
}
if (!Directory.Exists(directory)) return new List<FileInfo>();
var directoryInfo = new DirectoryInfo(directory);
@ -208,7 +242,8 @@ namespace OnlineEditorsExampleMVC.Helpers
{
var uri = new UriBuilder(GetServerUrl(forDocumentServer))
{
Path = HttpRuntime.AppDomainAppVirtualPath + "/"
Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ CurUserHostAddress() + "/"
+ fileName,
Query = ""
@ -222,8 +257,7 @@ namespace OnlineEditorsExampleMVC.Helpers
{
var uri = new UriBuilder(GetServerUrl(true))
{
Path = HttpRuntime.AppDomainAppVirtualPath + "/"
+ path,
Path = HttpRuntime.AppDomainAppVirtualPath + "/" + path,
Query = ""
};
@ -259,11 +293,12 @@ namespace OnlineEditorsExampleMVC.Helpers
+ "webeditor.ashx",
Query = "type=track"
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
+ "&userAddress=" + HttpUtility.UrlEncode(HttpContext.Current.Request.UserHostAddress)
+ "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))
};
return callbackUrl.ToString();
}
// get url to the created file
public static string GetCreateUrl(FileUtility.FileType fileType)
{
var createUrl = new UriBuilder(GetServerUrl(false))
@ -277,9 +312,30 @@ namespace OnlineEditorsExampleMVC.Helpers
return createUrl.ToString();
}
public static string GetDownloadUrl(string fileName)
// create the public history url
public static string GetHistoryDownloadUrl(string filename, string version, string file, Boolean isServer = true)
{
var downloadUrl = new UriBuilder(GetServerUrl(true))
var userAddress = "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress));
var downloadUrl = new UriBuilder(GetServerUrl(isServer))
{
Path =
HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx",
Query = "type=downloadhistory"
+ "&fileName=" + HttpUtility.UrlEncode(filename)
+ userAddress
+ "&ver=" + version
+ "&file="+ file
};
return downloadUrl.ToString();
}
// get url to download a file
public static string GetDownloadUrl(string fileName, Boolean isServer = true)
{
var userAddress = isServer ? "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)) : "";
var downloadUrl = new UriBuilder(GetServerUrl(isServer))
{
Path =
HttpRuntime.AppDomainAppVirtualPath
@ -287,7 +343,7 @@ namespace OnlineEditorsExampleMVC.Helpers
+ "webeditor.ashx",
Query = "type=download"
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
+ "&userAddress=" + HttpUtility.UrlEncode(HttpContext.Current.Request.UserHostAddress)
+ userAddress
};
return downloadUrl.ToString();
}
@ -364,5 +420,33 @@ namespace OnlineEditorsExampleMVC.Helpers
return files;
}
// enable certificate ignore
public static void VerifySSL()
{
// hack. http://ubuntuforums.org/showthread.php?t=1841740
if(WebConfigurationManager.AppSettings["files.docservice.verify-peer-off"].Equals("true")) {
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
}
}
public static Dictionary<string, string> GetLanguages()
{
var languages = new Dictionary<string, string>();
String[] couples = (WebConfigurationManager.AppSettings["files.docservice.languages"] ?? "").Split('|');
foreach (string couple in couples)
{
String[] tmp = couple.Split(':');
languages.Add(tmp[0],tmp[1]);
}
return languages;
}
public static string GetDirectUrl()
{
string isEnabledDirectUrl = HttpUtility.ParseQueryString(HttpContext.Current.Request.Url.Query).Get("directUrl");
return isEnabledDirectUrl != null ? isEnabledDirectUrl : "false";
}
}
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -82,7 +82,8 @@ namespace OnlineEditorsExampleMVC.Helpers
string documentRevisionId,
bool isAsync,
out string convertedDocumentUri,
string filePass = null)
string filePass = null,
string lang = null)
{
convertedDocumentUri = string.Empty;
@ -114,7 +115,8 @@ namespace OnlineEditorsExampleMVC.Helpers
{ "outputtype", toExtension.Trim('.') },
{ "title", title },
{ "url", documentUri },
{ "password", filePass }
{ "password", filePass },
{ "region", lang }
};
if (JwtManager.Enabled)
@ -128,7 +130,7 @@ namespace OnlineEditorsExampleMVC.Helpers
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 = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
request.Headers.Add(JWTheader, "Bearer " + payloadToken);
body.Add("token", bodyToken);
@ -141,6 +143,8 @@ namespace OnlineEditorsExampleMVC.Helpers
requestStream.Write(bytes, 0, bytes.Length); // and write the serialized body object to it
}
DocManagerHelper.VerifySSL();
string dataResponse;
using (var response = request.GetResponse())
using (var stream = response.GetResponseStream()) // get the response stream

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,12 +16,12 @@
*
*/
using System;
using JWT;
using JWT.Algorithms;
using JWT.Builder;
using JWT.Serializers;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Web.Configuration;
using System.Web.Script.Serialization;
namespace OnlineEditorsExampleMVC.Helpers
{
@ -30,31 +30,19 @@ namespace OnlineEditorsExampleMVC.Helpers
private static readonly string Secret;
public static readonly bool Enabled;
private static readonly JavaScriptSerializer Serializer;
static JwtManager()
{
Secret = WebConfigurationManager.AppSettings["files.docservice.secret"] ?? ""; // get token secret from the config parameters
Enabled = !string.IsNullOrEmpty(Secret); // check if the token is enabled
Serializer = new JavaScriptSerializer(); // define java script serializer
}
// 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(Serializer.Serialize(header)); // header
var encPayload = Base64UrlEncode(Serializer.Serialize(payload)); // payload
var hashSum = Base64UrlEncode(CalculateHash(encHeader, encPayload)); // signature
return string.Format("{0}.{1}.{2}", encHeader, encPayload, hashSum);
var encoder = new JwtEncoder(new HMACSHA256Algorithm(),
new JsonNetSerializer(),
new JwtBase64UrlEncoder());
return encoder.Encode(payload, Secret);
}
// decode a token into a payload object using a secret key
@ -62,52 +50,11 @@ namespace OnlineEditorsExampleMVC.Helpers
{
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);
return JwtBuilder.Create()
.WithAlgorithm(new HMACSHA256Algorithm())
.WithSecret(Secret)
.MustVerifySignature()
.Decode(token);
}
}
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -55,7 +55,7 @@ namespace OnlineEditorsExampleMVC.Helpers
// check if the document token is enabled
if (JwtManager.Enabled)
{
string JWTheader = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string token = null;
@ -76,7 +76,9 @@ namespace OnlineEditorsExampleMVC.Helpers
if (token != null && !token.Equals("")) // invalid signature error
{
fileData = (Dictionary<string, object>)jss.Deserialize<Dictionary<string, object>>(token)["payload"];
fileData = jss.Deserialize<Dictionary<string, object>>(token);
if (fileData.ContainsKey("payload"))
fileData = (Dictionary<string, object>)fileData["payload"];
}
else
{
@ -90,9 +92,14 @@ namespace OnlineEditorsExampleMVC.Helpers
// file saving process
public static int processSave(Dictionary<string, object> fileData, string fileName, string userAddress)
{
if (string.IsNullOrEmpty((string)fileData["url"])) {
throw new Exception("DownloadUrl is null");
}
var downloadUri = (string)fileData["url"];
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
string downloadExt = Path.GetExtension(downloadUri).ToLower() ?? ""; // get the extension of the downloaded file
var downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
var newFileName = fileName;
// convert downloaded file to the file with the current extension if these extensions aren't equal
@ -119,37 +126,50 @@ namespace OnlineEditorsExampleMVC.Helpers
}
}
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);
DocManagerHelper.VerifySSL();
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"))
try
{
var jss = new JavaScriptSerializer();
hist = jss.Serialize(fileData["history"]);
}
var bytesFile = DownloadFile(downloadUri); // download document file
var storagePath = DocManagerHelper.StoragePath(newFileName, userAddress); // get the file path
if (!string.IsNullOrEmpty(hist))
var histDir = DocManagerHelper.HistoryDir(storagePath); // get the path to the history directory
if (!Directory.Exists(histDir)) Directory.CreateDirectory(histDir);
var versionDir = DocManagerHelper.VersionDir(histDir, DocManagerHelper.GetFileVersion(histDir)); // get the path to the file version
if (!Directory.Exists(versionDir)) Directory.CreateDirectory(versionDir); // if the path doesn't exist, create it
// get the path to the previous file version and move it to the storage directory
File.Move(DocManagerHelper.StoragePath(fileName, userAddress), Path.Combine(versionDir, "prev" + curExt));
SaveFile(bytesFile, storagePath);// save document file
byte[] bytesChanges = DownloadFile((string)fileData["changesurl"]); // download changes file
SaveFile(bytesChanges, Path.Combine(versionDir, "diff.zip")); // save file changes to the diff.zip archive
var hist = fileData.ContainsKey("changeshistory") ? (string)fileData["changeshistory"] : null;
if (string.IsNullOrEmpty(hist) && fileData.ContainsKey("history"))
{
var jss = new JavaScriptSerializer();
hist = jss.Serialize(fileData["history"]);
}
if (!string.IsNullOrEmpty(hist))
{
File.WriteAllText(Path.Combine(versionDir, "changes.json"), hist); // write the history changes to the changes.json file
}
File.WriteAllText(Path.Combine(versionDir, "key.txt"), (string)fileData["key"]); // write the key value to the key.txt file
string forcesavePath = DocManagerHelper.ForcesavePath(newFileName, userAddress, false); // get the path to the forcesaved file version
if (!forcesavePath.Equals("")) // if the forcesaved file version exists
{
File.Delete(forcesavePath); // remove it
}
} catch (Exception)
{
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 1;
}
return 0;
@ -158,10 +178,15 @@ namespace OnlineEditorsExampleMVC.Helpers
// file force saving process
public static int processForceSave(Dictionary<string, object> fileData, string fileName, string userAddress)
{
if ( string.IsNullOrEmpty((string)fileData["url"])) {
throw new Exception("DownloadUrl is null");
}
var downloadUri = (string)fileData["url"];
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
string downloadExt = Path.GetExtension(downloadUri).ToLower(); // get the extension of the downloaded file
var downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
Boolean newFileName = false;
// convert downloaded file to the file with the current extension if these extensions aren't equal
@ -187,50 +212,62 @@ namespace OnlineEditorsExampleMVC.Helpers
}
}
string forcesavePath = "";
Boolean isSubmitForm = fileData["forcesavetype"].ToString().Equals("3"); // SubmitForm
DocManagerHelper.VerifySSL();
if (isSubmitForm) // if the form is submitted
try
{
if (newFileName)
var bytesFile = DownloadFile(downloadUri); // download document file
string forcesavePath = "";
Boolean isSubmitForm = fileData["forcesavetype"].ToString().Equals("3"); // SubmitForm
if (isSubmitForm) // if the form is submitted
{
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + downloadExt, userAddress); // get the correct file name if it already exists
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);
{
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + curExt, userAddress);
}
forcesavePath = DocManagerHelper.StoragePath(fileName, userAddress);
}
forcesavePath = DocManagerHelper.StoragePath(fileName, userAddress);
}
else
{
if (newFileName)
else
{
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
if (newFileName)
{
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
}
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false);
if (string.IsNullOrEmpty(forcesavePath)) // create forcesave path if it doesn't exist
{
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, true);
}
}
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);
SaveFile(bytesFile, forcesavePath);// save document file
if (isSubmitForm)
if (isSubmitForm)
{
var jss = new JavaScriptSerializer();
var actions = jss.Deserialize<List<object>>(jss.Serialize(fileData["actions"]));
var action = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(actions[0]));
var user = action["userid"].ToString(); // get the user id
DocManagerHelper.CreateMeta(fileName, user, "Filling Form", userAddress); // create meta data for the forcesaved file
}
} catch (Exception)
{
var jss = new JavaScriptSerializer();
var actions = jss.Deserialize<List<object>>(jss.Serialize(fileData["actions"]));
var action = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(actions[0]));
var user = action["userid"].ToString(); // get the user id
DocManagerHelper.CreateMeta(fileName, user, "Filling Form", userAddress); // create meta data for the forcesaved file
return 1;
}
return 0;
}
// create a command request
public static void commandRequest(string method, string key)
public static void commandRequest(string method, string key, object meta = null)
{
DocManagerHelper.VerifySSL();
string documentCommandUrl = WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.command"];
var request = (HttpWebRequest)WebRequest.Create(documentCommandUrl);
@ -242,6 +279,11 @@ namespace OnlineEditorsExampleMVC.Helpers
{ "key", key }
};
if (meta != null)
{
body.Add("meta", meta);
}
// check if a secret key to generate token exists or not
if (JwtManager.Enabled)
{
@ -252,7 +294,7 @@ namespace OnlineEditorsExampleMVC.Helpers
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 = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
request.Headers.Add(JWTheader, "Bearer " + payloadToken); // add a header Authorization with a header token and Authorization prefix in it
body.Add("token", bodyToken);
@ -287,26 +329,30 @@ namespace OnlineEditorsExampleMVC.Helpers
}
}
// save file
private static void SaveFile(byte[] data, string path)
{
using (var fs = File.Open(path, FileMode.Create))
{
fs.Write(data, 0, data.Length);
}
}
// save file information from the url to the file specified
private static void DownloadToFile(string url, string path)
private static byte[] DownloadFile(string url)
{
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);
req.Timeout = 5000;
using (var stream = req.GetResponse().GetResponseStream()) // get input stream of the file information from the url
{
if (stream == null) throw new Exception("stream is null");
const int bufferSize = 4096;
using (var fs = File.Open(path, FileMode.Create))
using (MemoryStream memoryStream = new MemoryStream())
{
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
}
stream.CopyTo(memoryStream);
return memoryStream.ToArray();
}
}
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -30,7 +30,8 @@ namespace OnlineEditorsExampleMVC.Helpers
"Can review all the changes",
"Can perform all actions with comments",
"The file favorite state is undefined",
"Can create files from templates using data from the editor"
"Can create files from templates using data from the editor",
"Can see the information about all users"
};
static List<string> descr_user_2 = new List<string>()
@ -39,7 +40,8 @@ namespace OnlineEditorsExampleMVC.Helpers
"Can review only his own changes or changes made by users with no group",
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
"This file is marked as favorite",
"Can create new files from the editor"
"Can create new files from the editor",
"Can see the information about users from Group2 and users who dont belong to any group"
};
static List<string> descr_user_3 = new List<string>()
@ -51,7 +53,8 @@ namespace OnlineEditorsExampleMVC.Helpers
"Cant copy data from the file to clipboard",
"Cant download the file",
"Cant print the file",
"Can create new files from the editor"
"Can create new files from the editor",
"Can see the information about Group2 users"
};
static List<string> descr_user_0 = new List<string>()
@ -62,18 +65,23 @@ namespace OnlineEditorsExampleMVC.Helpers
"Can perform all actions with comments",
"The file favorite state is undefined",
"Can't mention others in comments",
"Can't create new files from the editor"
"Can't create new files from the editor",
"Cant see anyones information",
"Can't rename files from the editor",
"Can't view chat",
"View file without collaboration",
};
private static List<User> users = new List<User>() {
new User(
"uid-1",
"John Smith",
"smith@mail.ru",
null,
"smith@example.com",
"",
null,
new Dictionary<string, object>(),
null,
null,
new List<string>(),
descr_user_1,
true
@ -81,7 +89,7 @@ namespace OnlineEditorsExampleMVC.Helpers
new User(
"uid-2",
"Mark Pottato",
"pottato@mail.ru",
"pottato@example.com",
"group-2",
new List<string>() { "group-2", "" },
new Dictionary<string, object>()
@ -90,6 +98,7 @@ namespace OnlineEditorsExampleMVC.Helpers
{ "edit", new List<string>() { "group-2", "" } },
{ "remove", new List<string>() { "group-2" } }
},
new List<string>() { "group-2", "" },
true,
new List<string>(),
descr_user_2,
@ -98,7 +107,7 @@ namespace OnlineEditorsExampleMVC.Helpers
new User(
"uid-3",
"Hamish Mitchell",
"mitchell@mail.ru",
"mitchell@example.com",
"group-3",
new List<string>() { "group-2" },
new Dictionary<string,object>()
@ -107,6 +116,7 @@ namespace OnlineEditorsExampleMVC.Helpers
{ "edit", new List<string>() { "group-2" } },
{ "remove", new List<string>() { } }
},
new List<string>() { "group-2" },
false,
new List<string>() { "copy", "download", "print" },
descr_user_3,
@ -116,9 +126,10 @@ namespace OnlineEditorsExampleMVC.Helpers
"uid-0",
null,
null,
null,
"",
null,
new Dictionary<string,object>(),
new List<string>(),
null,
new List<string>(),
descr_user_0,
@ -126,6 +137,7 @@ namespace OnlineEditorsExampleMVC.Helpers
)
};
// get a user by id specified
public static User getUser(string id)
{
foreach(User user in users)
@ -135,11 +147,13 @@ namespace OnlineEditorsExampleMVC.Helpers
return users[0];
}
// get a list of all the users
public static List<User> getAllUsers()
{
return users;
}
// get a list of users with their names and emails for mentions
public static List<Dictionary<string, object>> getUsersForMentions(string id)
{
List<Dictionary<string, object>> usersData = new List<Dictionary<string, object>>();
@ -170,8 +184,9 @@ namespace OnlineEditorsExampleMVC.Helpers
public List<string> deniedPermissions;
public List<string> descriptions;
public bool templates;
public List<string> userInfoGroups;
public User(string id, string name, string email, string group, List<string> reviewGroups, Dictionary<string, object> commentGroups, bool? favorite, List<string> deniedPermissions, List<string> descriptions, bool templates)
public User(string id, string name, string email, string group, List<string> reviewGroups, Dictionary<string, object> commentGroups, List<string> userInfoGroups, bool? favorite, List<string> deniedPermissions, List<string> descriptions, bool templates)
{
this.id = id;
this.name = name;
@ -183,6 +198,7 @@ namespace OnlineEditorsExampleMVC.Helpers
this.deniedPermissions = deniedPermissions;
this.descriptions = descriptions;
this.templates = templates;
this.userInfoGroups = userInfoGroups;
}
}
}

View File

@ -1,4 +1,22 @@
using System.Web;
/**
*
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Web;
namespace OnlineEditorsExampleMVC.Helpers
{

116
web/documentserver-example/csharp-mvc/Models/FileModel.cs Normal file → Executable file
View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,6 +21,7 @@ using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Web;
using System.Web.Configuration;
using System.Web.Mvc;
using System.Web.Script.Serialization;
using OnlineEditorsExampleMVC.Helpers;
@ -32,6 +33,7 @@ namespace OnlineEditorsExampleMVC.Models
{
public string Mode { get; set; } // editor mode
public string Type { get; set; } // editor type
public bool IsEnabledDirectUrl { get; set; } // is enabled direct url
// get file url for Document Server
public string FileUri
@ -42,7 +44,7 @@ namespace OnlineEditorsExampleMVC.Models
// get file url for user
public string FileUriUser
{
get { return DocManagerHelper.GetFileUri(FileName, false); }
get { return Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? DownloadUrl + "&dmode=emb" : DocManagerHelper.GetFileUri(FileName, false); }
}
public string FileName { get; set; } // file name
@ -79,11 +81,16 @@ namespace OnlineEditorsExampleMVC.Models
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 = request.Cookies.GetOrDefault("uid", null);
var user = Users.getUser(id); // get the user
if ((!canEdit && editorsMode.Equals("edit") || editorsMode.Equals("fillForms")) && DocManagerHelper.FillFormExts.Contains(ext)) {
editorsMode = "fillForms";
canEdit = true;
}
var submitForm = editorsMode.Equals("fillForms") && id.Equals("uid-1") && false; // check if the Submit form button is displayed or not
var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // set the mode parameter: change it to view if the document can't be edited
// favorite icon state
bool? favorite = user.favorite;
@ -91,13 +98,14 @@ namespace OnlineEditorsExampleMVC.Models
var actionLink = request.GetOrDefault("actionLink", null); // get the action link (comment or bookmark) if it exists
var actionData = string.IsNullOrEmpty(actionLink) ? null : jss.DeserializeObject(actionLink); // get action data for the action link
var directUrl = DocManagerHelper.GetDownloadUrl(FileName, false);
var createUrl = DocManagerHelper.GetCreateUrl(FileUtility.GetFileType(FileName));
var templatesImageUrl = DocManagerHelper.GetTemplateImageUrl(FileUtility.GetFileType(FileName)); // image url for templates
var templates = new List<Dictionary<string, string>>
{
new Dictionary<string, string>()
{
{ "image", templatesImageUrl },
{ "image", "" },
{ "title", "Blank" },
{ "url", createUrl },
},
@ -119,6 +127,7 @@ namespace OnlineEditorsExampleMVC.Models
{
{ "title", FileName },
{ "url", DownloadUrl },
{ "directUrl", IsEnabledDirectUrl ? directUrl : "" },
{ "fileType", ext.Trim('.') },
{ "key", Key },
{
@ -142,8 +151,10 @@ namespace OnlineEditorsExampleMVC.Models
{ "modifyFilter", editorsMode != "filter" },
{ "modifyContentControl", editorsMode != "blockcontent" },
{ "review", canEdit && (editorsMode == "edit" || editorsMode == "review") },
{ "chat", !user.id.Equals("uid-0") },
{ "reviewGroups", user.reviewGroups },
{ "commentGroups", user.commentGroups }
{ "commentGroups", user.commentGroups },
{ "userInfoGroups", user.userInfoGroups }
}
}
}
@ -155,13 +166,18 @@ namespace OnlineEditorsExampleMVC.Models
{ "mode", mode },
{ "lang", request.Cookies.GetOrDefault("ulang", "en") },
{ "callbackUrl", CallbackUrl }, // absolute URL to the document storage service
{ "coEditing", editorsMode == "view" && user.id.Equals("uid-0") ?
new Dictionary<string, object>{
{"mode", "strict"},
{"change", false}
} : null },
{ "createUrl", !user.id.Equals("uid-0") ? createUrl : null },
{ "templates", user.templates ? templates : null },
{
// the user currently viewing or editing the document
"user", new Dictionary<string, object>
{
{ "id", user.id },
{ "id", !user.id.Equals("uid-0") ? user.id : null },
{ "name", user.name },
{ "group", user.group }
}
@ -170,9 +186,9 @@ namespace OnlineEditorsExampleMVC.Models
// 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
{ "saveUrl", directUrl }, // the absolute URL that will allow the document to be saved onto the user personal computer
{ "embedUrl", directUrl }, // the absolute URL to the document serving as a source file for the document embedded into the web page
{ "shareUrl", directUrl }, // the absolute URL that will allow other users to share this document
{ "toolbarDocked", "top" } // the place for the embedded viewer toolbar (top or bottom)
}
},
@ -181,13 +197,14 @@ namespace OnlineEditorsExampleMVC.Models
"customization", new Dictionary<string, object>
{
{ "about", true }, // the About section display
{ "comments", true },
{ "feedback", true }, // the Feedback & Support menu button display
{ "forcesave", false }, // adds the request for the forced file saving to the callback handler
{ "submitForm", submitForm }, // if the Submit form button is displayed or not
{
"goback", new Dictionary<string, object> // settings for the Open file location menu button and upper right corner button
{
{ "url", url.Action("Index", "Home") } // the absolute URL to the website address which will be opened when clicking the Open file location menu button
{ "url", DocManagerHelper.GetServerUrl(false) } // the absolute URL to the website address which will be opened when clicking the Open file location menu button
}
}
}
@ -209,7 +226,8 @@ namespace OnlineEditorsExampleMVC.Models
// get the document history
public void GetHistory(out string history, out string historyData)
{
{
var storagePath = WebConfigurationManager.AppSettings["storage-path"];
var jss = new JavaScriptSerializer();
var histDir = DocManagerHelper.HistoryDir(DocManagerHelper.StoragePath(FileName, null));
@ -248,9 +266,31 @@ namespace OnlineEditorsExampleMVC.Models
}
}
var ext = Path.GetExtension(FileName).ToLower();
dataObj.Add("fileType", ext.Replace(".", ""));
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(HttpRuntime.AppDomainAppPath.Length)));
string prevFileUrl;
string directPrevFileUrl;
if (Path.IsPathRooted(storagePath) && !string.IsNullOrEmpty(storagePath))
{
prevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext)
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""));
directPrevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext, false)
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""), false);
}
else {
prevFileUrl = i == currentVersion ? FileUri
: DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext);
directPrevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext, false)
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""), false);
}
dataObj.Add("url", prevFileUrl);
if (IsEnabledDirectUrl)
{
dataObj.Add("directUrl", directPrevFileUrl);
}
dataObj.Add("version", i);
if (i > 1) // check if the version number is greater than 1 (the file was modified)
{
@ -268,12 +308,19 @@ namespace OnlineEditorsExampleMVC.Models
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
dataObj.Add("previous", IsEnabledDirectUrl ? new Dictionary<string, object>() { // write information about previous file version to the data object with direct url
{ "fileType", prev["fileType"] },
{ "key", prev["key"] }, // write key and url information about previous file version
{ "url", prev["url"] },
{ "directUrl", prev["directUrl"] },
} : new Dictionary<string, object>() { // write information about previous file version to the data object without direct url
{ "fileType", prev["fileType"] },
{ "key", prev["key"] }, // write key and url information about previous file version
{ "url", prev["url"] },
});
// write the path to the diff.zip archive with differences in this file version
dataObj.Add("changesUrl", DocManagerHelper.GetPathUri(Path.Combine(DocManagerHelper.VersionDir(histDir, i - 1), "diff.zip").Substring(HttpRuntime.AppDomainAppPath.Length)));
var changesUrl = DocManagerHelper.GetHistoryDownloadUrl(FileName, (i - 1).ToString(), "diff.zip");
dataObj.Add("changesUrl", changesUrl);
}
if(JwtManager.Enabled)
{
@ -308,6 +355,14 @@ namespace OnlineEditorsExampleMVC.Models
Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx")
};
var directCompareFileUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
{
Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx",
Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx")
};
// create an object with the information about the compared file
var dataCompareFile = new Dictionary<string, object>
{
@ -315,6 +370,11 @@ namespace OnlineEditorsExampleMVC.Models
{ "url", compareFileUrl.ToString() }
};
if (IsEnabledDirectUrl)
{
dataCompareFile.Add("directUrl", directCompareFileUrl.ToString());
}
if (JwtManager.Enabled) // if the secret key to generate token exists
{
var compareFileToken = JwtManager.Encode(dataCompareFile); // encode the dataCompareFile object into the token
@ -337,6 +397,13 @@ namespace OnlineEditorsExampleMVC.Models
+ "Content\\images\\logo.png"
};
var directMailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
{
Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "Content\\images\\logo.png"
};
// create a logo config
var logoConfig = new Dictionary<string, object>
{
@ -344,6 +411,11 @@ namespace OnlineEditorsExampleMVC.Models
{ "url", mailMergeUrl.ToString()}
};
if (IsEnabledDirectUrl)
{
logoConfig.Add("directUrl", directMailMergeUrl.ToString());
}
if (JwtManager.Enabled) // if the secret key to generate token exists
{
var token = JwtManager.Encode(logoConfig); // encode logoConfig into the token
@ -368,6 +440,15 @@ namespace OnlineEditorsExampleMVC.Models
Query = "type=csv"
};
var directMailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
{
Path =
HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx",
Query = "type=csv"
};
// create a mail merge config
var mailMergeConfig = new Dictionary<string, object>
{
@ -375,6 +456,11 @@ namespace OnlineEditorsExampleMVC.Models
{ "url", mailMergeUrl.ToString()}
};
if (IsEnabledDirectUrl)
{
mailMergeConfig.Add("directUrl", directMailMergeUrl.ToString());
}
if (JwtManager.Enabled) // if the secret key to generate token exists
{
var mailmergeToken = JwtManager.Encode(mailMergeConfig); // encode mailMergeConfig into the token

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -49,13 +49,13 @@ namespace OnlineEditorsExampleMVC.Models
".dot", ".dotx", ".dotm",
".odt", ".fodt", ".ott", ".rtf", ".txt",
".html", ".htm", ".mht", ".xml",
".pdf", ".djvu", ".fb2", ".epub", ".xps"
".pdf", ".djvu", ".fb2", ".epub", ".xps", ".oxps", ".oform"
};
// spreadsheet extensions
public static readonly List<string> ExtsSpreadsheet = new List<string>
{
".xls", ".xlsx", ".xlsm",
".xls", ".xlsx", ".xlsm", ".xlsb",
".xlt", ".xltx", ".xltm",
".ods", ".fods", ".ots", ".csv"
};

View File

@ -13,7 +13,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineEditorsExampleMVC</RootNamespace>
<AssemblyName>OnlineEditorsExampleMVC</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
@ -43,6 +43,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="JWT, Version=9.0.0.0, Culture=neutral, PublicKeyToken=6f98bca0f40f2ecf, processorArchitecture=MSIL">
<HintPath>packages\JWT.9.0.3\lib\net46\JWT.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
@ -50,49 +53,49 @@
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Services" />
<Reference Include="Antlr3.Runtime">
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
<HintPath>packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
<Reference Include="EntityFramework">
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure">
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Formatting">
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Web.Helpers">
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http">
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.WebHost">
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc">
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor">
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages">
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment">
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor">
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
</Reference>
</ItemGroup>
@ -120,31 +123,38 @@
</ItemGroup>
<ItemGroup>
<Content Include="Content\editor.css" />
<Content Include="Content\images\alert.png" />
<Content Include="Content\images\block-content-24.png" />
<Content Include="Content\images\block-content.svg" />
<Content Include="Content\images\cell.ico" />
<Content Include="Content\images\close.png" />
<Content Include="Content\images\comment-24.png" />
<Content Include="Content\images\corner.png" />
<Content Include="Content\images\delete-24.png" />
<Content Include="Content\images\desktop-24.png" />
<Content Include="Content\images\done.png" />
<Content Include="Content\images\download-24.png" />
<Content Include="Content\images\embeded-24.png" />
<Content Include="Content\images\file_docx.png" />
<Content Include="Content\images\file_pptx.png" />
<Content Include="Content\images\file_upload.png" />
<Content Include="Content\images\file_xlsx.png" />
<Content Include="Content\images\fill-forms-24.png" />
<Content Include="Content\images\filter-24.png" />
<Content Include="Content\images\close.svg" />
<Content Include="Content\images\comment.svg" />
<Content Include="Content\images\delete.svg" />
<Content Include="Content\images\desktop.svg" />
<Content Include="Content\images\done.svg" />
<Content Include="Content\images\download.svg" />
<Content Include="Content\images\embeded.svg" />
<Content Include="Content\images\error.svg" />
<Content Include="Content\images\file_docx.svg" />
<Content Include="Content\images\file_docxf.svg" />
<Content Include="Content\images\file_pptx.svg" />
<Content Include="Content\images\file_upload.svg" />
<Content Include="Content\images\file_xlsx.svg" />
<Content Include="Content\images\fill-forms.svg" />
<Content Include="Content\images\filter.svg" />
<Content Include="Content\images\icon_docx.svg" />
<Content Include="Content\images\icon_pptx.svg" />
<Content Include="Content\images\icon_xlsx.svg" />
<Content Include="Content\images\info.svg" />
<Content Include="Content\images\loader16.gif" />
<Content Include="Content\images\logo.png" />
<Content Include="Content\images\mobile-24.png" />
<Content Include="Content\images\question_small.png" />
<Content Include="Content\images\review-24.png" />
<Content Include="Content\images\logo.svg" />
<Content Include="Content\images\mobile-fill-forms.svg" />
<Content Include="Content\images\mobile.svg" />
<Content Include="Content\images\notdone.svg" />
<Content Include="Content\images\review.svg" />
<Content Include="Content\images\slide.ico" />
<Content Include="Content\images\word.ico" />
<Content Include="Content\jquery-ui.css" />
<Content Include="Content\media.css" />
<Content Include="Content\stylesheet.css" />
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
@ -175,10 +185,12 @@
<Content Include="assets\AUTHORS.md" />
<Content Include="assets\LICENSE" />
<Content Include="assets\new\new.docx" />
<Content Include="assets\new\new.docxf" />
<Content Include="assets\new\new.pptx" />
<Content Include="assets\new\new.xlsx" />
<Content Include="assets\sample\csv.csv" />
<Content Include="assets\sample\sample.docx" />
<Content Include="assets\sample\sample.docxf" />
<Content Include="assets\sample\sample.pptx" />
<Content Include="assets\sample\sample.xlsx" />
<None Include="packages.config" />

View File

@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ascensio System SIA")]
[assembly: AssemblyProduct("OnlineEditorsExampleMVC")]
[assembly: AssemblyCopyright("Ascensio System SIA 2021")]
[assembly: AssemblyCopyright("Ascensio System SIA 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@ -2,44 +2,67 @@
This example will help you integrate ONLYOFFICE Docs into your web application written in .Net (C# MVC).
It is aimed at testing the editors. Please, do not use it for production without proper modifications.
**Please note**: It is intended for testing purposes and demonstrating functionality of the editors. Do NOT use this integration example on your own server without proper code modifications! In case you enabled the test example, disable it before going for production.
## Step 1. Install ONLYOFFICE Docs
Download and install ONLYOFFICE Docs (packaged as Document Server).
Download and install ONLYOFFICE Docs (packaged as Document Server).
See the detailed guide to learn how to install Document Server [for Windows](https://helpcenter.onlyoffice.com/installation/docs-developer-install-windows.aspx), [for Linux](https://helpcenter.onlyoffice.com/installation/docs-developer-install-ubuntu.aspx), or [for Docker](https://helpcenter.onlyoffice.com/server/developer-edition/docker/docker-installation.aspx).
## Step 2. Download the .Net (C# MVC) code for the editors integration
Download the [.Net (C# MVC) example](https://api.onlyoffice.com/editors/demopreview) from our site.
You need to connnect the editors to your web site. Specify path to the editors installation in the *settings.config* file:
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *settings.config* file:
```
<add key="storage-path" value=""/>
<add key="files.docservice.url.site" value="https://documentserver/" />
```
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed.
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) it the *DocEditor.aspx* file.
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-path** is the path where files will be created and stored. You can set an absolute path.
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *DocEditor.aspx* file.
## Step 3. Install the prerequisites
Сheck if your system meets the system requirements:
* Microsoft .NET Framework: version 4.5 (download it from the [official Microsoft website](https://www.microsoft.com/en-US/download/details.aspx?id=30653));
* Internet Information Services: version 7 or later.
* **Microsoft .NET Framework**: version 4.5 (download it from the [official Microsoft website](https://www.microsoft.com/en-US/download/details.aspx?id=30653));
* **Internet Information Services**: version 7 or later.
Configure the IIS components for the server to work correctly:
1. Open Windows features:
**Start** -> **Control Panel** -> **Programs** -> **Programs and Features** -> **Turn Windows features on or off**
2. In the opened window, find **Internet Information Services** and choose all the necessary features. To do this, open the **World Wide Web Services** list and check the following components:
* **Application Development Features**: .NET Extensibility 4.8, ASP.NET 4.8, ISAPI Extensions, ISAPI Filters,
* **Common HTTP Features**: Default Document,
* **Security**: Request Filtering.
## Step 4. Run your website with the editors
1. Run the Internet Information Service (IIS) manager
Start -> ControlPanel -> System and Security -> Administrative Tools -> Internet Information Services (IIS) Manager
2. Add your website in the IIS Manager
1. Run the Internet Information Service (IIS) Manager:
**Start** -> **Control Panel** -> **System and Security** -> **Administrative Tools** -> **Internet Information Services (IIS) Manager**
2. Add your website in the IIS Manager.
On the **Connections** panel right-click the **Sites** node in the tree, then click **Add Website**.
![add](screenshots/add.png)
3. In the **Add Website** dialog box specify the name of the folder with the .Net (C# MVC) project in the **Site name** box.
Specify the path to the folder with your project in the **Physical Path** box.
Specify the unique value used only for this website in the **Port** box.
![sitename](screenshots/sitename.png)
4. Check for the .NET platform version specified in IIS manager for you web site. Choose **v4.0.** version.
Click the **Application Pool** -> right-click the platform name -> **Set application Pool defaults** -> **.NET CLR version**
4. Check for the .NET platform version specified in IIS Manager for you website. Choose **v4.0.** version.
**Application Pools** -> right-click the platform name -> **Set application Pool defaults** -> **.NET CLR version**
![platform](screenshots/platform.png)
5. Browse your website with the IIS manager:
5. Browse your website with the IIS Manager:
Right-click the site -> **Manage Website** -> **Browse**
![browse](screenshots/browse.png)
## Step 5. Check accessibility
@ -47,3 +70,12 @@ If you want to experiment with the editor configuration, modify the [parameters]
In case the example and Document Server are installed on different computers, make sure that your server with the example installed has access to the Document Server with the address which you specify instead of **documentserver** in the configuration files.
Make sure that the Document Server has access to the server with the example installed with the address which you specify instead of **example.com** in the configuration files.
## Important security info
Please keep in mind the following security aspects when you are using test examples:
* There is no protection of the storage from unauthorized access since there is no need for authorization.
* There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
* There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
* There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,11 +16,24 @@
*
*/
var directUrl;
if (typeof jQuery != "undefined") {
jq = jQuery.noConflict();
directUrl = getUrlVars()["directUrl"] == "true";
mustReload = false;
if (directUrl)
jq("#directUrl").prop("checked", directUrl);
else
directUrl = jq("#directUrl").prop("checked");
jq("#directUrl").change(function () {
window.location = "?directUrl=" + jq(this).prop("checked");
});
jq(function () {
jq('#fileupload').fileupload({
dataType: 'json',
@ -74,7 +87,8 @@ if (typeof jQuery != "undefined") {
});
var timer = null;
var checkConvert = function (filePass = null) {
var checkConvert = function (filePass) {
filePass = filePass ? filePass : null;
if (timer != null) {
clearTimeout(timer);
}
@ -167,7 +181,7 @@ if (typeof jQuery != "undefined") {
var posExt = fileName.lastIndexOf('.');
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : '';
if (EditedExtList.indexOf(posExt) != -1) {
if (EditedExtList.indexOf(posExt) != -1 || FillExtList.indexOf(posExt) != -1) {
jq("#beginEdit").removeClass("disable");
}
};
@ -218,7 +232,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#beginEdit:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = UrlEditor + "?fileName=" + fileId;
var url = UrlEditor + "?fileName=" + fileId + "&directUrl=" + directUrl;
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
@ -226,7 +240,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#beginView:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = UrlEditor + "?mode=view&fileName=" + fileId;
var url = UrlEditor + "?editorsMode=view&fileName=" + fileId + "&directUrl=" + directUrl;
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
@ -234,7 +248,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = UrlEditor + "?editorsType=embedded&editorsMode=embedded&fileName=" + fileId;
var url = UrlEditor + "?editorsType=embedded&editorsMode=embedded&fileName=" + fileId + "&directUrl=" + directUrl;
jq("#mainProgress").addClass("embedded");
jq("#beginEmbedded").addClass("disable");
@ -278,30 +292,78 @@ if (typeof jQuery != "undefined") {
});
});
jq(".info").mouseover(function (event) {
function showUserTooltip (isMobile) {
if ( jq("div#portal-info").is(":hidden") ) {
jq("div#portal-info").show();
jq("div.stored-list").hide();
} else if (isMobile && jq("div#portal-info").is(":visible")) {
jq("div#portal-info").hide();
jq("div.stored-list").show();
}
};
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
};
var fileList = jq("tr.tableRow");
var mouseIsOverTooltip = false;
var hideTooltipTimeout = null;
if (/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i
.test(navigator.userAgent)) {
if (fileList.length > 0) {
if (hideTooltipTimeout != null) {
clearTimeout(hideTooltipTimeout);
}
jq("#info").on("touchend", function () {
showUserTooltip(true);
});
}
} else {
jq("#info").mouseover(function (event) {
if (fileList.length > 0) {
if (hideTooltipTimeout != null) {
clearTimeout(hideTooltipTimeout);
}
showUserTooltip(false);
jq("div#portal-info").mouseenter(function () {
mouseIsOverTooltip = true;
}).mouseleave(function () {
mouseIsOverTooltip = false;
jq("div.stored-list").show();
jq("div#portal-info").hide();
})
}
}).mouseleave(function () {
hideTooltipTimeout = setTimeout(function () {
if (mouseIsOverTooltip == false && fileList.length > 0) {
jq("div.stored-list").show();
jq("div#portal-info").hide();
}
}, 500);
});
}
jq(".info-tooltip").mouseover(function (event) {
var target = event.target;
var id = target.dataset.id ? target.dataset.id : target.id;
var tooltip = target.dataset.tooltip;
jq("<div class='tooltip'>" + tooltip + "</div><div class='arrow'></div>").appendTo("body");
jq("<div class='tooltip'>" + tooltip + "<div class='arrow'></div></div>").appendTo("body");
var left = jq("#" + id).offset().left + jq("#" + id).outerWidth();
var topElement = jq("#" + id).offset().top;
var halfHeightElement = jq("#" + id).outerHeight() / 2;
var heightToFooter = jq("footer").offset().top - (topElement + halfHeightElement);
var halfHeightTooltip = jq("div.tooltip").outerHeight() / 2;
if (heightToFooter > (halfHeightTooltip + 10)) {
var top = topElement + halfHeightElement - halfHeightTooltip;
} else {
var top = jq("footer").offset().top - jq("div.tooltip").outerHeight() - 10;
}
jq("div.tooltip").css({ "top": top, "left": left + 10 });
jq("div.arrow").css({ "top": topElement + halfHeightElement, "left": left + 6 });
var top = jq("#" + id).offset().top + jq("#" + id).outerHeight() / 2 - jq("div.tooltip").outerHeight() / 2;
var left = jq("#" + id).offset().left + jq("#" + id).outerWidth() + 20;
jq("div.tooltip").css({ "top": top, "left": left });
}).mouseout(function () {
jq("div.tooltip").remove();
jq("div.arrow").remove();
});
}

View File

@ -14,7 +14,7 @@
<meta name="mobile-web-app-capable" content="yes" />
<!--
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -46,10 +46,13 @@
<script type="text/javascript" language="javascript">
var docEditor;
var config;
var innerAlert = function (message) {
var innerAlert = function (message, inEditor) {
if (console && console.log)
console.log(message);
if (inEditor && docEditor)
docEditor.showMessage(message);
};
// the application is loaded into the browser
@ -105,10 +108,14 @@
// 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
if (event.data.favorite) {
var favorite = !!event.data.favorite;
var title = document.title.replace(/^\☆/g, "");
document.title = (favorite ? "☆" : "") + title;
docEditor.setFavorite(favorite); // change the Favorite icon state
}
innerAlert("onMetaChange: " + JSON.stringify(event.data));
};
// the user is trying to insert an image by clicking the Image from Storage button
@ -134,8 +141,44 @@
<% Model.GetMailMergeConfig(out dataMailMergeRecipients); %>
docEditor.setMailMergeRecipients(<%= dataMailMergeRecipients%>); // insert recipient data for mail merge into the file
};
var onRequestSaveAs = function (event) { // the user is trying to save file by clicking Save Copy as... button
var title = event.data.title;
var url = event.data.url;
var data = {
title: title,
url: url
};
let xhr = new XMLHttpRequest();
xhr.open("POST", "webeditor.ashx?type=saveas");
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify(data));
xhr.onload = function () {
innerAlert(xhr.responseText);
innerAlert(JSON.parse(xhr.responseText).file, true);
}
};
var config = <%= Model.GetDocConfig(Request, Url) %>;
var onRequestRename = function(event) { // the user is trying to rename file by clicking Rename... button
innerAlert("onRequestRename: " + JSON.stringify(event.data));
var newfilename = event.data;
var data = {
newfilename: newfilename,
dockey: config.document.key,
ext: config.document.fileType
};
let xhr = new XMLHttpRequest();
xhr.open("POST", "webeditor.ashx?type=rename");
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify(data));
xhr.onload = function () {
innerAlert(xhr.responseText);
}
};
config = <%= Model.GetDocConfig(Request, Url) %>;
config.width = "100%";
config.height = "100%";
@ -155,43 +198,60 @@
<% 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(<%= hist %>); // show the document version history
};
// the user is trying to click the specific document version in the document version history
config.events['onRequestHistoryData'] = function (event) {
var ver = event.data;
var histData = <%= histData %>;
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
};
// the user is trying to go back to the document from viewing the document version history
config.events['onRequestHistoryClose '] = function () {
document.location.reload();
};
<% } %>
<% string usersForMentions; %>
<% Model.GetUsersMentions(Request, out usersForMentions); %>
<% if (!string.IsNullOrEmpty(usersForMentions))
// add mentions for not anonymous users
{ %>
config.events['onRequestUsers'] = function () {
docEditor.setUsers({
"users": <%= usersForMentions%>
});
if (config.editorConfig.user.id) {
<% if (!string.IsNullOrEmpty(hist) && !string.IsNullOrEmpty(histData))
{ %>
// the user is trying to show the document version history
config.events['onRequestHistory'] = function () {
docEditor.refreshHistory(<%= hist %>); // show the document version history
};
// the user is trying to click the specific document version in the document version history
config.events['onRequestHistoryData'] = function (event) {
var ver = event.data;
var histData = <%= histData %>;
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
};
// the user is trying to go back to the document from viewing the document version history
config.events['onRequestHistoryClose '] = function () {
document.location.reload();
};
<% } %>
// add mentions for not anonymous users
<% if (!string.IsNullOrEmpty(usersForMentions))
{ %>
config.events['onRequestUsers'] = function () {
docEditor.setUsers({ // set a list of users to mention in the comments
"users": <%= usersForMentions %>
});
};
<% } %>
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = function (event) {
event.data.actionLink = replaceActionLink(location.href, JSON.stringify(event.data.actionLink));
var data = JSON.stringify(event.data);
innerAlert("onRequestSendNotify: " + data);
};
// prevent file renaming for anonymous users
config.events['onRequestRename'] = onRequestRename;
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
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 () {
if ((config.document.fileType === "docxf" || config.document.fileType === "oform")
&& DocsAPI.DocEditor.version().split(".")[0] < 7) {
innerAlert("Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online.");
return;
}
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};

View File

@ -4,6 +4,7 @@
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="OnlineEditorsExampleMVC.Helpers" %>
<%@ Import Namespace="OnlineEditorsExampleMVC.Models" %>
<%@ Import Namespace="System.Collections.Generic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -14,7 +15,7 @@
<meta name="viewport" content="width=device-width" />
<!--
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -65,8 +66,11 @@
<li>
<a class="try-editor slide" data-type="pptx">Presentation</a>
</li>
<li>
<a class="try-editor form" data-type="docxf">Form template</a>
</li>
</ul>
<label class="create-sample">
<label class="side-option">
<input id="createSample" class="checkbox" type="checkbox" />With sample content
</label>
</div>
@ -82,172 +86,185 @@
<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>
<img id="info" class="info" src="content/images/info.svg" />
<select class="select-user" id="user">
<% foreach (User user in Users.getAllUsers())
{ %>
<b><%= user.name.IsEmpty() ? "Anonymous" : user.name %></b>
<ul>
<% foreach (string description in user.descriptions)
{ %>
<li><%= description %></li>
<% } %>
</ul>
<% } %>"
src="content/images/info.svg" />
<select class="select-user" id="user">
<% foreach (User user in Users.getAllUsers())
{ %>
<option value="<%= user.id %>"><%= user.name.IsEmpty() ? "Anonymous" : user.name %></option>
<% } %>
</select>
<option value="<%= user.id %>"><%= user.name.IsEmpty() ? "Anonymous" : user.name %></option>
<% } %>
</select>
</td>
</tr>
<tr>
<td valign="middle">
<span class="select-user">Language</span>
<img class="info" data-id="language" data-tooltip="Choose the language for ONLYOFFICE editors interface" src="content/images/info.svg" />
<img class="info info-tooltip" data-id="language"
data-tooltip="Choose the language for ONLYOFFICE editors interface"
src="content/images/info.svg" />
<select class="select-user" id="language">
<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>
<% Dictionary<string, string> languages = DocManagerHelper.GetLanguages();
foreach (var lang in languages)
{ %>
<option value="<%= lang.Key %>"><%= lang.Value %></option>
<% } %>
</select>
</td>
</tr>
<tr>
<td valign="middle">
<label class="side-option">
<input id="directUrl" type="checkbox" class="checkbox" />Try opening on client
<img id="directUrlInfo" class="info info-tooltip" data-id="directUrlInfo" data-tooltip="Some files can be opened in the user's browser without connecting to the document server." src="content/images/info.svg" />
</label>
</td>
</tr>
</tbody>
</table>
</div>
</td>
<td class="section">
<div class="main-panel">
<% var storedFiles = DocManagerHelper.GetStoredFiles();
if (!storedFiles.Any())
<% var storedFiles = DocManagerHelper.GetStoredFiles(); %>
<div id="portal-info" style="display: <%= storedFiles.Any() ? "none" : "table-cell" %>">
<span class="portal-name">ONLYOFFICE Document Editors Welcome!</span>
<span class="portal-descr">
Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
<br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
</span>
<span class="portal-descr">Please do NOT use this integration example on your own server without proper code modifications, it is intended for testing purposes only. In case you enabled this test example, disable it before going for production.</span>
<span class="portal-descr">You can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.</span>
<% foreach (User user in Users.getAllUsers())
{ %>
<div class="user-descr">
<b><%= user.name.IsEmpty() ? "Anonymous" : user.name %></b>
<ul>
<% foreach (string description in user.descriptions)
{ %>
<li><%= description %></li>
<% } %>
</ul>
</div>
<% } %>
</div>
<%
if (storedFiles.Any())
{ %>
<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)
{
<div class="stored-list">
<span class="header-list">Your documents</span>
<table class="tableHeader" cellspacing="0" cellpadding="0" width="100%">
<thead>
<tr>
<td class="tableHeaderCell tableHeaderCellFileName">Filename</td>
<td class="tableHeaderCell tableHeaderCellEditors contentCells-shift">Editors</td>
<td class="tableHeaderCell tableHeaderCellViewers">Viewers</td>
<td class="tableHeaderCell tableHeaderCellDownload">Download</td>
<td class="tableHeaderCell tableHeaderCellRemove">Remove</td>
</tr>
</thead>
</table>
<div class="scroll-table-body">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<% foreach (var storedFile in storedFiles)
{
var isEnabledDirectUrl = DocManagerHelper.GetDirectUrl();
var editUrl = "doceditor.aspx?fileID=" + HttpUtility.UrlEncode(storedFile.Name);
var docType = FileUtility.GetFileType(storedFile.Name).ToString().ToLower();
var canEdir = DocManagerHelper.EditedExts.Contains(Path.GetExtension(storedFile.Name).ToLower());
var docType = FileUtility.GetFileType(storedFile.Name).ToString().ToLower();
var ext = Path.GetExtension(storedFile.Name).ToLower();
var canEdit = DocManagerHelper.EditedExts.Contains(ext);
var isFillFormDoc = DocManagerHelper.FillFormExts.Contains(ext);
%>
<tr class="tableRow" title="<%= storedFile.Name %>">
<tr class="tableRow" title="<%= storedFile.Name %> [<%= DocManagerHelper.GetFileVersion(storedFile.Name, HttpContext.Current.Request.UserHostAddress.Replace(':', '_')) %>]">
<td class="contentCells">
<a class="stored-edit <%= docType %>" href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name }) %>" target="_blank">
<span title="<%= storedFile.Name %>"><%= storedFile.Name %></span>
<a class="stored-edit <%= docType %>" href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, directUrl = isEnabledDirectUrl }) %>" target="_blank">
<span><%= storedFile.Name %></span>
</a>
</td>
<% if (canEdir) { %>
<% if (canEdit) { %>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "edit" }) %>" target="_blank">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "edit", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/desktop.svg" alt="Open in editor for full size screens" title="Open in editor for full size screens"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "edit" }) %>" target="_blank">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "edit", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/mobile.svg" alt="Open in editor for mobile devices" title="Open in editor for mobile devices"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<% if (docType == "word") { %>
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "review" }) %>" target="_blank">
<img src="content/images/review.svg" alt="Open in editor for review" title="Open in editor for review"/>
</a>
<% } else if (docType == "cell") { %>
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "filter" }) %>" target="_blank">
<img src="content/images/filter.svg" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
</a>
<% } %>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "comment" }) %>" target="_blank">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "comment", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/comment.svg" alt="Open in editor for comment" title="Open in editor for comment"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<% if (docType == "word") { %>
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms" }) %>" target="_blank">
<img src="content/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
<% if (docType == "word") { %>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "review", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/review.svg" alt="Open in editor for review" title="Open in editor for review"/>
</a>
<% } %>
</td>
<td class="contentCells contentCells-shift contentCells-icon">
<% if (docType == "word") { %>
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "blockcontent" }) %>" target="_blank">
</td>
<% } else if (docType == "cell") { %>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "filter", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/filter.svg" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
</a>
</td>
<% } %>
<% if (docType == "word") { %>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "blockcontent", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/block-content.svg" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
</a>
</td>
<% } else { %>
<td class="contentCells contentCells-icon"></td>
<% } %>
<% if (docType != "word" && docType != "cell") { %>
<td class="contentCells contentCells-icon "></td>
<% } %>
<% if (isFillFormDoc) { %>
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
</td>
<% } else { %>
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift"></td>
<% } %>
<% } else if (isFillFormDoc) { %>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/mobile-fill-forms.svg" alt="Open in editor for filling in forms for mobile devices" title="Open in editor for filling in forms for mobile devices"/>
</a>
</td>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
</td>
<% } else { %>
<td class="contentCells contentCells-shift contentCells-icon" colspan="6"></td>
<td class="contentCells contentCells-shift contentCells-icon contentCellsEmpty" colspan="6"></td>
<% } %>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "view" }) %>" target="_blank">
<td class="contentCells contentCells-icon firstContentCellViewers">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "view", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/desktop.svg" alt="Open in viewer for full size screens" title="Open in viewer for full size screens"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "view" }) %>" target="_blank">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "view", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/mobile.svg" alt="Open in viewer for mobile devices" title="Open in viewer for mobile devices"/>
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "embedded", editorsMode = "embedded" }) %>" target="_blank">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "embedded", editorsMode = "embedded", directUrl = isEnabledDirectUrl }) %>" target="_blank">
<img src="content/images/embeded.svg" alt="Open in embedded mode" title="Open in embedded mode"/>
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<td class="contentCells contentCells-icon contentCells-shift downloadContentCellShift">
<a href="webeditor.ashx?type=download&fileName=<%= HttpUtility.UrlEncode(storedFile.Name) %>">
<img class="icon-download" src="content/images/download.svg" alt="Download" title="Download" />
</a>
@ -296,10 +313,8 @@
<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 />
@ -308,10 +323,12 @@
</div>
<iframe id="embeddedView" src="" height="345px" width="432px" frameborder="0" scrolling="no" 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 class="buttonsMobile">
<div id="beginEdit" class="button orange disable">Edit</div>
<div id="beginView" class="button gray disable">View</div>
<div id="beginEmbedded" class="button gray disable">Embedded view</div>
<div id="cancelEdit" class="button gray">Cancel</div>
</div>
</div>
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span>
@ -337,8 +354,9 @@
</footer>
<%: Scripts.Render("~/bundles/jquery", "~/bundles/scripts") %>
<script language="javascript" type="text/javascript">
var FillExtList = '<%= string.Join(",", DocManagerHelper.FillFormExts.ToArray()) %>';
var ConverExtList = '<%= string.Join(",", DocManagerHelper.ConvertExts.ToArray()) %>';
var EditedExtList = '<%= string.Join(",", DocManagerHelper.EditedExts.ToArray()) %>';
var UrlConverter = '<%= Url.Content("~/webeditor.ashx?type=convert") %>';

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width" />
<!--
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -10,7 +10,7 @@
</configSections>
<appSettings configSource="web.appsettings.config" />
<system.web>
<httpRuntime targetFramework="4.5" />
<httpRuntime maxRequestLength="51200" targetFramework="4.5" />
<compilation debug="true" targetFramework="4.5" />
<pages>
<namespaces>
@ -26,28 +26,41 @@
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="52428800" />
</requestFiltering>
</security>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
@ -58,7 +71,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
</configuration>

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Linq;
using System.Net;
using System.Web;
@ -46,6 +47,9 @@ namespace OnlineEditorsExampleMVC
case "download":
Download(context);
break;
case "downloadhistory":
DownloadHistory(context);
break;
case "convert":
Convert(context);
break;
@ -64,6 +68,86 @@ namespace OnlineEditorsExampleMVC
case "files":
Files(context);
break;
case "saveas":
SaveAs(context);
break;
case "rename":
Rename(context);
break;
}
}
private static void SaveAs(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
string fileData;
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
{
fileData = readStream.ReadToEnd();
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":\"Request stream is empty\"}");
}
}
catch (Exception e)
{
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
}
var jss = new JavaScriptSerializer();
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
var fileUrl = (string) body["url"];
var title = (string) body["title"];
var fileName = DocManagerHelper.GetCorrectName(title);
var extension = "." + (Path.GetExtension(fileName).ToLower() ?? "").Trim('.');
var allExt = DocManagerHelper.ConvertExts
.Concat(DocManagerHelper.EditedExts)
.Concat(DocManagerHelper.ViewedExts)
.Concat(DocManagerHelper.FillFormExts)
.ToArray();
if (!allExt.Contains(extension))
{
context.Response.Write("{\"error\":\"File type is not supported\"}");
}
var req = (HttpWebRequest)WebRequest.Create(fileUrl);
DocManagerHelper.VerifySSL();
using (var stream = req.GetResponse().GetResponseStream())
{
if (stream == null || req.GetResponse().ContentLength <= 0 || req.GetResponse().ContentLength > DocManagerHelper.MaxFileSize)
{
context.Response.Write("{\"error\": \"File size is incorrect\"}");
}
const int bufferSize = 4096;
using (var fs = File.Open(DocManagerHelper.StoragePath(fileName, null), FileMode.Create))
{
var buffer = new byte[bufferSize];
int readed;
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
{
fs.Write(buffer, 0, readed); // write bytes to the output stream
}
}
}
var id = context.Request.Cookies.GetOrDefault("uid", null);
var user = Users.getUser(id); // get the user
DocManagerHelper.CreateMeta(fileName, user.id, user.name, null);
context.Response.Write("{ \"file\": \"" + fileName + "\"}");
}
catch (Exception e)
{
context.Response.Write("{ \"error\": \"" + 1 + "\", \"message\": \"" + e.Message + "\"}");
}
}
@ -73,6 +157,8 @@ namespace OnlineEditorsExampleMVC
context.Response.ContentType = "text/plain";
try
{
DocManagerHelper.VerifySSL();
var httpPostedFile = context.Request.Files[0];
string fileName;
@ -136,10 +222,11 @@ namespace OnlineEditorsExampleMVC
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
var fileName = Path.GetFileName(body["filename"].ToString());
var lang = context.Request.Cookies.GetOrDefault("ulang", null);
var filePass = body["filePass"] != null ? body["filePass"].ToString() : null;
var fileUri = DocManagerHelper.GetFileUri(fileName, true);
var fileUri = DocManagerHelper.GetDownloadUrl(fileName);
var extension = (Path.GetExtension(fileUri).ToLower() ?? "").Trim('.');
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
@ -159,7 +246,7 @@ namespace OnlineEditorsExampleMVC
// get the url to the converted file
string newFileUri;
var result = ServiceConverter.GetConvertedUri(downloadUri.ToString(), extension, internalExtension, key, true, out newFileUri, filePass);
var result = ServiceConverter.GetConvertedUri(downloadUri.ToString(), extension, internalExtension, key, true, out newFileUri, filePass, lang);
if (result != 100)
{
context.Response.Write("{ \"step\" : \"" + result + "\", \"filename\" : \"" + fileName + "\"}");
@ -171,6 +258,8 @@ namespace OnlineEditorsExampleMVC
var req = (HttpWebRequest)WebRequest.Create(newFileUri);
DocManagerHelper.VerifySSL();
using (var stream = req.GetResponse().GetResponseStream()) // get response stream of the converting file
{
if (stream == null) throw new Exception("Stream is null");
@ -224,7 +313,7 @@ namespace OnlineEditorsExampleMVC
var userAddress = context.Request["userAddress"];
var fileName = Path.GetFileName(context.Request["fileName"]);
var status = (TrackerStatus) (int) fileData["status"]; // get status from the request body
var saved = 1; // editing
var saved = 0;
switch (status)
{
case TrackerStatus.Editing:
@ -281,7 +370,7 @@ namespace OnlineEditorsExampleMVC
return;
}
context.Response.Write("{\"error\":0}");
context.Response.Write("{\"error\":" + saved + "}");
}
// remove a file
@ -367,28 +456,31 @@ namespace OnlineEditorsExampleMVC
{
try
{
var fileName = Path.GetFileName(context.Request["fileName"]);
var fileName = Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? context.Request["fileName"]
: Path.GetFileName(context.Request["fileName"]);
var userAddress = context.Request["userAddress"];
var isEmbedded = context.Request["dmode"];
if (JwtManager.Enabled)
if (JwtManager.Enabled && isEmbedded == null && userAddress != null)
{
string JWTheader = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string token = "";
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
{
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
string token = JwtManager.Decode(headerToken);
if (token == null || token.Equals(""))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
token = JwtManager.Decode(headerToken);
}
if (string.IsNullOrEmpty(token))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
}
var filePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false); // get the path to the force saved document version
if (filePath.Equals(""))
if (string.IsNullOrEmpty(filePath))
{
filePath = DocManagerHelper.StoragePath(fileName, userAddress); // or to the original document
}
@ -416,5 +508,88 @@ namespace OnlineEditorsExampleMVC
{
get { return false; }
}
// download a history file
private static void DownloadHistory(HttpContext context)
{
try
{
var fileName = Path.GetFileName(context.Request["fileName"]);
var userAddress = Path.GetFileName(context.Request["userAddress"]);
var version = System.Convert.ToInt32(context.Request["ver"]);
var file = Path.GetFileName(context.Request["file"]);
if (JwtManager.Enabled)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
{
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
string token = JwtManager.Decode(headerToken);
if (string.IsNullOrEmpty(token))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
}
else
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
}
var histPath = DocManagerHelper.HistoryDir(DocManagerHelper.StoragePath(fileName, userAddress));
var filePath = Path.Combine(DocManagerHelper.VersionDir(histPath, version), file); // get the path to document version
download(filePath, context);
}
catch (Exception)
{
context.Response.Write("{ \"error\": \"File not found!\"}");
}
}
// rename a file
private static void Rename(HttpContext context)
{
// read request body
context.Response.ContentType = "text/plain";
string fileData;
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
{
fileData = readStream.ReadToEnd();
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":\"Request stream is empty\"}");
}
}
catch (Exception e)
{
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
}
var jss = new JavaScriptSerializer();
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
var newFileName = (string) body["newfilename"];
var docKey = (string) body["dockey"];
var origExt = '.' + (string) body["ext"];
var curExt = Path.GetExtension(newFileName).ToLower();
if (string.Compare(origExt, curExt, true) != 0)
{
newFileName += origExt;
}
var meta = new Dictionary<string, object>() {
{ "title", newFileName }
};
TrackManager.commandRequest("meta", docKey, meta);
context.Response.Write("{ \"result\": \"OK\"}");
}
}
}

View File

@ -24,11 +24,15 @@ jQuery.UI - jQuery UI is an open source library of interface components —
License: MIT
License File: jQuery.UI.license
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
License: MIT
License File: JWT.license
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
License: MS-EULA License
License File: Microsoft.Web.Infrastructure.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
License: MIT
License File: Newtonsoft.Json.license

View File

@ -0,0 +1,21 @@
# Public Domain
Written by John Sheehan (http://john-sheehan.com)
This work is public domain.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
For more information, please visit: http://creativecommons.org/publicdomain/zero/1.0/
# MIT
Copyright (c) 2019 Jwt.Net Maintainers and Contributors.
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.
For more information, please visit: https://opensource.org/licenses/MIT

View File

@ -1,16 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.5.0.2" targetFramework="net45" />
<package id="EntityFramework" version="6.4.4" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net45" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net45" />
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
<package id="Antlr" version="3.5.0.2" targetFramework="net48" />
<package id="EntityFramework" version="6.4.4" targetFramework="net48" />
<package id="JWT" version="9.0.3" targetFramework="net48" />
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net48" />
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net48" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net48" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net48" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net48" />
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="WebGrease" version="1.6.0" targetFramework="net48" />
</packages>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -1,22 +1,24 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<appSettings>
<clear />
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="version" value="1.5.0"/>
<add key="filesize-max" value="5242880"/>
<add key="files.docservice.viewed-docs" value=".pdf|.djvu|.xps"/>
<add key="files.docservice.edited-docs" value=".docx|.xlsx|.csv|.pptx|.txt"/>
<add key="files.docservice.convert-docs" value=".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"/>
<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
<add key="files.docservice.fillform-docs" value=".oform|.docx"/>
<add key="files.docservice.viewed-docs" value=".pdf|.djvu|.xps|.oxps"/>
<add key="files.docservice.edited-docs" value=".docx|.xlsx|.csv|.pptx|.txt|.docxf"/>
<add key="files.docservice.convert-docs" value=".docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xlsb|.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"/>
<add key="files.docservice.timeout" value="120000" />
<add key="files.docservice.secret" value="" />
<add key="files.docservice.header" value="Authorization" />
<add key="files.docservice.url.site" value="https://documentserver/"/>
<add key="files.docservice.verify-peer-off" value="true"/>
<add key="files.docservice.languages" value="en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (People's Republic of China)|zh-TW:Chinese (Traditional, Taiwan)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lv:Latvian|lo:Lao|ms:Malay (Malaysia)|nb:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.url.site" value="http://documentserver/"/>
<add key="files.docservice.url.converter" value="ConvertService.ashx"/>
<add key="files.docservice.url.api" value="web-apps/apps/api/documents/api.js"/>
@ -25,4 +27,10 @@
<add key="files.docservice.url.example" value=""/>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>

View File

@ -19,3 +19,11 @@ License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
License: MIT
License File: JWT.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
License: MIT
License File: Newtonsoft.Json.license

View File

@ -0,0 +1,6 @@
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#27ABA3"/>
<path d="M22.9165 0L29.9998 7.08333H25.9165C24.2597 7.08333 22.9165 5.74019 22.9165 4.08333V0Z" fill="#008078"/>
<rect x="6.5" y="15.5" width="17" height="5" stroke="white"/>
<rect x="6.5" y="23.5" width="17" height="5" stroke="white"/>
</svg>

After

Width:  |  Height:  |  Size: 477 B

View File

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 5C5 3.89543 5.89543 3 7 3H16C17.1046 3 18 3.89543 18 5V8H17V6H6V18H17V16H18V19C18 20.1046 17.1046 21 16 21H7C5.89543 21 5 20.1046 5 19V5ZM13 4H10V5H13V4ZM12 19.5C12 19.7761 11.7761 20 11.5 20C11.2239 20 11 19.7761 11 19.5C11 19.2239 11.2239 19 11.5 19C11.7761 19 12 19.2239 12 19.5Z" fill="#444444"/>
<rect x="7" y="9" width="1" height="6" fill="#444444"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 8V9L11 9V15H12V16H9V15H10V9H9V8H12Z" fill="#444444"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 10H18V14H15H14H13V15H14H18C18.5523 15 19 14.5523 19 14V10C19 9.44772 18.5523 9 18 9H14H13V10H14H15Z" fill="#444444"/>
</svg>

After

Width:  |  Height:  |  Size: 790 B

View File

@ -0,0 +1,684 @@
/**
*
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
@media (min-width: 1280px) and (max-width: 1380px) {
.copy {
margin-right: 6.5%;
}
footer table tr td:first-child {
margin-left: 6.5%;
}
}
@media (max-width: 1280px) and (min-width: 1080px) {
.tableRow td:first-child {
flex-grow: 1;
width: 25%;
}
.tableHeaderCellFileName {
width: 25%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
width: 29%;
text-align: right;
}
.tableHeaderCellDownload {
width: 21%;
padding-right: 18px;
}
.tableHeaderCellRemove {
padding-left: 13px;
}
footer table tr td:first-child {
margin-left: 5%;
}
.copy {
margin-right: 5%;
padding-right: 32px;
}
.left-panel {
margin-left: 48px;
width: 20%;
}
}
@media (max-width: 1080px) {
.copy {
margin-right: 32px;
}
footer table tr td:first-child {
margin-left: 0;
}
.tableRow {
width: 90%;
}
.tableHeaderCellFileName {
width: 16%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
width: 38%;
}
.tableHeaderCellDownload {
width: 23%;
}
.tableHeaderCellRemove {
padding-left: 0px;
}
}
@media (max-width: 1008px) {
.left-panel {
margin-left: 0;
}
.main-panel {
left: -1%;
padding: 48px 26px 24px;
}
}
@media (max-width: 769px) and (min-width: 593px) {
.contentCells-icon{
width: 5%;
}
.tableRow {
width: 55%;
}
.tableRow td:first-child {
border: none;
flex-grow: 1;
width: 100%;
max-width: 100%;
}
.tableHeader {
display: none;
}
.scroll-table-body {
top: 31px;
}
footer {
height: 80px;
}
.main {
height: calc(100% - 128px);
}
.main-panel {
left: 0;
padding: 48px 18px 24px;
}
footer table td {
margin-left: 0;
margin-right: 0;
padding-right: 4px;
padding-left: 4px;
}
.copy {
margin:auto;
padding-right: 3%;
}
footer table tr td:first-child {
margin-left: auto;
padding-left: 1%;
margin-right: 1.5%;
}
.contentCells-shift {
padding-right: 22px;
}
}
@media (max-width: 715px) {
.tableRow {
width: 45%;
}
}
@media (max-width: 670px) and (min-width: 620px){
.main-panel{
width: 90%;
}
}
@media (max-width: 681px) and (min-width: 593px) {
.left-panel {
width: 10%;
}
.main-panel {
left: 2%;
padding: 48px 0 24px;
}
.help-block {
margin: 48px 20px 24px;
}
.file-upload{
width: 100%;
}
#fileupload{
width: 100%;
}
}
@media (max-width: 1080px) and (min-width: 970px) {
.tableHeader {
width: 90%;
}
.tableRow td:first-child {
flex-grow: 0;
width: 15%;
}
.tableHeaderCellFileName {
width: 16%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
text-align: right;
width: 37%;
}
.tableHeaderCellDownload {
padding-right: 22px;
width: 22%;
}
}
@media (max-width: 986px) and (min-width: 890px) {
.tableHeader {
width: 75%;
}
.tableHeaderCellEditors {
width: 26%;
text-align: left;
}
.tableHeaderCellFileName {
width: 17%;
}
.tableHeaderCellViewers {
width: 27%;
text-align: right;
}
.tableHeaderCellDownload {
padding-right: 18px;
width: 20%;
}
.tableHeaderCellRemove {
padding-left: 0;
}
.tableRow {
width: 75%;
}
.tableRow td:last-child {
padding-right: 38px;
}
.tableRow td:first-child {
flex-grow: 0;
width: 15%;
}
.contentCells-icon {
width: 3%;
}
}
@media (max-width: 890px) and (min-width: 769px ) {
.left-panel{
width: 20%;
}
.contentCells-shift {
padding-right: 28px;
}
.main-panel {
width: 580px;
}
.tableRow {
width: 95%;
}
.tableHeader {
width: 95%;
}
.tableHeaderCellViewers {
width: 22%;
text-align: right;
}
.tableHeaderCellDownload {
padding-right: 4px;
width: 20%;
text-align: right;
}
.tableHeaderCellFileName {
width: 20%;
}
.tableHeaderCellEditors {
text-align: left;
width: 31%;
}
.tableHeaderCellViewers {
width: 18%;
}
}
@media (max-width: 890px) {
.tableRow td:first-child {
max-width: 17%;
}
#portal-info {
max-width: 60vw;
}
}
.downloadContentCellShift:after {
bottom: 0;
left: 0;
content: "";
background: #e5e5e5;
height: 1px;
position: absolute;
width: 100%;
}
@media (max-width: 769px) {
.tableRow td:first-child {
max-width: 100%;
}
}
@media (max-width: 593px ) {
#portal-info {
width: 50vw;
}
.file-upload{
width: 100%;
}
#fileupload{
width: 100%;
}
.tableHeader {
display: none;
}
.scroll-table-body {
top: 31px;
}
footer table tr {
justify-content: center;
}
footer table td {
padding-top: 16px;
padding-right: 32px;
padding-left: 32px;
}
footer {
height: 80px;
}
.main {
height: calc(100% - 128px);
}
.copy {
width: 100%;
text-align: center;
margin: 0;
}
.left-panel {
width: 10%;
}
.help-block {
margin: 16px 10px 6px;
}
.main-panel {
left: 2%;
padding: 16px 0 6px;
}
.tableRow {
width: 40%;
}
.tableRow td {
border: none;
}
.firstContentCellShift {
border: none;
flex-basis: 10%;
flex-grow: 1;
}
.downloadContentCellShift {
max-width: 7%;
margin-right: -11px;
margin-left: auto;
}
.contentCells-icon {
width: 13%;
}
.tableRow td:last-child {
width: 12%;
padding-right: 40px;
border: none;
}
.contentCells-shift {
padding-right: 35px;
}
.downloadContentCellShift:after {
width: 85%;
}
.firstContentCellViewers {
margin-left: 0;
border-bottom: 1px solid #e5e5e5 !important;
}
.firstContentCellViewers ~ td {
border-bottom: 1px solid #e5e5e5;
}
.tableRow td:first-child{
border: none;
width: 85%;
}
.contentCellsEmpty{
display: none;
width: 1%;
}
/* Mobile Upload*/
.blockUI.blockMsg.blockPage.ui-dialog.ui-widget.ui-corner-all.ui-widget-content.ui-draggable {
width: 344px !important;
box-shadow: 0px 7px 15px rgba(85, 85, 85, 0.1);
border-radius: 2px;
top: 10% !important;
margin-left: -172px !important;
}
.ui-dialog .ui-dialog-titlebar {
padding: 0;
}
.ui-dialog .ui-dialog-content {
padding: 0 !important;
}
#mainProgress {
margin: 24px 16px 0 !important;
}
.blockTitle {
padding: 10px 10px 6px 16px !important;
font-size: 14px !important;
}
#mainProgress .describeUpload {
padding: 8px 0 !important;
}
.dialog-close {
margin: 0 !important;
}
.step-descr{
line-height: 150%;
}
.step {
line-height: 160%;
}
.buttonsMobile{
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}
.button.gray{
margin: 0;
}
.button, .button:hover{
display: flex;
justify-content: center;
padding: 0 !important;
width: 144px;
height: 56px;
margin-bottom: 24px !important;
}
}
@media (max-width: 560px) and (min-width: 510px) {
.contentCells-icon {
width: 13%;
}
.downloadContentCellShift {
padding-right: 45px;
max-width: 4%;
}
}
@media (max-width: 510px) and (min-width: 470px) {
.tableRow {
width: 35%;
}
.tableRow td:first-child{
width: 83%;
}
.contentCells-icon {
width: 13%;
}
.downloadContentCellShift {
max-width: 6%;
padding-right: 37px;
}
.firstContentCellShift {
flex-basis: 9%;
}
.tableRow td:last-child {
padding-right: 28px;
}
}
@media (max-width: 470px) and (min-width: 420px) {
.tableRow {
width: 30%;
}
.tableRow td:first-child{
width: 85%;
}
.contentCells-icon {
width: 11%;
}
.downloadContentCellShift {
max-width: 3%;
padding-right: 37px;
padding-left: 0;
}
.firstContentCellShift {
margin-left: 1px;
flex-basis: 14%;
}
.tableRow td:last-child {
width: 5%;
padding-right: 63px;
}
.firstContentCellViewers{
padding-right: 2px;
width: 12%;
}
.contentCellsEmpty{
display: none;
}
}
@media (max-width: 420px) and (min-width: 320px) {
.tableRow {
width: 25%;
}
.tableRow td:last-child {
width: 6%;
padding-right: 16px;
}
.downloadContentCellShift {
max-width: 4%;
margin-right: -18px;
margin-left: -1px;
}
.firstContentCellShift {
flex-basis: 2%;
}
.contentCells-icon{
width: 10%;
}
footer table td {
margin: 0;
padding-right: 5px;
padding-left: 5px;
}
.copy {
padding-right: 5px;
margin: 0;
}
.firstContentCellViewers{
padding-right: 2px;
width: 11%;
}
}
@media (max-width: 1160px) {
.left-panel {
margin-left: 0;
}
}
@media (min-width: 593px) {
.contentCellsEmpty {
display: none;
}
}
@media (max-width: 769px) and (min-width: 715px){
.tableRow{
width: 50%;
}
}
@media (max-width: 510px) {
.tableRow td:first-child{
flex-grow: 0;
}
}
@media (max-width: 1100px) and (min-width: 890px){
.main-panel > span{
max-width: 70%;
}
}
@media (max-width: 780px) and (min-width: 600px) {
.main-panel{
display: flex;
flex-direction: column;
}
.main-panel > span{
max-width: 45%;
}
}
@media (max-width: 600px) and (min-width: 320px) {
.main-panel{
display: flex;
flex-direction: column;
}
}
@media (max-width:600px) and (min-width:500px){
.main-panel > span{
max-width:35%;
}
}
@media (max-width:500px) and (min-width:400px){
.main-panel > span{
max-width:20%;
}
}
@media (max-width:400px) and (min-width:320px){
.main-panel > span{
max-width:15%;
}
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -22,6 +22,7 @@ html {
}
body {
display: block;
background: #FFFFFF;
color: #333333;
font-family: Open Sans;
@ -33,6 +34,7 @@ body {
overflow-y: overlay;
padding: 0;
text-decoration: none;
overflow-x: hidden;
}
form {
@ -53,23 +55,25 @@ a:visited {
header {
background: #333333;
height: 72px;
height: 48px;
margin: 0 auto;
min-width: 1152px;
width: auto;
}
header img {
margin: 22px 0 22px 32px;
margin: 10px 0 22px 32px;
}
.center {
position: relative;
margin: 0 auto 0;
width: 1152px;
}
.main {
height: calc(100% - 136px);
display: table;
height: calc(100% - 112px);
min-height: 536px;
}
@ -95,6 +99,10 @@ header img {
width: 896px;
}
#portal-info {
max-width: 65vw;
}
.portal-name {
color: #FF6F3D;
font-size: 24px;
@ -120,6 +128,7 @@ header img {
label .checkbox {
margin: 0 5px 3px 0;
vertical-align: middle;
cursor: pointer;
}
.try-editor-list {
@ -154,7 +163,11 @@ label .checkbox {
background-image: url("images/file_pptx.svg");
}
.create-sample {
.try-editor.form {
background-image: url("images/file_docxf.svg");
}
.side-option {
color: #666666;
line-height: 24px;
}
@ -353,20 +366,36 @@ footer {
background: #333333;
color: #AAAAAA;
height: 64px;
min-width: 1152px;
width: auto;
width: 100%;
position: relative;
left: 0;
bottom: 0;
}
footer table {
border-spacing: 0;
footer > .center {
width: 100%;
}
footer table {
width: 100%;
border-spacing: 0;
}
footer table tr {
height: 64px;
position: relative;
display: flex;
flex-direction: row;
align-items: center;
align-content: center;
flex-wrap: wrap;
width: 100vw;
height: 64px;
}
footer table td {
padding-left: 32px;
display: block;
position: relative;
padding-left: 32px;
}
footer a,
@ -381,8 +410,16 @@ footer a:hover {
text-decoration: none;
}
footer table tr td:first-child {
margin-left: 14%;
}
.copy {
padding-left: 510px;
color: #aaaaaa;
width: max-content;
position: relative;
margin-left: auto;
margin-right: 14%;
}
.help-block {
@ -501,12 +538,12 @@ footer a:hover {
.tableHeader tr {
background: transparent;
cursor: default;
height: 40px;
-khtml-user-select: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
cursor: default;
height: 40px;
-khtml-user-select: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
.tableHeaderCell {
@ -539,6 +576,7 @@ footer a:hover {
}
.contentCells {
display: block;
border-bottom: 1px solid #EFEFEF;
font-family: 'Open Sans', sans-serif;
font-size: 16px;
@ -568,31 +606,7 @@ footer a:hover {
.info {
cursor: pointer;
padding: 3px 5px;
position: absolute;
}
.tooltip {
background: #FFFFFF;
border-radius: 5px;
box-shadow: 0px 7px 25px rgba(85, 85, 85, 0.15);
color: #666666;
line-height: 160%;
max-width: 455px;
padding: 14px;
position: absolute;
}
.tooltip ul {
margin: 0;
}
.arrow {
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-right: 8px solid #FFFFFF;
position: absolute;
transform: translate(-50%, -50%);
margin: -2px 5px;
}
.user-block-table {
@ -610,10 +624,10 @@ footer a:hover {
border: 1px solid #D0D5DA;
box-sizing: border-box;
border-radius: 3px;
cursor: pointer;
margin-top: 5px;
padding: 2px 5px;
width: 100%;
cursor: pointer;
margin-top: 5px;
padding: 2px 5px;
width: 100%;
}
.icon-delete {
@ -680,4 +694,78 @@ footer a:hover {
line-height: 160%;
letter-spacing: -0.02em;
word-wrap: break-word;
}
}
html {
overflow-x: hidden;
}
.tableRow {
width: 100%;
display: flex;
flex-wrap: wrap;
flex-direction: row;
position: relative;
}
.tableRow td:first-child {
display: flex;
flex-grow: 1;
max-width: 25%;
}
.tableHeaderCellFileName {
width: 30%;
}
.tableHeaderCellEditors {
width: 28%;
}
.tableHeaderCellViewers {
text-align: center;
width: 18%
}
.firstContentCellViewers {
margin-left: auto;
}
.user-descr {
display: inline-table;
width: 30vw;
min-width: 200px;
max-width: 400px;
margin-top: 20px;
}
.user-descr > b {
margin-left: 25px;
}
.tooltip {
background: #FFFFFF;
border-radius: 5px;
box-shadow: 0px 7px 25px rgba(85, 85, 85, 0.15);
color: #666666;
line-height: 160%;
max-width: 455px;
padding: 14px;
position: absolute;
}
.tooltip ul {
margin: 0;
}
.arrow {
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-right: 8px solid #FFFFFF;
left: -4px;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}

View File

@ -5,16 +5,18 @@
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="OnlineEditorsExample" %>
<%@ Import Namespace="System.Collections.Generic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ONLYOFFICE</title>
<!--
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -34,6 +36,7 @@
<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" />
<link rel="stylesheet" type="text/css" href="app_themes/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="app_themes/media.css" />
<link rel="stylesheet" type="text/css" href="app_themes/jquery-ui.css" />
@ -66,8 +69,11 @@
<li>
<a class="try-editor slide" data-type="slide">Presentation</a>
</li>
<li>
<a class="try-editor form" data-type="docxf">Form template</a>
</li>
</ul>
<label class="create-sample">
<label class="side-option">
<input id="createSample" class="checkbox" type="checkbox" />With sample content
</label>
</div>
@ -82,19 +88,7 @@
<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><%= user.name.IsEmpty() ? "Anonymous" : user.name %></b>
<ul>
<% foreach (string description in user.descriptions)
{ %>
<li><%= description %></li>
<% } %>
</ul>
<% } %>"
src="app_themes/images/info.svg" />
<img id="info" class="info" src="app_themes/images/info.svg" />
<select class="select-user" id="user">
<% foreach (User user in Users.getAllUsers())
{ %>
@ -106,58 +100,56 @@
<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="app_themes/images/info.svg" />
<img class="info info-tooltip" data-id="language"
data-tooltip="Choose the language for ONLYOFFICE editors interface"
src="app_themes/images/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>
<% Dictionary<string, string> languages = GetLanguages();
foreach (var lang in languages)
{ %>
<option value="<%= lang.Key %>"><%= lang.Value %></option>
<% } %>
</select>
</td>
</tr>
<tr>
<td valign="middle">
<label class="side-option">
<input id="directUrl" type="checkbox" class="checkbox" />Try opening on client
<img id="directUrlInfo" class="info info-tooltip" data-id="directUrlInfo" data-tooltip="Some files can be opened in the user's browser without connecting to the document server." src="app_themes/images/info.svg" />
</label>
</td>
</tr>
</tbody>
</table>
</div>
</td>
<td class="section">
<% var storedFiles = GetStoredFiles(); %>
<div class="main-panel">
<% var storedFiles = GetStoredFiles();
if (!storedFiles.Any())
{ %>
<div id="portal-info" style="display: <%= storedFiles.Any() ? "none" : "table-cell" %>">
<span class="portal-name">ONLYOFFICE Document Editors Welcome!</span>
<span class="portal-descr">
Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
<br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
</span>
<% }
else
<span class="portal-descr">Please do NOT use this integration example on your own server without proper code modifications, it is intended for testing purposes only. In case you enabled this test example, disable it before going for production.</span>
<span class="portal-descr">You can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.</span>
<% foreach (User user in Users.getAllUsers())
{ %>
<div class="user-descr">
<b><%= user.name.IsEmpty() ? "Anonymous" : user.name %></b>
<ul>
<% foreach (string description in user.descriptions)
{ %>
<li><%= description %></li>
<% } %>
</ul>
</div>
<% } %>
</div>
<%
if (storedFiles.Any())
{ %>
<div class="stored-list">
<span class="header-list">Your documents</span>
@ -177,15 +169,18 @@
<tbody>
<% foreach (var storedFile in storedFiles)
{
var editUrl = "doceditor.aspx?fileID=" + HttpUtility.UrlEncode(storedFile.Name);
var directUrlParam = GetDirectUrlParam();
var editUrl = "doceditor.aspx?fileID=" + HttpUtility.UrlEncode(storedFile.Name) + directUrlParam;
var ext = Path.GetExtension(storedFile.Name).ToLower();
var docType = DocumentType(storedFile.Name);
var canEdit = EditedExts.Contains(Path.GetExtension(storedFile.Name).ToLower());
var canEdit = EditedExts.Contains(ext);
var isFillFormDoc = FillFormsExts.Contains(ext);
%>
<tr class="tableRow" title="<%= storedFile.Name %>">
<tr class="tableRow" title="<%= storedFile.Name %> [<%= GetFileVersion(storedFile.Name, HttpContext.Current.Request.UserHostAddress.Replace(':','_')) %>]">
<td class="contentCells">
<a class="stored-edit <%= docType %>" href="<%= editUrl %>" target="_blank">
<span title="<%= storedFile.Name %>"><%= storedFile.Name %></span>
<span><%= storedFile.Name %></span>
</a>
</td>
<% if (canEdit) { %>
@ -200,39 +195,63 @@
</a>
</td>
<td class="contentCells contentCells-icon">
<% if (docType == "word") { %>
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=comment" %>" target="_blank">
<img src="app_themes/images/comment.svg" alt="Open in editor for comment" title="Open in editor for comment"/>
</a>
</td>
<% if (docType == "word") { %>
<td class="contentCells contentCells-icon">
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=review" %>" target="_blank">
<img src="app_themes/images/review.svg" alt="Open in editor for review" title="Open in editor for review"/>
</a>
<% } else if (docType == "cell") { %>
</td>
<% } else if (docType == "cell") { %>
<td class="contentCells contentCells-icon">
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=filter" %>" target="_blank">
<img src="app_themes/images/filter.svg" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
</a>
<% } %>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=comment" %>" target="_blank">
<img src="app_themes/images/comment.svg" alt="Open in editor for comment" title="Open in editor for comment"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<% if (docType == "word") { %>
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=fillForms" %>" target="_blank">
<img src="app_themes/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
<% } %>
</td>
<td class="contentCells contentCells-shift contentCells-icon">
<% if (docType == "word") { %>
</td>
<% } %>
<% if (docType == "word") { %>
<td class="contentCells contentCells-icon">
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=blockcontent" %>" target="_blank">
<img src="app_themes/images/block-content.svg" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
</a>
<% } %>
</td>
</td>
<% } else{%>
<td class="contentCells contentCells-icon"></td>
<%} %>
<%if (docType != "word" && docType != "cell"){%>
<td class="contentCells contentCells-icon "></td>
<% } %>
<% if (isFillFormDoc) { %>
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=fillForms" %>" target="_blank">
<img src="app_themes/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
</td>
<% } else { %>
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift"></td>
<% } %>
<% } else if (isFillFormDoc) { %>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon">
<a href="<%= editUrl + "&editorsType=mobile&editorsMode=fillForms" %>" target="_blank">
<img src="app_themes/images/mobile-fill-forms.svg" alt="Open in editor for filling in forms for mobile devices" title="Open in editor for filling in forms for mobile devices"/>
</a>
</td>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=fillForms" %>" target="_blank">
<img src="app_themes/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
</td>
<% } else { %>
<td class="contentCells contentCells-shift contentCells-icon" colspan="6"></td>
<td class="contentCells contentCells-shift contentCells-icon contentCellsEmpty" colspan="6"></td>
<% } %>
<td class="contentCells contentCells-icon">
<td class="contentCells contentCells-icon firstContentCellViewers">
<a href="<%= editUrl + "&editorsType=desktop&editorsMode=view" %>" target="_blank">
<img src="app_themes/images/desktop.svg" alt="Open in viewer for full size screens" title="Open in viewer for full size screens"/>
</a>
@ -247,7 +266,7 @@
<img src="app_themes/images/embeded.svg" alt="Open in embedded mode" title="Open in embedded mode"/>
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<td class="contentCells contentCells-icon contentCells-shift downloadContentCellShift">
<a href="webeditor.ashx?type=download&fileName=<%= HttpUtility.UrlEncode(storedFile.Name) %>">
<img class="icon-download" src="app_themes/images/download.svg" alt="Download" title="Download" />
</a>
@ -296,10 +315,8 @@
<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 />
@ -308,10 +325,12 @@
</div>
<iframe id="embeddedView" src="" height="345px" width="432px" frameborder="0" scrolling="no" 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 class="buttonsMobile">
<div id="beginEdit" class="button orange disable">Edit</div>
<div id="beginView" class="button gray disable">View</div>
<div id="beginEmbedded" class="button gray disable">Embedded view</div>
<div id="cancelEdit" class="button gray">Cancel</div>
</div>
</div>
<span id="loadScripts" data-docs="<%= UrlPreloadScripts %>"></span>
@ -345,6 +364,7 @@
<script language="javascript" type="text/javascript" src="script/jquery.dropdownToggle.js"></script>
<script language="javascript" type="text/javascript" src="script/jscript.js"></script>
<script language="javascript" type="text/javascript">
var FillFormExtList = '<%= string.Join(",", FillFormsExts.ToArray()) %>';
var ConverExtList = '<%= string.Join(",", ConvertExts.ToArray()) %>';
var EditedExtList = '<%= string.Join(",", EditedExts.ToArray()) %>';
</script>

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -35,7 +35,7 @@ namespace OnlineEditorsExample
// the spreadsheet extension list
public static readonly List<string> ExtsSpreadsheet = new List<string>
{
".xls", ".xlsx", ".xlsm",
".xls", ".xlsx", ".xlsm", ".xlsb",
".xlt", ".xltx", ".xltm",
".ods", ".fods", ".ots", ".csv"
};
@ -56,7 +56,7 @@ namespace OnlineEditorsExample
".dot", ".dotx", ".dotm",
".odt", ".fodt", ".ott", ".rtf", ".txt",
".html", ".htm", ".mht", ".xml",
".pdf", ".djvu", ".fb2", ".epub", ".xps"
".pdf", ".djvu", ".fb2", ".epub", ".xps", ".oxps", ".oform"
};
// get an internal file extension
@ -78,7 +78,9 @@ namespace OnlineEditorsExample
{
get
{
return
return Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ?
WebConfigurationManager.AppSettings["storage-path"] + "/"
:
HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ WebConfigurationManager.AppSettings["storage-path"]
@ -107,7 +109,7 @@ namespace OnlineEditorsExample
// get all the supported file extensions
private static List<string> FileExts
{
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).ToList(); }
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).Concat(FillFormsExts).ToList(); }
}
// file extensions that can be viewed
@ -115,6 +117,11 @@ namespace OnlineEditorsExample
{
get { return (WebConfigurationManager.AppSettings["files.docservice.viewed-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
}
public static List<string> FillFormsExts
{
get { return (WebConfigurationManager.AppSettings["files.docservice.fillform-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
}
// file extensions that can be edited
public static List<string> EditedExts
@ -139,18 +146,52 @@ namespace OnlineEditorsExample
// get the storage path of the given file
public static string StoragePath(string fileName, string userAddress)
{
var directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
var directory = "";
if (Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
{
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
}
else
{
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
}
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory); // if the file directory doesn't exist, make it
}
return directory + Path.GetFileName(fileName);
return directory + (fileName.Contains("\\") ? fileName : Path.GetFileName(fileName));
}
// get the path to the history file version
public static string HistoryPath(string fileName, string userAddress, string version, string file)
{
var directory = "";
if (Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
{
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
}
else
{
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
}
var filepath = directory + Path.GetFileName(fileName) + "-hist" + "\\" + version + "\\" + file;
return filepath;
}
// get the path to the forcesaved file version
public static string ForcesavePath(string fileName, string userAddress, Boolean create)
{
var directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
var directory = "";
if (Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
{
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
}
else
{
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
}
if (!Directory.Exists(directory)) // the directory with host address doesn't exist
{
return "";
@ -202,7 +243,7 @@ namespace OnlineEditorsExample
// get the last file version by its history directory
public static int GetFileVersion(string historyPath)
{
if (!Directory.Exists(historyPath)) return 0;
if (!Directory.Exists(historyPath)) return 1;
return Directory.EnumerateDirectories(historyPath).Count() + 1; // run through all the file versions and count them
}
@ -312,11 +353,7 @@ namespace OnlineEditorsExample
try
{
// hack. http://ubuntuforums.org/showthread.php?t=1841740
if (IsMono)
{
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
}
VerifySSL();
using (var stream = req.GetResponse().GetResponseStream()) // get response stream of the uploading file
{
@ -346,6 +383,68 @@ namespace OnlineEditorsExample
return _fileName;
}
public static string DoSaveAs(HttpContext context)
{
string fileData;
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
{
fileData = readStream.ReadToEnd();
if (string.IsNullOrEmpty(fileData)) return "{\"error\":\"Request stream is empty\"}";
}
}
catch (Exception e)
{
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
}
var jss = new JavaScriptSerializer();
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
var fileUrl = (string) body["url"];
var title = (string) body["title"];
var fileName = GetCorrectName(title);
var extension = "." + (Path.GetExtension(fileName).ToLower() ?? "").Trim('.');
var allExt = ConvertExts.Concat(EditedExts).Concat(ViewedExts).Concat(FillFormsExts).ToArray();
if (!allExt.Contains(extension))
{
return "{\"error\":\"File type is not supported\"}";
}
var req = (HttpWebRequest)WebRequest.Create(fileUrl);
VerifySSL();
using (var stream = req.GetResponse().GetResponseStream())
{
if (stream == null || req.GetResponse().ContentLength <= 0 || req.GetResponse().ContentLength > MaxFileSize)
{
return "{\"error\": \"File size is incorrect\"}";
}
const int bufferSize = 4096;
using (var fs = File.Open(StoragePath(fileName, null), FileMode.Create))
{
var buffer = new byte[bufferSize];
int readed;
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
{
fs.Write(buffer, 0, readed); // write bytes to the output stream
}
}
}
var id = context.Request.Cookies.GetOrDefault("uid", null);
var user = Users.getUser(id); // get the user
DocEditor.CreateMeta(fileName, user.id, user.name, null);
return "{\"file\": \"" + fileName + "\"}";
}
// converting a file
public static string DoConvert(HttpContext context)
{
@ -369,6 +468,7 @@ namespace OnlineEditorsExample
_fileName = Path.GetFileName(body["filename"].ToString());
var filePass = body["filePass"] != null ? body["filePass"].ToString() : null;
var lang = context.Request.Cookies.GetOrDefault("ulang", null);
var extension = (Path.GetExtension(_fileName).ToLower() ?? "").Trim('.');
var internalExtension = FileType.GetInternalExtension(_fileName).Trim('.');
@ -384,11 +484,12 @@ namespace OnlineEditorsExample
fileUrl.Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx";
fileUrl.Query = "type=download&fileName=" + HttpUtility.UrlEncode(_fileName);
fileUrl.Query = "type=download&fileName=" + HttpUtility.UrlEncode(_fileName)
+ "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress));
// get the url to the converted file
string newFileUri;
var result = ServiceConverter.GetConvertedUri(fileUrl.ToString() , extension, internalExtension, key, true, out newFileUri, filePass); ;
var result = ServiceConverter.GetConvertedUri(fileUrl.ToString() , extension, internalExtension, key, true, out newFileUri, filePass, lang);
if (result != 100)
{
return "{ \"step\" : \"" + result + "\", \"filename\" : \"" + _fileName + "\"}";
@ -399,11 +500,7 @@ namespace OnlineEditorsExample
var req = (HttpWebRequest)WebRequest.Create(newFileUri);
// hack. http://ubuntuforums.org/showthread.php?t=1841740
if (IsMono)
{
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
}
VerifySSL();
using (var stream = req.GetResponse().GetResponseStream()) // get response stream of the converting file
{
@ -455,7 +552,16 @@ namespace OnlineEditorsExample
// get all the stored files from the folder
protected static List<FileInfo> GetStoredFiles()
{
var directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(null) + "\\";
var directory = "";
if (Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
{
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
}
else
{
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(null) + "\\";
}
if (!Directory.Exists(directory)) return new List<FileInfo>();
var directoryInfo = new DirectoryInfo(directory); // read the user host directory contents
@ -498,5 +604,33 @@ namespace OnlineEditorsExample
return files;
}
// enable certificate ignore
public static void VerifySSL()
{
// hack. http://ubuntuforums.org/showthread.php?t=1841740
if(WebConfigurationManager.AppSettings["files.docservice.verify-peer-off"].Equals("true")) {
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
}
}
public static Dictionary<string, string> GetLanguages()
{
var languages = new Dictionary<string, string>();
String[] couples = (WebConfigurationManager.AppSettings["files.docservice.languages"] ?? "").Split('|');
foreach (string couple in couples)
{
String[] tmp = couple.Split(':');
languages.Add(tmp[0],tmp[1]);
}
return languages;
}
public static string GetDirectUrlParam()
{
string isEnabledDirectUrl = HttpUtility.ParseQueryString(HttpContext.Current.Request.Url.Query).Get("directUrl");
return "&directUrl=" + (isEnabledDirectUrl != null ? isEnabledDirectUrl : "false");
}
}
}

View File

@ -15,7 +15,7 @@
<title>ONLYOFFICE</title>
<!--
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -64,10 +64,13 @@
<script type="text/javascript" language="javascript">
var docEditor;
var config;
var innerAlert = function (message) {
var innerAlert = function (message, inEditor) {
if (console && console.log)
console.log(message);
if (inEditor && docEditor)
docEditor.showMessage(message);
};
// the application is loaded into the browser
@ -123,10 +126,14 @@
// 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
if (event.data.favorite) {
var favorite = !!event.data.favorite;
var title = document.title.replace(/^\☆/g, "");
document.title = (favorite ? "☆" : "") + title;
docEditor.setFavorite(favorite); // change the Favorite icon state
}
innerAlert("onMetaChange: " + JSON.stringify(event.data));
};
// the user is trying to insert an image by clicking the Image from Storage button
@ -146,8 +153,44 @@
var onRequestMailMergeRecipients = function (event) {
docEditor.setMailMergeRecipients(<%= DataMailMergeRecipients %>); // insert recipient data for mail merge into the file
};
var onRequestSaveAs = function (event) { // the user is trying to save file by clicking Save Copy as... button
var title = event.data.title;
var url = event.data.url;
var data = {
title: title,
url: url
};
let xhr = new XMLHttpRequest();
xhr.open("POST", "webeditor.ashx?type=saveas");
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify(data));
xhr.onload = function () {
innerAlert(xhr.responseText);
innerAlert(JSON.parse(xhr.responseText).file, true);
}
};
var config = <%= DocConfig %>;
var onRequestRename = function(event) { // the user is trying to rename file by clicking Rename... button
innerAlert("onRequestRename: " + JSON.stringify(event.data));
var newfilename = event.data;
var data = {
newfilename: newfilename,
dockey: config.document.key,
ext: config.document.fileType
};
let xhr = new XMLHttpRequest();
xhr.open("POST", "webeditor.ashx?type=rename");
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify(data));
xhr.onload = function () {
innerAlert(xhr.responseText);
}
};
config = <%= DocConfig %>;
config.width = "100%";
config.height = "100%";
@ -165,38 +208,53 @@
"onRequestMailMergeRecipients": onRequestMailMergeRecipients,
};
<% if (!string.IsNullOrEmpty(History) && !string.IsNullOrEmpty(HistoryData))
{ %>
config.events['onRequestHistory'] = function () { // the user is trying to show the document version history
docEditor.refreshHistory(<%= History %>); // show the document version history
};
config.events['onRequestHistoryData'] = function (event) { // the user is trying to click the specific document version in the document version history
var ver = event.data;
var histData = <%= HistoryData %>;
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
};
config.events['onRequestHistoryClose '] = function () { // the user is trying to go back to the document from viewing the document version history
document.location.reload();
};
<% } %>
if (config.editorConfig.user.id) {
<% if (!string.IsNullOrEmpty(History) && !string.IsNullOrEmpty(HistoryData))
{ %>
config.events['onRequestHistory'] = function () { // the user is trying to show the document version history
docEditor.refreshHistory(<%= History %>); // show the document version history
};
config.events['onRequestHistoryData'] = function (event) { // the user is trying to click the specific document version in the document version history
var ver = event.data;
var histData = <%= HistoryData %>;
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
};
config.events['onRequestHistoryClose '] = function () { // the user is trying to go back to the document from viewing the document version history
document.location.reload();
};
<% } %>
<% if (!string.IsNullOrEmpty(UsersForMentions))
{ %>
// add mentions for not anonymous users
config.events['onRequestUsers'] = function () {
docEditor.setUsers({
"users": <%= UsersForMentions %>
});
// add mentions for not anonymous users
<% if (!string.IsNullOrEmpty(UsersForMentions))
{ %>
config.events['onRequestUsers'] = function () {
docEditor.setUsers({ // set a list of users to mention in the comments
"users": <%= UsersForMentions %>
});
};
<% } %>
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = function (event) {
event.data.actionLink = replaceActionLink(location.href, JSON.stringify(event.data.actionLink));
var data = JSON.stringify(event.data);
innerAlert("onRequestSendNotify: " + data);
};
// prevent file renaming for anonymous users
config.events['onRequestRename'] = onRequestRename;
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
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 () {
if ((config.document.fileType === "docxf" || config.document.fileType === "oform")
&& DocsAPI.DocEditor.version().split(".")[0] < 7) {
innerAlert("Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online.");
return;
}
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};

152
web/documentserver-example/csharp/DocEditor.aspx.cs Normal file → Executable file
View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -41,7 +41,7 @@ namespace OnlineEditorsExample
// get url to the original file for Document Server
public static string FileUriUser
{
get { return _Default.FileUri(FileName, false); }
get { return Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? getDownloadUrl(FileName) + "&dmode=emb" : _Default.FileUri(FileName, false); }
}
protected string Key
@ -81,11 +81,12 @@ namespace OnlineEditorsExample
+ "webeditor.ashx";
callbackUrl.Query = "type=track"
+ "&fileName=" + HttpUtility.UrlEncode(FileName)
+ "&userAddress=" + HttpUtility.UrlEncode(HttpContext.Current.Request.UserHostAddress);
+ "&userAddress=" + HttpUtility.UrlEncode(_Default.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress));
return callbackUrl.ToString();
}
}
// get url to the created file
public static string getCreateUrl(String documentType, String editorsType)
{
var createUrl = new UriBuilder(_Default.GetServerUrl(false));
@ -98,20 +99,19 @@ namespace OnlineEditorsExample
return createUrl.ToString();
}
public static string getDownloadUrl
// get url to download a file
public static string getDownloadUrl(string fileName, Boolean isServer = true)
{
get
{
var downloadUrl = new UriBuilder(_Default.GetServerUrl(true));
var userAddress = isServer ? "&userAddress=" + HttpUtility.UrlEncode(_Default.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)) : "";
var downloadUrl = new UriBuilder(_Default.GetServerUrl(isServer));
downloadUrl.Path =
HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx";
downloadUrl.Query = "type=download"
+ "&fileName=" + HttpUtility.UrlEncode(FileName)
+ "&userAddress=" + HttpUtility.UrlEncode(HttpContext.Current.Request.UserHostAddress);
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
+ userAddress;
return downloadUrl.ToString();
}
}
// loading a page
@ -146,12 +146,17 @@ namespace OnlineEditorsExample
var editorsMode = Request.GetOrDefault("editorsMode", "edit");
var canEdit = _Default.EditedExts.Contains(ext); // check if this file can be edited
var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // get the editor opening mode (edit or view)
var submitForm = canEdit && (editorsMode.Equals("edit") || editorsMode.Equals("fillForms")); // check if the Submit form button is displayed or hidden
var editorsType = Request.GetOrDefault("editorsType", "desktop");
var id = Request.Cookies.GetOrDefault("uid", null);
var user = Users.getUser(id); // get the user
if ((!canEdit && editorsMode.Equals("edit") || editorsMode.Equals("fillForms")) && _Default.FillFormsExts.Contains(ext)) {
editorsMode = "fillForms";
canEdit = true;
}
var submitForm = editorsMode.Equals("fillForms") && id.Equals("uid-1") && false; // check if the Submit form button is displayed or hidden
var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // get the editor opening mode (edit or view)
var jss = new JavaScriptSerializer();
@ -161,13 +166,14 @@ namespace OnlineEditorsExample
var actionLink = Request.GetOrDefault("actionLink", null); // get the action link (comment or bookmark) if it exists
var actionData = string.IsNullOrEmpty(actionLink) ? null : jss.DeserializeObject(actionLink); // get action data for the action link
var directUrl = getDownloadUrl(FileName, false);
var createUrl = getCreateUrl(DocumentType, editorsType);
var templatesImageUrl = GetTemplateImageUrl(ext); // image url for templates
var templates = new List<Dictionary<string, string>>
{
new Dictionary<string, string>()
{
{ "image", templatesImageUrl },
{ "image", "" },
{ "title", "Blank" },
{ "url", createUrl }
},
@ -188,7 +194,8 @@ namespace OnlineEditorsExample
"document", new Dictionary<string, object>
{
{ "title", FileName },
{ "url", getDownloadUrl },
{ "url", getDownloadUrl(FileName) },
{ "directUrl", IsEnabledDirectUrl() ? directUrl : "" },
{ "fileType", ext.Trim('.') },
{ "key", Key },
{
@ -212,8 +219,10 @@ namespace OnlineEditorsExample
{ "modifyFilter", editorsMode != "filter" },
{ "modifyContentControl", editorsMode != "blockcontent" },
{ "review", canEdit && (editorsMode == "edit" || editorsMode == "review") },
{ "chat", !user.id.Equals("uid-0") },
{ "reviewGroups", user.reviewGroups },
{ "commentGroups", user.commentGroups }
{ "commentGroups", user.commentGroups },
{ "userInfoGroups", user.userInfoGroups }
}
}
}
@ -225,13 +234,18 @@ namespace OnlineEditorsExample
{ "mode", mode },
{ "lang", Request.Cookies.GetOrDefault("ulang", "en") },
{ "callbackUrl", CallbackUrl }, // absolute URL to the document storage service
{ "coEditing", editorsMode == "view" && user.id.Equals("uid-0") ?
new Dictionary<string, object>{
{"mode", "strict"},
{"change", false}
} : null },
{ "createUrl", !user.id.Equals("uid-0") ? createUrl : null },
{ "templates", user.templates ? templates : null },
{
// the user currently viewing or editing the document
"user", new Dictionary<string, object>
{
{ "id", user.id },
{ "id", !user.id.Equals("uid-0") ? user.id : null },
{ "name", user.name },
{ "group", user.group }
}
@ -240,9 +254,9 @@ namespace OnlineEditorsExample
// 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
{ "saveUrl", directUrl }, // the absolute URL that will allow the document to be saved onto the user personal computer
{ "embedUrl", directUrl }, // the absolute URL to the document serving as a source file for the document embedded into the web page
{ "shareUrl", directUrl }, // the absolute URL that will allow other users to share this document
{ "toolbarDocked", "top" } // the place for the embedded viewer toolbar (top or bottom)
}
},
@ -251,6 +265,7 @@ namespace OnlineEditorsExample
"customization", new Dictionary<string, object>
{
{ "about", true }, // the About section display
{ "comments", true },
{ "feedback", true }, // the Feedback & Support menu button display
{ "forcesave", false }, // adds the request for the forced file saving to the callback handler
{ "submitForm", submitForm }, // if the Submit form button is displayed or not
@ -311,6 +326,7 @@ namespace OnlineEditorsExample
// get the document history
private void GetHistory(out Dictionary<string, object> history, out Dictionary<string, object> historyData)
{
var storagePath = WebConfigurationManager.AppSettings["storage-path"];
var jss = new JavaScriptSerializer();
var histDir = _Default.HistoryDir(_Default.StoragePath(FileName, null));
@ -348,8 +364,25 @@ namespace OnlineEditorsExample
}
}
var ext = Path.GetExtension(FileName).ToLower();
dataObj.Add("fileType", ext.Replace(".", ""));
dataObj.Add("key", key);
dataObj.Add("url", i == currentVersion ? FileUri : MakePublicUrl(Directory.GetFiles(verDir, "prev.*")[0])); // write file url to the data object
// write file url to the data object
var directPrevFileUrl = i == currentVersion ? _Default.FileUri(FileName, false) : MakePublicHistoryUrl(FileName, i.ToString(), "prev" + ext, false);
var prevFileUrl = i == currentVersion ? FileUri : MakePublicHistoryUrl(FileName, i.ToString(), "prev" + ext);
if (Path.IsPathRooted(storagePath))
{
prevFileUrl = i == currentVersion ? getDownloadUrl(FileName) : getDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""));
directPrevFileUrl = i == currentVersion ? getDownloadUrl(FileName, false) : getDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""), false);
}
dataObj.Add("url", prevFileUrl); // write file url to the data object
if (IsEnabledDirectUrl())
{
dataObj.Add("directUrl", directPrevFileUrl); // write direct url to the data object
}
dataObj.Add("version", i);
if (i > 1) // check if the version number is greater than 1 (the file was modified)
{
@ -367,12 +400,22 @@ namespace OnlineEditorsExample
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
Dictionary<string, object> dataPrev = new Dictionary<string, object>() { // write information about previous file version to the data object
{ "fileType", prev["fileType"] },
{ "key", prev["key"] }, // write key and url information about previous file version
{ "url", prev["url"] },
});
{ "url", prev["url"] }
};
if (IsEnabledDirectUrl())
{
dataPrev.Add("directUrl", prev["directUrl"]);
}
dataObj.Add("previous", dataPrev);
// write the path to the diff.zip archive with differences in this file version
dataObj.Add("changesUrl", MakePublicUrl(Path.Combine(_Default.VersionDir(histDir, i - 1), "diff.zip")));
var changesUrl = MakePublicHistoryUrl(FileName, (i - 1).ToString(), "diff.zip");
dataObj.Add("changesUrl", changesUrl);
}
if (JwtManager.Enabled)
{
@ -402,6 +445,11 @@ namespace OnlineEditorsExample
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "App_Themes\\images\\logo.png";
var DirectImageUrl = new UriBuilder(_Default.GetServerUrl(false));
DirectImageUrl.Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "App_Themes\\images\\logo.png";
// create a logo config
Dictionary<string, object> logoConfig = new Dictionary<string, object>
{
@ -409,6 +457,11 @@ namespace OnlineEditorsExample
{ "url", InsertImageUrl.ToString()}
};
if (IsEnabledDirectUrl())
{
logoConfig.Add("directUrl", DirectImageUrl.ToString());
}
if (JwtManager.Enabled) // if the secret key to generate token exists
{
var insImageToken = JwtManager.Encode(logoConfig); // encode logoConfig into the token
@ -428,6 +481,12 @@ namespace OnlineEditorsExample
+ "webeditor.ashx";
compareFileUrl.Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx");
var DirectFileUrl = new UriBuilder(_Default.GetServerUrl(false));
DirectFileUrl.Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx";
DirectFileUrl.Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx");
// create an object with the information about the compared file
Dictionary<string, object> dataCompareFile = new Dictionary<string, object>
{
@ -435,6 +494,11 @@ namespace OnlineEditorsExample
{ "url", compareFileUrl.ToString() }
};
if (IsEnabledDirectUrl())
{
dataCompareFile.Add("directUrl", DirectFileUrl.ToString());
}
if (JwtManager.Enabled) // if the secret key to generate token exists
{
var compareFileToken = JwtManager.Encode(dataCompareFile); // encode the dataCompareFile object into the token
@ -455,6 +519,13 @@ namespace OnlineEditorsExample
+ "webeditor.ashx";
mailmergeUrl.Query = "type=csv";
var DirectMailMergeUrl = new UriBuilder(_Default.GetServerUrl(false));
DirectMailMergeUrl.Path =
HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx";
DirectMailMergeUrl.Query = "type=csv";
// create a mail merge config
Dictionary<string, object> mailMergeConfig = new Dictionary<string, object>
{
@ -462,6 +533,11 @@ namespace OnlineEditorsExample
{ "url", mailmergeUrl.ToString() }
};
if (IsEnabledDirectUrl())
{
mailMergeConfig.Add("directUrl", DirectMailMergeUrl.ToString());
}
if (JwtManager.Enabled) // if the secret key to generate token exists
{
var mailmergeToken = JwtManager.Encode(mailMergeConfig); // encode mailMergeConfig into the token
@ -496,10 +572,26 @@ namespace OnlineEditorsExample
// create the public url
private string MakePublicUrl(string fullPath)
{
var root = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"];
var root = Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? WebConfigurationManager.AppSettings["storage-path"]
: HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"];
return _Default.GetServerUrl(true) + fullPath.Substring(root.Length).Replace(Path.DirectorySeparatorChar, '/');
}
// create the public history url
private string MakePublicHistoryUrl(string filename, string version, string file, Boolean isServer = true)
{
var userAddress = isServer ? "&userAddress=" + HttpUtility.UrlEncode(_Default.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)) : "";
var fileUrl = new UriBuilder(_Default.GetServerUrl(isServer));
fileUrl.Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx";
fileUrl.Query = "type=downloadhistory&fileName=" + HttpUtility.UrlEncode(filename)
+ "&ver=" + version + "&file=" + file
+ userAddress;
return fileUrl.ToString();
}
// create demo document
private static void Try(string type, string sample, HttpRequest request)
{
@ -515,6 +607,9 @@ namespace OnlineEditorsExample
case "slide":
ext = ".pptx"; // .pptx for slide document type
break;
case "docxf":
ext = ".docxf";
break;
default:
return;
}
@ -544,5 +639,12 @@ namespace OnlineEditorsExample
{ "name", uname }
}));
}
// get direct url flag
private static bool IsEnabledDirectUrl()
{
string isEnabledDirectUrl = HttpUtility.ParseQueryString(HttpContext.Current.Request.Url.Query).Get("directUrl");
return isEnabledDirectUrl != null ? Convert.ToBoolean(isEnabledDirectUrl) : false;
}
}
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -84,7 +84,8 @@ namespace ASC.Api.DocumentConverter
string documentRevisionId,
bool isAsync,
out string convertedDocumentUri,
string filePass = null)
string filePass = null,
string lang = null)
{
convertedDocumentUri = string.Empty;
@ -116,7 +117,8 @@ namespace ASC.Api.DocumentConverter
{ "outputtype", toExtension.Trim('.') },
{ "title", title },
{ "url", documentUri },
{ "password", filePass }
{ "password", filePass },
{ "region", lang }
};
if (JwtManager.Enabled)
@ -130,7 +132,7 @@ namespace ASC.Api.DocumentConverter
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 = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
request.Headers.Add(JWTheader, "Bearer " + payloadToken); // and add it to the request headers with the Bearer prefix
body.Add("token", bodyToken);
@ -143,11 +145,7 @@ namespace ASC.Api.DocumentConverter
requestStream.Write(bytes, 0, bytes.Length); // and write the serialized body object to it
}
// hack. http://ubuntuforums.org/showthread.php?t=1841740
if (_Default.IsMono)
{
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
}
_Default.VerifySSL();
string dataResponse;
using (var response = request.GetResponse())

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,12 +16,12 @@
*
*/
using System;
using JWT;
using JWT.Algorithms;
using JWT.Builder;
using JWT.Serializers;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Web.Configuration;
using System.Web.Script.Serialization;
namespace OnlineEditorsExample
{
@ -30,31 +30,19 @@ namespace OnlineEditorsExample
private static readonly string Secret;
public static readonly bool Enabled;
private static readonly JavaScriptSerializer Serializer;
static JwtManager()
{
Secret = WebConfigurationManager.AppSettings["files.docservice.secret"] ?? ""; // get token secret from the config parameters
Enabled = !string.IsNullOrEmpty(Secret); // check if the token is enabled
Serializer = new JavaScriptSerializer(); // define java script serializer
}
// 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(Serializer.Serialize(header)); // header
var encPayload = Base64UrlEncode(Serializer.Serialize(payload)); // payload
var hashSum = Base64UrlEncode(CalculateHash(encHeader, encPayload)); // signature
return string.Format("{0}.{1}.{2}", encHeader, encPayload, hashSum);
var encoder = new JwtEncoder(new HMACSHA256Algorithm(),
new JsonNetSerializer(),
new JwtBase64UrlEncoder());
return encoder.Encode(payload, Secret);
}
// decode a token into a payload object using a secret key
@ -62,52 +50,11 @@ namespace OnlineEditorsExample
{
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);
return JwtBuilder.Create()
.WithAlgorithm(new HMACSHA256Algorithm())
.WithSecret(Secret)
.MustVerifySignature()
.Decode(token);
}
}
}

View File

@ -11,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineEditorsExample</RootNamespace>
<AssemblyName>OnlineEditorsExample</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
@ -23,6 +23,8 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<TargetFrameworkProfile />
<Use64BitIISExpress />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -44,51 +46,66 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="JWT, Version=9.0.0.0, Culture=neutral, PublicKeyToken=6f98bca0f40f2ecf, processorArchitecture=MSIL">
<HintPath>packages\JWT.9.0.3\lib\net46\JWT.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Web.Infrastructure">
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Helpers">
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor">
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.Services" />
<Reference Include="System.Web.WebPages">
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment">
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor">
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="App_Themes\images\block-content-24.png" />
<Content Include="App_Themes\images\block-content.svg" />
<Content Include="App_Themes\images\cell.ico" />
<Content Include="App_Themes\images\comment-24.png" />
<Content Include="App_Themes\images\delete-24.png" />
<Content Include="App_Themes\images\desktop-24.png" />
<Content Include="App_Themes\images\download-24.png" />
<Content Include="App_Themes\images\embeded-24.png" />
<Content Include="App_Themes\images\file_docx.png" />
<Content Include="App_Themes\images\file_pptx.png" />
<Content Include="App_Themes\images\file_upload.png" />
<Content Include="App_Themes\images\file_xlsx.png" />
<Content Include="App_Themes\images\fill-forms-24.png" />
<Content Include="App_Themes\images\filter-24.png" />
<Content Include="App_Themes\images\icon_docx.png" />
<Content Include="App_Themes\images\icon_pptx.png" />
<Content Include="App_Themes\images\icon_xlsx.png" />
<Content Include="App_Themes\images\mobile-24.png" />
<Content Include="App_Themes\images\review-24.png" />
<Content Include="App_Themes\images\close.svg" />
<Content Include="App_Themes\images\comment.svg" />
<Content Include="App_Themes\images\delete.svg" />
<Content Include="App_Themes\images\desktop.svg" />
<Content Include="App_Themes\images\done.svg" />
<Content Include="App_Themes\images\download.svg" />
<Content Include="App_Themes\images\embeded.svg" />
<Content Include="App_Themes\images\error.svg" />
<Content Include="App_Themes\images\file_docx.svg" />
<Content Include="App_Themes\images\file_docxf.svg" />
<Content Include="App_Themes\images\file_pptx.svg" />
<Content Include="App_Themes\images\file_upload.svg" />
<Content Include="App_Themes\images\file_xlsx.svg" />
<Content Include="App_Themes\images\fill-forms.svg" />
<Content Include="App_Themes\images\filter.svg" />
<Content Include="App_Themes\images\icon_docx.svg" />
<Content Include="App_Themes\images\icon_pptx.svg" />
<Content Include="App_Themes\images\icon_xlsx.svg" />
<Content Include="App_Themes\images\info.svg" />
<Content Include="App_Themes\images\logo.svg" />
<Content Include="App_Themes\images\mobile-fill-forms.svg" />
<Content Include="App_Themes\images\mobile.svg" />
<Content Include="App_Themes\images\notdone.svg" />
<Content Include="App_Themes\images\review.svg" />
<Content Include="App_Themes\images\slide.ico" />
<Content Include="App_Themes\images\word.ico" />
<Content Include="App_Themes\media.css" />
<Content Include="LICENSE" />
<Content Include="licenses\jquery.license" />
<Content Include="Web.config" />
@ -126,13 +143,8 @@
<Content Include="Default.aspx" />
</ItemGroup>
<ItemGroup>
<Content Include="App_Themes\images\alert.png" />
<Content Include="App_Themes\images\close.png" />
<Content Include="App_Themes\images\corner.png" />
<Content Include="App_Themes\images\done.png" />
<Content Include="App_Themes\images\loader16.gif" />
<Content Include="App_Themes\images\logo.png" />
<Content Include="App_Themes\images\question_small.png" />
<Content Include="App_Themes\jquery-ui.css" />
<Content Include="App_Themes\stylesheet.css" />
<Content Include="DocEditor.aspx" />
@ -149,10 +161,12 @@
<Content Include="assets\AUTHORS.md" />
<Content Include="assets\LICENSE" />
<Content Include="assets\new\new.docx" />
<Content Include="assets\new\new.docxf" />
<Content Include="assets\new\new.pptx" />
<Content Include="assets\new\new.xlsx" />
<Content Include="assets\sample\csv.csv" />
<Content Include="assets\sample\sample.docx" />
<Content Include="assets\sample\sample.docxf" />
<Content Include="assets\sample\sample.pptx" />
<Content Include="assets\sample\sample.xlsx" />
<None Include="packages.config" />

View File

@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ascensio System SIA")]
[assembly: AssemblyProduct("OnlineEditorsExample")]
[assembly: AssemblyCopyright("Ascensio System SIA 2021")]
[assembly: AssemblyCopyright("Ascensio System SIA 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@ -2,11 +2,11 @@
This example will help you integrate ONLYOFFICE Docs into your web application written in .Net (C#).
It is aimed at testing the editors. Please, do not use it for production without proper modifications.
**Please note**: It is intended for testing purposes and demonstrating functionality of the editors. Do NOT use this integration example on your own server without proper code modifications! In case you enabled the test example, disable it before going for production.
## Step 1. Install ONLYOFFICE Docs
Download and install ONLYOFFICE Docs (packaged as Document Server).
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).
@ -14,35 +14,57 @@ See the detailed guide to learn how to install Document Server [for Windows](htt
Download the [.Net (C#) example](https://api.onlyoffice.com/editors/demopreview) from our site.
Connect the editors to your website by specifying the path to the editors installation in the *settings.config* file:
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *settings.config* file:
```
<add key="storage-path" value=""/>
<add key="files.docservice.url.site" value="https://documentserver/" />
```
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed.
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-path** is the path where files will be created and stored. You can set an absolute path.
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) it the *DocEditor.aspx* file.
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *DocEditor.aspx* file.
## Step 3. Install the prerequisites
Check that your system meets the requirements:
* Microsoft .NET Framework: version 4.5 (download it from the [official Microsoft website](https://www.microsoft.com/en-US/download/details.aspx?id=30653));
* Internet Information Services: version 7 or later.
* **Microsoft .NET Framework**: version 4.5 (download it from the [official Microsoft website](https://www.microsoft.com/en-US/download/details.aspx?id=30653));
* **Internet Information Services**: version 7 or later.
Configure the IIS components for the server to work correctly:
1. Open Windows features:
**Start** -> **Control Panel** -> **Programs** -> **Programs and Features** -> **Turn Windows features on or off**
2. In the opened window, find **Internet Information Services** and choose all the necessary features. To do this, open the **World Wide Web Services** list and check the following components:
* **Application Development Features**: .NET Extensibility 4.8, ASP.NET 4.8, ISAPI Extensions, ISAPI Filters,
* **Common HTTP Features**: Default Document,
* **Security**: Request Filtering.
## Step 4. Run your website with the editors
1. Run the Internet Information Service (IIS) manager
Start -> ControlPanel -> System and Security -> Administrative Tools -> Internet Information Services (IIS) Manager
2. Add your website in the IIS Manager
1. Run the Internet Information Service (IIS) Manager:
**Start** -> **Control Panel** -> **System and Security** -> **Administrative Tools** -> **Internet Information Services (IIS) Manager**
2. Add your website in the IIS Manager.
On the **Connections** panel right-click the **Sites** node in the tree, then click **Add Website**.
![add](screenshots/add.png)
3. In the **Add Website** dialog box specify the name of the folder with the .Net (C#) project in the **Site name** box.
Specify the path to the folder with your project in the **Physical Path** box.
Specify the unique value used only for this website in the **Port** box.
![sitename](screenshots/sitename.png)
4. Check for the .NET platform version specified in IIS manager for you website. Choose **v4.0.** version.
Click the **Application Pool** -> right-click the platform name -> **Set application Pool defaults** -> **.NET CLR version**
4. Check for the .NET platform version specified in IIS Manager for you website. Choose **v4.0.** version.
**Application Pools** -> right-click the platform name -> **Set application Pool defaults** -> **.NET CLR version**
![platform](screenshots/platform.png)
5. Browse your website with the IIS manager:
5. Browse your website with the IIS Manager:
Right-click the site -> **Manage Website** -> **Browse**
![browse](screenshots/browse.png)
## Step 5. Check accessibility
@ -50,3 +72,12 @@ Check that your system meets the requirements:
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 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.
## Important security info
Please keep in mind the following security aspects when you are using test examples:
* There is no protection of the storage from unauthorized access since there is no need for authorization.
* There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
* There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
* There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -57,7 +57,7 @@ namespace OnlineEditorsExample
// check if the document token is enabled
if (JwtManager.Enabled)
{
string JWTheader = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string token = null;
@ -76,9 +76,11 @@ namespace OnlineEditorsExample
context.Response.Write("{\"error\":1,\"message\":\"JWT expected\"}");
}
if (token != null && !token.Equals("")) // invalid signature error
if (!string.IsNullOrEmpty(token)) // invalid signature error
{
fileData = (Dictionary<string, object>)jss.Deserialize<Dictionary<string, object>>(token)["payload"];
fileData = jss.Deserialize<Dictionary<string, object>>(token);
if (fileData.ContainsKey("payload"))
fileData = (Dictionary<string, object>)fileData["payload"];
}
else
{
@ -92,9 +94,14 @@ namespace OnlineEditorsExample
// file saving process
public static int processSave(Dictionary<string, object> fileData, string fileName, string userAddress)
{
if (fileData["url"].Equals(null)) {
throw new Exception("DownloadUrl is null");
}
var downloadUri = (string)fileData["url"];
var curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
var downloadExt = Path.GetExtension(downloadUri).ToLower() ?? ""; // get the extension of the downloaded file
var downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
var newFileName = fileName;
// convert downloaded file to the file with the current extension if these extensions aren't equal
@ -121,43 +128,50 @@ namespace OnlineEditorsExample
}
}
// hack. http://ubuntuforums.org/showthread.php?t=1841740
if (_Default.IsMono)
_Default.VerifySSL();
try
{
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
var bytesFile = DownloadFile(downloadUri); // download document file
var storagePath = _Default.StoragePath(newFileName, userAddress); // get the file path
var histDir = _Default.HistoryDir(storagePath); // get the path to the history directory
if (!Directory.Exists(histDir)) Directory.CreateDirectory(histDir);
var versionDir = _Default.VersionDir(histDir, _Default.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 rename the storage path with it
File.Copy(_Default.StoragePath(fileName, userAddress), Path.Combine(versionDir, "prev" + curExt));
SaveFile(bytesFile, storagePath);// save document file
var bytesChanges = DownloadFile((string)fileData["changesurl"]); // download changes file
SaveFile(bytesChanges, Path.Combine(versionDir, "diff.zip")); // save file changes to the diff.zip archive
var hist = fileData.ContainsKey("changeshistory") ? (string)fileData["changeshistory"] : null;
if (string.IsNullOrEmpty(hist) && fileData.ContainsKey("history"))
{
var jss = new JavaScriptSerializer();
hist = jss.Serialize(fileData["history"]);
}
if (!string.IsNullOrEmpty(hist))
{
File.WriteAllText(Path.Combine(versionDir, "changes.json"), hist); // write the history changes to the changes.json file
}
File.WriteAllText(Path.Combine(versionDir, "key.txt"), (string)fileData["key"]); // write the key value to the key.txt file
string forcesavePath = _Default.ForcesavePath(newFileName, userAddress, false); // get the path to the forcesaved file version
if (!string.IsNullOrEmpty(forcesavePath)) // if the forcesaved file version exists
{
File.Delete(forcesavePath); // remove it
}
}
var storagePath = _Default.StoragePath(newFileName, userAddress); // get the file path
var histDir = _Default.HistoryDir(storagePath); // get the path to the history directory
if (!Directory.Exists(histDir)) Directory.CreateDirectory(histDir);
var versionDir = _Default.VersionDir(histDir, _Default.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 rename the storage path with it
File.Copy(_Default.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"))
catch (Exception)
{
var jss = new JavaScriptSerializer();
hist = jss.Serialize(fileData["history"]);
}
if (!string.IsNullOrEmpty(hist))
{
File.WriteAllText(Path.Combine(versionDir, "changes.json"), hist); // write the history changes to the changes.json file
}
File.WriteAllText(Path.Combine(versionDir, "key.txt"), (string)fileData["key"]); // write the key value to the key.txt file
string forcesavePath = _Default.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 1;
}
return 0;
@ -166,10 +180,15 @@ namespace OnlineEditorsExample
// file force saving process
public static int processForceSave(Dictionary<string, object> fileData, string fileName, string userAddress)
{
if (fileData["url"].Equals(null)) {
throw new Exception("DownloadUrl is null");
}
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 downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
Boolean newFileName = false;
// convert downloaded file to the file with the current extension if these extensions aren't equal
@ -195,57 +214,63 @@ namespace OnlineEditorsExample
}
}
// hack. http://ubuntuforums.org/showthread.php?t=1841740
if (_Default.IsMono)
{
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
}
_Default.VerifySSL();
string forcesavePath = "";
Boolean isSubmitForm = fileData["forcesavetype"].ToString().Equals("3"); // SubmitForm
if (isSubmitForm) // if the form is submitted
try
{
if (newFileName)
var bytesFile = DownloadFile(downloadUri); // download document file
string forcesavePath = "";
Boolean isSubmitForm = fileData["forcesavetype"].ToString().Equals("3"); // SubmitForm
if (isSubmitForm) // if the form is submitted
{
fileName = _Default.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + downloadExt, userAddress); // get the correct file name if it already exists
if (newFileName)
{
fileName = _Default.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + downloadExt, userAddress); // get the correct file name if it already exists
} else
{
fileName = _Default.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + curExt, userAddress);
{
fileName = _Default.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + curExt, userAddress);
}
forcesavePath = _Default.StoragePath(fileName, userAddress);
}
forcesavePath = _Default.StoragePath(fileName, userAddress);
}
else
{
if (newFileName)
else
{
fileName = _Default.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
if (newFileName)
{
fileName = _Default.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
}
forcesavePath = _Default.ForcesavePath(fileName, userAddress, false);
if (string.IsNullOrEmpty(forcesavePath)) // create forcesave path if it doesn't exist
{
forcesavePath = _Default.ForcesavePath(fileName, userAddress, true);
}
}
forcesavePath = _Default.ForcesavePath(fileName, userAddress, false);
if (forcesavePath.Equals("")) // create forcesave path if it doesn't exist
SaveFile(bytesFile, forcesavePath);// save document file
if (isSubmitForm)
{
forcesavePath = _Default.ForcesavePath(fileName, userAddress, true);
var jss = new JavaScriptSerializer();
var actions = jss.Deserialize<List<object>>(jss.Serialize(fileData["actions"]));
var action = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(actions[0]));
var user = action["userid"].ToString(); // get the user id
DocEditor.CreateMeta(fileName, user, "Filling Form", userAddress); // create meta data for the forcesaved file
}
}
DownloadToFile(downloadUri, forcesavePath);
if (isSubmitForm)
catch (Exception)
{
var jss = new JavaScriptSerializer();
var actions = jss.Deserialize<List<object>>(jss.Serialize(fileData["actions"]));
var action = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(actions[0]));
var user = action["userid"].ToString(); // get the user id
DocEditor.CreateMeta(fileName, user, "Filling Form", userAddress); // create meta data for the forcesaved file
return 1;
}
return 0;
}
// create a command request
public static void commandRequest(string method, string key)
public static void commandRequest(string method, string key, object meta = null)
{
_Default.VerifySSL();
string documentCommandUrl = WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.command"];
var request = (HttpWebRequest)WebRequest.Create(documentCommandUrl);
@ -257,17 +282,22 @@ namespace OnlineEditorsExample
{ "key", key }
};
if (meta != null)
{
body.Add("meta", meta);
}
// check if a secret key to generate token exists or not
if (JwtManager.Enabled)
{
var payload = new Dictionary<string, object>
{
{ "payload", body }
};
{
{ "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 = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
request.Headers.Add(JWTheader, "Bearer " + payloadToken); // add a header Authorization with a header token and Authorization prefix in it
body.Add("token", bodyToken);
@ -302,26 +332,29 @@ namespace OnlineEditorsExample
}
}
private static void SaveFile(byte[] data, string path)
{
using (var fs = File.Open(path, FileMode.Create))
{
fs.Write(data, 0, data.Length);
}
}
// save file information from the url to the file specified
private static void DownloadToFile(string url, string path)
private static byte[] DownloadFile(string url)
{
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);
req.Timeout = 5000;
using (var stream = req.GetResponse().GetResponseStream()) // get input stream of the file information from the url
{
if (stream == null) throw new Exception("stream is null");
const int bufferSize = 4096;
using (var fs = File.Open(path, FileMode.Create))
using (MemoryStream memoryStream = new MemoryStream())
{
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
}
stream.CopyTo(memoryStream);
return memoryStream.ToArray();
}
}
}

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -29,7 +29,8 @@ namespace OnlineEditorsExample
"Can review all the changes",
"Can perform all actions with comments",
"The file favorite state is undefined",
"Can create files from templates using data from the editor"
"Can create files from templates using data from the editor",
"Can see the information about all users"
};
static List<string> descr_user_2 = new List<string>()
@ -38,19 +39,21 @@ namespace OnlineEditorsExample
"Can review only his own changes or changes made by users with no group",
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
"This file is marked as favorite",
"Can create new files from the editor"
"Can create new files from the editor",
"Can see the information about users from Group2 and users who dont belong to any group"
};
static List<string> descr_user_3 = new List<string>()
{
"Belongs to Group3",
"Can review changes made by Group2 users",
"Can view comments left by Group2 and Group3 users. Can edit comments left by Group2 users",
"Can view comments left by Group2 and Group3 users. Can edit comments left by the Group2 users",
"This file isnt marked as favorite",
"Cant copy data from the file to clipboard",
"Cant download the file",
"Cant print the file",
"Can create new files from the editor"
"Can create new files from the editor",
"Can see the information about Group2 users"
};
static List<string> descr_user_0 = new List<string>()
@ -61,18 +64,23 @@ namespace OnlineEditorsExample
"Can perform all actions with comments",
"The file favorite state is undefined",
"Can't mention others in comments",
"Can't create new files from the editor"
"Can't create new files from the editor",
"Cant see anyones information",
"Can't rename files from the editor",
"Can't view chat",
"View file without collaboration",
};
private static List<User> users = new List<User>() {
new User(
"uid-1",
"John Smith",
"smith@mail.ru",
null,
"smith@example.com",
"",
null,
new Dictionary<string, object>(),
null,
null,
new List<string>(),
descr_user_1,
true
@ -80,7 +88,7 @@ namespace OnlineEditorsExample
new User(
"uid-2",
"Mark Pottato",
"pottato@mail.ru",
"pottato@example.com",
"group-2",
new List<string>() { "group-2", "" },
new Dictionary<string, object>()
@ -89,6 +97,7 @@ namespace OnlineEditorsExample
{ "edit", new List<string>() { "group-2", "" } },
{ "remove", new List<string>() { "group-2" } }
},
new List<string>() { "group-2", "" },
true,
new List<string>(),
descr_user_2,
@ -97,7 +106,7 @@ namespace OnlineEditorsExample
new User(
"uid-3",
"Hamish Mitchell",
"mitchell@mail.ru",
"mitchell@example.com",
"group-3",
new List<string>() { "group-2" },
new Dictionary<string,object>()
@ -106,6 +115,7 @@ namespace OnlineEditorsExample
{ "edit", new List<string>() { "group-2" } },
{ "remove", new List<string>() { } }
},
new List<string>() { "group-2" },
false,
new List<string>() { "copy", "download", "print" },
descr_user_3,
@ -115,9 +125,10 @@ namespace OnlineEditorsExample
"uid-0",
null,
null,
null,
"",
null,
new Dictionary<string, object>(),
new List<string>(),
null,
new List<string>(),
descr_user_0,
@ -125,6 +136,7 @@ namespace OnlineEditorsExample
)
};
// get a user by id specified
public static User getUser(string id)
{
foreach (User user in users)
@ -134,11 +146,13 @@ namespace OnlineEditorsExample
return users[0];
}
// get a list of all the users
public static List<User> getAllUsers()
{
return users;
}
// get a list of users with their names and emails for mentions
public static List<Dictionary<string, object>> getUsersForMentions(string id)
{
List<Dictionary<string, object>> usersData = new List<Dictionary<string, object>>();
@ -170,8 +184,9 @@ namespace OnlineEditorsExample
public List<string> deniedPermissions;
public List<string> descriptions;
public bool templates;
public List<string> userInfoGroups;
public User(string id, string name, string email, string group, List<string> reviewGroups, Dictionary<string, object> commentGroups, bool? favorite, List<string> deniedPermissions, List<string> descriptions, bool templates)
public User(string id, string name, string email, string group, List<string> reviewGroups, Dictionary<string, object> commentGroups, List<string> userInfoGroups, bool? favorite, List<string> deniedPermissions, List<string> descriptions, bool templates)
{
this.id = id;
this.name = name;
@ -183,6 +198,7 @@ namespace OnlineEditorsExample
this.deniedPermissions = deniedPermissions;
this.descriptions = descriptions;
this.templates = templates;
this.userInfoGroups = userInfoGroups;
}
}
}

View File

@ -1,4 +1,22 @@
using System.Web;
/**
*
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Web;
namespace OnlineEditorsExample
{

View File

@ -1,28 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings configSource="settings.config"/>
<appSettings configSource="settings.config" />
<system.web>
<httpRuntime maxRequestLength="51200"/>
<compilation debug="true" targetFramework="4.5"/>
<authentication mode="Windows"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
<httpRuntime maxRequestLength="51200" />
<compilation debug="true" targetFramework="4.5" />
<authentication mode="Windows" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824"/>
<requestLimits maxAllowedContentLength="52428800" />
<denyUrlSequences>
<add sequence=".."/>
<add sequence=".." />
</denyUrlSequences>
<hiddenSegments>
<remove segment="App_Data"/>
<remove segment="App_Data" />
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -44,6 +44,9 @@ namespace OnlineEditorsExample
case "download":
Download(context);
break;
case "downloadhistory":
DownloadHistory(context);
break;
case "convert":
Convert(context);
break;
@ -62,6 +65,26 @@ namespace OnlineEditorsExample
case "files":
Files(context);
break;
case "saveas":
SaveAs(context);
break;
case "rename":
Rename(context);
break;
}
}
private static void SaveAs(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
var result = _Default.DoSaveAs(context);
context.Response.Write(result);
}
catch (Exception e)
{
context.Response.Write("{ \"error\": \"" + 1 + "\", \"message\": \"" + e.Message + "\"}");
}
}
@ -118,7 +141,7 @@ namespace OnlineEditorsExample
var userAddress = context.Request["userAddress"];
var fileName = Path.GetFileName(context.Request["fileName"]);
var status = (TrackerStatus) (int) fileData["status"]; // get status from the request body
var saved = 1; // editing
var saved = 0;
switch (status)
{
case TrackerStatus.Editing:
@ -174,7 +197,7 @@ namespace OnlineEditorsExample
context.Response.Write("{\"error\":" + saved + "}");
return;
}
context.Response.Write("{\"error\":0}");
context.Response.Write("{\"error\":" + saved + "}");
}
// remove a file
@ -184,7 +207,7 @@ namespace OnlineEditorsExample
try
{
var fileName = Path.GetFileName(context.Request["fileName"]);
var path = _Default.StoragePath(fileName, HttpUtility.UrlEncode(HttpContext.Current.Request.UserHostAddress));
var path = _Default.StoragePath(fileName, HttpUtility.UrlEncode(_Default.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)));
var histDir = _Default.HistoryDir(path);
if (File.Exists(path)) File.Delete(path); // delete file
@ -254,29 +277,30 @@ namespace OnlineEditorsExample
{
try
{
var fileName = Path.GetFileName(context.Request["fileName"]);
var fileName = Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? context.Request["fileName"] : Path.GetFileName(context.Request["fileName"]);
var userAddress = Path.GetFileName(context.Request["userAddress"]);
var isEmbedded = context.Request["dmode"];
if (JwtManager.Enabled)
if (JwtManager.Enabled && isEmbedded == null && userAddress != null)
{
string JWTheader = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string token = "";
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
{
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
string token = JwtManager.Decode(headerToken);
if (token == null || token.Equals(""))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
token = JwtManager.Decode(headerToken);
}
if (string.IsNullOrEmpty(token))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
}
var filePath = _Default.ForcesavePath(fileName, userAddress, false); // get the path to the force saved document version
if (filePath.Equals(""))
if (string.IsNullOrEmpty(filePath))
{
filePath = _Default.StoragePath(fileName, userAddress); // or to the original document
}
@ -304,5 +328,86 @@ namespace OnlineEditorsExample
{
get { return false; }
}
private static void DownloadHistory(HttpContext context)
{
try
{
var fileName = Path.GetFileName(context.Request["fileName"]);
var userAddress = Path.GetFileName(context.Request["userAddress"]);
var version = Path.GetFileName(context.Request["ver"]);
var file = Path.GetFileName(context.Request["file"]);
if (JwtManager.Enabled)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
{
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
string token = JwtManager.Decode(headerToken);
if (string.IsNullOrEmpty(token))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
}
else
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
context.Response.Write("JWT validation failed");
return;
}
}
var filePath = _Default.HistoryPath(fileName, userAddress, version, file); // get the path to the force saved document version
download(filePath, context);
}
catch (Exception)
{
context.Response.Write("{ \"error\": \"File not found!\"}");
}
}
// rename a file
private static void Rename(HttpContext context)
{
string fileData;
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
{
fileData = readStream.ReadToEnd();
if (string.IsNullOrEmpty(fileData)) return;
}
}
catch (Exception e)
{
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
}
var jss = new JavaScriptSerializer();
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
var newFileName = (string) body["newfilename"];
var docKey = (string) body["dockey"];
var origExt = '.' + (string) body["ext"];
var curExt = Path.GetExtension(newFileName).ToLower();
if (string.Compare(origExt, curExt, true) != 0)
{
newFileName += origExt;
}
var meta = new Dictionary<string, object>() {
{ "title", newFileName }
};
TrackManager.commandRequest("meta", docKey, meta);
context.Response.Write("{ \"result\": \"OK\"}");
}
}
}

View File

@ -19,3 +19,11 @@ License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
License: MIT
License File: JWT.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
License: MIT
License File: Newtonsoft.Json.license

View File

@ -0,0 +1,21 @@
# Public Domain
Written by John Sheehan (http://john-sheehan.com)
This work is public domain.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
For more information, please visit: http://creativecommons.org/publicdomain/zero/1.0/
# MIT
Copyright (c) 2019 Jwt.Net Maintainers and Contributors.
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.
For more information, please visit: https://opensource.org/licenses/MIT

View File

@ -0,0 +1,20 @@
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.

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="JWT" version="9.0.3" targetFramework="net48" />
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
</packages>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,11 +16,24 @@
*
*/
var directUrl;
if (typeof jQuery != "undefined") {
jq = jQuery.noConflict();
directUrl = getUrlVars()["directUrl"] == "true";
mustReload = false;
if (directUrl)
jq("#directUrl").prop("checked", directUrl);
else
directUrl = jq("#directUrl").prop("checked");
jq("#directUrl").change(function () {
window.location = "?directUrl=" + jq(this).prop("checked");
});
jq(function () {
jq('#fileupload').fileupload({
dataType: 'json',
@ -74,7 +87,8 @@ if (typeof jQuery != "undefined") {
});
var timer = null;
var checkConvert = function (filePass = null) {
var checkConvert = function (filePass) {
filePass = filePass ? filePass : null;
if (timer != null) {
clearTimeout(timer);
}
@ -167,7 +181,7 @@ if (typeof jQuery != "undefined") {
var posExt = fileName.lastIndexOf('.');
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : '';
if (EditedExtList.indexOf(posExt) != -1) {
if (EditedExtList.indexOf(posExt) != -1 || FillFormExtList.indexOf(posExt) != -1) {
jq("#beginEdit").removeClass("disable");
}
};
@ -218,7 +232,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#beginEdit:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = "doceditor.aspx?fileID=" + fileId;
var url = "doceditor.aspx?fileID=" + fileId + "&directUrl=" + directUrl;
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
@ -226,7 +240,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#beginView:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = "doceditor.aspx?action=view&fileID=" + fileId;
var url = "doceditor.aspx?editorsMode=view&fileID=" + fileId + "&directUrl=" + directUrl;
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
@ -234,7 +248,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = "doceditor.aspx?editorsType=embedded&editorsMode=embedded&fileID=" + fileId;
var url = "doceditor.aspx?editorsType=embedded&editorsMode=embedded&fileID=" + fileId + "&directUrl=" + directUrl;
jq("#mainProgress").addClass("embedded");
jq("#beginEmbedded").addClass("disable");
@ -277,30 +291,78 @@ if (typeof jQuery != "undefined") {
});
});
jq(".info").mouseover(function (event) {
function showUserTooltip (isMobile) {
if ( jq("div#portal-info").is(":hidden") ) {
jq("div#portal-info").show();
jq("div.stored-list").hide();
} else if (isMobile && jq("div#portal-info").is(":visible")) {
jq("div#portal-info").hide();
jq("div.stored-list").show();
}
};
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
};
var fileList = jq("tr.tableRow");
var mouseIsOverTooltip = false;
var hideTooltipTimeout = null;
if (/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i
.test(navigator.userAgent)) {
if (fileList.length > 0) {
if (hideTooltipTimeout != null) {
clearTimeout(hideTooltipTimeout);
}
jq("#info").on("touchend", function () {
showUserTooltip(true);
});
}
} else {
jq("#info").mouseover(function (event) {
if (fileList.length > 0) {
if (hideTooltipTimeout != null) {
clearTimeout(hideTooltipTimeout);
}
showUserTooltip(false);
jq("div#portal-info").mouseenter(function () {
mouseIsOverTooltip = true;
}).mouseleave(function () {
mouseIsOverTooltip = false;
jq("div.stored-list").show();
jq("div#portal-info").hide();
})
}
}).mouseleave(function () {
hideTooltipTimeout = setTimeout(function () {
if (mouseIsOverTooltip == false && fileList.length > 0) {
jq("div.stored-list").show();
jq("div#portal-info").hide();
}
}, 500);
});
}
jq(".info-tooltip").mouseover(function (event) {
var target = event.target;
var id = target.dataset.id ? target.dataset.id : target.id;
var tooltip = target.dataset.tooltip;
jq("<div class='tooltip'>" + tooltip + "</div><div class='arrow'></div>").appendTo("body");
jq("<div class='tooltip'>" + tooltip + "<div class='arrow'></div></div>").appendTo("body");
var left = jq("#" + id).offset().left + jq("#" + id).outerWidth();
var topElement = jq("#" + id).offset().top;
var halfHeightElement = jq("#" + id).outerHeight() / 2;
var heightToFooter = jq("footer").offset().top - (topElement + halfHeightElement);
var halfHeightTooltip = jq("div.tooltip").outerHeight() / 2;
if (heightToFooter > (halfHeightTooltip + 10)) {
var top = topElement + halfHeightElement - halfHeightTooltip;
} else {
var top = jq("footer").offset().top - jq("div.tooltip").outerHeight() - 10;
}
jq("div.tooltip").css({ "top": top, "left": left + 10 });
jq("div.arrow").css({ "top": topElement + halfHeightElement, "left": left + 6 });
var top = jq("#" + id).offset().top + jq("#" + id).outerHeight() / 2 - jq("div.tooltip").outerHeight() / 2;
var left = jq("#" + id).offset().left + jq("#" + id).outerWidth() + 20;
jq("div.tooltip").css({ "top": top, "left": left });
}).mouseout(function () {
jq("div.tooltip").remove();
jq("div.arrow").remove();
});
}

View File

@ -1,18 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<clear />
<add key="version" value="1.5.0"/>
<add key="filesize-max" value="5242880"/>
<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
<add key="files.docservice.viewed-docs" value=".pdf|.djvu|.xps"/>
<add key="files.docservice.edited-docs" value=".docx|.xlsx|.csv|.pptx|.txt"/>
<add key="files.docservice.convert-docs" value=".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"/>
<add key="files.docservice.fillform-docs" value=".oform|.docx"/>
<add key="files.docservice.viewed-docs" value=".pdf|.djvu|.xps|.oxps"/>
<add key="files.docservice.edited-docs" value=".docx|.xlsx|.csv|.pptx|.txt|.docxf"/>
<add key="files.docservice.convert-docs" value=".docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xlsb|.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"/>
<add key="files.docservice.timeout" value="120000" />
<add key="files.docservice.secret" value="" />
<add key="files.docservice.header" value="Authorization" />
<add key="files.docservice.verify-peer-off" value="true"/>
<add key="files.docservice.url.site" value="https://documentserver/"/>
<add key="files.docservice.languages" value="en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (People's Republic of China)|zh-TW:Chinese (Traditional, Taiwan)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lv:Latvian|lo:Lao|ms:Malay (Malaysia)|nb:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.url.site" value="http://documentserver/"/>
<add key="files.docservice.url.converter" value="ConvertService.ashx"/>
<add key="files.docservice.url.api" value="web-apps/apps/api/documents/api.js"/>

View File

@ -0,0 +1,19 @@
# Eclipse
.classpath
.project
.settings/
# Intellij
.idea/
*.iml
*.iws
# Mac
.DS_Store
# Maven
log/
target/
#project
documents

View File

@ -0,0 +1,65 @@
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
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
License: Apache 2.0
License File: prime-jwt.license
Spring Boot - Helps create Spring-powered, production-grade applications and services. Has external dependencies on Spring Framework. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Boot Devtools - Provides fast application restarts, LiveReload, and configurations for enhanced development experience. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Boot Starter Thymeleaf - A modern server-side Java template engine for both web and standalone environments. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate. (https://github.com/spring-projects/spring-data-jpa/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-data-jpa.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license
ModelMapper - ModelMapper is an intelligent object mapping library that automatically maps objects to each other. (https://github.com/modelmapper/modelmapper)
License: Apache 2.0
License File modelmapper.license
Project Lombok - Project Lombok is a java library that automatically plugs into your editor and build tools. (https://mvnrepository.com/artifact/org.projectlombok/lombok).
License: MIT
License File lombok.license

View File

@ -0,0 +1,4 @@
FROM maven:3.8.1-jdk-11
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN mvn -f /usr/src/app/pom.xml clean

View 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.

View File

@ -0,0 +1,247 @@
## Overview
This example will help you integrate ONLYOFFICE Docs into your web application written in Java
with Spring Boot.
Spring Boot has a lot of functionality, but its most significant features are: dependency management,
auto-configuration, and built-in servlet containers.
**Please note**: It is intended for testing purposes and demonstrating functionality of the editors. Do NOT use this integration example on your own server without proper code modifications! In case you enabled the test example, disable it before going for production.
## For Windows
### 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).
### Step 2. Download the Java code for the editors integration
Download the [Java-Spring example](https://api.onlyoffice.com/editors/demopreview) from our site.
To connect the editors to your website, specify the path to the editors installation, server port and the path to the storage folder in the *\src\main\resources\application.properties* file:
```
files.storage=
server.port=port
files.docservice.url.site=https://documentserver/
```
where the **documentserver** is the name of the server with the ONLYOFFICE Docs installed, **port** is any available port and **files.storage** is the path where files will be created and stored (in the project folder by default). You can set an absolute path. For example, *D:\\\\folder*. Please note that on Windows OS the double backslash must be used as a separator.
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) it the *\src\main\resources\editor.html* file.
### Step 3. Install the prerequisites
To run the Java example code, install the Java version 11 appropriate for your OS and framework **Apache Maven**:
* Java (download from [the Oracle official website](https://www.oracle.com/ru/java/technologies/javase-jdk11-downloads.html));
* Apache Maven (download from [the official website](https://maven.apache.org/download.cgi)).
### Step 4. Set environment variables
1. After you have installed Java on Windows, set the **JAVA_HOME** environment variable to point to the Java installation directory.
Find out where Java is installed. If you didn't change the path during installation, it will be something like this:
```
C:\Program Files\Java\jdk11
```
In **Windows 7** right click **My Computer** and select **Properties**, then click **Advanced**.
In **Windows 8** go to **Control Panel** -> **System** -> **Advanced System Settings**.
Click the **Environment Variables** button.
Under **System Variables**, click **New**.
In the **Variable Name** field, enter **JAVA_HOME** if you installed the **JDK** (Java Development Kit) or **JRE_HOME** if you installed the **JRE** (Java Runtime Environment).
In the **Variable Value** field, enter your **JDK** or **JRE** installation path, for example C:\Program Files\Java\jdk11.
Check if the variable created successfully by **echo** command in the **Command Prompt**:
```
echo %JAVA_HOME%
```
2. Set the **MAVEN_HOME** environment variable:
Unzip the downloaded archive with the maven to any directory, it will be something like this:
```
C:\apache-maven-3.8.1
```
In **Windows 7** right click **My Computer** and select **Properties**, then click **Advanced**.
In **Windows 8** go to **Control Panel** -> **System** -> **Advanced System Settings**.
Click the **Environment Variables** button.
Under **System Variables**, click **New**.
In the **Variable Name** field, enter **MAVEN_HOME**.
In the **Variable Value** field, enter your **JDK** or **JRE** installation path, for example C:\apache-maven-3.8.1.
Add C:\apache-maven-3.8.1\bin to the PATH system variable:
In system variables, find PATH, clicks on the Edit... button. In “Edit environment variable” dialog, clicks on the New button and add this C:\apache-maven-3.8.1\bin
Check if the variable created successfully by **echo** command in the **Command Prompt**:
```
echo %MAVEN_HOME%
```
### Step 5. Start application with Maven
1. Open the console and go the java-spring folder using the **cd** command, for example:
```
cd C:\Program Files\document-server-integration\web\documentserver-example\java-spring
```
2. In the open console enter the following commands:
```
mvn clean
mvn package
mvn spring-boot:run
```
3. Open your browser using **server.address** and **server.port**:
```
http://server.address:server.port/
```
### Step 6. 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.
## For Linux
### 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 Linux](https://helpcenter.onlyoffice.com/installation/docs-developer-install-ubuntu.aspx).
### Step 2. Install the prerequisites and run the website with the editors
1. Install **Java**:
```
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java11-installer
```
2. Download the archive with the Java-Spring example and unpack the archive or clone git repository:
a) archive with Java-Spring:
```
wget https://api.onlyoffice.com/app_data/editor/Java%20Spring%20Example.zip
```
```
unzip Java\ Spring\ Example.zip
```
b) git repository:
```
git clone https://github.com/ONLYOFFICE/document-server-integration.git
```
3. Change the current directory for the project directory:
a) from archive
```
cd Java\ Spring\ Example/
```
b) from git repository
```
cd document-server-integration/web/documentserver-example/java-spring
```
4. Edit the *application.properties* configuration file. Specify the name of your local server with the ONLYOFFICE Document Server installed.
```
nano src/main/resources/application.properties
```
Edit the following lines:
```
files.storage=
server.port=port
files.docservice.url.site=https://documentserver/
```
where the **documentserver** is the name of the server with the ONLYOFFICE Docs installed, **port** is any available port and **files.storage** is the path where files will be created and stored (in the project folder by default). You can set an absolute path.
5. Install **Maven**:
```
sudo apt-get install maven
```
6. Build:
```
mvn package
```
7. Start Java-Spring example:
```
./mvnw spring-boot:run
```
8. Open your browser using **server.address** and **server.port**:
```
http://server.address:server.port/
```
### Step 3. 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.
## For Docker
1. Edit the *application.properties* configuration file. Specify the name of your local server with the ONLYOFFICE Document Server installed ([installation instructions](https://helpcenter.onlyoffice.com/installation/docs-developer-install-docker.aspx)).
```
nano src/main/resources/application.properties
```
2. Edit the following lines:
```
files.storage=
server.port=port
files.docservice.url.site=https://documentserver/
```
where the **documentserver** is the name of the server with the ONLYOFFICE Docs installed, **port** is any available port and **files.storage** is the path where files will be created and stored (in the project folder by default). You can set an absolute path.
3. Run the next command in the java example directory:
```
docker-compose up
```
4. Open your browser using **server.address** and **server.port**:
```
http://server.address:server.port/
```
## Important security info
Please keep in mind the following security aspects when you are using test examples:
* There is no protection of the storage from unauthorized access since there is no need for authorization.
* There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
* There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
* There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.

View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.0//EN"
"https://checkstyle.org/dtds/suppressions_1_0.dtd">
<suppressions>
<suppress checks="HideUtilityClassConstructor" files="IntegrationApplication.java"/>
<suppress checks="DesignForExtension" files="."/>
<suppress checks="ParameterNumber" files="."/>
<suppress checks="JavadocPackage" files="."/>
<suppress checks="JavadocVariable" files="."/>
<suppress checks="MissingJavadocMethod" files="."/>
</suppressions>

View File

@ -0,0 +1,199 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
- the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
- the Javadoc guidelines at
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
- some best practices
Checkstyle is very configurable. Be sure to read the documentation at
https://checkstyle.org (or in your downloaded distribution).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
To suppress certain violations please review suppression filters.
Finally, it is worth reading the documentation.
-->
<module name="Checker">
<!--
If you set the basedir property below, then all reported file
names will be relative to the specified directory. See
https://checkstyle.org/config.html#Checker
<property name="basedir" value="${basedir}"/>
-->
<property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml"/>
<!-- Excludes all 'module-info.java' files -->
<!-- See https://checkstyle.org/config_filefilters.html -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
<module name="SuppressionFilter">
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
default="checkstyle-suppressions.xml" />
<property name="optional" value="true"/>
</module>
<!-- Checks that a package-info.java file exists for each package. -->
<!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
<module name="JavadocPackage"/>
<!-- Checks whether files end with a new line. -->
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile"/>
<!-- Checks that property files contain the same keys. -->
<!-- See https://checkstyle.org/config_misc.html#Translation -->
<module name="Translation"/>
<!-- Checks for Size Violations. -->
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="FileLength"/>
<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
</module>
<!-- Checks for whitespace -->
<!-- See https://checkstyle.org/config_whitespace.html -->
<module name="FileTabCharacter"/>
<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/config_misc.html -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<!-- Checks for Headers -->
<!-- See https://checkstyle.org/config_header.html -->
<module name="Header">
<property name="headerFile" value="onlyoffice.header"/>
<property name="fileExtensions" value="java"/>
</module>
<module name="TreeWalker">
<!-- Checks for Javadoc comments. -->
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="InvalidJavadocPosition"/>
<module name="JavadocMethod"/>
<module name="JavadocType"/>
<module name="JavadocVariable"/>
<module name="JavadocStyle"/>
<module name="MissingJavadocMethod"/>
<!-- Checks for Naming Conventions. -->
<!-- See https://checkstyle.org/config_naming.html -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Checks for imports -->
<!-- See https://checkstyle.org/config_imports.html -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="false"/>
</module>
<!-- Checks for Size Violations. -->
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="MethodLength"/>
<module name="ParameterNumber"/>
<!-- Checks for whitespace -->
<!-- See https://checkstyle.org/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<!-- Modifier Checks -->
<!-- See https://checkstyle.org/config_modifier.html -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Checks for blocks. You know, those {}'s -->
<!-- See https://checkstyle.org/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<!-- Checks for common coding problems -->
<!-- See https://checkstyle.org/config_coding.html -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<module name="MultipleVariableDeclarations"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- Checks for class design -->
<!-- See https://checkstyle.org/config_design.html -->
<module name="DesignForExtension"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/config_misc.html -->
<module name="ArrayTypeStyle"/>
<module name="FinalParameters"/>
<module name="TodoComment"/>
<module name="UpperEll"/>
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
<module name="SuppressionXpathFilter">
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
default="checkstyle-xpath-suppressions.xml" />
<property name="optional" value="true"/>
</module>
</module>
</module>

View File

@ -0,0 +1,15 @@
version: '3'
services:
java-spring:
build:
context: ./
dockerfile: Dockerfile
image: maven:3.8.1
working_dir: /java-spring
volumes:
- .:/java-spring
ports:
- 4000:4000
command: mvn clean spring-boot:run

View File

@ -0,0 +1,57 @@
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
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
License: Apache 2.0
License File: prime-jwt.license
Spring Boot - Helps create Spring-powered, production-grade applications and services. Has external dependencies on Spring Framework. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Boot Devtools - Provides fast application restarts, LiveReload, and configurations for enhanced development experience. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Boot Starter Thymeleaf - A modern server-side Java template engine for both web and standalone environments. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-boot.license
Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate. (https://github.com/spring-projects/spring-data-jpa/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-data-jpa.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license

View File

@ -0,0 +1,202 @@
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.

View File

@ -0,0 +1,202 @@
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.

View File

@ -0,0 +1,250 @@
Summary and License FAQ
H2 is dual licensed and available under the MPL 2.0 (Mozilla Public License Version 2.0) or under the EPL 1.0 (Eclipse Public License). There is a license FAQ for both the MPL and the EPL.
You can use H2 for free.
You can integrate it into your applications (including in commercial applications) and distribute it.
Files containing only your code are not covered by this license (it is 'commercial friendly').
Modifications to the H2 source code must be published.
You don't need to provide the source code of H2 if you did not modify anything.
If you distribute a binary that includes H2, you need to add a disclaimer of liability - see the example below.
However, nobody is allowed to rename H2, modify it a little, and sell it as a database engine without telling the customers it is in fact H2. This happened to HSQLDB: a company called 'bungisoft' copied HSQLDB, renamed it to 'RedBase', and tried to sell it, hiding the fact that it was in fact just HSQLDB. It seems 'bungisoft' does not exist any more, but you can use the Wayback Machine and visit old web pages of http://www.bungisoft.com.
About porting the source code to another language (for example C# or C++): converted source code (even if done manually) stays under the same copyright and license as the original code. The copyright of the ported source code does not (automatically) go to the person who ported the code.
If you distribute a binary that includes H2, you need to add the license and a disclaimer of liability (as you should do for your own code). You should add a disclaimer for each open source library you use. For example, add a file 3rdparty_license.txt in the directory where the jar files are, and list all open source libraries, each one with its license and disclaimer. For H2, a simple solution is to copy the following text below. You may also include a copy of the complete license.
This software contains unmodified binary redistributions for
H2 database engine (https://h2database.com/),
which is dual licensed and available under the MPL 2.0
(Mozilla Public License) or under the EPL 1.0 (Eclipse Public License).
An original copy of the license agreement can be found at:
https://h2database.com/html/license.html
Mozilla Public License Version 2.0
1. Definitions
1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution" means Covered Software of a particular Contributor.
1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.
1.5. "Incompatible With Secondary Licenses" means
a. that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or
b. that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.
1.6. "Executable Form" means any form of the work other than Source Code Form.
1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.
1.8. "License" means this document.
1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.
1.10. "Modifications" means any of the following:
a. any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
b. any new file in Source Code Form that contains any Covered Software.
1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.
1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.
1.13. "Source Code Form" means the form of the work preferred for making modifications.
1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
2. License Grants and Conditions
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and
under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:
for any code that a Contributor has removed from Covered Software; or
for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or
under Patent Claims infringed by Covered Software in the absence of its Contributions.
This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
3. Responsibilities
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and
You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).
3.4. Notices
You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.
4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
5. Termination
5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
6. Disclaimer of Warranty
Covered Software is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
7. Limitation of Liability
Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
8. Litigation
Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims.
9. Miscellaneous
This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
10. Versions of the License
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla
Public License, v. 2.0. If a copy of the MPL was not distributed
with this file, you can obtain one at http://mozilla.org/MPL/2.0
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses",
as defined by the Mozilla Public License, v. 2.0.
Eclipse Public License - Version 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
Export Control Classification Number (ECCN)
As far as we know, the U.S. Export Control Classification Number (ECCN) for this software is 5D002. However, for legal reasons, we can make no warranty that this information is correct. For details, see also the Apache Software Foundation Export Classifications page.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -0,0 +1,20 @@
Copyright (c) 2009 John Resig, http://jquery.com/
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.

View File

@ -0,0 +1,202 @@
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.

Some files were not shown because too many files have changed in this diff Show More