mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
Compare commits
155 Commits
v99.99.99.
...
feature/ja
| Author | SHA1 | Date | |
|---|---|---|---|
| c4de5afd4b | |||
| f6e04d5ab9 | |||
| 925c6e96fc | |||
| bf873519de | |||
| 0df41b9e36 | |||
| 00296b90c8 | |||
| 3eae49253f | |||
| c8d28ec950 | |||
| 403ff78807 | |||
| bfa121f343 | |||
| f38e2779be | |||
| afdd56388c | |||
| c73eece042 | |||
| e8a68fad5a | |||
| 8701cc53e9 | |||
| 5a214b80d9 | |||
| f231b1cd72 | |||
| 1654d4978f | |||
| 86bf4d083a | |||
| 540a8ea98b | |||
| 729c67ab8f | |||
| 3d529bf57c | |||
| 7f2dfc37d4 | |||
| 6c386f852d | |||
| 7469285d0c | |||
| 863eee6db7 | |||
| 74ff4cec88 | |||
| 209881f280 | |||
| 32b4c49f6e | |||
| 9545bd4375 | |||
| 2bc8081b04 | |||
| 9ce708913b | |||
| 0db101a270 | |||
| 5660b1f1c2 | |||
| ef294de17f | |||
| 1759180e13 | |||
| 1ef8d40b50 | |||
| 8f9d99faf8 | |||
| 0d0ecc73f8 | |||
| 2166b31858 | |||
| 3117231ac8 | |||
| 0b61d7ff21 | |||
| cda6534e5b | |||
| c51e3b8837 | |||
| a18a5ee73f | |||
| 07b7615efd | |||
| a0651092f7 | |||
| aba434f46d | |||
| edb43ab59d | |||
| dabd5816f1 | |||
| 0c7eabdf3c | |||
| 11ef9d8a80 | |||
| eb9e9f7db4 | |||
| eb0a556333 | |||
| 1f661f588b | |||
| b6577bd184 | |||
| 5e1e23176c | |||
| 6045fefe43 | |||
| 68f73f543a | |||
| ff745e0b71 | |||
| b7e267842f | |||
| dc54716171 | |||
| 60376861ce | |||
| 108f655fec | |||
| 4a5da5ee4e | |||
| 6a10d55e2b | |||
| af53ccb534 | |||
| acf09aa5ef | |||
| 36866764ce | |||
| b1df939a1a | |||
| 307f15581b | |||
| ada58ecb95 | |||
| c78f1bd2ce | |||
| 91643fe247 | |||
| 538666f6c1 | |||
| 9402f769c6 | |||
| 94f4995f3b | |||
| bb736d85f8 | |||
| 721f2fbf6c | |||
| bb22b73431 | |||
| 704d8bceb9 | |||
| 74097ec485 | |||
| e15d9a3163 | |||
| 0dd9cbca36 | |||
| cd47a8e0de | |||
| cf1541bf3a | |||
| fe0d985555 | |||
| d533cca184 | |||
| 9aa6e58bfc | |||
| 537d7eaeb9 | |||
| 0d894df803 | |||
| b93338d5e9 | |||
| 8c18df7e4c | |||
| 5b5593240f | |||
| 770b8bbe70 | |||
| dd0987a6fc | |||
| 70affcc0e8 | |||
| ceacac691d | |||
| a5e8db73f8 | |||
| 05f22b9e24 | |||
| 84936a506f | |||
| 501fbeacaf | |||
| 71c937ae37 | |||
| 71bcc65522 | |||
| 345e272cbb | |||
| 9116eae2a1 | |||
| e8b384f49a | |||
| 8cf84391c0 | |||
| 13554abfcb | |||
| f5e279ca11 | |||
| 9395d183b0 | |||
| 09600d91c2 | |||
| dec01fe8b2 | |||
| 46d308c1b8 | |||
| a7552677eb | |||
| c585e30eb8 | |||
| 4af422acb3 | |||
| 6bac7ffc5b | |||
| b6a9a4ba77 | |||
| 76ee327af8 | |||
| 2df44605c3 | |||
| 888fb0e12c | |||
| f1c4e8d875 | |||
| f394be17a4 | |||
| ebd306d2b2 | |||
| 2447aaef12 | |||
| ed586de8c8 | |||
| a759f97508 | |||
| f40f1a4704 | |||
| 88e541971e | |||
| 6239e05032 | |||
| 30c541d119 | |||
| e25f957605 | |||
| 5c0c2f7baa | |||
| 974e728d8b | |||
| e4984f4c3e | |||
| 14dabe7789 | |||
| 18de6a1616 | |||
| 983fa34c9f | |||
| 95a28b15b4 | |||
| 5ca511d838 | |||
| 6290abf5dd | |||
| d11115e452 | |||
| 649e167916 | |||
| aaf8ac5328 | |||
| 11bbbebec1 | |||
| 27f21fd6f5 | |||
| e76faa4671 | |||
| 4d7fe321ba | |||
| aeda04b9e7 | |||
| 699370936a | |||
| ba95202084 | |||
| 2f72904deb | |||
| cd033ac3bd | |||
| 6b9e5503c3 |
2
.github/workflows/artifact-csharp-mvc.yml
vendored
2
.github/workflows/artifact-csharp-mvc.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
rsync -av --exclude='deploy' ./ ./deploy/'DotNet (Csharp MVC) Example'
|
||||
rm -rf ./deploy/'DotNet (Csharp MVC) Example'/assets/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: DotNet.Csharp.MVC.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/csharp-mvc/deploy
|
||||
2
.github/workflows/artifact-csharp.yml
vendored
2
.github/workflows/artifact-csharp.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
rsync -av --exclude='deploy' ./ ./deploy/'DotNet (Csharp) Example'
|
||||
rm -rf ./deploy/'DotNet (Csharp) Example'/assets/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: DotNet.Csharp.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/csharp/deploy
|
||||
2
.github/workflows/artifact-java.yml
vendored
2
.github/workflows/artifact-java.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
rm -rf ./deploy/'Java Example'/src/main/resources/assets/document-formats/.git
|
||||
rm -rf ./deploy/'Java Example'/src/main/resources/assets/document-templates/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Java.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/java/deploy
|
||||
2
.github/workflows/artifact-node.yml
vendored
2
.github/workflows/artifact-node.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
rm -rf ./deploy/'Node.js Example'/public/assets/document-formats/.git
|
||||
rm -rf ./deploy/'Node.js Example'/public/assets/document-templates/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Node.js.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/nodejs/deploy
|
||||
2
.github/workflows/artifact-php.yml
vendored
2
.github/workflows/artifact-php.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
rm -rf ./deploy/'PHP Example'/assets/document-formats/.git
|
||||
rm -rf ./deploy/'PHP Example'/assets/document-templates/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: PHP.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/php/deploy
|
||||
2
.github/workflows/artifact-python.yml
vendored
2
.github/workflows/artifact-python.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
rm -rf ./deploy/'Python Example'/assets/document-formats/.git
|
||||
rm -rf ./deploy/'Python Example'/assets/document-templates/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Python.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/python/deploy
|
||||
2
.github/workflows/artifact-ruby.yml
vendored
2
.github/workflows/artifact-ruby.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
rm -rf ./deploy/'Ruby Example'/public/assets/document-formats/.git
|
||||
rm -rf ./deploy/'Ruby Example'/public/assets/document-templates/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Ruby.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/ruby/deploy
|
||||
2
.github/workflows/artifact-spring.yml
vendored
2
.github/workflows/artifact-spring.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
rm -rf ./deploy/'Java Spring Example'/src/main/resources/assets/document-formats/.git
|
||||
rm -rf ./deploy/'Java Spring Example'/src/main/resources/assets/document-templates/.git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Java.Spring.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/java-spring/deploy
|
||||
27
.github/workflows/create-tag.yml
vendored
Normal file
27
.github/workflows/create-tag.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: Create Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- '**/AUTHORS.md'
|
||||
- '**/LICENSE'
|
||||
- '**/README.md'
|
||||
|
||||
jobs:
|
||||
create-tag:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Get Info
|
||||
run: |
|
||||
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
|
||||
id: info
|
||||
- name: Create Tag
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
git tag -a 'v${{ steps.info.outputs.version }}' -m 'Release/v${{ steps.info.outputs.version }}'
|
||||
git push origin 'v${{ steps.info.outputs.version }}'
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@ -2,7 +2,8 @@ name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -5,7 +5,6 @@
|
||||
[submodule "web/documentserver-example/nodejs/public/assets/document-formats"]
|
||||
path = web/documentserver-example/nodejs/public/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/csharp-mvc/assets/document-templates"]
|
||||
path = web/documentserver-example/csharp-mvc/assets/document-templates
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
@ -13,7 +12,6 @@
|
||||
[submodule "web/documentserver-example/csharp-mvc/assets/document-formats"]
|
||||
path = web/documentserver-example/csharp-mvc/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/php/assets/document-templates"]
|
||||
path = web/documentserver-example/php/assets/document-templates
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
@ -21,7 +19,6 @@
|
||||
[submodule "web/documentserver-example/php/assets/document-formats"]
|
||||
path = web/documentserver-example/php/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/python/assets/document-templates"]
|
||||
path = web/documentserver-example/python/assets/document-templates
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
@ -45,19 +42,15 @@
|
||||
[submodule "web/documentserver-example/go/static/assets/document-formats"]
|
||||
path = web/documentserver-example/go/static/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/python/assets/document-formats"]
|
||||
path = web/documentserver-example/python/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/ruby/assets/document-formats"]
|
||||
path = web/documentserver-example/ruby/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/java/src/main/resources/assets/document-formats"]
|
||||
path = web/documentserver-example/java/src/main/resources/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/csharp/assets/document-templates"]
|
||||
path = web/documentserver-example/csharp/assets/document-templates
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
@ -65,7 +58,6 @@
|
||||
[submodule "web/documentserver-example/csharp/assets/document-formats"]
|
||||
path = web/documentserver-example/csharp/assets/document-formats
|
||||
url = https://github.com/ONLYOFFICE/document-formats
|
||||
branch = feature/diagram
|
||||
[submodule "web/documentserver-example/php-laravel/public/assets/document-templates"]
|
||||
path = web/documentserver-example/php-laravel/public/assets/document-templates
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
|
||||
@ -361,6 +361,41 @@ License: MIT
|
||||
License File: serializer.license
|
||||
|
||||
|
||||
web/documentserver-example/php-laravel
|
||||
|
||||
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 - 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.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
|
||||
License: OpenJS
|
||||
License File: jQuery.Migrate.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
JWT - PHP package for JWT (https://github.com/firebase/php-jwt/blob/main/LICENSE)
|
||||
License: BSD-3-Clause
|
||||
License File: jwt.license
|
||||
|
||||
Laravel - Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things. (https://github.com/laravel/framework/blob/master/LICENSE.md)
|
||||
License - MIT
|
||||
License File - laravel.license
|
||||
|
||||
|
||||
web/documentserver-example/python
|
||||
|
||||
django-stubs - PEP-484 stubs for Django. (https://github.com/typeddjango/django-stubs/blob/master/LICENSE.md)
|
||||
|
||||
22
CHANGELOG.md
22
CHANGELOG.md
@ -1,8 +1,28 @@
|
||||
# Change Log
|
||||
|
||||
- update demo files
|
||||
- set users by parts
|
||||
- open the conversion dialog box with a gray check mark on the type selection step
|
||||
- preload frame moved from uploading popap
|
||||
- change tab title on rename
|
||||
- change uploaded file name in popap if converted
|
||||
- php-laravel: fix custom jwt header
|
||||
- features tips for anonymous
|
||||
- view odg, md
|
||||
- edit xlsb
|
||||
- support vsdx in diagram editor
|
||||
|
||||
## 1.14.0
|
||||
- nodejs: set users by parts
|
||||
- nodejs: preload frame moved from uploading popap
|
||||
- nodejs: view odg, md
|
||||
- nodejs: edit xlsb
|
||||
- nodejs: support vsdx in diagram editor
|
||||
- nodejs: fix wopi verification
|
||||
- nodejs: user role
|
||||
- nodejs: start filling
|
||||
- support vsdx in diagram editor
|
||||
- ur skin language
|
||||
- change preload.html address
|
||||
|
||||
## 1.13.0
|
||||
- nodejs: rename in wopi
|
||||
|
||||
@ -5,7 +5,7 @@ Do NOT use these integration examples on your own server without proper code mod
|
||||
In case you enabled any of the test examples, disable it before going for production.
|
||||
|
||||
These examples show the way to integrate [ONLYOFFICE Docs][2] into your own website or application using one of the programming languages.
|
||||
The package contains examples written in .Net (C# MVC), .Net (C#), Java, Java Spring, Node.js, PHP, Python and Ruby.
|
||||
The package contains examples written in .Net (C# MVC), .Net (C#), Go, Java, Java Spring, Node.js, PHP, PHP (Laravel), Python and Ruby.
|
||||
|
||||
You should change `http://documentserver` to your server address in these files:
|
||||
* [.Net (C# MVC)](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/csharp-mvc) - `web/documentserver-example/csharp-mvc/web.appsettings.config`
|
||||
@ -15,10 +15,11 @@ You should change `http://documentserver` to your server address in these files:
|
||||
* [Java Spring](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/java-spring) - `web/documentserver-example/java-spring/src/main/resources/application.properties`
|
||||
* [Node.js](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/nodejs) - `web/documentserver-example/nodejs/config/default.json`
|
||||
* [PHP](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/php) - `web/documentserver-example/php/src/configuration/ConfigurationManager.php`
|
||||
* [PHP (Laravel)](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/php-laravel) - `web/documentserver-example/php-laravel/.env.example`
|
||||
* [Python](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/python) - `web/documentserver-example/python/src/configuration/configuration.py`
|
||||
* [Ruby](https://github.com/ONLYOFFICE/document-server-integration/tree/master/web/documentserver-example/ruby) - `web/documentserver-example/ruby/app/configuration/configuration.rb`
|
||||
|
||||
More information on how to use these examples can be found here: [http://api.onlyoffice.com/editors/demopreview](http://api.onlyoffice.com/editors/demopreview "http://api.onlyoffice.com/editors/demopreview")
|
||||
More information on how to use these examples can be found here: [https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/](https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/)
|
||||
|
||||
## API methods for test examples
|
||||
|
||||
|
||||
@ -511,10 +511,6 @@ label .checkbox {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
||||
@ -26,11 +26,11 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
static List<string> descr_user_1 = new List<string>()
|
||||
{
|
||||
"File author by default",
|
||||
"Doesn’t belong to any group",
|
||||
"Doesn't belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"Can see the information about all users",
|
||||
"This file isn’t marked as favorite",
|
||||
"This file isn't marked as favorite",
|
||||
"Can create files from templates using data from the editor",
|
||||
"Has an avatar",
|
||||
"Can submit forms"
|
||||
@ -41,11 +41,11 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
"Belongs to Group2",
|
||||
"Can review only his own changes or changes made by users with no group",
|
||||
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
|
||||
"Can see the information about users from Group2 and users who don’t belong to any group",
|
||||
"Can see the information about users from Group2 and users who don't belong to any group",
|
||||
"This file is marked as favorite",
|
||||
"Can create new files from the editor",
|
||||
"Has an avatar",
|
||||
"Can’t submit forms"
|
||||
"Can't submit forms"
|
||||
};
|
||||
|
||||
static List<string> descr_user_3 = new List<string>()
|
||||
@ -55,11 +55,11 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
"Can view comments left by Group2 and Group3 users. Can edit comments left by the Group2 users",
|
||||
"Can see the information about Group2 users",
|
||||
"The file favorite state is undefined",
|
||||
"Can’t copy data from the file to clipboard",
|
||||
"Can’t download the file",
|
||||
"Can’t print the file",
|
||||
"Can't copy data from the file to clipboard",
|
||||
"Can't download the file",
|
||||
"Can't print the file",
|
||||
"Can create new files from the editor",
|
||||
"Can’t submit forms",
|
||||
"Can't submit forms",
|
||||
"Can't close history",
|
||||
"Can't restore the file version"
|
||||
};
|
||||
@ -67,10 +67,10 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
static List<string> descr_user_0 = new List<string>()
|
||||
{
|
||||
"The name is requested when the editor is opened",
|
||||
"Doesn’t belong to any group",
|
||||
"Doesn't belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"Can’t see anyone’s information",
|
||||
"Can't see anyone's information",
|
||||
"The file favorite state is undefined",
|
||||
"Can't mention others in comments",
|
||||
"Can't create new files from the editor",
|
||||
@ -78,8 +78,9 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
"Can't view chat",
|
||||
"Can't protect file",
|
||||
"View file without collaboration",
|
||||
"Can’t refresh outdated file",
|
||||
"Can’t submit forms"
|
||||
"Can't refresh outdated file",
|
||||
"Can't submit forms",
|
||||
"Tour of tips when opening a document"
|
||||
};
|
||||
|
||||
private static List<User> users = new List<User>() {
|
||||
|
||||
@ -227,6 +227,12 @@ namespace OnlineEditorsExampleMVC.Models
|
||||
{ "text", user.close.text },
|
||||
{ "visible", user.close. visible }
|
||||
} : new Dictionary<string, object>{}
|
||||
},
|
||||
{
|
||||
"features", new Dictionary<string, object>
|
||||
{
|
||||
{ "featuresTips", user.id.Equals("uid-0") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -380,7 +386,7 @@ namespace OnlineEditorsExampleMVC.Models
|
||||
var jss = new JavaScriptSerializer();
|
||||
var id = request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
usersForMentions = !user.id.Equals("uid-0") ? jss.Serialize(Users.getUsersForMentions(user.id)) : null;
|
||||
usersForMentions = jss.Serialize(!user.id.Equals("uid-0") ? Users.getUsersForMentions(user.id) : null);
|
||||
}
|
||||
|
||||
public void GetUsersInfo(HttpRequest request, out string usersInfo)
|
||||
@ -397,7 +403,7 @@ namespace OnlineEditorsExampleMVC.Models
|
||||
var jss = new JavaScriptSerializer();
|
||||
var id = request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
usersForProtect = !user.id.Equals("uid-0") ? jss.Serialize(Users.getUsersForProtect(user.id)) : null;
|
||||
usersForProtect = jss.Serialize(!user.id.Equals("uid-0") ? Users.getUsersForProtect(user.id) : null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,7 @@ See the detailed guide to learn how to install Document Server [for Windows](htt
|
||||
|
||||
## Step 2. Download the .Net (C# MVC) code for the editors integration
|
||||
|
||||
Download the [.Net (C# MVC) example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
Download the [.Net (C# MVC) example](https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *web.appsettings.config* file:
|
||||
```
|
||||
@ -21,7 +21,7 @@ To connect the editors to your website, specify the path to the editors installa
|
||||
```
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-path** is the path where files will be created and stored. You can set an absolute path.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *DocEditor.aspx* file.
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/docs/docs-api/usage-api/advanced-parameters/) in the *DocEditor.aspx* file.
|
||||
|
||||
## Step 3. Install the prerequisites
|
||||
Сheck if your system meets the system requirements:
|
||||
|
||||
@ -126,7 +126,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
if (!formatManager.isAutoConvertible(posExt)) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -182,36 +182,16 @@ if (typeof jQuery != "undefined") {
|
||||
if (response.step && response.step < 100) {
|
||||
checkConvert(filePass, fileType);
|
||||
} else {
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
var loadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
|
||||
jq("#loadScripts").html(frame);
|
||||
document.getElementById("iframeScripts").onload = onloadScripts;
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
} else {
|
||||
onloadScripts();
|
||||
}
|
||||
};
|
||||
|
||||
var onloadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("done").removeClass("current");
|
||||
var onuploaded = function () {
|
||||
jq("#beginView, #beginEmbedded").removeClass("disable");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
@ -273,7 +253,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
@ -354,7 +334,7 @@ if (typeof jQuery != "undefined") {
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(fileName);
|
||||
jq("#convertStep1").addClass("done");
|
||||
jq("#convertStep1").addClass("error");
|
||||
jq("#convertStep2").addClass("waiting");
|
||||
});
|
||||
|
||||
@ -364,6 +344,7 @@ if (typeof jQuery != "undefined") {
|
||||
let fileExt = jq(`#${id}`).attr("data");
|
||||
jq(`#${id}`).addClass("orange");
|
||||
jq("td[name='convertingTypeButton']").addClass("disable");
|
||||
jq("#convertStep1").removeClass("error").addClass("done");
|
||||
jq("#convertStep2").removeClass("waiting").removeClass("done").addClass("current");
|
||||
jq("#convertStep2").text('2. File conversion');
|
||||
jq("#convert-descr").removeClass("disable");
|
||||
|
||||
@ -117,6 +117,10 @@
|
||||
|
||||
// the meta information of the document is changed via the meta command
|
||||
var onMetaChange = function (event) {
|
||||
if (event.data.title !== undefined) {
|
||||
document.title = event.data.title + " - ONLYOFFICE";
|
||||
}
|
||||
|
||||
if (event.data.favorite !== undefined) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
@ -358,10 +362,33 @@
|
||||
default:
|
||||
users = <%= usersForMentions %>;
|
||||
}
|
||||
docEditor.setUsers({
|
||||
if ((c === "protect" || c === "mention") && users && event.data.count) {
|
||||
let from = event.data.from;
|
||||
let count = event.data.count;
|
||||
let search = event.data.search;
|
||||
if (from != 0) users = [];
|
||||
var resultCount = 234;
|
||||
for (var i = Math.max(users.length, from); i < Math.min(from + count, resultCount); i++){
|
||||
users.push({
|
||||
email: "test@test.test" + (i + 1),
|
||||
id: "id" + (i + 1),
|
||||
name: "test_" + search + (i + 1)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var result = {
|
||||
"c": c,
|
||||
"users": users,
|
||||
});
|
||||
};
|
||||
if (resultCount) {
|
||||
// support v9.0
|
||||
result.total = 1 + (!event.data.count || users.length < event.data.count ? 0 : (event.data.from + event.data.count));
|
||||
// since v9.0.1
|
||||
result.isPaginated = true;
|
||||
}
|
||||
|
||||
docEditor.setUsers(result);
|
||||
};
|
||||
|
||||
var onRequestSendNotify = function (event) {
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -362,10 +362,7 @@
|
||||
<span class="errorPass"></span>
|
||||
<br />
|
||||
</div>
|
||||
<span id="step3" class="step">3. Loading editor scripts.</span>
|
||||
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
<br />
|
||||
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<div class="error-message">
|
||||
@ -410,7 +407,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span>
|
||||
<iframe id="iframeScripts" src="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
|
||||
|
||||
<footer>
|
||||
<div class="center">
|
||||
@ -418,7 +415,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<appSettings>
|
||||
<clear />
|
||||
<add key="version" value="1.13.0"/>
|
||||
<add key="version" value="1.14.0"/>
|
||||
|
||||
<add key="filesize-max" value="52428800"/>
|
||||
<add key="storage-path" value=""/>
|
||||
@ -17,13 +17,13 @@
|
||||
|
||||
<add key="files.docservice.verify-peer-off" value="true"/>
|
||||
|
||||
<add key="files.docservice.languages" value="en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language"/>
|
||||
<add key="files.docservice.languages" value="en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|ur:Urdu|vi:Vietnamese|aa-AA:Test Language"/>
|
||||
|
||||
<add key="files.docservice.url.site" value="http://documentserver/"/>
|
||||
|
||||
<add key="files.docservice.url.converter" value="converter"/>
|
||||
<add key="files.docservice.url.api" value="web-apps/apps/api/documents/api.js"/>
|
||||
<add key="files.docservice.url.preloader" value="web-apps/apps/api/documents/cache-scripts.html"/>
|
||||
<add key="files.docservice.url.preloader" value="web-apps/apps/api/documents/preload.html"/>
|
||||
<add key="files.docservice.url.command" value="command"/>
|
||||
|
||||
<add key="files.docservice.url.example" value=""/>
|
||||
|
||||
@ -511,10 +511,6 @@ label .checkbox {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
||||
@ -364,10 +364,7 @@
|
||||
<span class="errorPass"></span>
|
||||
<br />
|
||||
</div>
|
||||
<span id="step3" class="step">3. Loading editor scripts.</span>
|
||||
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
<br />
|
||||
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<div class="error-message">
|
||||
@ -412,7 +409,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" data-docs="<%= UrlPreloadScripts %>"></span>
|
||||
<iframe id="iframeScripts" src="<%= UrlPreloadScripts %>" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
|
||||
|
||||
<footer>
|
||||
<div class="center">
|
||||
@ -420,7 +417,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -135,6 +135,10 @@
|
||||
|
||||
// the meta information of the document is changed via the meta command
|
||||
var onMetaChange = function (event) {
|
||||
if (event.data.title !== undefined) {
|
||||
document.title = event.data.title + " - ONLYOFFICE";
|
||||
}
|
||||
|
||||
if (event.data.favorite !== undefined) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
@ -323,10 +327,33 @@
|
||||
default:
|
||||
users = <%= UsersForMentions %>;
|
||||
}
|
||||
docEditor.setUsers({
|
||||
if ((c === "protect" || c === "mention") && users && event.data.count) {
|
||||
let from = event.data.from;
|
||||
let count = event.data.count;
|
||||
let search = event.data.search;
|
||||
if (from != 0) users = [];
|
||||
var resultCount = 234;
|
||||
for (var i = Math.max(users.length, from); i < Math.min(from + count, resultCount); i++){
|
||||
users.push({
|
||||
email: "test@test.test" + (i + 1),
|
||||
id: "id" + (i + 1),
|
||||
name: "test_" + search + (i + 1)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var result = {
|
||||
"c": c,
|
||||
"users": users,
|
||||
});
|
||||
};
|
||||
if (resultCount) {
|
||||
// support v9.0
|
||||
result.total = 1 + (!event.data.count || users.length < event.data.count ? 0 : (event.data.from + event.data.count));
|
||||
// since v9.0.1
|
||||
result.isPaginated = true;
|
||||
}
|
||||
|
||||
docEditor.setUsers(result);
|
||||
};
|
||||
|
||||
var onRequestSendNotify = function (event) {
|
||||
|
||||
@ -294,6 +294,12 @@ namespace OnlineEditorsExample
|
||||
{ "visible", user.close.visible },
|
||||
{ "text", user.close.text }
|
||||
} : new Dictionary<string, object>{}
|
||||
},
|
||||
{
|
||||
"features", new Dictionary<string, object>
|
||||
{
|
||||
{ "featuresTips", user.id.Equals("uid-0") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -327,14 +333,14 @@ namespace OnlineEditorsExample
|
||||
|
||||
// get users for mentions
|
||||
List<Dictionary<string, object>> usersData = Users.getUsersForMentions(user.id);
|
||||
UsersForMentions = !user.id.Equals("uid-0") ? jss.Serialize(usersData) : null;
|
||||
UsersForMentions = jss.Serialize(!user.id.Equals("uid-0") ? usersData : null);
|
||||
|
||||
List<Dictionary<string, object>> usersInfo = Users.getUsersInfo(user.id);
|
||||
UsersInfo = jss.Serialize(usersData);
|
||||
|
||||
// get users for protect
|
||||
List<Dictionary<string, object>> usersProtectData = Users.getUsersForProtect(user.id);
|
||||
UsersForProtect = !user.id.Equals("uid-0") ? jss.Serialize(usersProtectData) : null;
|
||||
UsersForProtect = jss.Serialize(!user.id.Equals("uid-0") ? usersProtectData : null);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -12,7 +12,7 @@ See the detailed guide to learn how to install Document Server [for Windows](htt
|
||||
|
||||
## Step 2. Download the .Net (C#) code for the editors integration
|
||||
|
||||
Download the [.Net (C#) example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
Download the [.Net (C#) example](https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *settings.config* file:
|
||||
```
|
||||
@ -21,7 +21,7 @@ To connect the editors to your website, specify the path to the editors installa
|
||||
```
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-path** is the path where files will be created and stored. You can set an absolute path.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *DocEditor.aspx* file.
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/docs/docs-api/usage-api/advanced-parameters/) in the *DocEditor.aspx* file.
|
||||
|
||||
## Step 3. Install the prerequisites
|
||||
|
||||
|
||||
@ -25,11 +25,11 @@ namespace OnlineEditorsExample
|
||||
static List<string> descr_user_1 = new List<string>()
|
||||
{
|
||||
"File author by default",
|
||||
"Doesn’t belong to any group",
|
||||
"Doesn't belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"Can see the information about all users",
|
||||
"This file isn’t marked as favorite",
|
||||
"This file isn't marked as favorite",
|
||||
"Can create files from templates using data from the editor",
|
||||
"Has an avatar",
|
||||
"Can submit forms"
|
||||
@ -40,11 +40,11 @@ namespace OnlineEditorsExample
|
||||
"Belongs to Group2",
|
||||
"Can review only his own changes or changes made by users with no group",
|
||||
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
|
||||
"Can see the information about users from Group2 and users who don’t belong to any group",
|
||||
"Can see the information about users from Group2 and users who don't belong to any group",
|
||||
"This file is marked as favorite",
|
||||
"Can create new files from the editor",
|
||||
"Has an avatar",
|
||||
"Can’t submit forms"
|
||||
"Can't submit forms"
|
||||
};
|
||||
|
||||
static List<string> descr_user_3 = new List<string>()
|
||||
@ -54,22 +54,22 @@ namespace OnlineEditorsExample
|
||||
"Can view comments left by Group2 and Group3 users. Can edit comments left by the Group2 users",
|
||||
"Can see the information about Group2 users",
|
||||
"The file favorite state is undefined",
|
||||
"Can’t copy data from the file to clipboard",
|
||||
"Can’t download the file",
|
||||
"Can’t print the file",
|
||||
"Can't copy data from the file to clipboard",
|
||||
"Can't download the file",
|
||||
"Can't print the file",
|
||||
"Can create new files from the editor",
|
||||
"Can't close history",
|
||||
"Can't restore the file version",
|
||||
"Can’t submit forms"
|
||||
"Can't submit forms"
|
||||
};
|
||||
|
||||
static List<string> descr_user_0 = new List<string>()
|
||||
{
|
||||
"The name is requested when the editor is opened",
|
||||
"Doesn’t belong to any group",
|
||||
"Doesn't belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"Can’t see anyone’s information",
|
||||
"Can't see anyone's information",
|
||||
"The file favorite state is undefined",
|
||||
"Can't mention others in comments",
|
||||
"Can't create new files from the editor",
|
||||
@ -77,8 +77,9 @@ namespace OnlineEditorsExample
|
||||
"Can't view chat",
|
||||
"Can't protect file",
|
||||
"View file without collaboration",
|
||||
"Can’t refresh outdated file",
|
||||
"Can’t submit forms"
|
||||
"Can't refresh outdated file",
|
||||
"Can't submit forms",
|
||||
"Tour of tips when opening a document"
|
||||
};
|
||||
|
||||
private static List<User> users = new List<User>() {
|
||||
|
||||
Submodule web/documentserver-example/csharp/assets/document-formats updated: 1b069291ee...fcc10d7ab4
@ -126,7 +126,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
if (!formatManager.isAutoConvertible(posExt)) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -182,36 +182,16 @@ if (typeof jQuery != "undefined") {
|
||||
if (response.step && response.step < 100) {
|
||||
checkConvert(filePass, fileType);
|
||||
} else {
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
var loadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
|
||||
jq("#loadScripts").html(frame);
|
||||
document.getElementById("iframeScripts").onload = onloadScripts;
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
} else {
|
||||
onloadScripts();
|
||||
}
|
||||
};
|
||||
|
||||
var onloadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("done").removeClass("current");
|
||||
var onuploaded = function () {
|
||||
jq("#beginView, #beginEmbedded").removeClass("disable");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
@ -273,7 +253,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
@ -354,7 +334,7 @@ if (typeof jQuery != "undefined") {
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(fileName);
|
||||
jq("#convertStep1").addClass("done");
|
||||
jq("#convertStep1").addClass("error");
|
||||
jq("#convertStep2").addClass("waiting");
|
||||
});
|
||||
|
||||
@ -364,6 +344,7 @@ if (typeof jQuery != "undefined") {
|
||||
let fileExt = jq(`#${id}`).attr("data");
|
||||
jq(`#${id}`).addClass("orange");
|
||||
jq("td[name='convertingTypeButton']").addClass("disable");
|
||||
jq("#convertStep1").removeClass("error").addClass("done");
|
||||
jq("#convertStep2").removeClass("waiting").removeClass("done").addClass("current");
|
||||
jq("#convertStep2").text('2. File conversion');
|
||||
jq("#convert-descr").removeClass("disable");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<appSettings>
|
||||
<clear />
|
||||
<add key="version" value="1.13.0"/>
|
||||
<add key="version" value="1.14.0"/>
|
||||
|
||||
<add key="filesize-max" value="52428800"/>
|
||||
<add key="storage-path" value=""/>
|
||||
@ -16,13 +16,13 @@
|
||||
<add key="files.docservice.token.useforrequest" value="true" />
|
||||
<add key="files.docservice.token.expires-in" value="5"/>
|
||||
|
||||
<add key="files.docservice.languages" value="en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
|
||||
<add key="files.docservice.languages" value="en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|ur:Urdu|vi:Vietnamese|aa-AA: Test Language"/>
|
||||
|
||||
<add key="files.docservice.url.site" value="http://documentserver/"/>
|
||||
|
||||
<add key="files.docservice.url.converter" value="converter"/>
|
||||
<add key="files.docservice.url.api" value="web-apps/apps/api/documents/api.js"/>
|
||||
<add key="files.docservice.url.preloader" value="web-apps/apps/api/documents/cache-scripts.html"/>
|
||||
<add key="files.docservice.url.preloader" value="web-apps/apps/api/documents/preload.html"/>
|
||||
<add key="files.docservice.url.command" value="command"/>
|
||||
|
||||
<add key="files.docservice.url.example" value=""/>
|
||||
|
||||
@ -13,7 +13,7 @@ See the detailed guide to learn how to install Document Server [for Windows](htt
|
||||
|
||||
### Step 2. Download the Go code for the editors integration
|
||||
|
||||
Download the [Go example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
Download the [Go example](https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation, server protocol, address and port in the *configuration.env* file:
|
||||
|
||||
@ -31,7 +31,7 @@ JWT_HEADER=Authorization
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed.
|
||||
**address** is the address of the server, **port** is the server port.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) it the *templates/editor.html* file.
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/docs/docs-api/usage-api/advanced-parameters/) it the *templates/editor.html* file.
|
||||
|
||||
### Step 3. Install the prerequisites
|
||||
To run the Go example code, install the Go compiler:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"VERSION": "1.13.0",
|
||||
"VERSION": "1.14.0",
|
||||
|
||||
"SERVER_ADDRESS" : "",
|
||||
"SERVER_PORT" : 3000,
|
||||
@ -7,7 +7,7 @@
|
||||
"DOC_SERVER_HOST" : "http://documentserver/",
|
||||
"DOC_SERVER_CONVERTER_URL" : "converter",
|
||||
"DOC_SERVER_API_URL" : "web-apps/apps/api/documents/api.js",
|
||||
"DOC_SERVER_PRELOADER_URL" : "web-apps/apps/api/documents/cache-scripts.html",
|
||||
"DOC_SERVER_PRELOADER_URL" : "web-apps/apps/api/documents/preload.html",
|
||||
"DOC_SERVER_COMMAND_URL" : "command",
|
||||
|
||||
"JWT_IS_ENABLED" : false,
|
||||
@ -67,6 +67,7 @@
|
||||
"sv": "Swedish",
|
||||
"tr": "Turkish",
|
||||
"uk": "Ukrainian",
|
||||
"ur": "Urdu",
|
||||
"vi": "Vietnamese",
|
||||
"aa-AA": "Test Language"
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ func (srv *DefaultServerEndpointsHandler) Upload(w http.ResponseWriter, r *http.
|
||||
srv.logger.Debug("A new upload call")
|
||||
if !srv.DocumentManager.IsDocumentConvertable(handler.Filename) {
|
||||
srv.logger.Errorf("File %s is not supported", handler.Filename)
|
||||
shared.SendCustomErrorResponse(w, "File type is not supported")
|
||||
shared.SendResponse(w, map[string]string{"error": "File type is not supported"})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@ -222,6 +222,9 @@ func (dm DefaultDocumentManager) BuildDocumentConfig(
|
||||
Goback: models.Goback{
|
||||
RequestClose: false,
|
||||
},
|
||||
Features: models.Features{
|
||||
FeaturesTips: user.Id == "uid-0",
|
||||
},
|
||||
},
|
||||
},
|
||||
StandardClaims: jwt.StandardClaims{
|
||||
|
||||
@ -134,6 +134,7 @@ var descriptionUser0 []string = []string{
|
||||
"View file without collaboration",
|
||||
"Can't refresh outdated file",
|
||||
"Can't submit forms",
|
||||
"Tour of tips when opening a document",
|
||||
}
|
||||
var descriptionUser1 []string = []string{
|
||||
"File author by default",
|
||||
@ -150,7 +151,7 @@ var descriptionUser2 []string = []string{
|
||||
"Belongs to Group2",
|
||||
"Can review only his own changes or changes made by users with no group",
|
||||
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
|
||||
"Can see the information about users from Group2 and users who don’t belong to any group",
|
||||
"Can see the information about users from Group2 and users who don't belong to any group",
|
||||
"This file is marked as favorite",
|
||||
"Can create new files from the editor",
|
||||
"Has an avatar",
|
||||
|
||||
@ -21,6 +21,10 @@ type Goback struct {
|
||||
RequestClose bool `json:"requestClose"`
|
||||
}
|
||||
|
||||
type Features struct {
|
||||
FeaturesTips bool `json:"featuresTips"`
|
||||
}
|
||||
|
||||
type Customization struct {
|
||||
About bool `json:"about"`
|
||||
Comments bool `json:"comments,omitempty"`
|
||||
@ -28,6 +32,7 @@ type Customization struct {
|
||||
Forcesave bool `json:"forcesave,omitempty"`
|
||||
SubmitForm bool `json:"submitForm,omitempty"`
|
||||
Goback Goback `json:"goback,omitempty"`
|
||||
Features Features `json:"features,omitempty"`
|
||||
Close map[string]interface{} `json:"close,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ if (typeof jQuery !== "undefined") {
|
||||
|
||||
if (!formatManager.isAutoConvertible(posExt)) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -169,36 +169,16 @@ if (typeof jQuery !== "undefined") {
|
||||
if (response.step != undefined && response.step < 100) {
|
||||
checkConvert(filePass, fileType);
|
||||
} else {
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
var loadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = "<iframe id=\"iframeScripts\" width=1 height=1 style=\"position: absolute; visibility: hidden;\" ></iframe>";
|
||||
jq("#loadScripts").html(frame);
|
||||
document.getElementById("iframeScripts").onload = onloadScripts;
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
} else {
|
||||
onloadScripts();
|
||||
}
|
||||
};
|
||||
|
||||
var onloadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("done").removeClass("current");
|
||||
var onuploaded = function () {
|
||||
jq("#beginView, #beginEmbedded").removeClass("disable");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
@ -260,7 +240,7 @@ if (typeof jQuery !== "undefined") {
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
@ -341,7 +321,7 @@ if (typeof jQuery !== "undefined") {
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(fileName);
|
||||
jq("#convertStep1").addClass("done");
|
||||
jq("#convertStep1").addClass("error");
|
||||
jq("#convertStep2").addClass("waiting");
|
||||
});
|
||||
|
||||
@ -351,6 +331,7 @@ if (typeof jQuery !== "undefined") {
|
||||
let fileExt = jq(`#${id}`).attr("data");
|
||||
jq(`#${id}`).addClass("orange");
|
||||
jq("td[name='convertingTypeButton']").addClass("disable");
|
||||
jq("#convertStep1").removeClass("error").addClass("done");
|
||||
jq("#convertStep2").removeClass("waiting").removeClass("done").addClass("current");
|
||||
jq("#convertStep2").text('2. File conversion');
|
||||
jq("#convert-descr").removeClass("disable");
|
||||
|
||||
@ -511,10 +511,6 @@ label .checkbox {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
||||
@ -83,6 +83,10 @@
|
||||
};
|
||||
|
||||
var onMetaChange = function (event) { // the meta information of the document is changed via the meta command
|
||||
if (event.data.title !== undefined) {
|
||||
document.title = event.data.title + " - ONLYOFFICE";
|
||||
}
|
||||
|
||||
if (event.data.favorite) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
@ -236,10 +240,33 @@
|
||||
users = {{.usersForMentions}};
|
||||
}
|
||||
|
||||
docEditor.setUsers({
|
||||
if ((c === "protect" || c === "mention") && users && event.data.count) {
|
||||
let from = event.data.from;
|
||||
let count = event.data.count;
|
||||
let search = event.data.search;
|
||||
if (from != 0) users = [];
|
||||
var resultCount = 234;
|
||||
for (var i = Math.max(users.length, from); i < Math.min(from + count, resultCount); i++){
|
||||
users.push({
|
||||
email: "test@test.test" + (i + 1),
|
||||
id: "id" + (i + 1),
|
||||
name: "test_" + search + (i + 1)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var result = {
|
||||
"c": c,
|
||||
"users": users,
|
||||
});
|
||||
};
|
||||
if (resultCount) {
|
||||
// support v9.0
|
||||
result.total = 1 + (!event.data.count || users.length < event.data.count ? 0 : (event.data.from + event.data.count));
|
||||
// since v9.0.1
|
||||
result.isPaginated = true;
|
||||
}
|
||||
|
||||
docEditor.setUsers(result);
|
||||
};
|
||||
|
||||
var onRequestSendNotify = function(event) { // the user is mentioned in a comment
|
||||
|
||||
@ -118,7 +118,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -341,10 +341,7 @@
|
||||
<span class="errorPass"></span>
|
||||
<br />
|
||||
</div>
|
||||
<span id="step3" class="step">3. Loading editor scripts.</span>
|
||||
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
<br />
|
||||
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<div class="error-message">
|
||||
@ -388,7 +385,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" data-docs="{{ .Preloader }}"></span>
|
||||
<iframe id="iframeScripts" src="{{ .Preloader }}" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
|
||||
|
||||
<footer>
|
||||
<div class="center">
|
||||
@ -396,7 +393,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -18,7 +18,7 @@ See the detailed guide to learn how to install Document Server [for Windows](htt
|
||||
|
||||
### Step 2. Download the Java code for the editors integration
|
||||
|
||||
Download the [Java-Spring example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
Download the [Java-Spring example](https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation, server port and the path to the storage folder in the *src/main/resources/application.properties* file:
|
||||
|
||||
@ -30,7 +30,7 @@ To connect the editors to your website, specify the path to the editors installa
|
||||
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Docs installed, **port** is any available port and **files.storage** is the path where files will be created and stored (in the project folder by default). You can set an absolute path. For example, *D:\\\\folder*. Please note that on Windows OS the double backslash must be used as a separator.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) it the *\src\main\resources\editor.html* file.
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/docs/docs-api/usage-api/advanced-parameters/) it the *\src\main\resources\editor.html* file.
|
||||
|
||||
### Step 3. Install the prerequisites
|
||||
To run the Java example code, install the Java version 11 appropriate for your OS and framework **Apache Maven**:
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
<dependency>
|
||||
<groupId>com.onlyoffice</groupId>
|
||||
<artifactId>docs-integration-sdk</artifactId>
|
||||
<version>1.4.1-SNAPSHOT</version>
|
||||
<version>1.4.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents.core5</groupId>
|
||||
@ -94,7 +94,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||
<artifactId>httpclient5</artifactId>
|
||||
<version>5.4</version>
|
||||
<version>5.4.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -38,10 +38,10 @@ public class ExampleData {
|
||||
// the description for user 0
|
||||
List<String> descriptionUserZero = List.of(
|
||||
"The name is requested when the editor is opened",
|
||||
"Doesn’t belong to any group",
|
||||
"Doesn't belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"Can’t see anyone’s information",
|
||||
"Can't see anyone's information",
|
||||
"The file favorite state is undefined",
|
||||
"Can't mention others in comments",
|
||||
"Can't create new files from the editor",
|
||||
@ -50,17 +50,18 @@ public class ExampleData {
|
||||
"Can't protect file",
|
||||
"View file without collaboration",
|
||||
"Can't refresh outdated file",
|
||||
"Can’t submit forms"
|
||||
"Can't submit forms",
|
||||
"Tour of tips when opening a document"
|
||||
);
|
||||
|
||||
// the description for user 1
|
||||
List<String> descriptionUserFirst = List.of(
|
||||
"File author by default",
|
||||
"He doesn’t belong to any of the groups",
|
||||
"He doesn't belong to any of the groups",
|
||||
"He can review all the changes",
|
||||
"He can do everything with the comments",
|
||||
"Can see the information about all users",
|
||||
"This file isn’t favorite",
|
||||
"This file isn't favorite",
|
||||
"Can create a file from a template with data from the editor",
|
||||
"Can view chat",
|
||||
"Has an avatar",
|
||||
@ -70,16 +71,16 @@ public class ExampleData {
|
||||
// the description for user 2
|
||||
List<String> descriptionUserSecond = List.of(
|
||||
"He belongs to Group2",
|
||||
"He can review only his own changes or the changes made by the users who don’t belong"
|
||||
"He can review only his own changes or the changes made by the users who don't belong"
|
||||
+ " to any of the groups",
|
||||
"He can view every comment, edit his comments and the comments left by the users "
|
||||
+ "who don't belong to any of the groups and remove only his comments",
|
||||
"Can see the information about users from Group2 and users who don’t belong to any group",
|
||||
"Can see the information about users from Group2 and users who don't belong to any group",
|
||||
"This file is favorite",
|
||||
"Can create a file from an editor",
|
||||
"Can view chat",
|
||||
"Has an avatar",
|
||||
"Can’t submit forms"
|
||||
"Can't submit forms"
|
||||
);
|
||||
|
||||
// the description for user 3
|
||||
@ -90,14 +91,14 @@ public class ExampleData {
|
||||
+ "the users from Group2",
|
||||
"Can see the information about Group2 users",
|
||||
"The file favorite state is undefined",
|
||||
"He can’t copy data from the file into the clipboard",
|
||||
"He can’t download the file",
|
||||
"He can’t print the file",
|
||||
"He can't copy data from the file into the clipboard",
|
||||
"He can't download the file",
|
||||
"He can't print the file",
|
||||
"Can create a file from an editor",
|
||||
"Can view chat",
|
||||
"Can't close history",
|
||||
"Can't restore the file version",
|
||||
"Can’t submit forms"
|
||||
"Can't submit forms"
|
||||
);
|
||||
|
||||
// create user 1 with the specified parameters
|
||||
|
||||
@ -19,18 +19,16 @@
|
||||
package com.onlyoffice.integration;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.onlyoffice.client.ApacheHttpclientDocumentServerClient;
|
||||
import com.onlyoffice.client.DocumentServerClient;
|
||||
import com.onlyoffice.integration.documentserver.storage.FileStoragePathBuilder;
|
||||
import com.onlyoffice.manager.document.DocumentManager;
|
||||
import com.onlyoffice.manager.request.DefaultRequestManager;
|
||||
import com.onlyoffice.manager.request.RequestManager;
|
||||
import com.onlyoffice.manager.security.DefaultJwtManager;
|
||||
import com.onlyoffice.manager.security.JwtManager;
|
||||
import com.onlyoffice.manager.settings.SettingsManager;
|
||||
import com.onlyoffice.manager.url.UrlManager;
|
||||
import com.onlyoffice.service.command.CommandService;
|
||||
import com.onlyoffice.service.command.DefaultCommandService;
|
||||
import com.onlyoffice.service.convert.ConvertService;
|
||||
import com.onlyoffice.service.convert.DefaultConvertService;
|
||||
import com.onlyoffice.service.convert.DefaultConvertServiceV2;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.modelmapper.ModelMapper;
|
||||
import org.modelmapper.convention.MatchingStrategies;
|
||||
@ -83,21 +81,14 @@ public class IntegrationConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RequestManager requestManager(final UrlManager urlManager, final JwtManager jwtManager,
|
||||
final SettingsManager settingsManager) {
|
||||
return new DefaultRequestManager(urlManager, jwtManager, settingsManager);
|
||||
public DocumentServerClient documentServerClient(final SettingsManager settingsManager,
|
||||
final UrlManager urlManager) {
|
||||
return new ApacheHttpclientDocumentServerClient(settingsManager, urlManager);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConvertService convertService(final DocumentManager documentManager, final UrlManager urlManager,
|
||||
final RequestManager requestManager,
|
||||
final SettingsManager settingsManager) {
|
||||
return new DefaultConvertService(documentManager, urlManager, requestManager, settingsManager);
|
||||
final DocumentServerClient documentServerClient) {
|
||||
return new DefaultConvertServiceV2(documentManager, urlManager, documentServerClient);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CommandService commandService(final RequestManager requestManager) {
|
||||
return new DefaultCommandService(requestManager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.onlyoffice.client.DocumentServerClient;
|
||||
import com.onlyoffice.integration.documentserver.managers.history.HistoryManager;
|
||||
import com.onlyoffice.integration.documentserver.storage.FileStorageMutator;
|
||||
import com.onlyoffice.integration.documentserver.storage.FileStoragePathBuilder;
|
||||
@ -39,7 +40,6 @@ import com.onlyoffice.integration.sdk.manager.DocumentManager;
|
||||
import com.onlyoffice.integration.sdk.service.ConfigService;
|
||||
import com.onlyoffice.integration.services.UserServices;
|
||||
|
||||
import com.onlyoffice.manager.request.RequestManager;
|
||||
import com.onlyoffice.manager.security.JwtManager;
|
||||
import com.onlyoffice.manager.settings.SettingsManager;
|
||||
import com.onlyoffice.manager.url.UrlManager;
|
||||
@ -51,10 +51,8 @@ import com.onlyoffice.model.convertservice.ConvertRequest;
|
||||
import com.onlyoffice.model.convertservice.ConvertResponse;
|
||||
import com.onlyoffice.model.documenteditor.Callback;
|
||||
import com.onlyoffice.model.documenteditor.config.document.ReferenceData;
|
||||
import com.onlyoffice.service.command.CommandService;
|
||||
import com.onlyoffice.service.convert.ConvertService;
|
||||
import com.onlyoffice.service.documenteditor.callback.CallbackService;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
@ -83,10 +81,8 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
@ -120,14 +116,12 @@ public class FileController {
|
||||
@Autowired
|
||||
private ConvertService convertService;
|
||||
@Autowired
|
||||
private RequestManager requestManager;
|
||||
private DocumentServerClient documentServerClient;
|
||||
@Autowired
|
||||
private SettingsManager settingsManager;
|
||||
@Autowired
|
||||
private CallbackService callbackService;
|
||||
@Autowired
|
||||
private CommandService commandService;
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
@Autowired
|
||||
private UrlManager urlManager;
|
||||
@ -281,26 +275,20 @@ public class FileController {
|
||||
String nameWithInternalExt = documentManager.getBaseName(fileName) + "." + newFileType;
|
||||
String correctedName = documentManager.getCorrectName(nameWithInternalExt);
|
||||
|
||||
fileName = requestManager.executeGetRequest(newFileUri, new RequestManager.Callback<String>() {
|
||||
public String doWork(final Object response) throws IOException {
|
||||
InputStream stream = ((HttpEntity) response).getContent(); // get input stream of the converted
|
||||
// file
|
||||
File file = storageMutator.createFile(Path.of(storagePathBuilder.getFileLocation(correctedName)));
|
||||
try {
|
||||
documentServerClient.getFile(newFileUri, Files.newOutputStream(file.toPath()));
|
||||
} catch (Exception e) {
|
||||
file.delete();
|
||||
|
||||
if (stream == null) {
|
||||
throw new RuntimeException("Input stream is null");
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (!keepOriginal) {
|
||||
storageMutator.deleteFile(oldFileName);
|
||||
}
|
||||
|
||||
// remove source file
|
||||
if (!keepOriginal) {
|
||||
storageMutator.deleteFile(oldFileName);
|
||||
}
|
||||
|
||||
// create the converted file with input stream
|
||||
storageMutator.createFile(Path.of(storagePathBuilder.getFileLocation(correctedName)), stream);
|
||||
return correctedName;
|
||||
}
|
||||
});
|
||||
fileName = correctedName;
|
||||
}
|
||||
|
||||
// create meta information about the converted file with the user ID and name specified
|
||||
@ -480,20 +468,18 @@ public class FileController {
|
||||
|
||||
url = urlManager.replaceToInnerDocumentServerUrl(url);
|
||||
|
||||
return requestManager.executeGetRequest(url, new RequestManager.Callback<String>() {
|
||||
@Override
|
||||
public String doWork(final Object response) throws Exception {
|
||||
InputStream stream = ((HttpEntity) response).getContent();
|
||||
File file = storageMutator.createFile(Path.of(storagePathBuilder.getFileLocation(fileName)));
|
||||
try {
|
||||
documentServerClient.getFile(url, Files.newOutputStream(file.toPath()));
|
||||
} catch (Exception e) {
|
||||
file.delete();
|
||||
|
||||
if (documentManager.getMaxFileSize() < stream.available() || stream.available() <= 0) {
|
||||
return "{\"error\":\"File size is incorrect\"}";
|
||||
}
|
||||
storageMutator.createFile(Path.of(storagePathBuilder.getFileLocation(fileName)), stream);
|
||||
createUserMetadata(uid, fileName);
|
||||
throw e;
|
||||
}
|
||||
|
||||
return "{\"file\": \"" + fileName + "\"}";
|
||||
}
|
||||
});
|
||||
createUserMetadata(uid, fileName);
|
||||
|
||||
return "{\"file\": \"" + fileName + "\"}";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "{ \"error\" : 1, \"message\" : \"" + e.getMessage() + "\"}";
|
||||
@ -513,7 +499,7 @@ public class FileController {
|
||||
|
||||
try {
|
||||
|
||||
CommandResponse commandResponse = commandService.processCommand(commandRequest, body.getFileName());
|
||||
CommandResponse commandResponse = documentServerClient.command(commandRequest);
|
||||
return commandResponse.getError().getDescription();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -681,12 +667,14 @@ public class FileController {
|
||||
Files.move(sourcePathFile, bumpedFile);
|
||||
|
||||
if (body.getUrl() != null) {
|
||||
java.net.HttpURLConnection connection = (java.net.HttpURLConnection) new URL(body.getUrl())
|
||||
.openConnection();
|
||||
InputStream stream = connection.getInputStream();
|
||||
storageMutator.createFile(sourcePathFile, stream);
|
||||
stream.close();
|
||||
connection.disconnect();
|
||||
File file = storageMutator.createFile(sourcePathFile);
|
||||
try {
|
||||
documentServerClient.getFile(body.getUrl(), Files.newOutputStream(file.toPath()));
|
||||
} catch (Exception e) {
|
||||
file.delete();
|
||||
|
||||
throw e;
|
||||
}
|
||||
} else {
|
||||
String recoveryVersionStringDirectory = historyManager.versionDir(
|
||||
historyDirectory,
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
|
||||
package com.onlyoffice.integration.controllers;
|
||||
|
||||
import com.onlyoffice.client.DocumentServerClient;
|
||||
import com.onlyoffice.integration.dto.ForgottenFile;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -34,7 +35,6 @@ import com.onlyoffice.model.commandservice.CommandRequest;
|
||||
import com.onlyoffice.model.commandservice.CommandResponse;
|
||||
import com.onlyoffice.model.commandservice.commandrequest.Command;
|
||||
import com.onlyoffice.manager.document.DocumentManager;
|
||||
import com.onlyoffice.service.command.CommandService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -50,10 +50,10 @@ public class ForgottenController {
|
||||
private String enableForgotten;
|
||||
|
||||
@Autowired
|
||||
private CommandService commandService;
|
||||
private DocumentManager documentManager;
|
||||
|
||||
@Autowired
|
||||
private DocumentManager documentManager;
|
||||
private DocumentServerClient documentServerClient;
|
||||
|
||||
@GetMapping("${url.forgotten}")
|
||||
public String index(final Model model) {
|
||||
@ -74,14 +74,14 @@ public class ForgottenController {
|
||||
CommandRequest commandRequest = CommandRequest.builder()
|
||||
.c(Command.GET_FORGOTTEN_LIST)
|
||||
.build();
|
||||
CommandResponse commandResponse = commandService.processCommand(commandRequest, null);
|
||||
CommandResponse commandResponse = documentServerClient.command(commandRequest);
|
||||
List<String> keys = commandResponse.getKeys();
|
||||
for (int i = 0; i < keys.size(); i++) {
|
||||
commandRequest = CommandRequest.builder()
|
||||
.c(Command.GET_FORGOTTEN)
|
||||
.key(keys.get(i))
|
||||
.build();
|
||||
commandResponse = commandService.processCommand(commandRequest, null);
|
||||
commandResponse = documentServerClient.command(commandRequest);
|
||||
ForgottenFile file = new ForgottenFile(
|
||||
commandResponse.getKey(),
|
||||
documentManager.getDocumentType(commandResponse.getUrl()).toString().toLowerCase(),
|
||||
@ -111,7 +111,7 @@ public class ForgottenController {
|
||||
.key(filename)
|
||||
.build();
|
||||
|
||||
CommandResponse commandResponse = commandService.processCommand(commandRequest, null);
|
||||
CommandResponse commandResponse = documentServerClient.command(commandRequest);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@ -19,12 +19,12 @@
|
||||
package com.onlyoffice.integration.documentserver.managers.callback;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.onlyoffice.client.DocumentServerClient;
|
||||
import com.onlyoffice.integration.documentserver.managers.history.HistoryManager;
|
||||
import com.onlyoffice.integration.documentserver.storage.FileStorageMutator;
|
||||
import com.onlyoffice.integration.documentserver.storage.FileStoragePathBuilder;
|
||||
import com.onlyoffice.integration.sdk.manager.DocumentManager;
|
||||
import com.onlyoffice.integration.sdk.manager.UrlManager;
|
||||
import com.onlyoffice.manager.request.RequestManager;
|
||||
import com.onlyoffice.model.commandservice.CommandRequest;
|
||||
import com.onlyoffice.model.commandservice.commandrequest.Command;
|
||||
import com.onlyoffice.model.convertservice.ConvertRequest;
|
||||
@ -33,19 +33,15 @@ import com.onlyoffice.model.documenteditor.Callback;
|
||||
import com.onlyoffice.model.documenteditor.callback.Action;
|
||||
import com.onlyoffice.model.documenteditor.callback.ForcesaveType;
|
||||
import com.onlyoffice.model.documenteditor.callback.action.Type;
|
||||
import com.onlyoffice.service.command.CommandService;
|
||||
import com.onlyoffice.service.convert.ConvertService;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
@ -65,46 +61,13 @@ public class DefaultCallbackManager implements CallbackManager {
|
||||
@Autowired
|
||||
private ConvertService convertService;
|
||||
@Autowired
|
||||
private RequestManager requestManager;
|
||||
@Autowired
|
||||
private CommandService commandService;
|
||||
private DocumentServerClient documentServerClient;
|
||||
@Autowired
|
||||
private HistoryManager historyManager;
|
||||
|
||||
@Autowired
|
||||
private UrlManager urlManager;
|
||||
|
||||
// download file from url
|
||||
@SneakyThrows
|
||||
private byte[] getDownloadFile(final String url) {
|
||||
if (url == null || url.isEmpty()) {
|
||||
throw new RuntimeException("Url argument is not specified"); // URL isn't specified
|
||||
}
|
||||
|
||||
return requestManager.executeGetRequest(url, new RequestManager.Callback<byte[]>() {
|
||||
public byte[] doWork(final Object response) throws IOException {
|
||||
InputStream stream = ((HttpEntity) response).getContent(); // get input stream of the converted
|
||||
// file
|
||||
|
||||
if (stream == null) {
|
||||
throw new RuntimeException("Input stream is null");
|
||||
}
|
||||
|
||||
return stream.readAllBytes();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// file saving
|
||||
@SneakyThrows
|
||||
private void saveFile(final byte[] byteArray, final Path path) {
|
||||
if (path == null) {
|
||||
throw new RuntimeException("Path argument is not specified"); // file isn't specified
|
||||
}
|
||||
// update a file or create a new one
|
||||
storageMutator.createOrUpdateFile(path, new ByteArrayInputStream(byteArray));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processEditing(final Callback callback, final String fileName) {
|
||||
Action action = callback.getActions().get(0); // get the user ID who is editing the document
|
||||
@ -118,7 +81,7 @@ public class DefaultCallbackManager implements CallbackManager {
|
||||
|
||||
// create a command request to forcibly save the document being edited without closing it
|
||||
try {
|
||||
commandService.processCommand(commandRequest, fileName);
|
||||
documentServerClient.command(commandRequest);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -173,8 +136,6 @@ public class DefaultCallbackManager implements CallbackManager {
|
||||
}
|
||||
}
|
||||
|
||||
byte[] byteArrayFile = getDownloadFile(downloadUri); // download document file
|
||||
|
||||
Path lastVersion = Paths.get(storagePathBuilder
|
||||
.getFileLocation(fileName)); // get the path to the last file version
|
||||
|
||||
@ -194,11 +155,23 @@ public class DefaultCallbackManager implements CallbackManager {
|
||||
|
||||
lastVersion.toFile().renameTo(new File(versionDir + File.separator + "prev." + curExt));
|
||||
|
||||
saveFile(byteArrayFile, toSave); // save document file
|
||||
File file = storageMutator.createFile(toSave);
|
||||
try {
|
||||
documentServerClient.getFile(downloadUri, Files.newOutputStream(file.toPath()));
|
||||
} catch (Exception e) {
|
||||
file.delete();
|
||||
|
||||
byte[] byteArrayChanges = getDownloadFile(changesUri); // download file changes
|
||||
saveFile(byteArrayChanges, Path
|
||||
.of(versionDir + File.separator + "diff.zip")); // save file changes to the diff.zip archive
|
||||
throw e;
|
||||
}
|
||||
|
||||
File diff = storageMutator.createFile(Path.of(versionDir + File.separator + "diff.zip"));
|
||||
try {
|
||||
documentServerClient.getFile(changesUri, Files.newOutputStream(diff.toPath()));
|
||||
} catch (Exception e) {
|
||||
diff.delete();
|
||||
|
||||
throw e;
|
||||
}
|
||||
|
||||
JSONObject jsonChanges = new JSONObject(); // create a json object for document changes
|
||||
jsonChanges.put("changes", callback.getHistory().getChanges()); // put the changes to the json object
|
||||
@ -262,7 +235,6 @@ public class DefaultCallbackManager implements CallbackManager {
|
||||
}
|
||||
}
|
||||
|
||||
byte[] byteArrayFile = getDownloadFile(downloadUri); // download document file
|
||||
String forcesavePath = "";
|
||||
|
||||
// todo: Use ENUMS
|
||||
@ -297,9 +269,15 @@ public class DefaultCallbackManager implements CallbackManager {
|
||||
.getBaseName(fileName) + ".txt");
|
||||
String formsPath = storagePathBuilder.getFileLocation(formsName);
|
||||
|
||||
byte[] byteArrayFormsData = getDownloadFile(formsDataUrl);
|
||||
|
||||
saveFile(byteArrayFormsData, Paths.get(formsPath));
|
||||
File forms = storageMutator.createFile(Paths.get(formsPath));
|
||||
try {
|
||||
documentServerClient.getFile(formsDataUrl, Files.newOutputStream(forms.toPath()));
|
||||
} catch (Exception e) {
|
||||
forms.delete();
|
||||
|
||||
throw e;
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException("Document editing service did not return formsDataUrl");
|
||||
}
|
||||
@ -318,6 +296,14 @@ public class DefaultCallbackManager implements CallbackManager {
|
||||
}
|
||||
}
|
||||
|
||||
saveFile(byteArrayFile, Path.of(forcesavePath));
|
||||
|
||||
File forcesave = storageMutator.createFile(Path.of(forcesavePath));
|
||||
try {
|
||||
documentServerClient.getFile(downloadUri, Files.newOutputStream(forcesave.toPath()));
|
||||
} catch (Exception e) {
|
||||
forcesave.delete();
|
||||
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,7 +20,6 @@ package com.onlyoffice.integration.documentserver.storage;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Path;
|
||||
@ -29,6 +28,7 @@ import java.nio.file.Path;
|
||||
public interface FileStorageMutator {
|
||||
void createDirectory(Path path); // create a new directory if it does not exist
|
||||
boolean createFile(Path path, InputStream stream); // create a new file if it does not exist
|
||||
File createFile(Path path); // create a new file if it does not exist
|
||||
boolean deleteFile(String fileName); // delete a file
|
||||
boolean deleteFileHistory(String fileName); // delete file history
|
||||
boolean deleteUserFolder(); // delete the user's folder recursively
|
||||
@ -39,5 +39,4 @@ public interface FileStorageMutator {
|
||||
Resource loadFileAsResourceHistory(String fileName, String version, String file); // load file as a resource
|
||||
File[] getStoredFiles(); // get a collection of all the stored files
|
||||
void createMeta(String fileName, String uid, String uname); // create the file meta information
|
||||
boolean createOrUpdateFile(Path path, ByteArrayInputStream stream); // create or update a file
|
||||
}
|
||||
|
||||
@ -30,7 +30,6 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
@ -164,6 +163,18 @@ public class LocalFileStorage implements FileStorageMutator, FileStoragePathBuil
|
||||
return false;
|
||||
}
|
||||
|
||||
public File createFile(final Path path) {
|
||||
if (Files.exists(path)) {
|
||||
return path.toFile();
|
||||
}
|
||||
|
||||
try {
|
||||
return Files.createFile(path).toFile();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// delete a file
|
||||
public boolean deleteFile(final String fileNameParam) {
|
||||
String fileName = URLDecoder
|
||||
@ -349,22 +360,6 @@ public class LocalFileStorage implements FileStorageMutator, FileStoragePathBuil
|
||||
}
|
||||
}
|
||||
|
||||
// create or update a file
|
||||
public boolean createOrUpdateFile(final Path path, final ByteArrayInputStream stream) {
|
||||
if (!Files.exists(path)) { // if the specified file does not exist
|
||||
return createFile(path, stream); // create it in the specified directory
|
||||
} else {
|
||||
try {
|
||||
Files.write(path, stream
|
||||
.readAllBytes()); // otherwise, write new information in the bytes format to the file
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the server URL
|
||||
public String getServerUrl(final Boolean forDocumentServer) {
|
||||
if (forDocumentServer && !docserviceUrlExample.equals("")) {
|
||||
|
||||
@ -42,6 +42,7 @@ import com.onlyoffice.model.documenteditor.config.editorconfig.Mode;
|
||||
import com.onlyoffice.model.documenteditor.config.editorconfig.Template;
|
||||
import com.onlyoffice.model.documenteditor.config.editorconfig.customization.Goback;
|
||||
import com.onlyoffice.model.documenteditor.config.editorconfig.customization.Close;
|
||||
import com.onlyoffice.model.documenteditor.config.editorconfig.customization.Features;
|
||||
import com.onlyoffice.model.documenteditor.config.editorconfig.embedded.Toolbar;
|
||||
import com.onlyoffice.service.documenteditor.config.DefaultConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -251,6 +252,14 @@ public class ConfigServiceImpl extends DefaultConfigService implements ConfigSer
|
||||
close.setVisible(appUser.getClose().getVisible());
|
||||
}
|
||||
|
||||
Features features = Features.builder()
|
||||
.featuresTips(false)
|
||||
.build();
|
||||
|
||||
if (appUser == null || String.valueOf(appUser.getId()).equals("4")) {
|
||||
features.setFeaturesTips(true);
|
||||
}
|
||||
|
||||
Customization customization = Customization.builder()
|
||||
.autosave(true) // if the Autosave menu option is enabled or disabled
|
||||
.comments(true) // if the Comments menu button is displayed or hidden
|
||||
@ -265,6 +274,7 @@ public class ConfigServiceImpl extends DefaultConfigService implements ConfigSer
|
||||
.feedback(true)
|
||||
.goback(goback)
|
||||
.close(close)
|
||||
.features(features)
|
||||
.build();
|
||||
|
||||
return customization;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
server.version=1.13.0
|
||||
server.version=1.14.0
|
||||
|
||||
server.address=
|
||||
server.port=4000
|
||||
@ -15,7 +15,7 @@ files.docservice.history.postfix=-hist
|
||||
files.docservice.url.example=
|
||||
|
||||
|
||||
files.docservice.languages=en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
|
||||
files.docservice.languages=en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|ur:Urdu|vi:Vietnamese|aa-AA:Test Language
|
||||
|
||||
docservice.url=http://documentserver/
|
||||
docservice.ignoreSSLCertificate=false
|
||||
|
||||
@ -511,10 +511,6 @@ label .checkbox {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
||||
@ -114,7 +114,7 @@ if (typeof jQuery !== "undefined") {
|
||||
|
||||
if (!formatManager.isAutoConvertible(posExt)) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -168,36 +168,16 @@ if (typeof jQuery !== "undefined") {
|
||||
checkConvert(filePass, fileType);
|
||||
} else {
|
||||
jq("#hiddenFileName").val(response.filename);
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
var loadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = "<iframe id=\"iframeScripts\" width=1 height=1 style=\"position: absolute; visibility: hidden;\" ></iframe>";
|
||||
jq("#loadScripts").html(frame);
|
||||
document.getElementById("iframeScripts").onload = onloadScripts;
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
} else {
|
||||
onloadScripts();
|
||||
}
|
||||
};
|
||||
|
||||
var onloadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("done").removeClass("current");
|
||||
var onuploaded = function () {
|
||||
jq("#beginView, #beginEmbedded").removeClass("disable");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
@ -265,7 +245,7 @@ if (typeof jQuery !== "undefined") {
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
@ -346,7 +326,7 @@ if (typeof jQuery !== "undefined") {
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(fileName);
|
||||
jq("#convertStep1").addClass("done");
|
||||
jq("#convertStep1").addClass("error");
|
||||
jq("#convertStep2").addClass("waiting");
|
||||
});
|
||||
|
||||
@ -356,6 +336,7 @@ if (typeof jQuery !== "undefined") {
|
||||
let fileExt = jq(`#${id}`).attr("data");
|
||||
jq(`#${id}`).addClass("orange");
|
||||
jq("td[name='convertingTypeButton']").addClass("disable");
|
||||
jq("#convertStep1").removeClass("error").addClass("done");
|
||||
jq("#convertStep2").removeClass("waiting").removeClass("done").addClass("current");
|
||||
jq("#convertStep2").text('2. File conversion');
|
||||
jq("#convert-descr").removeClass("disable");
|
||||
|
||||
@ -100,6 +100,10 @@
|
||||
|
||||
// the meta information of the document is changed via the meta command
|
||||
var onMetaChange = function (event) {
|
||||
if (event.data.title !== undefined) {
|
||||
document.title = event.data.title + " - ONLYOFFICE";
|
||||
}
|
||||
|
||||
if (event.data.favorite !== undefined) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
@ -352,10 +356,33 @@
|
||||
users = [[${usersForMentions}]];
|
||||
}
|
||||
|
||||
docEditor.setUsers({
|
||||
if ((c === "protect" || c === "mention") && users && event.data.count) {
|
||||
let from = event.data.from;
|
||||
let count = event.data.count;
|
||||
let search = event.data.search;
|
||||
if (from != 0) users = [];
|
||||
var resultCount = 234;
|
||||
for (var i = Math.max(users.length, from); i < Math.min(from + count, resultCount); i++){
|
||||
users.push({
|
||||
email: "test@test.test" + (i + 1),
|
||||
id: "id" + (i + 1),
|
||||
name: "test_" + search + (i + 1)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var result = {
|
||||
"c": c,
|
||||
"users": users,
|
||||
});
|
||||
};
|
||||
if (resultCount) {
|
||||
// support v9.0
|
||||
result.total = 1 + (!event.data.count || users.length < event.data.count ? 0 : (event.data.from + event.data.count));
|
||||
// since v9.0.1
|
||||
result.isPaginated = true;
|
||||
}
|
||||
|
||||
docEditor.setUsers(result);
|
||||
};
|
||||
|
||||
var onRequestSendNotify = function(event) { // the user is mentioned in a comment
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -327,10 +327,7 @@
|
||||
<span class="errorPass"></span>
|
||||
<br />
|
||||
</div>
|
||||
<span id="step3" class="step">3. Loading editor scripts.</span>
|
||||
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
<br />
|
||||
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<div class="error-message">
|
||||
@ -375,7 +372,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" th:attr="data-docs=${datadocs}"></span>
|
||||
<iframe id="iframeScripts" th:attr="src=${datadocs}" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
|
||||
|
||||
<footer>
|
||||
<div class="center">
|
||||
@ -383,7 +380,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -1,23 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>OnlineEditorsExampleJava</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
<name>OnlineEditorsExampleJava</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1690280351006</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,8 +1,22 @@
|
||||
FROM maven:3.6.1-jdk-8-alpine AS MVN_BLDR
|
||||
COPY ./ /tmp/
|
||||
WORKDIR /tmp/
|
||||
# FROM maven:3.9.3-eclipse-temurin-11-alpine AS example-build
|
||||
# WORKDIR /srv
|
||||
# COPY . .
|
||||
# RUN mvn package
|
||||
|
||||
FROM maven:3.6.1-jdk-8-alpine AS example-build
|
||||
WORKDIR /srv
|
||||
COPY . .
|
||||
RUN mvn package
|
||||
|
||||
FROM tomcat:alpine
|
||||
RUN rm -fr /usr/local/tomcat/webapps/ROOT
|
||||
COPY --from=MVN_BLDR /tmp/target/*.war $CATALINA_HOME/webapps/ROOT.war
|
||||
# no main manifest attribute, in example.war
|
||||
# FROM eclipse-temurin:11-jdk-alpine AS example
|
||||
# WORKDIR /srv
|
||||
# COPY --from=example-build /srv/target/*.war example.war
|
||||
# CMD ["java", "-jar", "example.war"]
|
||||
|
||||
FROM tomcat:9.0.20-jre8-alpine AS example
|
||||
RUN rm -rf /usr/local/tomcat/webapps/ROOT
|
||||
COPY --from=example-build /srv/target/*.war $CATALINA_HOME/webapps/ROOT.war
|
||||
|
||||
FROM nginx:1.23.4-alpine3.17 AS proxy
|
||||
COPY proxy/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
@ -14,7 +14,7 @@ See the detailed guide to learn how to [install Document Server for Windows](htt
|
||||
|
||||
### Step 2. Download the Java code for the editors integration
|
||||
|
||||
Download the [Java example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
Download the [Java example](https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *src/main/resources/settings.properties* file:
|
||||
|
||||
@ -25,7 +25,7 @@ files.docservice.url.site=https://documentserver/
|
||||
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-folder** is the path where files will be created and stored. You can set an absolute path. For example, *D:\\\\folder*. Please note that on Windows OS the double backslash must be used as a separator.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *\src\main\webapp\editor.jsp* file.
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/docs/docs-api/usage-api/advanced-parameters/) in the *\src\main\webapp\editor.jsp* file.
|
||||
|
||||
### Step 3. Install the prerequisites
|
||||
|
||||
|
||||
@ -1,9 +1,31 @@
|
||||
version: '3'
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
java-intg-ex:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
||||
document-server:
|
||||
container_name: document-server
|
||||
image: onlyoffice/documentserver:7.3.3.50
|
||||
expose:
|
||||
- "80"
|
||||
environment:
|
||||
- JWT_SECRET=your-256-bit-secret
|
||||
|
||||
example:
|
||||
container_name: example
|
||||
build:
|
||||
context: .
|
||||
target: example
|
||||
# platform: linux/amd64
|
||||
expose:
|
||||
# - "80"
|
||||
- "8080"
|
||||
|
||||
proxy:
|
||||
container_name: proxy
|
||||
build:
|
||||
context: .
|
||||
target: proxy
|
||||
ports:
|
||||
# - "80:80"
|
||||
# - "8080:8080"
|
||||
- "8080:8080"
|
||||
- "3000:3000"
|
||||
|
||||
41
web/documentserver-example/java/proxy/nginx.conf
Normal file
41
web/documentserver-example/java/proxy/nginx.conf
Normal file
@ -0,0 +1,41 @@
|
||||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 512;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
server {
|
||||
# listen 80;
|
||||
listen 8080;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
# proxy_pass http://example;
|
||||
proxy_pass http://example:8080;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
# listen 8080;
|
||||
listen 3000;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
client_max_body_size 100m;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://document-server;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $http_x_forwarded_host;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package controllers;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class CorsFilter implements Filter {
|
||||
@Override
|
||||
public void init(final FilterConfig filterConfig) throws ServletException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(final ServletRequest request,
|
||||
final ServletResponse response,
|
||||
final FilterChain filterChain) throws IOException, ServletException {
|
||||
HttpServletRequest req = (HttpServletRequest) request;
|
||||
HttpServletResponse res = (HttpServletResponse) response;
|
||||
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
res.setHeader("Access-Control-Allow-Credentials", "false");
|
||||
res.setHeader("Access-Control-Allow-Methods", "*");
|
||||
res.setHeader("Access-Control-Allow-Headers", "*");
|
||||
|
||||
if ("OPTIONS".equalsIgnoreCase(req.getMethod())) {
|
||||
res.setStatus(HttpServletResponse.SC_OK);
|
||||
} else {
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -114,6 +114,9 @@ public class FileModel {
|
||||
editorConfig.getUser().setImage(user.getAvatar() ? DocumentManager.getServerUrl(false)
|
||||
+ "/css/img/" + user.getId() + ".png" : null);
|
||||
|
||||
editorConfig.getCustomization().getFeatures()
|
||||
.setFeaturesTips(user.getId().equals("uid-0"));
|
||||
|
||||
if (user.getGoback() != null) {
|
||||
// write the absolute URL to the file location
|
||||
editorConfig.getCustomization().getGoback()
|
||||
@ -571,6 +574,7 @@ public class FileModel {
|
||||
|
||||
// customization parameters
|
||||
public class Customization {
|
||||
private Features features;
|
||||
private Goback goback;
|
||||
private Close close;
|
||||
private Boolean forcesave;
|
||||
@ -592,10 +596,15 @@ public class FileModel {
|
||||
comments = true;
|
||||
feedback = true;
|
||||
forcesave = false;
|
||||
features = new Features();
|
||||
goback = new Goback();
|
||||
close = new Close();
|
||||
}
|
||||
|
||||
public Features getFeatures() {
|
||||
return features;
|
||||
}
|
||||
|
||||
public Goback getGoback() {
|
||||
return goback;
|
||||
}
|
||||
@ -624,6 +633,18 @@ public class FileModel {
|
||||
return feedback;
|
||||
}
|
||||
|
||||
public class Features {
|
||||
private Boolean featuresTips;
|
||||
|
||||
public Boolean getFeaturesTips() {
|
||||
return featuresTips;
|
||||
}
|
||||
|
||||
public void setFeaturesTips(final Boolean featuresTipsParam) {
|
||||
this.featuresTips = featuresTipsParam;
|
||||
}
|
||||
}
|
||||
|
||||
public class Goback {
|
||||
private String url;
|
||||
private String text;
|
||||
|
||||
@ -137,10 +137,24 @@ public final class TrackManager {
|
||||
return body;
|
||||
}
|
||||
|
||||
public static JSONObject resolveProcessSaveBody(final JSONObject body) {
|
||||
JSONObject copied = body;
|
||||
|
||||
String url = (String) copied.get("url");
|
||||
copied.put("url", url.replace("localhost", "proxy"));
|
||||
|
||||
String changesURL = (String) copied.get("changesurl");
|
||||
copied.put("changesurl", changesURL.replace("localhost", "proxy"));
|
||||
|
||||
return copied;
|
||||
}
|
||||
|
||||
// file saving process
|
||||
public static void processSave(final JSONObject body,
|
||||
public static void processSave(final JSONObject rawBody,
|
||||
final String fileName,
|
||||
final String userAddress) throws Exception {
|
||||
JSONObject body = TrackManager.resolveProcessSaveBody(rawBody);
|
||||
|
||||
if (body.get("url") == null) {
|
||||
throw new Exception("DownloadUrl is null");
|
||||
}
|
||||
|
||||
@ -33,11 +33,11 @@ public final class Users {
|
||||
|
||||
private static List<String> descriptionUserFirst = new ArrayList<String>() {{
|
||||
add("File author by default");
|
||||
add("Doesn’t belong to any group");
|
||||
add("Doesn't belong to any group");
|
||||
add("Can review all the changes");
|
||||
add("Can perform all actions with comments");
|
||||
add("Can see the information about all users");
|
||||
add("This file isn’t marked as favorite");
|
||||
add("This file isn't marked as favorite");
|
||||
add("Can create files from templates using data from the editor");
|
||||
add("Has an avatar");
|
||||
add("Can submit forms");
|
||||
@ -48,11 +48,11 @@ public final class Users {
|
||||
add("Can review only his own changes or changes made by users with no group");
|
||||
add("Can view comments, edit his own comments and comments left by users with no group."
|
||||
+ " Can remove his own comments only");
|
||||
add("Can see the information about users from Group2 and users who don’t belong to any group");
|
||||
add("Can see the information about users from Group2 and users who don't belong to any group");
|
||||
add("This file is marked as favorite");
|
||||
add("Can create new files from the editor");
|
||||
add("Has an avatar");
|
||||
add("Can’t submit forms");
|
||||
add("Can't submit forms");
|
||||
}};
|
||||
|
||||
private static List<String> descriptionUserThird = new ArrayList<String>() {{
|
||||
@ -61,21 +61,21 @@ public final class Users {
|
||||
add("Can view comments left by Group2 and Group3 users. Can edit comments left by the Group2 users");
|
||||
add("Can see the information about Group2 users");
|
||||
add("The file favorite state is undefined");
|
||||
add("Can’t copy data from the file to clipboard");
|
||||
add("Can’t download the file");
|
||||
add("Can’t print the file");
|
||||
add("Can't copy data from the file to clipboard");
|
||||
add("Can't download the file");
|
||||
add("Can't print the file");
|
||||
add("Can create new files from the editor");
|
||||
add("Can't close history");
|
||||
add("Can't restore the file version");
|
||||
add("Can’t submit forms");
|
||||
add("Can't submit forms");
|
||||
}};
|
||||
|
||||
private static List<String> descriptionUserZero = new ArrayList<String>() {{
|
||||
add("The name is requested when the editor is opened");
|
||||
add("Doesn’t belong to any group");
|
||||
add("Doesn't belong to any group");
|
||||
add("Can review all the changes");
|
||||
add("Can perform all actions with comments");
|
||||
add("Can’t see anyone’s information");
|
||||
add("Can't see anyone's information");
|
||||
add("The file favorite state is undefined");
|
||||
add("Can't mention others in comments");
|
||||
add("Can't create new files from the editor");
|
||||
@ -84,7 +84,8 @@ public final class Users {
|
||||
add("Can't protect file");
|
||||
add("View file without collaboration");
|
||||
add("Can't refresh outdated file");
|
||||
add("Can’t submit forms");
|
||||
add("Can't submit forms");
|
||||
add("Tour of tips when opening a document");
|
||||
}};
|
||||
|
||||
private static List<User> users = new ArrayList<User>() {{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
version=1.13.0
|
||||
version=1.14.0
|
||||
|
||||
filesize-max=5242880
|
||||
storage-folder=app_data
|
||||
@ -7,16 +7,16 @@ enable-forgotten=TRUE
|
||||
|
||||
files.docservice.timeout=120000
|
||||
|
||||
files.docservice.url.site=http://documentserver/
|
||||
files.docservice.url.site=http://localhost:3000/
|
||||
files.docservice.url.converter=converter
|
||||
files.docservice.url.command=command
|
||||
files.docservice.url.api=web-apps/apps/api/documents/api.js
|
||||
files.docservice.url.preloader=web-apps/apps/api/documents/cache-scripts.html
|
||||
files.docservice.url.example=
|
||||
files.docservice.url.preloader=web-apps/apps/api/documents/preload.html
|
||||
files.docservice.url.example=http://proxy:8080/
|
||||
|
||||
files.docservice.languages=en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
|
||||
files.docservice.languages=en:English|sq-AL:Albanian (Albania)|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|ur:Urdu|vi:Vietnamese|aa-AA:Test Language
|
||||
|
||||
files.docservice.secret=
|
||||
files.docservice.secret=your-256-bit-secret
|
||||
files.docservice.header=Authorization
|
||||
files.docservice.token-use-for-request=TRUE
|
||||
files.docservice.token-expiration=5
|
||||
|
||||
@ -2,23 +2,7 @@
|
||||
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
|
||||
<filter>
|
||||
<filter-name>CorsFilter</filter-name>
|
||||
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>cors.allowed.origins</param-name>
|
||||
<param-value>*</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>cors.allowed.methods</param-name>
|
||||
<param-value>GET</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>cors.support.credentials</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>cors.exposed.headers</param-name>
|
||||
<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Methods</param-value>
|
||||
</init-param>
|
||||
<filter-class>controllers.CorsFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>CorsFilter</filter-name>
|
||||
|
||||
@ -511,10 +511,6 @@ label .checkbox {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
||||
@ -107,6 +107,10 @@
|
||||
|
||||
// the meta information of the document is changed via the meta command
|
||||
var onMetaChange = function (event) {
|
||||
if (event.data.title !== undefined) {
|
||||
document.title = event.data.title + " - ONLYOFFICE";
|
||||
}
|
||||
|
||||
if (event.data.favorite !== undefined) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
@ -355,10 +359,33 @@
|
||||
users = <%=(String) request.getAttribute("usersForMentions")%>;
|
||||
}
|
||||
|
||||
docEditor.setUsers({
|
||||
if ((c === "protect" || c === "mention") && users && event.data.count) {
|
||||
let from = event.data.from;
|
||||
let count = event.data.count;
|
||||
let search = event.data.search;
|
||||
if (from != 0) users = [];
|
||||
var resultCount = 234;
|
||||
for (var i = Math.max(users.length, from); i < Math.min(from + count, resultCount); i++){
|
||||
users.push({
|
||||
email: "test@test.test" + (i + 1),
|
||||
id: "id" + (i + 1),
|
||||
name: "test_" + search + (i + 1)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var result = {
|
||||
"c": c,
|
||||
"users": users,
|
||||
});
|
||||
};
|
||||
if (resultCount) {
|
||||
// support v9.0
|
||||
result.total = 1 + (!event.data.count || users.length < event.data.count ? 0 : (event.data.from + event.data.count));
|
||||
// since v9.0.1
|
||||
result.isPaginated = true;
|
||||
}
|
||||
|
||||
docEditor.setUsers(result);
|
||||
};
|
||||
|
||||
var onRequestSendNotify = function(event) { // the user is mentioned in a comment
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -366,10 +366,7 @@
|
||||
<span class="errorPass"></span>
|
||||
<br />
|
||||
</div>
|
||||
<span id="step3" class="step">3. Loading editor scripts.</span>
|
||||
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
<br />
|
||||
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<div class="error-message">
|
||||
@ -414,7 +411,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" data-docs="<%= ConfigManager.getProperty("files.docservice.url.site") + ConfigManager.getProperty("files.docservice.url.preloader") %>"></span>
|
||||
<iframe id="iframeScripts" src="<%= ConfigManager.getProperty("files.docservice.url.site") + ConfigManager.getProperty("files.docservice.url.preloader") %>" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
|
||||
|
||||
<footer>
|
||||
<div class="center">
|
||||
@ -422,7 +419,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
<a href="https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
|
||||
@ -126,7 +126,7 @@ if (typeof jQuery !== "undefined") {
|
||||
|
||||
if (!formatManager.isAutoConvertible(posExt)) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -181,36 +181,16 @@ if (typeof jQuery !== "undefined") {
|
||||
if (response.step && response.step < 100) {
|
||||
checkConvert(filePass, fileType);
|
||||
} else {
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
var loadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = "<iframe id=\"iframeScripts\" width=1 height=1 style=\"position: absolute; visibility: hidden;\" ></iframe>";
|
||||
jq("#loadScripts").html(frame);
|
||||
document.getElementById("iframeScripts").onload = onloadScripts;
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
} else {
|
||||
onloadScripts();
|
||||
}
|
||||
};
|
||||
|
||||
var onloadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("done").removeClass("current");
|
||||
var onuploaded = function () {
|
||||
jq("#beginView, #beginEmbedded").removeClass("disable");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
@ -272,7 +252,7 @@ if (typeof jQuery !== "undefined") {
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
@ -353,7 +333,7 @@ if (typeof jQuery !== "undefined") {
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(fileName);
|
||||
jq("#convertStep1").addClass("done");
|
||||
jq("#convertStep1").addClass("error");
|
||||
jq("#convertStep2").addClass("waiting");
|
||||
});
|
||||
|
||||
@ -363,6 +343,7 @@ if (typeof jQuery !== "undefined") {
|
||||
let fileExt = jq(`#${id}`).attr("data");
|
||||
jq(`#${id}`).addClass("orange");
|
||||
jq("td[name='convertingTypeButton']").addClass("disable");
|
||||
jq("#convertStep1").removeClass("error").addClass("done");
|
||||
jq("#convertStep2").removeClass("waiting").removeClass("done").addClass("current");
|
||||
jq("#convertStep2").text('2. File conversion');
|
||||
jq("#convert-descr").removeClass("disable");
|
||||
|
||||
@ -14,7 +14,7 @@ See the detailed guide to learn how to [install Document Server for Windows](htt
|
||||
|
||||
### Step 2. Download the Node.js code for the editors integration
|
||||
|
||||
Download the [Node.js example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
Download the [Node.js example](https://api.onlyoffice.com/docs/docs-api/samples/language-specific-examples/) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *config/default.json* file:
|
||||
|
||||
@ -26,7 +26,7 @@ To connect the editors to your website, specify the path to the editors installa
|
||||
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed, the **storageFolder** and **storagePath** are the paths where files will be created and stored. You can set an absolute path. For example, *D:\\\\folder*. Please note that on Windows OS the double backslash must be used as a separator.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *\views\editor.ejs* file.
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/docs/docs-api/usage-api/advanced-parameters/) in the *\views\editor.ejs* file.
|
||||
|
||||
### Step 3. Install Node.js environment
|
||||
|
||||
|
||||
@ -177,6 +177,7 @@ app.delete('/forgotten', (req, res) => { // define a handler for removing forgot
|
||||
}
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||
res.write('Server error');
|
||||
res.status(500).send();
|
||||
}
|
||||
@ -282,7 +283,7 @@ app.post('/upload', (req, res) => { // define a handler for uploading files
|
||||
form.parse(req, (err, fields, files) => { // parse this form
|
||||
if (err) { // if an error occurs
|
||||
// DocManager.cleanFolderRecursive(uploadDirTmp, true); // clean the folder with temporary files
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' }); // and write the error status and message to the response
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.write(`{ "error": "${err.message}"}`);
|
||||
res.end();
|
||||
return;
|
||||
@ -291,7 +292,7 @@ app.post('/upload', (req, res) => { // define a handler for uploading files
|
||||
const file = files.uploadedFile[0];
|
||||
|
||||
if (file === undefined) { // if file parameter is undefined
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' }); // write the error status and message to the response
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.write('{ "error": "Uploaded file not found"}');
|
||||
res.end();
|
||||
return;
|
||||
@ -302,7 +303,7 @@ app.post('/upload', (req, res) => { // define a handler for uploading files
|
||||
// check if the file size exceeds the maximum file size
|
||||
if (fileSizeLimit < file.size || file.size <= 0) {
|
||||
// DocManager.cleanFolderRecursive(uploadDirTmp, true); // clean the folder with temporary files
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.write('{ "error": "File size is incorrect"}');
|
||||
res.end();
|
||||
return;
|
||||
@ -314,7 +315,7 @@ app.post('/upload', (req, res) => { // define a handler for uploading files
|
||||
|
||||
if (exts.indexOf(curExt) === -1 || fileUtility.getFormatActions(curExt).length === 0) {
|
||||
// DocManager.cleanFolderRecursive(uploadDirTmp, true); // if not, clean the folder with temporary files
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' }); // and write the error status and message to the response
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.write('{ "error": "File type is not supported"}');
|
||||
res.end();
|
||||
return;
|
||||
@ -322,7 +323,7 @@ app.post('/upload', (req, res) => { // define a handler for uploading files
|
||||
|
||||
fileSystem.rename(file.filepath, `${uploadDir}/${file.originalFilename}`, (error) => { // rename a file
|
||||
// DocManager.cleanFolderRecursive(uploadDirTmp, true); // clean the folder with temporary files
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
if (error) { // if an error occurs
|
||||
res.write(`{ "error": "${error}"}`); // write an error message to the response
|
||||
} else {
|
||||
@ -391,6 +392,7 @@ app.post('/create', (req, res) => {
|
||||
});
|
||||
} catch (e) {
|
||||
res.status(500);
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.write(JSON.stringify({
|
||||
error: 1,
|
||||
message: e.message,
|
||||
@ -520,6 +522,7 @@ app.get('/files', (req, res) => { // define a handler for getting files informat
|
||||
res.write(JSON.stringify(filesInDirectoryInfo)); // transform files information into the json string
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
res.setHeader('Content-Type', 'text/plain');
|
||||
res.write('Server error');
|
||||
}
|
||||
res.end();
|
||||
@ -535,6 +538,7 @@ app.get('/files/file/:fileId', (req, res) => { // define a handler for getting f
|
||||
res.write(JSON.stringify(fileInfoById));
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
res.setHeader('Content-Type', 'text/plain');
|
||||
res.write('Server error');
|
||||
}
|
||||
res.end();
|
||||
@ -553,9 +557,11 @@ app.delete('/file', (req, res) => { // define a handler for removing file
|
||||
req.DocManager.cleanFolderRecursive(req.DocManager.storagePath(''), false);
|
||||
}
|
||||
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.write('{"success":true}');
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||
res.write('Server error');
|
||||
}
|
||||
res.end();
|
||||
@ -723,6 +729,7 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
try {
|
||||
if (!req.DocManager.existsSync(req.DocManager.storagePath(fileName, userAddress))) {
|
||||
console.log(`callbackProcessSave error: name = ${fileName} userAddress = ${userAddress} is not exist`);
|
||||
response.setHeader('Content-Type', 'application/json');
|
||||
response.write('{"error":1, "message":"file is not exist"}');
|
||||
response.end();
|
||||
return;
|
||||
@ -760,7 +767,7 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
}
|
||||
}
|
||||
|
||||
const changeshistory = body.changeshistory || JSON.stringify(body.history);
|
||||
const changeshistory = JSON.stringify(body.history);
|
||||
if (changeshistory) {
|
||||
// get the path to the file with document changes
|
||||
const pathChangesJson = req.DocManager.changesPath(newFileName, userAddress, version);
|
||||
@ -784,11 +791,13 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
}
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
response.setHeader('Content-Type', 'application/json');
|
||||
response.write(`{"error":1,"message":${JSON.stringify(ex)}}`);
|
||||
response.end();
|
||||
return;
|
||||
}
|
||||
|
||||
response.setHeader('Content-Type', 'application/json');
|
||||
response.write('{"error":0}');
|
||||
response.end();
|
||||
};
|
||||
@ -796,6 +805,7 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
// file saving process
|
||||
const processSave = async function processSave(downloadUri, body, fileName, userAddress) {
|
||||
if (!downloadUri) {
|
||||
response.setHeader('Content-Type', 'application/json');
|
||||
response.write('{"error":1,"message":"save uri is empty"}');
|
||||
response.end();
|
||||
return;
|
||||
@ -913,6 +923,7 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
return;
|
||||
}
|
||||
|
||||
response.setHeader('Content-Type', 'application/json');
|
||||
response.write('{"error":0}');
|
||||
response.end();
|
||||
};
|
||||
@ -920,6 +931,7 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
// file force saving process
|
||||
const processForceSave = async function processForceSave(downloadUri, body, fileName, userAddress) {
|
||||
if (!downloadUri) {
|
||||
response.setHeader('Content-Type', 'application/json');
|
||||
response.write('{"error":1,"message":"forcesave uri is empty"}');
|
||||
response.end();
|
||||
return;
|
||||
@ -973,6 +985,7 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
return;
|
||||
}
|
||||
|
||||
response.setHeader('Content-Type', 'application/json');
|
||||
response.write('{"error":0}');
|
||||
response.end();
|
||||
};
|
||||
@ -1012,6 +1025,7 @@ app.post('/track', async (req, res) => { // define a handler for tracking file c
|
||||
}
|
||||
}
|
||||
if (!body) {
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.write('{"error":1,"message":"body is empty"}');
|
||||
res.end();
|
||||
return;
|
||||
@ -1070,6 +1084,7 @@ app.get('/config', async (req, res) => {
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
res.status(500);
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||
res.write('error');
|
||||
}
|
||||
res.end();
|
||||
@ -1241,6 +1256,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
|
||||
protect: !user.deniedPermissions.includes('protect'),
|
||||
goback: user.goback != null ? user.goback : '',
|
||||
close: user.close,
|
||||
featuresTips: userid === 'uid-0',
|
||||
},
|
||||
dataInsertImage: {
|
||||
fileType: 'svg',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.13.0",
|
||||
"version": "1.14.0",
|
||||
"log": {
|
||||
"appenders": [
|
||||
{
|
||||
@ -20,7 +20,7 @@
|
||||
"commandUrl": "command",
|
||||
"converterUrl": "converter",
|
||||
"apiUrl": "web-apps/apps/api/documents/api.js",
|
||||
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html",
|
||||
"preloaderUrl": "web-apps/apps/api/documents/preload.html",
|
||||
"exampleUrl": null,
|
||||
"storageFolder": "./files",
|
||||
"storagePath": "/files",
|
||||
@ -83,6 +83,7 @@
|
||||
"sv": "Swedish",
|
||||
"tr": "Turkish",
|
||||
"uk": "Ukrainian",
|
||||
"ur": "Urdu",
|
||||
"vi": "Vietnamese",
|
||||
"aa-AA": "Test Language"
|
||||
}
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
{
|
||||
"server": {
|
||||
"port": 3000,
|
||||
"siteUrl": "http://127.0.0.1:8000/",
|
||||
"apiUrl": "web-apps/apps/api/documents/api.js",
|
||||
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html"
|
||||
"siteUrl": "http://127.0.0.1:8000/"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
{
|
||||
"server": {
|
||||
"port": 3000,
|
||||
"siteUrl": "http://127.0.0.1:8000/",
|
||||
"apiUrl": "web-apps/apps/api/documents/api.js",
|
||||
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html"
|
||||
"siteUrl": "http://127.0.0.1:8000/"
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,6 @@
|
||||
{
|
||||
"server": {
|
||||
"port": 80,
|
||||
"siteUrl": "http://127.0.0.1:8000/",
|
||||
"apiUrl": "web-apps/apps/api/documents/api.js",
|
||||
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html"
|
||||
"siteUrl": "http://127.0.0.1:8000/"
|
||||
}
|
||||
}
|
||||
@ -533,7 +533,8 @@ DocManager.prototype.getHistory = function getHistory(fileName, content, keyVers
|
||||
let createdFromJson = null;
|
||||
if (fileContent) { // if content is defined
|
||||
if (fileContent.changes && fileContent.changes.length) { // and there are some modifications in the content
|
||||
contentJson = fileContent.changes[fileContent.changes.length - 1]; // write these modifications to the json content
|
||||
// write these modifications to the json content
|
||||
contentJson = fileContent.changes[fileContent.changes.length - 1];
|
||||
} else if (fileContent.length) {
|
||||
[contentJson] = fileContent; // otherwise, write original content to the json content
|
||||
oldVersion = true; // and note that this is an old version
|
||||
|
||||
@ -103,7 +103,7 @@ const descrUser0 = [
|
||||
'Doesn\'t belong to any group',
|
||||
'Can review all the changes',
|
||||
'Can perform all actions with comments',
|
||||
'Can\'t see anyone’s information',
|
||||
'Can\'t see anyone\'s information',
|
||||
'The file favorite state is undefined',
|
||||
'Can\'t mention others in comments',
|
||||
'Can\'t create new files from the editor',
|
||||
@ -115,6 +115,7 @@ const descrUser0 = [
|
||||
'Can\'t start filling',
|
||||
'Has empty role',
|
||||
'Can\'t submit forms',
|
||||
'Tour of tips when opening a document',
|
||||
];
|
||||
|
||||
const users = [
|
||||
@ -156,7 +157,7 @@ const users = [
|
||||
{ text: 'Go to Documents' },
|
||||
{},
|
||||
true,
|
||||
[ 'Anyone' ],
|
||||
['Anyone'],
|
||||
),
|
||||
new User(
|
||||
'uid-3',
|
||||
@ -178,7 +179,7 @@ const users = [
|
||||
null,
|
||||
{},
|
||||
false,
|
||||
[ 'role' ],
|
||||
['role'],
|
||||
),
|
||||
new User('uid-0', null, null, null, null, {}, [], null, ['protect'], descrUser0, false, false, null, null, false, []),
|
||||
];
|
||||
|
||||
@ -30,28 +30,37 @@ exports.isValidToken = async (req, res, next) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const isValid = wopiValidator.check(
|
||||
{
|
||||
url: `${req.protocol}://${req.get('host')}${req.originalUrl || req.url}`,
|
||||
accessToken: req.query.access_token,
|
||||
timestamp: req.headers[reqConsts.requestHeaders.Timestamp.toLowerCase()],
|
||||
},
|
||||
{
|
||||
proof: req.headers[reqConsts.requestHeaders.Proof.toLowerCase()],
|
||||
proofold: req.headers[reqConsts.requestHeaders.ProofOld.toLowerCase()],
|
||||
},
|
||||
{
|
||||
modulus: proofKey.modulus,
|
||||
exponent: proofKey.exponent,
|
||||
oldmodulus: proofKey.oldmodulus,
|
||||
oldexponent: proofKey.oldexponent,
|
||||
},
|
||||
);
|
||||
const timestamp = req.headers[reqConsts.requestHeaders.Timestamp.toLowerCase()];
|
||||
const proof = req.headers[reqConsts.requestHeaders.Proof.toLowerCase()];
|
||||
const proofold = req.headers[reqConsts.requestHeaders.ProofOld.toLowerCase()];
|
||||
|
||||
let isValid = false;
|
||||
if (!timestamp || !proof || !proofold) {
|
||||
console.warn(`Proof keys: timestamp ${timestamp} , proof ${proof} , proofold ${proofold}`);
|
||||
} else {
|
||||
isValid = wopiValidator.check(
|
||||
{
|
||||
url: `${req.DocManager.getServerPath()}${req.originalUrl || req.url}`,
|
||||
accessToken: req.query.access_token,
|
||||
timestamp: timestamp,
|
||||
},
|
||||
{
|
||||
proof: proof,
|
||||
proofold: proofold,
|
||||
},
|
||||
{
|
||||
modulus: proofKey.modulus,
|
||||
exponent: proofKey.exponent,
|
||||
oldmodulus: proofKey.oldmodulus,
|
||||
oldexponent: proofKey.oldexponent,
|
||||
},
|
||||
);
|
||||
}
|
||||
if (isValid) {
|
||||
next();
|
||||
} else {
|
||||
console.warn('Proof key verification failed');
|
||||
res.status(500).send('Not verified');
|
||||
res.status(403).send('Not verified');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
69
web/documentserver-example/nodejs/package-lock.json
generated
69
web/documentserver-example/nodejs/package-lock.json
generated
@ -16,7 +16,7 @@
|
||||
"ejs": "^3.1.10",
|
||||
"express": "^4.21.1",
|
||||
"fast-xml-parser": "^4.4.1",
|
||||
"formidable": "^3.2.4",
|
||||
"formidable": "^3.5.4",
|
||||
"he": "^1.2.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"jwa": "^2.0.0",
|
||||
@ -145,6 +145,18 @@
|
||||
"rsa-pem-from-mod-exp": "^0.8.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@noble/hashes": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
|
||||
"integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^14.21.3 || >=16"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@ -180,6 +192,15 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@paralleldrive/cuid2": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.2.2.tgz",
|
||||
"integrity": "sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@noble/hashes": "^1.1.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/json5": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
@ -1495,14 +1516,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/formidable": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/formidable/-/formidable-3.5.1.tgz",
|
||||
"integrity": "sha512-WJWKelbRHN41m5dumb0/k8TeAx7Id/y3a+Z7QfhxP/htI9Js5zYaEDtG8uMgG0vM0lOlqnmjE99/kfpOYi/0Og==",
|
||||
"version": "3.5.4",
|
||||
"resolved": "https://registry.npmjs.org/formidable/-/formidable-3.5.4.tgz",
|
||||
"integrity": "sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@paralleldrive/cuid2": "^2.2.2",
|
||||
"dezalgo": "^1.0.4",
|
||||
"hexoid": "^1.0.0",
|
||||
"once": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/tunnckoCore/commissions"
|
||||
}
|
||||
@ -1797,14 +1822,6 @@
|
||||
"he": "bin/he"
|
||||
}
|
||||
},
|
||||
"node_modules/hexoid": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz",
|
||||
"integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/http-errors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||
@ -3782,6 +3799,11 @@
|
||||
"rsa-pem-from-mod-exp": "^0.8.4"
|
||||
}
|
||||
},
|
||||
"@noble/hashes": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
|
||||
"integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@ -3808,6 +3830,14 @@
|
||||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@paralleldrive/cuid2": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.2.2.tgz",
|
||||
"integrity": "sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==",
|
||||
"requires": {
|
||||
"@noble/hashes": "^1.1.5"
|
||||
}
|
||||
},
|
||||
"@types/json5": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
@ -4810,12 +4840,12 @@
|
||||
}
|
||||
},
|
||||
"formidable": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/formidable/-/formidable-3.5.1.tgz",
|
||||
"integrity": "sha512-WJWKelbRHN41m5dumb0/k8TeAx7Id/y3a+Z7QfhxP/htI9Js5zYaEDtG8uMgG0vM0lOlqnmjE99/kfpOYi/0Og==",
|
||||
"version": "3.5.4",
|
||||
"resolved": "https://registry.npmjs.org/formidable/-/formidable-3.5.4.tgz",
|
||||
"integrity": "sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==",
|
||||
"requires": {
|
||||
"@paralleldrive/cuid2": "^2.2.2",
|
||||
"dezalgo": "^1.0.4",
|
||||
"hexoid": "^1.0.0",
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
@ -5019,11 +5049,6 @@
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
|
||||
},
|
||||
"hexoid": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz",
|
||||
"integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g=="
|
||||
},
|
||||
"http-errors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"ejs": "^3.1.10",
|
||||
"express": "^4.21.1",
|
||||
"fast-xml-parser": "^4.4.1",
|
||||
"formidable": "^3.2.4",
|
||||
"formidable": "^3.5.4",
|
||||
"he": "^1.2.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"jwa": "^2.0.0",
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
var language;
|
||||
var userid;
|
||||
var directUrl;
|
||||
var formatManager;
|
||||
var formatManager = new FormatManager();
|
||||
|
||||
window.onload = function () {
|
||||
fetch('formats')
|
||||
@ -38,7 +38,12 @@ window.onload = function () {
|
||||
});
|
||||
formatManager = new FormatManager(formats);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
|
||||
jq("#loadScripts").html(frame);
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
}
|
||||
|
||||
if (typeof jQuery != "undefined") {
|
||||
@ -139,7 +144,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
if (!formatManager.isAutoConvertible(posExt)) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -198,36 +203,16 @@ if (typeof jQuery != "undefined") {
|
||||
if (typeof response.step != "undefined" && response.step < 100) {
|
||||
checkConvert(filePass, fileType);
|
||||
} else {
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
var loadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
|
||||
jq("#loadScripts").html(frame);
|
||||
document.getElementById("iframeScripts").onload = onloadScripts;
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
} else {
|
||||
onloadScripts();
|
||||
}
|
||||
};
|
||||
|
||||
var onloadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("done").removeClass("current");
|
||||
var onuploaded = function () {
|
||||
jq("#beginView, #beginEmbedded").removeClass("disable");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
@ -276,7 +261,7 @@ if (typeof jQuery != "undefined") {
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
onuploaded();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
@ -394,7 +379,7 @@ if (typeof jQuery != "undefined") {
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(fileName);
|
||||
jq("#convertStep1").addClass("done");
|
||||
jq("#convertStep1").addClass("error");
|
||||
jq("#convertStep2").addClass("waiting");
|
||||
});
|
||||
|
||||
@ -404,6 +389,7 @@ if (typeof jQuery != "undefined") {
|
||||
let fileExt = jq(`#${id}`).attr("data");
|
||||
jq(`#${id}`).addClass("orange");
|
||||
jq("td[name='convertingTypeButton']").addClass("disable");
|
||||
jq("#convertStep1").removeClass("error").addClass("done");
|
||||
jq("#convertStep2").removeClass("waiting").removeClass("done").addClass("current");
|
||||
jq("#convertStep2").text('2. File conversion');
|
||||
jq("#convert-descr").removeClass("disable");
|
||||
|
||||
@ -41,6 +41,9 @@
|
||||
"comments": true,
|
||||
"close": <%- JSON.stringify(editor.close) %>,
|
||||
"feedback": true,
|
||||
"features": {
|
||||
"featuresTips": <%- editor.featuresTips %>
|
||||
},
|
||||
"forcesave": false,
|
||||
"goback": <%- JSON.stringify(editor.goback) %>,
|
||||
"submitForm": <%- editor.submitForm %>
|
||||
|
||||
@ -94,6 +94,10 @@
|
||||
};
|
||||
|
||||
var onMetaChange = function (event) { // the meta information of the document is changed via the meta command
|
||||
if (event.data.title !== undefined) {
|
||||
document.title = event.data.title + " - ONLYOFFICE";
|
||||
}
|
||||
|
||||
if (event.data.favorite !== undefined) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
@ -252,10 +256,33 @@
|
||||
users = <%- JSON.stringify(usersForMentions) %>;
|
||||
}
|
||||
|
||||
docEditor.setUsers({
|
||||
if ((c === "protect" || c === "mention") && users && event.data.count) {
|
||||
let from = event.data.from;
|
||||
let count = event.data.count;
|
||||
let search = event.data.search;
|
||||
if (from != 0) users = [];
|
||||
var resultCount = 234;
|
||||
for (var i = Math.max(users.length, from); i < Math.min(from + count, resultCount); i++){
|
||||
users.push({
|
||||
email: "test@test.test" + (i + 1),
|
||||
id: "id" + (i + 1),
|
||||
name: "test_" + search + (i + 1)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var result = {
|
||||
"c": c,
|
||||
"users": users,
|
||||
});
|
||||
};
|
||||
if (resultCount) {
|
||||
// support v9.0
|
||||
result.total = 1 + (!event.data.count || users.length < event.data.count ? 0 : (event.data.from + event.data.count));
|
||||
// since v9.0.1
|
||||
result.isPaginated = true;
|
||||
}
|
||||
|
||||
docEditor.setUsers(result);
|
||||
};
|
||||
|
||||
var onRequestSendNotify = function(event) { // the user is mentioned in a comment
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user