Skip to content

Commit

Permalink
Merge pull request #579 from ONLYOFFICE/release/v1.9.0
Browse files Browse the repository at this point in the history
Release/1.9.0
  • Loading branch information
LinneyS authored Jul 2, 2024
2 parents 333981c + 052f73e commit b363881
Show file tree
Hide file tree
Showing 39 changed files with 109 additions and 52 deletions.
1 change: 0 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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/v8.0
[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
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# Change Log

## 1.9.0
- nodejs: filling by default
- nodejs: docxf, oform as pdf documentType
- nodejs: creating and editing pdf instead docxf
- nodejs: wopi formsubmit icon
- nodejs: close editor
- en-GB, sr-Cyrl-RS skin languages
- switching from filling to editing
- fill permission in embedded mode

## 1.8.0
- nodejs: pdf, djvu, xps, oxps as pdf documentType
- nodejs: filling pdf
- version number to page meta
- ar skin languages
- sr-Latn-CS skin languages
- sr-Latn-RS skin languages
- getting history via api
- using a repo with a list of formats
- convert after uploading only tagged formats
Expand Down
2 changes: 1 addition & 1 deletion web/documentserver-example/csharp-mvc/Models/FileModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public string GetDocConfig(HttpRequest request, UrlHelper url)
{ "download", !user.deniedPermissions.Contains("download") },
{ "edit", canEdit && (editorsMode == "edit" || editorsMode == "view" || editorsMode == "filter" || editorsMode == "blockcontent") },
{ "print", !user.deniedPermissions.Contains("print") },
{ "fillForms", editorsMode != "view" && editorsMode != "comment" && editorsMode != "embedded" && editorsMode != "blockcontent" },
{ "fillForms", editorsMode != "view" && editorsMode != "comment" && editorsMode != "blockcontent" },
{ "modifyFilter", editorsMode != "filter" },
{ "modifyContentControl", editorsMode != "blockcontent" },
{ "review", canEdit && (editorsMode == "edit" || editorsMode == "review") },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions web/documentserver-example/csharp-mvc/web.appsettings.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<appSettings>
<clear />
<add key="version" value="1.8.0"/>
<add key="version" value="1.9.0"/>

<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
Expand All @@ -15,7 +15,7 @@

<add key="files.docservice.verify-peer-off" value="true"/>

<add key="files.docservice.languages" value="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|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-Latn-CS:Serbian|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|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"/>

<add key="files.docservice.url.site" value="http://documentserver/"/>

Expand Down
2 changes: 1 addition & 1 deletion web/documentserver-example/csharp/DocEditor.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web/documentserver-example/csharp/DocEditor.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ protected void Page_Load(object sender, EventArgs e)
{ "download", !user.deniedPermissions.Contains("download") },
{ "edit", canEdit && (editorsMode == "edit" || editorsMode =="view" || editorsMode == "filter" || editorsMode == "blockcontent") },
{ "print", !user.deniedPermissions.Contains("print") },
{ "fillForms", editorsMode != "view" && editorsMode != "comment" && editorsMode != "embedded" && editorsMode != "blockcontent" },
{ "fillForms", editorsMode != "view" && editorsMode != "comment" && editorsMode != "blockcontent" },
{ "modifyFilter", editorsMode != "filter" },
{ "modifyContentControl", editorsMode != "blockcontent" },
{ "review", canEdit && (editorsMode == "edit" || editorsMode == "review") },
Expand Down
4 changes: 2 additions & 2 deletions web/documentserver-example/csharp/settings.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<clear />
<add key="version" value="1.8.0"/>
<add key="version" value="1.9.0"/>

<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
Expand All @@ -14,7 +14,7 @@

<add key="files.docservice.token.useforrequest" value="true" />

<add key="files.docservice.languages" value="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|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-Latn-CS:Serbian|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|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"/>

<add key="files.docservice.url.site" value="http://documentserver/"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ private Permission updatePermissions(final Permission userPermissions, final Act
userPermissions.setFillForms(
!action.equals(Action.view)
&& !action.equals(Action.comment)
&& !action.equals(Action.embedded)
&& !action.equals(Action.blockcontent)
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server.version=1.8.0
server.version=1.9.0

server.address=
server.port=4000
Expand All @@ -25,7 +25,7 @@ files.docservice.token-use-for-request=true

files.docservice.verify-peer-off=true

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|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-Latn-CS:Serbian|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|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

spring.datasource.url=jdbc:h2:mem:usersdb
spring.datasource.driverClassName=org.h2.Driver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public Permissions(final String modeParam, final String typeParam, final Boolean
edit = canEdit && (modeParam.equals("edit") || modeParam.equals("view") || modeParam.equals("filter")
|| modeParam.equals("blockcontent"));
print = !user.getDeniedPermissions().contains("print");
fillForms = !modeParam.equals("view") && !modeParam.equals("comment") && !modeParam.equals("embedded")
fillForms = !modeParam.equals("view") && !modeParam.equals("comment")
&& !modeParam.equals("blockcontent");
modifyFilter = !modeParam.equals("filter");
modifyContentControl = !modeParam.equals("blockcontent");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=1.8.0
version=1.9.0

filesize-max=5242880
storage-folder=app_data
Expand All @@ -13,7 +13,7 @@ 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|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-Latn-CS:Serbian|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|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
Expand Down
2 changes: 1 addition & 1 deletion web/documentserver-example/java/src/main/webapp/editor.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions web/documentserver-example/nodejs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,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;
Expand All @@ -999,11 +999,14 @@ 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

// 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 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;
}
Expand All @@ -1012,7 +1015,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';
}

Expand Down Expand Up @@ -1041,7 +1044,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
chat: userid !== 'uid-0',
coEditing: mode === 'view' && userid === 'uid-0' ? { mode: 'strict', change: false } : null,
comment: mode !== 'view' && mode !== 'fillForms' && mode !== 'embedded' && mode !== 'blockcontent',
fillForms: mode !== 'view' && mode !== 'comment' && mode !== 'embedded' && mode !== 'blockcontent',
fillForms: mode !== 'view' && mode !== 'comment' && mode !== 'blockcontent',
modifyFilter: mode !== 'filter',
modifyContentControl: mode !== 'blockcontent',
copy: !user.deniedPermissions.includes('copy'),
Expand All @@ -1067,6 +1070,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
? JSON.stringify({ fileName, userAddress: req.DocManager.curUserHostAddress() }) : null,
instanceId: userid !== 'uid-0' ? req.DocManager.getInstanceId() : null,
protect: !user.deniedPermissions.includes('protect'),
close: user.close,
},
dataInsertImage: {
fileType: 'png',
Expand Down
6 changes: 4 additions & 2 deletions web/documentserver-example/nodejs/config/default.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.0",
"version": "1.9.0",
"log": {
"appenders": [
{
Expand Down Expand Up @@ -51,6 +51,7 @@
"cs": "Czech",
"da": "Danish",
"nl": "Dutch",
"en-GB": "English (United Kingdom)",
"fi": "Finnish",
"fr": "French",
"gl": "Galego",
Expand All @@ -70,7 +71,8 @@
"pt-PT": "Portuguese (Portugal)",
"ro": "Romanian",
"ru": "Russian",
"sr-Latn-CS": "Serbian",
"sr-Cyrl-RS": "Serbian (Cyrillic)",
"sr-Latn-RS": "Serbian (Latin)",
"si": "Sinhala (Sri Lanka)",
"sk": "Slovak",
"sl": "Slovenian",
Expand Down
22 changes: 20 additions & 2 deletions web/documentserver-example/nodejs/helpers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class User {
descriptions,
templates,
avatar,
close,
) {
this.id = id;
this.name = name;
Expand All @@ -43,6 +44,7 @@ class User {
this.descriptions = descriptions;
this.templates = templates;
this.avatar = avatar;
this.close = close;
}
}

Expand Down Expand Up @@ -99,7 +101,21 @@ const descrUser0 = [
];

const users = [
new User('uid-1', 'John Smith', '[email protected]', null, null, {}, null, null, [], descrUser1, true, true),
new User(
'uid-1',
'John Smith',
'[email protected]',
null,
null,
{},
null,
null,
[],
descrUser1,
true,
true,
{ visible: false },
),
new User(
'uid-2',
'Mark Pottato',
Expand All @@ -117,6 +133,7 @@ const users = [
descrUser2,
false,
true,
{},
),
new User(
'uid-3',
Expand All @@ -135,8 +152,9 @@ const users = [
descrUser3,
false,
false,
{},
),
new User('uid-0', null, null, null, null, {}, [], null, ['protect'], descrUser0, false, false),
new User('uid-0', null, null, null, null, {}, [], null, ['protect'], descrUser0, false, false, null),
];

// get a list of all the users
Expand Down

This file was deleted.

5 changes: 5 additions & 0 deletions web/documentserver-example/nodejs/public/images/file_pdf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ label .checkbox {
}

.try-editor.form {
background-image: url("../images/file_docxf.svg");
background-image: url("../images/file_pdf.svg");
}

.side-option {
Expand Down
1 change: 1 addition & 0 deletions web/documentserver-example/nodejs/views/config.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"customization": {
"about": true,
"comments": true,
"close": <%- JSON.stringify(editor.close) %>,
"feedback": true,
"forcesave": false,
"goback": {
Expand Down
Loading

0 comments on commit b363881

Please sign in to comment.