Merge pull request 'release/1.14.0' from release/1.14.0 into master

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/69
This commit is contained in:
Sergey Linnik
2025-07-01 14:09:50 +00:00
29 changed files with 125 additions and 78 deletions

View File

@ -1,5 +1,17 @@
# Change Log # Change Log
## 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
- ur skin language
- change preload.html address
## 1.13.0 ## 1.13.0
- nodejs: rename in wopi - nodejs: rename in wopi
- nodejs: using faviconUrl from WOPI discovery - nodejs: using faviconUrl from WOPI discovery

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<appSettings> <appSettings>
<clear /> <clear />
<add key="version" value="1.13.0"/> <add key="version" value="1.14.0"/>
<add key="filesize-max" value="52428800"/> <add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/> <add key="storage-path" value=""/>
@ -17,13 +17,13 @@
<add key="files.docservice.verify-peer-off" value="true"/> <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.site" value="http://documentserver/"/>
<add key="files.docservice.url.converter" value="converter"/> <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.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.command" value="command"/>
<add key="files.docservice.url.example" value=""/> <add key="files.docservice.url.example" value=""/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<appSettings> <appSettings>
<clear /> <clear />
<add key="version" value="1.13.0"/> <add key="version" value="1.14.0"/>
<add key="filesize-max" value="52428800"/> <add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/> <add key="storage-path" value=""/>
@ -16,13 +16,13 @@
<add key="files.docservice.token.useforrequest" value="true" /> <add key="files.docservice.token.useforrequest" value="true" />
<add key="files.docservice.token.expires-in" value="5"/> <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.site" value="http://documentserver/"/>
<add key="files.docservice.url.converter" value="converter"/> <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.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.command" value="command"/>
<add key="files.docservice.url.example" value=""/> <add key="files.docservice.url.example" value=""/>

View File

@ -1,5 +1,5 @@
{ {
"VERSION": "1.13.0", "VERSION": "1.14.0",
"SERVER_ADDRESS" : "", "SERVER_ADDRESS" : "",
"SERVER_PORT" : 3000, "SERVER_PORT" : 3000,
@ -7,7 +7,7 @@
"DOC_SERVER_HOST" : "http://documentserver/", "DOC_SERVER_HOST" : "http://documentserver/",
"DOC_SERVER_CONVERTER_URL" : "converter", "DOC_SERVER_CONVERTER_URL" : "converter",
"DOC_SERVER_API_URL" : "web-apps/apps/api/documents/api.js", "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", "DOC_SERVER_COMMAND_URL" : "command",
"JWT_IS_ENABLED" : false, "JWT_IS_ENABLED" : false,
@ -67,6 +67,7 @@
"sv": "Swedish", "sv": "Swedish",
"tr": "Turkish", "tr": "Turkish",
"uk": "Ukrainian", "uk": "Ukrainian",
"ur": "Urdu",
"vi": "Vietnamese", "vi": "Vietnamese",
"aa-AA": "Test Language" "aa-AA": "Test Language"
} }

View File

@ -1,4 +1,4 @@
server.version=1.13.0 server.version=1.14.0
server.address= server.address=
server.port=4000 server.port=4000
@ -15,7 +15,7 @@ files.docservice.history.postfix=-hist
files.docservice.url.example= 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.url=http://documentserver/
docservice.ignoreSSLCertificate=false docservice.ignoreSSLCertificate=false

View File

@ -1,4 +1,4 @@
version=1.13.0 version=1.14.0
filesize-max=5242880 filesize-max=5242880
storage-folder=app_data storage-folder=app_data
@ -11,10 +11,10 @@ files.docservice.url.site=http://documentserver/
files.docservice.url.converter=converter files.docservice.url.converter=converter
files.docservice.url.command=command files.docservice.url.command=command
files.docservice.url.api=web-apps/apps/api/documents/api.js 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.preloader=web-apps/apps/api/documents/preload.html
files.docservice.url.example= 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
files.docservice.secret= files.docservice.secret=
files.docservice.header=Authorization files.docservice.header=Authorization

View File

