Compare commits

...

563 Commits

Author SHA1 Message Date
b67bc6164a Merge pull request #138 from ONLYOFFICE/feature/start-button
welcome: add check available for start button
2021-03-31 10:22:12 +03:00
0a909ed4f7 welcome: add check available for start button 2021-03-30 18:27:20 +03:00
f55bbab827 Merge pull request #137 from ONLYOFFICE/feature/update-dependencies
ruby: update dependencies
2021-03-30 12:22:22 +03:00
193b0aeb80 ruby: update dependencies 2021-03-30 12:15:33 +03:00
abe807f288 Merge pull request #135 from ONLYOFFICE/feature/fix-filename
Feature/fix filename
2021-03-30 12:06:34 +03:00
db8d816660 Merge pull request #134 from ONLYOFFICE/feature/redesign
Feature/redesign
2021-03-30 12:05:20 +03:00
1aa00012bf Merge pull request #136 from ONLYOFFICE/feature/welcome-redesign
Feature/welcome redesign
2021-03-30 11:44:23 +03:00
4f44082456 Merge pull request #129 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.11.1
build(deps): bump nokogiri from 1.10.10 to 1.11.1 in /web/documentserver-example/ruby
2021-03-30 10:54:14 +03:00
578ecec9af csharp-mvc: ext to lowercase 2021-03-29 18:28:52 +03:00
25804d0c0a csharp: ext to lowercase 2021-03-29 18:16:53 +03:00
6b27f4c221 php: ext to lowercase 2021-03-29 17:59:45 +03:00
bfa0984daf ruby: extname to downcase 2021-03-29 17:31:39 +03:00
b4d19b2f1e nodejs: fix function getFileName 2021-03-29 17:00:18 +03:00
ce4a6ec67e add button start 2021-03-26 14:39:19 +03:00
ba172dd5d4 java: fix view embedded 2021-03-25 22:11:13 +03:00
1fb48547ed csharp: fix documentType 2021-03-25 22:10:44 +03:00
7884f3c64c Merge remote-tracking branch 'remotes/origin/develop' into feature/redesign
# Conflicts:
#	web/documentserver-example/nodejs/views/index.ejs
#	web/documentserver-example/python/templates/index.html
2021-03-25 21:31:22 +03:00
4f2d7f0a3f nodejs: fix punctuation 2021-03-25 21:27:43 +03:00
d4e984e6b3 nodejs, java, php, python, csharp, csharp-mvc, ruby: fix remove upload name 2021-03-25 21:24:04 +03:00
93df5adba2 nodejs, java: fix css 2021-03-25 16:47:18 +03:00
87089d3fd1 nodejs, java, php: fix quotes 2021-03-25 16:42:35 +03:00
8ca58370e9 ruby: redesign window upload 2021-03-25 16:31:48 +03:00
599da25503 ruby: added tooltips 2021-03-25 15:27:32 +03:00
1bfe1b383b ruby: redesign 2021-03-25 15:15:35 +03:00
0645fba83d python: redesign window upload 2021-03-25 10:58:56 +03:00
7dade2ff46 python: added tooltips 2021-03-24 21:17:27 +03:00
d2b5335de9 python: redesign 2021-03-24 21:09:35 +03:00
4a617b516b php: redesign window upload 2021-03-24 14:00:33 +03:00
f4331cbd0a php: added tooltips 2021-03-24 10:40:38 +03:00
3665ead0b7 php: redesign 2021-03-23 22:25:49 +03:00
1baf3617b0 csharp-mvc: redesign window upload 2021-03-23 15:46:38 +03:00
367629d01f csharp-mvc: added tooltips 2021-03-23 14:39:38 +03:00
76b4693a54 csharp-mvc: redesign 2021-03-23 14:28:09 +03:00
f54e505aad fix readme 2021-03-23 11:38:20 +03:00
d8452548f0 apache to license 2021-03-23 11:36:18 +03:00
1dda4bbe5e csharp: redesign window upload 2021-03-22 23:11:50 +03:00
899df4f39f csharp: added tooltips 2021-03-22 21:17:33 +03:00
c416712ac3 csharp: redesign 2021-03-22 16:42:25 +03:00
b5b7cd91c4 Merge pull request #132 from ONLYOFFICE/feature/fill-forms
Feature/fill forms
2021-03-22 12:47:47 +03:00
e8c17005bb java: redesign window upload 2021-03-21 21:31:15 +03:00
53ec97b0c8 nodejs: redesign window upload 2021-03-21 15:59:49 +03:00
0646e25240 java: added tooltips 2021-03-19 16:05:33 +03:00
e7445dbc46 ruby: added postfix -form isSubmitForm 2021-03-19 15:02:05 +03:00
42b24e4307 python: added postfix -form isSubmitForm 2021-03-19 14:53:34 +03:00
1ba0577521 csharp-mvc: added postfix -form isSubmitForm 2021-03-19 14:43:58 +03:00
3335a135a0 csharp: added postfix -form isSubmitForm 2021-03-19 14:34:25 +03:00
c2a75b3e28 php: added postfix -form isSubmitForm 2021-03-19 14:15:23 +03:00
4e2fe9e607 java: added postfix -form isSubmitForm 2021-03-19 14:13:43 +03:00
3eb2061b9f nodejs: added postfix -form isSubmitForm 2021-03-19 13:50:26 +03:00
fcdcefe662 nodejs: revert local configuration 2021-03-18 15:32:55 +03:00
8aa32308c0 java: redesign 2021-03-18 11:55:42 +03:00
94beb67552 nodejs: added tooltips 2021-03-16 23:22:49 +03:00
3c1eab070d nodejs: redesign 2021-03-16 00:06:26 +03:00
714b514f66 Copyright 2021 2021-03-15 11:54:47 +03:00
89e6ac8571 Merge remote-tracking branch 'remotes/origin/release/v6.3.0' into develop 2021-03-05 11:20:57 +03:00
988e336f43 forcesave is disabled by default (b541936473) 2021-03-05 11:20:12 +03:00
9f9ac0c30d Merge remote-tracking branch 'origin/release/v6.3.0' into develop 2021-03-04 16:10:51 +03:00
9ab94ee9c3 Merge remote-tracking branch 'origin/master' into release/v6.3.0 2021-03-04 11:12:08 +03:00
fe02c4914c converting xml 2021-03-01 14:26:43 +03:00
82981d3ce2 Merge remote-tracking branch 'remotes/origin/release/v6.2.0' into develop 2021-03-01 14:14:38 +03:00
879d8f64fb build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.10 to 1.11.1.
- [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.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-01 09:21:06 +00:00
6870923b94 Merge branch release/v6.2.0 into master 2021-03-01 08:43:26 +00:00
7d5c90e9cf python: set version pyjwt 1.7.1 2021-02-19 16:08:43 +03:00
b541936473 Merge pull request #126 from ONLYOFFICE/feature/submit-form
Feature/submit form
2021-02-19 15:45:20 +03:00
a2e59cf705 ruby: submit filled form 2021-02-19 15:01:32 +03:00
dc074d4baf python: submit filled form 2021-02-19 15:00:42 +03:00
1cf5b1eea5 php: submit filled form 2021-02-19 15:00:17 +03:00
2635306e2e csharp-mvc: submit filled form 2021-02-19 14:59:59 +03:00
f0cc80fd53 csharp: submit filled form 2021-02-19 14:59:36 +03:00
c9f58e3ca6 java: submit filled form 2021-02-19 14:59:14 +03:00
821e481734 nodejs: improved forcesave submit filled form 2021-02-19 14:58:21 +03:00
f0309615d6 Merge remote-tracking branch 'remotes/origin/develop' into feature/submit-form
# Conflicts:
#	web/documentserver-example/nodejs/app.js
2021-02-18 15:39:20 +03:00
47588d135e Merge pull request #115 from ONLYOFFICE/feature/reviewPermissions
Feature/review permissions
2021-02-18 15:33:56 +03:00
8e6ae3b915 Merge remote-tracking branch 'remotes/origin/develop' into feature/reviewPermissions
# 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/python/src/views/actions.py
#	web/documentserver-example/ruby/app/models/file_model.rb
2021-02-18 15:13:34 +03:00
8fc9d6125c Merge pull request #122 from ONLYOFFICE/feature/request-name
Feature/request name
2021-02-18 14:14:00 +03:00
b427594248 Merge pull request #125 from ONLYOFFICE/feature/favicon
Feature/favicon
2021-02-18 09:09:36 +03:00
5c43308e14 ruby: added dynamic favicon 2021-02-17 20:19:51 +03:00
c5b67b4b00 php: added dynamic favicon 2021-02-17 20:19:30 +03:00
8442def83c csharp-mvc: added dynamic favicon 2021-02-17 20:18:43 +03:00
2cb91eb8d5 csharp: added dynamic favicon 2021-02-17 20:18:15 +03:00
cf82b0ffc9 java: added dynamic favicon 2021-02-17 20:17:15 +03:00
ffcf787f94 python: renamed favicon 2021-02-17 20:16:32 +03:00
ce2714c684 nodejs: renamed favicon 2021-02-17 20:15:47 +03:00
4ccd78053f renamed parameter reviewGroup on reviewGroups 2021-02-17 10:11:36 +03:00
7602183cf9 Merge pull request #124 from ONLYOFFICE/feature/forcesave
Feature/forcesave
2021-02-17 09:48:34 +03:00
1a6744a814 Merge branch 'develop' into feature/forcesave
# Conflicts:
#	web/documentserver-example/java/src/main/resources/settings.properties
2021-02-16 15:07:23 +03:00
6a89a073fa ruby: download forcesaved file 2021-02-16 15:02:19 +03:00
353119145c python: download forcesaved file 2021-02-16 14:59:04 +03:00
0aaaedc4d6 php: download forcesaved file 2021-02-16 14:14:08 +03:00
246ddc9f9c csharp-mvc: download forcesaved file 2021-02-16 13:28:30 +03:00
3e8b6aaffa csharp: download forcesaved file 2021-02-16 13:28:14 +03:00
c95439c0db java: download forcesaved file 2021-02-16 13:27:53 +03:00
62873e4ce4 nodejs: fix forcesave conversion 2021-02-16 11:00:45 +03:00
e04155e7ad csharp: added forcesave 2021-02-15 17:27:29 +03:00
733f798968 csharp-mvc: added forcesave 2021-02-15 17:26:16 +03:00
f7f0a07239 ruby: added forcesave 2021-02-15 17:24:56 +03:00
ee79e02c54 python: added forcesave 2021-02-15 16:52:44 +03:00
d8afda9b56 php: added forcesave 2021-02-15 15:29:25 +03:00
0569dc7271 java: added forcesave 2021-02-15 13:37:40 +03:00
fef62baa2b Merge pull request #123 from ONLYOFFICE/feature/remove-resource
Feature/remove resource
2021-02-11 11:19:56 +03:00
be82ae7078 java: ResourceService.ashx is not used anymore 2021-02-11 11:15:57 +03:00
0a4fcc0cdc nodejs: ResourceService.ashx is not used anymore 2021-02-11 08:58:38 +03:00
823374e2fe csharp-mvc: request user name 2021-02-08 22:28:56 +03:00
3b89aae808 csharp: request user name 2021-02-08 22:28:19 +03:00
cc488187b4 php: request user name 2021-02-08 22:27:14 +03:00
0e191eed91 python: request user name 2021-02-08 22:26:24 +03:00
6d27c1866b ruby: request user name 2021-02-08 22:25:08 +03:00
845b111a85 java: request user name 2021-02-08 22:21:25 +03:00
79d12ecd02 Merge pull request #121 from ONLYOFFICE/feature/document-type
Feature/document type
2021-02-08 10:27:36 +03:00
61c388a7af csharp-mvc: reviewGroup instead reviewPermissions 2021-02-07 19:35:29 +03:00
c6deb13712 csharp: reviewGroup instead reviewPermissions 2021-02-07 19:30:32 +03:00
13250e18b3 php: reviewGroup instead reviewPermissions 2021-02-07 19:21:41 +03:00
7d373fa1a9 ruby: reviewGroup instead reviewPermissions 2021-02-07 19:11:09 +03:00
8af2607e62 python: reviewGroup instead reviewPermissions 2021-02-07 19:00:34 +03:00
c2db28fbcf java: reviewGroup instead reviewPermissions 2021-02-07 18:38:47 +03:00
212fd26807 csharp: word, cell, slide instead text, spreadsheet, presentation 2021-02-06 20:36:55 +03:00
c9ef51a361 csharp-mvc: word, cell, slide instead text, spreadsheet, presentation 2021-02-06 20:20:38 +03:00
f25e4ea614 php: word, cell, slide instead text, spreadsheet, presentation 2021-02-06 20:09:03 +03:00
e4eb8366bd ruby: word, cell, slide instead text, spreadsheet, presentation 2021-02-05 18:46:21 +03:00
bcfa08b43c python: word, cell, slide instead text, spreadsheet, presentation 2021-02-05 18:36:58 +03:00
193238fbdb java: word, cell, slide instead text, spreadsheet, presentation 2021-02-05 17:55:05 +03:00
37e36f7fef Merge pull request #120 from ONLYOFFICE/feature/fix-filename
Feature/fix filename
2021-02-05 14:00:19 +03:00
ec90b2ff98 ruby: check filename from url 2021-02-05 13:40:13 +03:00
758f0c08e5 java: add check filename for download 2021-02-05 13:33:57 +03:00
b76c532569 csharp-mvc: check filename from url 2021-02-05 13:29:08 +03:00
856613d644 csharp: check filename from url 2021-02-05 13:25:12 +03:00
75c11f4ee8 Merge remote-tracking branch 'remotes/origin/develop' into feature/fix-filename
# Conflicts:
#	web/documentserver-example/java/src/main/java/controllers/IndexServlet.java
#	web/documentserver-example/python/src/views/actions.py
2021-02-05 12:56:04 +03:00
1e023e58b2 Merge pull request #119 from ONLYOFFICE/feature/template-submodule
Feature/template submodule
2021-02-04 18:39:50 +03:00
f9f757bd0d ruby: added templates submodule 2021-02-04 17:42:56 +03:00
a213b635f2 csharp-mvc: changed path to sample 2021-02-04 17:05:40 +03:00
96d6c521ef csharp: changed path to sample 2021-02-04 16:56:28 +03:00
7d2469cfe9 php: changed path to sample 2021-02-04 16:36:17 +03:00
2f7352c296 java: changed path to sample 2021-02-04 16:26:05 +03:00
6ec262e221 nodejs: word, cell, slide instead text, spreadsheet, presentation 2021-02-04 16:10:00 +03:00
5fdbd2954b uploaded instead created 2021-02-04 16:06:40 +03:00
758291fd71 owner instead author 2021-02-04 15:43:09 +03:00
2a856c6919 python: changed path to sample 2021-02-04 15:25:28 +03:00
d075855065 nodejs: request user name 2021-02-04 15:24:09 +03:00
f026d0ef60 nodejs: changed path to sample 2021-02-04 15:15:26 +03:00
2ec0a3798d nodejs: reviewGroup instead reviewPermissions 2021-02-04 14:31:49 +03:00
506b55a201 update submodule (csharp-mvc, csharp, php, java, nodejs, python) 2021-02-04 14:26:15 +03:00
90dd2c837f Merge remote-tracking branch 'remotes/origin/develop' into feature/template-submodule 2021-02-04 11:00:08 +03:00
75d828a6ae Merge pull request #118 from ONLYOFFICE/feature/update-dependencies
python: update (django, requests, pyjwt)
2021-02-04 10:45:50 +03:00
fe3b5558df python: update (django, requests, pyjwt) 2021-02-04 10:41:41 +03:00
3d49eabaf0 Merge pull request #117 from ONLYOFFICE/feature/get-files
Feature/get files
2021-02-04 10:07:13 +03:00
51f712b900 ruby: improved get_files_info 2021-02-03 13:01:44 +03:00
a565da4035 php: improved GetFilesInfo 2021-02-03 12:52:11 +03:00
7db6983167 python: improved GetFilesInfo 2021-02-03 12:47:13 +03:00
b7262ff874 java: improved GetFilesInfo 2021-02-03 12:43:08 +03:00
50921b278b csharp: improved GetFilesInfo 2021-02-03 12:42:39 +03:00
9d16bee672 csharp-mvc: improved GetFilesInfo 2021-02-03 12:42:00 +03:00
1a63a7f65f nodejs: add Content-Type 2021-02-03 12:13:17 +03:00
4ba7b3f02e Add Dockerfile for nodejs (#110)
* Add Dockerfile for nodejs DS Example

* Removed unnecessary lines

* Add expose 3000 port to Dockerfile

Co-authored-by: Cyger <cyger@centos7.server>
2021-02-03 11:32:10 +03:00
f8f15d2191 Merge remote-tracking branch 'remotes/origin/develop' into feature/get-files
# Conflicts:
#	web/documentserver-example/csharp-mvc/WebEditor.ashx.cs
#	web/documentserver-example/csharp/WebEditor.ashx.cs
#	web/documentserver-example/java/src/main/java/controllers/IndexServlet.java
#	web/documentserver-example/php/webeditor-ajax.php
#	web/documentserver-example/python/src/urls.py
#	web/documentserver-example/python/src/views/actions.py
#	web/documentserver-example/ruby/app/controllers/home_controller.rb
#	web/documentserver-example/ruby/config/routes.rb
2021-02-02 22:12:21 +03:00
2b217de9b4 ruby: get-file 2021-02-02 22:01:48 +03:00
6f64d40e5d ruby: get-files 2021-02-02 21:44:50 +03:00
620a097faa Merge remote-tracking branch 'remotes/origin/develop' into feature/reviewPermissions
# Conflicts:
#	web/documentserver-example/csharp-mvc/Models/FileModel.cs
#	web/documentserver-example/java/src/main/java/entities/FileModel.java
#	web/documentserver-example/python/src/views/actions.py
2021-02-02 13:59:17 +03:00
9759839cd0 Merge pull request #114 from ONLYOFFICE/feature/fix-history
Feature/fix history
2021-02-02 13:09:41 +03:00
e6ee57e09b php: fix tabulation 2021-02-02 12:53:56 +03:00
50daec31b4 java: fix tabulation 2021-02-02 12:51:08 +03:00
bcd114d089 ruby: fix-history 2021-02-02 12:29:04 +03:00
49592f66bf Merge pull request #113 from ONLYOFFICE/feature/fix-history-cors
Feature/fix history cors
2021-02-02 11:13:40 +03:00
e854b78884 Merge pull request #112 from ONLYOFFICE/feature/add-jwt
Feature/add jwt
2021-02-02 11:06:12 +03:00
4dd5f9d9f6 Merge remote-tracking branch 'remotes/origin/develop' into feature/add-jwt
# Conflicts:
#	web/documentserver-example/python/src/utils/historyManager.py
2021-02-02 11:02:53 +03:00
abee34981b ruby: jwt for historyData 2021-02-02 10:57:52 +03:00
768f45f4fb Merge remote-tracking branch 'remotes/origin/release/v6.2.0' into develop 2021-02-02 09:54:22 +03:00
c3bb70aa9a nodejs: submit filled form 2021-02-02 09:52:24 +03:00
e53dac1e2b Merge pull request #111 from ONLYOFFICE/feature/mail-merge
Feature/mail merge
2021-02-02 09:51:22 +03:00
71ab72299a php: added function download 2021-02-01 23:16:47 +03:00
eb4e6b4bc0 csharp-mvc: added function download 2021-02-01 23:09:49 +03:00
4f02a4957f csharp: added function download 2021-02-01 23:05:25 +03:00
469c2b6ced java: added function download 2021-02-01 23:02:55 +03:00
8b9a2d2481 csharp: fix merge 2021-02-01 23:02:15 +03:00
e921c936b8 java: fix merge 2021-02-01 23:00:10 +03:00
a5929897ad php: fix merge 2021-02-01 22:59:17 +03:00
00a1c64353 python: fix merge 2021-02-01 22:58:42 +03:00
6c18acdf97 ruby: fix merge 2021-02-01 22:57:13 +03:00
c0f459132e csharp-mvc: fix merge 2021-02-01 21:07:49 +03:00
d780a61e52 ruby: jwt for mailmerge 2021-02-01 20:30:07 +03:00
361b8bd0f4 Merge remote-tracking branch 'remotes/origin/develop' into feature/mail-merge
# Conflicts:
#	web/documentserver-example/csharp-mvc/Views/Home/Editor.aspx
#	web/documentserver-example/csharp-mvc/WebEditor.ashx.cs
#	web/documentserver-example/csharp/DocEditor.aspx
#	web/documentserver-example/csharp/DocEditor.aspx.cs
#	web/documentserver-example/csharp/WebEditor.ashx.cs
#	web/documentserver-example/java/src/main/java/controllers/EditorServlet.java
#	web/documentserver-example/java/src/main/java/controllers/IndexServlet.java
#	web/documentserver-example/java/src/main/webapp/editor.jsp
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/nodejs/views/editor.ejs
#	web/documentserver-example/php/doceditor.php
#	web/documentserver-example/php/webeditor-ajax.php
#	web/documentserver-example/python/src/views/actions.py
#	web/documentserver-example/python/templates/editor.html
#	web/documentserver-example/ruby/app/models/file_model.rb
#	web/documentserver-example/ruby/app/views/home/editor.html.erb
2021-02-01 16:57:59 +03:00
48694f0f31 ruby: mailmerge 2021-02-01 12:33:23 +03:00
9ed7b0e96e ruby: fix cors 2021-01-31 16:02:57 +03:00
a2a094a22c Merge pull request #109 from ONLYOFFICE/feature/config-refactor
Feature/config refactor
2021-01-29 16:20:26 +03:00
9d9afce3ce GetServerUrl 2021-01-29 15:54:27 +03:00
bb19ea1a6f рhp: fix serverPath 2021-01-29 14:41:02 +03:00
d667a62a24 csharp: fix GetServerUrl 2021-01-29 14:28:56 +03:00
a92907135d csharp-mvc: fix GetServerUrl 2021-01-29 14:14:25 +03:00
71fde6f7b9 python: fix getServerUrl 2021-01-29 13:58:29 +03:00
9ac78b77dc ruby: fix get_server_url 2021-01-29 13:45:38 +03:00
dae246e8a2 Merge remote-tracking branch 'remotes/origin/develop' into feature/config-refactor
# Conflicts:
#	web/documentserver-example/java/src/main/java/controllers/EditorServlet.java
#	web/documentserver-example/python/src/views/actions.py
#	web/documentserver-example/ruby/config/application.rb
2021-01-29 12:49:30 +03:00
7f95d59394 java: fix jwtHeader 2021-01-29 12:38:23 +03:00
7bfa4229de ruby: add Rails.configuration.header 2021-01-29 12:35:10 +03:00
1c6c45606b ruby: add Rails.configuration.urlExample 2021-01-29 12:09:16 +03:00
1c0a742f54 ruby: config-refactor 2021-01-28 22:05:09 +03:00
4eb4753c01 Merge pull request #107 from ONLYOFFICE/feature/insert-image
Feature/insert image
2021-01-28 19:07:10 +03:00
979f001fd0 csharp: fixed tabulation 2021-01-28 17:47:48 +03:00
d0edb368ac csharp-mvc: fixed tabulation 2021-01-28 17:46:41 +03:00
ac36df16d1 csharp-mvc: moved functions 2021-01-28 17:35:34 +03:00
e845cc498b csharp: moved functions 2021-01-28 17:34:45 +03:00
606ce23228 nodejs: fix merge 2021-01-28 15:29:14 +03:00
dcd4adf5ad ruby: fix merge 2021-01-28 15:16:19 +03:00
6e81fa8996 Merge branch 'develop' into feature/insert-image
# Conflicts:
#	web/documentserver-example/csharp-mvc/Views/Home/Editor.aspx
#	web/documentserver-example/csharp/DocEditor.aspx
#	web/documentserver-example/csharp/DocEditor.aspx.cs
#	web/documentserver-example/java/src/main/java/controllers/EditorServlet.java
#	web/documentserver-example/java/src/main/webapp/editor.jsp
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/nodejs/views/editor.ejs
#	web/documentserver-example/php/doceditor.php
#	web/documentserver-example/python/src/views/actions.py
#	web/documentserver-example/python/templates/editor.html
#	web/documentserver-example/ruby/app/models/file_model.rb
#	web/documentserver-example/ruby/app/views/home/editor.html.erb
2021-01-28 15:12:36 +03:00
15580ee144 add logo.png csharp-mvc, csharp, java, nodejs, php, python, ruby 2021-01-28 14:48:44 +03:00
422bb36b53 delete logo.png csharp-mvc, csharp, java, nodejs, php, python, ruby 2021-01-28 14:46:00 +03:00
e74811a755 Merge pull request #108 from ONLYOFFICE/feature/compare-file
Feature/compare file
2021-01-28 14:11:57 +03:00
4c987fbfce nodejs: fix merge 2021-01-28 13:49:30 +03:00
e90ba356fe ruby: fix merge 2021-01-28 13:49:14 +03:00
54c6025bc5 Merge remote-tracking branch 'remotes/origin/develop' into feature/compare-file
# Conflicts:
#	web/documentserver-example/csharp-mvc/Views/Home/Editor.aspx
#	web/documentserver-example/csharp/DocEditor.aspx
#	web/documentserver-example/java/src/main/webapp/editor.jsp
#	web/documentserver-example/nodejs/views/editor.ejs
#	web/documentserver-example/php/doceditor.php
#	web/documentserver-example/python/templates/editor.html
#	web/documentserver-example/ruby/app/views/home/editor.html.erb
2021-01-28 13:38:00 +03:00
b867d75bac ruby: compare-file 2021-01-28 13:28:28 +03:00
2748dbf5b3 csharp: fix tabulation 2021-01-28 11:28:24 +03:00
8b5aab3c63 Merge branch hotfix/v6.1.1 into develop 2021-01-28 08:15:33 +00:00
ee23e7948e ruby: jwt for insert-image 2021-01-28 11:13:10 +03:00
badcd6e110 ruby: fix merge 2021-01-28 10:50:24 +03:00
53e1fbe9ef nodejs fix merge 2021-01-28 10:49:44 +03:00
c28e12e31e add logo.png csharp-mvc, csharp, java, nodejs, php, python, ruby 2021-01-28 10:32:04 +03:00
b94704adf8 Merge remote-tracking branch 'remotes/origin/develop' into feature/insert-image
# Conflicts:
#	web/documentserver-example/csharp-mvc/Views/Home/Editor.aspx
#	web/documentserver-example/csharp/DocEditor.aspx
#	web/documentserver-example/java/src/main/webapp/editor.jsp
#	web/documentserver-example/nodejs/views/editor.ejs
#	web/documentserver-example/php/doceditor.php
#	web/documentserver-example/python/templates/editor.html
#	web/documentserver-example/ruby/app/views/home/editor.html.erb
2021-01-27 17:13:14 +03:00
255ec7afe9 python: reviewPermissions 2021-01-27 12:48:46 +03:00
7996ea4825 ruby: reviewPermissions 2021-01-27 12:31:26 +03:00
1fc1fb2b76 Merge pull request #106 from ONLYOFFICE/feature/add-format
Feature/add format
2021-01-27 11:51:38 +03:00
267fe7d260 Merge pull request #105 from ONLYOFFICE/feature/favorite
Feature/favorite
2021-01-27 11:49:21 +03:00
b8f5485201 Merge pull request #104 from ONLYOFFICE/feature/new-banner
Feature/new banner
2021-01-27 11:16:26 +03:00
d19eaf0ef4 js: new banner 2021-01-27 10:14:29 +03:00
9ee379e8df ruby: setFavorite 2021-01-26 17:04:38 +03:00
a4b75554bd csharp: fix banner 2021-01-26 16:18:00 +03:00
854f5e7045 csharp-mvc: fix banner 2021-01-26 16:14:31 +03:00
8cf4eb2fc2 Merge branch 'develop' into feature/new-banner 2021-01-26 16:06:46 +03:00
eba3f15587 ruby: fix banner 2021-01-26 16:02:48 +03:00
3f52fd5563 ruby: insert-image 2021-01-26 15:41:33 +03:00
b439a5f729 ruby: add fb2 to ConverExtList 2021-01-26 13:35:07 +03:00
848229f79c ruby: new banner 2021-01-26 13:22:17 +03:00
491f600dc0 csharp: added templates submodule 2021-01-25 12:22:42 +03:00
38055f0b85 csharp: reviewPermissions 2021-01-25 11:53:34 +03:00
0e3c759806 csharp: get-file 2021-01-25 01:45:57 +03:00
6427db4ea6 csharp: get-files 2021-01-25 01:39:28 +03:00
d624cdf0f6 csharp: fix-history 2021-01-25 00:50:04 +03:00
930338f5fc csharp: fix cors 2021-01-24 23:17:30 +03:00
0875ca8d89 csharp: add files.docservice.header 2021-01-24 23:11:43 +03:00
193bbe2cb7 csharp-mvc: fix files.docservice.header b2ee170ecb 2021-01-24 22:39:12 +03:00
533ee1af91 csharp-mvc: fix GetServerUrl a104aa6c61 2021-01-24 22:11:15 +03:00
db0339d4e4 csharp: add files.docservice.url.example 2021-01-24 22:10:19 +03:00
1a46b8a215 csharp: config-refactor 2021-01-24 16:41:07 +03:00
022f1bb16d csharp: setFavorite 2021-01-24 15:41:45 +03:00
c01afdec17 csharp-mvc: set favorite 2021-01-24 02:49:09 +03:00
b2ee170ecb csharp: add files.docservice.header 2021-01-22 14:43:51 +03:00
a104aa6c61 csharp: add files.docservice.url.example 2021-01-22 11:47:53 +03:00
3f13590f55 csharp-mvc: config-refactor 2021-01-21 14:48:25 +03:00
aa7132e467 csharp-mvc: fix-history 2021-01-20 22:31:01 +03:00
60ddcb433c Merge branch 'develop' into feature/fix-history 2021-01-20 21:58:27 +03:00
14840847bf csharp-mvc: get-file 2021-01-20 21:10:39 +03:00
06cf08822b csharp-mvc: get-files 2021-01-20 17:50:46 +03:00
c4e2921040 Merge branch 'develop' into feature/get-files 2021-01-20 14:52:30 +03:00
ea455421f7 csharp-mvc: fix cors 2021-01-20 12:10:22 +03:00
90abe267bf Merge branch 'develop' into feature/fix-history-cors 2021-01-20 12:04:38 +03:00
4e2a5fb175 csharp-mvc: reviewPermissions 2021-01-19 18:36:32 +03:00
c54b760526 Merge branch 'develop' into feature/reviewPermissions 2021-01-19 15:54:13 +03:00
a92963aed1 csharp-mvc: added templates submodule 2021-01-19 15:11:45 +03:00
feee808453 Merge remote-tracking branch 'origin/hotfix/v6.1.1' into release/v6.2.0 2021-01-19 10:27:25 +03:00
d19ee9d4c1 python: added templates submodule 2021-01-16 21:19:36 +03:00
1a7fbe656b php: added templates submodule 2021-01-16 20:36:14 +03:00
500be4f8e4 java: added templates submodule 2021-01-16 20:02:54 +03:00
c96659ed9c nodejs: mime v2 lookup renamed to getType (0a2056b1b1) 2020-12-30 12:08:26 +03:00
1b2cec44ac nodejs: mime v2 lookup renamed to getType (0a2056b1b1) 2020-12-25 10:03:42 +03:00
ecfe99f7ed Merge branch 'develop' into feature/mail-merge 2020-12-25 10:02:44 +03:00
81450a883f nodejs: mime v2 lookup renamed to getType (0a2056b1b1) 2020-12-25 10:02:29 +03:00
fec328ad9d python: setFavorite 2020-12-24 22:51:35 +03:00
b197f4c258 php: setFavorite 2020-12-24 22:50:28 +03:00
0b03093c53 java: setFavorite 2020-12-24 22:49:22 +03:00
3bf8952b1a nodejs: nodejs: templates submodule 2020-12-21 15:10:12 +03:00
23b42ed070 nodejs: restructured assets folder 2020-12-21 15:05:07 +03:00
25906383e2 nodejs: setFavorite 2020-12-16 09:57:29 +03:00
1de2571c1b [bug] Fix invalid request to relative url after changing urllib version to 2.36.1 2020-12-15 17:52:20 +03:00
c597e914a9 nodejs: favorite 2020-12-15 17:33:00 +03:00
a2c0527882 Merge pull request #101 from ONLYOFFICE/fix/jwt-issuer
[bug] Fix "Error: "issuer" must be a string" on conversion
2020-12-09 15:43:44 +03:00
a7f7b3ebf7 [bug] Fix "Error: "issuer" must be a string" on conversion 2020-12-09 15:19:43 +03:00
95dfc9796d Merge remote-tracking branch 'origin/release/v6.1.0' into release/v6.2.0 2020-12-07 12:45:32 +03:00
125d9a2ab4 Merge remote-tracking branch 'origin/release/v6.1.0' into develop 2020-12-07 12:45:21 +03:00
4dd4453599 csharp: jwt for HistoryData 2020-12-06 13:30:30 +03:00
7e2d83f04e csharp-mvc: jwt for HistoryData 2020-12-06 13:28:13 +03:00
b7d2775733 Merge branch 'feature/compare-file' of https://github.com/ONLYOFFICE/document-server-integration into feature/compare-file 2020-12-05 12:29:30 +03:00
aa5f1e3df4 csharp: compare-file 2020-12-05 12:22:35 +03:00
4193089de4 csharp-mvc: compare-file 2020-12-05 12:07:56 +03:00
18a4dc20eb csharp: insert-image 2020-12-04 19:03:02 +03:00
7ced0591bd csharp-mvc: insert-image 2020-12-04 18:19:54 +03:00
a010088395 csharp-mvc: fix mail-merge 2020-12-04 12:35:06 +03:00
d5a6c1e605 csharp: fix mail-merge 2020-12-04 12:33:22 +03:00
ab68d95f5d csharp-mvc: mail-merge 2020-12-02 19:22:20 +03:00
301775aafd csharp: mail-merge 2020-12-02 19:01:55 +03:00
b7bda80f48 Merge branch release/v6.1.0 into master 2020-12-01 07:46:23 +00:00
51c180726c Merge remote-tracking branch 'remotes/origin/develop' into feature/mail-merge 2020-11-29 13:29:01 +03:00
aee637b980 python: check filename from url 2020-11-27 22:56:24 +03:00
63af540fe8 php: check filename from url 2020-11-27 22:55:01 +03:00
2819cbc5e3 java: check filename from url 2020-11-27 22:52:22 +03:00
02db6fa76a csharp: added .fb2 to ConverExtList 2020-11-27 17:16:06 +03:00
1feb56e397 csharp-mvc: added .fb2 to ConverExtList 2020-11-27 17:14:34 +03:00
502f001cfa Merge branch 'feature/csharp' into feature/add-format 2020-11-27 17:02:04 +03:00
7c10a0fe82 csharp-mvc: banner 2020-11-27 16:27:12 +03:00
aa16df8de7 java: fix filename (38cc631e2e) 2020-11-27 15:25:47 +03:00
bbff0206c1 php: fix filename (7b017c15f8) 2020-11-27 13:09:10 +03:00
e08e6f5f27 java: jwt for compare-file 2020-11-27 11:34:10 +03:00
38cc631e2e java: compare-file 2020-11-27 11:31:13 +03:00
6250902a55 php: jwt for compare-file 2020-11-27 11:00:16 +03:00
7b017c15f8 php: compare-file 2020-11-27 10:57:50 +03:00
b21d179f4b python: jwt for compare-file 2020-11-26 18:32:06 +03:00
c75f9166c5 python: compare-file 2020-11-26 18:30:27 +03:00
0f2695fba0 nodejs: jwt for compare-file 2020-11-26 18:16:44 +03:00
aca8e94f2a nodejs: compare-file 2020-11-26 18:13:01 +03:00
9876e745e5 python: jwt for insert-image 2020-11-26 17:27:01 +03:00
eb8cf75bc0 java: jwt for insert-image 2020-11-26 17:23:21 +03:00
62060d2538 php: jwt for insert-image 2020-11-26 17:20:57 +03:00
0ad9907eb6 nodejs: jwt for insert-image 2020-11-26 17:18:04 +03:00
2090bad807 nodejs: insert-image 2020-11-26 17:12:53 +03:00
2368354c6d php: insert-image 2020-11-26 16:10:09 +03:00
31337cc9c9 python: insert-image 2020-11-26 15:33:16 +03:00
17cad4a0dc java: insert-image 2020-11-26 14:54:09 +03:00
539023bd25 Rename images 2020-11-26 11:45:06 +03:00
0ada5484bb Rename icons on welcome page 2020-11-26 11:41:37 +03:00
b4e4a7ba53 redesign welcome page 2020-11-26 11:29:00 +03:00
48fa83b850 php: jwt for mailmerge 2020-11-26 01:16:33 +03:00
2017c45c19 java: jwt for mailmerge 2020-11-26 01:07:23 +03:00
74505f5c44 nodejs: jwt for mailmerge 2020-11-26 00:31:42 +03:00
6f6e80cf68 python: jwt for mailmerge 2020-11-26 00:14:12 +03:00
d5a8cdc760 python: jwt for historyData 2020-11-25 18:54:46 +03:00
ca5ba06506 php: jwt for historyData 2020-11-25 18:47:12 +03:00
720c61c7b7 java: jwt for historyData 2020-11-25 18:40:30 +03:00
6e03e71b59 php: add DOC_SERV_JWT_HEADER 2020-11-25 10:20:29 +03:00
ea22efdac8 java: fix 773aa62478 2020-11-24 22:24:19 +03:00
5521cd44dd python: add DOC_SERV_JWT_HEADER 2020-11-24 13:27:54 +03:00
773aa62478 java: add files.docservice.url.example 2020-11-23 17:22:02 +03:00
280d9e3dba nodejs: fix config 2020-11-23 15:47:37 +03:00
ee5fe30010 python: fix 791f2b53a9 2020-11-23 15:19:38 +03:00
c0b520e440 php: config-refactor 2020-11-23 11:00:57 +03:00
fd95aca32b java: config-refactor 2020-11-23 10:42:32 +03:00
791f2b53a9 python: config-refactor 2020-11-20 18:16:26 +03:00
02ee872d4c Merge pull request #99 from ONLYOFFICE/feature/add-languages
Add languages
2020-11-20 13:01:28 +03:00
a76ec17e70 Add languages 2020-11-20 12:59:46 +03:00
9591995b9c Add languages 2020-11-20 12:13:15 +03:00
9f806aa48a java: fix banner 2020-11-19 17:48:51 +03:00
85dd8f8b77 java: add fb2 to ConverExtList 2020-11-19 17:18:13 +03:00
e91beb5518 php: add fb2 to ConverExtList 2020-11-19 16:45:10 +03:00
39fbf43019 python: add fb2 to ConverExtList 2020-11-19 13:59:09 +03:00
74af4cf734 Merge pull request #98 from ONLYOFFICE/feature/node-start
nodejs: remove shebang line
2020-11-19 12:49:54 +03:00
e8eb607325 python: fix-history 2020-11-19 12:17:04 +03:00
cefcba3b04 nodejs: remove shebang line 2020-11-19 11:31:17 +03:00
fb4bc9c38e Merge pull request #97 from ONLYOFFICE/feture/update-dependencies
[nodejs] Dependencies
2020-11-19 11:26:21 +03:00
cb245efbb2 nodejs: fix ejs compilation 2020-11-19 11:11:43 +03:00
0a2056b1b1 [nodejs] Dependencies
Update nodejs dependencies
2020-11-19 10:13:45 +03:00
974840bbac python: new banner 2020-11-18 18:26:53 +03:00
be5f6e3a6e python: fix 4903c017f4 2020-11-18 18:14:59 +03:00
19debed4d1 php: fix 9b7d54fdfb 2020-11-18 17:50:41 +03:00
4903c017f4 python: mailmerge 2020-11-18 17:48:19 +03:00
6c3f31c32a python: get-file 2020-11-18 14:57:17 +03:00
73d79c1f61 python: get-files 2020-11-18 14:55:23 +03:00
65b4e453a4 Merge pull request #96 from ONLYOFFICE/feature/Gurovcsharp
Feature/csharp_and_csharp-mvc
2020-11-17 13:58:07 +03:00
157e6d3121 /csharp-MVC
Added work with packages and etc
2020-11-17 13:56:56 +03:00
d62a760439 csharp:
Changed path to the WebApplication.targets
Added new libs for Web.Helpers
2020-11-17 13:23:47 +03:00
4ef5f7d290 nodejs, java: add Content-Type, fix 2e3fd4725a, 1d24a4a309 2020-11-16 16:02:12 +03:00
9b7d54fdfb php: mailmerge 2020-11-16 15:45:28 +03:00
4e17421c7e php: get-file 2020-11-16 11:16:51 +03:00
2b4513d68b php: get-files 2020-11-15 20:53:04 +03:00
47c0b04de1 php: new banner 2020-11-13 14:38:45 +03:00
ee077978b9 php: fix-history 2020-11-13 14:32:14 +03:00
1dc5e67da6 php: fix cors 2020-11-13 11:48:40 +03:00
cf4dd454f6 php: reviewPermission 2020-11-13 11:43:10 +03:00
858b437e80 java: reviewPermissions 2020-11-12 16:46:25 +03:00
0512243be0 java: fix-history 2020-11-12 10:28:38 +03:00
ba3b3b4ce6 java: fix cors 2020-11-11 14:15:54 +03:00
e79cb3c3f3 Merge pull request #95 from ONLYOFFICE/feature/fixLicense
fixed license comment 8050ec572a
2020-11-10 17:21:04 +03:00
ddb31bd4e8 fixed license comment 8050ec572a 2020-11-10 17:10:43 +03:00
57e813d0ce fixed tabulation 1d24a4a309 2020-11-10 15:35:34 +03:00
1d24a4a309 The GetFilesInfo () method has been improved. If the method is called without a parameter, then the entire list of files is returned, if the idFile parameter is specified, then information about the file with id: idFile is returned. 2020-11-09 18:15:45 +03:00
fe7e7640b5 method getFilesInFolderInfo() moved from nodejs example to java example 2020-11-09 15:23:48 +03:00
7a7503be6a [macos] Fixed run example (#94) 2020-11-09 13:05:06 +03:00
651e161680 Feature/get file method (#93)
* added method for getting information about files

* added version attribute to response object and new method logic

* old code has been removed

* fixed a code structure

* improvement of the getFilesInfo method

* edited readme file. format code

* format

Co-authored-by: Sergey Linnik <sergey.linnik@onlyoffice.com>
2020-11-09 12:21:34 +03:00
67b93909ac java: mailmerge 2020-11-09 11:10:34 +03:00
2e3fd4725a Feature/get files method (#92)
* added method for getting information about files

* added version attribute to response object and new method logic

* old code has been removed

* fixed a code structure

* format

* edited readme file

* code formatting

Co-authored-by: Sergey Linnik <sergey.linnik@onlyoffice.com>
2020-11-09 09:45:03 +03:00
17f651c47a java: new banner 2020-11-06 11:29:47 +03:00
928cc7480a nodejs: new banner 2020-11-06 11:10:39 +03:00
bf8e59ddee csharp: new banner 2020-11-06 10:46:25 +03:00
986c51483d Add linux config (#91) 2020-10-26 11:51:25 +03:00
1ea1a3f904 [run] Fix
Fix config port for mac
2020-10-26 11:49:08 +03:00
715ab7d690 nodejs: reviewPermissions 2020-10-06 12:47:31 +03:00
4c62e12822 updated dependencies to support ruby 2.7 2020-10-02 14:24:05 +03:00
951f5f9887 corrected comments syntax 2020-10-02 14:23:32 +03:00
1184402f94 fix table 2020-10-01 11:37:15 +03:00
5c0d8b8dd9 Merge branch 'release/v6.0.0' into develop
# Conflicts:
#	Readme.md
#	web/documentserver-example/nodejs/licenses/urllib.license
2020-09-30 19:12:05 +03:00
cadeb19ece Merge branch 'master' into release/v6.0.0
# Conflicts:
#	LICENSE.txt
2020-09-30 18:58:24 +03:00
001b9a2cf6 Merge branch hotfix/v5.6.4 into develop 2020-09-15 13:40:43 +00:00
5e852e024d Merge branch 'hotfix/apache' into develop
# Conflicts:
#	3rd-Party.txt
#	licences/3rd-Party.txt
#	web/documentserver-example/csharp-mvc/Views/Home/Editor.aspx
#	web/documentserver-example/csharp-mvc/Views/Home/Index.aspx
#	web/documentserver-example/java/src/main/webapp/editor.jsp
#	web/documentserver-example/java/src/main/webapp/index.jsp
#	web/documentserver-example/js/LICENSE.txt
#	web/documentserver-example/js/OnlineEditorsExampleJS.html
#	web/documentserver-example/nodejs/licenses/formidable.license
#	web/documentserver-example/nodejs/licenses/jsonwebtoken.license
#	web/documentserver-example/nodejs/licenses/mime.license
#	web/documentserver-example/nodejs/licenses/urllib.license
#	web/documentserver-example/php/LICENSE.txt
#	web/documentserver-example/php/doceditor.php
#	web/documentserver-example/php/functions.php
#	web/documentserver-example/php/index.php
#	web/documentserver-example/php/webeditor-ajax.php
#	web/documentserver-example/ruby/LICENSE.txt
#	web/documentserver-example/ruby/app/assets/javascripts/jscript.js
#	web/documentserver-example/ruby/app/assets/stylesheets/editor.scss
#	web/documentserver-example/ruby/app/assets/stylesheets/stylesheet.scss
#	web/welcome/index.html
2020-09-04 09:59:10 +03:00
875dfaaec4 Merge pull request #82 from ONLYOFFICE/hotfix/apache
Apache License
2020-09-03 20:50:34 +03:00
c9def721d2 3rd-party license 2020-09-03 13:08:44 +03:00
8050ec572a apache 2020-09-02 12:06:52 +03:00
6918016dda Apache License 2020-08-31 15:22:12 +03:00
fb039100e1 Update Readme.md 2020-07-23 18:51:17 +03:00
4a6b549eaa Update Readme.md (#80)
* Update Readme.md

- add API methods for text examples
2020-07-23 18:37:46 +03:00
3d09910cf3 [format] Add fb2 to convertedDocs 2020-07-22 11:58:18 +03:00
fa0aad779d nodejs: mailmerge 2020-07-07 16:27:26 +03:00
5cefe5c3b2 Merge pull request #79 from ONLYOFFICE/feature/action-link
Feature/action link
2020-06-30 15:43:33 +03:00
0cf0171721 fixed an issue when creating a second action link 2020-06-18 11:44:21 +03:00
f8a1587109 Merge pull request #74 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/ffi-1.12.2
build(deps): bump ffi from 1.9.18 to 1.12.2 in /web/documentserver-example/ruby
2020-06-09 12:13:09 +03:00
44142da370 Merge branch 'develop' into dependabot/bundler/web/documentserver-example/ruby/ffi-1.12.2 2020-06-09 12:12:19 +03:00
ecbae22fcc ruby: get link to bookmark 2020-05-21 14:39:10 +03:00
b3a79deef8 python: get link to bookmark 2020-05-21 12:51:07 +03:00
c4f278d58a java: get link to bookmark 2020-05-21 12:51:07 +03:00
b0ea8ed388 csharp-mvc: get link to bookmark 2020-05-21 12:50:48 +03:00
220516c930 csharp: get link to bookmark 2020-05-18 16:31:16 +03:00
3be28877ab fixed header name 2020-05-18 16:30:56 +03:00
b3a96f15ab php: get link to bookmark 2020-05-18 14:19:25 +03:00
14a68befd2 v5.5.2 2020-04-27 17:01:53 +03:00
b1af12a78d v5.5.1r2 2020-04-15 14:18:33 +03:00
83bab147d0 v5.5.1 2020-04-09 12:40:23 +03:00
80670a0d64 Update copyright year 2020-04-06 11:59:41 +03:00
75f137470b nodejs: get link to bookmark 2020-03-19 13:39:29 +03:00
870a3ee799 [run] Platform
Add platform for run

(cherry picked from commit 8b9f07e46e)
2020-03-13 11:29:22 +03:00
c3c1689170 nodejs: fix upload files
(cherry picked from commit af7101844a)
2020-03-13 11:29:09 +03:00
a271b847d5 nodejs: add run-develop
(cherry picked from commit b58bf412fa)
2020-03-13 11:28:52 +03:00
45ea1a8c1d v5.5.0 2020-03-04 18:33:54 +03:00
1b90f16eb5 build(deps): bump ffi in /web/documentserver-example/ruby
Bumps [ffi](https://github.com/ffi/ffi) from 1.9.18 to 1.12.2.
- [Release notes](https://github.com/ffi/ffi/releases)
- [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ffi/ffi/compare/1.9.18...1.12.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-04 15:33:27 +00:00
422429e742 v5.5.0 2020-03-04 18:09:04 +03:00
29072e3d5c bump 2020 2020-03-04 10:13:12 +03:00
b82c2c68d5 Merge pull request #71 from ONLYOFFICE/feature/python
Feature/python
2020-03-04 10:09:03 +03:00
67d6eaa18b python: env vars 2020-03-03 19:03:05 +03:00
cb91ba1620 bump 2020 2020-03-03 14:39:29 +03:00
0e91256847 python: 2020 2020-03-03 14:32:11 +03:00
ce16625091 python: converted filename was not sent to client 2020-03-03 13:27:15 +03:00
4d538fc35d python: footer copyright 2020-03-03 13:26:36 +03:00
36c9583a2c nodejs: remove trade 2020-03-03 11:55:24 +03:00
1bde1f66d3 change name 2020-03-03 11:55:24 +03:00
fddc08c24b csharp: removed c#7 features 2020-03-03 11:40:00 +03:00
06305ee262 python: zip build script 2020-03-03 11:08:30 +03:00
e55e27cee8 python: reload on dialog close 2020-03-03 11:03:57 +03:00
8fa77cb9ba python: copyrights & cleanup 2020-03-03 11:00:23 +03:00
f038327928 python: sorting by date 2020-03-03 10:45:08 +03:00
0adaf8a84b python: lower file extension 2020-03-03 10:35:52 +03:00
85cb88b0fc python: fixed editors language 2020-03-03 10:26:49 +03:00
4c8ac0457f Merge pull request #69 from ONLYOFFICE/feature/ruby-v2.6.5
Feature/ruby v2.6.5
2020-03-02 17:36:46 +03:00
3ba6072b3e Merge pull request #68 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.10.8
build(deps): bump nokogiri from 1.8.1 to 1.10.8 in /web/documentserver-example/ruby
2020-02-27 15:52:34 +03:00
ad966cfc28 Merge branch 'feature/ruby-v2.6.5' into dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.10.8
# Conflicts:
#	web/documentserver-example/ruby/Gemfile.lock
2020-02-27 15:50:48 +03:00
1f9b2b8230 build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.8.1 to 1.10.8.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.8.1...v1.10.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-02-25 08:22:59 +00:00
61826dc813 Merge branch 'feature/pkg' into release/v5.5.0 2020-02-12 12:00:19 +03:00
3dc4a6d6a3 Fix pkg building 2020-02-12 11:37:44 +03:00
4de89aa858 Preparation for pkg
Add abillity setup storage folder outside the repo
2020-02-12 11:37:04 +03:00
8b9f07e46e [run] Platform
Add platform for run
2020-01-14 15:14:10 +03:00
af7101844a nodejs: fix upload files 2020-01-09 14:07:00 +03:00
b58bf412fa nodejs: add run-develop 2019-12-25 18:33:49 +03:00
a1c524df00 python: changed docserv default link 2019-12-25 11:28:12 +03:00
710d4f4059 Fixed displaying mobile version cb5324381e 2019-12-13 13:20:39 +03:00
be25001479 Fixed displaying mobile version cb5324381e 2019-12-13 13:09:28 +03:00
7466aba10f ruby: 'raise_in_transactional_callbacks' deprecated since rails 5.0.0 2019-11-21 14:43:53 +03:00
c4fc8c85e2 ruby: 'render :text' deprecated since rails 5.1.0 2019-11-21 14:41:48 +03:00
007efef742 ruby: rails manifest.js 2019-11-21 14:40:53 +03:00
a4bf9d76f6 ruby: updated dependencies to support ruby v2.6.5 2019-11-21 14:36:56 +03:00
7c5faa7c8a Merge pull request #66 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/loofah-2.3.1
build(deps): bump loofah from 2.1.1 to 2.3.1 in /web/documentserver-example/ruby
2019-11-21 14:33:02 +03:00
3497eeea9f build(deps): bump loofah in /web/documentserver-example/ruby
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.1.1 to 2.3.1.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.1.1...v2.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-08 16:23:59 +00:00
7717cb35f8 python: 3rd party licenses 2019-11-07 18:25:35 +03:00
1c59409ce2 python: blockcontent mode 2019-11-07 17:50:30 +03:00
bd4c3543d7 csharp-mvc: blockcontent mode 2019-11-07 17:40:52 +03:00
8770526316 csharp: blockcontent mode 2019-11-07 17:36:49 +03:00
51ecf3afeb java: blockcontent mode 2019-11-07 17:23:29 +03:00
8887edefb3 ruby: blockcontent mode 2019-11-07 17:09:08 +03:00
7ab292bc13 php: blockcontent mode 2019-11-07 16:41:16 +03:00
6ab006e409 changed favicon 2019-11-06 10:29:09 +03:00
582ed3f61b changed logo 2019-11-06 10:28:24 +03:00
d06cffabfb Merge pull request #65 from ONLYOFFICE/dependabot/npm_and_yarn/web/documentserver-example/nodejs/debug-2.6.9
build(deps): bump debug from 2.2.0 to 2.6.9 in /web/documentserver-example/nodejs
2019-11-05 18:38:22 +03:00
5545568e04 python: readme 2019-11-05 17:57:33 +03:00
6ba9b33606 python: version history 2019-11-05 17:51:22 +03:00
178477f9fb build(deps): bump debug in /web/documentserver-example/nodejs
Bumps [debug](https://github.com/visionmedia/debug) from 2.2.0 to 2.6.9.
- [Release notes](https://github.com/visionmedia/debug/releases)
- [Changelog](https://github.com/visionmedia/debug/blob/2.6.9/CHANGELOG.md)
- [Commits](https://github.com/visionmedia/debug/compare/2.2.0...2.6.9)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-02 01:35:08 +00:00
8d657a0101 python: jwt support 2019-11-01 15:47:59 +03:00
c1454eff13 python: document list 2019-11-01 10:58:20 +03:00
f7867e4bc3 python: document editing 2019-10-28 12:58:31 +03:00
f94e057492 python: upload, convert, create sample 2019-10-25 17:05:20 +03:00
a5371faa27 python: django template 2019-10-25 16:54:23 +03:00
34527f0b3e python: static files 2019-10-25 16:46:45 +03:00
b9dd792672 [all] Rename
Rename web-apps-pro -> web-apps
2019-10-24 12:27:30 +03:00
13c3164ca1 java: header null ref error 2019-10-23 13:22:14 +03:00
ceed4ac712 [img] Change image 2019-10-21 14:01:18 +03:00
6a16a9392a [img] Rename image 2019-10-21 14:00:48 +03:00
48043e5d70 [all] Rename
Rename web-apps -> web-apps-pro
2019-10-18 15:41:55 +03:00
d7809b848e v5.4.1 2019-10-02 12:07:23 +03:00
d5466f1070 v5.4.1 2019-10-02 12:02:38 +03:00
f639971861 object.assign is not available on IE 2019-09-26 15:21:09 +03:00
95ee0bf128 php: save old file version 2019-09-25 19:02:24 +03:00
03efbf468e Merge branch 'develop' of https://github.com/ONLYOFFICE/document-server-integration into develop 2019-09-25 18:50:28 +03:00
60cb77136a ruby: version history 2019-09-25 18:50:11 +03:00
d1d7d1e416 ruby: unique document key for each version 2019-09-25 17:05:32 +03:00
a60e7b9b6b php: comment, fillforms, filter modes 2019-09-25 15:17:33 +03:00
79d5682a02 Fix #63 - backUrl with custom port 2019-09-25 15:09:50 +03:00
96994fd0dc Fix #63 - backUrl with custom port 2019-09-25 15:06:25 +03:00
668a0e323a ruby: document list, different view/edit options 2019-09-25 14:46:30 +03:00
057d38d063 ruby: body overflow style issue 2019-09-25 14:08:25 +03:00
1ecf16085e ruby: jwt support 2019-09-25 11:54:16 +03:00
945c09f5d4 ruby: send POST instead of GET on convert request 2019-09-25 11:53:01 +03:00
b642053bc3 ruby: user and lang selectors 2019-09-25 11:52:12 +03:00
fef0179c7e ruby: create empty sample, new upload style 2019-09-25 09:54:18 +03:00
c0366c0134 Merge remote-tracking branch 'remotes/origin/hotfix/v5.4.1' into develop 2019-09-23 16:32:48 +03:00
584fb155b7 nodejs: fix style with blockcontent mode 2019-09-23 16:32:14 +03:00
95a15661d0 php: lang selector 2019-09-19 17:30:44 +03:00
ca17dd1128 php: jwt support 2019-09-19 17:24:41 +03:00
e375404e25 php: json parse error on convert 2019-09-19 14:35:59 +03:00
a58c1483b3 php: version history 2019-09-19 14:14:57 +03:00
9b6e90718a java: version history 2019-09-18 17:41:11 +03:00
14f8419f00 java: different edit/view options 2019-09-12 14:19:08 +03:00
0899644f32 java: user and lang selectors 2019-09-12 11:12:01 +03:00
036c0fb19a java: create empty sample, new upload style 2019-09-10 16:42:28 +03:00
5382c43ec5 csharp-mvc: document key 2019-09-10 12:50:43 +03:00
8af7c45e7d csharp-mvc: version history 2019-09-10 12:50:24 +03:00
aa289a6d85 csharp: history folder on convert 2019-09-10 11:30:03 +03:00
b93aeebe3c csharp-mvc: different edit/view options 2019-09-09 18:21:35 +03:00
fe38ca4a08 csharp-mvc: user and lang selectors 2019-09-09 17:31:10 +03:00
df74cdeb66 csharp-mvc: create empty sample, new upload style 2019-09-09 17:02:40 +03:00
1f022f12a1 csharp: version history 2019-09-09 15:28:32 +03:00
1217de89b3 Add 'blockcontent' mode 2019-09-04 18:15:06 +03:00
cd94eb0401 csharp: different edit/view options 2019-09-03 16:11:14 +03:00
118a4d74b0 v5.4.0 2019-09-03 14:37:39 +03:00
31c23fbf49 csharp: user and lang selectors 2019-09-03 13:43:04 +03:00
95b4556884 csharp: create empty sample, new upload style 2019-09-03 11:54:37 +03:00
96bfe3c58a csharp-mvc: format 2019-09-02 15:02:18 +03:00
0f549db065 csharp: format 2019-09-02 14:53:06 +03:00
c064b8fa57 csharp-mvc: document list 2019-08-28 17:14:17 +03:00
490a6cd8b6 csharp-mvc: jwt support 2019-08-28 16:30:01 +03:00
097a99b947 csharp: jwt support 2019-08-28 15:57:09 +03:00
88fa94c090 Update new file templates 2019-08-02 14:28:32 +03:00
507bf0098a Fixed package.json. Added new line at end of the file. 2019-07-31 18:17:27 +03:00
9bbcdf599d Use npm-shrinkwrap 2019-07-31 17:53:16 +03:00
d4f07aee2a update empty files (v16) 2019-07-30 12:59:49 +03:00
d12897930c Expanded list of languages
https://helpcenter.onlyoffice.com/tipstricks/available-languages.aspx
2019-06-13 17:03:40 +03:00
314dfb7811 v5.3.1 2019-06-06 12:33:52 +03:00
f5b4a1f78d v5.3.0 2019-05-27 17:21:45 +03:00
9459d4a7c1 v5.3.0 2019-05-27 17:05:25 +03:00
120a0712da Update Readme.md
UTM for Project info
2019-05-16 18:13:12 +03:00
a536fdf6ab nodejs: max key length - 120 2019-02-22 15:54:07 +03:00
71103b802e java: send jwt token in body 2019-02-21 14:27:59 +03:00
0b33ce14f7 node: fix Bug 36489 - Files with non ascii symbols were unable to download 2019-02-21 11:47:51 +03:00
a945870c6a java: jwt in headers 2019-02-20 14:55:35 +03:00
cafaa27e92 java: json passed to docserver contained escaped parameters 2019-02-20 14:50:38 +03:00
d22d2ace22 Merge pull request #57 from flaminestone/feature/delete_dockerfile
Delete dockerfile, and move building to docker-compose
2019-02-13 16:27:48 +03:00
430a16b543 Delete dockerfile, and move building to docker-compose 2019-02-13 16:17:41 +03:00
d2a89f4a5f Merge pull request #56 from flaminestone/feature/add_docker_compose_for_java
Add docker-compose file for easy building
2019-02-13 13:43:35 +03:00
efda987b55 Add docker-compose file for easy building 2019-02-13 13:34:20 +03:00
20827e4d76 v5.2.8 2019-02-05 16:23:22 +03:00
16473b4e06 2019 2019-01-22 18:17:07 +03:00
30d26df97d Merge remote-tracking branch 'remotes/origin/hotfix/v5.2.8' into develop 2019-01-22 09:28:29 +03:00
9fb0289af4 onAppReady (Fixed #54) 2019-01-22 09:23:29 +03:00
fa8e2cf975 [[copyright] Update Copyright
2018 -> 2019. Limited -> SIA
2019-01-17 17:32:01 +03:00
68f6be2e43 nodejs: check file existence 2018-12-03 18:38:33 +03:00
87381123e3 v5.2.3 2018-10-30 13:01:36 +03:00
7d79efe1f1 release/v5.2.0 2018-09-27 19:07:46 +03:00
04c3ff5895 Fix Bug 38447 long loading page 2018-08-30 15:57:09 +03:00
e3eb837f45 fix link in header 2018-08-30 15:54:27 +03:00
c96205b4da fix link in header 2018-08-30 14:30:17 +03:00
2c5ee77c08 php: pure php config 2018-08-30 14:27:10 +03:00
4dc137cf96 ppsx is not editable 2018-08-17 10:44:27 +03:00
f8003e75ec java: 3rd party license 2018-08-06 17:16:32 +03:00
cb2414140a java: jwt in conversion 2018-08-06 16:37:32 +03:00
d1f63976cb java: conversion params to body 2018-08-06 16:13:13 +03:00
4276caf87d java: fix process error 2018-08-06 16:12:10 +03:00
d5571a3f2e java: jwt in config 2018-08-06 15:03:58 +03:00
3582109cf7 java: jwt in track 2018-08-06 15:02:46 +03:00
10ecddbe61 java: building configuration on server 2018-08-03 15:25:19 +03:00
5a4dea7bfc java: deleted extra parameters 2018-08-03 12:18:42 +03:00
911da29ecb java: fix switch view mode to edit 2018-08-03 12:13:24 +03:00
37fe8eb4d5 java: fix string compare 2018-08-02 16:42:12 +03:00
633fd6efc9 java: format 2018-08-02 13:59:19 +03:00
a758d3f294 nodejs: version count to hint 2018-07-20 13:07:24 +03:00
548 changed files with 33653 additions and 4880 deletions

8
.gitignore vendored
View File

@ -5,8 +5,12 @@
/build/deploy
/build/*.log
/web/documentserver-example/nodejs/node_modules
/web/documentserver-example/nodejs/public/files
/web/documentserver-example/nodejs/files
/web/documentserver-example/nodejs/config/local.json
/web/documentserver-example/nodejs/example
**/.vscode/
**/.vs/
**/.idea
/web/documentserver-example/java/target/
/web/documentserver-example/java/target/
/web/documentserver-example/csharp/packages
/web/documentserver-example/csharp-mvc/packages

28
.gitmodules vendored Normal file
View File

@ -0,0 +1,28 @@
[submodule "web/documentserver-example/nodejs/public/assets"]
path = web/documentserver-example/nodejs/public/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/java/src/main/resources/assets"]
path = web/documentserver-example/java/src/main/resources/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/php/assets"]
path = web/documentserver-example/php/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/python/assets"]
path = web/documentserver-example/python/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/csharp-mvc/assets"]
path = web/documentserver-example/csharp-mvc/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/csharp/assets"]
path = web/documentserver-example/csharp/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/ruby/public/assets"]
path = web/documentserver-example/ruby/public/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en

263
3rd-Party.license Normal file
View File

@ -0,0 +1,263 @@
Document Server integration example uses code from the following 3rd party projects.
web/documentserver-example/csharp
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
web/documentserver-example/csharp-mvc
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
License File: EntityFramework.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
License: MS-EULA License
License File: Microsoft.Web.Infrastructure.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
License: MIT
License File: Newtonsoft.Json.license
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
License: MICROSOFT .NET LIBRARY LICENSE
License File: WebGrease.license
web/documentserver-example/java
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
License: Apache 2.0
License File: prime-jwt.license
web/documentserver-example/nodejs
body-parser - Node.js body parsing middleware. (https://github.com/expressjs/body-parser/blob/master/LICENSE)
License: MIT
License File: body-parser.license
config - Node-config organizes hierarchical configurations for your app deployments. (https://github.com/lorenwest/node-config/blob/master/LICENSE)
License: MIT
License File: config.license
debug - A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. (https://github.com/visionmedia/debug/blob/master/LICENSE)
License: MIT
License File: debug.license
ejs - Embedded JavaScript templates (https://github.com/mde/ejs/blob/main/LICENSE)
License: Apache 2.0
License File: ejs.license
express - Fast, unopinionated, minimalist web framework for node. (https://github.com/mde/ejs/blob/main/LICENSE)
License: MIT
License File: express.license
formidable - A Node.js module for parsing form data, especially file uploads. (https://github.com/node-formidable/formidable/blob/master/LICENSE)
License: MIT
License File: formidable.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
jsonwebtoken - An implementation of JSON Web Tokens. (https://github.com/auth0/node-jsonwebtoken/blob/master/LICENSE)
License: MIT
License File: jsonwebtoken.license
jwa - A JSON Web Algorithms implementation focusing (exclusively, at this point) on the algorithms necessary for JSON Web Signatures. (https://github.com/auth0/node-jwa/blob/master/LICENSE)
License: MIT
License File: jwa.license
log4js - This is a conversion of the log4js framework to work with node. (https://github.com/log4js-node/log4js-node/blob/master/LICENSE)
License: MIT
License File: log4js.license
mime - A comprehensive, compact MIME type module. (https://github.com/broofa/mime/blob/master/LICENSE)
License: MIT
License File: mime.license
serve-favicon - Node.js middleware for serving a favicon. (https://github.com/expressjs/serve-favicon/blob/master/LICENSE)
License: MIT
License File: serve-favicon.license
sync-request - Make synchronous web requests with cross-platform support. (https://github.com/ForbesLindesay/sync-request/blob/master/LICENSE)
License: MIT
License File: sync-request.license
urllib - Request HTTP URLs in a complex world — basic and digest authentication, redirections, cookies, timeout and more. (https://github.com/node-modules/urllib/blob/master/LICENSE)
License: MIT
License File: urllib.license
web/documentserver-example/php
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
web/documentserver-example/ruby
byebug - Byebug is a Ruby debugger. (https://github.com/deivid-rodriguez/byebug/blob/master/LICENSE)
License: BSD-2-Clause
License File: byebug.license
coffee-rails - CoffeeScript adapter for the Rails asset pipeline. (https://github.com/rails/coffee-rails/blob/master/MIT-LICENSE)
License: MIT
License File: coffee-rails.license
jbuilder - Create JSON structures via a Builder-style DSL (https://github.com/rails/jbuilder/blob/master/MIT-LICENSE)
License: MIT
License File: jbuilder.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
jquery-rails - This gem provides jQuery and the jQuery-ujs driver for your Rails 4+ application. (https://github.com/rails/jquery-rails/blob/master/MIT-LICENSE)
License: MIT
License File: jquery-rails.license
rails - Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. (https://github.com/rails/rails/blob/v6.0.3.2/MIT-LICENSE)
License: MIT
License File: rails.license
sass-rails - This gem provides official integration for Ruby on Rails projects with the Sass stylesheet language. (https://github.com/rails/sass-rails/blob/master/MIT-LICENSE)
License: MIT
License File: sass-rails.license
sdoc - rdoc generator html with javascript search index. (https://github.com/zzak/sdoc/blob/master/LICENSE)
License: MIT
License File: sdoc.license
sqlite3 - This module allows Ruby programs to interface with the SQLite3 database engine (www.sqlite.org). (https://github.com/sparklemotion/sqlite3-ruby/blob/master/LICENSE)
License: BSD-3-Clause
License File: sqlite3.license
turbolinks - Rails engine for Turbolinks 5 support (https://github.com/turbolinks/turbolinks-rails/blob/master/LICENSE)
License: MIT
License File: turbolinks.license
tzinfo-data - TZInfo::Data contains data from the IANA Time Zone database packaged as Ruby modules for use with TZInfo. (https://github.com/tzinfo/tzinfo-data/blob/master/LICENSE)
License: MIT
License File: tzinfo-data.license
uglifier - Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in Ruby (https://github.com/lautis/uglifier/blob/master/LICENSE.txt)
License: MIT
License File: uglifier.license
uuid - UUID generator for producing universally unique identifiers based on RFC 4122 (https://github.com/assaf/uuid/blob/master/MIT-LICENSE)
License: MIT
License File: uuid.license
web-console - A debugging tool for your Ruby on Rails applications. (https://github.com/rails/web-console/blob/master/MIT-LICENSE)
License: MIT
License File: web-console.license

View File

@ -1,30 +0,0 @@
Document Server integration example uses code from the following 3rd party projects.
1. jQuery - Query is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. (http://jquery.com/)
License: The MIT License (MIT)
License File: web\documentserver-example\csharp\licenses\MIT-LICENSE.txt
License File: web\documentserver-example\csharp-mvc\licenses\MIT-LICENSE.txt
2. jQuery BlockUI Plugin - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (http://malsup.com/jquery/block/)
License: MIT, GPL
3. jQuery UI - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice. (http://jqueryui.com/)
License: MIT
4. jQuery-File-Upload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload)
License: MIT
5. Open Sans - Open Sans is a humanist sans serif typeface designed by Steve Matteson, Type Director of Ascender Corp. This version contains the complete 897 character set, which includes the standard ISO Latin 1, Latin CE, Greek and Cyrillic character sets. Open Sans was designed with an upright stress, open forms and a neutral, yet friendly appearance. It was optimized for print, web, and mobile interfaces, and has excellent legibility characteristics in its letterforms.
Steve Matteson
License: Apache License, version 2.0

201
LICENSE Normal file
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

@ -1,6 +1,3 @@
[![License](https://img.shields.io/badge/License-MIT-green.svg?style=flat)](https://opensource.org/licenses/MIT) ![Release](https://img.shields.io/badge/Release-v4.1.2-blue.svg?style=flat)
## Document Server integration example
These examples show the way to integrate [ONLYOFFICE Document Server][2] into your own website or application using one of the programming languages. The package contains examples written in .Net (C# MVC), .Net (C#), Java, Node.js, PHP and Ruby.
@ -15,13 +12,63 @@ You should change `http://documentserver` to your server address in these files:
More information on how to use these examples can be found here: [http://api.onlyoffice.com/editors/demopreview](http://api.onlyoffice.com/editors/demopreview "http://api.onlyoffice.com/editors/demopreview")
## API methods for test examples
The methods described below are available for all of the test examples.
### POST `/upload`
| | |
| ---------------------- | ------------------------------------------------------------ |
| **Summary** | Upload file to test example via request |
| **URL** | /upload |
| **Method** | POST |
| **Request<br>Headers** | `Content-Type: multipart/form-data` |
| **Request<br>Body** | `uploadedFile=@<filepath>`<br> `filepath` - file for uploading<br />Multipart body with the file binary contents |
| **Response** | **Code:** 200 OK <br />**Content on success:**<br /> `{ "filename": <filename>}`<br />**Content on error:**<br /> `{ "error": "Uploaded file not found" }` <br /> Or <br /> `{ "error": "File size is incorrect" }` |
| **Sample** | `curl -X POST -F uploadedFile=@filename.docx http://localhost/upload` |
### DELETE `/file`
| | |
| ------------------ | ------------------------------------------------------------ |
| **Summary** | Delete one file or all files |
| **URL** | /file |
| **Method** | DELETE |
| ****URL Params**** | **Optional:**<br /> `filename=[string]` - file for deleting. <br /> *WARNING! Without this parameter, all files will be deleted* |
| **Response** | **Code:** 200 OK <br /> **Success:**<br /> `{ "success": true }` |
| **Sample** | **Delete one file:**<br />`curl -X DELETE http://localhost/file?filename=filename.docx`<br />**Delete all files:**<br />`curl -X DELETE http://localhost/file`<br /> |
### GET `/files`
| | |
| ------------------ | ------------------------------------------------------------ |
| **Summary** | Get information about all files |
| **URL** | /files |
| **Method** | GET |
| **Response** | **Code:** 200 OK <br /> **Success:**<br /> `[{ "version": <file_version>, "id": <file_id>, "contentLength": <file_size_in_kilobytes>, "pureContentLength": <file_size_in_bytes>, "title": <file_name>, "updated": <last_change_date>}, ..., {...}]` |
| **Sample** | `curl -X GET http://localhost/files/` |
### GET `/files/file/{fileId}`
| | |
| ------------------ | ------------------------------------------------------------ |
| **Summary** | Get information about a file by file id |
| **URL** | /files/file/{fileId} |
| **Method** | GET |
| **Response** | **Code:** 200 OK <br />**Content on success:**<br /> `[{ "version": <file_version>, "id": <file_id>, "contentLength": <file_size_in_kilobytes>, "pureContentLength": <file_size_in_bytes>, "title": <file_name>, "updated": <last_change_date>}]`<br />**Content on error:**<br /> `"File not found"` |
| **Sample** | `curl -X GET http://localhost/files/{fileId}` |
## Project Information
Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx)
Code repository: [https://github.com/ONLYOFFICE/document-server-integration](https://github.com/ONLYOFFICE/document-server-integration "https://github.com/ONLYOFFICE/document-server-integration")
SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
ONLYOFFICE for developers: [https://www.onlyoffice.com/developer-edition.aspx](https://www.onlyoffice.com/developer-edition.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx)
## User Feedback and Support
@ -33,4 +80,4 @@ If you have any problems with or questions about [ONLYOFFICE Document Server][2]
## License
document-server-integration is released under the MIT License. See the LICENSE.txt file for more information.
document-server-integration is released under the Apache-2.0 License. See the LICENSE file for more information.

View File

@ -1,7 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="App_Data\MSBuild.Community.Tasks.dll" TaskName="MSBuild.Community.Tasks.Zip" />
<PropertyGroup>
<To Condition=" '$(To)' == '' ">..\deploy\</To>
@ -11,8 +9,8 @@
</PropertyGroup>
<ItemGroup>
<ProjectToBuild Include="$(DirCSharp)OnlineEditorsExample.csproj"/>
<ProjectToBuild Include="$(DirMvc)OnlineEditorsExampleMVC.csproj"/>
<ProjectToBuild Include="$(DirCSharp)OnlineEditorsExample.sln"/>
<ProjectToBuild Include="$(DirMvc)OnlineEditorsExampleMVC.sln"/>
</ItemGroup>
<Target Name="Build">

View File

@ -16,6 +16,8 @@
<DirPHP>$(RootDir)web\documentserver-example\php\</DirPHP>
<NameRuby>$(To)Ruby Example</NameRuby>
<DirRuby>$(RootDir)web\documentserver-example\ruby\</DirRuby>
<NamePython>$(To)Python Example</NamePython>
<DirPython>$(RootDir)web\documentserver-example\python\</DirPython>
</PropertyGroup>
<Target Name="Build">
@ -56,6 +58,12 @@
</ItemGroup>
<Copy SourceFiles="@(ZipFilesRuby)" DestinationFiles="@(ZipFilesRuby->'$(NameRuby)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NameRuby)" WorkingDirectory="$(To)" ZipFileName="$(NameRuby).zip" />
<ItemGroup>
<ZipFilesPython Include="$(DirPython)**" />
</ItemGroup>
<Copy SourceFiles="@(ZipFilesPython)" DestinationFiles="@(ZipFilesPython->'$(NamePython)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Zip Files="$(NamePython)" WorkingDirectory="$(To)" ZipFileName="$(NamePython).zip" />
</Target>
</Project>

View File

@ -1,22 +0,0 @@
DocumentServerIntegration uses code from the following 3rd party projects.
1. Ionic.Zip.dll - The Zip, implementation for .NET. (http://dotnetzip.codeplex.com/)
License: MS-PL
License File: DotNetZip.license
2. jQuery - Query is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. (http://jquery.com/)
License: MIT License
License File: jQuery.license
3. jQuery BlockUI Plugin - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (http://malsup.com/jquery/block/)
License: MIT, GPL
4. jQuery UI - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice. (http://jqueryui.com/)
License: MIT

View File

@ -1,33 +0,0 @@
Microsoft Public License (Ms-PL)
This license governs use of the accompanying software, the DotNetZip library ("the software"). If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

View File

@ -0,0 +1,37 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
License File: EntityFramework.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
License: MS-EULA License
License File: Microsoft.Web.Infrastructure.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
License: MIT
License File: Newtonsoft.Json.license
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
License: MICROSOFT .NET LIBRARY LICENSE
License File: WebGrease.license

View File

@ -1,28 +1,20 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System.Web.Optimization;

View File

@ -1,28 +1,20 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System.Web.Mvc;

View File

@ -1,28 +1,20 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System.Web.Mvc;
using System.Web.Routing;

View File

@ -1,28 +1,20 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System.Web.Http;

View File

@ -1,30 +1,22 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
html {
html {
height: 100%;
width: 100%;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

View File

@ -0,0 +1,3 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.294404 0.294466C-0.0961199 0.68499 -0.0998005 1.32183 0.290724 1.71236L5.57837 7L5.57841 7.00005L0.29081 12.2877C-0.0997145 12.6782 -0.0960336 13.315 0.294491 13.7055C0.685015 14.0961 1.32186 14.0997 1.71238 13.7092L6.99999 8.42162L12.2876 13.7092C12.6781 14.0997 13.315 14.0961 13.7055 13.7055C14.096 13.315 14.0997 12.6782 13.7092 12.2877L8.42156 7.00005L8.42161 7L13.7093 1.71236C14.0998 1.32183 14.0961 0.68499 13.7056 0.294466C13.315 -0.0960591 12.6782 -0.0997395 12.2877 0.290785L7.00003 5.57843L6.99999 5.57847L6.99994 5.57843L1.7123 0.290785C1.32177 -0.0997395 0.684928 -0.0960591 0.294404 0.294466Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.3765 15.128C9.98789 15.5187 9.35642 15.5214 8.96449 15.134L6.14517 12.3473C5.75561 11.9622 5.12876 11.9622 4.7392 12.3473L4.72038 12.3659C4.32403 12.7576 4.32441 13.3978 4.72124 13.7891L8.96526 17.974C9.35702 18.3603 9.98726 18.3576 10.3757 17.9679L20.2877 8.02323C20.6801 7.6296 20.67 6.9855 20.2729 6.59668C19.8804 6.21243 19.2454 6.21063 18.8581 6.60005L10.3765 15.128Z" fill="#8BB825"/>
</svg>

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99857 1.6C4.46508 1.6 1.6 4.46548 1.6 8.00029C1.6 9.70508 2.26458 11.2515 3.35202 12.3999C4.52033 13.6337 6.16874 14.4 7.99857 14.4C11.5348 14.4 14.4 11.5335 14.4 8.00029C14.4 4.46592 11.5348 1.6 7.99857 1.6ZM0 8.00029C0 3.58219 3.58105 0 7.99857 0C12.4184 0 16 3.58219 16 8.00029C16 12.4172 12.4184 16 7.99857 16C5.71117 16 3.64805 15.0395 2.19023 13.5C0.83265 12.0663 0 10.1304 0 8.00029ZM7 4H9V9H7V4ZM9 10H7V12H9V10Z" fill="#CB0000"/>
</svg>

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

View File

@ -0,0 +1,8 @@
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 3C0 1.34315 1.34315 0 3 0H21.674C22.4697 0 23.2327 0.316071 23.7953 0.87868L29.1213 6.20465C29.6839 6.76726 30 7.53032 30 8.32597V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#3779A6"/>
<path d="M22.9167 0L30.0001 7.08333H25.9167C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#1D5880"/>
<path d="M6.17627 14.7059H23.8233V15.8823H6.17627V14.7059Z" fill="white"/>
<path d="M6.17627 18.5294H23.8233V19.7059H6.17627V18.5294Z" fill="white"/>
<path d="M6.17627 22.3529H23.8233V23.5294H6.17627V22.3529Z" fill="white"/>
<path d="M6.17627 26.1765H23.8233V27.3529H6.17627V26.1765Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

View File

@ -0,0 +1,8 @@
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#F36700"/>
<path d="M22.9167 0L30.0001 7.08333H25.9168C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#AB531F"/>
<path d="M6.17627 16.1275H23.8233V17.3039H6.17627V16.1275Z" fill="white"/>
<path d="M6.17627 28.7745L6.17627 16.1275L7.35274 16.1275L7.35274 28.7745H6.17627Z" fill="white"/>
<path d="M23.8233 16.1275V28.7745H22.6469V16.1275L23.8233 16.1275Z" fill="white"/>
<path d="M6.17627 27.598H23.8233V28.7745H6.17627L6.17627 27.598Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 691 B

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="M30 7.44186L22 0H3C1.22739 0 0 0.822551 0 2.32558V37.2093C0 38.7123 1.22739 40 3 40H27C28.7726 40 30 38.7123 30 37.2093V7.44186Z" fill="#D0D5DA"/>
<path d="M24.1042 7.27273H29.9631L22 0V5.32334C22 6.4105 22.949 7.27273 24.1042 7.27273Z" fill="#646464"/>
<path d="M16.9562 22.3485H12.9746V17.803H10.9839L14.9654 14.1667L18.947 17.803H16.9562V22.3485Z" fill="#646464"/>
<path d="M20.9378 23.7121C20.9378 24.1666 20.4401 24.6212 19.9424 24.6212H9.98848C9.49078 24.6212 8.99309 24.1666 8.99309 23.7121V22.3485C8.99309 21.8939 9.49078 21.4394 9.98848 21.4394H10.9839V20.0757H9.49078C8.49539 20.0757 7.5 20.9848 7.5 21.8939V24.1666C7.5 25.0757 8.61982 25.9848 9.49078 25.9848H20.4401C21.3111 25.9848 22.4309 25.0757 22.4309 24.1666V21.8939C22.4309 20.9848 21.4355 20.0757 20.4401 20.0757H18.947V21.4394H19.9424C20.4401 21.4394 20.9378 21.8939 20.9378 22.3485V23.7121Z" fill="#646464"/>
</svg>

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

View File

@ -0,0 +1,12 @@
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#78A73B"/>
<path d="M22.9167 0L30.0001 7.08333H25.9168C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#5A7D2B"/>
<path d="M6.17644 15.2941H23.8235V16.4706H6.17644V15.2941Z" fill="white"/>
<path d="M6.17644 19.1177H23.8235V20.2941H6.17644V19.1177Z" fill="white"/>
<path d="M6.17644 22.9412H23.8235V24.1177H6.17644V22.9412Z" fill="white"/>
<path d="M6.17644 26.7647H23.8235V27.9412H6.17644V26.7647Z" fill="white"/>
<path d="M5.88232 27.9412L5.88232 15.2941L7.0588 15.2941L7.0588 27.9412H5.88232Z" fill="white"/>
<path d="M11.4706 27.9412L11.4706 15.2941L12.647 15.2941V27.9412H11.4706Z" fill="white"/>
<path d="M17.0588 27.9412L17.0588 15.2941L18.2353 15.2941V27.9412H17.0588Z" fill="white"/>
<path d="M22.647 27.9412V15.2941H23.8235V27.9412H22.647Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

View File

@ -0,0 +1,12 @@
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.84616 1H10.8462L14.8462 5V15H2.84616V1Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8462 5L10.8462 1H2.84616V15H14.8462V5ZM10.8462 0L15.8462 5V16H1.84616V0H10.8462Z" fill="#BFBFBF"/>
<rect x="3.84616" y="10" width="10" height="4" fill="#3779A6"/>
<path d="M3.84616 4H4.84616V5H3.84616V4Z" fill="#BFBFBF"/>
<path d="M3.84616 6H4.84616V7H3.84616V6Z" fill="#BFBFBF"/>
<path d="M4.84616 8H3.84616V9H4.84616V8Z" fill="#BFBFBF"/>
<path d="M12.8462 8H5.84616V9H12.8462V8Z" fill="#BFBFBF"/>
<path d="M7.84616 6H5.84616V7H7.84616V6Z" fill="#BFBFBF"/>
<path d="M12.8462 4H5.84616V5H12.8462V4Z" fill="#BFBFBF"/>
<path opacity="0.3" d="M9.84616 1H10.8462V4H14.8462L15.8462 5H9.84616V1Z" fill="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 832 B

View File

@ -0,0 +1,12 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 1H10L14 5V15H2V1Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 5L10 1H2V15H14V5ZM10 0L15 5V16H1V0H10Z" fill="#BFBFBF"/>
<rect x="3" y="10" width="10" height="4" fill="#F36700"/>
<path d="M3 4H4V5H3V4Z" fill="#BFBFBF"/>
<path d="M3 6H4V7H3V6Z" fill="#BFBFBF"/>
<path d="M4 8H3V9H4V8Z" fill="#BFBFBF"/>
<path d="M12 8H5V9H12V8Z" fill="#BFBFBF"/>
<path d="M7 6H5V7H7V6Z" fill="#BFBFBF"/>
<path d="M12 4H5V5H12V4Z" fill="#BFBFBF"/>
<path opacity="0.3" d="M9 1H10V4H14L15 5H9V1Z" fill="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 631 B

View File

@ -0,0 +1,12 @@
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.84592 1H10.8459L14.8459 5V15H2.84592V1Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8459 5L10.8459 1H2.84592V15H14.8459V5ZM10.8459 0L15.8459 5V16H1.84592V0H10.8459Z" fill="#BFBFBF"/>
<rect x="3.84592" y="10" width="10" height="4" fill="#78A73B"/>
<path d="M3.84592 4H4.84592V5H3.84592V4Z" fill="#BFBFBF"/>
<path d="M3.84592 6H4.84592V7H3.84592V6Z" fill="#BFBFBF"/>
<path d="M4.84592 8H3.84592V9H4.84592V8Z" fill="#BFBFBF"/>
<path d="M12.8459 8H5.84592V9H12.8459V8Z" fill="#BFBFBF"/>
<path d="M7.84592 6H5.84592V7H7.84592V6Z" fill="#BFBFBF"/>
<path d="M12.8459 4H5.84592V5H12.8459V4Z" fill="#BFBFBF"/>
<path opacity="0.3" d="M9.84592 1H10.8459V4H14.8459L15.8459 5H9.84592V1Z" fill="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 832 B

View File

@ -0,0 +1,3 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM5 6C5 5.44772 5.44772 5 6 5C6.55228 5 7 5.44772 7 6V9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9V6ZM6 2C5.44772 2 5 2.44772 5 3C5 3.55228 5.44772 4 6 4C6.55228 4 7 3.55228 7 3C7 2.44772 6.55228 2 6 2Z" fill="#D0D5DA"/>
</svg>

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,15 @@
<svg width="153" height="28" viewBox="0 0 153 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 27.6567L0.801116 21.8897C-0.267039 21.3862 -0.267039 20.6081 0.801116 20.1504L5.16662 18.1365L13.2939 21.8897C14.362 22.3932 16.0804 22.3932 17.1021 21.8897L25.2294 18.1365L29.5949 20.1504C30.663 20.6539 30.663 21.432 29.5949 21.8897L17.0556 27.6567C16.0804 28.1144 14.362 28.1144 13.3403 27.6567Z" fill="#FF6F3D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 20.5623L0.801116 14.7953C-0.267039 14.2918 -0.267039 13.5137 0.801116 13.056L5.07373 11.0879L13.3403 14.8868C14.4085 15.3903 16.1268 15.3903 17.1485 14.8868L25.4151 11.0879L29.6877 13.056C30.7559 13.5595 30.7559 14.3376 29.6877 14.7953L17.1485 20.5623C16.0804 21.0658 14.362 21.0658 13.3403 20.5623Z" fill="#95C038"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 13.651L0.801116 7.88393C-0.267039 7.38045 -0.267039 6.60236 0.801116 6.14466L13.3403 0.377605C14.4085 -0.125868 16.1268 -0.125868 17.1485 0.377605L29.6877 6.14466C30.7559 6.64813 30.7559 7.42622 29.6877 7.88393L17.1485 13.651C16.0804 14.1087 14.362 14.1087 13.3403 13.651Z" fill="#5DC0E8"/>
<path d="M38.1528 13.9433C38.1528 11.5581 38.8442 9.75803 40.2731 8.58797C41.6559 7.3729 43.3152 6.78787 45.2051 6.78787C47.0949 6.78787 48.7081 7.3729 50.0909 8.58797C51.4737 9.80304 52.1651 11.5581 52.1651 13.9883C52.1651 16.3734 51.4737 18.1735 50.0909 19.3436C48.7081 20.5586 47.0488 21.1437 45.2051 21.1437C43.3152 21.1437 41.702 20.5586 40.2731 19.3436C38.8442 18.1285 38.1528 16.3284 38.1528 13.9433ZM41.195 13.9433C41.195 15.6084 41.5176 16.7784 42.1168 17.5435C42.7621 18.3085 43.4535 18.8035 44.191 18.9835C44.3754 19.0285 44.5137 19.0735 44.698 19.0735C44.8363 19.0735 45.0207 19.1185 45.159 19.1185C45.3433 19.1185 45.4816 19.1185 45.666 19.0735C45.8504 19.0735 45.9886 19.0285 46.173 18.9835C46.9105 18.8035 47.6019 18.3085 48.2011 17.5435C48.8003 16.7784 49.123 15.5633 49.123 13.9883C49.123 12.3682 48.8003 11.1981 48.2011 10.4331C47.6019 9.66803 46.9105 9.173 46.173 8.99299C45.9886 8.94799 45.8043 8.90299 45.666 8.90299C45.4816 8.90299 45.3433 8.85798 45.159 8.85798C44.9746 8.85798 44.8363 8.85798 44.698 8.90299C44.5598 8.90299 44.3754 8.94799 44.191 8.99299C43.4535 9.173 42.7621 9.66803 42.1168 10.4331C41.5176 11.1081 41.195 12.3232 41.195 13.9433Z" fill="white"/>
<path d="M53.6863 6.92288H57.4659L62.444 15.7434L63.1814 17.6785H63.2275L63.1814 15.1583V6.92288H66.0853V20.9636H62.3057L57.3276 11.7831L56.5901 10.2081H56.544L56.5901 12.6832V20.9636H53.6863V6.92288Z" fill="white"/>
<path d="M69.0813 6.92288H71.9852V18.5785H77.7007V20.9636H69.0813V6.92288Z" fill="white"/>
<path d="M75.9031 6.92288H79.2679L82.2178 11.8281L82.6787 12.8182H82.7709L83.2319 11.8281L86.2279 6.92288H89.3161L84.1076 15.2483V20.9636H81.2038V15.2033L75.9031 6.92288Z" fill="white"/>
<path d="M88.9473 13.9433C88.9473 11.5581 89.6387 9.75803 91.0675 8.58797C92.4503 7.3729 94.1097 6.78787 95.9995 6.78787C97.8893 6.78787 99.5026 7.3729 100.885 8.58797C102.268 9.80304 102.96 11.5581 102.96 13.9883C102.96 16.3734 102.268 18.1735 100.885 19.3436C99.5026 20.5586 97.8432 21.1437 95.9995 21.1437C94.1097 21.1437 92.4964 20.5586 91.0675 19.3436C89.6848 18.1285 88.9473 16.3284 88.9473 13.9433ZM91.9894 13.9433C91.9894 15.6084 92.3121 16.7784 92.9113 17.5435C93.5566 18.3085 94.2019 18.8035 94.9855 18.9835C95.1698 19.0285 95.3081 19.0735 95.4925 19.0735C95.6308 19.0735 95.8151 19.1185 95.9534 19.1185C96.1378 19.1185 96.2761 19.1185 96.4604 19.0735C96.6448 19.0735 96.7831 19.0285 96.9675 18.9835C97.7049 18.8035 98.3963 18.3085 98.9955 17.5435C99.5948 16.7784 99.9174 15.5633 99.9174 13.9883C99.9174 12.3682 99.5948 11.1981 98.9955 10.4331C98.3963 9.66803 97.7049 9.173 96.9675 8.99299C96.7831 8.94799 96.5987 8.90299 96.4604 8.90299C96.2761 8.90299 96.1378 8.85798 95.9534 8.85798C95.769 8.85798 95.6308 8.85798 95.4925 8.90299C95.3542 8.90299 95.1698 8.94799 94.9855 8.99299C94.248 9.173 93.5566 9.66803 92.9113 10.4331C92.3121 11.1081 91.9894 12.3232 91.9894 13.9433Z" fill="white"/>
<path d="M104.988 6.92288H113.008V9.26301H107.891V12.6832H112.777V15.0683H107.891V20.9636H104.988V6.92288Z" fill="white"/>
<path d="M115.174 6.92288H123.195V9.26301H118.078V12.6832H122.964V15.0683H118.078V20.9636H115.174V6.92288Z" fill="white"/>
<path d="M124.9 20.9636V6.92288H127.804V20.9636H124.9Z" fill="white"/>
<path d="M140.599 7.2378V9.66793C140.092 9.48792 139.585 9.35291 139.032 9.26291C138.478 9.1729 137.833 9.1279 137.188 9.1279C135.667 9.1279 134.515 9.57792 133.685 10.523C132.855 11.423 132.44 12.5931 132.44 13.9882C132.44 15.3382 132.809 16.4633 133.593 17.3633C134.376 18.2634 135.482 18.7584 136.911 18.7584C137.418 18.7584 137.925 18.7134 138.525 18.6684C139.124 18.5784 139.723 18.4434 140.368 18.1734L140.553 20.5585C140.46 20.6035 140.322 20.6485 140.184 20.6935C140 20.7385 139.815 20.7835 139.585 20.8285C139.216 20.9185 138.755 20.9635 138.202 21.0535C137.649 21.0985 137.096 21.1436 136.497 21.1436C136.404 21.1436 136.312 21.1436 136.266 21.1436C136.174 21.1436 136.082 21.1436 136.036 21.1436C134.376 21.0535 132.855 20.4235 131.472 19.3435C130.09 18.2184 129.398 16.4633 129.398 14.1232C129.398 11.828 130.09 10.0279 131.426 8.76788C132.763 7.50781 134.607 6.87778 136.865 6.87778C137.464 6.87778 138.018 6.87778 138.478 6.92278C138.986 6.96778 139.446 7.05779 139.953 7.14779C140.046 7.19279 140.184 7.19279 140.276 7.2378C140.368 7.19279 140.46 7.2378 140.599 7.2378Z" fill="white"/>
<path d="M142.903 6.92294H151.523V9.12806H145.853V12.6383H150.97V14.7984H145.853V18.7586H151.523V20.9637H142.903V6.92294Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.3">
<path d="M10.3826 15.3872C9.9926 15.7862 9.35162 15.7889 8.95828 15.3933L6.15133 12.5701C5.76034 12.1768 5.12403 12.1768 4.73304 12.5701L4.70185 12.6015C4.31371 12.9918 4.31409 13.6225 4.7027 14.0124L8.95904 18.2831C9.35223 18.6776 9.99196 18.6749 10.3817 18.277L20.3062 8.14519C20.6903 7.75301 20.6865 7.12447 20.2976 6.73701L20.273 6.71257C19.8791 6.32014 19.2408 6.32437 18.8521 6.722L10.3826 15.3872Z" fill="#444444"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -1,114 +1,125 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
html {
html {
height: 100%;
width: 100%;
}
body {
background: #fff;
color: #333;
font-family: 'Open Sans', Tahoma,sans-serif;
background: #FFFFFF;
color: #333333;
font-family: Open Sans;
font-size: 12px;
font-style: normal;
font-weight: normal;
height: 100%;
margin: 0;
padding: 0;
text-decoration: none;
}
form {
height: 100%;
}
div {
margin: 0;
padding: 0;
}
a, a:hover, a:visited {
color: #333;
a,
a:hover,
a:visited {
color: #333333;
cursor: pointer;
}
.top-panel {
background: url("images/logo.png") no-repeat 30px center #3D4A6B;
height: 80px;
width: 100%;
header {
background: #333333;
height: 72px;
margin: 0 auto;
min-width: 1152px;
width: auto;
}
header img {
margin: 22px 0 22px 32px;
}
.center {
margin: 0 auto 0;
width: 1152px;
}
.main {
height: calc(100% - 136px);
min-height: 549px;
}
.table-main {
border-spacing: 0;
height: 100%;
min-height: 549px;
}
.section {
height: 100%;
padding: 0;
vertical-align: top;
}
.main-panel {
margin: 80px auto;
width: 600px;
box-sizing: border-box;
-moz-box-sizing: border-box;
height: 100%;
list-style: none;
padding: 48px 32px;
position: relative;
width: 896px;
}
.portal-name {
font-size: 20px;
color: #FF6F3D;
font-size: 24px;
font-weight: bold;
line-height: 133%;
letter-spacing: -0.02em;
}
.portal-descr {
display: inline-block;
line-height: 20px;
margin-bottom: 24px;
width: 600px;
}
.save-original {
color: #929597;
line-height: 20px;
margin-left: 16px;
white-space: nowrap;
width: 272px;
}
label .checkbox {
vertical-align: middle;
}
.question {
background: url("images/question_small.png") no-repeat center center transparent;
cursor: pointer;
display: inline-block;
height: 16px;
width: 16px;
}
#hint {
background-color: #FFFFFF;
border: 1px solid #8E908F;
display: none;
margin: 4px 0 0 -32px;
max-width: 415px;
padding: 10px 15px 15px;
word-wrap: break-word;
z-index: 255;
}
.corner {
background: url("images/corner.png") no-repeat scroll 0 0 transparent;
height: 6px;
left: 35px;
margin-top: -15px;
position: absolute;
width: 9px;
z-index: 261;
}
.try-descr {
font-size: 16px;
white-space : nowrap;
line-height: 160%;
margin-top: 16px;
}
.header-list {
font-weight: bold;
font-size: 16px;
line-height: 133%;
letter-spacing: -0.02em;
}
label .checkbox {
margin: 0 5px 3px 0;
vertical-align: middle;
cursor: pointer;
}
.try-editor-list {
@ -116,195 +127,344 @@ label .checkbox {
margin: 0;
padding: 0;
}
.try-editor-list li {
float: left;
margin: 25px;
width: 150px;
margin-bottom: 12px
}
.try-editor {
background-color: transparent;
background-position: center 0;
background-repeat: no-repeat;
display: block;
font-size: 14px;
font-weight: bold;
height: 45px;
padding-top: 100px;
text-align: center;
line-height: 40px;
padding-left: 42px;
text-decoration: none;
}
.try-editor.document {
background-image: url("images/file_docx.png");
}
.try-editor.spreadsheet {
background-image: url("images/file_xlsx.png");
}
.try-editor.presentation {
background-image: url("images/file_pptx.png");
}
.button, .button:visited, .button:hover, .button:active {
.try-editor.word {
background-image: url("images/file_docx.svg");
}
.try-editor.cell {
background-image: url("images/file_xlsx.svg");
}
.try-editor.slide {
background-image: url("images/file_pptx.svg");
}
.create-sample {
color: #666666;
line-height: 24px;
}
.button,
.button:visited,
.button:hover,
.button:active {
align-items: center;
border-radius: 3px;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
font-weight: normal;
font-weight: 600;
letter-spacing: 0.08em;
line-height: 133%;
padding: 8px 20px;
text-align: center;
text-decoration: none;
vertical-align: middle;
cursor:pointer;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
touch-callout: none;
text-transform: uppercase;
vertical-align: middle;
user-select: none;
-o-touch-callout: none;
-moz-touch-callout: none;
-webkit-touch-callout: none;
user-select: none;
-o-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
font-size: 12px;
line-height: 16px;
margin-right: 3px;
padding: 4px 12px;
color: #fff;
background: #3D96C6;
border-width: 1px;
border-style: solid;
border-color: #3D96C6;
}
.button.disable {
#beginEdit {
background: #FF6F3D;
border: 1px solid #FF6F3D;
color: #FFFFFF;
}
#beginEdit.disable {
background: #EDC2B3;
border: 1px solid #EDC2B3;
cursor: default;
background: #BADDEF;
border: 1px solid #BADDEF;
}
#beginEdit:not(.disable):hover {
background: #ff7a4b;
}
.button.gray {
background: #888;
border: 1px solid #E9EAEA;
border: 1px solid #AAAAAA;
margin-left: 8px;
}
.button.gray.disable {
border: 1px solid #E5E5E5;
color: #B5B5B5;
cursor: default;
}
.button.gray:not(.disable):hover {
border: 1px solid #FF6F3D;
color: #FF6F3D;
}
.upload-panel {
float: left;
padding: 24px 0;
}
.file-upload {
background: url("images/file_upload.svg") no-repeat 0 transparent;
cursor: pointer;
margin-bottom: 8px;
padding: 0 !important;
display: block;
font-size: 14px;
line-height: 40px;
overflow: hidden;
padding-left: 42px;
position: relative;
width: 150px;
}
.file-upload span {
line-height: 21px;
margin: 2px 12px;
}
.file-upload input {
cursor: pointer;
font-size: 23px;
height: 40px;
margin: 0;
opacity: 0;
opacity: 0;
position: absolute;
right: 0;
top: 0;
transform: translate(-300px, 0) scale(4);
transform: translate(0px, -21px) scale(2);
width: 192px;
}
.create-panel {
float: left;
padding: 16px 0;
}
.upload-panel,
.create-panel {
width: 100%;
border-bottom: 1px solid #D0D5DA;
}
#mainProgress {
color: #979b9f;
color: #333333;
display: none;
margin: 15px;
font-size: 12px;
margin: 30px 40px;
}
#mainProgress .uploadFileName {
background-position: left center;
background-repeat: no-repeat;
display: block;
font-size: 14px;
line-height: 160%;
overflow: hidden;
padding-left: 28px;
text-overflow: ellipsis;
white-space: nowrap;
}
#mainProgress .describeUpload {
line-height: 150%;
letter-spacing: -0.02em;
padding: 16px 0;
}
#mainProgress #embeddedView {
display: none;
}
#mainProgress.embedded #embeddedView {
display: block;
}
#mainProgress.embedded #uploadSteps {
display: none;
}
.error-message {
background: url("images/alert.png") no-repeat scroll 4px 10px #FFECE3;
color: #666668 !important;
background: url("images/error.svg") no-repeat scroll 4px 10px;
color: #CB0000;
display: none;
font-size: 13px;
font-weight: normal;
line-height: 160%;
letter-spacing: -0.02em;
margin: 5px 0;
padding: 10px 10px 10px 30px;
vertical-align: middle;
word-wrap: break-word;
}
#mainProgress .error-message a {
color: #666668;
}
.step {
background-repeat: no-repeat;
background-position: left center;
background-color: transparent;
color: #979B9F;
font-size: 14px;
line-height: 30px;
padding-left: 25px;
font-weight: bold;
line-height: 167%;
padding-left: 35px;
}
.current {
background-image: url("images/loader16.gif");
color: #333;
}
.done {
background-image: url("images/done.png");
color: #333;
background-image: url("images/done.svg");
}
.error {
background-image: url("images/alert.png");
background-image: url("images/notdone.svg");
}
.step-descr {
display: block;
margin-left: 45px;
}
#mainProgress .step-descr a {
color: #979B9F;
margin-left: 35px;
font-size: 11px;
line-height: 188%;
}
.progress-descr {
color: #333;
letter-spacing: -0.02em;
line-height: 150%;
}
#loadScripts {
display: none;
}
#iframeScripts {
position: absolute;
visibility: hidden;
}
.bottom-panel {
bottom: 0;
position: fixed;
text-align: right;
width: 100%;
footer {
background: #333333;
color: #AAAAAA;
height: 64px;
min-width: 1152px;
width: auto;
}
footer table {
border-spacing: 0;
}
footer table tr {
height: 64px;
}
footer table td {
padding-left: 32px;
}
footer a,
footer a:hover,
footer a:visited {
color: #FF6F3D;
font-size: 14px;
line-height: 120%;
}
footer a:hover {
text-decoration: none;
}
.copy {
padding-left: 510px;
}
.help-block {
margin: 48px 32px;
}
.help-block span {
font-size: 16px;
line-height: 26px;
font-size: 14px;
font-weight: 600;
line-height: 19px;
}
.stored-list {
list-style: none;
padding: 0;
position: relative;
height: 100%;
}
.stored-edit {
background-color: transparent;
background-position: left center;
background-repeat: no-repeat;
display: inline-block;
height: 16px;
max-width: 250px;
overflow: hidden;
padding: 8px 0 1px 26px;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
}
.stored-edit.word,
.uploadFileName.word {
background-image: url("images/icon_docx.svg");
}
.stored-edit.cell,
.uploadFileName.cell {
background-image: url("images/icon_xlsx.svg");
}
.stored-edit.slide,
.uploadFileName.slide {
background-image: url("images/icon_pptx.svg");
}
.stored-edit span {
font-size: 12px;
line-height: 12px;
}
.stored-edit:hover span {
text-decoration: underline;
}
.blockTitle {
background-color: #E2E2E2 !important;
background-color: #333333 !important;
border: none !important;
border-radius: 0 !important;
-moz-border-radius: 0 !important;
-webkit-border-radius: 0 !important;
color: #333 !important;
color: #F5F5F5 !important;
font-size: 16px !important;
font-weight: normal !important;
padding: 15px 25px !important;
font-weight: 600 !important;
line-height: 133%;
letter-spacing: -0.02em;
padding: 14px 16px 14px 46px !important;
}
.dialog-close {
background: url("images/close.png") no-repeat scroll left top #E2E2E2;
background: url("images/close.svg") no-repeat scroll left top;
cursor: pointer;
float: right;
font-size: 1px;
height: 12px;
height: 14px;
line-height: 1px;
margin-top: 4px;
width: 12px;
width: 14px;
}
.blockPage {
border: none !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
@ -312,4 +472,178 @@ label .checkbox {
-moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.5);
padding: 0 !important;
}
.clearFix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.tableRow {
background: transparent;
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.tableRow:hover {
background-color: #ECECEC;
}
.tableHeader {
padding-top: 10px;
}
.tableHeader tr {
background: transparent;
cursor: default;
height: 40px;
-khtml-user-select: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
.tableHeaderCell {
border-bottom: 1px solid #CCCCCC;
padding: 2px 4px;
text-align: center;
}
.tableHeaderCellFileName {
text-align: left;
width: 37%;
}
.tableHeaderCellEditors {
width: 29%;
}
.tableHeaderCellViewers {
width: 11%;
}
.tableHeaderCellDownload {
width: 13%;
text-align: right;
padding-right: 20px;
}
.tableHeaderCellRemove {
text-align: left;
}
.contentCells {
border-bottom: 1px solid #EFEFEF;
font-family: 'Open Sans', sans-serif;
font-size: 16px;
padding: 4px;
white-space: nowrap;
-khtml-user-select: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
.contentCells-shift {
padding-right: 44px;
}
.contentCells-icon {
width: 4%;
}
.select-user {
color: #444444;
font-family: Open Sans;
font-size: 12px !important;
font-weight: normal !important;
line-height: 16px !important;
}
.info {
cursor: pointer;
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: 312px;
padding: 14px;
position: absolute;
}
.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%);
}
.user-block-table {
height: 100%;
padding: 14px 0;
width: 100%;
}
.user-block-table td {
background-color: #F4F4F4;
padding-top: 10px;
}
.user-block-table td select {
border: 1px solid #D0D5DA;
box-sizing: border-box;
border-radius: 3px;
cursor: pointer;
}
#user,
#language {
width: 100%;
margin-top: 5px;
padding-left: 5px;
}
.icon-delete {
cursor: pointer;
}
.left-panel {
width: 256px;
background: #F5F5F5;
}
.scroll-table-body {
bottom: 0;
left: 0;
margin-top: 0px;
overflow-x: auto;
position: absolute;
right: 0;
top: 71px;
scrollbar-color: #D0D5DA transparent;
scrollbar-width: thin;
}
.scroll-table-body::-webkit-scrollbar {
width: 4px;
}
.scroll-table-body::-webkit-scrollbar-thumb {
background: #D0D5DA;
border-radius: 3px;
}

View File

@ -1,29 +1,22 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System.IO;
using System.Web.Mvc;
using OnlineEditorsExampleMVC.Helpers;
using OnlineEditorsExampleMVC.Models;
@ -37,22 +30,22 @@ namespace OnlineEditorsExampleMVC.Controllers
return View();
}
public ActionResult Editor(string fileName, string mode)
public ActionResult Editor(string fileName, string editorsMode, string editorsType)
{
mode = mode ?? string.Empty;
var file = new FileModel
{
TypeDesktop = mode != "embedded",
FileName = fileName
Mode = editorsMode,
Type = editorsType,
FileName = Path.GetFileName(fileName)
};
return View("Editor", file);
}
public ActionResult Sample(string fileExt)
public ActionResult Sample(string fileExt, bool? sample)
{
var fileName = DocManagerHelper.CreateDemo(fileExt);
var fileName = DocManagerHelper.CreateDemo(fileExt, sample ?? false);
DocManagerHelper.CreateMeta(fileName, Request.Cookies.GetOrDefault("uid", ""), Request.Cookies.GetOrDefault("uname", ""));
Response.Redirect(Url.Action("Editor", "Home", new { fileName = fileName }));
return null;
}

View File

@ -1,28 +1,20 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System.Web;
using System.Web.Http;

View File

@ -1,38 +1,29 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Caching;
using System.Web.Configuration;
using System.Web.Script.Serialization;
using OnlineEditorsExampleMVC.Models;
namespace OnlineEditorsExampleMVC.Helpers
@ -81,36 +72,119 @@ namespace OnlineEditorsExampleMVC.Helpers
{
Directory.CreateDirectory(directory);
}
return directory + fileName;
return directory + Path.GetFileName(fileName);
}
public static string GetCorrectName(string fileName)
public static string ForcesavePath(string fileName, string userAddress, Boolean create)
{
var directory = HttpRuntime.AppDomainAppPath + CurUserHostAddress(userAddress) + "\\";
if (!Directory.Exists(directory))
{
return "";
}
directory = directory + Path.GetFileName(fileName) + "-hist" + "\\";
if (!Directory.Exists(directory))
{
if (create)
{
Directory.CreateDirectory(directory);
}
else
{
return "";
}
}
directory = directory + Path.GetFileName(fileName);
if (!File.Exists(directory))
{
if (!create)
{
return "";
}
}
return directory;
}
public static string HistoryDir(string storagePath)
{
return storagePath += "-hist";
}
public static string VersionDir(string histPath, int version)
{
return Path.Combine(histPath, version.ToString());
}
public static string VersionDir(string fileName, string userAddress, int version)
{
return VersionDir(HistoryDir(StoragePath(fileName, userAddress)), version);
}
public static int GetFileVersion(string historyPath)
{
if (!Directory.Exists(historyPath)) return 0;
return Directory.EnumerateDirectories(historyPath).Count() + 1;
}
public static int GetFileVersion(string fileName, string userAddress)
{
return GetFileVersion(HistoryDir(StoragePath(fileName, userAddress)));
}
public static string GetCorrectName(string fileName, string userAddress = null)
{
var baseName = Path.GetFileNameWithoutExtension(fileName);
var ext = Path.GetExtension(fileName);
var ext = Path.GetExtension(fileName).ToLower();
var name = baseName + ext;
for (var i = 1; File.Exists(StoragePath(name)); i++)
for (var i = 1; File.Exists(StoragePath(name, userAddress)); i++)
{
name = baseName + " (" + i + ")" + ext;
}
return name;
}
public static string CreateDemo(string fileExt)
public static List<FileInfo> GetStoredFiles()
{
var demoName = "sample." + fileExt;
var directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(null) + "\\";
if (!Directory.Exists(directory)) return new List<FileInfo>();
var directoryInfo = new DirectoryInfo(directory);
List<FileInfo> storedFiles = directoryInfo.GetFiles("*.*", SearchOption.TopDirectoryOnly).ToList();
return storedFiles;
}
public static string CreateDemo(string fileExt, bool withContent)
{
var demoName = (withContent ? "sample." : "new.") + fileExt;
var demoPath = "assets\\" + (withContent ? "sample\\" : "new\\");
var fileName = GetCorrectName(demoName);
File.Copy(HttpRuntime.AppDomainAppPath + "app_data\\" + demoName, StoragePath(fileName));
File.Copy(HttpRuntime.AppDomainAppPath + demoPath + demoName, StoragePath(fileName));
return fileName;
}
public static string GetFileUri(string fileName)
public static void CreateMeta(string fileName, string uid, string uname, string userAddress = null)
{
var uri = new UriBuilder(HttpContext.Current.Request.Url)
var histDir = HistoryDir(StoragePath(fileName, userAddress));
Directory.CreateDirectory(histDir);
File.WriteAllText(Path.Combine(histDir, "createdInfo.json"), new JavaScriptSerializer().Serialize(new Dictionary<string, object> {
{ "created", DateTime.Now.ToString("yyyy'-'MM'-'dd HH':'mm':'ss") },
{ "id", string.IsNullOrEmpty(uid) ? "uid-1" : uid },
{ "name", string.IsNullOrEmpty(uname) ? "John Smith" : uname }
}));
}
public static string GetFileUri(string fileName, Boolean forDocumentServer)
{
var uri = new UriBuilder(GetServerUrl(forDocumentServer))
{
Path = HttpRuntime.AppDomainAppVirtualPath + "/"
+ CurUserHostAddress() + "/"
@ -121,9 +195,38 @@ namespace OnlineEditorsExampleMVC.Helpers
return uri.ToString();
}
public static string GetPathUri(string path)
{
var uri = new UriBuilder(GetServerUrl(true))
{
Path = HttpRuntime.AppDomainAppVirtualPath + "/"
+ path,
Query = ""
};
return uri.ToString();
}
public static string GetServerUrl(Boolean forDocumentServer)
{
if (forDocumentServer && !WebConfigurationManager.AppSettings["files.docservice.url.example"].Equals(""))
{
return WebConfigurationManager.AppSettings["files.docservice.url.example"];
}
else
{
var uri = new UriBuilder(HttpContext.Current.Request.Url) { Query = "" };
var requestHost = HttpContext.Current.Request.Headers["Host"];
if (!string.IsNullOrEmpty(requestHost))
uri = new UriBuilder(uri.Scheme + "://" + requestHost);
return uri.ToString();
}
}
public static string GetCallback(string fileName)
{
var callbackUrl = new UriBuilder(HttpContext.Current.Request.Url)
var callbackUrl = new UriBuilder(GetServerUrl(true))
{
Path =
HttpRuntime.AppDomainAppVirtualPath
@ -140,15 +243,46 @@ namespace OnlineEditorsExampleMVC.Helpers
{
switch (fileType)
{
case FileUtility.FileType.Text:
case FileUtility.FileType.Word:
return ".docx";
case FileUtility.FileType.Spreadsheet:
case FileUtility.FileType.Cell:
return ".xlsx";
case FileUtility.FileType.Presentation:
case FileUtility.FileType.Slide:
return ".pptx";
default:
return ".docx";
}
}
public static List<Dictionary<string, object>> GetFilesInfo(string fileId = null)
{
var files = new List<Dictionary<string, object>>();
foreach (var file in GetStoredFiles())
{
var dictionary = new Dictionary<string, object>();
dictionary.Add("version", GetFileVersion(file.Name, null));
dictionary.Add("id", ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + file.Name + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(file.Name, null)).GetHashCode()));
dictionary.Add("contentLength", Math.Round(file.Length / 1024.0, 2) + " KB");
dictionary.Add("pureContentLength", file.Length);
dictionary.Add("title", file.Name);
dictionary.Add("updated", file.LastWriteTime.ToString());
if (fileId != null)
{
if (fileId.Equals(dictionary["id"]))
{
files.Add(dictionary);
break;
}
}
else
{
files.Add(dictionary);
}
}
return files;
}
}
}

View File

@ -1,36 +1,30 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Web.Configuration;
using System.Web.Helpers;
using System.Web.Script.Serialization;
namespace OnlineEditorsExampleMVC.Helpers
{
@ -44,7 +38,7 @@ namespace OnlineEditorsExampleMVC.Helpers
/// </summary>
static ServiceConverter()
{
DocumentConverterUrl = WebConfigurationManager.AppSettings["files.docservice.url.converter"] ?? "";
DocumentConverterUrl = (WebConfigurationManager.AppSettings["files.docservice.url.site"] ?? "") + (WebConfigurationManager.AppSettings["files.docservice.url.converter"] ?? "");
Int32.TryParse(WebConfigurationManager.AppSettings["files.docservice.timeout"], out ConvertTimeout);
ConvertTimeout = ConvertTimeout > 0 ? ConvertTimeout : 120000;
@ -91,7 +85,7 @@ namespace OnlineEditorsExampleMVC.Helpers
{
convertedDocumentUri = string.Empty;
fromExtension = string.IsNullOrEmpty(fromExtension) ? Path.GetExtension(documentUri) : fromExtension;
fromExtension = string.IsNullOrEmpty(fromExtension) ? Path.GetExtension(documentUri).ToLower() : fromExtension;
var title = Path.GetFileName(documentUri);
title = string.IsNullOrEmpty(title) ? Guid.NewGuid().ToString() : title;
@ -107,15 +101,31 @@ namespace OnlineEditorsExampleMVC.Helpers
request.Accept = "application/json";
request.Timeout = ConvertTimeout;
var bodyString = string.Format("{{\"async\": {0},\"filetype\": \"{1}\",\"key\": \"{2}\",\"outputtype\": \"{3}\",\"title\": \"{4}\",\"url\": \"{5}\"}}",
isAsync.ToString().ToLower(),
fromExtension.Trim('.'),
documentRevisionId,
toExtension.Trim('.'),
title,
documentUri);
var body = new Dictionary<string, object>() {
{ "async", isAsync },
{ "filetype", fromExtension.Trim('.') },
{ "key", documentRevisionId },
{ "outputtype", toExtension.Trim('.') },
{ "title", title },
{ "url", documentUri }
};
var bytes = Encoding.UTF8.GetBytes(bodyString);
if (JwtManager.Enabled)
{
var payload = new Dictionary<string, object>
{
{ "payload", body }
};
var payloadToken = JwtManager.Encode(payload);
var bodyToken = JwtManager.Encode(body);
string JWTheader = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
request.Headers.Add(JWTheader, "Bearer " + payloadToken);
body.Add("token", bodyToken);
}
var bytes = Encoding.UTF8.GetBytes(new JavaScriptSerializer().Serialize(body));
request.ContentLength = bytes.Length;
using (var requestStream = request.GetRequestStream())
{

View File

@ -0,0 +1,105 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Web.Configuration;
using System.Web.Script.Serialization;
namespace OnlineEditorsExampleMVC.Helpers
{
public static class JwtManager
{
private static readonly string Secret;
public static readonly bool Enabled;
private static readonly JavaScriptSerializer Serializer;
static JwtManager()
{
Secret = WebConfigurationManager.AppSettings["files.docservice.secret"] ?? "";
Enabled = !string.IsNullOrEmpty(Secret);
Serializer = new JavaScriptSerializer();
}
public static string Encode(IDictionary<string, object> payload)
{
var header = new Dictionary<string, object>
{
{ "alg", "HS256" },
{ "typ", "JWT" }
};
var encHeader = Base64UrlEncode(Serializer.Serialize(header));
var encPayload = Base64UrlEncode(Serializer.Serialize(payload));
var hashSum = Base64UrlEncode(CalculateHash(encHeader, encPayload));
return string.Format("{0}.{1}.{2}", encHeader, encPayload, hashSum);
}
public static string Decode(string token)
{
if (!Enabled || string.IsNullOrEmpty(token)) return "";
var split = token.Split('.');
if (split.Length != 3) return "";
var hashSum = Base64UrlEncode(CalculateHash(split[0], split[1]));
if (hashSum != split[2]) return "";
return Base64UrlDecode(split[1]);
}
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);
}
}
private static string Base64UrlEncode(string str)
{
return Base64UrlEncode(Encoding.UTF8.GetBytes(str));
}
private static string Base64UrlEncode(byte[] bytes)
{
return Convert.ToBase64String(bytes)
.TrimEnd('=').Replace('+', '-').Replace('/', '_');
}
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);
}
}
}

View File

@ -0,0 +1,297 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.IO;
using System.Net;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using System.Web.Configuration;
using System.Linq;
using System.Web;
using System.Text;
namespace OnlineEditorsExampleMVC.Helpers
{
public class TrackManager
{
public static Dictionary<string, object> readBody(HttpContext context)
{
string body;
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
{
body = readStream.ReadToEnd();
if (string.IsNullOrEmpty(body)) context.Response.Write("{\"error\":1,\"message\":\"Request stream is empty\"}");
}
}
catch (Exception e)
{
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
}
var jss = new JavaScriptSerializer();
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
if (JwtManager.Enabled)
{
string JWTheader = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
string token = null;
if (fileData.ContainsKey("token"))
{
token = JwtManager.Decode(fileData["token"].ToString());
}
else if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
{
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
token = JwtManager.Decode(headerToken);
}
else
{
context.Response.Write("{\"error\":1,\"message\":\"JWT expected\"}");
}
if (token != null && !token.Equals(""))
{
fileData = (Dictionary<string, object>)jss.Deserialize<Dictionary<string, object>>(token)["payload"];
}
else
{
context.Response.Write("{\"error\":1,\"message\":\"JWT validation failed\"}");
}
}
return fileData;
}
public static int processSave(Dictionary<string, object> fileData, string fileName, string userAddress)
{
var downloadUri = (string)fileData["url"];
string curExt = Path.GetExtension(fileName).ToLower();
string downloadExt = Path.GetExtension(downloadUri).ToLower() ?? "";
var newFileName = fileName;
if (!curExt.Equals(downloadExt, StringComparison.InvariantCultureIgnoreCase))
{
try
{
string newFileUri;
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
if (string.IsNullOrEmpty(newFileUri))
{
newFileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
}
else
{
downloadUri = newFileUri;
}
}
catch (Exception)
{
newFileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
}
}
var storagePath = DocManagerHelper.StoragePath(newFileName, userAddress);
var histDir = DocManagerHelper.HistoryDir(storagePath);
if (!Directory.Exists(histDir)) Directory.CreateDirectory(histDir);
var versionDir = DocManagerHelper.VersionDir(histDir, DocManagerHelper.GetFileVersion(histDir));
if (!Directory.Exists(versionDir)) Directory.CreateDirectory(versionDir);
File.Move(DocManagerHelper.StoragePath(fileName, userAddress), Path.Combine(versionDir, "prev" + curExt));
DownloadToFile(downloadUri, storagePath);
DownloadToFile((string)fileData["changesurl"], Path.Combine(versionDir, "diff.zip"));
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);
}
File.WriteAllText(Path.Combine(versionDir, "key.txt"), (string)fileData["key"]);
string forcesavePath = DocManagerHelper.ForcesavePath(newFileName, userAddress, false);
if (!forcesavePath.Equals(""))
{
File.Delete(forcesavePath);
}
return 0;
}
public static int processForceSave(Dictionary<string, object> fileData, string fileName, string userAddress)
{
var downloadUri = (string)fileData["url"];
string curExt = Path.GetExtension(fileName).ToLower();
string downloadExt = Path.GetExtension(downloadUri).ToLower();
Boolean newFileName = false;
if (!curExt.Equals(downloadExt))
{
try
{
string newFileUri;
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
if (string.IsNullOrEmpty(newFileUri))
{
newFileName = true;
}
else
{
downloadUri = newFileUri;
}
}
catch (Exception)
{
newFileName = true;
}
}
string forcesavePath = "";
Boolean isSubmitForm = fileData["forcesavetype"].ToString().Equals("3");
if (isSubmitForm)
{
if (newFileName)
{
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + downloadExt, userAddress);
} else
{
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + curExt, userAddress);
}
forcesavePath = DocManagerHelper.StoragePath(fileName, userAddress);
}
else
{
if (newFileName)
{
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
}
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false);
if (forcesavePath.Equals(""))
{
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, true);
}
}
DownloadToFile(downloadUri, forcesavePath);
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();
DocManagerHelper.CreateMeta(fileName, user, "Filling Form", userAddress);
}
return 0;
}
public static void commandRequest(string method, string key)
{
string documentCommandUrl = WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.command"];
var request = (HttpWebRequest)WebRequest.Create(documentCommandUrl);
request.Method = "POST";
request.ContentType = "application/json";
var body = new Dictionary<string, object>() {
{ "c", method },
{ "key", key }
};
if (JwtManager.Enabled)
{
var payload = new Dictionary<string, object>
{
{ "payload", body }
};
var payloadToken = JwtManager.Encode(payload);
var bodyToken = JwtManager.Encode(body);
string JWTheader = WebConfigurationManager.AppSettings["files.docservice.header"].Equals("") ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
request.Headers.Add(JWTheader, "Bearer " + payloadToken);
body.Add("token", bodyToken);
}
var bytes = Encoding.UTF8.GetBytes(new JavaScriptSerializer().Serialize(body));
request.ContentLength = bytes.Length;
using (var requestStream = request.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
string dataResponse;
using (var response = request.GetResponse())
using (var stream = response.GetResponseStream())
{
if (stream == null) throw new Exception("Response is null");
using (var reader = new StreamReader(stream))
{
dataResponse = reader.ReadToEnd();
}
}
var jss = new JavaScriptSerializer();
var responseObj = jss.Deserialize<Dictionary<string, object>>(dataResponse);
if (!responseObj["error"].ToString().Equals("0"))
{
throw new Exception(dataResponse);
}
}
private static void DownloadToFile(string url, string path)
{
if (string.IsNullOrEmpty(url)) throw new ArgumentException("url");
if (string.IsNullOrEmpty(path)) throw new ArgumentException("path");
var req = (HttpWebRequest)WebRequest.Create(url);
using (var stream = req.GetResponse().GetResponseStream())
{
if (stream == null) throw new Exception("stream is null");
const int bufferSize = 4096;
using (var fs = File.Open(path, FileMode.Create))
{
var buffer = new byte[bufferSize];
int readed;
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
{
fs.Write(buffer, 0, readed);
}
}
}
}
}
}

View File

@ -0,0 +1,21 @@
using System.Web;
namespace OnlineEditorsExampleMVC.Helpers
{
public static class Utils
{
public static string GetOrDefault(this HttpRequest request, string header, string def)
{
var value = request[header];
if (value != null) return value;
return def;
}
public static string GetOrDefault(this HttpCookieCollection cookies, string cookie, string def)
{
var cook = cookies[cookie];
if (cook != null && !string.IsNullOrEmpty(cook.Value)) return cook.Value;
return def;
}
}
}

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

@ -1,40 +1,45 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Web;
using System.Web.Mvc;
using System.Web.Script.Serialization;
using OnlineEditorsExampleMVC.Helpers;
namespace OnlineEditorsExampleMVC.Models
{
public class FileModel
{
public bool TypeDesktop { get; set; }
public string Mode { get; set; }
public string Type { get; set; }
public string FileUri
{
get { return DocManagerHelper.GetFileUri(FileName); }
get { return DocManagerHelper.GetFileUri(FileName, true); }
}
public string FileUriUser
{
get { return DocManagerHelper.GetFileUri(FileName, false); }
}
public string FileName { get; set; }
@ -46,15 +51,292 @@ namespace OnlineEditorsExampleMVC.Models
public string Key
{
get { return ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + FileName); }
get { return ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + FileName + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(FileName, null)).GetHashCode()); }
}
public string CallbackUrl
{
get
get { return DocManagerHelper.GetCallback(FileName); }
}
public string GetDocConfig(HttpRequest request, UrlHelper url)
{
var jss = new JavaScriptSerializer();
var ext = Path.GetExtension(FileName).ToLower();
var editorsMode = Mode ?? "edit";
var canEdit = DocManagerHelper.EditedExts.Contains(ext);
var mode = canEdit && editorsMode != "view" ? "edit" : "view";
var submitForm = canEdit && (editorsMode.Equals("edit") || editorsMode.Equals("fillForms"));
var userId = request.Cookies.GetOrDefault("uid", "uid-1");
var uname = userId.Equals("uid-0") ? null : request.Cookies.GetOrDefault("uname", "John Smith");
string userGroup = null;
List<string> reviewGroups = null;
if (userId.Equals("uid-2"))
{
return DocManagerHelper.GetCallback(FileName);
userGroup = "group-2";
reviewGroups = new List<string>() { "group-2", "" };
}
if (userId.Equals("uid-3"))
{
userGroup = "group-3";
reviewGroups = new List<string>() { "group-2" };
}
object favorite = null;
if (!string.IsNullOrEmpty(request.Cookies.GetOrDefault("uid", null)))
{
favorite = request.Cookies.GetOrDefault("uid", null).Equals("uid-2");
}
var actionLink = request.GetOrDefault("actionLink", null);
var actionData = string.IsNullOrEmpty(actionLink) ? null : jss.DeserializeObject(actionLink);
var config = new Dictionary<string, object>
{
{ "type", Type ?? "desktop" },
{ "documentType", DocumentType },
{
"document", new Dictionary<string, object>
{
{ "title", FileName },
{ "url", FileUri },
{ "fileType", ext.Trim('.') },
{ "key", Key },
{
"info", new Dictionary<string, object>
{
{ "owner", "Me" },
{ "uploaded", DateTime.Now.ToShortDateString() },
{ "favorite", favorite}
}
},
{
"permissions", new Dictionary<string, object>
{
{ "comment", editorsMode != "view" && editorsMode != "fillForms" && editorsMode != "embedded" && editorsMode != "blockcontent" },
{ "download", true },
{ "edit", canEdit && (editorsMode == "edit" || editorsMode == "filter") || editorsMode == "blockcontent" },
{ "fillForms", editorsMode != "view" && editorsMode != "comment" && editorsMode != "embedded" && editorsMode != "blockcontent" },
{ "modifyFilter", editorsMode != "filter" },
{ "modifyContentControl", editorsMode != "blockcontent" },
{ "review", editorsMode == "edit" || editorsMode == "review" },
{ "reviewGroups", reviewGroups }
}
}
}
},
{
"editorConfig", new Dictionary<string, object>
{
{ "actionLink", actionData },
{ "mode", mode },
{ "lang", request.Cookies.GetOrDefault("ulang", "en") },
{ "callbackUrl", CallbackUrl },
{
"user", new Dictionary<string, object>
{
{ "id", userId },
{ "name", uname },
{ "group", userGroup }
}
},
{
"embedded", new Dictionary<string, object>
{
{ "saveUrl", FileUriUser },
{ "embedUrl", FileUriUser },
{ "shareUrl", FileUriUser },
{ "toolbarDocked", "top" }
}
},
{
"customization", new Dictionary<string, object>
{
{ "about", true },
{ "feedback", true },
{ "forcesave", false },
{ "submitForm", submitForm },
{
"goback", new Dictionary<string, object>
{
{ "url", url.Action("Index", "Home") }
}
}
}
}
}
}
};
if (JwtManager.Enabled)
{
var token = JwtManager.Encode(config);
config.Add("token", token);
}
return jss.Serialize(config);
}
public void GetHistory(out string history, out string historyData)
{
var jss = new JavaScriptSerializer();
var histDir = DocManagerHelper.HistoryDir(DocManagerHelper.StoragePath(FileName, null));
history = null;
historyData = null;
if (DocManagerHelper.GetFileVersion(histDir) > 0)
{
var currentVersion = DocManagerHelper.GetFileVersion(histDir);
var hist = new List<Dictionary<string, object>>();
var histData = new Dictionary<string, object>();
for (var i = 1; i <= currentVersion; i++)
{
var obj = new Dictionary<string, object>();
var dataObj = new Dictionary<string, object>();
var verDir = DocManagerHelper.VersionDir(histDir, i);
var key = i == currentVersion ? Key : File.ReadAllText(Path.Combine(verDir, "key.txt"));
obj.Add("key", key);
obj.Add("version", i);
if (i == 1)
{
var infoPath = Path.Combine(histDir, "createdInfo.json");
if (File.Exists(infoPath))
{
var info = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(infoPath));
obj.Add("created", info["created"]);
obj.Add("user", new Dictionary<string, object>() {
{ "id", info["id"] },
{ "name", info["name"] },
});
}
}
dataObj.Add("key", key);
dataObj.Add("url", i == currentVersion ? FileUri : DocManagerHelper.GetPathUri(Directory.GetFiles(verDir, "prev.*")[0].Substring(HttpRuntime.AppDomainAppPath.Length)));
dataObj.Add("version", i);
if (i > 1)
{
var changes = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(Path.Combine(DocManagerHelper.VersionDir(histDir, i - 1), "changes.json")));
var change = ((Dictionary<string, object>)((ArrayList)changes["changes"])[0]);
obj.Add("changes", changes["changes"]);
obj.Add("serverVersion", changes["serverVersion"]);
obj.Add("created", change["created"]);
obj.Add("user", change["user"]);
var prev = (Dictionary<string, object>)histData[(i - 2).ToString()];
dataObj.Add("previous", new Dictionary<string, object>() {
{ "key", prev["key"] },
{ "url", prev["url"] },
});
dataObj.Add("changesUrl", DocManagerHelper.GetPathUri(Path.Combine(DocManagerHelper.VersionDir(histDir, i - 1), "diff.zip").Substring(HttpRuntime.AppDomainAppPath.Length)));
}
if(JwtManager.Enabled)
{
var token = JwtManager.Encode(dataObj);
dataObj.Add("token", token);
}
hist.Add(obj);
histData.Add((i - 1).ToString(), dataObj);
}
history = jss.Serialize(new Dictionary<string, object>()
{
{ "currentVersion", currentVersion },
{ "history", hist }
});
historyData = jss.Serialize(histData);
}
}
public void GetCompareFileData(out string compareConfig)
{
var jss = new JavaScriptSerializer();
var compareFileUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
{
Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx",
Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx")
};
var dataCompareFile = new Dictionary<string, object>
{
{ "fileType", "docx" },
{ "url", compareFileUrl.ToString() }
};
if (JwtManager.Enabled)
{
var compareFileToken = JwtManager.Encode(dataCompareFile);
dataCompareFile.Add("token", compareFileToken);
}
compareConfig = jss.Serialize(dataCompareFile);
}
public void GetLogoConfig(out string logoUrl)
{
var jss = new JavaScriptSerializer();
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
{
Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "Content\\images\\logo.png"
};
var logoConfig = new Dictionary<string, object>
{
{ "fileType", "png"},
{ "url", mailMergeUrl.ToString()}
};
if (JwtManager.Enabled)
{
var token = JwtManager.Encode(logoConfig);
logoConfig.Add("token", token);
}
logoUrl = jss.Serialize(logoConfig).Replace("{", "").Replace("}", "");
}
public void GetMailMergeConfig(out string dataMailMergeRecipients)
{
var jss = new JavaScriptSerializer();
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
{
Path =
HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx",
Query = "type=csv"
};
var mailMergeConfig = new Dictionary<string, object>
{
{ "fileType", "csv" },
{ "url", mailMergeUrl.ToString()}
};
if (JwtManager.Enabled)
{
var mailmergeToken = JwtManager.Encode(mailMergeConfig);
mailMergeConfig.Add("token", mailmergeToken);
}
dataMailMergeRecipients = jss.Serialize(mailMergeConfig);
}
}
}

View File

@ -1,28 +1,20 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System.Collections.Generic;
using System.IO;
@ -33,20 +25,20 @@ namespace OnlineEditorsExampleMVC.Models
{
public enum FileType
{
Text,
Spreadsheet,
Presentation
Word,
Cell,
Slide
}
public static FileType GetFileType(string fileName)
{
var ext = Path.GetExtension(fileName).ToLower();
if (ExtsDocument.Contains(ext)) return FileType.Text;
if (ExtsSpreadsheet.Contains(ext)) return FileType.Spreadsheet;
if (ExtsPresentation.Contains(ext)) return FileType.Presentation;
if (ExtsDocument.Contains(ext)) return FileType.Word;
if (ExtsSpreadsheet.Contains(ext)) return FileType.Cell;
if (ExtsPresentation.Contains(ext)) return FileType.Slide;
return FileType.Text;
return FileType.Word;
}
public static readonly List<string> ExtsDocument = new List<string>
@ -54,7 +46,7 @@ namespace OnlineEditorsExampleMVC.Models
".doc", ".docx", ".docm",
".dot", ".dotx", ".dotm",
".odt", ".fodt", ".ott", ".rtf", ".txt",
".html", ".htm", ".mht",
".html", ".htm", ".mht", ".xml",
".pdf", ".djvu", ".fb2", ".epub", ".xps"
};

View File

@ -20,6 +20,10 @@
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<Use64BitIISExpress />
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -41,88 +45,55 @@
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.Entity" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="Antlr3.Runtime">
<HintPath>packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
<Reference Include="EntityFramework">
<Private>True</Private>
<HintPath>bin\EntityFramework.dll</HintPath>
<HintPath>packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure">
<Private>True</Private>
<HintPath>bin\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Mvc.FixedDisplayModes">
<Private>True</Private>
<HintPath>bin\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath>
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<Private>True</Private>
<HintPath>bin\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http">
<HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Formatting">
<Private>True</Private>
<HintPath>bin\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest">
</Reference>
<Reference Include="System.Web.Http">
<Private>True</Private>
<HintPath>bin\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.WebHost">
<Private>True</Private>
<HintPath>bin\System.Web.Http.WebHost.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc">
<Private>True</Private>
<HintPath>bin\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<Private>True</Private>
<HintPath>bin\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Providers">
<Private>True</Private>
<HintPath>bin\System.Web.Providers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor">
<Private>True</Private>
<HintPath>bin\System.Web.Razor.dll</HintPath>
<HintPath>packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Web.Helpers">
<Private>True</Private>
<HintPath>bin\System.Web.Helpers.dll</HintPath>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http">
<HintPath>packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.WebHost">
<HintPath>packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc">
<HintPath>packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<HintPath>packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor">
<HintPath>packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages">
<Private>True</Private>
<HintPath>bin\System.Web.WebPages.dll</HintPath>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment">
<Private>True</Private>
<HintPath>bin\System.Web.WebPages.Deployment.dll</HintPath>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor">
<Private>True</Private>
<HintPath>bin\System.Web.WebPages.Razor.dll</HintPath>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<Private>True</Private>
<HintPath>bin\WebGrease.dll</HintPath>
<HintPath>packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -134,8 +105,11 @@
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Helpers\TrackManager.cs" />
<Compile Include="Helpers\DocManagerHelper.cs" />
<Compile Include="Helpers\DocumentConverter.cs" />
<Compile Include="Helpers\JwtManager.cs" />
<Compile Include="Helpers\Utils.cs" />
<Compile Include="Models\FileModel.cs" />
<Compile Include="Models\FileUtility.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@ -146,20 +120,34 @@
<ItemGroup>
<Content Include="Content\editor.css" />
<Content Include="Content\images\alert.png" />
<Content Include="Content\images\block-content-24.png" />
<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\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\slide.ico" />
<Content Include="Content\images\word.ico" />
<Content Include="Content\jquery-ui.css" />
<Content Include="Content\stylesheet.css" />
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="LICENSE.txt" />
<Content Include="LICENSE" />
<Content Include="ReadMe.txt" />
<Content Include="Scripts\jquery-1.8.2.js" />
<Content Include="Scripts\jquery-ui.js" />
@ -178,20 +166,29 @@
<Content Include="licenses\EntityFramework.license" />
<Content Include="licenses\Microsoft.Web.Infrastructure.license" />
<Content Include="licenses\Newtonsoft.Json.license" />
<Content Include="licenses\jquery.license" />
<Content Include="licenses\WebGrease.license" />
<Content Include="web.appsettings.config" />
<Content Include="WebEditor.ashx" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Content Include="assets\AUTHORS.md" />
<Content Include="assets\LICENSE" />
<Content Include="assets\new\new.docx" />
<Content Include="assets\new\new.pptx" />
<Content Include="assets\new\new.xlsx" />
<Content Include="assets\sample\csv.csv" />
<Content Include="assets\sample\sample.docx" />
<Content Include="assets\sample\sample.pptx" />
<Content Include="assets\sample\sample.xlsx" />
<None Include="packages.config" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">16.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
@ -213,10 +210,4 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target> -->
</Project>

View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30523.141
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlineEditorsExampleMVC", "OnlineEditorsExampleMVC.csproj", "{D2C16047-E658-444A-A45D-23CEE79CB8F3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {808AEE5A-E969-411D-8326-9C1F7734DC70}
EndGlobalSection
EndGlobal

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 2018")]
[assembly: AssemblyCopyright("Ascensio System SIA 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

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

View File

@ -1,28 +1,20 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
if (typeof jQuery != "undefined") {
jq = jQuery.noConflict();
@ -37,13 +29,14 @@ if (typeof jQuery != "undefined") {
jq("#step1").addClass("current");
jq("#mainProgress .error-message").hide().find("span").text("");
jq("#mainProgress").removeClass("embedded");
jq("#uploadFileName").text("");
jq.blockUI({
theme: true,
title: "Getting ready to load the file" + "<div class=\"dialog-close\"></div>",
title: "File upload" + "<div class=\"dialog-close\"></div>",
message: jq("#mainProgress"),
overlayCSS: { "background-color": "#aaa" },
themedCSS: { width: "656px", top: "20%", left: "50%", marginLeft: "-328px" }
themedCSS: { width: "539px", top: "20%", left: "50%", marginLeft: "-269px" }
});
jq("#beginEdit, #beginView, #beginEmbedded").addClass("disable");
@ -63,6 +56,8 @@ if (typeof jQuery != "undefined") {
}
jq("#hiddenFileName").val(response.filename);
jq("#uploadFileName").text(response.filename);
jq("#uploadFileName").addClass(response.documentType);
jq("#step1").addClass("done").removeClass("current");
jq("#step2").addClass("current");
@ -70,6 +65,8 @@ if (typeof jQuery != "undefined") {
checkConvert();
}
});
initSelectors();
});
var timer = null;
@ -91,11 +88,6 @@ if (typeof jQuery != "undefined") {
return;
}
if (jq("#checkOriginalFormat").is(":checked")) {
loadScripts();
return;
}
timer = setTimeout(function () {
var requestAddress = UrlConverter
+ "&filename=" + encodeURIComponent(jq("#hiddenFileName").val());
@ -162,6 +154,34 @@ if (typeof jQuery != "undefined") {
}
};
var initSelectors = function () {
var userSel = jq("#user");
var langSel = jq("#language");
function getCookie(name) {
let matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : null;
}
function setCookie(name, value) {
document.cookie = name + "=" + value + "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 7).toUTCString(); //week
}
var userId = getCookie("uid");
if (userId) userSel.val(userId);
var langId = getCookie("ulang");
if (langId) langSel.val(langId);
userSel.on("change", function () {
setCookie("uid", userSel.val());
setCookie("uname", userSel.find("option:selected").text())
});
langSel.on("change", function () {
setCookie("ulang", langSel.val());
});
};
jq(document).on("click", "#beginEdit:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = UrlEditor + "?fileName=" + fileId;
@ -180,7 +200,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
var url = UrlEditor + "?mode=embedded&fileName=" + fileId;
var url = UrlEditor + "?editorsType=embedded&editorsMode=embedded&fileName=" + fileId;
jq("#mainProgress").addClass("embedded");
jq("#beginEmbedded").addClass("disable");
@ -194,8 +214,44 @@ if (typeof jQuery != "undefined") {
jq.unblockUI();
});
jq.dropdownToggle({
switcherSelector: ".question",
dropdownID: "hint"
jq(document).on("click", ".try-editor", function (e) {
var url = jq(".try-editor-list")[0].attributes["data-link"].value;
url += "?fileExt=" + e.target.attributes["data-type"].value;
if (jq("#createSample").is(":checked")) {
url += "&sample=true";
}
var w = window.open(url, "_blank");
w.onload = function () {
window.location.reload();
}
});
jq(document).on("click", ".delete-file", function () {
var requestAddress = "webeditor.ashx"
+ "?type=remove"
+ "&filename=" + encodeURIComponent(jq(this).attr("data-filename"));
jq.ajax({
async: true,
contentType: "text/xml",
url: requestAddress,
complete: function (data) {
document.location.reload();
}
});
});
jq(".info").mouseover(function (event) {
var target = event.target;
var id = target.dataset.id ? target.dataset.id : target.id;
var tooltip = target.dataset.tooltip;
jq("<div class='tooltip'>" + tooltip + "<div class='arrow'></div></div>").appendTo("body");
var top = jq("#" + id).offset().top + jq("#" + id).outerHeight() / 2 - jq("div.tooltip").outerHeight() / 2;
var left = jq("#" + id).offset().left + jq("#" + id).outerWidth() + 20;
jq("div.tooltip").css({ "top": top, "left": left });
}).mouseout(function () {
jq("div.tooltip").remove();
});
}

View File

@ -1,30 +1,4 @@
<!--*
*
* (c) Copyright Ascensio System Limited 2010-2018
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*-->
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage<OnlineEditorsExampleMVC.Models.FileModel>" %>
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage<OnlineEditorsExampleMVC.Models.FileModel>" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="OnlineEditorsExampleMVC.Helpers" %>
@ -35,8 +9,27 @@
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" href="~/favicon.ico" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<!--
*
* (c) Copyright Ascensio System SIA 2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
-->
<link rel="icon" href="<%= "content/images/" + Model.DocumentType + ".ico" %>" type="image/x-icon" />
<title><%= Model.FileName + " - ONLYOFFICE" %></title>
<%: Styles.Render("~/Content/editor") %>
@ -48,20 +41,18 @@
</div>
</div>
<%: Scripts.Render(new []{ WebConfigurationManager.AppSettings["files.docservice.url.api"] }) %>
<%: Scripts.Render(new []{ WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.api"] }) %>
<script type="text/javascript" language="javascript">
var docEditor;
var fileName = "<%= Model.FileName %>";
var fileType = "<%= Path.GetExtension(Model.FileName).Trim('.') %>";
var innerAlert = function (message) {
if (console && console.log)
console.log(message);
};
var onReady = function () {
var onAppReady = function () {
innerAlert("Document editor ready");
};
@ -83,66 +74,93 @@
location.reload(true);
};
var replaceActionLink = function(href, linkParam) {
var link;
var actionIndex = href.indexOf("&actionLink=");
if (actionIndex != -1) {
var endIndex = href.indexOf("&", actionIndex + "&actionLink=".length);
if (endIndex != -1) {
link = href.substring(0, actionIndex) + href.substring(endIndex) + "&actionLink=" + encodeURIComponent(linkParam);
} else {
link = href.substring(0, actionIndex) + "&actionLink=" + encodeURIComponent(linkParam);
}
} else {
link = href + "&actionLink=" + encodeURIComponent(linkParam);
}
return link;
}
var onMakeActionLink = function (event) {
var actionData = event.data;
var linkParam = JSON.stringify(actionData);
docEditor.setActionLink(replaceActionLink(location.href, linkParam));
};
var onMetaChange = function (event) {
var favorite = !!event.data.favorite;
var title = document.title.replace(/^\☆/g, "");
document.title = (favorite ? "☆" : "") + title;
docEditor.setFavorite(favorite);
};
var onRequestInsertImage = function (event) {
<% string logoUrl;%>
<% Model.GetLogoConfig(out logoUrl); %>
docEditor.insertImage({
"c": event.data.c,
<%= logoUrl%>
})
};
var onRequestCompareFile = function () {
<% string compareFileData; %>
<% Model.GetCompareFileData(out compareFileData); %>
docEditor.setRevisedFile(<%=compareFileData%>);
};
var onRequestMailMergeRecipients = function (event) {
<% string dataMailMergeRecipients; %>
<% Model.GetMailMergeConfig(out dataMailMergeRecipients); %>
docEditor.setMailMergeRecipients(<%= dataMailMergeRecipients%>);
};
var config = <%= Model.GetDocConfig(Request, Url) %>;
config.width = "100%";
config.height = "100%";
config.events = {
'onAppReady': onAppReady,
'onDocumentStateChange': onDocumentStateChange,
'onRequestEditRights': onRequestEditRights,
'onError': onError,
'onOutdatedVersion': onOutdatedVersion,
"onMakeActionLink": onMakeActionLink,
"onMetaChange": onMetaChange,
"onRequestInsertImage": onRequestInsertImage,
"onRequestCompareFile": onRequestCompareFile,
"onRequestMailMergeRecipients": onRequestMailMergeRecipients,
};
<% string hist, histData; %>
<% Model.GetHistory(out hist, out histData); %>
<% if (!string.IsNullOrEmpty(hist) && !string.IsNullOrEmpty(histData))
{ %>
config.events['onRequestHistory'] = function () {
docEditor.refreshHistory(<%= hist %>);
};
config.events['onRequestHistoryData'] = function (event) {
var ver = event.data;
var histData = <%= histData %>;
docEditor.setHistoryData(histData[ver - 1]);
};
config.events['onRequestHistoryClose '] = function () {
document.location.reload();
};
<% } %>
var сonnectEditor = function () {
docEditor = new DocsAPI.DocEditor("iframeEditor",
{
width: "100%",
height: "100%",
type: '<%= Request["mode"] != "embedded" ? "desktop" : "embedded" %>',
documentType: "<%= Model.DocumentType %>",
document: {
title: fileName,
url: "<%= Model.FileUri %>",
fileType: fileType,
key: "<%= Model.Key %>",
info: {
author: "Me",
created: "<%= DateTime.Now.ToShortDateString() %>",
},
permissions: {
edit: "<%= DocManagerHelper.EditedExts.Contains(Path.GetExtension(Model.FileName)) %>" == "True",
download: true,
}
},
editorConfig: {
mode: '<%= DocManagerHelper.EditedExts.Contains(Path.GetExtension(Model.FileName)) && Request["mode"] != "view" ? "edit" : "view" %>',
lang: "en",
callbackUrl: "<%= Model.CallbackUrl %>",
user: {
id: "<%= DocManagerHelper.CurUserHostAddress() %>",
name: "John Smith",
},
embedded: {
saveUrl: "<%= Model.FileUri %>",
embedUrl: "<%= Model.FileUri %>",
shareUrl: "<%= Model.FileUri %>",
toolbarDocked: "top",
},
customization: {
about: true,
feedback: true,
goback: {
url: "<%= Url.Action("Index", "Home") %>",
},
},
},
events: {
'onReady': onReady,
'onDocumentStateChange': onDocumentStateChange,
'onRequestEditRights': onRequestEditRights,
'onError': onError,
'onOutdatedVersion': onOutdatedVersion,
}
});
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};
if (window.addEventListener) {

View File

@ -1,41 +1,33 @@
<!--*
*
* (c) Copyright Ascensio System Limited 2010-2018
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*-->
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="OnlineEditorsExampleMVC.Helpers" %>
<%@ Import Namespace="OnlineEditorsExampleMVC.Models" %>
<!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width" />
<!--
*
* (c) Copyright Ascensio System SIA 2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
-->
<title>ONLYOFFICE</title>
<link href="<%: Url.Content("~/favicon.ico") %>" rel="shortcut icon" type="image/x-icon" />
@ -45,88 +37,275 @@
<%: Styles.Render("~/Content/css") %>
</head>
<body>
<div class="top-panel"></div>
<div class="main-panel">
<span class="portal-name">ONLYOFFICE Document Editors</span>
<br />
<br />
<span class="portal-descr">Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors. You may upload your own documents for testing using the "Choose file" button and selecting the necessary files on your PC.</span>
<div class="file-upload button gray">
<span>Choose file</span>
<input type="file" id="fileupload" name="files[]" data-url="<%= Url.Content("~/webeditor.ashx?type=upload") %>" />
<header>
<div class="center">
<a href="">
<img src ="content/images/logo.svg" alt="ONLYOFFICE" />
</a>
</div>
<label class="save-original">
<input type="checkbox" id="checkOriginalFormat" class="checkbox" />Save document in original format
</label>
<span class="question"></span>
<br />
<br />
<br />
<span class="try-descr">You are also enabled to view and edit documents pre-uploaded to the portal.</span>
</header>
<ul class="try-editor-list">
<li><a class="try-editor document" href="<%= Url.Action("sample", "Home", new { fileExt = "docx" }) %>" target="_blank">Create<br />Sample Document</a></li>
<li><a class="try-editor spreadsheet" href="<%= Url.Action("sample", "Home", new { fileExt = "xlsx" }) %>" target="_blank">Create<br />Sample Spreadsheet</a></li>
<li><a class="try-editor presentation" href="<%= Url.Action("sample", "Home", new { fileExt = "pptx" }) %>" target="_blank">Create<br />Sample Presentation</a></li>
</ul>
<div class="center main">
<table class="table-main">
<tbody>
<tr>
<td class="left-panel section">
<div class="help-block">
<span>Create new</span>
<div class="clearFix">
<div class="create-panel">
<ul class="try-editor-list clearFix" data-link="<%= Url.Action("sample", "Home") %>">
<li>
<a class="try-editor word" data-type="docx">Document</a>
</li>
<li>
<a class="try-editor cell" data-type="xlsx">Spreadsheet</a>
</li>
<li>
<a class="try-editor slide" data-type="pptx">Presentation</a>
</li>
</ul>
<label class="create-sample">
<input id="createSample" class="checkbox" type="checkbox" />With sample content
</label>
</div>
<br />
<br />
<br />
<div class="help-block">
<span>Want to learn how it works?</span>
<br />
Read the editor <a href="http://api.onlyoffice.com/editors/howitworks">API Documentation</a>
</div>
<br />
<br />
<br />
<div class="help-block">
<span>Any questions?</span>
<br />
Please, <a href="mailto:sales@onlyoffice.com">submit your request</a> and we'll help you shortly.
</div>
</div>
<div class="upload-panel clearFix">
<a class="file-upload">Upload file
<input type="file" id="fileupload" name="files[]" data-url="<%= Url.Content("~/webeditor.ashx?type=upload") %>" />
</a>
</div>
</div>
<table class="user-block-table" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="middle">
<span class="select-user">Username</span>
<img 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" src="content/images/info.svg" />
<select class="select-user" id="user">
<option value="uid-1">John Smith</option>
<option value="uid-2">Mark Pottato</option>
<option value="uid-3">Hamish Mitchell</option>
<option value="uid-0">anonymous</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" />
<select class="select-user" id="language">
<option value="en">English</option>
<option value="be">Belarusian</option>
<option value="bg">Bulgarian</option>
<option value="ca">Catalan</option>
<option value="zh">Chinese</option>
<option value="cs">Czech</option>
<option value="da">Danish</option>
<option value="nl">Dutch</option>
<option value="fi">Finnish</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="el">Greek</option>
<option value="hu">Hungarian</option>
<option value="id">Indonesian</option>
<option value="it">Italian</option>
<option value="ja">Japanese</option>
<option value="ko">Korean</option>
<option value="lv">Latvian</option>
<option value="lo">Lao</option>
<option value="nb">Norwegian</option>
<option value="pl">Polish</option>
<option value="pt">Portuguese</option>
<option value="ro">Romanian</option>
<option value="ru">Russian</option>
<option value="sk">Slovak</option>
<option value="sl">Slovenian</option>
<option value="sv">Swedish</option>
<option value="es">Spanish</option>
<option value="tr">Turkish</option>
<option value="uk">Ukrainian</option>
<option value="vi">Vietnamese</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</td>
<td class="section">
<div class="main-panel">
<% var storedFiles = DocManagerHelper.GetStoredFiles();
if (!storedFiles.Any())
{ %>
<span class="portal-name">ONLYOFFICE Document Editors Welcome!</span>
<span class="portal-descr">
Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
<br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
</span>
<% }
else
{ %>
<div class="stored-list">
<span class="header-list">Your documents</span>
<table class="tableHeader" cellspacing="0" cellpadding="0" width="100%">
<thead>
<tr>
<td class="tableHeaderCell tableHeaderCellFileName">Filename</td>
<td class="tableHeaderCell tableHeaderCellEditors contentCells-shift">Editors</td>
<td class="tableHeaderCell tableHeaderCellViewers">Viewers</td>
<td class="tableHeaderCell tableHeaderCellDownload">Download</td>
<td class="tableHeaderCell tableHeaderCellRemove">Remove</td>
</tr>
</thead>
</table>
<div class="scroll-table-body">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<% foreach (var storedFile in storedFiles)
{
var editUrl = "doceditor.aspx?fileID=" + HttpUtility.UrlEncode(storedFile.Name);
var docType = FileUtility.GetFileType(storedFile.Name).ToString().ToLower(); %>
<div id="hint">
<div class="corner"></div>
If you check this option the file will be saved both in the original and converted into Office Open XML format for faster viewing and editing. In other case the document will be overwritten by its copy in Office Open XML format.
<tr class="tableRow" title="<%= storedFile.Name %>">
<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>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "edit" }) %>" target="_blank">
<img src="content/images/desktop-24.png" alt="Open in editor for full size screens" title="Open in editor for full size screens"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "edit" }) %>" target="_blank">
<img src="content/images/mobile-24.png" 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-24.png" 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-24.png" 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">
<img src="content/images/comment-24.png" 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-24.png" 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") { %>
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "blockcontent" }) %>" target="_blank">
<img src="content/images/block-content-24.png" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
</a>
<% } %>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "view" }) %>" target="_blank">
<img src="content/images/desktop-24.png" alt="Open in viewer for full size screens" title="Open in viewer for full size screens"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "view" }) %>" target="_blank">
<img src="content/images/mobile-24.png" alt="Open in viewer for mobile devices" title="Open in viewer for mobile devices"/>
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "embedded", editorsMode = "embedded" }) %>" target="_blank">
<img src="content/images/embeded-24.png" alt="Open in embedded mode" title="Open in embedded mode"/>
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<a href="webeditor.ashx?type=download&filename=<%= HttpUtility.UrlEncode(storedFile.Name) %>">
<img class="icon-download" src="content/images/download-24.png" alt="Download" title="Download" />
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<a class="delete-file" data-filename="<%= storedFile.Name %>">
<img class="icon-delete" src="content/images/delete-24.png" alt="Delete" title="Delete" />
</a>
</td>
</tr>
<% } %>
</tbody>
</table>
</div>
</div>
<% } %>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="mainProgress">
<div id="uploadSteps">
<span id="step1" class="step">1. Loading the file</span>
<span class="step-descr">The file loading process will take some time depending on the file size, presence or absence of additional elements in it (macros, etc.) and the connection speed.</span>
<span id="uploadFileName" class="uploadFileName"></span>
<div class="describeUpload">After these steps are completed, you can work with your document.</div>
<span id="step1" class="step">1. Loading the file.</span>
<span class="step-descr">The loading speed depends on file size and additional elements it contains.</span>
<br />
<span id="step2" class="step">2. File conversion</span>
<span class="step-descr">The file is being converted into Office Open XML format for the document faster viewing and editing.</span>
<span id="step2" class="step">2. Conversion.</span>
<span class="step-descr">The file is converted to OOXML so that you can edit it.</span>
<br />
<span id="step3" class="step">3. Loading editor scripts</span>
<span class="step-descr">The scripts for the editor are loaded only once and are will be cached on your computer in future. It might take some time depending on the connection speed.</span>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<br />
<span class="progress-descr">Please note, that the speed of all operations greatly depends on the server and the client locations. In case they differ or are located in differernt countries/continents, there might be lack of speed and greater wait time. The best results are achieved when the server and client computers are located in one and the same place (city).</span>
<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">
<span></span>
<b>Upload error: </b><span></span>
<br />
Please select another file and try again. If you have questions please <a href="mailto:sales@onlyoffice.com">contact us.</a>
Please select another file and try again.
</div>
</div>
<iframe id="embeddedView" src="" height="345px" width="600px" frameborder="0" scrolling="no" allowtransparency></iframe>
<iframe id="embeddedView" src="" height="345px" width="432px" frameborder="0" scrolling="no" allowtransparency></iframe>
<br />
<div id="beginEmbedded" class="button disable">Embedded view</div>
<div id="beginView" class="button disable">View</div>
<div id="beginEdit" class="button disable">Edit</div>
<div id="beginView" class="button gray disable">View</div>
<div id="beginEmbedded" class="button gray disable">Embedded view</div>
<div id="cancelEdit" class="button gray">Cancel</div>
</div>
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span>
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span>
<div class="bottom-panel">&copy; Ascensio System SIA <%= DateTime.Now.Year.ToString() %>. All rights reserved.</div>
<footer>
<div class="center">
<table>
<tbody>
<tr>
<td>
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
</td>
<td>
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
</td>
<td class="copy">
&copy; Ascensio System SIA <%= DateTime.Now.Year.ToString() %>. All rights reserved.
</td>
</tr>
</tbody>
</table>
</div>
</footer>
<%: Scripts.Render("~/bundles/jquery", "~/bundles/scripts") %>

View File

@ -3,6 +3,23 @@
<html>
<head>
<meta name="viewport" content="width=device-width" />
<!--
*
* (c) Copyright Ascensio System SIA 2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
-->
<title>Error</title>
</head>
<body>

View File

@ -6,7 +6,7 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings configSource="web.appsettings.config" />
<system.web>
@ -26,16 +26,35 @@
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="1.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>

View File

@ -1,38 +1,33 @@
/*
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2021
*
* The MIT License (MIT)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* http://www.apache.org/licenses/LICENSE-2.0
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Services;
using System.Web.Configuration;
using OnlineEditorsExampleMVC.Helpers;
using OnlineEditorsExampleMVC.Models;
using System.Diagnostics;
namespace OnlineEditorsExampleMVC
{
@ -47,12 +42,27 @@ namespace OnlineEditorsExampleMVC
case "upload":
Upload(context);
break;
case "download":
Download(context);
break;
case "convert":
Convert(context);
break;
case "track":
Track(context);
break;
case "remove":
Remove(context);
break;
case "assets":
Assets(context);
break;
case "csv":
GetCsv(context);
break;
case "files":
Files(context);
break;
}
}
@ -87,11 +97,13 @@ namespace OnlineEditorsExampleMVC
}
fileName = DocManagerHelper.GetCorrectName(fileName);
var documentType = FileUtility.GetFileType(fileName).ToString().ToLower();
var savedFileName = DocManagerHelper.StoragePath(fileName);
httpPostedFile.SaveAs(savedFileName);
DocManagerHelper.CreateMeta(fileName, context.Request.Cookies.GetOrDefault("uid", ""), context.Request.Cookies.GetOrDefault("uname", ""));
context.Response.Write("{ \"filename\": \"" + fileName + "\"}");
context.Response.Write("{ \"filename\": \"" + fileName + "\", \"documentType\": \"" + documentType + "\"}");
}
catch (Exception e)
{
@ -104,10 +116,10 @@ namespace OnlineEditorsExampleMVC
context.Response.ContentType = "text/plain";
try
{
var fileName = context.Request["filename"];
var fileUri = DocManagerHelper.GetFileUri(fileName);
var fileName = Path.GetFileName(context.Request["filename"]);
var fileUri = DocManagerHelper.GetFileUri(fileName, true);
var extension = (Path.GetExtension(fileUri) ?? "").Trim('.');
var extension = (Path.GetExtension(fileUri).ToLower() ?? "").Trim('.');
var internalExtension = DocManagerHelper.GetInternalExtension(FileUtility.GetFileType(fileName)).Trim('.');
if (DocManagerHelper.ConvertExts.Contains("." + extension)
@ -115,8 +127,16 @@ namespace OnlineEditorsExampleMVC
{
var key = ServiceConverter.GenerateRevisionId(fileUri);
var downloadUri = new UriBuilder(DocManagerHelper.GetServerUrl(true))
{
Path = HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "webeditor.ashx",
Query = "type=download&fileName=" + HttpUtility.UrlEncode(fileName)
};
string newFileUri;
var result = ServiceConverter.GetConvertedUri(fileUri, extension, internalExtension, key, true, out newFileUri);
var result = ServiceConverter.GetConvertedUri(downloadUri.ToString(), extension, internalExtension, key, true, out newFileUri);
if (result != 100)
{
context.Response.Write("{ \"step\" : \"" + result + "\", \"filename\" : \"" + fileName + "\"}");
@ -143,11 +163,13 @@ namespace OnlineEditorsExampleMVC
}
}
File.Delete(DocManagerHelper.StoragePath(fileName));
Remove(fileName);
fileName = correctName;
DocManagerHelper.CreateMeta(fileName, context.Request.Cookies.GetOrDefault("uid", ""), context.Request.Cookies.GetOrDefault("uname", ""));
}
context.Response.Write("{ \"filename\" : \"" + fileName + "\"}");
var documentType = FileUtility.GetFileType(fileName).ToString().ToLower();
context.Response.Write("{ \"filename\" : \"" + fileName + "\", \"documentType\": \"" + documentType + "\" }");
}
catch (Exception e)
{
@ -162,69 +184,174 @@ namespace OnlineEditorsExampleMVC
MustSave = 2,
Corrupted = 3,
Closed = 4,
MustForceSave = 6,
CorruptedForceSave = 7
}
private static void Track(HttpContext context)
{
var fileData = TrackManager.readBody(context);
var userAddress = context.Request["userAddress"];
var fileName = context.Request["fileName"];
var fileName = Path.GetFileName(context.Request["fileName"]);
var status = (TrackerStatus) (int) fileData["status"];
var saved = 1;
switch (status)
{
case TrackerStatus.Editing:
try
{
var jss = new JavaScriptSerializer();
var actions = jss.Deserialize <List<object>> (jss.Serialize(fileData["actions"]));
var action = jss.Deserialize <Dictionary<string, object>> (jss.Serialize(actions[0]));
if (action != null && action["type"].ToString().Equals("0"))
{
var user = action["userid"].ToString();
var users = jss.Deserialize<List<object>>(jss.Serialize(fileData["users"]));
if (!users.Contains(user))
{
TrackManager.commandRequest("forcesave", fileData["key"].ToString());
}
var storagePath = DocManagerHelper.StoragePath(fileName, userAddress);
}
}
catch (Exception e)
{
Debug.Print(e.StackTrace);
}
break;
string body;
case TrackerStatus.MustSave:
case TrackerStatus.Corrupted:
try
{
saved = TrackManager.processSave(fileData, fileName, userAddress);
}
catch (Exception)
{
saved = 1;
}
context.Response.Write("{\"error\":" + saved + "}");
return;
case TrackerStatus.MustForceSave:
case TrackerStatus.CorruptedForceSave:
try
{
saved = TrackManager.processForceSave(fileData, fileName, userAddress);
}
catch (Exception)
{
saved = 1;
}
context.Response.Write("{\"error\":" + saved + "}");
return;
}
context.Response.Write("{\"error\":0}");
}
private static void Remove(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
var fileName = Path.GetFileName(context.Request["fileName"]);
Remove(fileName);
context.Response.Write("{ \"success\": true }");
}
catch (Exception e)
{
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
}
}
private static void Remove(string fileName)
{
var path = DocManagerHelper.StoragePath(fileName, null);
var histDir = DocManagerHelper.HistoryDir(path);
if (File.Exists(path)) File.Delete(path);
if (Directory.Exists(histDir)) Directory.Delete(histDir, true);
}
private static void Files(HttpContext context)
{
List<Dictionary<string, object>> files = null;
try
{
var jss = new JavaScriptSerializer();
context.Response.ContentType = "application/json";
if (context.Request["fileId"] == null)
{
body = readStream.ReadToEnd();
files = DocManagerHelper.GetFilesInfo();
context.Response.Write(jss.Serialize(files));
}
else
{
var fileId = context.Request["fileId"];
files = DocManagerHelper.GetFilesInfo(fileId);
if (files.Count == 0)
{
context.Response.Write("\"File not found\"");
}
else
{
context.Response.Write(jss.Serialize(files));
}
}
}
catch (Exception e)
{
throw new HttpException((int) HttpStatusCode.BadRequest, e.Message);
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
}
}
var jss = new JavaScriptSerializer();
if (string.IsNullOrEmpty(body)) return;
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
var status = (TrackerStatus) (int) fileData["status"];
private static void Assets(HttpContext context)
{
var fileName = Path.GetFileName(context.Request["filename"]);
var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName;
download(filePath, context);
}
switch (status)
private static void GetCsv(HttpContext context)
{
var fileName = "csv.csv";
var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName;
download(filePath, context);
}
private static void Download(HttpContext context)
{
try
{
case TrackerStatus.MustSave:
case TrackerStatus.Corrupted:
var downloadUri = (string) fileData["url"];
var fileName = Path.GetFileName(context.Request["filename"]);
var req = (HttpWebRequest) WebRequest.Create(downloadUri);
var saved = 1;
try
{
using (var stream = req.GetResponse().GetResponseStream())
{
if (stream == null) throw new Exception("stream is null");
const int bufferSize = 4096;
using (var fs = File.Open(storagePath, FileMode.Create))
{
var buffer = new byte[bufferSize];
int readed;
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
{
fs.Write(buffer, 0, readed);
}
}
}
}
catch (Exception)
{
saved = 0;
}
break;
var filePath = DocManagerHelper.ForcesavePath(fileName, null, false);
if (filePath.Equals(""))
{
filePath = DocManagerHelper.StoragePath(fileName, null);
}
download(filePath, context);
}
context.Response.Write("{\"error\":0}");
catch (Exception)
{
context.Response.Write("{ \"error\": \"File not found!\"}");
}
}
private static void download(string filePath, HttpContext context)
{
var fileinf = new FileInfo(filePath);
context.Response.AddHeader("Content-Length", fileinf.Length.ToString());
context.Response.AddHeader("Content-Type", MimeMapping.GetMimeMapping(filePath));
var tmp = HttpUtility.UrlEncode(Path.GetFileName(filePath));
tmp = tmp.Replace("+", "%20");
context.Response.AddHeader("Content-Disposition", "attachment; filename*=UTF-8\'\'" + tmp);
context.Response.TransmitFile(filePath);
}
public bool IsReusable

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 144 KiB

View File

@ -0,0 +1,37 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
License File: EntityFramework.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
License: MS-EULA License
License File: Microsoft.Web.Infrastructure.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
License: MIT
License File: Newtonsoft.Json.license
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
License: MICROSOFT .NET LIBRARY LICENSE
License File: WebGrease.license

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,16 @@
<?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" />
</packages>

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