Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Linnik <sergey.linnik@onlyoffice.com>2022-06-16 12:52:54 +0300
committerGitHub <noreply@github.com>2022-06-16 12:52:54 +0300
commitb58253d9b5f48bead5a527e0b37ff34753a1235f (patch)
treede28df835b6ca6e60497d2bb89042b47a695539f
parent3dc70150bed0fbb09ae7bc64c7283a4f12935c4a (diff)
parent75425b77aec71080e3ae0436eb3e5b5171e5a83a (diff)
Merge pull request #647 from ONLYOFFICE/developv7.5.0
Release/7.5.0
-rw-r--r--CHANGELOG.md17
-rw-r--r--appinfo/application.php19
-rw-r--r--appinfo/info.xml4
-rw-r--r--appinfo/routes.php7
-rw-r--r--controller/callbackcontroller.php35
-rw-r--r--controller/editorapicontroller.php91
-rw-r--r--controller/editorcontroller.php11
-rw-r--r--controller/settingscontroller.php46
-rw-r--r--controller/sharingapicontroller.php228
-rw-r--r--css/main.css3
-rw-r--r--css/settings.css2
-rw-r--r--css/share.css48
-rw-r--r--css/viewer.css3
-rw-r--r--js/editor.js6
-rw-r--r--js/main.js195
-rw-r--r--js/settings.js15
-rw-r--r--js/share.js418
-rw-r--r--js/viewer.js67
-rw-r--r--l10n/bg.js14
-rw-r--r--l10n/bg.json14
-rw-r--r--l10n/ca.js131
-rw-r--r--l10n/ca.json129
-rw-r--r--l10n/de.js16
-rw-r--r--l10n/de.json16
-rw-r--r--l10n/de_DE.js16
-rw-r--r--l10n/de_DE.json16
-rw-r--r--l10n/es.js16
-rw-r--r--l10n/es.json16
-rw-r--r--l10n/fr.js16
-rw-r--r--l10n/fr.json16
-rw-r--r--l10n/it.js16
-rw-r--r--l10n/it.json16
-rw-r--r--l10n/ja.js16
-rw-r--r--l10n/ja.json16
-rw-r--r--l10n/pl.js14
-rw-r--r--l10n/pl.json14
-rw-r--r--l10n/pt_BR.js14
-rw-r--r--l10n/pt_BR.json14
-rw-r--r--l10n/ru.js16
-rw-r--r--l10n/ru.json16
-rw-r--r--l10n/sv.js14
-rw-r--r--l10n/sv.json16
-rw-r--r--l10n/zh_CN.js16
-rw-r--r--l10n/zh_CN.json16
-rw-r--r--lib/Migration/Version070400Date20220607111111.php89
-rw-r--r--lib/appconfig.php97
-rw-r--r--lib/directeditor.php1
-rw-r--r--lib/extrapermissions.php430
-rw-r--r--lib/hooks.php27
-rw-r--r--lib/listeners/filesharinglistener.php30
-rw-r--r--lib/listeners/fileslistener.php36
-rw-r--r--lib/listeners/viewerlistener.php34
-rw-r--r--lib/settingsdata.php45
-rw-r--r--templates/editor.php3
-rw-r--r--templates/settings.php44
-rw-r--r--templates/share.html9
56 files changed, 2414 insertions, 276 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce22134..96e03fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,22 @@
# Change Log
+## 7.5.0
+## Changed
+- fix viewer app
+- Nextcloud v22 is no longer supported
+- Nextcloud v23 is no longer supported
+
+## 7.4.0
+## Added
+- advanced access rights
+- macro launch setting
+- opening file location from viewer
+- Catalan translation
+- theme setting
+
+## Changed
+- fix editor lang
+
## 7.3.4
## Added
- Turkish and Galician empty file templates
diff --git a/appinfo/application.php b/appinfo/application.php
index c5c1ec8..3b3065a 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -44,6 +44,7 @@ use OCA\Onlyoffice\AppConfig;
use OCA\Onlyoffice\Controller\CallbackController;
use OCA\Onlyoffice\Controller\EditorController;
use OCA\Onlyoffice\Controller\EditorApiController;
+use OCA\Onlyoffice\Controller\SharingApiController;
use OCA\Onlyoffice\Controller\SettingsController;
use OCA\Onlyoffice\Controller\TemplateController;
use OCA\Onlyoffice\Listeners\FilesListener;
@@ -58,6 +59,7 @@ use OCA\Onlyoffice\Notifier;
use OCA\Onlyoffice\Preview;
use OCA\Onlyoffice\TemplateManager;
use OCA\Onlyoffice\TemplateProvider;
+use OCA\Onlyoffice\SettingsData;
use Psr\Container\ContainerInterface;
@@ -127,6 +129,10 @@ class Application extends App implements IBootstrap {
);
});
+ $context->registerService("SettingsData", function (ContainerInterface $c) {
+ return new SettingsData($this->appConfig);
+ });
+
// Controllers
$context->registerService("SettingsController", function (ContainerInterface $c) {
return new SettingsController(
@@ -158,6 +164,19 @@ class Application extends App implements IBootstrap {
);
});
+ $context->registerService("SharingApiController", function (ContainerInterface $c) {
+ return new SharingApiController(
+ $c->get("AppName"),
+ $c->get("Request"),
+ $c->get("RootStorage"),
+ $c->get("Logger"),
+ $c->get("UserSession"),
+ $c->get("UserManager"),
+ $c->get("IManager"),
+ $this->appConfig
+ );
+ });
+
$context->registerService("EditorApiController", function (ContainerInterface $c) {
return new EditorApiController(
$c->get("AppName"),
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 26a4479..6beac19 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,7 +6,7 @@
<description>ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.</description>
<licence>apache</licence>
<author mail="dev@onlyoffice.com" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
- <version>7.3.4</version>
+ <version>7.5.0</version>
<namespace>Onlyoffice</namespace>
<types>
<prevent_group_restriction/>
@@ -29,7 +29,7 @@
<screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png</screenshot>
<screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png</screenshot>
<dependencies>
- <nextcloud min-version="22" max-version="24"/>
+ <nextcloud min-version="24" max-version="24"/>
</dependencies>
<settings>
<admin>OCA\Onlyoffice\AdminSettings</admin>
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 958be88..bf5ea6d 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -38,8 +38,7 @@ return [
["name" => "editor#restore", "url" => "/ajax/restore", "verb" => "PUT"],
["name" => "settings#save_address", "url" => "/ajax/settings/address", "verb" => "PUT"],
["name" => "settings#save_common", "url" => "/ajax/settings/common", "verb" => "PUT"],
- ["name" => "settings#save_watermark", "url" => "/ajax/settings/watermark", "verb" => "PUT"],
- ["name" => "settings#get_settings", "url" => "/ajax/settings", "verb" => "GET"],
+ ["name" => "settings#save_security", "url" => "/ajax/settings/security", "verb" => "PUT"],
["name" => "settings#clear_history", "url" => "/ajax/settings/history", "verb" => "DELETE"],
["name" => "template#add_template", "url" => "/ajax/template", "verb" => "POST"],
["name" => "template#delete_template", "url" => "/ajax/template", "verb" => "DELETE"],
@@ -48,6 +47,8 @@ return [
"ocs" => [
["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"],
["name" => "federation#keylock", "url" => "/api/v1/keylock", "verb" => "POST"],
- ["name" => "editorapi#config", "url" => "/api/v1/config/{fileId}", "verb" => "GET"]
+ ["name" => "editorapi#config", "url" => "/api/v1/config/{fileId}", "verb" => "GET"],
+ ["name" => "sharingapi#get_shares", "url" => "/api/v1/shares/{fileId}", "verb" => "GET"],
+ ["name" => "sharingapi#set_shares", "url" => "/api/v1/shares", "verb" => "PUT"]
]
]; \ No newline at end of file
diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php
index 9bc8099..a2fd341 100644
--- a/controller/callbackcontroller.php
+++ b/controller/callbackcontroller.php
@@ -466,11 +466,6 @@ class CallbackController extends Controller {
$user = $this->userManager->get($userId);
if (!empty($user)) {
\OC_User::setUserId($userId);
- \OC_Util::setupFS($userId);
-
- if ($userId === $hashData->userId) {
- $filePath = $hashData->filePath;
- }
} else {
if (empty($shareToken)) {
$this->logger->error("Track without token: $fileId status $status", ["app" => $this->appName]);
@@ -480,6 +475,29 @@ class CallbackController extends Controller {
$this->logger->debug("Track $fileId by token for $userId", ["app" => $this->appName]);
}
+ // owner of file from the callback link
+ $ownerId = $hashData->ownerId;
+ $owner = $this->userManager->get($ownerId);
+
+ if (!empty($owner)) {
+ $userId = $ownerId;
+ } else {
+ $callbackUserId = $hashData->userId;
+ $callbackUser = $this->userManager->get($callbackUserId);
+
+ if (!empty($callbackUser)) {
+ // author of the callback link
+ $userId = $callbackUserId;
+
+ // path for author of the callback link
+ $filePath = $hashData->filePath;
+ }
+ }
+
+ if (!empty($userId)) {
+ \OC_Util::setupFS($userId);
+ }
+
list ($file, $error) = empty($shareToken) ? $this->getFile($userId, $fileId, $filePath) : $this->getFileByToken($fileId, $shareToken);
if (isset($error)) {
@@ -487,13 +505,6 @@ class CallbackController extends Controller {
return $error;
}
- if (empty($user)) {
- $owner = $file->getFileInfo()->getOwner();
- if ($owner !== null) {
- \OC_Util::setupFS($owner->getUID());
- }
- }
-
$url = $this->config->ReplaceDocumentServerUrlToInternal($url);
$prevVersion = $file->getFileInfo()->getMtime();
diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php
index 1703e03..ba5f333 100644
--- a/controller/editorapicontroller.php
+++ b/controller/editorapicontroller.php
@@ -47,6 +47,7 @@ use OCA\Onlyoffice\Crypt;
use OCA\Onlyoffice\DocumentService;
use OCA\Onlyoffice\FileUtility;
use OCA\Onlyoffice\TemplateManager;
+use OCA\Onlyoffice\ExtraPermissions;
/**
* Controller with the main functions
@@ -131,6 +132,13 @@ class EditorApiController extends OCSController {
private $tagManager;
/**
+ * Extra permissions
+ *
+ * @var ExtraPermissions
+ */
+ private $extraPermissions;
+
+ /**
* Mobile regex from https://github.com/ONLYOFFICE/CommunityServer/blob/v9.1.1/web/studio/ASC.Web.Studio/web.appsettings.config#L35
*/
const USER_AGENT_MOBILE = "/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i";
@@ -184,6 +192,11 @@ class EditorApiController extends OCSController {
}
}
+ if ($this->config->GetAdvanced()
+ && \OC::$server->getAppManager()->isInstalled("files_sharing")) {
+ $this->extraPermissions = new ExtraPermissions($AppName, $logger, $shareManager, $config);
+ }
+
$this->fileUtility = new FileUtility($AppName, $trans, $logger, $config, $shareManager, $session);
}
@@ -196,6 +209,7 @@ class EditorApiController extends OCSController {
* @param string $directToken - direct token
* @param integer $version - file version
* @param bool $inframe - open in frame
+ * @param bool $inviewer - open in viewer
* @param bool $desktop - desktop label
* @param string $guestName - nickname not logged user
* @param bool $template - file is template
@@ -206,7 +220,7 @@ class EditorApiController extends OCSController {
* @NoAdminRequired
* @PublicPage
*/
- public function config($fileId, $filePath = null, $shareToken = null, $directToken = null, $version = 0, $inframe = false, $desktop = false, $guestName = null, $template = false, $anchor = null) {
+ public function config($fileId, $filePath = null, $shareToken = null, $directToken = null, $version = 0, $inframe = false, $inviewer = false, $desktop = false, $guestName = null, $template = false, $anchor = null) {
if (!empty($directToken)) {
list ($directData, $error) = $this->crypt->ReadHash($directToken);
@@ -257,7 +271,7 @@ class EditorApiController extends OCSController {
$fileName = $file->getName();
$ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
- $format = !empty($ext) ? $this->config->FormatsSetting()[$ext] : null;
+ $format = !empty($ext) && array_key_exists($ext, $this->config->FormatsSetting()) ? $this->config->FormatsSetting()[$ext] : null;
if (!isset($format)) {
$this->logger->info("Format is not supported for editing: $fileName", ["app" => $this->appName]);
return new JSONResponse(["error" => $this->trans->t("Format is not supported")]);
@@ -294,8 +308,8 @@ class EditorApiController extends OCSController {
],
"documentType" => $format["type"],
"editorConfig" => [
- "lang" => str_replace("_", "-", \OC::$server->getL10NFactory()->get("onlyoffice")->getLanguageCode()),
- "region" => str_replace("_", "-", \OC::$server->getL10NFactory()->get("onlyoffice")->getLocaleCode())
+ "lang" => str_replace("_", "-", \OC::$server->getL10NFactory()->get("")->getLanguageCode()),
+ "region" => str_replace("_", "-", \OC::$server->getL10NFactory()->get("")->getLocaleCode())
]
];
@@ -304,6 +318,48 @@ class EditorApiController extends OCSController {
$params["document"]["permissions"]["modifyFilter"] = $permissions_modifyFilter;
}
+ $restrictedEditing = false;
+ $fileStorage = $file->getStorage();
+ if (empty($shareToken) && $fileStorage->instanceOfStorage("\OCA\Files_Sharing\SharedStorage")) {
+ $shareId = $fileStorage->getShareId();
+
+ $extraPermissions = null;
+ if ($this->extraPermissions !== null) {
+ $extraPermissions = $this->extraPermissions->getExtra($shareId);
+ }
+
+ if (!empty($extraPermissions)) {
+ if (isset($format["review"]) && $format["review"]) {
+ $reviewPermission = ($extraPermissions["permissions"] & ExtraPermissions::Review) === ExtraPermissions::Review;
+ if ($reviewPermission) {
+ $restrictedEditing = true;
+ $params["document"]["permissions"]["review"] = true;
+ }
+ }
+
+ if (isset($format["comment"]) && $format["comment"]) {
+ $commentPermission = ($extraPermissions["permissions"] & ExtraPermissions::Comment) === ExtraPermissions::Comment;
+ if ($commentPermission) {
+ $restrictedEditing = true;
+ $params["document"]["permissions"]["comment"] = true;
+ }
+ }
+
+ if (isset($format["fillForms"]) && $format["fillForms"]) {
+ $fillFormsPermission = ($extraPermissions["permissions"] & ExtraPermissions::FillForms) === ExtraPermissions::FillForms;
+ if ($fillFormsPermission) {
+ $restrictedEditing = true;
+ $params["document"]["permissions"]["fillForms"] = true;
+ }
+ }
+
+ if (isset($format["modifyFilter"]) && $format["modifyFilter"]) {
+ $modifyFilter = ($extraPermissions["permissions"] & ExtraPermissions::ModifyFilter) === ExtraPermissions::ModifyFilter;
+ $params["document"]["permissions"]["modifyFilter"] = $modifyFilter;
+ }
+ }
+ }
+
$isTempLock = false;
if ($version < 1
&& \OC::$server->getAppManager()->isInstalled("files_lock")) {
@@ -334,8 +390,14 @@ class EditorApiController extends OCSController {
&& !$isTempLock
&& (empty($shareToken) || ($share->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE);
$params["document"]["permissions"]["edit"] = $editable;
- if ($editable && ($canEdit || $canFillForms)) {
- $hashCallback = $this->crypt->GetHash(["userId" => $userId, "fileId" => $file->getId(), "filePath" => $filePath, "shareToken" => $shareToken, "action" => "track"]);
+ if (($editable || $restrictedEditing) && ($canEdit || $canFillForms)) {
+ $ownerId = null;
+ $owner = $file->getOwner();
+ if (!empty($owner)) {
+ $ownerId = $owner->getUID();
+ }
+
+ $hashCallback = $this->crypt->GetHash(["userId" => $userId, "ownerId" => $ownerId, "fileId" => $file->getId(), "filePath" => $filePath, "shareToken" => $shareToken, "action" => "track"]);
$callback = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.track", ["doc" => $hashCallback]);
if (!empty($this->config->GetStorageUrl())) {
@@ -458,7 +520,7 @@ class EditorApiController extends OCSController {
"url" => $folderLink
];
- if (!$desktop) {
+ if (!$desktop && !$inviewer) {
if ($this->config->GetSameTab()) {
$params["editorConfig"]["customization"]["goback"]["blank"] = false;
}
@@ -589,8 +651,7 @@ class EditorApiController extends OCSController {
$fileUrl = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.download", ["doc" => $hashUrl]);
- if (!empty($this->config->GetStorageUrl())
- && !$changes) {
+ if (!empty($this->config->GetStorageUrl())) {
$fileUrl = str_replace($this->urlGenerator->getAbsoluteURL("/"), $this->config->GetStorageUrl(), $fileUrl);
}
@@ -649,11 +710,21 @@ class EditorApiController extends OCSController {
$params["editorConfig"]["customization"]["reviewDisplay"] = $reviewDisplay;
}
+ $theme = $this->config->GetCustomizationTheme();
+ if (isset($theme)) {
+ $params["editorConfig"]["customization"]["uiTheme"] = $theme;
+ }
+
//default is false
if ($this->config->GetCustomizationToolbarNoTabs() === true) {
$params["editorConfig"]["customization"]["toolbarNoTabs"] = true;
}
+ //default is true
+ if($this->config->GetCustomizationMacros() === false) {
+ $params["editorConfig"]["customization"]["macros"] = false;
+ }
+
/* from system config */
@@ -707,7 +778,7 @@ class EditorApiController extends OCSController {
if ($watermarkTemplate !== false) {
$replacements = [
- "userId" => $userId,
+ "userId" => isset($userId) ? $userId : $this->trans->t('Anonymous'),
"date" => (new \DateTime())->format("Y-m-d H:i:s"),
"themingName" => \OC::$server->getThemingDefaults()->getName()
];
diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php
index cf73f36..7457c92 100644
--- a/controller/editorcontroller.php
+++ b/controller/editorcontroller.php
@@ -268,7 +268,7 @@ class EditorController extends Controller {
$fileUrl = $this->getUrl($targetFile, $user, $shareToken);
$ext = strtolower(pathinfo($name, PATHINFO_EXTENSION));
- $region = str_replace("_", "-", \OC::$server->getL10NFactory()->get($this->appName)->getLocaleCode());
+ $region = str_replace("_", "-", \OC::$server->getL10NFactory()->get("")->getLocaleCode());
$documentService = new DocumentService($this->trans, $this->config);
try {
$newFileUri = $documentService->GetConvertedUri($fileUrl, $targetExt, $ext, $targetKey, $region);
@@ -592,7 +592,7 @@ class EditorController extends Controller {
$documentService = new DocumentService($this->trans, $this->config);
$key = $this->fileUtility->getKey($file);
$fileUrl = $this->getUrl($file, $user, $shareToken);
- $region = str_replace("_", "-", \OC::$server->getL10NFactory()->get($this->appName)->getLocaleCode());
+ $region = str_replace("_", "-", \OC::$server->getL10NFactory()->get("")->getLocaleCode());
try {
$newFileUri = $documentService->GetConvertedUri($fileUrl, $ext, $internalExtension, $key, $region);
} catch (\Exception $e) {
@@ -1092,6 +1092,7 @@ class EditorController extends Controller {
* @param string $shareToken - access token
* @param integer $version - file version
* @param bool $inframe - open in frame
+ * @param bool $inviewer - open in viewer
* @param bool $template - file is template
* @param string $anchor - anchor for file content
*
@@ -1100,7 +1101,7 @@ class EditorController extends Controller {
* @NoAdminRequired
* @NoCSRFRequired
*/
- public function index($fileId, $filePath = null, $shareToken = null, $version = 0, $inframe = false, $template = false, $anchor = null) {
+ public function index($fileId, $filePath = null, $shareToken = null, $version = 0, $inframe = false, $inviewer = false, $template = false, $anchor = null) {
$this->logger->debug("Open: $fileId ($version) $filePath ", ["app" => $this->appName]);
$isLoggedIn = $this->userSession->isLoggedIn();
@@ -1139,6 +1140,7 @@ class EditorController extends Controller {
"version" => $version,
"isTemplate" => $template,
"inframe" => false,
+ "inviewer" => $inviewer === true,
"anchor" => $anchor
];
@@ -1279,8 +1281,7 @@ class EditorController extends Controller {
$fileUrl = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.download", ["doc" => $hashUrl]);
- if (!empty($this->config->GetStorageUrl())
- && !$changes) {
+ if (!empty($this->config->GetStorageUrl())) {
$fileUrl = str_replace($this->urlGenerator->getAbsoluteURL("/"), $this->config->GetStorageUrl(), $fileUrl);
}
diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php
index 6f82553..9768b2b 100644
--- a/controller/settingscontroller.php
+++ b/controller/settingscontroller.php
@@ -116,6 +116,7 @@ class SettingsController extends Controller {
"formats" => $this->config->FormatsSetting(),
"sameTab" => $this->config->GetSameTab(),
"preview" => $this->config->GetPreview(),
+ "advanced" => $this->config->GetAdvanced(),
"versionHistory" => $this->config->GetVersionHistory(),
"limitGroups" => $this->config->GetLimitGroups(),
"chat" => $this->config->GetCustomizationChat(),
@@ -126,8 +127,10 @@ class SettingsController extends Controller {
"toolbarNoTabs" => $this->config->GetCustomizationToolbarNoTabs(),
"successful" => $this->config->SettingsAreSuccessful(),
"watermark" => $this->config->GetWatermarkSettings(),
+ "macros" => $this->config->GetCustomizationMacros(),
"tagsEnabled" => App::isEnabled("systemtags"),
"reviewDisplay" => $this->config->GetCustomizationReviewDisplay(),
+ "theme" => $this->config->GetCustomizationTheme(),
"templates" => $this->GetGlobalTemplates()
];
return new TemplateResponse($this->appName, "settings", $data, "blank");
@@ -192,6 +195,7 @@ class SettingsController extends Controller {
* @param array $editFormats - editable formats array
* @param bool $sameTab - open in the same tab
* @param bool $preview - generate preview files
+ * @param bool $advanced - use advanced tab
* @param bool $versionHistory - keep version history
* @param array $limitGroups - list of groups
* @param bool $chat - display chat
@@ -208,6 +212,7 @@ class SettingsController extends Controller {
$editFormats,
$sameTab,
$preview,
+ $advanced,
$versionHistory,
$limitGroups,
$chat,
@@ -216,13 +221,15 @@ class SettingsController extends Controller {
$forcesave,
$help,
$toolbarNoTabs,
- $reviewDisplay
+ $reviewDisplay,
+ $theme
) {
$this->config->SetDefaultFormats($defFormats);
$this->config->SetEditableFormats($editFormats);
$this->config->SetSameTab($sameTab);
$this->config->SetPreview($preview);
+ $this->config->SetAdvanced($advanced);
$this->config->SetVersionHistory($versionHistory);
$this->config->SetLimitGroups($limitGroups);
$this->config->SetCustomizationChat($chat);
@@ -232,28 +239,33 @@ class SettingsController extends Controller {
$this->config->SetCustomizationHelp($help);
$this->config->SetCustomizationToolbarNoTabs($toolbarNoTabs);
$this->config->SetCustomizationReviewDisplay($reviewDisplay);
+ $this->config->SetCustomizationTheme($theme);
return [
];
}
/**
- * Save watermark settings
+ * Save security settings
*
- * @param array $settings - watermark settings
+ * @param array $watermarks - watermark settings
+ * @param bool $macros - run document macros
*
* @return array
*/
- public function SaveWatermark($settings) {
+ public function SaveSecurity($watermarks,
+ $macros
+ ) {
- if ($settings["enabled"] === "true") {
- $settings["text"] = trim($settings["text"]);
- if (empty($settings["text"])) {
- $settings["text"] = $this->trans->t("DO NOT SHARE THIS") . " {userId} {date}";
+ if ($watermarks["enabled"] === "true") {
+ $watermarks["text"] = trim($watermarks["text"]);
+ if (empty($watermarks["text"])) {
+ $watermarks["text"] = $this->trans->t("DO NOT SHARE THIS") . " {userId} {date}";
}
}
- $this->config->SetWatermarkSettings($settings);
+ $this->config->SetWatermarkSettings($watermarks);
+ $this->config->SetCustomizationMacros($macros);
return [
];
@@ -273,22 +285,6 @@ class SettingsController extends Controller {
}
/**
- * Get app settings
- *
- * @return array
- *
- * @NoAdminRequired
- * @PublicPage
- */
- public function GetSettings() {
- $result = [
- "formats" => $this->config->FormatsSetting(),
- "sameTab" => $this->config->GetSameTab()
- ];
- return $result;
- }
-
- /**
* Get global templates
*
* @return array
diff --git a/controller/sharingapicontroller.php b/controller/sharingapicontroller.php
new file mode 100644
index 0000000..1e5e633
--- /dev/null
+++ b/controller/sharingapicontroller.php
@@ -0,0 +1,228 @@
+<?php
+/**
+ *
+ * (c) Copyright Ascensio System SIA 2022
+ *
+ * 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.
+ *
+ */
+
+namespace OCA\Onlyoffice\Controller;
+
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\OCSController;
+use OCP\IL10N;
+use OCP\ILogger;
+use OCP\IRequest;
+use OCP\ISession;
+use OCP\Constants;
+use OCP\Share\IManager;
+use OCP\Files\IRootFolder;
+use OCP\IUserManager;
+use OCP\IUserSession;
+use OCP\Files\File;
+use OCP\Share\IShare;
+use OCP\Share\Exceptions\ShareNotFound;
+
+
+use OCA\Onlyoffice\AppConfig;
+use OCA\Onlyoffice\DocumentService;
+use OCA\Onlyoffice\FileUtility;
+use OCA\Onlyoffice\KeyManager;
+use OCA\Onlyoffice\ExtraPermissions;
+
+/**
+ * OCS handler
+ */
+class SharingApiController extends OCSController {
+
+ /**
+ * Current user session
+ *
+ * @var IUserSession
+ */
+ private $userSession;
+
+ /**
+ * User manager
+ *
+ * @var IUserManager
+ */
+ private $userManager;
+
+ /**
+ * Root folder
+ *
+ * @var IRootFolder
+ */
+ private $root;
+
+ /**
+ * Logger
+ *
+ * @var ILogger
+ */
+ private $logger;
+
+ /**
+ * Application configuration
+ *
+ * @var AppConfig
+ */
+ private $config;
+
+ /**
+ * Share manager
+ *
+ * @var IManager
+ */
+ private $shareManager;
+
+ /**
+ * Extra permissions
+ *
+ * @var ExtraPermissions
+ */
+ private $extraPermissions;
+
+ /**
+ * @param string $AppName - application name
+ * @param IRequest $request - request object
+ * @param IRootFolder $root - root folder
+ * @param ILogger $logger - logger
+ * @param IUserSession $userSession - current user session
+ * @param IUserManager $userManager - user manager
+ * @param IManager $shareManager - Share manager
+ * @param AppConfig $config - application configuration
+ */
+ public function __construct($AppName,
+ IRequest $request,
+ IRootFolder $root,
+ ILogger $logger,
+ IUserSession $userSession,
+ IUserManager $userManager,
+ IManager $shareManager,
+ AppConfig $appConfig
+ ) {
+ parent::__construct($AppName, $request);
+
+ $this->root = $root;
+ $this->logger = $logger;
+ $this->userSession = $userSession;
+ $this->userManager = $userManager;
+ $this->shareManager = $shareManager;
+ $this->appConfig = $appConfig;
+
+ if ($this->appConfig->GetAdvanced()
+ && \OC::$server->getAppManager()->isInstalled("files_sharing")) {
+ $this->extraPermissions = new ExtraPermissions($AppName, $logger, $shareManager, $appConfig);
+ }
+ }
+
+ /**
+ * Get shares for file
+ *
+ * @param integer $fileId - file identifier
+ *
+ * @return DataResponse
+ *
+ * @NoAdminRequired
+ * @NoCSRFRequired
+ */
+ public function getShares($fileId) {
+ if ($this->extraPermissions === null) {
+ $this->logger->debug("extraPermissions isn't init", ["app" => $this->appName]);
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
+ }
+
+ $user = $this->userSession->getUser();
+ $userId = $user->getUID();
+
+ $sourceFile = $this->getFile($fileId, $userId);
+ $fileStorage = $sourceFile->getStorage();
+ if ($fileStorage->instanceOfStorage("\OCA\Files_Sharing\SharedStorage")) {
+ return new DataResponse([]);
+ }
+
+ $sharesUser = $this->shareManager->getSharesBy($userId, IShare::TYPE_USER, $sourceFile, null, true);
+ $sharesGroup = $this->shareManager->getSharesBy($userId, IShare::TYPE_GROUP, $sourceFile, null, true);
+ $shares = array_merge($sharesUser, $sharesGroup);
+ $extras = $this->extraPermissions->getExtras($shares, $sourceFile);
+
+ return new DataResponse($extras);
+ }
+
+ /**
+ * Set shares for file
+ *
+ * @param integer $extraId - extra permission identifier
+ * @param integer $shareId - share identifier
+ * @param integer $fileId - file identifier
+ * @param integer $permissions - permissions value
+ *
+ * @return DataResponse
+ *
+ * @NoAdminRequired
+ * @NoCSRFRequired
+ */
+ public function setShares($extraId, $shareId, $fileId, $permissions) {
+ if ($this->extraPermissions === null) {
+ $this->logger->debug("extraPermissions isn't init", ["app" => $this->appName]);
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
+ }
+
+ $user = $this->userSession->getUser();
+ $userId = $user->getUID();
+
+ $sourceFile = $this->getFile($fileId, $userId);
+ $fileStorage = $sourceFile->getStorage();
+ if ($fileStorage->instanceOfStorage("\OCA\Files_Sharing\SharedStorage")) {
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
+ }
+
+ if (!$this->extraPermissions->setExtra($shareId, $permissions, $extraId)) {
+ $this->logger->error("setShares: couldn't set extra permissions for: " . $shareId, ["app" => $this->appName]);
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
+ }
+
+ $extra = $this->extraPermissions->getExtra($shareId);
+
+ return new DataResponse($extra);
+ }
+
+ /**
+ * Get source file
+ *
+ * @param integer $fileId - file identifier
+ * @param string $userId - user identifier
+ *
+ * @return File
+ */
+ private function getFile($fileId, $userId) {
+ try {
+ $folder = $this->root->getUserFolder($userId);
+ $files = $folder->getById($fileId);
+ } catch (\Exception $e) {
+ $this->logger->logException($e, ["message" => "getFile: $fileId", "app" => $this->appName]);
+ return null;
+ }
+
+ if (empty($files)) {
+ $this->logger->error("getFile: file not found: " . $fileId, ["app" => $this->appName]);
+ return null;
+ }
+
+ return $files[0];
+ }
+}
diff --git a/css/main.css b/css/main.css
index a1d6b14..935794e 100644
--- a/css/main.css
+++ b/css/main.css
@@ -43,7 +43,8 @@ body.onlyoffice-inline {
}
body.onlyoffice-inline #app-navigation,
body.onlyoffice-inline .searchbox,
-body.onlyoffice-inline #app-content #controls {
+body.onlyoffice-inline #app-content #controls,
+body.onlyoffice-inline #filestable {
display: none;
}
body.onlyoffice-inline #app-navigation-toggle {
diff --git a/css/settings.css b/css/settings.css
index db93c62..82c50bf 100644
--- a/css/settings.css
+++ b/css/settings.css
@@ -60,6 +60,8 @@
-webkit-column-width: 100px;
}
.onlyoffice-tables {
+ margin-top: 4px;
+ line-height: initial;
column-width: 140px;
-moz-column-width: 140px;
-webkit-column-width: 140px;
diff --git a/css/share.css b/css/share.css
new file mode 100644
index 0000000..b7818b8
--- /dev/null
+++ b/css/share.css
@@ -0,0 +1,48 @@
+/**
+ *
+ * (c) Copyright Ascensio System SIA 2022
+ *
+ * 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.
+ *
+ */
+
+.icon-onlyoffice-sharing {
+ background-image: url("../img/app-dark.svg");
+}
+.onlyoffice-share-item {
+ display: flex;
+ list-style-type: none;
+}
+.onlyoffice-share-item img {
+ width: 32px;
+ height: 32px;
+}
+.onlyoffice-share-popup {
+ margin-right: 14px;
+ margin-top: 44px;
+}
+.onlyoffice-share-item span {
+ margin-left: 10px;
+ margin-top: 5px;
+}
+#onlyoffice-share-menu {
+ margin-left: auto;
+}
+.onlyoffice-share-action {
+ line-height: 44px;
+}
+.onlyoffice-share-label {
+ padding-right: 14px !important;
+ padding-left: 14px !important;
+ opacity: .7;
+} \ No newline at end of file
diff --git a/css/viewer.css b/css/viewer.css
index 98b6a39..cdf3e21 100644
--- a/css/viewer.css
+++ b/css/viewer.css
@@ -25,3 +25,6 @@
top: 50px;
z-index: 110;
}
+.modal-wrapper--full #onlyofficeViewerFrame {
+ top: 0;
+}
diff --git a/js/editor.js b/js/editor.js
index 00d05cb..e5838e2 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -21,6 +21,7 @@
OCA.Onlyoffice = _.extend({
AppName: "onlyoffice",
inframe: false,
+ inviewer: false,
fileId: null,
shareToken: null,
insertImageType: null
@@ -34,6 +35,7 @@
var directToken = $("#iframeEditor").data("directtoken");
OCA.Onlyoffice.template = $("#iframeEditor").data("template");
OCA.Onlyoffice.inframe = !!$("#iframeEditor").data("inframe");
+ OCA.Onlyoffice.inviewer = !!$("#iframeEditor").data("inviewer");
OCA.Onlyoffice.filePath = $("#iframeEditor").data("path");
OCA.Onlyoffice.anchor = $("#iframeEditor").attr("data-anchor");
var guestName = localStorage.getItem("nick");
@@ -90,6 +92,10 @@
params.push("inframe=true");
}
+ if (OCA.Onlyoffice.inviewer) {
+ params.push("inviewer=true");
+ }
+
if (OCA.Onlyoffice.Desktop) {
params.push("desktop=true");
}
diff --git a/js/main.js b/js/main.js
index 797a767..2442f47 100644
--- a/js/main.js
+++ b/js/main.js
@@ -25,7 +25,7 @@
frameSelector: null,
}, OCA.Onlyoffice);
- OCA.Onlyoffice.setting = {};
+ OCA.Onlyoffice.setting = OCP.InitialState.loadState(OCA.Onlyoffice.AppName, "settings");
OCA.Onlyoffice.mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini|Macintosh/i.test(navigator.userAgent)
&& navigator.maxTouchPoints && navigator.maxTouchPoints > 1;
@@ -119,9 +119,6 @@
OCA.Files.Sidebar.close();
}
- var scrollTop = $(window).scrollTop();
- $(OCA.Onlyoffice.frameSelector).css("top", scrollTop);
-
OCA.Onlyoffice.folderUrl = location.href;
window.history.pushState(null, null, url);
}
@@ -166,7 +163,9 @@
OCA.Onlyoffice.FileClick = function (fileName, context) {
var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName);
- OCA.Onlyoffice.OpenEditor(fileInfoModel.id, context.dir, fileName);
+ var fileId = context.fileId || fileInfoModel.id;
+
+ OCA.Onlyoffice.OpenEditor(fileId, context.dir, fileName, 0, (OCA.Onlyoffice.setting.sameTab ? null : document));
OCA.Onlyoffice.context = context;
OCA.Onlyoffice.context.fileName = fileName;
@@ -312,92 +311,70 @@
OCA.Onlyoffice.CreateFile(name, fileList, 0, targetId, false);
};
- OCA.Onlyoffice.GetSettings = function (callbackSettings) {
- if (OCA.Onlyoffice.setting.formats) {
-
- callbackSettings();
-
- } else {
-
- $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings"),
- function onSuccess(settings) {
- OCA.Onlyoffice.setting = settings;
+ OCA.Onlyoffice.registerAction = function() {
+ var formats = OCA.Onlyoffice.setting.formats;
- callbackSettings();
- }
- );
+ $.each(formats, function (ext, config) {
+ if (!config.mime) {
+ return true;
+ }
+ OCA.Files.fileActions.registerAction({
+ name: "onlyofficeOpen",
+ displayName: t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE"),
+ mime: config.mime,
+ permissions: OC.PERMISSION_READ,
+ iconClass: "icon-onlyoffice-open",
+ actionHandler: OCA.Onlyoffice.FileClick
+ });
- }
- };
+ if (config.def) {
+ OCA.Files.fileActions.setDefault(config.mime, "onlyofficeOpen");
+ }
- OCA.Onlyoffice.registerAction = function() {
- var register = function () {
- var formats = OCA.Onlyoffice.setting.formats;
+ if (config.conv) {
+ OCA.Files.fileActions.registerAction({
+ name: "onlyofficeConvert",
+ displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"),
+ mime: config.mime,
+ permissions: ($("#isPublic").val() ? OC.PERMISSION_UPDATE : OC.PERMISSION_READ),
+ iconClass: "icon-onlyoffice-convert",
+ actionHandler: OCA.Onlyoffice.FileConvertClick
+ });
+ }
- $.each(formats, function (ext, config) {
- if (!config.mime) {
- return true;
- }
+ if (config.fillForms) {
OCA.Files.fileActions.registerAction({
- name: "onlyofficeOpen",
- displayName: t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE"),
+ name: "onlyofficeFill",
+ displayName: t(OCA.Onlyoffice.AppName, "Fill in form in ONLYOFFICE"),
mime: config.mime,
- permissions: OC.PERMISSION_READ,
- iconClass: "icon-onlyoffice-open",
+ permissions: OC.PERMISSION_UPDATE,
+ iconClass: "icon-onlyoffice-fill",
actionHandler: OCA.Onlyoffice.FileClick
});
+ }
- if (config.def) {
- OCA.Files.fileActions.setDefault(config.mime, "onlyofficeOpen");
- }
-
- if (config.conv) {
- OCA.Files.fileActions.registerAction({
- name: "onlyofficeConvert",
- displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"),
- mime: config.mime,
- permissions: ($("#isPublic").val() ? OC.PERMISSION_UPDATE : OC.PERMISSION_READ),
- iconClass: "icon-onlyoffice-convert",
- actionHandler: OCA.Onlyoffice.FileConvertClick
- });
- }
-
- if (config.fillForms) {
- OCA.Files.fileActions.registerAction({
- name: "onlyofficeFill",
- displayName: t(OCA.Onlyoffice.AppName, "Fill in form in ONLYOFFICE"),
- mime: config.mime,
- permissions: OC.PERMISSION_UPDATE,
- iconClass: "icon-onlyoffice-fill",
- actionHandler: OCA.Onlyoffice.FileClick
- });
- }
-
- if (config.createForm) {
- OCA.Files.fileActions.registerAction({
- name: "onlyofficeCreateForm",
- displayName: t(OCA.Onlyoffice.AppName, "Create form"),
- mime: config.mime,
- permissions: ($("#isPublic").val() ? OC.PERMISSION_UPDATE : OC.PERMISSION_READ),
- iconClass: "icon-onlyoffice-create",
- actionHandler: OCA.Onlyoffice.CreateFormClick
- });
- }
-
- if (config.saveas && !$("#isPublic").val()) {
- OCA.Files.fileActions.registerAction({
- name: "onlyofficeDownload",
- displayName: t(OCA.Onlyoffice.AppName, "Download as"),
- mime: config.mime,
- permissions: OC.PERMISSION_READ,
- iconClass: "icon-onlyoffice-download",
- actionHandler: OCA.Onlyoffice.DownloadClick
- });
- }
- });
- }
+ if (config.createForm) {
+ OCA.Files.fileActions.registerAction({
+ name: "onlyofficeCreateForm",
+ displayName: t(OCA.Onlyoffice.AppName, "Create form"),
+ mime: config.mime,
+ permissions: ($("#isPublic").val() ? OC.PERMISSION_UPDATE : OC.PERMISSION_READ),
+ iconClass: "icon-onlyoffice-create",
+ actionHandler: OCA.Onlyoffice.CreateFormClick
+ });
+ }
- OCA.Onlyoffice.GetSettings(register);
+ if (config.saveas && !$("#isPublic").val()) {
+ OCA.Files.fileActions.registerAction({
+ name: "onlyofficeDownload",
+ displayName: t(OCA.Onlyoffice.AppName, "Download as"),
+ mime: config.mime,
+ permissions: OC.PERMISSION_READ,
+ iconClass: "icon-onlyoffice-download",
+ actionHandler: OCA.Onlyoffice.DownloadClick
+ });
+ }
+ });
};
OCA.Onlyoffice.NewFileMenu = {
@@ -472,6 +449,14 @@
}
};
+ OCA.Onlyoffice.TabView = {
+ attach(fileList) {
+ if (OCA.Onlyoffice.SharingTabView) {
+ fileList.registerTabView(new OCA.Onlyoffice.SharingTabView())
+ }
+ }
+ }
+
var getFileExtension = function (fileName) {
var extension = fileName.substr(fileName.lastIndexOf(".") + 1).toLowerCase();
return extension;
@@ -526,41 +511,39 @@
var fileName = $("#filename").val();
var extension = getFileExtension(fileName);
- var initSharedButton = function () {
- var formats = OCA.Onlyoffice.setting.formats;
-
- var config = formats[extension];
- if (!config) {
- return;
- }
+ var formats = OCA.Onlyoffice.setting.formats;
- var editorUrl = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val()));
+ var config = formats[extension];
+ if (!config) {
+ return;
+ }
- if (_oc_appswebroots.richdocuments
- || _oc_appswebroots.files_pdfviewer && extension === "pdf"
- || _oc_appswebroots.text && extension === "txt") {
+ var editorUrl = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val()));
- var button = document.createElement("a");
- button.href = editorUrl;
- button.className = "onlyoffice-public-open button";
- button.innerText = t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE")
+ if (_oc_appswebroots.richdocuments
+ || _oc_appswebroots.files_pdfviewer && extension === "pdf"
+ || _oc_appswebroots.text && extension === "txt") {
- if (!OCA.Onlyoffice.setting.sameTab) {
- button.target = "_blank";
- }
+ var button = document.createElement("a");
+ button.href = editorUrl;
+ button.className = "onlyoffice-public-open button";
+ button.innerText = t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE")
- $("#preview").prepend(button);
- } else {
- OCA.Onlyoffice.frameSelector = "#onlyofficeFrame";
- var $iframe = $("<iframe id=\"onlyofficeFrame\" nonce=\"" + btoa(OC.requestToken) + "\" scrolling=\"no\" allowfullscreen src=\"" + editorUrl + "?inframe=true\" />");
- $("#app-content").append($iframe);
+ if (!OCA.Onlyoffice.setting.sameTab) {
+ button.target = "_blank";
}
- };
- OCA.Onlyoffice.GetSettings(initSharedButton);
+ $("#preview").prepend(button);
+ } else {
+ OCA.Onlyoffice.frameSelector = "#onlyofficeFrame";
+ var $iframe = $("<iframe id=\"onlyofficeFrame\" nonce=\"" + btoa(OC.requestToken) + "\" scrolling=\"no\" allowfullscreen src=\"" + editorUrl + "?inframe=true\" />");
+ $("#app-content").append($iframe);
+ }
} else {
OC.Plugins.register("OCA.Files.NewFileMenu", OCA.Onlyoffice.NewFileMenu);
+ OC.Plugins.register("OCA.Files.FileList", OCA.Onlyoffice.TabView);
+
OCA.Onlyoffice.registerAction();
OCA.Onlyoffice.bindVersionClick();
diff --git a/js/settings.js b/js/settings.js
index f8d3d42..87adadc 100644
--- a/js/settings.js
+++ b/js/settings.js
@@ -191,6 +191,7 @@
var sameTab = $("#onlyofficeSameTab").is(":checked");
var preview = $("#onlyofficePreview").is(":checked");
+ var advanced = $("#onlyofficeAdvanced").is(":checked");
var versionHistory = $("#onlyofficeVersionHistory").is(":checked");
var limitGroupsString = $("#onlyofficeGroups").prop("checked") ? $("#onlyofficeLimitGroups").val() : "";
@@ -203,6 +204,7 @@
var help = $("#onlyofficeHelp").is(":checked");
var toolbarNoTabs = $("#onlyofficeToolbarNoTabs").is(":checked");
var reviewDisplay = $("input[type='radio'][name='reviewDisplay']:checked").attr("id").replace("onlyofficeReviewDisplay_", "");
+ var theme = $("input[type='radio'][name='theme']:checked").attr("id").replace("onlyofficeTheme_", "");
$.ajax({
method: "PUT",
@@ -212,6 +214,7 @@
editFormats: editFormats,
sameTab: sameTab,
preview: preview,
+ advanced: advanced,
versionHistory: versionHistory,
limitGroups: limitGroups,
chat: chat,
@@ -220,7 +223,8 @@
forcesave: forcesave,
help: help,
toolbarNoTabs: toolbarNoTabs,
- reviewDisplay: reviewDisplay
+ reviewDisplay: reviewDisplay,
+ theme: theme
},
success: function onSuccess(response) {
$(".section-onlyoffice").removeClass("icon-loading");
@@ -231,9 +235,11 @@
});
});
- $("#onlyofficeWatermarkSave").click(function () {
+ $("#onlyofficeSecuritySave").click(function () {
$(".section-onlyoffice").addClass("icon-loading");
+ var macros = $("#onlyofficeMacros").is(":checked");
+
var watermarkSettings = {
enabled: $("#onlyofficeWatermark_enabled").is(":checked")
};
@@ -263,9 +269,10 @@
$.ajax({
method: "PUT",
- url: OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings/watermark"),
+ url: OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings/security"),
data: {
- settings: watermarkSettings
+ watermarks: watermarkSettings,
+ macros: macros
},
success: function onSuccess(response) {
$(".section-onlyoffice").removeClass("icon-loading");
diff --git a/js/share.js b/js/share.js
new file mode 100644
index 0000000..e1f6ab7
--- /dev/null
+++ b/js/share.js
@@ -0,0 +1,418 @@
+/**
+ *
+ * (c) Copyright Ascensio System SIA 2022
+ *
+ * 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.
+ *
+ */
+
+ (function ($, OC) {
+
+ OCA.Onlyoffice = _.extend({
+ AppName: "onlyoffice",
+ }, OCA.Onlyoffice);
+
+ OCA.Onlyoffice.Permissions = {
+ None: 0,
+ Review: 1,
+ Comment: 2,
+ FillForms: 4,
+ ModifyFilter: 8
+ };
+
+ var tabcontext = null;
+
+ OCA.Onlyoffice.SharingTabView = OCA.Files.DetailTabView.extend({
+ id: "onlyofficeSharingTabView",
+ className: "tab onlyofficeSharingTabView",
+
+ customEvents: null,
+ fileInfo: null,
+ templateItem: null,
+ permissionsMenu: null,
+ colectionLoading: null,
+ collection: null,
+ format: null,
+
+ events: {
+ "click #onlyoffice-share-action": "_onClickPermissionMenu",
+ "change .onlyoffice-share-action input": "_onClickSetPermissions"
+ },
+
+ initialize() {
+ OCA.Files.DetailTabView.prototype.initialize.apply(this, arguments);
+ tabcontext = this;
+
+ this.colectionLoading = false;
+ },
+
+ getLabel() {
+ return t(OCA.Onlyoffice.AppName, "Advanced")
+ },
+
+ getIcon() {
+ return "icon-onlyoffice-sharing"
+ },
+
+ render() {
+ var self = this;
+
+ if (this.customEvents === null) {
+ this.customEvents = this._customEvents();
+ this.customEvents.on();
+ }
+
+ this._getTemplate(() => {
+ this.collection.forEach(extra => {
+ var itemNode = self.templateItem.clone();
+ var descNode = itemNode.find("span");
+ var avatar = itemNode.find("img");
+
+ var avatarSrc = "/index.php/avatar/" + extra.shareWith + "/32?v=0";
+ var label = extra.shareWithName;
+ if (extra.type == OC.Share.SHARE_TYPE_GROUP) {
+ avatarSrc = "/index.php/avatar/guest/" + extra.shareWith + "/32?v=0";
+ label = extra.shareWith + " (" + t(OCA.Onlyoffice.AppName, "group") + ")";
+ }
+
+ avatar[0].src = avatarSrc;
+ descNode[0].innerText = label;
+
+ itemNode[0].id = extra.share_id;
+
+ self._getContainer().append(itemNode);
+ });
+ });
+ },
+
+ setFileInfo(fileInfo) {
+ if(fileInfo) {
+ this.fileInfo = fileInfo;
+
+ if (this.colectionLoading) {
+ return;
+ }
+
+ this._getContainer().children().remove();
+
+ this.colectionLoading = true;
+ OCA.Onlyoffice.GetShares(this.fileInfo.id, (shares) => {
+ this.collection = shares;
+
+ this.colectionLoading = false;
+ this.render();
+ });
+ }
+ },
+
+ canDisplay: function (fileInfo) {
+ var canDisplay = false;
+
+ if (!fileInfo.isDirectory()) {
+ var ext = fileInfo.name.split(".").pop();
+ var format = OCA.Onlyoffice.setting.formats[ext];
+ if (format && (format["review"]
+ || format["comment"]
+ || format["fillForms"]
+ || format["modifyFilter"])) {
+ canDisplay = true;
+ tabcontext.format = format;
+
+ if ($("#sharing").hasClass("active")
+ && tabcontext.fileInfo
+ && tabcontext.fileInfo.id == fileInfo.id) {
+ this.update(fileInfo);
+ }
+ }
+ };
+
+ return canDisplay;
+ },
+
+ _getContainer: function () {
+ return this.$el.find(".onlyoffice-share-container");
+ },
+
+ _getTemplate: function (callback) {
+ if (this.templateItem) {
+ callback();
+ return;
+ }
+
+ var self = this;
+ $.get(OC.filePath(OCA.Onlyoffice.AppName, "templates", "share.html"),
+ function (tmpl) {
+ self.templateItem = $(tmpl);
+
+ $("<ul>", {class: "onlyoffice-share-container"}).appendTo(self.$el)
+ $("<div>").html(t(OCA.Onlyoffice.AppName, "Provide advanced document permissions using ONLYOFFICE Docs")).prependTo(self.$el);
+
+ callback();
+ });
+ },
+
+ _onClickSetPermissions: function (e) {
+ var permissionValues = this.permissionsMenu.getValues();
+ var shareId = this.permissionsMenu.getTargetId();
+ var fileId = this.fileInfo.id;
+ var extra = this.collection.find(item => item.share_id == shareId);
+
+ var permissions = OCA.Onlyoffice.Permissions.None;
+ if (permissionValues[OCA.Onlyoffice.Permissions.Review]) {
+ permissions |= OCA.Onlyoffice.Permissions.Review;
+ }
+ if (permissionValues[OCA.Onlyoffice.Permissions.Comment]
+ && (permissions & OCA.Onlyoffice.Permissions.Review) != OCA.Onlyoffice.Permissions.Review) {
+ permissions |= OCA.Onlyoffice.Permissions.Comment;
+ }
+ if (permissionValues[OCA.Onlyoffice.Permissions.FillForms]
+ && (permissions & OCA.Onlyoffice.Permissions.Review) != OCA.Onlyoffice.Permissions.Review) {
+ permissions |= OCA.Onlyoffice.Permissions.FillForms;
+ }
+ if (permissionValues[OCA.Onlyoffice.Permissions.ModifyFilter]) {
+ permissions |= OCA.Onlyoffice.Permissions.ModifyFilter;
+ }
+
+ this.permissionsMenu.block(true);
+ OCA.Onlyoffice.SetShares(extra.id, shareId, fileId, permissions, (extra) => {
+ this.collection.forEach(item => {
+ if (item.share_id == extra.share_id) {
+ item.id = extra.id;
+ item.permissions = extra.permissions;
+ item.available = extra.available
+ }
+ });
+
+ var attributes = this._getPermissionAttributes(extra);
+
+ this.permissionsMenu.refresh(attributes);
+ this.permissionsMenu.block(false);
+ });
+ },
+
+ _onClickPermissionMenu: function (e) {
+ if (!this.permissionsMenu) {
+ this.permissionsMenu = this._permissionMenu();
+ }
+
+ var shareNode = $(e.target).closest(".onlyoffice-share-item")[0];
+ var shareId = shareNode.id;
+
+
+ if (this.permissionsMenu.isOpen()) {
+ var previousId = this.permissionsMenu.getTargetId();
+ this.permissionsMenu.close();
+
+ if (previousId == shareId) return;
+ }
+
+ var extra = this.collection.find(item => item.share_id == shareId);
+
+ var attributes = this._getPermissionAttributes(extra);
+
+ this.permissionsMenu.open(extra.share_id, attributes, $(e.target).position());
+ },
+
+ _getPermissionAttributes: function (extra) {
+ var attributes = [];
+
+ if (this.format["review"]
+ && (OCA.Onlyoffice.Permissions.Review & extra["available"]) === OCA.Onlyoffice.Permissions.Review) {
+ var review = (OCA.Onlyoffice.Permissions.Review & extra["permissions"]) === OCA.Onlyoffice.Permissions.Review;
+ attributes.push({
+ checked: review,
+ extra: OCA.Onlyoffice.Permissions.Review,
+ label: t(OCA.Onlyoffice.AppName, "Review")
+ });
+ }
+ if (this.format["comment"]
+ && (OCA.Onlyoffice.Permissions.Comment & extra["available"]) === OCA.Onlyoffice.Permissions.Comment) {
+ var comment = (OCA.Onlyoffice.Permissions.Comment & extra["permissions"]) === OCA.Onlyoffice.Permissions.Comment;
+ attributes.push({
+ checked: comment,
+ extra: OCA.Onlyoffice.Permissions.Comment,
+ label: t(OCA.Onlyoffice.AppName, "Comment")
+ });
+ }
+ if (this.format["fillForms"]
+ && (OCA.Onlyoffice.Permissions.FillForms & extra["available"]) === OCA.Onlyoffice.Permissions.FillForms) {
+ var fillForms = (OCA.Onlyoffice.Permissions.FillForms & extra["permissions"]) === OCA.Onlyoffice.Permissions.FillForms;
+ attributes.push({
+ checked: fillForms,
+ extra: OCA.Onlyoffice.Permissions.FillForms,
+ label: t(OCA.Onlyoffice.AppName, "Form filling")
+ });
+ }
+
+ if (this.format["modifyFilter"]
+ && (OCA.Onlyoffice.Permissions.ModifyFilter & extra["available"]) === OCA.Onlyoffice.Permissions.ModifyFilter) {
+ var modifyFilter = (OCA.Onlyoffice.Permissions.ModifyFilter & extra["permissions"]) === OCA.Onlyoffice.Permissions.ModifyFilter;
+ attributes.push({
+ checked: modifyFilter,
+ extra: OCA.Onlyoffice.Permissions.ModifyFilter,
+ label: t(OCA.Onlyoffice.AppName, "Custom filter")
+ });
+ }
+
+ return attributes;
+ },
+
+ _customEvents: function () {
+ var init = false;
+ var self = this;
+
+ return {
+ on: function () {
+ if (!init) {
+ $("#content").on("click", function (e) {
+ var target = $(e.target)[0];
+ if (!self.permissionsMenu
+ || !self.permissionsMenu.isOpen()
+ || target.id == "onlyoffice-share-action"
+ || target.className == "onlyoffice-share-label"
+ || target.closest(".onlyoffice-share-action")) {
+ return;
+ }
+
+ self.permissionsMenu.close();
+ });
+
+ init = true;
+ }
+ }
+ }
+ },
+
+ _permissionMenu: function () {
+ var popup = $("<div>", {
+ class: "popovermenu onlyoffice-share-popup"
+ }).append($("<ul>"), {
+ id: -1
+ });
+
+ var appendItem = function (checked, extra, name) {
+ var item = $("<li>").append($("<span>", {
+ class: "onlyoffice-share-action"
+ }).append($("<input>", {
+ id: "extra-" + extra,
+ type: "checkbox",
+ class: "checkbox action-checkbox__checkbox focusable",
+ checked: checked
+ })).append($("<label>", {
+ for: "extra-" + extra,
+ text: name,
+ class: "onlyoffice-share-label"
+ })));
+
+ popup.find("ul").append(item);
+ };
+
+ var removeItems = function () {
+ var items = popup.find("li");
+ if (items) {
+ items.remove();
+ }
+ }
+
+ var setTargetId = function (id) {
+ popup.find("ul").attr("id", id);
+ };
+
+ this.$el.append(popup);
+
+ return {
+ isOpen: function () {
+ return popup.is(":visible");
+ },
+
+ open: function (id, attributes, position) {
+ removeItems();
+
+ if (position) {
+ popup.css({top: position.top});
+ }
+
+ attributes.forEach(attr => {
+ appendItem(attr.checked, attr.extra, attr.label);
+ });
+
+ setTargetId(id);
+ popup.show();
+ },
+
+ close: function () {
+ removeItems();
+
+ setTargetId(-1);
+ popup.hide();
+ },
+
+ refresh: function (attributes) {
+ removeItems();
+
+ attributes.forEach(attr => {
+ appendItem(attr.checked, attr.extra, attr.label);
+ });
+ },
+
+ block: function (value) {
+ popup.find("input").prop("disabled", value);
+ },
+
+ getValues: function () {
+ var values = [];
+
+ var items = popup.find("input");
+ for (var i = 0; i < items.length; i++) {
+ var extra = items[i].id.split("extra-")[1];
+ values[extra] = items[i].checked;
+ }
+
+ return values;
+ },
+
+ getTargetId: function () {
+ return popup.find("ul").attr("id");
+ },
+ }
+ }
+ });
+
+ OCA.Onlyoffice.GetShares = function(fileId, callback) {
+ $.ajax({
+ url: OC.linkToOCS("apps/" + OCA.Onlyoffice.AppName + "/api/v1/shares", 2) + fileId + "?format=json",
+ success: function onSuccess(response) {
+ callback(response.ocs.data);
+ }
+ })
+ }
+
+ OCA.Onlyoffice.SetShares = function(id, shareId, fileId, permissions, callback) {
+ var data = {
+ extraId: id,
+ shareId: shareId,
+ fileId: fileId,
+ permissions: permissions
+ }
+
+ $.ajax({
+ method: "PUT",
+ url: OC.linkToOCS("apps/" + OCA.Onlyoffice.AppName + "/api/v1", 2) + "shares?format=json",
+ data: data,
+ success: function onSuccess(response) {
+ callback(response.ocs.data);
+ }
+ })
+ }
+
+})(jQuery, OC); \ No newline at end of file
diff --git a/js/viewer.js b/js/viewer.js
index cbd3f4a..b1e188f 100644
--- a/js/viewer.js
+++ b/js/viewer.js
@@ -22,29 +22,13 @@
}
OCA.Onlyoffice = {
- AppName: "onlyoffice",
- frameSelector: null,
- setting: {},
- };
-
- OCA.Onlyoffice.GetSettings = function (callbackSettings) {
- if (OCA.Onlyoffice.setting.formats) {
-
- callbackSettings();
-
- } else {
-
- $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings"),
- function onSuccess(settings) {
- OCA.Onlyoffice.setting = settings;
-
- callbackSettings();
- }
- );
-
- }
+ AppName: "onlyoffice",
+ frameSelector: null,
+ setting: {},
};
+ OCA.Onlyoffice.setting = OCP.InitialState.loadState(OCA.Onlyoffice.AppName, "settings");
+
var OnlyofficeViewerVue = {
name: "OnlyofficeViewerVue",
render: function (createElement) {
@@ -54,7 +38,7 @@
attrs: {
id: "onlyofficeViewerFrame",
scrolling: "no",
- src: self.url + "&inframe=true",
+ src: self.url + "&inframe=true&inviewer=true",
},
on: {
load: function () {
@@ -84,30 +68,21 @@
}
};
- var initPage = function () {
- if (OCA.Viewer) {
- OCA.Onlyoffice.frameSelector = "#onlyofficeViewerFrame";
+ if (OCA.Viewer) {
+ OCA.Onlyoffice.frameSelector = "#onlyofficeViewerFrame";
- OCA.Onlyoffice.GetSettings(function () {
-
- var mimes = $.map(OCA.Onlyoffice.setting.formats, function (format) {
- if (format.def) {
- return format.mime;
- }
- });
-
- OCA.Viewer.registerHandler({
- id: OCA.Onlyoffice.AppName,
- group: null,
- mimes: mimes,
- component: OnlyofficeViewerVue
- })
- });
- }
- };
-
- $(document).ready(function() {
- initPage();
- });
+ var mimes = $.map(OCA.Onlyoffice.setting.formats, function (format) {
+ if (format.def) {
+ return format.mime;
+ }
+ });
+
+ OCA.Viewer.registerHandler({
+ id: OCA.Onlyoffice.AppName,
+ group: null,
+ mimes: mimes,
+ component: OnlyofficeViewerVue
+ })
+ }
})(OCA);
diff --git a/l10n/bg.js b/l10n/bg.js
index 74f131e..02f3bed 100644
--- a/l10n/bg.js
+++ b/l10n/bg.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Това е обществен тестов сървър, моля, не използвайте за чувствителни частни данни. Сървърът ще е на разположение по време на 30-дневния период.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30-дневният тестов период приключи, вече не можете да се свържете с демо ONLYOFFICE Docs сървър.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Използвате обществения демо ONLYOFFICE Docs сървър. Моля, не съхранявайте чувствителни частни данни на него.",
- "Secure view settings" : "Настройки за защитен изглед",
"Secure view enables you to secure documents by embedding a watermark" : "Защитеният изглед активира вашите защитени документи, като вгражда в тях воден знак",
"Enable watermarking" : "Активиране на воден знак",
"Watermark text" : "Текст на водния знак",
@@ -116,6 +115,17 @@ OC.L10N.register(
"Create new Form template": "Създайте нов шаблон на формуляр",
"Create form": "Създайте формуляр",
"Fill in form in ONLYOFFICE": "Попълнете формуляр в ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Молим да актуализирате ONLYOFFICE Docs към версия 7.0, за да работи с онлайн формуляри за попълване"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Молим да актуализирате ONLYOFFICE Docs към версия 7.0, за да работи с онлайн формуляри за попълване",
+ "Security": "Сигурност",
+ "Anonymous": "Анонимен",
+ "Light": "Светла",
+ "Classic Light": "Класически светла",
+ "Dark": "Тъмна",
+ "Review": "Преглед",
+ "Comment": "Коментар",
+ "Form filling": "Попълване на формуляр",
+ "Custom filter": "Персонализиран филтър",
+ "group": "група",
+ "Advanced": "Допълнително"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/bg.json b/l10n/bg.json
index d3c038a..9f1bdd2 100644
--- a/l10n/bg.json
+++ b/l10n/bg.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Това е обществен тестов сървър, моля, не използвайте за чувствителни частни данни. Сървърът ще е на разположение по време на 30-дневния период.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "30-дневният тестов период приключи, вече не можете да се свържете с демо ONLYOFFICE Docs сървър.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "Използвате обществения демо ONLYOFFICE Docs сървър. Моля, не съхранявайте чувствителни частни данни на него.",
- "Secure view settings": "Настройки за защитен изглед",
"Secure view enables you to secure documents by embedding a watermark": "Защитеният изглед активира вашите защитени документи, като вгражда в тях воден знак",
"Enable watermarking": "Активиране на воден знак",
"Watermark text": "Текст на водния знак",
@@ -114,6 +113,17 @@
"Create new Form template": "Създайте нов шаблон на формуляр",
"Create form": "Създайте формуляр",
"Fill in form in ONLYOFFICE": "Попълнете формуляр в ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Молим да актуализирате ONLYOFFICE Docs към версия 7.0, за да работи с онлайн формуляри за попълване"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Молим да актуализирате ONLYOFFICE Docs към версия 7.0, за да работи с онлайн формуляри за попълване",
+ "Security": "Сигурност",
+ "Anonymous": "Анонимен",
+ "Light": "Светла",
+ "Classic Light": "Класически светла",
+ "Dark": "Тъмна",
+ "Review": "Преглед",
+ "Comment": "Коментар",
+ "Form filling": "Попълване на формуляр",
+ "Custom filter": "Персонализиран филтър",
+ "group": "група",
+ "Advanced": "Допълнително"
},"pluralForm": "nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/l10n/ca.js b/l10n/ca.js
new file mode 100644
index 0000000..00fd8cb
--- /dev/null
+++ b/l10n/ca.js
@@ -0,0 +1,131 @@
+OC.L10N.register(
+ "onlyoffice",
+ {
+ "Access denied": "Accés denegat",
+ "Invalid request": "Sol·licitud invàlida",
+ "Files not found": "Arxius no trobats",
+ "File not found": "Arxiu no trobat",
+ "Not permitted": "No permès",
+ "Download failed": "Error en la descàrrega",
+ "The required folder was not found": "No s'ha trobat la carpeta necessària",
+ "You don't have enough permission to create": "No té suficient permís per a crear",
+ "Template not found": "Plantilla no trobada",
+ "Can't create file": "No es pot crear l'arxiu",
+ "Format is not supported": "Format no suportat",
+ "Conversion is not required": "No es requereix conversió",
+ "Failed to download converted file": "Fallada en la descàrrega de l'arxiu convertit",
+ "ONLYOFFICE app is not configured. Please contact admin": "Aplicació ONLYOFFICE no està configurada. Si us plau, contacti amb l'administrador",
+ "FileId is empty": "Id de l'arxiu és buit",
+ "You do not have enough permissions to view the file": "No té suficients permisos per a veure l'arxiu",
+ "Error occurred in the document service": "S'ha produït un error en el servei de documents",
+ "Not supported version": "Versió no compatible",
+ "ONLYOFFICE cannot be reached. Please contact admin": "No es pot accedir a l'ONLYOFFICE. Si us plau, contacti amb l'administrador",
+ "Loading, please wait.": "Carregant, esperi, si us plau.",
+ "File created": "Arxiu creat",
+ "Open in ONLYOFFICE": "Obrir en ONLYOFFICE",
+ "Convert with ONLYOFFICE": "Convertir amb ONLYOFFICE",
+ "New document": "Nou document",
+ "New spreadsheet": "Nou full de càlcul",
+ "New presentation": "Nova presentació",
+ "Error when trying to connect": "Error en intentar establir la connexió",
+ "Settings have been successfully updated": "Ajustos han estat actualitzats amb èxit",
+ "Server can't read xml": "Servidor no pot llegir xml",
+ "Bad Response. Errors: ": "Resposta Dolenta. Errors:",
+ "Documentation": "Documentació",
+ "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line.": "Ubicació de l'ONLYOFFICE Docs especifica la direcció del servidor amb els serveis de documents instal·lats. Si us plau, canviï '<documentserver>' per a la direcció de servidor en la línia inferior.",
+ "ONLYOFFICE Docs address": "Direcció d'ONLYOFFICE Docs",
+ "Advanced server settings": "Ajustos de servidor avançats",
+ "ONLYOFFICE Docs address for internal requests from the server": "Direcció d'ONLYOFFICE Docs per a sol·licituds internes del servidor",
+ "Server address for internal requests from ONLYOFFICE Docs": "Direcció de servidor per a sol·licituds internes de l'ONLYOFFICE Docs",
+ "Secret key (leave blank to disable)": "Clau secreta (deixi en blanc o desactivi)",
+ "Open file in the same tab": "Obrir arxiu en la mateixa pestanya",
+ "The default application for opening the format": "L'aplicació predeterminada per a obrir el format",
+ "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)": "Obrir arxiu per a editar (a causa de les restriccions de format les dades podrien perdre's en guardar en els formats de la següent llista)",
+ "View details": "Veure detalls",
+ "Save": "Guardar",
+ "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Contingut Mixt Actiu no està permès. Es requereix la direcció HTTPS per a ONLYOFFICE Docs.",
+ "Restrict access to editors to following groups": "Restringir l'accés a editors a següents grups",
+ "Server settings": "Ajustos de servidor",
+ "Common settings": "Ajustos comuns",
+ "Editor customization settings": "Ajustos de l'editor",
+ "The customization section allows personalizing the editor interface": "La secció de personalització permet personalitzar la interfície de l'editor",
+ "Display Chat menu button": "Mostrar el botó de Xat",
+ "Display the header more compact": "Mostrar l'encapçalat més compacte",
+ "Display Feedback & Support menu button": "Mostrar el botó de Feedback i Suport",
+ "Display Help menu button": "Mostrar el botó d'Ajuda",
+ "Display monochrome toolbar header": "Mostrar l'encapçalat monocromàtic de la barra d'eines",
+ "Save as": "Guardar com",
+ "File saved": "L'arxiu ha estat desat",
+ "Insert image": "Inserir imatge",
+ "Select recipients": "Seleccionar destinataris",
+ "Connect to demo ONLYOFFICE Docs server": "Connectar-se al servidor de ONLYOFFICE Docs de demostració",
+ "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Aquest és un servidor de proves públic, si us plau no l'usis per a les teves dades confidencials. El servidor estarà disponible durant un període de 30 dies.",
+ "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "El període de prova de 30 dies ha acabat, ja no pots connectar-te al servidor d'ONLYOFFICE Docs de demostració",
+ "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "Estàs fent servir el servidor d'ONLYOFFICE Docs de demostració. Si us plau, no emmagatzemis les teves dades confidencials aquí.",
+ "Secure view enables you to secure documents by embedding a watermark": "La vista segura permet assegurar documents mitjançant la inserció d'una marca d'aigua en ells",
+ "Enable watermarking": "Habilitar marques d'aigua",
+ "Watermark text": "Text de marca d'aigua",
+ "DO NOT SHARE THIS": "NO COMPARTIR AIXÒ",
+ "Show watermark on tagged files": "Mostrar marca d'aigua en arxius etiquetats",
+ "Show watermark for users of groups": "Mostrar marca d'aigua per a usuaris del grup",
+ "Supported placeholders": "Marcadors suportats",
+ "Show watermark for all shares": "Mostrar marca d'aigua per a tots els usos compartits",
+ "Show watermark for read only shares": "Mostrar marca d'aigua per a usos compartits de només lectura",
+ "Link shares": "Ús compartit d'enllaços",
+ "Show watermark for all link shares": "Mostrar marca d'aigua per a tots els usos compartits d'enllaços",
+ "Show watermark for download hidden shares": "Mostrar marca d'aigua per a usos compartits sense descarregar",
+ "Show watermark for read only link shares": "Mostrar marca d'aigua per a usos compartits de només lectura",
+ "Show watermark on link shares with specific system tags": "Mostrar marca d'aigua per a usos compartits d'enllaços amb etiquetes de sistema específics",
+ "Select tag": "Seleccionar etiqueta",
+ "Select file to compare": "Seleccioni un arxiu per comparar",
+ "Review mode for viewing": "Mode de revisió per visualització",
+ "Markup": "Canvis",
+ "Final": "Final",
+ "Original": "Original",
+ "version": "versió",
+ "Disable certificate verification (insecure)": "Desactivar la verificació de certificats (insegur)",
+ "Keep intermediate versions when editing (forcesave)": "Mantenir les versions intermèdies durant l'edició (forçar guardar)",
+ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE per a generar una vista prèvia del document (ocuparà espai en el disc)",
+ "Keep metadata for each version once the document is edited (it will take up disk space)": "Guardar les metadades de cada versió en editar el document (ocuparà espai en el disc)",
+ "All history successfully deleted": "Tot l'historial s'ha eliminat correctament",
+ "Create": "Crear",
+ "Select template": "Seleccionar plantilla",
+ "Invalid file provided": "Arxiu proporcionat no vàlid",
+ "Empty": "Buit",
+ "Error": "Error",
+ "Add a new template": "Afegir una plantilla nova",
+ "Template already exists": "La plantilla ja existeix",
+ "Template must be in OOXML format": "La plantilla ha de tenir el format OOXML",
+ "Template successfully added": "La plantilla es va agregar correctament",
+ "Template successfully deleted": "La plantilla es va eliminar correctament",
+ "Common templates": "Plantilles comunes",
+ "Failed to delete template": "No es va poder eliminar la plantilla",
+ "File has been converted. Its content might look different.": "L'arxiu s'ha convertit. El seu contingut pot ser diferent.",
+ "Download as": "Descarregar com",
+ "Download": "Descarregar",
+ "Origin format": "Format original",
+ "Failed to send notification": "Error en enviar la notificació",
+ "Notification sent successfully": "Notificació enviada correctament",
+ "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s ha esmentat en %2\$s: \"%3\$s\".",
+ "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} li ha esmentat en {file}: \"%1\$s\".",
+ "Choose a format to convert {fileName}": "Triï un format per a convertir {fileName}",
+ "New form template": "Nova plantilla de formulari",
+ "Blank": "En blanc",
+ "From text document": "Des de document de text",
+ "Create new Form template": "Crear nova plantilla de formulari",
+ "Create form": "Crear formulari",
+ "Fill in form in ONLYOFFICE": "Omplir el formulari en ONLYOFFICE",
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Si us plau, actualitzi ONLYOFFICE Docs a la versió 7.0 per a poder treballar amb formularis emplenables en línia",
+ "Security": "Seguretat",
+ "Anonymous": "Anònim",
+ "Light": "Llum",
+ "Classic Light": "Llum clàssica",
+ "Dark": "Fosc",
+ "Review": "Visualització prèvia",
+ "Comment": "Comentari",
+ "Form filling": "Emplenament de formularis",
+ "Custom filter": "Filtre personalitzat",
+ "group": "agrupa",
+ "Advanced": "Avançat"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/l10n/ca.json b/l10n/ca.json
new file mode 100644
index 0000000..226b19e
--- /dev/null
+++ b/l10n/ca.json
@@ -0,0 +1,129 @@
+{ "translations": {
+ "Access denied": "Accés denegat",
+ "Invalid request": "Sol·licitud invàlida",
+ "Files not found": "Arxius no trobats",
+ "File not found": "Arxiu no trobat",
+ "Not permitted": "No permès",
+ "Download failed": "Error en la descàrrega",
+ "The required folder was not found": "No s'ha trobat la carpeta necessària",
+ "You don't have enough permission to create": "No té suficient permís per a crear",
+ "Template not found": "Plantilla no trobada",
+ "Can't create file": "No es pot crear l'arxiu",
+ "Format is not supported": "Format no suportat",
+ "Conversion is not required": "No es requereix conversió",
+ "Failed to download converted file": "Fallada en la descàrrega de l'arxiu convertit",
+ "ONLYOFFICE app is not configured. Please contact admin": "Aplicació ONLYOFFICE no està configurada. Si us plau, contacti amb l'administrador",
+ "FileId is empty": "Id de l'arxiu és buit",
+ "You do not have enough permissions to view the file": "No té suficients permisos per a veure l'arxiu",
+ "Error occurred in the document service": "S'ha produït un error en el servei de documents",
+ "Not supported version": "Versió no compatible",
+ "ONLYOFFICE cannot be reached. Please contact admin": "No es pot accedir a l'ONLYOFFICE. Si us plau, contacti amb l'administrador",
+ "Loading, please wait.": "Carregant, esperi, si us plau.",
+ "File created": "Arxiu creat",
+ "Open in ONLYOFFICE": "Obrir en ONLYOFFICE",
+ "Convert with ONLYOFFICE": "Convertir amb ONLYOFFICE",
+ "New document": "Nou document",
+ "New spreadsheet": "Nou full de càlcul",
+ "New presentation": "Nova presentació",
+ "Error when trying to connect": "Error en intentar establir la connexió",
+ "Settings have been successfully updated": "Ajustos han estat actualitzats amb èxit",
+ "Server can't read xml": "Servidor no pot llegir xml",
+ "Bad Response. Errors: ": "Resposta Dolenta. Errors:",
+ "Documentation": "Documentació",
+ "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line.": "Ubicació de l'ONLYOFFICE Docs especifica la direcció del servidor amb els serveis de documents instal·lats. Si us plau, canviï '<documentserver>' per a la direcció de servidor en la línia inferior.",
+ "ONLYOFFICE Docs address": "Direcció d'ONLYOFFICE Docs",
+ "Advanced server settings": "Ajustos de servidor avançats",
+ "ONLYOFFICE Docs address for internal requests from the server": "Direcció d'ONLYOFFICE Docs per a sol·licituds internes del servidor",
+ "Server address for internal requests from ONLYOFFICE Docs": "Direcció de servidor per a sol·licituds internes de l'ONLYOFFICE Docs",
+ "Secret key (leave blank to disable)": "Clau secreta (deixi en blanc o desactivi)",
+ "Open file in the same tab": "Obrir arxiu en la mateixa pestanya",
+ "The default application for opening the format": "L'aplicació predeterminada per a obrir el format",
+ "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)": "Obrir arxiu per a editar (a causa de les restriccions de format les dades podrien perdre's en guardar en els formats de la següent llista)",
+ "View details": "Veure detalls",
+ "Save": "Guardar",
+ "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Contingut Mixt Actiu no està permès. Es requereix la direcció HTTPS per a ONLYOFFICE Docs.",
+ "Restrict access to editors to following groups": "Restringir l'accés a editors a següents grups",
+ "Server settings": "Ajustos de servidor",
+ "Common settings": "Ajustos comuns",
+ "Editor customization settings": "Ajustos de l'editor",
+ "The customization section allows personalizing the editor interface": "La secció de personalització permet personalitzar la interfície de l'editor",
+ "Display Chat menu button": "Mostrar el botó de Xat",
+ "Display the header more compact": "Mostrar l'encapçalat més compacte",
+ "Display Feedback & Support menu button": "Mostrar el botó de Feedback i Suport",
+ "Display Help menu button": "Mostrar el botó d'Ajuda",
+ "Display monochrome toolbar header": "Mostrar l'encapçalat monocromàtic de la barra d'eines",
+ "Save as": "Guardar com",
+ "File saved": "L'arxiu ha estat desat",
+ "Insert image": "Inserir imatge",
+ "Select recipients": "Seleccionar destinataris",
+ "Connect to demo ONLYOFFICE Docs server": "Connectar-se al servidor de ONLYOFFICE Docs de demostració",
+ "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Aquest és un servidor de proves públic, si us plau no l'usis per a les teves dades confidencials. El servidor estarà disponible durant un període de 30 dies.",
+ "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "El període de prova de 30 dies ha acabat, ja no pots connectar-te al servidor d'ONLYOFFICE Docs de demostració",
+ "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "Estàs fent servir el servidor d'ONLYOFFICE Docs de demostració. Si us plau, no emmagatzemis les teves dades confidencials aquí.",
+ "Secure view enables you to secure documents by embedding a watermark": "La vista segura permet assegurar documents mitjançant la inserció d'una marca d'aigua en ells",
+ "Enable watermarking": "Habilitar marques d'aigua",
+ "Watermark text": "Text de marca d'aigua",
+ "DO NOT SHARE THIS": "NO COMPARTIR AIXÒ",
+ "Show watermark on tagged files": "Mostrar marca d'aigua en arxius etiquetats",
+ "Show watermark for users of groups": "Mostrar marca d'aigua per a usuaris del grup",
+ "Supported placeholders": "Marcadors suportats",
+ "Show watermark for all shares": "Mostrar marca d'aigua per a tots els usos compartits",
+ "Show watermark for read only shares": "Mostrar marca d'aigua per a usos compartits de només lectura",
+ "Link shares": "Ús compartit d'enllaços",
+ "Show watermark for all link shares": "Mostrar marca d'aigua per a tots els usos compartits d'enllaços",
+ "Show watermark for download hidden shares": "Mostrar marca d'aigua per a usos compartits sense descarregar",
+ "Show watermark for read only link shares": "Mostrar marca d'aigua per a usos compartits de només lectura",
+ "Show watermark on link shares with specific system tags": "Mostrar marca d'aigua per a usos compartits d'enllaços amb etiquetes de sistema específics",
+ "Select tag": "Seleccionar etiqueta",
+ "Select file to compare": "Seleccioni un arxiu per comparar",
+ "Review mode for viewing": "Mode de revisió per visualització",
+ "Markup": "Canvis",
+ "Final": "Final",
+ "Original": "Original",
+ "version": "versió",
+ "Disable certificate verification (insecure)": "Desactivar la verificació de certificats (insegur)",
+ "Keep intermediate versions when editing (forcesave)": "Mantenir les versions intermèdies durant l'edició (forçar guardar)",
+ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE per a generar una vista prèvia del document (ocuparà espai en el disc)",
+ "Keep metadata for each version once the document is edited (it will take up disk space)": "Guardar les metadades de cada versió en editar el document (ocuparà espai en el disc)",
+ "All history successfully deleted": "Tot l'historial s'ha eliminat correctament",
+ "Create": "Crear",
+ "Select template": "Seleccionar plantilla",
+ "Invalid file provided": "Arxiu proporcionat no vàlid",
+ "Empty": "Buit",
+ "Error": "Error",
+ "Add a new template": "Afegir una plantilla nova",
+ "Template already exists": "La plantilla ja existeix",
+ "Template must be in OOXML format": "La plantilla ha de tenir el format OOXML",
+ "Template successfully added": "La plantilla es va agregar correctament",
+ "Template successfully deleted": "La plantilla es va eliminar correctament",
+ "Common templates": "Plantilles comunes",
+ "Failed to delete template": "No es va poder eliminar la plantilla",
+ "File has been converted. Its content might look different.": "L'arxiu s'ha convertit. El seu contingut pot ser diferent.",
+ "Download as": "Descarregar com",
+ "Download": "Descarregar",
+ "Origin format": "Format original",
+ "Failed to send notification": "Error en enviar la notificació",
+ "Notification sent successfully": "Notificació enviada correctament",
+ "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s ha esmentat en %2$s: \"%3$s\".",
+ "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} li ha esmentat en {file}: \"%1$s\".",
+ "Choose a format to convert {fileName}": "Triï un format per a convertir {fileName}",
+ "New form template": "Nova plantilla de formulari",
+ "Blank": "En blanc",
+ "From text document": "Des de document de text",
+ "Create new Form template": "Crear nova plantilla de formulari",
+ "Create form": "Crear formulari",
+ "Fill in form in ONLYOFFICE": "Omplir el formulari en ONLYOFFICE",
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Si us plau, actualitzi ONLYOFFICE Docs a la versió 7.0 per a poder treballar amb formularis emplenables en línia",
+ "Security": "Seguretat",
+ "Anonymous": "Anònim",
+ "Light": "Llum",
+ "Classic Light": "Llum clàssica",
+ "Dark": "Fosc",
+ "Review": "Visualització prèvia",
+ "Comment": "Comentari",
+ "Form filling": "Emplenament de formularis",
+ "Custom filter": "Filtre personalitzat",
+ "group": "agrupa",
+ "Advanced": "Avançat"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+}
diff --git a/l10n/de.js b/l10n/de.js
index 07ce0bb..ef548ee 100644
--- a/l10n/de.js
+++ b/l10n/de.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwende beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "Der 30-tägige Testzeitraum ist abgelaufen. Du kannst keine Verbindung mehr zu Demo ONLYOFFICE Docs Server herstellen.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Du verwendest den öffentlichen Demo ONLYOFFICE Docs Server. Bitte benutze ihn nicht zum Speichern von Deinen privaten sensiblen Daten.",
- "Secure view settings" : "Einstellungen für Sichere Ansicht",
"Secure view enables you to secure documents by embedding a watermark" : "Sichere Ansicht ermöglicht Dir Dokumente durch Einbettung eines Wasserzeichens abzusichern",
"Enable watermarking" : "Wasserzeichenmarkierung aktivieren",
"Watermark text" : "Wasserzeichen-Text",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "Neue Formularvorlage erstellen",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich",
+ "Security": "Sicherheit",
+ "Anonymous": "Anonym",
+ "Default editor theme": "Standardmäßiges Thema des Editors",
+ "Light": "Hell",
+ "Classic Light": "Klassisch Hell",
+ "Dark": "Dunkel",
+ "Review": "Review",
+ "Comment": "Kommentar",
+ "Form filling": "Ausfüllen von formularen",
+ "Custom filter": "Benutzerdefinierter filter",
+ "group": "gruppe",
+ "Advanced": "Erweitert",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Erweiterte Zugriffsrechte in ONLYOFFICE Docs vergeben"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/de.json b/l10n/de.json
index 6b01cac..3e2bd4a 100644
--- a/l10n/de.json
+++ b/l10n/de.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwende beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "Der 30-tägige Testzeitraum ist abgelaufen. Du kannst keine Verbindung mehr zu Demo ONLYOFFICE Docs Server herstellen.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Du verwendest den öffentlichen Demo ONLYOFFICE Docs Server. Bitte benutze ihn nicht zum Speichern von Deinen privaten sensiblen Daten.",
- "Secure view settings" : "Einstellungen für Sichere Ansicht",
"Secure view enables you to secure documents by embedding a watermark" : "Sichere Ansicht ermöglicht Dir Dokumente durch Einbettung eines Wasserzeichens abzusichern",
"Enable watermarking" : "Wasserzeichenmarkierung aktivieren",
"Watermark text" : "Wasserzeichen-Text",
@@ -114,6 +113,19 @@
"Create new Form template": "Neue Formularvorlage erstellen",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich",
+ "Security": "Sicherheit",
+ "Anonymous": "Anonym",
+ "Default editor theme": "Standardmäßiges Thema des Editors",
+ "Light": "Hell",
+ "Classic Light": "Klassisch Hell",
+ "Dark": "Dunkel",
+ "Review": "Review",
+ "Comment": "Kommentarе",
+ "Form filling": "Ausfüllen von formularen",
+ "Custom filter": "Benutzerdefinierter filter",
+ "group": "gruppe",
+ "Advanced": "Erweitert",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Erweiterte Zugriffsrechte in ONLYOFFICE Docs vergeben"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/l10n/de_DE.js b/l10n/de_DE.js
index 03354fb..d3199f6 100644
--- a/l10n/de_DE.js
+++ b/l10n/de_DE.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwenden Sie beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "Der 30-tägige Testzeitraum ist abgelaufen. Sie können keine Verbindung mehr zu Demo ONLYOFFICE Docs Server herstellen.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "Sie verwenden den öffentlichen Demo ONLYOFFICE Docs Server. Bitte benutzen Sie ihn nicht zum Speichern von Ihren privaten sensiblen Daten.",
- "Secure view settings" : "Einstellungen für Sichere Ansicht",
"Secure view enables you to secure documents by embedding a watermark" : "Sichere Ansicht ermöglicht Ihnen Dokumente durch Einbettung eines Wasserzeichens abzusichern",
"Enable watermarking" : "Wasserzeichenmarkierung aktivieren",
"Watermark text" : "Wasserzeichen-Text",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "Neue Formularvorlage erstellen",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich",
+ "Security": "Sicherheit",
+ "Anonymous": "Anonym",
+ "Default editor theme": "Standardmäßiges Thema des Editors",
+ "Light": "Hell",
+ "Classic Light": "Klassisch Hell",
+ "Dark": "Dunkel",
+ "Review": "Review",
+ "Comment": "Kommentar",
+ "Form filling": "Ausfüllen von formularen",
+ "Custom filter": "Benutzerdefinierter filter",
+ "group": "gruppe",
+ "Advanced": "Erweitert",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Erweiterte Zugriffsrechte in ONLYOFFICE Docs vergeben"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/de_DE.json b/l10n/de_DE.json
index 41f8cf5..c341b07 100644
--- a/l10n/de_DE.json
+++ b/l10n/de_DE.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwenden Sie beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "Der 30-tägige Testzeitraum ist abgelaufen. Sie können keine Verbindung mehr zu Demo ONLYOFFICE Docs Server herstellen.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "Sie verwenden den öffentlichen Demo ONLYOFFICE Docs Server. Bitte benutzen Sie ihn nicht zum Speichern von Ihren privaten sensiblen Daten.",
- "Secure view settings" : "Einstellungen für Sichere Ansicht",
"Secure view enables you to secure documents by embedding a watermark" : "Sichere Ansicht ermöglicht Ihnen Dokumente durch Einbettung eines Wasserzeichens abzusichern",
"Enable watermarking" : "Wasserzeichenmarkierung aktivieren",
"Watermark text" : "Wasserzeichen-Text",
@@ -114,6 +113,19 @@
"Create new Form template": "Neue Formularvorlage erstellen",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Für Online-Arbeit mit Formularen ist Version 7.0 von ONLYOFFICE Docs erforderlich",
+ "Security": "Sicherheit",
+ "Anonymous": "Anonym",
+ "Default editor theme": "Standardmäßiges Thema des Editors",
+ "Light": "Hell",
+ "Classic Light": "Klassisch Hell",
+ "Dark": "Dunkel",
+ "Review": "Review",
+ "Comment": "Kommentarе",
+ "Form filling": "Ausfüllen von formularen",
+ "Custom filter": "Benutzerdefinierter filter",
+ "group": "gruppe",
+ "Advanced": "Erweitert",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Erweiterte Zugriffsrechte in ONLYOFFICE Docs vergeben"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/l10n/es.js b/l10n/es.js
index 5b09ce6..f379006 100644
--- a/l10n/es.js
+++ b/l10n/es.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Este es un servidor de pruebas público, por favor no lo uses para tus datos confidenciales. El servidor estará disponible durante un período de 30 días.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "El período de prueba de 30 días ha terminado, ya no puedes conectarte al servidor de ONLYOFFICE Docs de demostración",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Estás usando el servidor de ONLYOFFICE Docs de demostración. Por favor, no almacenes tus datos confidenciales aquí.",
- "Secure view settings" : "Configuración de visualización segura",
"Secure view enables you to secure documents by embedding a watermark" : "La vista segura permite asegurar documentos mediante la inserción de una marca de agua en ellos",
"Enable watermarking" : "Habilitar marcas de agua",
"Watermark text" : "Texto de marca de agua",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "Crear nueva plantilla de formulario",
"Create form": "Crear formulario",
"Fill in form in ONLYOFFICE": "Rellenar el formulario en ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Por favor, actualice ONLYOFFICE Docs a la versión 7.0 para poder trabajar con formularios rellenables en línea"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Por favor, actualice ONLYOFFICE Docs a la versión 7.0 para poder trabajar con formularios rellenables en línea",
+ "Security": "Seguridad",
+ "Anonymous": "Anónimo",
+ "Default editor theme": "Tema del editor predeterminado",
+ "Light": "Claro",
+ "Classic Light": "Clásico claro",
+ "Dark": "Oscuro",
+ "Review": "Revista",
+ "Comment": "Comentarios",
+ "Form filling": "Relleno de formulario",
+ "Custom filter": "Filtro personalizado",
+ "group": "grupo",
+ "Advanced": "Avanzado",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Proporcione permisos avanzados para los documentos utilizando ONLYOFFICE Docs"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/es.json b/l10n/es.json
index c032fce..ac872ea 100644
--- a/l10n/es.json
+++ b/l10n/es.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Este es un servidor de pruebas público, por favor no lo uses para tus datos confidenciales. El servidor estará disponible durante un período de 30 días.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "El período de prueba de 30 días ha terminado, ya no puedes conectarte al servidor de ONLYOFFICE Docs de demostración",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Estás usando el servidor de ONLYOFFICE Docs de demostración. Por favor, no almacenes tus datos confidenciales aquí.",
- "Secure view settings" : "Configuración de visualización segura",
"Secure view enables you to secure documents by embedding a watermark" : "La vista segura permite asegurar documentos mediante la inserción de una marca de agua en ellos",
"Enable watermarking" : "Habilitar marcas de agua",
"Watermark text" : "Texto de marca de agua",
@@ -114,6 +113,19 @@
"Create new Form template": "Crear nueva plantilla de formulario",
"Create form": "Crear formulario",
"Fill in form in ONLYOFFICE": "Rellenar el formulario en ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Por favor, actualice ONLYOFFICE Docs a la versión 7.0 para poder trabajar con formularios rellenables en línea"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Por favor, actualice ONLYOFFICE Docs a la versión 7.0 para poder trabajar con formularios rellenables en línea",
+ "Security": "Seguridad",
+ "Anonymous": "Anónimo",
+ "Default editor theme": "Tema del editor predeterminado",
+ "Light": "Claro",
+ "Classic Light": "Clásico claro",
+ "Dark": "Oscuro",
+ "Review": "Revista",
+ "Comment": "Comentarios",
+ "Form filling": "Relleno de formulario",
+ "Custom filter": "Filtro personalizado",
+ "group": "grupo",
+ "Advanced": "Avanzado",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Proporcione permisos avanzados para los documentos utilizando ONLYOFFICE Docs"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/l10n/fr.js b/l10n/fr.js
index 362daa9..98d4e46 100644
--- a/l10n/fr.js
+++ b/l10n/fr.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "C’est un serveur public proposé à des fins de tests, veuillez ne pas l’utiliser pour vos données personnelles sensibles. Le serveur est disponible pendant 30 jours.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "La période d’essai de 30 jours est expirée, vous n’êtes plus en mesure de vous connecter à la version démo de ONLYOFFICE Docs.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Vous utilisez la version démo de ONLYOFFICE Docs, proposée à des fins de tests. Veuillez ne pas stocker vos données confidentielles.",
- "Secure view settings" : "Paramètres d’affichage sécurisé",
"Secure view enables you to secure documents by embedding a watermark" : "L’affichage sécurisé permet de protéger vos documents à l’aide d’un filigrane.",
"Enable watermarking" : "Activer un filigrane",
"Watermark text" : "Texte du filigrane",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "Créer un nouveau modèle de formulaire",
"Create form": "Créer un formulaire",
"Fill in form in ONLYOFFICE": "Remplir le formulaire dans ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Veuillez mettre à jour ONLYOFFICE Docs vers la version 7.0 pour travailler sur les formulaires à remplir en ligne"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Veuillez mettre à jour ONLYOFFICE Docs vers la version 7.0 pour travailler sur les formulaires à remplir en ligne",
+ "Security": "Sécurité",
+ "Anonymous": "Anonyme",
+ "Default editor theme": "Thème d'éditeur par défaut",
+ "Light": "Clair",
+ "Classic Light": "Classique clair",
+ "Dark": "Sombre",
+ "Review": "Révision",
+ "Comment": "Commentaire",
+ "Form filling": "Remplissage de formulaire",
+ "Custom filter": "Filtre personnalisé",
+ "group": "groupe",
+ "Advanced": "Avancé",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Fournir des autorisations avancées pour les documents en utilisant ONLYOFFICE Docs"
},
"nplurals=2; plural=(n > 1);");
diff --git a/l10n/fr.json b/l10n/fr.json
index 41ef6b3..7e7aa6e 100644
--- a/l10n/fr.json
+++ b/l10n/fr.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "C’est un serveur public proposé à des fins de tests, veuillez ne pas l’utiliser pour vos données personnelles sensibles. Le serveur est disponible pendant 30 jours.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "La période d’essai de 30 jours est expirée, vous n’êtes plus en mesure de vous connecter à la version démo de ONLYOFFICE Docs.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Vous utilisez la version démo de ONLYOFFICE Docs, proposée à des fins de tests. Veuillez ne pas stocker vos données confidentielles.",
- "Secure view settings" : "Paramètres d’affichage sécurisé",
"Secure view enables you to secure documents by embedding a watermark" : "L’affichage sécurisé permet de protéger vos documents à l’aide d’un filigrane.",
"Enable watermarking" : "Activer un filigrane",
"Watermark text" : "Texte du filigrane",
@@ -115,5 +114,18 @@
"Create form": "Créer un formulaire",
"Fill in form in ONLYOFFICE": "Remplir le formulaire dans ONLYOFFICE",
"Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Veuillez mettre à jour ONLYOFFICE Docs vers la version 7.0 pour travailler sur les formulaires à remplir en ligne"
+ "Security": "Sécurité",
+ "Anonymous": "Anonyme",
+ "Default editor theme": "Thème d'éditeur par défaut",
+ "Light": "Clair",
+ "Classic Light": "Classique clair",
+ "Dark": "Sombre",
+ "Review": "Révision",
+ "Comment": "Commentaire",
+ "Form filling": "Remplissage de formulaire",
+ "Custom filter": "Filtre personnalisé",
+ "group": "groupe",
+ "Advanced": "Avancé",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Fournir des autorisations avancées pour les documents en utilisant ONLYOFFICE Docs"
},"pluralForm" :"nplurals=2; plural=(n > 1);"
-}
+} \ No newline at end of file
diff --git a/l10n/it.js b/l10n/it.js
index 29789ec..b5baa99 100644
--- a/l10n/it.js
+++ b/l10n/it.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Questo è un server di prova pubblico, non utilizzarlo per dati sensibili privati. Il server sarà disponibile per un periodo di 30 giorni.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "Il periodo di prova di 30 giorni è terminato; non è più possibile connettersi alla versione demo di ONLYOFFICE Docs.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Stai utilizzando la versione demo pubblica di ONLYOFFICE Docs. Non memorizzare dati sensibili privati.",
- "Secure view settings" : "Impostazioni di visualizzazione sicura",
"Secure view enables you to secure documents by embedding a watermark" : "La visualizzazione sicura consente di proteggere i documenti inserendo una filigrana",
"Enable watermarking" : "Abilita la filigrana",
"Watermark text" : "Testo della filigrana",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "Creare un nuovo modello di modulo",
"Create form": "Creare modulo",
"Fill in form in ONLYOFFICE": "Compilare il modulo in ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Si prega di aggiornare ONLYOFFICE Docs alla versione 7.0 per lavorare su moduli compilabili online"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Si prega di aggiornare ONLYOFFICE Docs alla versione 7.0 per lavorare su moduli compilabili online",
+ "Security": "Sicurezza",
+ "Anonymous": "Anonimo",
+ "Default editor theme": "Tema dell'editor predefinito",
+ "Light": "Chiaro",
+ "Classic Light": "Classico chiaro",
+ "Dark": "Scuro",
+ "Review": "Revisione",
+ "Comment": "Commento",
+ "Form filling": "Compilare un modulo",
+ "Custom filter": "Filtro personalizzato",
+ "group": "gruppo",
+ "Advanced": "Avanzate",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Fornisci autorizzazioni avanzate per i documenti utilizzando ONLYOFFICE Docs"
},
"nplurals=2; plural=(n != 1);"); \ No newline at end of file
diff --git a/l10n/it.json b/l10n/it.json
index 11001d7..df7d782 100644
--- a/l10n/it.json
+++ b/l10n/it.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Questo è un server di prova pubblico, non utilizzarlo per dati sensibili privati. Il server sarà disponibile per un periodo di 30 giorni.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "Il periodo di prova di 30 giorni è terminato; non è più possibile connettersi alla versione demo di ONLYOFFICE Docs.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Stai utilizzando la versione demo pubblica di ONLYOFFICE Docs. Non memorizzare dati sensibili privati.",
- "Secure view settings" : "Impostazioni di visualizzazione sicura",
"Secure view enables you to secure documents by embedding a watermark" : "La visualizzazione sicura consente di proteggere i documenti inserendo una filigrana",
"Enable watermarking" : "Abilita la filigrana",
"Watermark text" : "Testo della filigrana",
@@ -114,6 +113,19 @@
"Create new Form template": "Creare un nuovo modello di modulo",
"Create form": "Creare modulo",
"Fill in form in ONLYOFFICE": "Compilare il modulo in ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Si prega di aggiornare ONLYOFFICE Docs alla versione 7.0 per lavorare su moduli compilabili online"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Si prega di aggiornare ONLYOFFICE Docs alla versione 7.0 per lavorare su moduli compilabili online",
+ "Security": "Sicurezza",
+ "Anonymous": "Anonimo",
+ "Default editor theme": "Tema dell'editor predefinito",
+ "Light": "Chiaro",
+ "Classic Light": "Classico chiaro",
+ "Dark": "Scuro",
+ "Review": "Revisione",
+ "Comment": "Commento",
+ "Form filling": "Compilare un modulo",
+ "Custom filter": "Filtro personalizzato",
+ "group": "gruppo",
+ "Advanced": "Avanzate",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Fornisci autorizzazioni avanzate per i documenti utilizzando ONLYOFFICE Docs"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/l10n/ja.js b/l10n/ja.js
index 9c55b37..f346e0e 100644
--- a/l10n/ja.js
+++ b/l10n/ja.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "これはパブリックテストサーバーです。プライベートな機密データには使用しないでください。サーバーを30日間、利用できます。",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30日間のテスト期間が終了したら、ONLYOFFICE Docs デモサーバーには繋がらなくなります。",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "パブリック ONLYOFFICE Docs サーバーを使っているので、プライベートな機密データを利用しないようにしてください。",
- "Secure view settings" : "セキュアビュー設定",
"Secure view enables you to secure documents by embedding a watermark" : "セキュアビューでドキュメント透かしを埋め込んでドキュメントを保護します",
"Enable watermarking" : "透かしを有効",
"Watermark text" : "透かしテキスト",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "新しいフォームテンプレートの作成",
"Create form": "フォームの作成",
"Fill in form in ONLYOFFICE": "ONLYOFFICEでフォームを記入する",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください",
+ "Security": "セキュリティ",
+ "Anonymous": "匿名",
+ "Default editor theme": "デフォルトのエディタテーマ",
+ "Light": "明るい",
+ "Classic Light": "明るい(クラシック)",
+ "Dark": "ダーク",
+ "Review": "レビュー",
+ "Comment": "コメント",
+ "Form filling": "フォーム入力",
+ "Custom filter": "ユーザー設定フィルター",
+ "group": "グループ",
+ "Advanced": "詳細",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "ONLYOFFICE Docsを利用した高度なドキュメント権限の提供"
},
"nplurals=1; plural=0;");
diff --git a/l10n/ja.json b/l10n/ja.json
index ee74a3d..21543c1 100644
--- a/l10n/ja.json
+++ b/l10n/ja.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "これはパブリックテストサーバーです。プライベートな機密データには使用しないでください。サーバーを30日間、利用できます。",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30日間のテスト期間が終了したら、ONLYOFFICE Docs デモサーバーには繋がらなくなります。",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "パブリック ONLYOFFICE Docs サーバーを使っているので、プライベートな機密データを利用しないようにしてください。",
- "Secure view settings" : "セキュアビュー設定",
"Secure view enables you to secure documents by embedding a watermark" : "セキュアビューでドキュメント透かしを埋め込んでドキュメントを保護します",
"Enable watermarking" : "透かしを有効",
"Watermark text" : "透かしテキスト",
@@ -114,6 +113,19 @@
"Create new Form template": "新しいフォームテンプレートの作成",
"Create form": "フォームの作成",
"Fill in form in ONLYOFFICE": "ONLYOFFICEでフォームを記入する",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください",
+ "Security": "セキュリティ",
+ "Anonymous": "匿名",
+ "Default editor theme": "デフォルトのエディタテーマ",
+ "Light": "明るい",
+ "Classic Light": "明るい(クラシック)",
+ "Dark": "ダーク",
+ "Review": "レビュー",
+ "Comment": "コメント",
+ "Form filling": "フォーム入力",
+ "Custom filter": "ユーザー設定フィルター",
+ "group": "グループ",
+ "Advanced": "詳細",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "ONLYOFFICE Docsを利用した高度なドキュメント権限の提供"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/l10n/pl.js b/l10n/pl.js
index d211310..faee6cd 100644
--- a/l10n/pl.js
+++ b/l10n/pl.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "To jest publiczny testowy serwer, proszę nie używać go do prywatnych danych. Serwer będzie dostępny przez 30 dni.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "Upłyneło 30 dni, nie możesz się już łączyć z serwerem demo.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Używasz publicznego serwera demo. Nie przechowuj tu prywatnych danych.",
- "Secure view settings" : "Ustawienia bezpiecznego widoku",
"Secure view enables you to secure documents by embedding a watermark" : "Bezpieczny widok pozwala na zabezpieczenie dokumentów poprzez dodanie znaku wodnego",
"Enable watermarking" : "Włącz znaki wodne",
"Watermark text" : "Tekst znaku wodnego",
@@ -116,6 +115,17 @@ OC.L10N.register(
"Create new Form template": "Utwórz nowy szablon formularza",
"Create form": "Utwórz formularz",
"Fill in form in ONLYOFFICE": "Wypełnić formularz w ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Zaktualizuj ONLYOFFICE Docs do wersji 7.0, aby działały w formularzach do wypełniania online"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Zaktualizuj ONLYOFFICE Docs do wersji 7.0, aby działały w formularzach do wypełniania online",
+ "Security": "Bezpieczeństwo",
+ "Anonymous": "Anonimowy",
+ "Light": "Jasny",
+ "Classic Light": "Klasyczny jasny",
+ "Dark": "Ciemny",
+ "Review": "Recenzja",
+ "Comment": "Komentarz",
+ "Form filling": "Wypełnianie formularza",
+ "Custom filter": "Niestandardowy filtr",
+ "group": "grupa",
+ "Advanced": "Zaawansowane"
},
"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"); \ No newline at end of file
diff --git a/l10n/pl.json b/l10n/pl.json
index bea2992..2987f9f 100644
--- a/l10n/pl.json
+++ b/l10n/pl.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "To jest publiczny testowy serwer, proszę nie używać go do prywatnych danych. Serwer będzie dostępny przez 30 dni.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "Upłyneło 30 dni, nie możesz się już łączyć z serwerem demo.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Używasz publicznego serwera demo. Nie przechowuj tu prywatnych danych.",
- "Secure view settings" : "Ustawienia bezpiecznego widoku",
"Secure view enables you to secure documents by embedding a watermark" : "Bezpieczny widok pozwala na zabezpieczenie dokumentów poprzez dodanie znaku wodnego",
"Enable watermarking" : "Włącz znaki wodne",
"Watermark text" : "Tekst znaku wodnego",
@@ -114,6 +113,17 @@
"Create new Form template": "Utwórz nowy szablon formularza",
"Create form": "Utwórz formularz",
"Fill in form in ONLYOFFICE": "Wypełnić formularz w ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Zaktualizuj ONLYOFFICE Docs do wersji 7.0, aby działały w formularzach do wypełniania online"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Zaktualizuj ONLYOFFICE Docs do wersji 7.0, aby działały w formularzach do wypełniania online",
+ "Security": "Bezpieczeństwo",
+ "Anonymous": "Anonimowy",
+ "Light": "Jasny",
+ "Classic Light": "Klasyczny jasny",
+ "Dark": "Ciemny",
+ "Review": "Recenzja",
+ "Comment": "Komentarz",
+ "Form filling": "Wypełnianie formularza",
+ "Custom filter": "Niestandardowy filtr",
+ "group": "grupa",
+ "Advanced": "Zaawansowane"
},"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"
} \ No newline at end of file
diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js
index 825ef86..f77060e 100644
--- a/l10n/pt_BR.js
+++ b/l10n/pt_BR.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Este é um servidor de teste público, não o use para dados confidenciais. O servidor estará disponível por um período de 30 dias.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "O período de teste de 30 dias acabou, você não pode mais se conectar ao Servidor de demonstração do ONLYOFFICE Docs",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Você está usando o Servidor de demonstração pública. Não armazene dados confidenciais.",
- "Secure view settings" : "Configurações de visualização segura",
"Secure view enables you to secure documents by embedding a watermark" : "A visualização segura permite proteger documentos incorporando uma marca d'água",
"Enable watermarking" : "Ativar marca d'água",
"Watermark text" : "Texto de marca d'água",
@@ -116,6 +115,17 @@ OC.L10N.register(
"Create new Form template": "Criar novo modelo de formulário",
"Create form": "Criar formulário",
"Fill in form in ONLYOFFICE": "Preencher formulário no ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Atualize o ONLYOFFICE Docs para a versão 7.0 para trabalhar em formulários preenchíveis online"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Atualize o ONLYOFFICE Docs para a versão 7.0 para trabalhar em formulários preenchíveis online",
+ "Security": "Segurança",
+ "Anonymous": "Anônimo",
+ "Light": "Claro",
+ "Classic Light": "Clássico claro",
+ "Dark": "Escuro",
+ "Review": "Revisar",
+ "Comment": "Comente",
+ "Form filling": "Preenchimento de formularios",
+ "Custom filter": "Filtro personalizado",
+ "group": "grupo",
+ "Advanced": "Avançado"
},
"nplurals=2; plural=(n > 1);");
diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json
index 11c99b4..267714e 100644
--- a/l10n/pt_BR.json
+++ b/l10n/pt_BR.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Este é um servidor de teste público, não o use para dados confidenciais. O servidor estará disponível por um período de 30 dias.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "O período de teste de 30 dias acabou, você não pode mais se conectar ao Servidor de demonstração do ONLYOFFICE Docs",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Você está usando o Servidor de demonstração pública. Não armazene dados confidenciais.",
- "Secure view settings" : "Configurações de visualização segura",
"Secure view enables you to secure documents by embedding a watermark" : "A visualização segura permite proteger documentos incorporando uma marca d'água",
"Enable watermarking" : "Ativar marca d'água",
"Watermark text" : "Texto de marca d'água",
@@ -115,5 +114,16 @@
"Create form": "Criar formulário",
"Fill in form in ONLYOFFICE": "Preencher formulário no ONLYOFFICE",
"Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Atualize o ONLYOFFICE Docs para a versão 7.0 para trabalhar em formulários preenchíveis online"
+ "Security": "Segurança",
+ "Anonymous": "Anônimo",
+ "Light": "Claro",
+ "Classic Light": "Clássico claro",
+ "Dark": "Escuro",
+ "Review": "Revisar",
+ "Comment": "Comente",
+ "Form filling": "Preenchimento de formularios",
+ "Custom filter": "Filtro personalizado",
+ "group": "grupo",
+ "Advanced": "Avançado"
},"pluralForm" :"nplurals=2; plural=(n > 1);"
-}
+} \ No newline at end of file
diff --git a/l10n/ru.js b/l10n/ru.js
index 1e4c38d..dd31768 100644
--- a/l10n/ru.js
+++ b/l10n/ru.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Это публичный тестовый сервер, пожалуйста, не используйте его для личных конфиденциальных данных. Сервер будет доступен в течение 30 дней.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30-дневный тестовый период закончен, вы больше не можете подключаться к демонстрационному серверу ONLYOFFICE Docs",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Вы используете публичный демонстрационный сервер ONLYOFFICE Docs. Пожалуйста, не храните конфиденциальные данные.",
- "Secure view settings" : "Настройки безопасного просмотра",
"Secure view enables you to secure documents by embedding a watermark" : "Безопасный просмотр позволяет защищать ваши документы путем встраивания водяного знака",
"Enable watermarking" : "Включить водяной знак",
"Watermark text" : "Текст водяного знака",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "Создать новый Шаблон формы",
"Create form": "Создать форму",
"Fill in form in ONLYOFFICE": "Заполнить форму в ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Обновите сервер ONLYOFFICE Docs до версии 7.0 для работы с формами онлайн"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Обновите сервер ONLYOFFICE Docs до версии 7.0 для работы с формами онлайн",
+ "Security": "Безопасность",
+ "Anonymous": "Аноним",
+ "Default editor theme": "Тема редактора по умолчанию",
+ "Light": "Светлая",
+ "Classic Light": "Светлая классическая",
+ "Dark": "Темная",
+ "Review": "Рецензирование",
+ "Comment": "Комментирование",
+ "Form filling": "Заполнение форм",
+ "Custom filter": "Пользовательский фильтр",
+ "group": "группа",
+ "Advanced": "Дополнительно",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Предоставление расширенных прав доступа к документам с помощью ONLYOFFICE Docs"
},
"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);");
diff --git a/l10n/ru.json b/l10n/ru.json
index 5c4c735..e4bc0b5 100644
--- a/l10n/ru.json
+++ b/l10n/ru.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Это публичный тестовый сервер, пожалуйста, не используйте его для личных конфиденциальных данных. Сервер будет доступен в течение 30 дней.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30-дневный тестовый период закончен, вы больше не можете подключаться к демонстрационному серверу ONLYOFFICE Docs",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Вы используете публичный демонстрационный сервер ONLYOFFICE Docs. Пожалуйста, не храните конфиденциальные данные.",
- "Secure view settings" : "Настройки безопасного просмотра",
"Secure view enables you to secure documents by embedding a watermark" : "Безопасный просмотр позволяет защищать ваши документы путем встраивания водяного знака",
"Enable watermarking" : "Включить водяной знак",
"Watermark text" : "Текст водяного знака",
@@ -114,6 +113,19 @@
"Create new Form template": "Создать новый Шаблон формы",
"Create form": "Создать форму",
"Fill in form in ONLYOFFICE": "Заполнить форму в ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Обновите сервер ONLYOFFICE Docs до версии 7.0 для работы с формами онлайн"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Обновите сервер ONLYOFFICE Docs до версии 7.0 для работы с формами онлайн",
+ "Security": "Безопасность",
+ "Anonymous": "Аноним",
+ "Default editor theme": "Тема редактора по умолчанию",
+ "Light": "Светлая",
+ "Classic Light": "Классическая светлая",
+ "Dark": "Темная",
+ "Review": "Рецензирование",
+ "Comment": "Комментирование",
+ "Form filling": "Заполнение форм",
+ "Custom filter": "Пользовательский фильтр",
+ "group": "группа",
+ "Advanced": "Дополнительно",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "Предоставление расширенных прав доступа к документам с помощью ONLYOFFICE Docs"
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
} \ No newline at end of file
diff --git a/l10n/sv.js b/l10n/sv.js
index 50e04a0..fbf96a8 100644
--- a/l10n/sv.js
+++ b/l10n/sv.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Detta är en offentlig testserver, använd den inte för privat känslig information. Servern kommer att finnas tillgänglig under en 30-dagarsperiod.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "När 30-dagars testperioden är över, kan du inte längre ansluta till demo ONLYOFFICE Docsserver.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Du använder en offentlig demo ONLYOFFICE Docsserver. Lagra inte privat känslig information.",
- "Secure view settings" : "Säkra vyinställningar",
"Secure view enables you to secure documents by embedding a watermark" : "Med säker vy kan du säkra dokument genom att bädda in en vattenstämpel",
"Enable watermarking" : "Aktivera vattenstämpel",
"Watermark text" : "Text för vattenmärke",
@@ -116,6 +115,17 @@ OC.L10N.register(
"Create new Form template": "Skapa ny formulärmall",
"Create form": "Skapa formulär",
"Fill in form in ONLYOFFICE": "Fylla i formulär i ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Uppdatera ONLYOFFICE Docs till version 7.0 för att arbeta med ifyllbart onlineformulär"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Uppdatera ONLYOFFICE Docs till version 7.0 för att arbeta med ifyllbart onlineformulär",
+ "Security": "Säkerhet",
+ "Anonymous": "Anonym",
+ "Light": "Ljus",
+ "Classic Light": "Klassiskt ljus",
+ "Dark": "Mörk",
+ "Review": "Granska",
+ "Comment": "Kommentar",
+ "Form filling": "Formulärfyllning",
+ "Custom filter": "Anpassat filter",
+ "group": "grupp",
+ "Advanced": "Avancerad"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/sv.json b/l10n/sv.json
index 494c28d..ebce00d 100644
--- a/l10n/sv.json
+++ b/l10n/sv.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Detta är en offentlig testserver, använd den inte för privat känslig information. Servern kommer att finnas tillgänglig under en 30-dagarsperiod.",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "När 30-dagars testperioden är över, kan du inte längre ansluta till demo ONLYOFFICE Docsserver.",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "Du använder en offentlig demo ONLYOFFICE Docsserver. Lagra inte privat känslig information.",
- "Secure view settings" : "Säkra vyinställningar",
"Secure view enables you to secure documents by embedding a watermark" : "Med säker vy kan du säkra dokument genom att bädda in en vattenstämpel",
"Enable watermarking" : "Aktivera vattenstämpel",
"Watermark text" : "Text för vattenmärke",
@@ -108,12 +107,23 @@
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s har nämnt i %2$s: \"%3$s\".",
"{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} nämnde dig i {file}: \"%1$s\".",
"Choose a format to convert {fileName}": "Välj det filformat som {fileName} ska konverteras till.",
- "New form template": "Ny formulärmall",
+ "New form template": "Ny formulärmall",
"Blank": "Töm",
"From text document": "Formulärmall från textfil",
"Create new Form template": "Skapa ny formulärmall",
"Create form": "Skapa formulär",
"Fill in form in ONLYOFFICE": "Fylla i formulär i ONLYOFFICE",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Uppdatera ONLYOFFICE Docs till version 7.0 för att arbeta med ifyllbart onlineformulär"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Uppdatera ONLYOFFICE Docs till version 7.0 för att arbeta med ifyllbart onlineformulär",
+ "Security": "Säkerhet",
+ "Anonymous": "Anonym",
+ "Light": "Ljus",
+ "Classic Light": "Klassiskt ljus",
+ "Dark": "Mörk",
+ "Review": "Granska",
+ "Comment": "Kommentar",
+ "Form filling": "Formulärfyllning",
+ "Custom filter": "Anpassat filter",
+ "group": "grupp",
+ "Advanced": "Avancerad"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js
index eb37a03..46cdefd 100644
--- a/l10n/zh_CN.js
+++ b/l10n/zh_CN.js
@@ -62,7 +62,6 @@ OC.L10N.register(
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "这是公开的测试服务器,请勿用于隐私数据。服务器试用期限为30天。",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30天试用期已结束,无法连接ONLYOFFICE Docs 服务器的演示。",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "您正在使用公开ONLYOFFICE Docs服务器的演示,请勿存储隐私数据。",
- "Secure view settings" : "安全视图设置",
"Secure view enables you to secure documents by embedding a watermark" : "启用安全视图可通过水印来保障文档安全",
"Enable watermarking" : "启用水印",
"Watermark text" : "水印文本",
@@ -116,6 +115,19 @@ OC.L10N.register(
"Create new Form template": "创建新的表单模板",
"Create form": "创建表单",
"Fill in form in ONLYOFFICE": "在ONLYOFFICE上填写表单",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "请将ONLYOFFICE Docs更新到7.0版本,以便在线编辑可填写的表单"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "请将ONLYOFFICE Docs更新到7.0版本,以便在线编辑可填写的表单",
+ "Security": "安全",
+ "Anonymous": "匿名",
+ "Default editor theme": "编辑器默认的主题",
+ "Light": "光",
+ "Classic Light": "经典浅色",
+ "Dark": "黑暗的",
+ "Review": "审阅",
+ "Comment": "评论",
+ "Form filling": "表单填报",
+ "Custom filter": "自定义筛选器",
+ "group": "分组",
+ "Advanced": "进阶",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "使用ONLYOFFICE Docs 提供高级文档权限"
},
"nplurals=1; plural=0;");
diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json
index 84f3261..0c8dfbc 100644
--- a/l10n/zh_CN.json
+++ b/l10n/zh_CN.json
@@ -60,7 +60,6 @@
"This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "这是公开的测试服务器,请勿用于隐私数据。服务器试用期限为30天。",
"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30天试用期已结束,无法连接ONLYOFFICE Docs 服务器的演示。",
"You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "您正在使用公开ONLYOFFICE Docs服务器的演示,请勿存储隐私数据。",
- "Secure view settings" : "安全视图设置",
"Secure view enables you to secure documents by embedding a watermark" : "启用安全视图可通过水印来保障文档安全",
"Enable watermarking" : "启用水印",
"Watermark text" : "水印文本",
@@ -114,6 +113,19 @@
"Create new Form template": "创建新的表单模板",
"Create form": "创建表单",
"Fill in form in ONLYOFFICE": "在ONLYOFFICE上填写表单",
- "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "请将ONLYOFFICE Docs更新到7.0版本,以便在线编辑可填写的表单"
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "请将ONLYOFFICE Docs更新到7.0版本,以便在线编辑可填写的表单",
+ "Security": "安全",
+ "Anonymous": "匿名",
+ "Default editor theme": "编辑器默认的主题",
+ "Light": "光",
+ "Classic Light": "经典浅色",
+ "Dark": "黑暗的",
+ "Review": "审阅",
+ "Comment": "评论",
+ "Form filling": "表单填报",
+ "Custom filter": "自定义筛选器",
+ "group": "分组",
+ "Advanced": "进阶",
+ "Provide advanced document permissions using ONLYOFFICE Docs": "使用ONLYOFFICE Docs 提供高级文档权限"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/lib/Migration/Version070400Date20220607111111.php b/lib/Migration/Version070400Date20220607111111.php
new file mode 100644
index 0000000..1ca7636
--- /dev/null
+++ b/lib/Migration/Version070400Date20220607111111.php
@@ -0,0 +1,89 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OCA\Onlyoffice\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+/**
+ * Auto-generated migration step: Please modify to your needs!
+ */
+class Version070400Date20220607111111 extends SimpleMigrationStep {
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ */
+ public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
+ }
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return null|ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ if (!$schema->hasTable('onlyoffice_filekey')) {
+ $table = $schema->createTable('onlyoffice_filekey');
+ $table->addColumn('id', 'integer', [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ ]);
+ $table->addColumn('file_id', 'bigint', [
+ 'notnull' => false,
+ 'default' => '-1',
+ ]);
+ $table->addColumn('key', 'string', [
+ 'notnull' => true,
+ 'length' => 128,
+ ]);
+ $table->addColumn('lock', 'integer', [
+ 'notnull' => true,
+ 'default' => 0,
+ ]);
+ $table->addColumn('fs', 'integer', [
+ 'notnull' => true,
+ 'default' => 0,
+ ]);
+ $table->setPrimaryKey(['id']);
+ $table->addUniqueIndex(['file_id'], 'file_id_index');
+ }
+
+ if (!$schema->hasTable('onlyoffice_permissions')) {
+ $table = $schema->createTable('onlyoffice_permissions');
+ $table->addColumn('id', 'integer', [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ ]);
+ $table->addColumn('share_id', 'bigint', [
+ 'notnull' => true,
+ 'default' => '-1',
+ ]);
+ $table->addColumn('permissions', 'integer', [
+ 'notnull' => true,
+ 'default' => 0,
+ ]);
+ $table->setPrimaryKey(['id']);
+ $table->addUniqueIndex(['share_id'], 'share_id_index');
+ }
+
+ return $schema;
+ }
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ */
+ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
+ }
+}
diff --git a/lib/appconfig.php b/lib/appconfig.php
index 620c4ca..b3d0af4 100644
--- a/lib/appconfig.php
+++ b/lib/appconfig.php
@@ -117,6 +117,13 @@ class AppConfig {
private $_preview = "preview";
/**
+ * The config key for the advanced
+ *
+ * @var string
+ */
+ private $_advanced = "advanced";
+
+ /**
* The config key for the keep versions history
*
* @var string
@@ -173,6 +180,13 @@ class AppConfig {
private $_customizationReviewDisplay = "customizationReviewDisplay";
/**
+ * The config key for the theme setting
+ *
+ * @var string
+ */
+ private $_customizationTheme = "customizationTheme";
+
+ /**
* The config key for the setting limit groups
*
* @var string
@@ -278,6 +292,13 @@ class AppConfig {
public $_customization_goback = "customization_goback";
/**
+ * The config key for the macros
+ *
+ * @var string
+ */
+ public $_customizationMacros = "customization_macros";
+
+ /**
* @param string $AppName - application name
*/
public function __construct($AppName) {
@@ -645,6 +666,26 @@ class AppConfig {
}
/**
+ * Get advanced setting
+ *
+ * @return bool
+ */
+ public function GetAdvanced() {
+ return $this->config->getAppValue($this->appName, $this->_advanced, "false") === "true";
+ }
+
+ /**
+ * Save advanced setting
+ *
+ * @param bool $value - advanced
+ */
+ public function SetAdvanced($value) {
+ $this->logger->info("Set advanced: " . json_encode($value), ["app" => $this->appName]);
+
+ $this->config->setAppValue($this->appName, $this->_advanced, json_encode($value));
+ }
+
+ /**
* Get generate preview setting
*
* @return bool
@@ -821,6 +862,33 @@ class AppConfig {
}
/**
+ * Save theme setting
+ *
+ * @param string $value - theme
+ */
+ public function SetCustomizationTheme($value) {
+ $this->logger->info("Set theme: " . $value, array("app" => $this->appName));
+
+ $this->config->setAppValue($this->appName, $this->_customizationTheme, $value);
+ }
+
+ /**
+ * Get theme setting
+ *
+ * @return string
+ */
+ public function GetCustomizationTheme() {
+ $value = $this->config->getAppValue($this->appName, $this->_customizationTheme, "theme-classic-light");
+ if ($value === "theme-light") {
+ return "theme-light";
+ }
+ if ($value === "theme-dark") {
+ return "theme-dark";
+ }
+ return "theme-classic-light";
+ }
+
+ /**
* Save watermark settings
*
* @param array $settings - watermark settings
@@ -875,7 +943,7 @@ class AppConfig {
*/
public function GetWatermarkSettings() {
$result = [
- "text" => $this->config->getAppValue(AppConfig::WATERMARK_APP_NAMESPACE, "watermark_text", "{userId}"),
+ "text" => $this->config->getAppValue(AppConfig::WATERMARK_APP_NAMESPACE, "watermark_text", "{userId}, {date}"),
];
$watermarkLabels = [
@@ -1090,6 +1158,25 @@ class AppConfig {
return $result;
}
+ /**
+ * Save macros setting
+ *
+ * @param bool $value - enable macros
+ */
+ public function SetCustomizationMacros($value) {
+ $this->logger->info("Set macros enabled: " . json_encode($value), ["app" => $this->appName]);
+
+ $this->config->setAppValue($this->appName, $this->_customizationMacros, json_encode($value));
+ }
+
+ /**
+ * Get macros setting
+ *
+ * @return bool
+ */
+ public function GetCustomizationMacros() {
+ return $this->config->getAppValue($this->appName, $this->_customizationMacros, "true") === "true";
+ }
/**
* Additional data about formats
@@ -1100,8 +1187,8 @@ class AppConfig {
"csv" => [ "mime" => "text/csv", "type" => "cell", "edit" => true, "editable" => true, "saveas" => ["ods", "pdf", "xlsx"] ],
"doc" => [ "mime" => "application/msword", "type" => "word", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ],
"docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "word", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ],
- "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "word", "edit" => true, "def" => true, "saveas" => ["odt", "pdf", "rtf", "txt", "docxf"] ],
- "docxf" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf", "type" => "word", "edit" => true, "def" => true, "saveas" => ["odt", "pdf", "rtf", "txt"], "createForm" => true ],
+ "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "word", "edit" => true, "def" => true, "review" => true, "comment" => true, "saveas" => ["odt", "pdf", "rtf", "txt", "docxf"] ],
+ "docxf" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf", "type" => "word", "edit" => true, "def" => true, "review" => true, "comment" => true, "saveas" => ["odt", "pdf", "rtf", "txt"], "createForm" => true ],
"oform" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform", "type" => "word", "fillForms" => true, "def" => true ],
"dot" => [ "type" => "word", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ],
"dotx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "type" => "word", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ],
@@ -1123,12 +1210,12 @@ class AppConfig {
"ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "slide", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ],
"ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "slide", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ],
"pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "slide", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ],
- "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "slide", "edit" => true, "def" => true, "saveas" => ["pdf", "odp"] ],
+ "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "slide", "edit" => true, "def" => true, "comment" => true, "saveas" => ["pdf", "odp"] ],
"rtf" => [ "mime" => "text/rtf", "type" => "word", "conv" => true, "editable" => true, "saveas" => ["docx", "odt", "pdf", "txt"] ],
"txt" => [ "mime" => "text/plain", "type" => "word", "edit" => true, "editable" => true, "saveas" => ["docx", "odt", "pdf", "rtf"] ],
"xls" => [ "mime" => "application/vnd.ms-excel", "type" => "cell", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ],
"xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "cell", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ],
- "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "cell", "edit" => true, "def" => true, "saveas" => ["csv", "ods", "pdf"] ],
+ "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "cell", "edit" => true, "def" => true, "comment" => true, "modifyFilter" => true, "saveas" => ["csv", "ods", "pdf"] ],
"xlt" => [ "type" => "cell", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ],
"xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "cell", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ],
"xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "cell", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ]
diff --git a/lib/directeditor.php b/lib/directeditor.php
index 039ff15..5511892 100644
--- a/lib/directeditor.php
+++ b/lib/directeditor.php
@@ -242,6 +242,7 @@ class DirectEditor implements IEditor {
"version" => 0,
"isTemplate" => false,
"inframe" => false,
+ "inviewer" => false,
"anchor" => null
];
diff --git a/lib/extrapermissions.php b/lib/extrapermissions.php
new file mode 100644
index 0000000..26a7d33
--- /dev/null
+++ b/lib/extrapermissions.php
@@ -0,0 +1,430 @@
+<?php
+/**
+ *
+ * (c) Copyright Ascensio System SIA 2022
+ *
+ * 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.
+ *
+ */
+
+namespace OCA\Onlyoffice;
+
+use OCP\Constants;
+use OCP\ILogger;
+use OCP\Files\File;
+use OCP\Share\IShare;
+use OCP\Share\IManager;
+use OCP\Share\Exceptions\ShareNotFound;
+
+use OCA\Onlyoffice\AppConfig;
+
+/**
+ * Class expands base permissions
+ *
+ * @package OCA\Onlyoffice
+ */
+class ExtraPermissions {
+
+ /**
+ * Application name
+ *
+ * @var string
+ */
+ private $appName;
+
+ /**
+ * Logger
+ *
+ * @var ILogger
+ */
+ private $logger;
+
+ /**
+ * Share manager
+ *
+ * @var IManager
+ */
+ private $shareManager;
+
+ /**
+ * Application configuration
+ *
+ * @var AppConfig
+ */
+ private $config;
+
+ /**
+ * Table name
+ */
+ private const TableName_Key = "onlyoffice_permissions";
+
+ /**
+ * Extra permission values
+ *
+ * @var integer
+ */
+ public const None = 0;
+ public const Review = 1;
+ public const Comment = 2;
+ public const FillForms = 4;
+ public const ModifyFilter = 8;
+
+ /**
+ * @param string $AppName - application name
+ * @param ILogger $logger - logger
+ * @param AppConfig $config - application configuration
+ * @param IManager $shareManager - Share manager
+ */
+ public function __construct($AppName,
+ ILogger $logger,
+ IManager $shareManager,
+ AppConfig $config) {
+ $this->appName = $AppName;
+ $this->logger = $logger;
+ $this->shareManager = $shareManager;
+ $this->config = $config;
+ }
+
+ /**
+ * Get extra permissions by shareId
+ *
+ * @param integer $shareId - share identifier
+ *
+ * @return array
+ */
+ public function getExtra($shareId) {
+ $share = $this->getShare($shareId);
+ if (empty($share)) {
+ return null;
+ }
+
+ $shareId = $share->getId();
+ $extra = self::get($shareId);
+
+ $checkExtra = isset($extra["permissions"]) ? (int)$extra["permissions"] : self::None;
+ list($availableExtra, $defaultPermissions) = $this->validation($share, $checkExtra);
+
+ if ($availableExtra === 0
+ || ($availableExtra & $checkExtra) !== $checkExtra) {
+ if (!empty($extra)) {
+ self::delete($shareId);
+ }
+
+ $this->logger->debug("Share " . $shareId . " does not support extra permissions", ["app" => $this->appName]);
+ return null;
+ }
+
+ if (empty($extra)) {
+ $extra["id"] = -1;
+ $extra["share_id"] = $share->getId();
+ $extra["permissions"] = $defaultPermissions;
+ }
+
+ $extra["type"] = $share->getShareType();
+ $extra["shareWith"] = $share->getSharedWith();
+ $extra["shareWithName"] = $share->getSharedWithDisplayName();
+ $extra["available"] = $availableExtra;
+
+ return $extra;
+ }
+
+ /**
+ * Get list extra permissions by shares
+ *
+ * @param array $shares - array of shares
+ *
+ * @return array
+ */
+ public function getExtras($shares) {
+ $result = [];
+
+ $shareIds = [];
+ foreach ($shares as $share) {
+ array_push($shareIds, $share->getId());
+ }
+
+ if (empty($shareIds)) {
+ return $result;
+ }
+
+ $extras = self::getList($shareIds);
+
+ $noActualList = [];
+ foreach ($shares as $share) {
+
+ $currentExtra = [];
+ foreach ($extras as $extra) {
+ if ($extra["share_id"] === $share->getId()) {
+ $currentExtra = $extra;
+ }
+ }
+
+ $checkExtra = isset($currentExtra["permissions"]) ? (int)$currentExtra["permissions"] : self::None;
+ list($availableExtra, $defaultPermissions) = $this->validation($share, $checkExtra);
+
+ if ($availableExtra === 0
+ || ($availableExtra & $checkExtra) !== $checkExtra) {
+ if (!empty($currentExtra)) {
+ array_push($noActualList, $share->getId());
+ $currentExtra = [];
+ }
+ }
+
+ if ($availableExtra > 0) {
+ if (empty($currentExtra)) {
+ $currentExtra["id"] = -1;
+ $currentExtra["share_id"] = $share->getId();
+ $currentExtra["permissions"] = $defaultPermissions;
+ }
+
+ $currentExtra["type"] = $share->getShareType();
+ $currentExtra["shareWith"] = $share->getSharedWith();
+ $currentExtra["shareWithName"] = $share->getSharedWithDisplayName();
+ $currentExtra["available"] = $availableExtra;
+
+ array_push($result, $currentExtra);
+ }
+ }
+
+ if (!empty($noActualList)) {
+ self::deleteList($noActualList);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Get extra permissions by share
+ *
+ * @param integer $shareId - share identifier
+ * @param integer $permissions - value extra permissions
+ * @param integer $extraId - extra permission identifier
+ *
+ * @return bool
+ */
+ public function setExtra($shareId, $permissions, $extraId) {
+ $result = false;
+
+ $share = $this->getShare($shareId);
+ if (empty($share)) {
+ return $result;
+ }
+
+ list($availableExtra, $defaultPermissions) = $this->validation($share, $permissions);
+ if (($availableExtra & $permissions) !== $permissions) {
+ $this->logger->debug("Share " . $shareId . " does not available to extend permissions", ["app" => $this->appName]);
+ return $result;
+ }
+
+ if ($extraId > 0) {
+ $result = self::update($share->getId(), $permissions);
+ } else {
+ $result = self::insert($share->getId(), $permissions);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Delete extra permissions for share
+ *
+ * @param integer $shareId - file identifier
+ *
+ * @return bool
+ */
+ public static function delete($shareId) {
+ $connection = \OC::$server->getDatabaseConnection();
+ $delete = $connection->prepare("
+ DELETE FROM `*PREFIX*" . self::TableName_Key . "`
+ WHERE `share_id` = ?
+ ");
+ return (bool)$delete->execute([$shareId]);
+ }
+
+ /**
+ * Delete list extra permissions
+ *
+ * @param array $shareIds - array of share identifiers
+ *
+ * @return bool
+ */
+ public static function deleteList($shareIds) {
+ $connection = \OC::$server->getDatabaseConnection();
+
+ $condition = "";
+ if (count($shareIds) > 1) {
+ for ($i = 1; $i < count($shareIds); $i++) {
+ $condition = $condition . " OR `share_id` = ?";
+ }
+ }
+
+ $delete = $connection->prepare("
+ DELETE FROM `*PREFIX*" . self::TableName_Key . "`
+ WHERE `share_id` = ?
+ " . $condition);
+ return (bool)$delete->execute($shareIds);
+ }
+
+ /**
+ * Get extra permissions for share
+ *
+ * @param integer $shareId - share identifier
+ *
+ * @return array
+ */
+ private static function get($shareId) {
+ $connection = \OC::$server->getDatabaseConnection();
+ $select = $connection->prepare("
+ SELECT id, share_id, permissions
+ FROM `*PREFIX*" . self::TableName_Key . "`
+ WHERE `share_id` = ?
+ ");
+ $result = $select->execute([$shareId]);
+
+ $values = $result ? $select->fetch() : [];
+
+ $value = is_array($values) ? $values : [];
+
+ return $value;
+ }
+
+ /**
+ * Get list extra permissions
+ *
+ * @param array $shareIds - array of share identifiers
+ *
+ * @return array
+ */
+ private static function getList($shareIds) {
+ $connection = \OC::$server->getDatabaseConnection();
+
+ $condition = "";
+ if (count($shareIds) > 1) {
+ for ($i = 1; $i < count($shareIds); $i++) {
+ $condition = $condition . " OR `share_id` = ?";
+ }
+ }
+
+ $select = $connection->prepare("
+ SELECT id, share_id, permissions
+ FROM `*PREFIX*" . self::TableName_Key . "`
+ WHERE `share_id` = ?
+ " . $condition);
+
+ $result = $select->execute($shareIds);
+
+ $values = $result ? $select->fetchAll() : [];
+
+ $value = is_array($values) ? $values : [];
+
+ return $value;
+ }
+
+ /**
+ * Store extra permissions for share
+ *
+ * @param integer $shareId - share identifier
+ * @param integer $permissions - value permissions
+ *
+ * @return bool
+ */
+ private static function insert($shareId, $permissions) {
+ $connection = \OC::$server->getDatabaseConnection();
+ $insert = $connection->prepare("
+ INSERT INTO `*PREFIX*" . self::TableName_Key . "`
+ (`share_id`, `permissions`)
+ VALUES (?, ?)
+ ");
+ return (bool)$insert->execute([$shareId, $permissions]);
+ }
+
+ /**
+ * Update extra permissions for share
+ *
+ * @param integer $shareId - share identifier
+ * @param bool $permissions - value permissions
+ *
+ * @return bool
+ */
+ private static function update($shareId, $permissions) {
+ $connection = \OC::$server->getDatabaseConnection();
+ $update = $connection->prepare("
+ UPDATE `*PREFIX*" . self::TableName_Key . "`
+ SET `permissions` = ?
+ WHERE `share_id` = ?
+ ");
+ return (bool)$update->execute([$permissions, $shareId]);
+ }
+
+ /**
+ * Validation share on extend capability by extra permissions
+ *
+ * @param IShare $share - share
+ * @param int $checkExtra - checkable extra permissions
+ *
+ * @return array
+ */
+ private function validation($share, $checkExtra) {
+ $availableExtra = self::None;
+ $defaultExtra = self::None;
+
+ if (($share->getPermissions() & Constants::PERMISSION_SHARE) === Constants::PERMISSION_SHARE) {
+ return [$availableExtra, $defaultExtra];
+ }
+
+ $node = $share->getNode();
+ $pathinfo = pathinfo($node->getName());
+ $extension = $pathinfo["extension"];
+ $format = $this->config->FormatsSetting()[$extension];
+
+ if (($share->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE) {
+ if (isset($format["modifyFilter"]) && $format["modifyFilter"]) {
+ $availableExtra |= self::ModifyFilter;
+ $defaultExtra |= self::ModifyFilter;
+ }
+ }
+ if (($share->getPermissions() & Constants::PERMISSION_UPDATE) !== Constants::PERMISSION_UPDATE) {
+ if (isset($format["review"]) && $format["review"]) {
+ $availableExtra |= self::Review;
+ }
+ if (isset($format["comment"]) && $format["comment"]
+ && ($checkExtra & self::Review) !== self::Review) {
+ $availableExtra |= self::Comment;
+ }
+ if (isset($format["fillForms"]) && $format["fillForms"]
+ && ($checkExtra & self::Review) !== self::Review) {
+ $availableExtra |= self::FillForms;
+ }
+ }
+
+ return [$availableExtra, $defaultExtra];
+ }
+
+ /**
+ * Get origin share
+ *
+ * @param integer $shareId - share identifier
+ *
+ * @return IShare
+ */
+ private function getShare($shareId) {
+ try {
+ $share = $this->shareManager->getShareById("ocinternal:" . $shareId);
+ } catch (ShareNotFound $e) {
+ $this->logger->logException($e, ["message" => "getShare error", "app" => $this->appName]);
+ return null;
+ }
+
+ return $share;
+ }
+} \ No newline at end of file
diff --git a/lib/hooks.php b/lib/hooks.php
index d063c83..6cf92c2 100644
--- a/lib/hooks.php
+++ b/lib/hooks.php
@@ -25,6 +25,7 @@ use OCP\Util;
use OCA\Onlyoffice\FileVersions;
use OCA\Onlyoffice\KeyManager;
+use OCA\Onlyoffice\ExtraPermissions;
/**
* The class to handle the filesystem hooks
@@ -55,6 +56,9 @@ class Hooks {
// Listen file version restore
Util::connectHook("\OCP\Versions", "rollback", Hooks::class, "fileVersionRestore");
+
+ // Listen share deletion
+ Util::connectHook("OCP\Share", "post_unshare", Hooks::class, "extraPermissionsDelete");
}
/**
@@ -194,4 +198,27 @@ class Hooks {
\OC::$server->getLogger()->logException($e, ["message" => "Hook: fileVersionRestore " . json_encode($params), "app" => self::$appName]);
}
}
+
+ /**
+ * Erase extra permissions of deleted share
+ *
+ * @param array $params - hook param
+ */
+ public static function extraPermissionsDelete($params) {
+ $shares = $params["deletedShares"];
+ if (empty($shares)) {
+ return;
+ }
+
+ try {
+ $shareIds = [];
+ foreach ($shares as $share) {
+ array_push($shareIds, $share["id"]);
+ }
+
+ ExtraPermissions::deleteList($shareIds);
+ } catch (\Exception $e) {
+ \OC::$server->getLogger()->logException($e, ["message" => "Hook: extraPermissionsDelete " . json_encode($params), "app" => self::$appName]);
+ }
+ }
}
diff --git a/lib/listeners/filesharinglistener.php b/lib/listeners/filesharinglistener.php
index 3274a46..8d228a6 100644
--- a/lib/listeners/filesharinglistener.php
+++ b/lib/listeners/filesharinglistener.php
@@ -22,10 +22,13 @@ namespace OCA\Onlyoffice\Listeners;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
+use OCP\AppFramework\Services\IInitialState;
+use OCP\IServerContainer;
use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
use OCA\Onlyoffice\AppConfig;
+use OCA\Onlyoffice\SettingsData;
/**
* File Sharing listener
@@ -40,10 +43,30 @@ class FileSharingListener implements IEventListener {
private $appConfig;
/**
+ * Initial state
+ *
+ * @var IInitialState
+ */
+ private $initialState;
+
+ /**
+ * Server container
+ *
+ * @var IServerContainer
+ */
+ private $serverContainer;
+
+ /**
* @param AppConfig $config - application configuration
+ * @param IInitialState $initialState - initial state
+ * @param IServerContainer $serverContainer - server container
*/
- public function __construct(AppConfig $appConfig) {
+ public function __construct(AppConfig $appConfig,
+ IInitialState $initialState,
+ IServerContainer $serverContainer) {
$this->appConfig = $appConfig;
+ $this->initialState = $initialState;
+ $this->serverContainer = $serverContainer;
}
public function handle(Event $event): void {
@@ -59,6 +82,11 @@ class FileSharingListener implements IEventListener {
Util::addScript("onlyoffice", "listener");
}
+ $container = $this->serverContainer;
+ $this->initialState->provideLazyInitialState("settings", function () use ($container) {
+ return $container->query(SettingsData::class);
+ });
+
Util::addStyle("onlyoffice", "main");
}
}
diff --git a/lib/listeners/fileslistener.php b/lib/listeners/fileslistener.php
index 042f4de..90a69f3 100644
--- a/lib/listeners/fileslistener.php
+++ b/lib/listeners/fileslistener.php
@@ -22,10 +22,13 @@ namespace OCA\Onlyoffice\Listeners;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
+use OCP\AppFramework\Services\IInitialState;
+use OCP\IServerContainer;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Onlyoffice\AppConfig;
+use OCA\Onlyoffice\SettingsData;
/**
* File listener
@@ -40,10 +43,30 @@ class FilesListener implements IEventListener {
private $appConfig;
/**
+ * Initial state
+ *
+ * @var IInitialState
+ */
+ private $initialState;
+
+ /**
+ * Server container
+ *
+ * @var IServerContainer
+ */
+ private $serverContainer;
+
+ /**
* @param AppConfig $config - application configuration
+ * @param IInitialState $initialState - initial state
+ * @param IServerContainer $serverContainer - server container
*/
- public function __construct(AppConfig $appConfig) {
+ public function __construct(AppConfig $appConfig,
+ IInitialState $initialState,
+ IServerContainer $serverContainer) {
$this->appConfig = $appConfig;
+ $this->initialState = $initialState;
+ $this->serverContainer = $serverContainer;
}
public function handle(Event $event): void {
@@ -63,6 +86,17 @@ class FilesListener implements IEventListener {
Util::addScript("onlyoffice", "listener");
}
+ if ($this->appConfig->GetAdvanced()
+ && \OC::$server->getAppManager()->isInstalled("files_sharing")) {
+ Util::addScript("onlyoffice", "share");
+ Util::addStyle("onlyoffice", "share");
+ }
+
+ $container = $this->serverContainer;
+ $this->initialState->provideLazyInitialState("settings", function () use ($container) {
+ return $container->query(SettingsData::class);
+ });
+
Util::addStyle("onlyoffice", "main");
Util::addStyle("onlyoffice", "template");
}
diff --git a/lib/listeners/viewerlistener.php b/lib/listeners/viewerlistener.php
index e61a49b..8268533 100644
--- a/lib/listeners/viewerlistener.php
+++ b/lib/listeners/viewerlistener.php
@@ -23,10 +23,13 @@ use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
use OCP\AppFramework\Http\ContentSecurityPolicy;
+use OCP\AppFramework\Services\IInitialState;
+use OCP\IServerContainer;
use OCA\Viewer\Event\LoadViewer;
use OCA\Onlyoffice\AppConfig;
+use OCA\Onlyoffice\SettingsData;
/**
* Viewer listener
@@ -41,10 +44,30 @@ class ViewerListener implements IEventListener {
private $appConfig;
/**
+ * Initial state
+ *
+ * @var IInitialState
+ */
+ private $initialState;
+
+ /**
+ * Server container
+ *
+ * @var IServerContainer
+ */
+ private $serverContainer;
+
+ /**
* @param AppConfig $config - application configuration
+ * @param IInitialState $initialState - initial state
+ * @param IServerContainer $serverContainer - server container
*/
- public function __construct(AppConfig $appConfig) {
+ public function __construct(AppConfig $appConfig,
+ IInitialState $initialState,
+ IServerContainer $serverContainer) {
$this->appConfig = $appConfig;
+ $this->initialState = $initialState;
+ $this->serverContainer = $serverContainer;
}
public function handle(Event $event): void {
@@ -55,11 +78,16 @@ class ViewerListener implements IEventListener {
if (!empty($this->appConfig->GetDocumentServerUrl())
&& $this->appConfig->SettingsAreSuccessful()
&& $this->appConfig->isUserAllowedToUse()) {
- Util::addScript("onlyoffice", "viewer");
- Util::addScript("onlyoffice", "listener");
+ Util::addScript("onlyoffice", "viewer", "viewer");
+ Util::addScript("onlyoffice", "listener", "viewer");
Util::addStyle("onlyoffice", "viewer");
+ $container = $this->serverContainer;
+ $this->initialState->provideLazyInitialState("settings", function () use ($container) {
+ return $container->query(SettingsData::class);
+ });
+
$csp = new ContentSecurityPolicy();
$csp->addAllowedFrameDomain("'self'");
$cspManager = \OC::$server->getContentSecurityPolicyManager();
diff --git a/lib/settingsdata.php b/lib/settingsdata.php
new file mode 100644
index 0000000..d246cf0
--- /dev/null
+++ b/lib/settingsdata.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ *
+ * (c) Copyright Ascensio System SIA 2022
+ *
+ * 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.
+ *
+ */
+
+namespace OCA\Onlyoffice;
+
+use OCA\Onlyoffice\AppConfig;
+
+class SettingsData implements \JsonSerializable {
+
+ /**
+ * Application configuration
+ *
+ * @var AppConfig
+ */
+ private $appConfig;
+
+ public function __construct(AppConfig $appConfig) {
+ $this->appConfig = $appConfig;
+ }
+
+ public function jsonSerialize(): array {
+ $data = [
+ "formats" => $this->appConfig->FormatsSetting(),
+ "sameTab" => $this->appConfig->GetSameTab()
+ ];
+
+ return $data;
+ }
+} \ No newline at end of file
diff --git a/templates/editor.php b/templates/editor.php
index e79de0c..c40975a 100644
--- a/templates/editor.php
+++ b/templates/editor.php
@@ -35,7 +35,8 @@
data-version="<?php p($_["version"]) ?>"
data-template="<?php p($_["isTemplate"]) ?>"
data-anchor="<?php p($_["anchor"]) ?>"
- data-inframe="<?php p($_["inframe"]) ?>"></div>
+ data-inframe="<?php p($_["inframe"]) ?>"
+ data-inviewer="<?php p($_["inviewer"]) ?>"></div>
<?php if (!empty($_["documentServerUrl"])) { ?>
<script nonce="<?php p(base64_encode($_["requesttoken"])) ?>"
diff --git a/templates/settings.php b/templates/settings.php
index 2b9caae..fd9d0d8 100644
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -114,6 +114,12 @@
</p>
<p>
+ <input type="checkbox" class="checkbox" id="onlyofficeAdvanced"
+ <?php if ($_["advanced"]) { ?>checked="checked"<?php } ?> />
+ <label for="onlyofficeAdvanced"><?php p($l->t("Provide advanced document permissions using ONLYOFFICE Docs")) ?></label>
+ </p>
+
+ <p>
<input type="checkbox" class="checkbox" id="onlyofficeVersionHistory"
<?php if ($_["versionHistory"]) { ?>checked="checked"<?php } ?> />
<label for="onlyofficeVersionHistory"><?php p($l->t("Keep metadata for each version once the document is edited (it will take up disk space)")) ?></label>
@@ -226,6 +232,33 @@
</div>
</div>
+ <p class="onlyoffice-header">
+ <?php p($l->t("Default editor theme")) ?>
+ </p>
+ <div class="onlyoffice-tables">
+ <div>
+ <input type="radio" class="radio"
+ id="onlyofficeTheme_theme-light"
+ name="theme"
+ <?php if ($_["theme"] === "theme-light") { ?>checked="checked"<?php } ?> />
+ <label for="onlyofficeTheme_theme-light"><?php p($l->t("Light")) ?></label>
+ </div>
+ <div>
+ <input type="radio" class="radio"
+ id="onlyofficeTheme_theme-classic-light"
+ name="theme"
+ <?php if ($_["theme"] === "theme-classic-light") { ?>checked="checked"<?php } ?> />
+ <label for="onlyofficeTheme_theme-classic-light"><?php p($l->t("Classic Light")) ?></label>
+ </div>
+ <div>
+ <input type="radio" class="radio"
+ id="onlyofficeTheme_theme-dark"
+ name="theme"
+ <?php if ($_["theme"] === "theme-dark") { ?>checked="checked"<?php } ?> />
+ <label for="onlyofficeTheme_theme-dark"><?php p($l->t("Dark")) ?></label>
+ </div>
+ </div>
+
<br />
<p><button id="onlyofficeSave" class="button"><?php p($l->t("Save")) ?></button></p>
</div>
@@ -251,8 +284,15 @@
</div>
<div class="section section-onlyoffice section-onlyoffice-watermark <?php if (empty($_["documentserver"]) && !$_["demo"]["enabled"] || !$_["successful"]) { ?>onlyoffice-hide<?php } ?>">
- <h2><?php p($l->t("Secure view settings")) ?></h2>
+ <h2><?php p($l->t("Security")) ?></h2>
+ <p>
+ <input type="checkbox" class="checkbox" id="onlyofficeMacros"
+ <?php if ($_["macros"]) { ?>checked="checked"<?php } ?> />
+ <label for="onlyofficeMacros"><?php p($l->t("Run document macros")) ?></label>
+ </p>
+
+ <br />
<p class="settings-hint"><?php p($l->t("Secure view enables you to secure documents by embedding a watermark")) ?></p>
<p>
@@ -330,6 +370,6 @@
</div>
<br />
- <p><button id="onlyofficeWatermarkSave" class="button"><?php p($l->t("Save")) ?></button></p>
+ <p><button id="onlyofficeSecuritySave" class="button"><?php p($l->t("Save")) ?></button></p>
</div>
diff --git a/templates/share.html b/templates/share.html
new file mode 100644
index 0000000..cde8a27
--- /dev/null
+++ b/templates/share.html
@@ -0,0 +1,9 @@
+<li id="-1" class="onlyoffice-share-item">
+ <div class="avatardiv popovermenu-wrapper">
+ <img src="" />
+ </div>
+ <span></span>
+ <div id="onlyoffice-share-menu">
+ <button id="onlyoffice-share-action" class="icon-more"></button>
+ </div>
+</li> \ No newline at end of file