@ -1139,6 +1139,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
const { reviewGroups } = user; const { reviewGroups } = user;
const { commentGroups } = user; const { commentGroups } = user;
const { userInfoGroups } = user; const { userInfoGroups } = user;
const userRoles = user.roles;
const usersInfo = []; const usersInfo = [];
const usersForProtect = []; const usersForProtect = [];
@ -1180,7 +1181,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
let submitForm = false; let submitForm = false;
if (mode !== 'view') { if (mode !== 'view') {
submitForm = userid === 'uid-1'; submitForm = user.canSubmitForm;
} }
if (user.goback != null) { if (user.goback != null) {
@ -1226,6 +1227,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
userImage: user.avatar ? `${req.DocManager.getServerUrl()}/images/${user.id}.png` : null, userImage: user.avatar ? `${req.DocManager.getServerUrl()}/images/${user.id}.png` : null,
name, name,
userGroup, userGroup,
userRoles,
reviewGroups: JSON.stringify(reviewGroups), reviewGroups: JSON.stringify(reviewGroups),
commentGroups: JSON.stringify(commentGroups), commentGroups: JSON.stringify(commentGroups),
userInfoGroups: JSON.stringify(userInfoGroups), userInfoGroups: JSON.stringify(userInfoGroups),

View File

@ -1,5 +1,5 @@
{ {
"version": "1.13.0", "version": "1.14.0",
"log": { "log": {
"appenders": [ "appenders": [
{ {
@ -20,7 +20,7 @@
"commandUrl": "command", "commandUrl": "command",
"converterUrl": "converter", "converterUrl": "converter",
"apiUrl": "web-apps/apps/api/documents/api.js", "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, "exampleUrl": null,
"storageFolder": "./files", "storageFolder": "./files",
"storagePath": "/files", "storagePath": "/files",
@ -83,6 +83,7 @@
"sv": "Swedish", "sv": "Swedish",
"tr": "Turkish", "tr": "Turkish",
"uk": "Ukrainian", "uk": "Ukrainian",
"ur": "Urdu",
"vi": "Vietnamese", "vi": "Vietnamese",
"aa-AA": "Test Language" "aa-AA": "Test Language"
} }

View File

@ -1,8 +1,6 @@
{ {
"server": { "server": {
"port": 3000, "port": 3000,
"siteUrl": "http://127.0.0.1:8000/", "siteUrl": "http://127.0.0.1:8000/"
"apiUrl": "web-apps/apps/api/documents/api.js",
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html"
} }
} }

View File

@ -1,8 +1,6 @@
{ {
"server": { "server": {
"port": 3000, "port": 3000,
"siteUrl": "http://127.0.0.1:8000/", "siteUrl": "http://127.0.0.1:8000/"
"apiUrl": "web-apps/apps/api/documents/api.js",
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html"
} }
} }

View File

@ -1,8 +1,6 @@
{ {
"server": { "server": {
"port": 80, "port": 80,
"siteUrl": "http://127.0.0.1:8000/", "siteUrl": "http://127.0.0.1:8000/"
"apiUrl": "web-apps/apps/api/documents/api.js",
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html"
} }
} }

View File

@ -32,6 +32,8 @@ class User {
avatar, avatar,
goback, goback,
close, close,
canSubmitForm,
roles,
) { ) {
this.id = id; this.id = id;
this.name = name; this.name = name;
@ -47,6 +49,8 @@ class User {
this.avatar = avatar; this.avatar = avatar;
this.goback = goback; this.goback = goback;
this.close = close; this.close = close;
this.canSubmitForm = canSubmitForm;
this.roles = roles;
} }
} }
@ -60,6 +64,8 @@ const descrUser1 = [
'Can see the information about all users', 'Can see the information about all users',
'Can submit forms', 'Can submit forms',
'Has an avatar', 'Has an avatar',
'Has no roles',
'Can start filling',
]; ];
const descrUser2 = [ const descrUser2 = [
@ -69,8 +75,10 @@ const descrUser2 = [
'This file is marked as favorite', 'This file is marked as favorite',
'Can create new files from the editor', 'Can create new files from the editor',
'Can see the information about users from Group2 and users who dont belong to any group', 'Can see the information about users from Group2 and users who dont belong to any group',
'Cant submit forms', 'Can submit forms',
'Has an avatar', 'Has an avatar',
'Has role "Anyone"',
'Can start filling',
]; ];
const descrUser3 = [ const descrUser3 = [
@ -86,6 +94,8 @@ const descrUser3 = [
'Cant submit forms', 'Cant submit forms',
'Cant close history', 'Cant close history',
'Cant restore the file version', 'Cant restore the file version',
'Has role "role"',
'Can start filling',
]; ];
const descrUser0 = [ const descrUser0 = [
@ -103,6 +113,8 @@ const descrUser0 = [
'View file without collaboration', 'View file without collaboration',
'Cant submit forms', 'Cant submit forms',
'Cant refresh outdated file', 'Cant refresh outdated file',
'Has empty role',
'Cant start filling',
]; ];
const users = [ const users = [
@ -121,6 +133,8 @@ const users = [
true, true,
{ blank: false }, { blank: false },
{ visible: false }, { visible: false },
true,
null,
), ),
new User( new User(
'uid-2', 'uid-2',
@ -141,6 +155,8 @@ const users = [
true, true,
{ text: 'Go to Documents' }, { text: 'Go to Documents' },
{}, {},
true,
['Anyone'],
), ),
new User( new User(
'uid-3', 'uid-3',
@ -161,8 +177,10 @@ const users = [
false, false,
null, null,
{}, {},
false,
['role'],
), ),
new User('uid-0', null, null, null, null, {}, [], null, ['protect'], descrUser0, false, false, null, null), new User('uid-0', null, null, null, null, {}, [], null, ['protect'], descrUser0, false, false, null, null, false, []),
]; ];
// get a list of all the users // get a list of all the users

View File

@ -32,7 +32,7 @@ exports.isValidToken = async (req, res, next) => {
const isValid = wopiValidator.check( const isValid = wopiValidator.check(
{ {
url: `${req.protocol}://${req.get('host')}${req.originalUrl || req.url}`, url: `${req.DocManager.getServerPath()}${req.originalUrl || req.url}`,
accessToken: req.query.access_token, accessToken: req.query.access_token,
timestamp: req.headers[reqConsts.requestHeaders.Timestamp.toLowerCase()], timestamp: req.headers[reqConsts.requestHeaders.Timestamp.toLowerCase()],
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -19,7 +19,7 @@
var language; var language;
var userid; var userid;
var directUrl; var directUrl;
var formatManager; var formatManager = new FormatManager();
window.onload = function () { window.onload = function () {
fetch('formats') fetch('formats')
@ -38,7 +38,12 @@ window.onload = function () {
}); });
formatManager = new FormatManager(formats); 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") { if (typeof jQuery != "undefined") {
@ -139,7 +144,7 @@ if (typeof jQuery != "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -199,35 +204,14 @@ if (typeof jQuery != "undefined") {
checkConvert(filePass, fileType); checkConvert(filePass, fileType);
} else { } else {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = 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");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -276,7 +260,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -60,7 +60,8 @@
"group": "<%- editor.userGroup %>", "group": "<%- editor.userGroup %>",
"id": "<%- editor.userid %>", "id": "<%- editor.userid %>",
"image": "<%- editor.userImage %>", "image": "<%- editor.userImage %>",
"name": "<%- editor.name %>" "name": "<%- editor.name %>",
"roles": <%- JSON.stringify(editor.userRoles) %>
} }
}, },
"height": "100%", "height": "100%",

View File

@ -225,10 +225,33 @@
users = <%- JSON.stringify(usersForMentions) %>; 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, "c": c,
"users": users, "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 var onRequestSendNotify = function(event) { // the user is mentioned in a comment
@ -368,6 +391,18 @@
}; };
}; };
var onRequestStartFilling = function(event) {
var data = event.data;
var submit = confirm("Start filling?\n" + JSON.stringify(data));
if (submit) {
docEditor.startFilling(true);
}
};
var onStartFilling = function(event) {
innerAlert("The form is ready to fill out.");
};
var onDocumentReady = function(){ var onDocumentReady = function(){
fixSize(); fixSize();
}; };
@ -402,6 +437,8 @@
config.events.onRequestReferenceData = onRequestReferenceData; config.events.onRequestReferenceData = onRequestReferenceData;
config.events.onRequestReferenceSource = onRequestReferenceSource; config.events.onRequestReferenceSource = onRequestReferenceSource;
config.events.onRequestRefreshFile = onRequestRefreshFile; config.events.onRequestRefreshFile = onRequestRefreshFile;
config.events.onRequestStartFilling = onRequestStartFilling;
config.events.onStartFilling = onStartFilling;
if (<%- JSON.stringify(editor.userid) %> != "uid-3") { if (<%- JSON.stringify(editor.userid) %> != "uid-3") {
config.events.onRequestHistoryClose = onRequestHistoryClose; config.events.onRequestHistoryClose = onRequestHistoryClose;
config.events.onRequestRestore = onRequestRestore; config.events.onRequestRestore = onRequestRestore;

View File

@ -322,10 +322,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </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" /> <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> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">

View File

@ -235,11 +235,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </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" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<br /> <br />

View File

@ -16,7 +16,7 @@ DOCUMENT_STORAGE_DISPLAY_FORGOTTEN_PAGE=false
## DOCUMENT SERVER ENV VARIABLES ## DOCUMENT SERVER ENV VARIABLES
DOCUMENT_SERVER_VERSION=1.13.0 DOCUMENT_SERVER_VERSION=1.14.0
DOCUMENT_SERVER_PUBLIC_URL=http://localhost:8080 DOCUMENT_SERVER_PUBLIC_URL=http://localhost:8080
DOCUMENT_SERVER_PRIVATE_URL=http://proxy:8080 DOCUMENT_SERVER_PRIVATE_URL=http://proxy:8080
@ -24,7 +24,7 @@ DOCUMENT_SERVER_PRIVATE_URL=http://proxy:8080
DOCUMENT_SERVER_API_PATH=web-apps/apps/api/documents/api.js DOCUMENT_SERVER_API_PATH=web-apps/apps/api/documents/api.js
DOCUMENT_SERVER_COMMAND_PATH=command DOCUMENT_SERVER_COMMAND_PATH=command
DOCUMENT_SERVER_CONVERTER_PATH=converter DOCUMENT_SERVER_CONVERTER_PATH=converter
DOCUMENT_SERVER_PRELOADER_PATH=web-apps/apps/api/documents/cache-scripts.html DOCUMENT_SERVER_PRELOADER_PATH=web-apps/apps/api/documents/preload.html
DOCUMENT_SERVER_JWT_HEADER=Authorization DOCUMENT_SERVER_JWT_HEADER=Authorization
DOCUMENT_SERVER_JWT_ALGORITHM=HS256 DOCUMENT_SERVER_JWT_ALGORITHM=HS256

View File

@ -32,7 +32,7 @@ class SettingsManager extends OnlyOfficeSettingsManager
$publicServerUrl = rtrim(env('DOCUMENT_SERVER_PUBLIC_URL', 'http://documentserver'), '/'); $publicServerUrl = rtrim(env('DOCUMENT_SERVER_PUBLIC_URL', 'http://documentserver'), '/');
$privateServerUrl = rtrim(env('DOCUMENT_SERVER_PRIVATE_URL', $publicServerUrl), '/'); $privateServerUrl = rtrim(env('DOCUMENT_SERVER_PRIVATE_URL', $publicServerUrl), '/');
$apiUrl = $publicServerUrl.'/'.env('DOCUMENT_SERVER_API_PATH', 'web-apps/apps/api/documents/api.js'); $apiUrl = $publicServerUrl.'/'.env('DOCUMENT_SERVER_API_PATH', 'web-apps/apps/api/documents/api.js');
$preloaderUrl = $publicServerUrl.'/'.env('DOCUMENT_SERVER_PRELOADER_PATH', 'web-apps/apps/api/documents/cache-scripts.html'); $preloaderUrl = $publicServerUrl.'/'.env('DOCUMENT_SERVER_PRELOADER_PATH', 'web-apps/apps/api/documents/preload.html');
$conversionUrl = $privateServerUrl.'/'.env('DOCUMENT_SERVER_CONVERTER_PATH', 'convert'); $conversionUrl = $privateServerUrl.'/'.env('DOCUMENT_SERVER_CONVERTER_PATH', 'convert');
$commandUrl = $privateServerUrl.'/'.env('DOCUMENT_SERVER_COMMAND_PATH', 'command'); $commandUrl = $privateServerUrl.'/'.env('DOCUMENT_SERVER_COMMAND_PATH', 'command');
$jwtSecret = env('DOCUMENT_SERVER_JWT_SECRET', 'secret'); $jwtSecret = env('DOCUMENT_SERVER_JWT_SECRET', 'secret');

View File

@ -64,6 +64,7 @@ class LanguageRepository
'sv' => 'Swedish', 'sv' => 'Swedish',
'tr' => 'Turkish', 'tr' => 'Turkish',
'uk' => 'Ukrainian', 'uk' => 'Ukrainian',
'ur' => 'Urdu',
'vi' => 'Vietnamese', 'vi' => 'Vietnamese',
'aa-AA' => 'Test Language', 'aa-AA' => 'Test Language',
]; ];

View File

@ -22,7 +22,7 @@ use Example\Common\URL;
class ConfigurationManager class ConfigurationManager
{ {
public string $version = '1.13.0'; public string $version = '1.14.0';
public function getVersion(): string public function getVersion(): string
{ {
@ -65,7 +65,7 @@ class ConfigurationManager
{ {
$serverURL = $this->documentServerPublicURL(); $serverURL = $this->documentServerPublicURL();
$path = getenv('DOCUMENT_SERVER_PRELOADER_PATH') $path = getenv('DOCUMENT_SERVER_PRELOADER_PATH')
?: 'web-apps/apps/api/documents/cache-scripts.html'; ?: 'web-apps/apps/api/documents/preload.html';
return $serverURL->joinPath($path); return $serverURL->joinPath($path);
} }
@ -222,6 +222,7 @@ class ConfigurationManager
'sv' => 'Swedish', 'sv' => 'Swedish',
'tr' => 'Turkish', 'tr' => 'Turkish',
'uk' => 'Ukrainian', 'uk' => 'Ukrainian',
'ur' => 'Urdu',
'vi' => 'Vietnamese', 'vi' => 'Vietnamese',
'aa-AA' => 'Test Language' 'aa-AA' => 'Test Language'
]; ];

View File

@ -42,7 +42,7 @@ final class ConfigurationManagerDocumentServerPreloaderURLTests extends TestCase
$configManager = new ConfigurationManager(); $configManager = new ConfigurationManager();
$url = $configManager->documentServerPreloaderURL(); $url = $configManager->documentServerPreloaderURL();
$this->assertEquals( $this->assertEquals(
'http://documentserver/web-apps/apps/api/documents/cache-scripts.html', 'http://documentserver/web-apps/apps/api/documents/preload.html',
$url->string() $url->string()
); );
} }

View File

@ -22,7 +22,7 @@ from src.common import string
class ConfigurationManager: class ConfigurationManager:
version = '1.13.0' version = '1.14.0'
def getVersion(self) -> str: def getVersion(self) -> str:
return self.version return self.version
@ -61,7 +61,7 @@ class ConfigurationManager:
base_url = server_url.geturl() base_url = server_url.geturl()
path = ( path = (
environ.get('DOCUMENT_SERVER_PRELOADER_PATH') or environ.get('DOCUMENT_SERVER_PRELOADER_PATH') or
'/web-apps/apps/api/documents/cache-scripts.html' '/web-apps/apps/api/documents/preload.html'
) )
url = urljoin(base_url, path) url = urljoin(base_url, path)
return urlparse(url) return urlparse(url)
@ -173,6 +173,7 @@ class ConfigurationManager:
'sv': 'Swedish', 'sv': 'Swedish',
'tr': 'Turkish', 'tr': 'Turkish',
'uk': 'Ukrainian', 'uk': 'Ukrainian',
'ur': 'Urdu',
'vi': 'Vietnamese', 'vi': 'Vietnamese',
'aa-AA': 'Test Language' 'aa-AA': 'Test Language'
} }

View File

@ -114,7 +114,7 @@ class ConfigurationManagerDocumentServerPreloaderURLTests(TestCase):
url = config_manager.document_server_preloader_url() url = config_manager.document_server_preloader_url()
self.assertEqual( self.assertEqual(
url.geturl(), url.geturl(),
'http://localhost/web-apps/apps/api/documents/cache-scripts.html' 'http://localhost/web-apps/apps/api/documents/preload.html'
) )
@patch.object( @patch.object(

View File

@ -31,7 +31,7 @@ class ConfigurationManager
sig { void } sig { void }
def initialize def initialize
@version = '1.13.0' @version = '1.14.0'
end end
sig { returns(T.nilable(URI::Generic)) } sig { returns(T.nilable(URI::Generic)) }
@ -68,7 +68,7 @@ class ConfigurationManager
def document_server_preloader_uri def document_server_preloader_uri
path = path =
ENV['DOCUMENT_SERVER_PRELOADER_PATH'] || ENV['DOCUMENT_SERVER_PRELOADER_PATH'] ||
'/web-apps/apps/api/documents/cache-scripts.html' '/web-apps/apps/api/documents/preload.html'
URI.join(document_server_public_uri, path) URI.join(document_server_public_uri, path)
end end
@ -198,6 +198,7 @@ class ConfigurationManager
sv: 'Swedish', sv: 'Swedish',
tr: 'Turkish', tr: 'Turkish',
uk: 'Ukrainian', uk: 'Ukrainian',
ur: 'Urdu',
vi: 'Vietnamese', vi: 'Vietnamese',
'aa-AA': 'Test Language' 'aa-AA': 'Test Language'
} }

View File

@ -127,7 +127,7 @@ class ConfigurationManagerDocumentServerPreloaderURITests < Test::Unit::TestCase
uri = config_manager.document_server_preloader_uri uri = config_manager.document_server_preloader_uri
assert_equal( assert_equal(
uri.to_s, uri.to_s,
'http://documentserver/web-apps/apps/api/documents/cache-scripts.html' 'http://documentserver/web-apps/apps/api/documents/preload.html'
) )
end end