Merge remote-tracking branch 'remotes/origin/release/v8.1.0' into develop

# Conflicts:
#	CHANGELOG.md
#	web/documentserver-example/java-spring/src/main/resources/application.properties
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/nodejs/views/wopiIndex.ejs
This commit is contained in:
Sergey Linnik
2024-06-07 08:49:20 +03:00
17 changed files with 35 additions and 23 deletions

4
.gitmodules vendored
View File

@ -1,11 +1,11 @@
[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/en-8.1
[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/v8.0
branch = feature/v8.1
[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

View File

@ -2,16 +2,20 @@
- forgotten files
- java-spring: using java docs-integration-sdk
- en-GB, sr-Cyrl-RS skin languages
- save as for pdf
- fill permission in embedded mode
- delete all files
- handling conversion -9 error
- nodejs: wopi formsubmit icon
- nodejs: tabs menu
- change insert image
- different goback for users
- nodejs: converting function on index page
- nodejs: filling by default
- en-GB, sr-Cyrl-RS skin languages
- nodejs: docxf, oform as pdf documentType
- switching from filling to editing
- nodejs: creating pdf instead docxf
- fill permission in embedded mode
- nodejs: wopi formsubmit icon
- nodejs: close editor
## 1.8.0

View File

@ -68,7 +68,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("editorsMode=view\&?", "i"), "");
location.href = location.href.replace(RegExp("editorsMode=\\w+\&?", "i"), "") + "&editorsMode=edit";
};
// an error or some other specific event occurs

View File

@ -86,7 +86,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("editorsMode=view\&?", "i"), "");
location.href = location.href.replace(RegExp("editorsMode=\\w+\&?", "i"), "") + "&editorsMode=edit";
};
// an error or some other specific event occurs

View File

@ -52,7 +52,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("\&?action=view", "i"), "");
location.href = location.href.replace(RegExp("\&?action=\\w+", "i"), "") + "&action=edit";
};
// an error or some other specific event occurs

View File

@ -58,7 +58,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
location.href = location.href.replace(RegExp("mode=\\w+\&?", "i"), "") + "&mode=edit";
};
// an error or some other specific event occurs

View File

@ -1019,7 +1019,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
const fName = req.DocManager.createDemo(!!req.query.sample, fileExt, userid, name, false);
// get the redirect path
const redirectPath = `${req.DocManager.getServerUrl()}/editor?fileName=`
const redirectPath = `${req.DocManager.getServerUrl()}/editor?mode=edit&fileName=`
+ `${encodeURIComponent(fName)}${req.DocManager.getCustomParams()}`;
res.redirect(redirectPath);
return;
@ -1095,11 +1095,13 @@ 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);
let mode = req.query.mode || 'edit'; // mode: view/edit/review/comment/fillForms/embedded
let canFill = fileUtility.getFillExtensions().indexOf(fileExt.slice(1)) !== -1 // check if this file can be filled
let mode = req.query.mode || (canFill ? 'fillForms' : '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')
&& fileUtility.getFillExtensions().indexOf(fileExt.slice(1)) !== -1) {
&& canFill) {
mode = 'fillForms';
canEdit = true;
}
@ -1108,7 +1110,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
}
let submitForm = false;
if (mode === 'fillForms') {
if (mode === 'fillForms' || mode === "embedded") {
submitForm = userid === 'uid-1';
}

View File

@ -1 +0,0 @@
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 3c0-1.65685 1.34315-3 3-3h20l7 7v30c0 1.6569-1.3431 3-3 3H3c-1.65685 0-3-1.3431-3-3V3z" fill="#27ABA3"/><path d="M23 0l7 7h-4c-1.6569 0-3-1.34315-3-3V0z" fill="#008078"/><path fill-rule="evenodd" clip-rule="evenodd" d="M24 14H6v7h18v-7zm-.8182 5.9978H6.81818V15H23.1818v4.9978zM24 23H6v7h18v-7zm-.8182 5.9978H6.81818V24H23.1818v4.9978z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 463 B

View File

@ -0,0 +1,5 @@
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 3C0 1.34315 1.34315 0 3 0H23L30 7V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#9E1919"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.0062 15V16.0065H24V15H17.0062ZM17.0062 19V20.0163H24V19H17.0062ZM24 23H17.0062V24.0261H24V23ZM6 28V27.0293H24V28H6ZM7 16H14V23H7V16ZM6 15H7H14H15V16V23V24H14H7H6V23V16V15Z" fill="white"/>
<path d="M23 0L30 7H26C24.3431 7 23 5.65685 23 4V0Z" fill="black" fill-opacity="0.25"/>
</svg>

After

Width:  |  Height:  |  Size: 558 B

View File

@ -166,7 +166,7 @@ label .checkbox {
.try-editor.docxf,
.try-editor.form {
background-image: url("../images/file_docxf.svg");
background-image: url("../images/file_pdf.svg");
}
.side-option {

View File

@ -74,7 +74,7 @@
};
var onRequestEditRights = function () { // the user is trying to switch the document from the viewing into the editing mode
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
location.href = location.href.replace(RegExp("mode=\\w+\&?", "i"), "") + "&mode=edit";
};
var onRequestHistory = function (event) { // the user is trying to show the document version history

View File

@ -58,7 +58,7 @@
<a class="try-editor slide reload-page action-link" target="_blank" href="editor?fileExt=pptx" title="Create new presentation">Presentation</a>
</li>
<li>
<a class="try-editor form reload-page action-link" target="_blank" href="editor?fileExt=docxf" title="Create new PDF form">PDF form</a>
<a class="try-editor form reload-page action-link" target="_blank" href="editor?fileExt=pdf" title="Create new PDF form">PDF form</a>
</li>
</ul>
<label class="side-option">
@ -178,13 +178,15 @@
</td>
<% if (storedFiles[i].canEdit) { %>
<td class="contentCells contentCells-icon">
<a class="action-link" href="editor?type=desktop&fileName=<%= encodeURIComponent(storedFiles[i].name) %>" target="_blank">
<a class="action-link" href="editor?type=desktop&mode=edit&fileName=<%= encodeURIComponent(storedFiles[i].name) %>" target="_blank">
<img src="images/desktop.svg" alt="Open in editor for full size screens" title="Open in editor for full size screens" /></a>
</td>
<% if (storedFiles[i].documentType !== "pdf") { %>
<td class="contentCells contentCells-icon">
<a class="action-link" href="editor?type=desktop&mode=comment&fileName=<%= encodeURIComponent(storedFiles[i].name) %>" target="_blank">
<img src="images/comment.svg" alt="Open in editor for comment" title="Open in editor for comment" /></a>
</td>
<% } %>
<% if (storedFiles[i].documentType == "word") { %>
<td class="contentCells contentCells-icon">
<a class="action-link" href="editor?type=desktop&mode=review&fileName=<%= encodeURIComponent(storedFiles[i].name) %>" target="_blank">

View File

@ -67,7 +67,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("action=view\&?", "i"), "");
location.href = location.href.replace(RegExp("action=\\w+\&?", "i"), "") + "&action=edit";
};
// an error or some other specific event occurs

View File

@ -64,7 +64,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
location.href = location.href.replace(RegExp("mode=\\w+\&?", "i"), "") + "&mode=edit";
};
// an error or some other specific event occurs

View File

@ -49,7 +49,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("editorsMode=view\&?", "i"), "");
location.href = location.href.replace(RegExp("editorsMode=\\w+\&?", "i"), "") + "&editorsMode=edit";
};
// an error or some other specific event occurs