diff --git a/.gitmodules b/.gitmodules index d7f56c93b..7d814d355 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,21 +1,21 @@ [submodule "web/documentserver-example/nodejs/public/assets/document-templates"] path = web/documentserver-example/nodejs/public/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates - branch = main/en + branch = main/default [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 [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 - branch = main/en + branch = main/default [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 [submodule "web/documentserver-example/php/assets/document-templates"] path = web/documentserver-example/php/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates - branch = main/en + branch = main/default [submodule "web/documentserver-example/php/assets/document-formats"] path = web/documentserver-example/php/assets/document-formats url = https://github.com/ONLYOFFICE/document-formats @@ -23,19 +23,19 @@ [submodule "web/documentserver-example/python/assets/document-templates"] path = web/documentserver-example/python/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates - branch = main/en + branch = main/default [submodule "web/documentserver-example/java/src/main/resources/assets/document-templates"] path = web/documentserver-example/java/src/main/resources/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates - branch = main/en + branch = main/default [submodule "web/documentserver-example/ruby/assets/document-templates"] path = web/documentserver-example/ruby/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates - branch = main/en + branch = main/default [submodule "web/documentserver-example/java-spring/src/main/resources/assets/document-templates"] path = web/documentserver-example/java-spring/src/main/resources/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates - branch = main/en + branch = main/default [submodule "web/documentserver-example/python/assets/document-formats"] path = web/documentserver-example/python/assets/document-formats url = https://github.com/ONLYOFFICE/document-formats @@ -51,7 +51,7 @@ [submodule "web/documentserver-example/csharp/assets/document-templates"] path = web/documentserver-example/csharp/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates - branch = main/en + branch = main/default [submodule "web/documentserver-example/csharp/assets/document-formats"] path = web/documentserver-example/csharp/assets/document-formats url = https://github.com/ONLYOFFICE/document-formats diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b98e10c4..bb6458dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 1.11.0 +- he-IL skin language +- ConvertService.ashx address replaced with converter +- coauthoring/CommandService.ashx address replaced with command +- without submitForm in viewer + ## 1.10.0 - nodejs: converting function on index page - java-spring: using java docs-integration-sdk diff --git a/web/documentserver-example/csharp-mvc/Helpers/DocumentConverter.cs b/web/documentserver-example/csharp-mvc/Helpers/DocumentConverter.cs index 0ee440192..ff8880dfc 100644 --- a/web/documentserver-example/csharp-mvc/Helpers/DocumentConverter.cs +++ b/web/documentserver-example/csharp-mvc/Helpers/DocumentConverter.cs @@ -225,7 +225,7 @@ private static int GetResponseData(string jsonDocumentResponse, out Dictionary - + @@ -16,14 +16,14 @@ - + - + - + diff --git a/web/documentserver-example/csharp/DocEditor.aspx.cs b/web/documentserver-example/csharp/DocEditor.aspx.cs index cd878f9e7..dade52b34 100755 --- a/web/documentserver-example/csharp/DocEditor.aspx.cs +++ b/web/documentserver-example/csharp/DocEditor.aspx.cs @@ -154,7 +154,7 @@ protected void Page_Load(object sender, EventArgs e) editorsMode = "fillForms"; canEdit = true; } - var submitForm = (editorsMode.Equals("fillForms") || editorsMode.Equals("embedded")) && user.id.Equals("uid-1"); // check if the Submit form button is displayed or hidden + var submitForm = !editorsMode.Equals("view") && user.id.Equals("uid-1"); // check if the Submit form button is displayed or hidden var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // get the editor opening mode (edit or view) var jss = new JavaScriptSerializer(); diff --git a/web/documentserver-example/csharp/DocumentConverter.cs b/web/documentserver-example/csharp/DocumentConverter.cs index 580f77afb..2164a7442 100644 --- a/web/documentserver-example/csharp/DocumentConverter.cs +++ b/web/documentserver-example/csharp/DocumentConverter.cs @@ -227,7 +227,7 @@ private static int GetResponseData(string jsonDocumentResponse, out Dictionary - + @@ -15,14 +15,14 @@ - + - + - + diff --git a/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/sdk/service/ConfigServiceImpl.java b/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/sdk/service/ConfigServiceImpl.java index 2771d31ed..c66329397 100644 --- a/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/sdk/service/ConfigServiceImpl.java +++ b/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/sdk/service/ConfigServiceImpl.java @@ -93,7 +93,7 @@ public Config createConfig(final String fileId, final Action action, final Type Config config = super.createConfig(fileId, mode, type); - if ((currentAction.equals(Action.fillForms) || currentAction.equals(Action.embedded)) + if (!currentAction.equals(Action.view) && appUser.getPermissions().getSubmitForm()) { config.getEditorConfig().getCustomization().setSubmitForm(true); } diff --git a/web/documentserver-example/java-spring/src/main/resources/application.properties b/web/documentserver-example/java-spring/src/main/resources/application.properties index 28d7ae465..38624b00e 100755 --- a/web/documentserver-example/java-spring/src/main/resources/application.properties +++ b/web/documentserver-example/java-spring/src/main/resources/application.properties @@ -1,4 +1,4 @@ -server.version=1.10.0 +server.version=1.11.0 server.address= server.port=4000 @@ -15,7 +15,7 @@ files.docservice.history.postfix=-hist files.docservice.url.example= -files.docservice.languages=en:English|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|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|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 docservice.url=http://documentserver/ docservice.ignoreSSLCertificate=false diff --git a/web/documentserver-example/java-spring/src/main/resources/assets/document-templates b/web/documentserver-example/java-spring/src/main/resources/assets/document-templates index c9fc1ee6b..53e2d9e0a 160000 --- a/web/documentserver-example/java-spring/src/main/resources/assets/document-templates +++ b/web/documentserver-example/java-spring/src/main/resources/assets/document-templates @@ -1 +1 @@ -Subproject commit c9fc1ee6beac118a7d9472f971a61cd2eb285293 +Subproject commit 53e2d9e0af00844eea402f601678cf801559aa8d diff --git a/web/documentserver-example/java/src/main/java/entities/FileModel.java b/web/documentserver-example/java/src/main/java/entities/FileModel.java index 503ef39ef..1819ef612 100755 --- a/web/documentserver-example/java/src/main/java/entities/FileModel.java +++ b/web/documentserver-example/java/src/main/java/entities/FileModel.java @@ -164,7 +164,7 @@ public void changeType(final String modeParam, final String typeParam, final Use } // check if the Submit form button is displayed or not - if (mode.equals("fillForms") || mode.equals("embedded")) { + if (!mode.equals("view")) { editorConfig.getCustomization().setSubmitForm(user.getId().equals("uid-1")); } diff --git a/web/documentserver-example/java/src/main/resources/assets/document-templates b/web/documentserver-example/java/src/main/resources/assets/document-templates index c9fc1ee6b..53e2d9e0a 160000 --- a/web/documentserver-example/java/src/main/resources/assets/document-templates +++ b/web/documentserver-example/java/src/main/resources/assets/document-templates @@ -1 +1 @@ -Subproject commit c9fc1ee6beac118a7d9472f971a61cd2eb285293 +Subproject commit 53e2d9e0af00844eea402f601678cf801559aa8d diff --git a/web/documentserver-example/java/src/main/resources/settings.properties b/web/documentserver-example/java/src/main/resources/settings.properties index b21da57c8..51a890eec 100644 --- a/web/documentserver-example/java/src/main/resources/settings.properties +++ b/web/documentserver-example/java/src/main/resources/settings.properties @@ -1,4 +1,4 @@ -version=1.10.0 +version=1.11.0 filesize-max=5242880 storage-folder=app_data @@ -8,13 +8,13 @@ enable-forgotten=TRUE files.docservice.timeout=120000 files.docservice.url.site=http://documentserver/ -files.docservice.url.converter=ConvertService.ashx -files.docservice.url.command=coauthoring/CommandService.ashx +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.languages=en:English|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|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|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.secret= files.docservice.header=Authorization diff --git a/web/documentserver-example/nodejs/app.js b/web/documentserver-example/nodejs/app.js index 9c8bb3f85..002be5203 100755 --- a/web/documentserver-example/nodejs/app.js +++ b/web/documentserver-example/nodejs/app.js @@ -273,7 +273,9 @@ app.post('/upload', (req, res) => { // define a handler for uploading files const uploadDirTmp = path.join(uploadDir, 'tmp'); // and create directory for temporary files if it doesn't exist req.DocManager.createDirectory(uploadDirTmp); - const form = new formidable.IncomingForm(); // create a new incoming form + const fileSizeLimit = configServer.get('maxFileSize'); + // create a new incoming form + const form = new formidable.IncomingForm({ maxFileSize: fileSizeLimit, maxTotalFileSize: fileSizeLimit }); form.uploadDir = uploadDirTmp; // and write there all the necessary parameters form.keepExtensions = true; @@ -298,7 +300,7 @@ app.post('/upload', (req, res) => { // define a handler for uploading files file.originalFilename = req.DocManager.getCorrectName(file.originalFilename); // check if the file size exceeds the maximum file size - if (configServer.get('maxFileSize') < file.size || file.size <= 0) { + 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.write('{ "error": "File size is incorrect"}'); @@ -458,7 +460,7 @@ app.post('/convert', (req, res) => { // define a handler for converting files if (fileUtility.getFileType(correctName) !== null) { fileSystem.writeFileSync(req.DocManager.storagePath(correctName), data); } else { - writeResult(newFileUri.replace('http://localhost', siteUrl), result, 'FileTypeIsNotSupported'); + writeResult(newFileUri.replace('http://localhost/', siteUrl), result, 'FileTypeIsNotSupported'); return; } // remove file with the origin extension @@ -1101,14 +1103,11 @@ app.get('/editor', (req, res) => { // define a handler for editing document const key = req.DocManager.getKey(fileName); const url = req.DocManager.getDownloadUrl(fileName, true); const directUrl = req.DocManager.getDownloadUrl(fileName); - - // check if this file can be filled - const canFill = fileUtility.getFillExtensions().indexOf(fileExt.slice(1)) !== -1; - let mode = req.query.mode || (canFill ? 'fillForms' : 'edit'); // mode: view/edit/review/comment/fillForms/embedded + let mode = req.query.mode || 'edit'; // mode: view/edit/review/comment/fillForms/embedded let canEdit = fileUtility.getEditExtensions().indexOf(fileExt.slice(1)) !== -1; // check if this file can be edited if (((!canEdit && mode === 'edit') || mode === 'fillForms') - && canFill) { + && fileUtility.getFillExtensions().indexOf(fileExt.slice(1)) !== -1) { mode = 'fillForms'; canEdit = true; } @@ -1117,7 +1116,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document } let submitForm = false; - if (mode === 'fillForms' || mode === 'embedded') { + if (mode !== 'view') { submitForm = userid === 'uid-1'; } diff --git a/web/documentserver-example/nodejs/config/default.json b/web/documentserver-example/nodejs/config/default.json index 0c6ef9dfc..c42c270c2 100644 --- a/web/documentserver-example/nodejs/config/default.json +++ b/web/documentserver-example/nodejs/config/default.json @@ -1,5 +1,5 @@ { - "version": "1.10.0", + "version": "1.11.0", "log": { "appenders": [ { @@ -17,8 +17,8 @@ "wopi": { "discovery": "hosting/discovery" }, - "commandUrl": "coauthoring/CommandService.ashx", - "converterUrl": "ConvertService.ashx", + "commandUrl": "command", + "converterUrl": "converter", "apiUrl": "web-apps/apps/api/documents/api.js", "preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html", "exampleUrl": null, @@ -58,6 +58,7 @@ "gl": "Galego", "de": "German", "el": "Greek", + "he-IL": "Hebrew (Israel)", "hu": "Hungarian", "id": "Indonesian", "it": "Italian", diff --git a/web/documentserver-example/nodejs/public/assets/document-templates b/web/documentserver-example/nodejs/public/assets/document-templates index c9fc1ee6b..53e2d9e0a 160000 --- a/web/documentserver-example/nodejs/public/assets/document-templates +++ b/web/documentserver-example/nodejs/public/assets/document-templates @@ -1 +1 @@ -Subproject commit c9fc1ee6beac118a7d9472f971a61cd2eb285293 +Subproject commit 53e2d9e0af00844eea402f601678cf801559aa8d diff --git a/web/documentserver-example/nodejs/views/index.ejs b/web/documentserver-example/nodejs/views/index.ejs index 9abaa9262..a0544a4c8 100755 --- a/web/documentserver-example/nodejs/views/index.ejs +++ b/web/documentserver-example/nodejs/views/index.ejs @@ -196,14 +196,10 @@ Open in editor for full size screens - <% if (storedFiles[i].documentType !== "pdf") { %> Open in editor for comment - <% } else { %> - - <% } %> <% if (storedFiles[i].documentType == "word") { %> diff --git a/web/documentserver-example/php/assets/document-templates b/web/documentserver-example/php/assets/document-templates index c9fc1ee6b..53e2d9e0a 160000 --- a/web/documentserver-example/php/assets/document-templates +++ b/web/documentserver-example/php/assets/document-templates @@ -1 +1 @@ -Subproject commit c9fc1ee6beac118a7d9472f971a61cd2eb285293 +Subproject commit 53e2d9e0af00844eea402f601678cf801559aa8d diff --git a/web/documentserver-example/php/docker-compose.yml b/web/documentserver-example/php/docker-compose.yml index 590bc087b..c082640a8 100644 --- a/web/documentserver-example/php/docker-compose.yml +++ b/web/documentserver-example/php/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.8" services: documentserver: container_name: documentserver - image: onlyoffice/documentserver:8.0 + image: onlyoffice/documentserver:8.2 expose: - "80" environment: diff --git a/web/documentserver-example/php/src/configuration/ConfigurationManager.php b/web/documentserver-example/php/src/configuration/ConfigurationManager.php index d4ac30075..d2437347b 100644 --- a/web/documentserver-example/php/src/configuration/ConfigurationManager.php +++ b/web/documentserver-example/php/src/configuration/ConfigurationManager.php @@ -22,7 +22,7 @@ class ConfigurationManager { - public string $version = '1.10.0'; + public string $version = '1.11.0'; public function getVersion(): string { @@ -73,7 +73,7 @@ public function documentServerCommandURL(): URL { $serverURL = $this->documentServerPrivateURL(); $path = getenv('DOCUMENT_SERVER_COMMAND_PATH') - ?: 'coauthoring/CommandService.ashx'; + ?: 'command'; return $serverURL->joinPath($path); } @@ -81,7 +81,7 @@ public function documentServerConverterURL(): URL { $serverURL = $this->documentServerPrivateURL(); $path = getenv('DOCUMENT_SERVER_CONVERTER_PATH') - ?: 'ConvertService.ashx'; + ?: 'converter'; return $serverURL->joinPath($path); } @@ -188,6 +188,7 @@ public function languages(): array 'gl' => 'Galego', 'de' => 'German', 'el' => 'Greek', + 'he-IL' => 'Hebrew (Israel)', 'hu' => 'Hungarian', 'id' => 'Indonesian', 'it' => 'Italian', diff --git a/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerCommandURLTests.php b/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerCommandURLTests.php index 3e3746f08..27451c554 100644 --- a/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerCommandURLTests.php +++ b/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerCommandURLTests.php @@ -42,7 +42,7 @@ public function testAssignsADefaultValue() $configManager = new ConfigurationManager(); $url = $configManager->documentServerCommandURL(); $this->assertEquals( - 'http://documentserver/coauthoring/CommandService.ashx', + 'http://documentserver/command', $url->string() ); } diff --git a/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerConverterURLTests.php b/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerConverterURLTests.php index 796183856..67661ed09 100644 --- a/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerConverterURLTests.php +++ b/web/documentserver-example/php/src/configuration/ConfigurationManagerDocumentServerConverterURLTests.php @@ -42,7 +42,7 @@ public function testAssignsADefaultValue() $configManager = new ConfigurationManager(); $url = $configManager->documentServerConverterURL(); $this->assertEquals( - 'http://documentserver/ConvertService.ashx', + 'http://documentserver/converter', $url->string() ); } diff --git a/web/documentserver-example/php/src/views/DocEditorView.php b/web/documentserver-example/php/src/views/DocEditorView.php index 697b614bd..f0cf0cf4b 100644 --- a/web/documentserver-example/php/src/views/DocEditorView.php +++ b/web/documentserver-example/php/src/views/DocEditorView.php @@ -83,7 +83,7 @@ public function __construct($request, $tempName = "docEditor") } // check if the Submit form button is displayed or not - $submitForm = in_array($editorsMode, ["fillForms", "embedded"]) && $user->id == "uid-1"; + $submitForm = $editorsMode != "view" && $user->id == "uid-1"; $mode = $canEdit && $editorsMode != "view" ? "edit" : "view"; // define if the editing mode is edit or view $type = empty($request["type"]) ? "desktop" : $request["type"]; diff --git a/web/documentserver-example/python/assets/document-templates b/web/documentserver-example/python/assets/document-templates index c9fc1ee6b..53e2d9e0a 160000 --- a/web/documentserver-example/python/assets/document-templates +++ b/web/documentserver-example/python/assets/document-templates @@ -1 +1 @@ -Subproject commit c9fc1ee6beac118a7d9472f971a61cd2eb285293 +Subproject commit 53e2d9e0af00844eea402f601678cf801559aa8d diff --git a/web/documentserver-example/python/compose-base.yml b/web/documentserver-example/python/compose-base.yml index 2b8e839a2..ed293c9da 100644 --- a/web/documentserver-example/python/compose-base.yml +++ b/web/documentserver-example/python/compose-base.yml @@ -3,7 +3,7 @@ version: "3.8" services: documentserver: container_name: documentserver - image: onlyoffice/documentserver:8.0 + image: onlyoffice/documentserver:8.2 expose: - "80" environment: diff --git a/web/documentserver-example/python/src/configuration/configuration.py b/web/documentserver-example/python/src/configuration/configuration.py index 847ffc414..c78a0fc00 100644 --- a/web/documentserver-example/python/src/configuration/configuration.py +++ b/web/documentserver-example/python/src/configuration/configuration.py @@ -22,7 +22,7 @@ class ConfigurationManager: - version = '1.10.0' + version = '1.11.0' def getVersion(self) -> str: return self.version @@ -71,7 +71,7 @@ def document_server_command_url(self) -> ParseResult: base_url = server_url.geturl() path = ( environ.get('DOCUMENT_SERVER_COMMAND_PATH') or - '/coauthoring/CommandService.ashx' + '/command' ) url = urljoin(base_url, path) return urlparse(url) @@ -81,7 +81,7 @@ def document_server_converter_url(self) -> ParseResult: base_url = server_url.geturl() path = ( environ.get('DOCUMENT_SERVER_CONVERTER_PATH') or - '/ConvertService.ashx' + '/converter' ) url = urljoin(base_url, path) return urlparse(url) @@ -145,6 +145,7 @@ def languages(self) -> dict[str, str]: 'gl': 'Galego', 'de': 'German', 'el': 'Greek', + 'he-IL': 'Hebrew (Israel)', 'hu': 'Hungarian', 'id': 'Indonesian', 'it': 'Italian', diff --git a/web/documentserver-example/python/src/configuration/configuration_tests.py b/web/documentserver-example/python/src/configuration/configuration_tests.py index 3c86b380a..f150cf877 100644 --- a/web/documentserver-example/python/src/configuration/configuration_tests.py +++ b/web/documentserver-example/python/src/configuration/configuration_tests.py @@ -145,7 +145,7 @@ def test_assigns_a_default_value(self, _): url = config_manager.document_server_command_url() self.assertEqual( url.geturl(), - 'http://localhost/coauthoring/CommandService.ashx' + 'http://localhost/command' ) @patch.object( @@ -176,7 +176,7 @@ def test_assigns_a_default_value(self, _): url = config_manager.document_server_converter_url() self.assertEqual( url.geturl(), - 'http://localhost/ConvertService.ashx' + 'http://localhost/converter' ) @patch.object( diff --git a/web/documentserver-example/python/src/views/actions.py b/web/documentserver-example/python/src/views/actions.py index 46fa20bce..ac68f3abe 100755 --- a/web/documentserver-example/python/src/views/actions.py +++ b/web/documentserver-example/python/src/views/actions.py @@ -207,7 +207,7 @@ def edit(request): edMode = 'fillForms' canEdit = True # if the Submit form button is displayed or hidden - submitForm = edMode in ['fillForms', 'embedded'] and user.id == 'uid-1' + submitForm = edMode != 'view' and user.id == 'uid-1' mode = 'edit' if canEdit & (edMode != 'view') else 'view' # if the file can't be edited, the mode is view types = ['desktop', 'mobile', 'embedded'] diff --git a/web/documentserver-example/ruby/app/configuration/configuration.rb b/web/documentserver-example/ruby/app/configuration/configuration.rb index 6a4b11e3f..b4d442d6b 100644 --- a/web/documentserver-example/ruby/app/configuration/configuration.rb +++ b/web/documentserver-example/ruby/app/configuration/configuration.rb @@ -31,7 +31,7 @@ class ConfigurationManager sig { void } def initialize - @version = '1.10.0' + @version = '1.11.0' end sig { returns(T.nilable(URI::Generic)) } @@ -76,7 +76,7 @@ def document_server_preloader_uri def document_server_command_uri path = ENV['DOCUMENT_SERVER_COMMAND_PATH'] || - '/coauthoring/CommandService.ashx' + '/command' URI.join(document_server_private_uri, path) end @@ -84,7 +84,7 @@ def document_server_command_uri def document_server_converter_uri path = ENV['DOCUMENT_SERVER_CONVERTER_PATH'] || - '/ConvertService.ashx' + '/converter' URI.join(document_server_private_uri, path) end @@ -168,6 +168,7 @@ def languages gl: 'Galego', de: 'German', el: 'Greek', + 'he-IL': 'Hebrew (Israel)', hu: 'Hungarian', id: 'Indonesian', it: 'Italian', diff --git a/web/documentserver-example/ruby/app/configuration/configuration_tests.rb b/web/documentserver-example/ruby/app/configuration/configuration_tests.rb index 16189727e..b78f660ef 100644 --- a/web/documentserver-example/ruby/app/configuration/configuration_tests.rb +++ b/web/documentserver-example/ruby/app/configuration/configuration_tests.rb @@ -151,7 +151,7 @@ def test_assigns_a_default_value uri = config_manager.document_server_command_uri assert_equal( uri.to_s, - 'http://documentserver/coauthoring/CommandService.ashx' + 'http://documentserver/command' ) end @@ -175,7 +175,7 @@ def test_assigns_a_default_value uri = config_manager.document_server_converter_uri assert_equal( uri.to_s, - 'http://documentserver/ConvertService.ashx' + 'http://documentserver/converter' ) end diff --git a/web/documentserver-example/ruby/app/models/file_model.rb b/web/documentserver-example/ruby/app/models/file_model.rb index 69a596292..4019427fb 100755 --- a/web/documentserver-example/ruby/app/models/file_model.rb +++ b/web/documentserver-example/ruby/app/models/file_model.rb @@ -106,7 +106,7 @@ def config editors_mode = 'fillForms' can_edit = true end - submit_form = ['fillForms', 'embedded'].include?(editors_mode) && @user.id.eql?('uid-1') # Submit form button state + submit_form = !editors_mode.eql?('view') && @user.id.eql?('uid-1') # Submit form button state mode = can_edit && !editors_mode.eql?('view') ? 'edit' : 'view' # templates image url in the "From Template" section templates_image_url = DocumentHelper.get_template_image_url(document_type) diff --git a/web/documentserver-example/ruby/app/models/service_converter.rb b/web/documentserver-example/ruby/app/models/service_converter.rb index 09b83fbe5..bfe04e275 100755 --- a/web/documentserver-example/ruby/app/models/service_converter.rb +++ b/web/documentserver-example/ruby/app/models/service_converter.rb @@ -109,23 +109,23 @@ def self.process_convert_service_responce_error(error_code) # add an error message to the error message template depending on the error code case error_code when -9 - error_message = 'Error occurred in the ConvertService.ashx: Error conversion output format' + error_message = 'Error occurred in the ConvertService: Error conversion output format' when -8 - error_message = 'Error occurred in the ConvertService.ashx: Error document VKey' + error_message = 'Error occurred in the ConvertService: Error document VKey' when -7 - error_message = 'Error occurred in the ConvertService.ashx: Error document request' + error_message = 'Error occurred in the ConvertService: Error document request' when -6 - error_message = 'Error occurred in the ConvertService.ashx: Error database' + error_message = 'Error occurred in the ConvertService: Error database' when -5 - error_message = 'Error occurred in the ConvertService.ashx: Incorrect password' + error_message = 'Error occurred in the ConvertService: Incorrect password' when -4 - error_message = 'Error occurred in the ConvertService.ashx: Error download error' + error_message = 'Error occurred in the ConvertService: Error download error' when -3 - error_message = 'Error occurred in the ConvertService.ashx: Error convertation error' + error_message = 'Error occurred in the ConvertService: Error convertation error' when -2 - error_message = 'Error occurred in the ConvertService.ashx: Error convertation timeout' + error_message = 'Error occurred in the ConvertService: Error convertation timeout' when -1 - error_message = 'Error occurred in the ConvertService.ashx: Error convertation unknown' + error_message = 'Error occurred in the ConvertService: Error convertation unknown' when 0 # public const int c_nErrorNo = 0 else diff --git a/web/documentserver-example/ruby/assets/document-templates b/web/documentserver-example/ruby/assets/document-templates index c9fc1ee6b..53e2d9e0a 160000 --- a/web/documentserver-example/ruby/assets/document-templates +++ b/web/documentserver-example/ruby/assets/document-templates @@ -1 +1 @@ -Subproject commit c9fc1ee6beac118a7d9472f971a61cd2eb285293 +Subproject commit 53e2d9e0af00844eea402f601678cf801559aa8d diff --git a/web/documentserver-example/ruby/compose-base.yml b/web/documentserver-example/ruby/compose-base.yml index b0a4ba5a5..5b54f8f6c 100644 --- a/web/documentserver-example/ruby/compose-base.yml +++ b/web/documentserver-example/ruby/compose-base.yml @@ -3,7 +3,7 @@ version: "3.8" services: documentserver: container_name: documentserver - image: onlyoffice/documentserver:8.0 + image: onlyoffice/documentserver:8.2 expose: - "80" environment: