From b2b3f8e0448c6621f1e02c23328a84af597f330e Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 14 Apr 2021 15:48:07 +0300 Subject: support bootstrap --- appinfo/app.php | 22 ---- appinfo/application.php | 268 ++++++++++++++++++++++++------------------------ 2 files changed, 134 insertions(+), 156 deletions(-) delete mode 100644 appinfo/app.php diff --git a/appinfo/app.php b/appinfo/app.php deleted file mode 100644 index 7979d09..0000000 --- a/appinfo/app.php +++ /dev/null @@ -1,22 +0,0 @@ -query(Application::class); diff --git a/appinfo/application.php b/appinfo/application.php index 087eb2c..1ad8e57 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -19,10 +19,14 @@ namespace OCA\Onlyoffice\AppInfo; +use OC\EventDispatcher\SymfonyAdapter; + use OCP\AppFramework\App; +use OCP\AppFramework\Bootstrap\IBootContext; +use OCP\AppFramework\Bootstrap\IBootstrap; +use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\DirectEditing\RegisterDirectEditorEvent; -use OCP\Files\IMimeTypeDetector; use OCP\Util; use OCP\IPreview; @@ -38,7 +42,9 @@ use OCA\Onlyoffice\DirectEditor; use OCA\Onlyoffice\Hooks; use OCA\Onlyoffice\Preview; -class Application extends App { +use Psr\Container\ContainerInterface; + +class Application extends App implements IBootstrap { /** * Application configuration @@ -61,181 +67,175 @@ class Application extends App { $this->appConfig = new AppConfig($appName); $this->crypt = new Crypt($this->appConfig); + } - // Default script and style if configured - $eventDispatcher = \OC::$server->getEventDispatcher(); - $eventDispatcher->addListener("OCA\Files::loadAdditionalScripts", - function () { - if (!empty($this->appConfig->GetDocumentServerUrl()) - && $this->appConfig->SettingsAreSuccessful() - && $this->appConfig->isUserAllowedToUse()) { - Util::addScript("onlyoffice", "desktop"); - Util::addScript("onlyoffice", "main"); - Util::addScript("onlyoffice", "template"); - - if ($this->appConfig->GetSameTab()) { - Util::addScript("onlyoffice", "listener"); - } - - Util::addStyle("onlyoffice", "main"); - Util::addStyle("onlyoffice", "template"); - } - }); - - if (class_exists(LoadViewer::class)) { - $eventDispatcher->addListener(LoadViewer::class, - function () { - if (!empty($this->appConfig->GetDocumentServerUrl()) - && $this->appConfig->SettingsAreSuccessful() - && $this->appConfig->isUserAllowedToUse()) { - Util::addScript("onlyoffice", "viewer"); - Util::addScript("onlyoffice", "listener"); - - Util::addStyle("onlyoffice", "viewer"); - - $csp = new ContentSecurityPolicy(); - $csp->addAllowedFrameDomain("'self'"); - $cspManager = $this->getContainer()->getServer()->getContentSecurityPolicyManager(); - $cspManager->addDefaultPolicy($csp); - } - }); - } - - $eventDispatcher->addListener("OCA\Files_Sharing::loadAdditionalScripts", - function () { - if (!empty($this->appConfig->GetDocumentServerUrl()) - && $this->appConfig->SettingsAreSuccessful()) { - Util::addScript("onlyoffice", "main"); - - if ($this->appConfig->GetSameTab()) { - Util::addScript("onlyoffice", "listener"); - } - - Util::addStyle("onlyoffice", "main"); - } - }); - + public function register(IRegistrationContext $context): void { require_once __DIR__ . "/../3rdparty/jwt/BeforeValidException.php"; require_once __DIR__ . "/../3rdparty/jwt/ExpiredException.php"; require_once __DIR__ . "/../3rdparty/jwt/SignatureInvalidException.php"; require_once __DIR__ . "/../3rdparty/jwt/JWT.php"; - $container = $this->getContainer(); - - //todo: remove in v20 - $detector = $container->query(IMimeTypeDetector::class); - $detector->getAllMappings(); - $detector->registerType("ott", "application/vnd.oasis.opendocument.text-template"); - $detector->registerType("ots", "application/vnd.oasis.opendocument.spreadsheet-template"); - $detector->registerType("otp", "application/vnd.oasis.opendocument.presentation-template"); - - $previewManager = $container->query(IPreview::class); - $previewManager->registerProvider(Preview::getMimeTypeRegex(), function() use ($container) { - return $container->query(Preview::class); + $context->registerService("L10N", function (ContainerInterface $c) { + return $c->get("ServerContainer")->getL10N($c->get("AppName")); }); - $container->registerService("L10N", function ($c) { - return $c->query("ServerContainer")->getL10N($c->query("AppName")); + $context->registerService("RootStorage", function (ContainerInterface $c) { + return $c->get("ServerContainer")->getRootFolder(); }); - $container->registerService("RootStorage", function ($c) { - return $c->query("ServerContainer")->getRootFolder(); + $context->registerService("UserSession", function (ContainerInterface $c) { + return $c->get("ServerContainer")->getUserSession(); }); - $container->registerService("UserSession", function ($c) { - return $c->query("ServerContainer")->getUserSession(); + $context->registerService("UserManager", function (ContainerInterface $c) { + return $c->get("ServerContainer")->getUserManager(); }); - $container->registerService("UserManager", function ($c) { - return $c->query("ServerContainer")->getUserManager(); + $context->registerService("Logger", function (ContainerInterface $c) { + return $c->get("ServerContainer")->getLogger(); }); - $container->registerService("Logger", function ($c) { - return $c->query("ServerContainer")->getLogger(); + $context->registerService("URLGenerator", function (ContainerInterface $c) { + return $c->get("ServerContainer")->getURLGenerator(); }); - $container->registerService("URLGenerator", function ($c) { - return $c->query("ServerContainer")->getURLGenerator(); + $context->registerService("DirectEditor", function (ContainerInterface $c) { + return new DirectEditor( + $c->get("AppName"), + $c->get("URLGenerator"), + $c->get("L10N"), + $c->get("Logger"), + $this->appConfig, + $this->crypt + ); }); - if (class_exists("OCP\DirectEditing\RegisterDirectEditorEvent")) { - $container->registerService("DirectEditor", function ($c) { - return new DirectEditor( - $c->query("AppName"), - $c->query("URLGenerator"), - $c->query("L10N"), - $c->query("Logger"), - $this->appConfig, - $this->crypt - ); - }); - - $eventDispatcher->addListener(RegisterDirectEditorEvent::class, - function (RegisterDirectEditorEvent $event) use ($container) { - if (!empty($this->appConfig->GetDocumentServerUrl()) - && $this->appConfig->SettingsAreSuccessful()) { - $editor = $container->query("DirectEditor"); - $event->register($editor); - } - }); - } - - // Controllers - $container->registerService("SettingsController", function ($c) { + $context->registerService("SettingsController", function (ContainerInterface $c) { return new SettingsController( - $c->query("AppName"), - $c->query("Request"), - $c->query("URLGenerator"), - $c->query("L10N"), - $c->query("Logger"), + $c->get("AppName"), + $c->get("Request"), + $c->get("URLGenerator"), + $c->get("L10N"), + $c->get("Logger"), $this->appConfig, $this->crypt ); }); - $container->registerService("EditorController", function ($c) { + $context->registerService("EditorController", function (ContainerInterface $c) { return new EditorController( - $c->query("AppName"), - $c->query("Request"), - $c->query("RootStorage"), - $c->query("UserSession"), - $c->query("UserManager"), - $c->query("URLGenerator"), - $c->query("L10N"), - $c->query("Logger"), + $c->get("AppName"), + $c->get("Request"), + $c->get("RootStorage"), + $c->get("UserSession"), + $c->get("UserManager"), + $c->get("URLGenerator"), + $c->get("L10N"), + $c->get("Logger"), $this->appConfig, $this->crypt, - $c->query("IManager"), - $c->query("Session") + $c->get("IManager"), + $c->get("Session") ); }); - $container->registerService("CallbackController", function ($c) { + $context->registerService("CallbackController", function (ContainerInterface $c) { return new CallbackController( - $c->query("AppName"), - $c->query("Request"), - $c->query("RootStorage"), - $c->query("UserSession"), - $c->query("UserManager"), - $c->query("L10N"), - $c->query("Logger"), + $c->get("AppName"), + $c->get("Request"), + $c->get("RootStorage"), + $c->get("UserSession"), + $c->get("UserManager"), + $c->get("L10N"), + $c->get("Logger"), $this->appConfig, $this->crypt, - $c->query("IManager") + $c->get("IManager") ); }); - $container->registerService("TemplateController", function ($c) { + $context->registerService("TemplateController", function (ContainerInterface $c) { return new TemplateController( - $c->query("AppName"), - $c->query("Request"), - $c->query("L10N"), - $c->query("Logger") + $c->get("AppName"), + $c->get("Request"), + $c->get("L10N"), + $c->get("Logger") ); }); + } + + public function boot(IBootContext $context): void { + + $context->injectFn(function (SymfonyAdapter $eventDispatcher) { + + $eventDispatcher->addListener('OCA\Files::loadAdditionalScripts', + function() { + if (!empty($this->appConfig->GetDocumentServerUrl()) + && $this->appConfig->SettingsAreSuccessful() + && $this->appConfig->isUserAllowedToUse()) { + + Util::addScript("onlyoffice", "desktop"); + Util::addScript("onlyoffice", "main"); + Util::addScript("onlyoffice", "template"); + + if ($this->appConfig->GetSameTab()) { + Util::addScript("onlyoffice", "listener"); + } + + Util::addStyle("onlyoffice", "main"); + Util::addStyle("onlyoffice", "template"); + } + }); + $eventDispatcher->addListener(LoadViewer::class, + function () { + if (!empty($this->appConfig->GetDocumentServerUrl()) + && $this->appConfig->SettingsAreSuccessful() + && $this->appConfig->isUserAllowedToUse()) { + Util::addScript("onlyoffice", "viewer"); + Util::addScript("onlyoffice", "listener"); + + Util::addStyle("onlyoffice", "viewer"); + + $csp = new ContentSecurityPolicy(); + $csp->addAllowedFrameDomain("'self'"); + $cspManager = $this->getContainer()->getServer()->getContentSecurityPolicyManager(); + $cspManager->addDefaultPolicy($csp); + } + }); + + $eventDispatcher->addListener('OCA\Files_Sharing::loadAdditionalScripts', + function() { + if (!empty($this->appConfig->GetDocumentServerUrl()) + && $this->appConfig->SettingsAreSuccessful()) { + Util::addScript("onlyoffice", "main"); + + if ($this->appConfig->GetSameTab()) { + Util::addScript("onlyoffice", "listener"); + } + + Util::addStyle("onlyoffice", "main"); + } + }); + + $container = $this->getContainer(); + + $previewManager = $container->query(IPreview::class); + $previewManager->registerProvider(Preview::getMimeTypeRegex(), function() use ($container) { + return $container->query(Preview::class); + }); + + $eventDispatcher->addListener(RegisterDirectEditorEvent::class, + function (RegisterDirectEditorEvent $event) use ($container) { + if (!empty($this->appConfig->GetDocumentServerUrl()) + && $this->appConfig->SettingsAreSuccessful()) { + $editor = $container->query(DirectEditor::class); + $event->register($editor); + } + }); + }); Hooks::connectHooks(); } -} +} \ No newline at end of file -- cgit v1.2.3 From bf45f213ae8dc04ae85afde764d845e07ece8031 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Mon, 15 Feb 2021 14:05:41 +0300 Subject: use nc21 creator --- appinfo/application.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/appinfo/application.php b/appinfo/application.php index 1ad8e57..cabb5e1 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -27,8 +27,11 @@ use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\DirectEditing\RegisterDirectEditorEvent; -use OCP\Util; +use OCP\Files\Template\ITemplateManager; +use OCP\Files\Template\TemplateFileCreator; +use OCP\IL10N; use OCP\IPreview; +use OCP\Util; use OCA\Viewer\Event\LoadViewer; @@ -236,6 +239,32 @@ class Application extends App implements IBootstrap { }); }); + $context->injectFn(function(ITemplateManager $templateManager, IL10N $trans, $appName) { + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $wordTemplate = new TemplateFileCreator($appName, $trans->t("Document"), ".docx"); + $wordTemplate->addMimetype("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + $wordTemplate->setIconClass("icon-onlyoffice-new-docx"); + $wordTemplate->setRatio(21/29.7); + return $wordTemplate; + }); + + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $cellTemplate = new TemplateFileCreator($appName, $trans->t("Spreadsheet"), ".xlsx"); + $cellTemplate->addMimetype("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + $cellTemplate->setIconClass("icon-onlyoffice-new-xlsx"); + $cellTemplate->setRatio(21/29.7); + return $cellTemplate; + }); + + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $slideTemplate = new TemplateFileCreator($appName, $trans->t("Presentation"), ".pptx"); + $slideTemplate->addMimetype("application/vnd.openxmlformats-officedocument.presentationml.presentation"); + $slideTemplate->setIconClass("icon-onlyoffice-new-pptx"); + $slideTemplate->setRatio(16/9); + return $slideTemplate; + }); + }); + Hooks::connectHooks(); } } \ No newline at end of file -- cgit v1.2.3 From 3a85663c813bdace4b1c5a7bd47ef90c91750b3c Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Sat, 17 Apr 2021 17:11:12 +0300 Subject: register template if allowed --- appinfo/application.php | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/appinfo/application.php b/appinfo/application.php index cabb5e1..cc21398 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -240,29 +240,34 @@ class Application extends App implements IBootstrap { }); $context->injectFn(function(ITemplateManager $templateManager, IL10N $trans, $appName) { - $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { - $wordTemplate = new TemplateFileCreator($appName, $trans->t("Document"), ".docx"); - $wordTemplate->addMimetype("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); - $wordTemplate->setIconClass("icon-onlyoffice-new-docx"); - $wordTemplate->setRatio(21/29.7); - return $wordTemplate; - }); + if (!empty($this->appConfig->GetDocumentServerUrl()) + && $this->appConfig->SettingsAreSuccessful() + && $this->appConfig->isUserAllowedToUse()) { + + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $wordTemplate = new TemplateFileCreator($appName, $trans->t("Document"), ".docx"); + $wordTemplate->addMimetype("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + $wordTemplate->setIconClass("icon-onlyoffice-new-docx"); + $wordTemplate->setRatio(21/29.7); + return $wordTemplate; + }); - $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { - $cellTemplate = new TemplateFileCreator($appName, $trans->t("Spreadsheet"), ".xlsx"); - $cellTemplate->addMimetype("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); - $cellTemplate->setIconClass("icon-onlyoffice-new-xlsx"); - $cellTemplate->setRatio(21/29.7); - return $cellTemplate; - }); + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $cellTemplate = new TemplateFileCreator($appName, $trans->t("Spreadsheet"), ".xlsx"); + $cellTemplate->addMimetype("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + $cellTemplate->setIconClass("icon-onlyoffice-new-xlsx"); + $cellTemplate->setRatio(21/29.7); + return $cellTemplate; + }); - $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { - $slideTemplate = new TemplateFileCreator($appName, $trans->t("Presentation"), ".pptx"); - $slideTemplate->addMimetype("application/vnd.openxmlformats-officedocument.presentationml.presentation"); - $slideTemplate->setIconClass("icon-onlyoffice-new-pptx"); - $slideTemplate->setRatio(16/9); - return $slideTemplate; - }); + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $slideTemplate = new TemplateFileCreator($appName, $trans->t("Presentation"), ".pptx"); + $slideTemplate->addMimetype("application/vnd.openxmlformats-officedocument.presentationml.presentation"); + $slideTemplate->setIconClass("icon-onlyoffice-new-pptx"); + $slideTemplate->setRatio(16/9); + return $slideTemplate; + }); + } }); Hooks::connectHooks(); -- cgit v1.2.3 From 3a7d4441abe4b15076c0bea0d6db271f013e331e Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Mon, 15 Feb 2021 14:24:35 +0300 Subject: use empty template when blank is created --- appinfo/application.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/appinfo/application.php b/appinfo/application.php index cc21398..e530711 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -27,6 +27,7 @@ use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\DirectEditing\RegisterDirectEditorEvent; +use OCP\Files\Template\FileCreatedFromTemplateEvent; use OCP\Files\Template\ITemplateManager; use OCP\Files\Template\TemplateFileCreator; use OCP\IL10N; @@ -44,6 +45,7 @@ use OCA\Onlyoffice\Crypt; use OCA\Onlyoffice\DirectEditor; use OCA\Onlyoffice\Hooks; use OCA\Onlyoffice\Preview; +use OCA\Onlyoffice\TemplateManager; use Psr\Container\ContainerInterface; @@ -224,6 +226,16 @@ class Application extends App implements IBootstrap { $container = $this->getContainer(); + $eventDispatcher->addListener(FileCreatedFromTemplateEvent::class, + function (FileCreatedFromTemplateEvent $event) { + $template = $event->getTemplate(); + if ($template === null) { + $targetFile = $event->getTarget(); + $templateEmpty = TemplateManager::GetEmptyTemplate($targetFile->getName()); + $targetFile->putContent($templateEmpty); + } + }); + $previewManager = $container->query(IPreview::class); $previewManager->registerProvider(Preview::getMimeTypeRegex(), function() use ($container) { return $container->query(Preview::class); -- cgit v1.2.3 From c3777ce92f260d125437921052e29f2fa4215271 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Tue, 20 Apr 2021 14:52:14 +0300 Subject: template provider --- appinfo/application.php | 4 +++ controller/editorcontroller.php | 5 ++- controller/settingscontroller.php | 14 ++++++++- controller/templatecontroller.php | 14 ++++++++- lib/templatemanager.php | 39 ++++++++++-------------- lib/templateprovider.php | 64 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 114 insertions(+), 26 deletions(-) create mode 100644 lib/templateprovider.php diff --git a/appinfo/application.php b/appinfo/application.php index e530711..8d0ea41 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -46,6 +46,7 @@ use OCA\Onlyoffice\DirectEditor; use OCA\Onlyoffice\Hooks; use OCA\Onlyoffice\Preview; use OCA\Onlyoffice\TemplateManager; +use OCA\Onlyoffice\TemplateProvider; use Psr\Container\ContainerInterface; @@ -168,6 +169,9 @@ class Application extends App implements IBootstrap { $c->get("Logger") ); }); + + $context->registerTemplateProvider(TemplateProvider::class); + } public function boot(IBootContext $context): void { diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 2b6f4e5..58c2646 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -239,7 +239,10 @@ class EditorController extends Controller { if (empty($templateId)) { $template = TemplateManager::GetEmptyTemplate($name); } else { - $template = TemplateManager::GetTemplate($templateId); + $templateFile = TemplateManager::GetTemplate($templateId); + if ($templateFile !== null) { + $template = $templateFile->getContent(); + } } if (!$template) { diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index a99d768..09ce609 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -294,6 +294,18 @@ class SettingsController extends Controller { * @return array */ private function GetGlobalTemplates() { - return TemplateManager::GetGlobalTemplates(); + $templates = []; + $templatesList = TemplateManager::GetGlobalTemplates(); + + foreach ($templatesList as $templatesItem) { + $template = [ + "id" => $templatesItem->getId(), + "name" => $templatesItem->getName(), + "type" => TemplateManager::GetTypeTemplate($templatesItem->getMimeType()) + ]; + array_push($templates, $template); + } + + return $templates; } } diff --git a/controller/templatecontroller.php b/controller/templatecontroller.php index d3d704f..d140eeb 100644 --- a/controller/templatecontroller.php +++ b/controller/templatecontroller.php @@ -71,7 +71,19 @@ class TemplateController extends Controller { * @NoAdminRequired */ public function GetTemplates($type = null) { - return TemplateManager::GetGlobalTemplates($type); + $mime = TemplateManager::GetMimeTemplate($type); + $templatesList = TemplateManager::GetGlobalTemplates($mime); + + foreach ($templatesList as $templatesItem) { + $template = [ + "id" => $templatesItem->getId(), + "name" => $templatesItem->getName(), + "type" => TemplateManager::GetTypeTemplate($templatesItem->getMimeType()) + ]; + array_push($templates, $template); + } + + return $templates; } /** diff --git a/lib/templatemanager.php b/lib/templatemanager.php index 0dd1b3d..be8c10e 100644 --- a/lib/templatemanager.php +++ b/lib/templatemanager.php @@ -19,6 +19,7 @@ namespace OCA\Onlyoffice; +use OCP\Files\File; /** * Template manager @@ -60,48 +61,42 @@ class TemplateManager { /** * Get global templates * - * @param string $type - template format type + * @param string $mimetype - mimetype of the template * * @return array */ - public static function GetGlobalTemplates($type = null) { - $templates = []; + public static function GetGlobalTemplates($mimetype = null) { $templateDir = self::GetGlobalTemplateDir(); - if (!empty($type)) { - $mime = self::GetMimeTemplate($type); - $templatesList = $templateDir->searchByMime($mime); + if (!empty($mimetype)) { + $templatesList = $templateDir->searchByMime($mimetype); } else { $templatesList = $templateDir->getDirectoryListing(); } - foreach ($templatesList as $templatesItem) { - $template = [ - "id" => $templatesItem->getId(), - "name" => $templatesItem->getName(), - "type" => TemplateManager::GetTypeTemplate($templatesItem->getMimeType()) - ]; - array_push($templates, $template); - } - - return $templates; + return $templatesList; } /** - * Get template content + * Get template file * - * @param string $templateId - identifier file template + * @param string $templateId - identifier of the template * - * @return string + * @return File */ public static function GetTemplate($templateId) { $logger = \OC::$server->getLogger(); + if (empty($templateId)) { + $logger->info("templateId is empty", ["app" => self::$appName]); + return null; + } + $templateDir = self::GetGlobalTemplateDir(); try { $templates = $templateDir->getById($templateId); - } catch(\Exception $e) { + } catch (\Exception $e) { $logger->logException($e, ["message" => "GetTemplate: $templateId", "app" => self::$appName]); return null; } @@ -111,9 +106,7 @@ class TemplateManager { return null; } - $content = $templates[0]->getContent(); - - return $content; + return $templates[0]; } /** diff --git a/lib/templateprovider.php b/lib/templateprovider.php new file mode 100644 index 0000000..9c5d22a --- /dev/null +++ b/lib/templateprovider.php @@ -0,0 +1,64 @@ +getId(), + $templateFile + ); + array_push($templates, $template); + } + + return $templates; + } + + /** + * Return the file for a given template id + * + * @param string $templateId - identifier of the template + * + * @return File + */ + public function getCustomTemplate($templateId) : File { + return TemplateManager::GetTemplate($templateId); + } +} \ No newline at end of file -- cgit v1.2.3 From 1c93ab8173f1f3212b40588d369fc86ccf582e01 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 21 Apr 2021 13:38:42 +0300 Subject: thumbnails for templates --- appinfo/application.php | 3 ++- appinfo/routes.php | 1 + controller/templatecontroller.php | 54 ++++++++++++++++++++++++++++++++++++++- lib/preview.php | 14 ++++++++-- lib/templatemanager.php | 17 ++++++++++++ lib/templateprovider.php | 27 ++++++++++++++++++++ 6 files changed, 112 insertions(+), 4 deletions(-) diff --git a/appinfo/application.php b/appinfo/application.php index 8d0ea41..31e976f 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -166,7 +166,8 @@ class Application extends App implements IBootstrap { $c->get("AppName"), $c->get("Request"), $c->get("L10N"), - $c->get("Logger") + $c->get("Logger"), + $c->get(IPreview::class) ); }); diff --git a/appinfo/routes.php b/appinfo/routes.php index 42066e7..a1ca17c 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -22,6 +22,7 @@ return [ ["name" => "callback#download", "url" => "/download", "verb" => "GET"], ["name" => "callback#emptyfile", "url" => "/empty", "verb" => "GET"], ["name" => "callback#track", "url" => "/track", "verb" => "POST"], + ["name" => "template#preview", "url" => "/preview", "verb" => "GET"], ["name" => "editor#loader", "url" => "/loader", "verb" => "GET"], ["name" => "editor#create_new", "url" => "/new", "verb" => "GET"], ["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"], diff --git a/controller/templatecontroller.php b/controller/templatecontroller.php index d140eeb..022dc39 100644 --- a/controller/templatecontroller.php +++ b/controller/templatecontroller.php @@ -20,8 +20,13 @@ namespace OCA\Onlyoffice\Controller; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Http\FileDisplayResponse; +use OCP\Files\NotFoundException; use OCP\IL10N; use OCP\ILogger; +use OCP\IPreview; use OCP\IRequest; use OCA\Onlyoffice\TemplateManager; @@ -45,6 +50,13 @@ class TemplateController extends Controller { */ private $logger; + /** + * Preview manager + * + * @var IPreview + */ + private $preview; + /** * @param string $AppName - application name * @param ILogger $logger - logger @@ -53,12 +65,14 @@ class TemplateController extends Controller { public function __construct($AppName, IRequest $request, IL10N $trans, - ILogger $logger + ILogger $logger, + IPreview $preview ) { parent::__construct($AppName, $request); $this->trans = $trans; $this->logger = $logger; + $this->preview = $preview; } /** @@ -162,4 +176,42 @@ class TemplateController extends Controller { $this->logger->debug("Template: deleted " . $templates[0]->getName(), ["app" => $this->appName]); return []; } + + /** + * Returns the origin document key for editor + * + * @param string $fileId - file identifier + * @param int $x - x + * @param int $y - y + * @param bool $crop - crop + * @param string $mode - mode + * + * @return DataResponse|FileDisplayResponse + * + * @NoAdminRequired + * @NoCSRFRequired + */ + public function preview($fileId, $x = 256, $y = 256, $crop = false, $mode = IPreview::MODE_FILL) { + if (empty($fileId) || $x === 0 || $y === 0) { + return new DataResponse([], Http::STATUS_BAD_REQUEST); + } + + $template = TemplateManager::GetTemplate($fileId); + if (empty($template)) { + return new DataResponse([], Http::STATUS_NOT_FOUND); + } + + try { + $f = $this->preview->getPreview($template, $x, $y, $crop, $mode); + $response = new FileDisplayResponse($f, Http::STATUS_OK, ["Content-Type" => $f->getMimeType()]); + $response->cacheFor(3600 * 24); + + return $response; + } catch (NotFoundException $e) { + return new DataResponse([], Http::STATUS_NOT_FOUND); + } catch (\InvalidArgumentException $e) { + return new DataResponse([], Http::STATUS_BAD_REQUEST); + } + + } } \ No newline at end of file diff --git a/lib/preview.php b/lib/preview.php index 2627712..42c50e6 100644 --- a/lib/preview.php +++ b/lib/preview.php @@ -40,6 +40,7 @@ use OCA\Onlyoffice\Crypt; use OCA\Onlyoffice\DocumentService; use OCA\Onlyoffice\FileUtility; use OCA\Onlyoffice\FileVersions; +use OCA\Onlyoffice\TemplateManager; /** * Preview provider @@ -293,10 +294,11 @@ class Preview extends Provider { * @param File $file - file * @param IUser $user - user with access * @param int $version - file version + * @param bool $template - file is template * * @return string */ - private function getUrl($file, $user = null, $version = 0) { + private function getUrl($file, $user = null, $version = 0, $template = false) { $data = [ "action" => "download", @@ -311,6 +313,9 @@ class Preview extends Provider { if ($version > 0) { $data["version"] = $version; } + if ($template) { + $data["template"] = true; + } $hashUrl = $this->crypt->GetHash($data); @@ -342,6 +347,7 @@ class Preview extends Provider { $key = null; $versionNum = 0; + $template = false; if (FileVersions::splitPathVersion($path) !== false) { if ($this->versionManager === null || $owner === null) { return [null, null, null]; @@ -375,7 +381,11 @@ class Preview extends Provider { $key = DocumentService::GenerateRevisionId($key); } - $fileUrl = $this->getUrl($fileInfo, $owner, $versionNum); + if (TemplateManager::IsTemplate($fileInfo->getId())) { + $template = true; + } + + $fileUrl = $this->getUrl($fileInfo, $owner, $versionNum, $template); $fileExtension = $fileInfo->getExtension(); diff --git a/lib/templatemanager.php b/lib/templatemanager.php index be8c10e..234ec8f 100644 --- a/lib/templatemanager.php +++ b/lib/templatemanager.php @@ -168,6 +168,23 @@ class TemplateManager { return false; } + /** + * Check file if it's template + * + * @param int $fileId - identifier file + * + * @return bool + */ + public static function IsTemplate($fileId) { + $template = self::GetTemplate($fileId); + + if (empty($template)) { + return false; + } + + return true; + } + /** * Get template * diff --git a/lib/templateprovider.php b/lib/templateprovider.php index 9c5d22a..1cc918a 100644 --- a/lib/templateprovider.php +++ b/lib/templateprovider.php @@ -22,11 +22,35 @@ namespace OCA\Onlyoffice; use OCP\Files\File; use OCP\Files\Template\ICustomTemplateProvider; use OCP\Files\Template\Template; +use OCP\IURLGenerator; use OCA\Onlyoffice\TemplateManager; class TemplateProvider implements ICustomTemplateProvider { + /** + * Application name + * + * @var string + */ + private $appName; + + /** + * Url generator service + * + * @var IURLGenerator + */ + private $urlGenerator; + + /** + * @param string $AppName - application name + * @param IURLGenerator $urlGenerator - url generator service + */ + public function __construct($AppName, IURLGenerator $urlGenerator) { + $this->appName = $AppName; + $this->urlGenerator = $urlGenerator; + } + /** * Return a list of additional templates that the template provider is offering * @@ -45,6 +69,9 @@ class TemplateProvider implements ICustomTemplateProvider { $templateFile->getId(), $templateFile ); + + $template->setCustomPreviewUrl($this->urlGenerator->linkToRouteAbsolute($this->appName . ".template.preview", ["fileId" => $templateFile->getId()])); + array_push($templates, $template); } -- cgit v1.2.3 From b2c2fe99f89d94ac314e7f4e1285cdd54607c6db Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 5 May 2021 16:09:44 +0300 Subject: remove log on IsTemplate check --- controller/templatecontroller.php | 1 + lib/templatemanager.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/templatecontroller.php b/controller/templatecontroller.php index 022dc39..b266c7e 100644 --- a/controller/templatecontroller.php +++ b/controller/templatecontroller.php @@ -198,6 +198,7 @@ class TemplateController extends Controller { $template = TemplateManager::GetTemplate($fileId); if (empty($template)) { + $this->logger->error("Template not found: $fileId", ["app" => $this->appName]); return new DataResponse([], Http::STATUS_NOT_FOUND); } diff --git a/lib/templatemanager.php b/lib/templatemanager.php index 234ec8f..cd6a770 100644 --- a/lib/templatemanager.php +++ b/lib/templatemanager.php @@ -102,7 +102,6 @@ class TemplateManager { } if (empty($templates)) { - $logger->info("Template not found: $templateId", ["app" => self::$appName]); return null; } -- cgit v1.2.3 From fdf083ea0dc47e024846f23e8c389599ad1f66eb Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Mon, 15 Feb 2021 14:44:41 +0300 Subject: remove old template picker --- appinfo/routes.php | 1 - controller/editorcontroller.php | 14 ++--- controller/templatecontroller.php | 25 --------- js/main.js | 28 ++-------- js/template.js | 105 ++------------------------------------ l10n/bg.js | 3 -- l10n/bg.json | 3 -- l10n/de.js | 3 -- l10n/de.json | 3 -- l10n/de_DE.js | 3 -- l10n/de_DE.json | 3 -- l10n/es.js | 3 -- l10n/es.json | 3 -- l10n/fr.js | 3 -- l10n/fr.json | 3 -- l10n/it.js | 3 -- l10n/it.json | 3 -- l10n/ja.js | 3 -- l10n/ja.json | 3 -- l10n/pl.js | 3 -- l10n/pl.json | 3 -- l10n/pt_BR.js | 3 -- l10n/pt_BR.json | 3 -- l10n/ru.js | 3 -- l10n/ru.json | 3 -- l10n/sv.js | 3 -- l10n/sv.json | 3 -- l10n/zh_CN.js | 3 -- l10n/zh_CN.json | 3 -- templates/templatePicker.html | 11 ---- 30 files changed, 11 insertions(+), 245 deletions(-) delete mode 100644 templates/templatePicker.html diff --git a/appinfo/routes.php b/appinfo/routes.php index a1ca17c..9e2ee5d 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -41,7 +41,6 @@ return [ ["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"], - ["name" => "template#get_templates", "url" => "/ajax/template", "verb" => "GET"], ], "ocs" => [ ["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"], diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 58c2646..cfba87b 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -184,7 +184,6 @@ class EditorController extends Controller { * * @param string $name - file name * @param string $dir - folder path - * @param string $templateId - file identifier * @param string $shareToken - access token * * @return array @@ -192,7 +191,7 @@ class EditorController extends Controller { * @NoAdminRequired * @PublicPage */ - public function create($name, $dir, $templateId = null, $shareToken = null) { + public function create($name, $dir, $shareToken = null) { $this->logger->debug("Create: $name", ["app" => $this->appName]); if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { @@ -236,17 +235,10 @@ class EditorController extends Controller { return ["error" => $this->trans->t("You don't have enough permission to create")]; } - if (empty($templateId)) { - $template = TemplateManager::GetEmptyTemplate($name); - } else { - $templateFile = TemplateManager::GetTemplate($templateId); - if ($templateFile !== null) { - $template = $templateFile->getContent(); - } - } + $template = TemplateManager::GetEmptyTemplate($name); if (!$template) { - $this->logger->error("Template for file creation not found: $name ($templateId)", ["app" => $this->appName]); + $this->logger->error("Template for file creation not found: $name", ["app" => $this->appName]); return ["error" => $this->trans->t("Template not found")]; } diff --git a/controller/templatecontroller.php b/controller/templatecontroller.php index b266c7e..97f01c5 100644 --- a/controller/templatecontroller.php +++ b/controller/templatecontroller.php @@ -75,31 +75,6 @@ class TemplateController extends Controller { $this->preview = $preview; } - /** - * Get templates - * - * @param string $type - template format type - * - * @return array - * - * @NoAdminRequired - */ - public function GetTemplates($type = null) { - $mime = TemplateManager::GetMimeTemplate($type); - $templatesList = TemplateManager::GetGlobalTemplates($mime); - - foreach ($templatesList as $templatesItem) { - $template = [ - "id" => $templatesItem->getId(), - "name" => $templatesItem->getName(), - "type" => TemplateManager::GetTypeTemplate($templatesItem->getMimeType()) - ]; - array_push($templates, $template); - } - - return $templates; - } - /** * Add global template * diff --git a/js/main.js b/js/main.js index 4e42837..9ca89ed 100644 --- a/js/main.js +++ b/js/main.js @@ -27,7 +27,7 @@ OCA.Onlyoffice.setting = {}; - OCA.Onlyoffice.CreateFile = function (name, fileList, templateId) { + OCA.Onlyoffice.CreateFile = function (name, fileList) { var dir = fileList.getCurrentDirectory(); if (!OCA.Onlyoffice.setting.sameTab || OCA.Onlyoffice.Desktop) { @@ -40,10 +40,6 @@ dir: dir }; - if (templateId) { - createData.templateId = templateId; - } - if ($("#isPublic").val()) { createData.shareToken = encodeURIComponent($("#sharingToken").val()); } @@ -257,11 +253,7 @@ iconClass: "icon-onlyoffice-new-docx", fileType: "docx", actionHandler: function (name) { - if (!$("#isPublic").val() && OCA.Onlyoffice.TemplateExist("document")) { - OCA.Onlyoffice.OpenTemplatePicker(name, ".docx", "document"); - } else { - OCA.Onlyoffice.CreateFile(name + ".docx", fileList); - } + OCA.Onlyoffice.CreateFile(name + ".docx", fileList); } }); @@ -272,11 +264,7 @@ iconClass: "icon-onlyoffice-new-xlsx", fileType: "xlsx", actionHandler: function (name) { - if (!$("#isPublic").val() && OCA.Onlyoffice.TemplateExist("spreadsheet")) { - OCA.Onlyoffice.OpenTemplatePicker(name, ".xlsx", "spreadsheet"); - } else { - OCA.Onlyoffice.CreateFile(name + ".xlsx", fileList); - } + OCA.Onlyoffice.CreateFile(name + ".xlsx", fileList); } }); @@ -287,17 +275,9 @@ iconClass: "icon-onlyoffice-new-pptx", fileType: "pptx", actionHandler: function (name) { - if (!$("#isPublic").val() && OCA.Onlyoffice.TemplateExist("presentation")) { - OCA.Onlyoffice.OpenTemplatePicker(name, ".pptx", "presentation"); - } else { - OCA.Onlyoffice.CreateFile(name + ".pptx", fileList); - } + OCA.Onlyoffice.CreateFile(name + ".pptx", fileList); } }); - - if (OCA.Onlyoffice.GetTemplates) { - OCA.Onlyoffice.GetTemplates(); - } } }; diff --git a/js/template.js b/js/template.js index 382494d..7455821 100644 --- a/js/template.js +++ b/js/template.js @@ -19,69 +19,9 @@ (function ($, OC) { OCA.Onlyoffice = _.extend({ - AppName: "onlyoffice", - templates: null + AppName: "onlyoffice" }, OCA.Onlyoffice); - OCA.Onlyoffice.OpenTemplatePicker = function (name, extension, type) { - - $("#onlyoffice-template-picker").remove(); - - $.get(OC.filePath(OCA.Onlyoffice.AppName, "templates", "templatePicker.html"), - function (tmpl) { - var $tmpl = $(tmpl) - var dialog = $tmpl.octemplate({ - dialog_name: "onlyoffice-template-picker", - dialog_title: t(OCA.Onlyoffice.AppName, "Select template") - }); - - OCA.Onlyoffice.AttachTemplates(dialog, type); - - $("body").append(dialog); - - $("#onlyoffice-template-picker").ocdialog({ - closeOnEscape: true, - modal: true, - buttons: [{ - text: t("core", "Cancel"), - classes: "cancel", - click: function() { - $(this).ocdialog("close") - } - }, { - text: t(OCA.Onlyoffice.AppName, "Create"), - classes: "primary", - click: function() { - var templateId = this.dataset.templateId; - var fileList = OCA.Files.App.fileList; - OCA.Onlyoffice.CreateFile(name + extension, fileList, templateId); - $(this).ocdialog("close") - } - }] - }); - }); - }; - - OCA.Onlyoffice.GetTemplates = function () { - if (OCA.Onlyoffice.templates != null) { - return; - } - - $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/template"), - function onSuccess(response) { - if (response.error) { - OC.Notification.show(response.error, { - type: "error", - timeout: 3 - }); - return; - } - - OCA.Onlyoffice.templates = response; - return; - }); - }; - OCA.Onlyoffice.AddTemplate = function (file, callback) { var data = new FormData(); data.append("file", file); @@ -101,7 +41,7 @@ callback(response, null); } }); - } + }; OCA.Onlyoffice.DeleteTemplate = function (templateId, callback) { $.ajax({ @@ -116,36 +56,7 @@ } } }); - } - - OCA.Onlyoffice.AttachTemplates = function (dialog, type) { - var emptyItem = dialog[0].querySelector(".onlyoffice-template-item"); - - OCA.Onlyoffice.templates.forEach(template => { - if (template.type !== type) { - return; - } - var item = emptyItem.cloneNode(true); - - $(item.querySelector("label")).attr("for", "template_picker-" + template["id"]); - item.querySelector("input").id = "template_picker-" + template["id"]; - item.querySelector("img").src = "/core/img/filetypes/x-office-" + template["type"] + ".svg"; - item.querySelector("p").textContent = template["name"]; - item.onclick = function() { - dialog[0].dataset.templateId = template["id"]; - } - dialog[0].querySelector(".onlyoffice-template-container").appendChild(item); - }); - - $(emptyItem.querySelector("label")).attr("for", "template_picker-0"); - emptyItem.querySelector("input").id = "template_picker-0"; - emptyItem.querySelector("input").checked = true; - emptyItem.querySelector("img").src = "/core/img/filetypes/x-office-" + type + ".svg"; - emptyItem.querySelector("p").textContent = t(OCA.Onlyoffice.AppName, "Empty"); - emptyItem.onclick = function() { - dialog[0].dataset.templateId = "0"; - } - } + }; OCA.Onlyoffice.AttachItemTemplate = function (template) { $.get(OC.filePath(OCA.Onlyoffice.AppName, "templates", "templateItem.html"), @@ -158,14 +69,6 @@ $(".onlyoffice-template-container").append(item); }); - } - - OCA.Onlyoffice.TemplateExist = function (type) { - var isExist = OCA.Onlyoffice.templates.some((template) => { - return template.type === type; - }); - - return isExist; - } + }; })(jQuery, OC); \ No newline at end of file diff --git a/l10n/bg.js b/l10n/bg.js index 96675e0..6212723 100644 --- a/l10n/bg.js +++ b/l10n/bg.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Използвайте ONLYOFFICE, за да генерирате преглед на документа (ще заеме дисково пространство)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Запазете метаданните за всяка версия, щом документът бъде редактиран (ще заеме дисково пространство)", "All history successfully deleted": "Цялата история е успешно изтрита", - "Create": "Създай", - "Select template" : "Избор на шаблон", "Invalid file provided" : "Предоставен е невалиден файл", - "Empty": "Празно", "Error" : "Грешка", "Add a new template": "Добавяне на шаблон", "Template already exists": "Шаблонът вече съществува", diff --git a/l10n/bg.json b/l10n/bg.json index 7c9df9d..dc624b0 100644 --- a/l10n/bg.json +++ b/l10n/bg.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Използвайте ONLYOFFICE, за да генерирате преглед на документа (ще заеме дисково пространство)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Запазете метаданните за всяка версия, щом документът бъде редактиран (ще заеме дисково пространство)", "All history successfully deleted": "Цялата история е успешно изтрита", - "Create": "Създай", - "Select template" : "Избор на шаблон", "Invalid file provided" : "Предоставен е невалиден файл", - "Empty": "Празно", "Error" : "Грешка", "Add a new template": "Добавяне на шаблон", "Template already exists": "Шаблонът вече съществува", diff --git a/l10n/de.js b/l10n/de.js index 412349b..86a9350 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", - "Create": "Erstellen", - "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", - "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/de.json b/l10n/de.json index f058bdf..6260963 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", - "Create": "Erstellen", - "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", - "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 42ec3fe..6858193 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", - "Create": "Erstellen", - "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", - "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 751102d..9314692 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", - "Create": "Erstellen", - "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", - "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/es.js b/l10n/es.js index ecc6213..87b9d09 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para generar una vista previa del documento (ocupará espacio en el disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Guardar los metadatos de cada versión al editar el documento (ocupará espacio en el disco)", "All history successfully deleted": "Todo el historial se ha eliminado correctamente", - "Create": "Crear", - "Select template" : "Seleccionar plantilla", "Invalid file provided" : "Archivo proporcionado no válido", - "Empty": "Vacío", "Error" : "Error", "Add a new template": "Añadir una plantilla nueva", "Template already exists": "La plantilla ya existe", diff --git a/l10n/es.json b/l10n/es.json index 036db26..22afa74 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para generar una vista previa del documento (ocupará espacio en el disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Guardar los metadatos de cada versión al editar el documento (ocupará espacio en el disco)", "All history successfully deleted": "Todo el historial se ha eliminado correctamente", - "Create": "Crear", - "Select template" : "Seleccionar plantilla", "Invalid file provided" : "Archivo proporcionado no válido", - "Empty": "Vacío", "Error" : "Error", "Add a new template": "Añadir una plantilla nueva", "Template already exists": "La plantilla ya existe", diff --git a/l10n/fr.js b/l10n/fr.js index 79d8015..194000f 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Utilisez ONLYOFFICE pour générer l'aperçu du document (occupe de l'espace disque)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Gardez les métadonnées pour chaque version dès que le document est modifié (occupe de l'espace disque)", "All history successfully deleted": "L'historique a été supprimé avec succès", - "Create": "Créer", - "Select template" : "Sélectionnez un modèle", "Invalid file provided" : "Fichier non valide", - "Empty": "Vide", "Error" : "Erreur", "Add a new template": "Ajouter un nouveau modèle", "Template already exists": "Le modèle existe déjà", diff --git a/l10n/fr.json b/l10n/fr.json index 70ec36a..00472c1 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Utilisez ONLYOFFICE pour générer l'aperçu du document (occupe de l'espace disque)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Gardez les métadonnées pour chaque version dès que le document est modifié (occupe de l'espace disque)", "All history successfully deleted": "L'historique a été supprimé avec succès", - "Create": "Créer", - "Select template" : "Sélectionnez un modèle", "Invalid file provided" : "Fichier non valide", - "Empty": "Vide", "Error" : "Erreur", "Add a new template": "Ajouter un nouveau modèle", "Template already exists": "Le modèle existe déjà", diff --git a/l10n/it.js b/l10n/it.js index 1093e38..2e6e8dc 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usare ONLYOFFICE per generare anteprima documenti (occuperà spazio su disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Salvare metadati per ogni versione una volta modificato il documento (occuperà spazio su disco)", "All history successfully deleted": "Cronologia eliminata con successo", - "Create": "Crea", - "Select template" : "Seleziona modello", "Invalid file provided" : "File fornito non valido", - "Empty": "Vuoto", "Error" : "Errore", "Add a new template": "Aggiungi un nuovo modello", "Template already exists": "Modello già esiste", diff --git a/l10n/it.json b/l10n/it.json index 8912857..0a8a4e1 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usare ONLYOFFICE per generare anteprima documenti (occuperà spazio su disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Salvare metadati per ogni versione una volta modificato il documento (occuperà spazio su disco)", "All history successfully deleted": "Cronologia eliminata con successo", - "Create": "Crea", - "Select template" : "Seleziona modello", "Invalid file provided" : "File fornito non valido", - "Empty": "Vuoto", "Error" : "Errore", "Add a new template": "Aggiungi un nuovo modello", "Template already exists": "Modello già esiste", diff --git a/l10n/ja.js b/l10n/ja.js index 8a53344..6428c02 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", "All history successfully deleted": "すべての履歴が正常に削除されました", - "Create": "作成", - "Select template" : "テンプレートを選択する", "Invalid file provided" : "無効なファイルが提供されました", - "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", "Template already exists": "テンプレートは既に存在しています", diff --git a/l10n/ja.json b/l10n/ja.json index f55fcca..5448db7 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", "All history successfully deleted": "すべての履歴が正常に削除されました", - "Create": "作成", - "Select template" : "テンプレートを選択する", "Invalid file provided" : "無効なファイルが提供されました", - "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", "Template already exists": "テンプレートは既に存在しています", diff --git a/l10n/pl.js b/l10n/pl.js index d3d40fc..f75b9fd 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Skorzystaj z ONLYOFFICE, aby wygenerować podgląd dokumentu (zajmie to miejsce na dysku)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Zachowaj metadane dla każdej wersji, gdy dokument jest edytowany (zajmie to miejsce na dysku)", "All history successfully deleted": "Cała historia została pomyślnie usunięta", - "Create": "Utwórz", - "Select template" : "Wybierz szablon", "Invalid file provided" : "Wprowadzono niewłaściwy plik", - "Empty": "Pusty", "Error" : "Błąd", "Add a new template": "Dodaj nowy szablon", "Template already exists": "Szablon już istnieje", diff --git a/l10n/pl.json b/l10n/pl.json index 729c004..e8d857f 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Skorzystaj z ONLYOFFICE, aby wygenerować podgląd dokumentu (zajmie to miejsce na dysku)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Zachowaj metadane dla każdej wersji, gdy dokument jest edytowany (zajmie to miejsce na dysku)", "All history successfully deleted": "Cała historia została pomyślnie usunięta", - "Create": "Utwórz", - "Select template" : "Wybierz szablon", "Invalid file provided" : "Wprowadzono niewłaściwy plik", - "Empty": "Pusty", "Error" : "Błąd", "Add a new template": "Dodaj nowy szablon", "Template already exists": "Szablon już istnieje", diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index e5a032e..6d4e9d3 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para gerar uma visualização do documento (ocupará espaço em disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Manter os metadados para cada versão após a edição (ocupará espaço em disco) (ocupará espaço em disco)", "All history successfully deleted": "O histórico foi excluído com sucesso", - "Create": "Criar", - "Select template" : "Selecionar um modelo", "Invalid file provided" : "Arquivo fornecido inválido", - "Empty": "Vazio", "Error" : "Erro", "Add a new template": "Adicionar um novo modelo", "Template already exists": "Modelo já existe", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 461df94..2afa2fa 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para gerar uma visualização do documento (ocupará espaço em disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Manter os metadados para cada versão após a edição (ocupará espaço em disco) (ocupará espaço em disco)", "All history successfully deleted": "O histórico foi excluído com sucesso", - "Create": "Criar", - "Select template" : "Selecionar um modelo", "Invalid file provided" : "Arquivo fornecido inválido", - "Empty": "Vazio", "Error" : "Erro", "Add a new template": "Adicionar um novo modelo", "Template already exists": "Modelo já existe", diff --git a/l10n/ru.js b/l10n/ru.js index 68795f5..9dd597a 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Использовать ONLYOFFICE для создания превью документа (займет место на диске)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Сохранять метаданные для каждой версии после редактирования (займет место на диске)", "All history successfully deleted": "История успешно удалена", - "Create": "Создать", - "Select template" : "Выбрать шаблон", "Invalid file provided" : "Указан неправильный файл", - "Empty": "Пустой", "Error" : "Ошибка", "Add a new template": "Добавить новый шаблон", "Template already exists": "Шаблон уже существует", diff --git a/l10n/ru.json b/l10n/ru.json index 80ef70a..34ba97e 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Использовать ONLYOFFICE для создания превью документа (займет место на диске)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Сохранять метаданные для каждой версии после редактирования (займет место на диске)", "All history successfully deleted": "История успешно удалена", - "Create": "Создать", - "Select template" : "Выбрать шаблон", "Invalid file provided" : "Указан неправильный файл", - "Empty": "Пустой", "Error" : "Ошибка", "Add a new template": "Добавить новый шаблон", "Template already exists": "Шаблон уже существует", diff --git a/l10n/sv.js b/l10n/sv.js index 8ce9c93..e1fd29f 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -88,10 +88,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Använd ONLYOFFICE för att generera en förhandsgranskning av dokument (detta använder diskutrymme)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Behåll metadata för varje version när dokumentet redigeras (detta använder diskutrymme) ", "All history successfully deleted": "All historik har tagits bort", - "Create": "Skapa", - "Select template" : "Välj mall", "Invalid file provided" : "Ogiltig fil tillhandahölls", - "Empty": "Tom", "Error" : "Fel", "Add a new template": "Lägg till en ny mall", "Template already exists": "Mallen finns redan", diff --git a/l10n/sv.json b/l10n/sv.json index d34b4ef..c16b02e 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -86,10 +86,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Använd ONLYOFFICE för att generera en förhandsgranskning av dokument (detta använder diskutrymme)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Behåll metadata för varje version när dokumentet redigeras (detta använder diskutrymme) ", "All history successfully deleted": "All historik har tagits bort", - "Create": "Skapa", - "Select template" : "Välj mall", "Invalid file provided" : "Ogiltig fil tillhandahölls", - "Empty": "Tom", "Error" : "Fel", "Add a new template": "Lägg till en ny mall", "Template already exists": "Mallen finns redan", diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index e7df499..74d16d6 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -89,10 +89,7 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "使用ONLYOFFICE生成文档预览(将占用磁盘空间)", "Keep metadata for each version once the document is edited (it will take up disk space)": "编辑文档后保留每个版本的元数据(它将占用磁盘空间)", "All history successfully deleted": "所有历史记录成功删除", - "Create": "创建", - "Select template" : "选择模板", "Invalid file provided" : "提供了无效文件", - "Empty": "空", "Error" : "错误", "Add a new template": "添加一个新的模板", "Template already exists": "模板已经存在", diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index df51c7f..027f003 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -87,10 +87,7 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "使用ONLYOFFICE生成文档预览(将占用磁盘空间)", "Keep metadata for each version once the document is edited (it will take up disk space)": "编辑文档后保留每个版本的元数据(它将占用磁盘空间)", "All history successfully deleted": "所有历史记录成功删除", - "Create": "创建", - "Select template" : "选择模板", "Invalid file provided" : "提供了无效文件", - "Empty": "空", "Error" : "错误", "Add a new template": "添加一个新的模板", "Template already exists": "模板已经存在", diff --git a/templates/templatePicker.html b/templates/templatePicker.html deleted file mode 100644 index 55f6b75..0000000 --- a/templates/templatePicker.html +++ /dev/null @@ -1,11 +0,0 @@ -
-
    -
  • - - -
  • -
-
\ No newline at end of file -- cgit v1.2.3 From 1c528099f494407df5491c98919d81cb765cc73e Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 6 May 2021 13:48:48 +0300 Subject: old creator in folder by shared link only --- js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 9ca89ed..77e6748 100644 --- a/js/main.js +++ b/js/main.js @@ -331,6 +331,7 @@ var initPage = function () { if ($("#isPublic").val() === "1" && !$("#filestable").length) { + //file by shared link var fileName = $("#filename").val(); var extension = getFileExtension(fileName); @@ -356,8 +357,12 @@ OCA.Onlyoffice.GetSettings(initSharedButton); } else { + if ($("#isPublic").val() === "1" && !!$("#filestable").length) { + //folder by shared link + OC.Plugins.register("OCA.Files.NewFileMenu", OCA.Onlyoffice.NewFileMenu); + } + OC.Plugins.register("OCA.Files.FileList", OCA.Onlyoffice.FileList); - OC.Plugins.register("OCA.Files.NewFileMenu", OCA.Onlyoffice.NewFileMenu); OCA.Onlyoffice.bindVersionClick(); } -- cgit v1.2.3 From bf0021cbc653efbb62b6508a817f00579a084ca9 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 7 May 2021 18:00:05 +0300 Subject: Revert "Revert "fix opening sharing tab"" works for new creation scheme This reverts commit 60cda3cb992937869c729df581d04d4202e58ab0. # Conflicts: # js/main.js --- js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index 77e6748..70e4d22 100644 --- a/js/main.js +++ b/js/main.js @@ -132,9 +132,9 @@ OCA.Onlyoffice.OpenShareDialog = function () { if (OCA.Onlyoffice.context) { - if (!$("#app-sidebar, #app-sidebar-vue").is(":visible")) { - OCA.Onlyoffice.context.fileList.showDetailsView(OCA.Onlyoffice.context.fileName, "sharing"); - OC.Apps.showAppSidebar(); + if (!$("#app-sidebar-vue").is(":visible")) { + OCA.Files.Sidebar.open(OCA.Onlyoffice.context.dir + "/" + OCA.Onlyoffice.context.fileName); + OCA.Files.Sidebar.setActiveTab("sharing"); } else { OCA.Files.Sidebar.close(); } -- cgit v1.2.3 From 5a7e6e8ad7a2c3fd03c187f3a4b5abf2cdbac1a0 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 7 May 2021 18:24:36 +0300 Subject: same tab as default new tab is blocked on new creation scheme --- lib/appconfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/appconfig.php b/lib/appconfig.php index 3d0d6f3..893a1fb 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -623,7 +623,7 @@ class AppConfig { * @return bool */ public function GetSameTab() { - return $this->config->getAppValue($this->appName, $this->_sameTab, "false") === "true"; + return $this->config->getAppValue($this->appName, $this->_sameTab, "true") === "true"; } /** -- cgit v1.2.3 From fc3e40548253561d3b094bfe9e0e1fef0bb14c6e Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 12 May 2021 10:50:35 +0300 Subject: new templates from 21 version only --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index b545ec0..3bba35a 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -29,7 +29,7 @@ https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png - + OCA\Onlyoffice\AdminSettings -- cgit v1.2.3 From 24ae2d23996f3a1e8cf7becc000a750e5295edcf Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 13 May 2021 10:52:06 +0300 Subject: 7.0.0 --- CHANGELOG.md | 7 +++++++ appinfo/info.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d11d9b..8e1a1ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 7.0.0 +## Added +- support for templates from Nextcloud v21 + +## Changed +- Nextcloud v19, v20 is no longer supported + ## 6.4.0 ## Added - create file from editor diff --git a/appinfo/info.xml b/appinfo/info.xml index 1ca9e51..fa1bdd0 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ 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. apache Ascensio System SIA - 6.4.0 + 7.0.0 Onlyoffice -- cgit v1.2.3 From 234e430e662703845e0c96142253bc57940a7a89 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 14 May 2021 15:51:04 +0300 Subject: 7.0.2 --- CHANGELOG.md | 4 ++++ appinfo/info.xml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af6bfd5..4b37a3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 7.0.2 +## Changed +- fixed registration of file actions + ## 6.4.2 ## Changed - fixed registration of file actions diff --git a/appinfo/info.xml b/appinfo/info.xml index fa1bdd0..b37a54b 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ 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. apache Ascensio System SIA - 7.0.0 + 7.0.2 Onlyoffice -- cgit v1.2.3 From f856081f68d59c52166d4cc4f153b1b9ac7e953c Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 21 May 2021 10:10:33 +0300 Subject: Fix opening editor on mobile ( Fix #474 ) --- lib/directeditor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/directeditor.php b/lib/directeditor.php index 87a7857..abea0c1 100644 --- a/lib/directeditor.php +++ b/lib/directeditor.php @@ -235,6 +235,7 @@ class DirectEditor implements IEditor { "shareToken" => null, "directToken" => $directToken, "version" => 0, + "isTemplate" => false, "inframe" => false ]; -- cgit v1.2.3 From b492a71008300eb342100935a1f0ca90bda58fd8 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 26 May 2021 12:59:26 +0300 Subject: create on template to editor --- controller/editorcontroller.php | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index cfba87b..47e3b88 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -184,6 +184,7 @@ class EditorController extends Controller { * * @param string $name - file name * @param string $dir - folder path + * @param string $templateId - file identifier * @param string $shareToken - access token * * @return array @@ -191,7 +192,7 @@ class EditorController extends Controller { * @NoAdminRequired * @PublicPage */ - public function create($name, $dir, $shareToken = null) { + public function create($name, $dir, $templateId = null, $shareToken = null) { $this->logger->debug("Create: $name", ["app" => $this->appName]); if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { @@ -235,7 +236,14 @@ class EditorController extends Controller { return ["error" => $this->trans->t("You don't have enough permission to create")]; } - $template = TemplateManager::GetEmptyTemplate($name); + if (empty($templateId)) { + $template = TemplateManager::GetEmptyTemplate($name); + } else { + $template = TemplateManager::GetTemplate($templateId); + if ($template) { + $template = $template->getContent(); + } + } if (!$template) { $this->logger->error("Template for file creation not found: $name", ["app" => $this->appName]); @@ -268,16 +276,17 @@ class EditorController extends Controller { * * @param string $name - file name * @param string $dir - folder path + * @param string $templateId - file identifier * * @return TemplateResponse|RedirectResponse * * @NoAdminRequired * @NoCSRFRequired */ - public function createNew($name, $dir) { + public function createNew($name, $dir, $templateId = null) { $this->logger->debug("Create from editor: $name in $dir", ["app" => $this->appName]); - $result = $this->create($name, $dir); + $result = $this->create($name, $dir, $templateId); if (isset($result["error"])) { return $this->renderError($result["error"]); } @@ -1020,6 +1029,22 @@ class EditorController extends Controller { $createUrl = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".editor.create_new", $createParam); $params["editorConfig"]["createUrl"] = urldecode($createUrl); + + $templatesList = TemplateManager::GetGlobalTemplates($file->getMimeType()); + if (!empty($templatesList)) { + $templates = []; + foreach($templatesList as $template) { + $createParam["templateId"] = $template->getId(); + + array_push($templates, [ + "image" => "", + "title" => $template->getName(), + "url" => urldecode($this->urlGenerator->linkToRouteAbsolute($this->appName . ".editor.create_new", $createParam)) + ]); + } + + $params["editorConfig"]["templates"] = $templates; + } } if ($folderLink !== null) { -- cgit v1.2.3 From 26697a203aed6b0b9cdf809137dfd878daee3507 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 27 May 2021 13:38:08 +0300 Subject: change message after conversion --- js/main.js | 2 +- l10n/ru.js | 3 ++- l10n/ru.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index 9920262..8d4820f 100644 --- a/js/main.js +++ b/js/main.js @@ -177,7 +177,7 @@ fileList.add(response, { animate: true }); } - OCP.Toast.success(t(OCA.Onlyoffice.AppName, "File created")); + OCP.Toast.success(t(OCA.Onlyoffice.AppName, "File has been converted. Its content might look differently.")); }); }; diff --git a/l10n/ru.js b/l10n/ru.js index 68795f5..bcf63ff 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Шаблон успешно добавлен", "Template successfully deleted": "Шаблон успешно удален", "Common templates": "Общие шаблоны", - "Failed to delete template": "Не удалось удалить шаблон" + "Failed to delete template": "Не удалось удалить шаблон", + "File has been converted. Its content might look differently.": "Файл сконвертирован. Содержание может отличаться" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/ru.json b/l10n/ru.json index 80ef70a..7360a43 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -98,6 +98,7 @@ "Template successfully added": "Шаблон успешно добавлен", "Template successfully deleted": "Шаблон успешно удален", "Common templates": "Общие шаблоны", - "Failed to delete template": "Не удалось удалить шаблон" + "Failed to delete template": "Не удалось удалить шаблон", + "File has been converted. Its content might look differently.": "Файл сконвертирован. Содержание может отличаться" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file -- cgit v1.2.3 From 18898faa8c4be5750fe371dc2cceb78b926063e7 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 2 Jun 2021 15:54:52 +0300 Subject: redirect from dashboard on desktop ( Fix #481 ) --- appinfo/application.php | 12 ++++++++++++ js/desktop.js | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/appinfo/application.php b/appinfo/application.php index 087eb2c..06bdf8b 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -21,6 +21,7 @@ namespace OCA\Onlyoffice\AppInfo; use OCP\AppFramework\App; use OCP\AppFramework\Http\ContentSecurityPolicy; +use OCP\Dashboard\RegisterWidgetEvent; use OCP\DirectEditing\RegisterDirectEditorEvent; use OCP\Files\IMimeTypeDetector; use OCP\Util; @@ -115,6 +116,17 @@ class Application extends App { } }); + if (class_exists(RegisterWidgetEvent::class)) { + $eventDispatcher->addListener(RegisterWidgetEvent::class, + function () { + if (!empty($this->appConfig->GetDocumentServerUrl()) + && $this->appConfig->SettingsAreSuccessful() + && $this->appConfig->isUserAllowedToUse()) { + Util::addScript("onlyoffice", "desktop"); + } + }); + } + require_once __DIR__ . "/../3rdparty/jwt/BeforeValidException.php"; require_once __DIR__ . "/../3rdparty/jwt/ExpiredException.php"; require_once __DIR__ . "/../3rdparty/jwt/SignatureInvalidException.php"; diff --git a/js/desktop.js b/js/desktop.js index 2c2f0da..f7ebc8c 100644 --- a/js/desktop.js +++ b/js/desktop.js @@ -25,6 +25,12 @@ } OCA.Onlyoffice.Desktop = true; + + if (location.href.indexOf(_oc_appswebroots.dashboard) !== -1) { + location.href = location.href.split(_oc_appswebroots.dashboard)[0] + _oc_appswebroots.files; + return; + } + $("html").addClass("AscDesktopEditor"); var domain = new RegExp("^http(s)?:\/\/[^\/]+").exec(location)[0]; -- cgit v1.2.3 From 54e1acfa72d3a559d195f7c7ef818906357ce3ec Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 2 Jun 2021 15:59:12 +0300 Subject: changelog 18898faa8c4be5750fe371dc2cceb78b926063e7 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 494a764..a878076 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## Changed +- redirect from dashboard on desktop + ## 6.4.2 ## Changed - fixed registration of file actions -- cgit v1.2.3 From 37e0fa8dc0e027b8c34e76ecf870ed3e782aed32 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 4 Jun 2021 13:08:15 +0300 Subject: check groups access to editor in version history --- controller/editorcontroller.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 2b6f4e5..f0f2f01 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -464,6 +464,10 @@ class EditorController extends Controller { public function history($fileId, $shareToken = null) { $this->logger->debug("Request history for: $fileId", ["app" => $this->appName]); + if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { + return ["error" => $this->trans->t("Not permitted")]; + } + $history = []; $user = $this->userSession->getUser(); @@ -581,6 +585,10 @@ class EditorController extends Controller { public function version($fileId, $version, $shareToken = null) { $this->logger->debug("Request version for: $fileId ($version)", ["app" => $this->appName]); + if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { + return ["error" => $this->trans->t("Not permitted")]; + } + $version = empty($version) ? null : $version; $user = $this->userSession->getUser(); -- cgit v1.2.3 From 2ac30137fae0e74223b9092e01355b422ecf2e9e Mon Sep 17 00:00:00 2001 From: svetlana maleeva Date: Mon, 7 Jun 2021 15:58:39 +0300 Subject: Added translations for message after conversion --- js/main.js | 2 +- l10n/bg.js | 3 ++- l10n/bg.json | 3 ++- l10n/de.js | 3 ++- l10n/de.json | 3 ++- l10n/de_DE.js | 3 ++- l10n/de_DE.json | 3 ++- l10n/es.js | 3 ++- l10n/es.json | 3 ++- l10n/fr.js | 3 ++- l10n/fr.json | 3 ++- l10n/it.js | 3 ++- l10n/it.json | 3 ++- l10n/ja.js | 3 ++- l10n/ja.json | 3 ++- l10n/pl.js | 3 ++- l10n/pl.json | 3 ++- l10n/pt_BR.js | 3 ++- l10n/pt_BR.json | 3 ++- l10n/ru.js | 2 +- l10n/ru.json | 2 +- l10n/sv.js | 3 ++- l10n/sv.json | 3 ++- l10n/zh_CN.js | 3 ++- l10n/zh_CN.json | 3 ++- 25 files changed, 47 insertions(+), 25 deletions(-) diff --git a/js/main.js b/js/main.js index 8d4820f..c92b771 100644 --- a/js/main.js +++ b/js/main.js @@ -177,7 +177,7 @@ fileList.add(response, { animate: true }); } - OCP.Toast.success(t(OCA.Onlyoffice.AppName, "File has been converted. Its content might look differently.")); + OCP.Toast.success(t(OCA.Onlyoffice.AppName, "File has been converted. Its content might look different.")); }); }; diff --git a/l10n/bg.js b/l10n/bg.js index 96675e0..fc0b6a8 100644 --- a/l10n/bg.js +++ b/l10n/bg.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Шаблонът е добавен успешно", "Template successfully deleted": "Шаблонът е изтрит успешно", "Common templates": "Често срещани шаблони", - "Failed to delete template": "Неуспешно изтриване на шаблон" + "Failed to delete template": "Неуспешно изтриване на шаблон", + "File has been converted. Its content might look different.": "Файлът бе преобразуван. Съдържанието му може да изглежда различно." }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/bg.json b/l10n/bg.json index 7c9df9d..28c4eb7 100644 --- a/l10n/bg.json +++ b/l10n/bg.json @@ -98,6 +98,7 @@ "Template successfully added": "Шаблонът е добавен успешно", "Template successfully deleted": "Шаблонът е изтрит успешно", "Common templates": "Често срещани шаблони", - "Failed to delete template": "Неуспешно изтриване на шаблон" + "Failed to delete template": "Неуспешно изтриване на шаблон", + "File has been converted. Its content might look different.": "Файлът бе преобразуван. Съдържанието му може да изглежда различно." },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/l10n/de.js b/l10n/de.js index 412349b..804225d 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Vorlage wurde erfolgreich hinzugefügt", "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", - "Failed to delete template": "Fehler beim Löschen einer Vorlage" + "Failed to delete template": "Fehler beim Löschen einer Vorlage", + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index f058bdf..7340de6 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -98,6 +98,7 @@ "Template successfully added": "Vorlage wurde erfolgreich hinzugefügt", "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", - "Failed to delete template": "Fehler beim Löschen einer Vorlage" + "Failed to delete template": "Fehler beim Löschen einer Vorlage", + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." },"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 42ec3fe..87e832f 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Vorlage wurde erfolgreich hinzugefügt", "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", - "Failed to delete template": "Fehler beim Löschen einer Vorlage" + "Failed to delete template": "Fehler beim Löschen einer Vorlage", + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 751102d..cb58722 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -98,6 +98,7 @@ "Template successfully added": "Vorlage wurde erfolgreich hinzugefügt", "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", - "Failed to delete template": "Fehler beim Löschen einer Vorlage" + "Failed to delete template": "Fehler beim Löschen einer Vorlage", + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/es.js b/l10n/es.js index ecc6213..7a36edb 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "La plantilla se agregó correctamente", "Template successfully deleted": "La plantilla se eliminó correctamente", "Common templates": "Plantillas comunes", - "Failed to delete template": "No se pudo eliminar la plantilla" + "Failed to delete template": "No se pudo eliminar la plantilla", + "File has been converted. Its content might look different.": "El archivo se ha convertido. Su contenido puede ser distinto." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 036db26..24cd75a 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -98,6 +98,7 @@ "Template successfully added": "La plantilla se agregó correctamente", "Template successfully deleted": "La plantilla se eliminó correctamente", "Common templates": "Plantillas comunes", - "Failed to delete template": "No se pudo eliminar la plantilla" + "Failed to delete template": "No se pudo eliminar la plantilla", + "File has been converted. Its content might look different.": "El archivo se ha convertido. Su contenido puede ser distinto." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index 79d8015..ad97e74 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Le modèle a été ajouté avec succès", "Template successfully deleted": "Le modèle a été supprimé avec succès", "Common templates": "Modèles communs", - "Failed to delete template": "Impossible de supprimer le modèle" + "Failed to delete template": "Impossible de supprimer le modèle", + "File has been converted. Its content might look different.": "Le fichier a été converti. Son contenu peut s'afficher différemment." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 70ec36a..fceb0fd 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -98,6 +98,7 @@ "Template successfully added": "Le modèle a été ajouté avec succès", "Template successfully deleted": "Le modèle a été supprimé avec succès", "Common templates": "Modèles communs", - "Failed to delete template": "Impossible de supprimer le modèle" + "Failed to delete template": "Impossible de supprimer le modèle", + "File has been converted. Its content might look different.": "Le fichier a été converti. Son contenu peut s'afficher différemment." },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index 1093e38..bc9a3a7 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Modello è stato aggiunto con successo", "Template successfully deleted": "Modello è stato cancellato con successo", "Common templates": "Modelli comuni", - "Failed to delete template": "Impossibile eliminare il modello" + "Failed to delete template": "Impossibile eliminare il modello", + "File has been converted. Its content might look different.": "Il file è stato convertito. Il suo contenuto potrebbe avere un aspetto diverso." }, "nplurals=2; plural=(n != 1);"); \ No newline at end of file diff --git a/l10n/it.json b/l10n/it.json index 8912857..5018c13 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -98,6 +98,7 @@ "Template successfully added": "Modello è stato aggiunto con successo", "Template successfully deleted": "Modello è stato cancellato con successo", "Common templates": "Modelli comuni", - "Failed to delete template": "Impossibile eliminare il modello" + "Failed to delete template": "Impossibile eliminare il modello", + "File has been converted. Its content might look different.": "Il file è stato convertito. Il suo contenuto potrebbe avere un aspetto diverso." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/ja.js b/l10n/ja.js index 8a53344..7917435 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "テンプレートが正常に追加されました", "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", - "Failed to delete template": "テンプレートの削除に失敗しました" + "Failed to delete template": "テンプレートの削除に失敗しました", + "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/ja.json b/l10n/ja.json index f55fcca..21aa267 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -98,6 +98,7 @@ "Template successfully added": "テンプレートが正常に追加されました", "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", - "Failed to delete template": "テンプレートの削除に失敗しました" + "Failed to delete template": "テンプレートの削除に失敗しました", + "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/pl.js b/l10n/pl.js index d3d40fc..3616182 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Szablon został pomyślnie dodany", "Template successfully deleted": "Szablon został pomyślnie usunięty", "Common templates": "Popularne szablony", - "Failed to delete template": "Nie udało się usunąć szablonu" + "Failed to delete template": "Nie udało się usunąć szablonu", + "File has been converted. Its content might look different.": "Plik został przekonwertowany. Jego zawartość może wyglądać inaczej." }, "nplurals=2; plural=(n != 1);"); \ No newline at end of file diff --git a/l10n/pl.json b/l10n/pl.json index 729c004..5e74393 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -98,6 +98,7 @@ "Template successfully added": "Szablon został pomyślnie dodany", "Template successfully deleted": "Szablon został pomyślnie usunięty", "Common templates": "Popularne szablony", - "Failed to delete template": "Nie udało się usunąć szablonu" + "Failed to delete template": "Nie udało się usunąć szablonu", + "File has been converted. Its content might look different.": "Plik został przekonwertowany. Jego zawartość może wyglądać inaczej." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index e5a032e..8731b08 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "Modelo adicionado com sucesso", "Template successfully deleted": "Modelo excluído com sucesso", "Common templates": "Modelos comuns", - "Failed to delete template": "Falha ao excluir modelo" + "Failed to delete template": "Falha ao excluir modelo", + "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 461df94..5ed1329 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -98,6 +98,7 @@ "Template successfully added": "Modelo adicionado com sucesso", "Template successfully deleted": "Modelo excluído com sucesso", "Common templates": "Modelos comuns", - "Failed to delete template": "Falha ao excluir modelo" + "Failed to delete template": "Falha ao excluir modelo", + "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente." },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/ru.js b/l10n/ru.js index bcf63ff..be1aa48 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -101,6 +101,6 @@ OC.L10N.register( "Template successfully deleted": "Шаблон успешно удален", "Common templates": "Общие шаблоны", "Failed to delete template": "Не удалось удалить шаблон", - "File has been converted. Its content might look differently.": "Файл сконвертирован. Содержание может отличаться" + "File has been converted. Its content might look different.": "Файл был сконвертирован. Его форматирование могло измениться." }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/ru.json b/l10n/ru.json index 7360a43..0a82ade 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -99,6 +99,6 @@ "Template successfully deleted": "Шаблон успешно удален", "Common templates": "Общие шаблоны", "Failed to delete template": "Не удалось удалить шаблон", - "File has been converted. Its content might look differently.": "Файл сконвертирован. Содержание может отличаться" + "File has been converted. Its content might look different.": "Файл был сконвертирован. Его форматирование могло измениться." },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/l10n/sv.js b/l10n/sv.js index 8ce9c93..a1b1321 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -99,6 +99,7 @@ OC.L10N.register( "Template successfully added": "Mallen lades till", "Template successfully deleted": "Mallen har tagits bort", "Common templates": "Delade mallar", - "Failed to delete template": "Det gick inte att ta bort mallen" + "Failed to delete template": "Det gick inte att ta bort mallen", + "File has been converted. Its content might look different.": "Filen har konverterats. Dess innehåll kan se annorlunda ut." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/sv.json b/l10n/sv.json index d34b4ef..1ea43f7 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -97,6 +97,7 @@ "Template successfully added": "Mallen lades till", "Template successfully deleted": "Mallen har tagits bort", "Common templates": "Delade mallar", - "Failed to delete template": "Det gick inte att ta bort mallen" + "Failed to delete template": "Det gick inte att ta bort mallen", + "File has been converted. Its content might look different.": "Filen har konverterats. Dess innehåll kan se annorlunda ut." },"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 e7df499..8a0bfd2 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -100,6 +100,7 @@ OC.L10N.register( "Template successfully added": "模板成功添加", "Template successfully deleted": "模板成功删除", "Common templates": "通用模板", - "Failed to delete template": "删除模板失败" + "Failed to delete template": "删除模板失败", + "File has been converted. Its content might look different.": "文件已被转换。其内容可能看起来有所不同。" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index df51c7f..913f1be 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -98,6 +98,7 @@ "Template successfully added": "模板成功添加", "Template successfully deleted": "模板成功删除", "Common templates": "通用模板", - "Failed to delete template": "删除模板失败" + "Failed to delete template": "删除模板失败", + "File has been converted. Its content might look different.": "文件已被转换。其内容可能看起来有所不同。" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file -- cgit v1.2.3 From a5e2fc0c3dbcd941dc163719c3693ab5442126b9 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 8 Jun 2021 09:32:01 +0300 Subject: sv --- l10n/sv.js | 1 + l10n/sv.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/l10n/sv.js b/l10n/sv.js index a1b1321..74b1012 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -78,6 +78,7 @@ OC.L10N.register( "Show watermark for read only link shares" : "Visa vattenmärke för skrivskyddade länkdelningar", "Show watermark on link shares with specific system tags" : "Visa vattenmärke för länkdelningar med specifika systemtaggar", "Select tag" : "Välj tagg", + "Select file to compare" : "Välj fil att jämföra", "Review mode for viewing": "Granskningsläge för visning", "Markup": "Markering", "Final": "Slutgiltig", diff --git a/l10n/sv.json b/l10n/sv.json index 1ea43f7..1b61674 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -76,6 +76,7 @@ "Show watermark for read only link shares" : "Visa vattenmärke för skrivskyddade länkdelningar", "Show watermark on link shares with specific system tags" : "Visa vattenmärke för länkdelningar med specifika systemtaggar", "Select tag" : "Välj tagg", + "Select file to compare" : "Välj fil att jämföra", "Review mode for viewing": "Granskningsläge för visning", "Markup": "Markering", "Final": "Slutgiltig", @@ -84,7 +85,7 @@ "Disable certificate verification (insecure)": "Använd inte certifikatsverifiering (osäkert)", "Keep intermediate versions when editing (forcesave)": "Behåll mellanliggande versioner vid redigering (tvinga att spara)", "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Använd ONLYOFFICE för att generera en förhandsgranskning av dokument (detta använder diskutrymme)", - "Keep metadata for each version once the document is edited (it will take up disk space)": "Behåll metadata för varje version när dokumentet redigeras (detta använder diskutrymme) ", + "Keep metadata for each version once the document is edited (it will take up disk space)": "Behåll metadata för varje version när dokumentet redigeras (detta använder diskutrymme) ", "All history successfully deleted": "All historik har tagits bort", "Create": "Skapa", "Select template" : "Välj mall", -- cgit v1.2.3 From 90e4c3012cedf0120a97101cf6da0367a9744ccf Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 17 Mar 2021 18:46:41 +0300 Subject: download as --- CHANGELOG.md | 3 ++ appinfo/routes.php | 1 + controller/editorcontroller.php | 57 ++++++++++++++++++++++++++++++++ css/main.css | 10 +++++- js/main.js | 72 +++++++++++++++++++++++++++++++++++++++++ l10n/ru.js | 6 +++- l10n/ru.json | 6 +++- lib/appconfig.php | 62 +++++++++++++++++------------------ templates/downloadPicker.html | 6 ++++ 9 files changed, 189 insertions(+), 34 deletions(-) create mode 100644 templates/downloadPicker.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b37a3c..8138765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## Added +- download as + ## 7.0.2 ## Changed - fixed registration of file actions diff --git a/appinfo/routes.php b/appinfo/routes.php index 9e2ee5d..b77e336 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -25,6 +25,7 @@ return [ ["name" => "template#preview", "url" => "/preview", "verb" => "GET"], ["name" => "editor#loader", "url" => "/loader", "verb" => "GET"], ["name" => "editor#create_new", "url" => "/new", "verb" => "GET"], + ["name" => "editor#download", "url" => "/downloadas", "verb" => "GET"], ["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"], ["name" => "editor#public_page", "url" => "/s/{shareToken}", "verb" => "GET"], ["name" => "editor#config", "url" => "/ajax/config/{fileId}", "verb" => "GET"], diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index cfba87b..b66eede 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -21,6 +21,7 @@ namespace OCA\Onlyoffice\Controller; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\ContentSecurityPolicy; +use OCP\AppFramework\Http\DataDownloadResponse; use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Template\PublicTemplateResponse; @@ -705,6 +706,62 @@ class EditorController extends Controller { return $result; } + /** + * Download method + * + * @param int $fileId - file identifier + * @param string $toExtension - file extension to download + * + * @return DataDownloadResponse|TemplateResponse + * + * @NoAdminRequired + * @NoCSRFRequired + */ + public function download($fileId, $toExtension = null) { + $this->logger->debug("Download: $fileId $toExtension", ["app" => $this->appName]); + + $user = $this->userSession->getUser(); + $userId = null; + if (!empty($user)) { + $userId = $user->getUID(); + } + + list ($file, $error, $share) = $this->getFile($userId, $fileId); + + if (isset($error)) { + $this->logger->error("Download: $fileId $error", ["app" => $this->appName]); + return $this->renderError($error); + } + + $fileName = $file->getName(); + $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); + + $newFileUri = null; + $documentService = new DocumentService($this->trans, $this->config); + $key = $this->fileUtility->getKey($file); + $fileUrl = $this->getUrl($file, $user); + try { + $newFileUri = $documentService->GetConvertedUri($fileUrl, $ext, $toExtension, $key); + } catch (\Exception $e) { + $this->logger->logException($e, ["message" => "GetConvertedUri: " . $file->getId(), "app" => $this->appName]); + return $this->renderError($e->getMessage()); + } + + try { + $newData = $documentService->Request($newFileUri); + } catch (\Exception $e) { + $this->logger->logException($e, ["message" => "Failed to download converted file", "app" => $this->appName]); + return $this->renderError($this->trans->t("Failed to download converted file")); + } + + $fileNameWithoutExt = substr($fileName, 0, strlen($fileName) - strlen($ext) - 1); + $newFileName = $fileNameWithoutExt . "." . $toExtension; + + $formats = $this->config->FormatsSetting(); + + return new DataDownloadResponse($newData, $newFileName, $formats[$toExtension]["mime"]); + } + /** * Print editor section * diff --git a/css/main.css b/css/main.css index cf41550..1b8e6fd 100644 --- a/css/main.css +++ b/css/main.css @@ -26,7 +26,8 @@ background-image: url("../img/new-pptx.svg"); } .icon-onlyoffice-open, -.icon-onlyoffice-convert { +.icon-onlyoffice-convert, +.icon-onlyoffice-download { background-image: url("../img/app-dark.svg"); } @@ -86,3 +87,10 @@ body.onlyoffice-inline #content #app-content { .AscDesktopEditor #body-user #gallery-button { display: none; } +.onlyoffice-download-container { + display: flex; +} +.onlyoffice-download-container p { + margin-right: 10px; + padding-top: 10px; +} diff --git a/js/main.js b/js/main.js index 750ce73..2eeebad 100644 --- a/js/main.js +++ b/js/main.js @@ -177,6 +177,67 @@ }); }; + OCA.Onlyoffice.DownloadClick = function (fileName, context) { + $.get(OC.filePath(OCA.Onlyoffice.AppName, "templates", "downloadPicker.html"), + function (tmpl) { + var dialog = $(tmpl).octemplate({ + dialog_name: "download-picker", + dialog_title: t("onlyoffice", "Download as") + }); + + $(dialog[0].querySelectorAll("p")).text(fileName + " " + t(OCA.Onlyoffice.AppName, "Convert into")); + + var extension = getFileExtension(fileName); + var selectNode = dialog[0].querySelectorAll("select")[0]; + var optionNodeOrigin = selectNode.querySelectorAll("option")[0]; + + $(optionNodeOrigin).attr("data-value", extension); + $(optionNodeOrigin).text(t(OCA.Onlyoffice.AppName, "Origin format")); + + dialog[0].dataset.format = extension; + selectNode.onclick = function() { + dialog[0].dataset.format = $("#onlyoffice-download-select option:selected").attr("data-value"); + } + + OCA.Onlyoffice.setting.formats[extension].saveas.forEach(ext => { + var optionNode = optionNodeOrigin.cloneNode(true); + + $(optionNode).attr("data-value", ext); + $(optionNode).text(ext); + + selectNode.append(optionNode); + }) + + $("body").append(dialog) + + $("#download-picker").ocdialog({ + closeOnEscape: true, + modal: true, + buttons: [{ + text: t("core", "Cancel"), + classes: "cancel", + click: function() { + $(this).ocdialog("close") + } + }, { + text: t("onlyoffice", "Download"), + classes: "primary", + click: function() { + var format = this.dataset.format; + var fileId = context.fileInfoModel.id; + var downloadLink = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/downloadas?fileId={fileId}&toExtension={toExtension}",{ + fileId: fileId, + toExtension: format + }); + + location.href = downloadLink; + $(this).ocdialog("close") + } + }] + }); + }); + } + OCA.Onlyoffice.GetSettings = function (callbackSettings) { if (OCA.Onlyoffice.setting.formats) { @@ -226,6 +287,17 @@ actionHandler: OCA.Onlyoffice.FileConvertClick }); } + + 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 + }); + } }); } diff --git a/l10n/ru.js b/l10n/ru.js index 9dd597a..1c89dd6 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -97,6 +97,10 @@ OC.L10N.register( "Template successfully added": "Шаблон успешно добавлен", "Template successfully deleted": "Шаблон успешно удален", "Common templates": "Общие шаблоны", - "Failed to delete template": "Не удалось удалить шаблон" + "Failed to delete template": "Не удалось удалить шаблон", + "Download as": "Скачать как", + "Download": "Скачать", + "Convert into": "Конвертировать в", + "Origin format": "Оригинальный формат" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/ru.json b/l10n/ru.json index 34ba97e..bd0b3f7 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -95,6 +95,10 @@ "Template successfully added": "Шаблон успешно добавлен", "Template successfully deleted": "Шаблон успешно удален", "Common templates": "Общие шаблоны", - "Failed to delete template": "Не удалось удалить шаблон" + "Failed to delete template": "Не удалось удалить шаблон", + "Download as": "Скачать как", + "Download": "Скачать", + "Convert into": "Конвертировать в", + "Origin format": "Оригинальный формат" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/lib/appconfig.php b/lib/appconfig.php index 893a1fb..e8d30c5 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -1080,39 +1080,39 @@ class AppConfig { * @var array */ private $formats = [ - "csv" => [ "mime" => "text/csv", "type" => "spreadsheet", "edit" => true, "editable" => true ], - "doc" => [ "mime" => "application/msword", "type" => "text", "conv" => true ], - "docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "text", "conv" => true ], - "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "text", "edit" => true, "def" => true ], - "dot" => [ "type" => "text", "conv" => true ], - "dotx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "type" => "text", "conv" => true ], - "epub" => [ "mime" => "application/epub+zip", "type" => "text", "conv" => true ], + "csv" => [ "mime" => "text/csv", "type" => "spreadsheet", "edit" => true, "editable" => true, "saveas" => ["ods", "pdf", "xlsx"] ], + "doc" => [ "mime" => "application/msword", "type" => "text", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ], + "docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "text", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ], + "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "text", "edit" => true, "def" => true, "saveas" => ["odt", "pdf", "rtf", "txt"] ], + "dot" => [ "type" => "text", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ], + "dotx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "type" => "text", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ], + "epub" => [ "mime" => "application/epub+zip", "type" => "text", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ], "htm" => [ "type" => "text", "conv" => true ], - "html" => [ "mime" => "text/html", "type" => "text", "conv" => true ], - "odp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true, "editable" => true ], - "ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true, "editable" => true ], - "odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true, "editable" => true ], - "otp" => [ "mime" => "application/vnd.oasis.opendocument.presentation-template", "type" => "presentation", "conv" => true ], - "ots" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet-template", "type" => "spreadsheet", "conv" => true ], - "ott" => [ "mime" => "application/vnd.oasis.opendocument.text-template", "type" => "text", "conv" => true ], + "html" => [ "mime" => "text/html", "type" => "text", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ], + "odp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true, "editable" => true, "saveas" => ["pdf", "pptx"] ], + "ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true, "editable" => true, "saveas" => ["csv", "pdf", "xlsx"] ], + "odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true, "editable" => true, "saveas" => ["docx", "pdf", "rtf", "txt"] ], + "otp" => [ "mime" => "application/vnd.oasis.opendocument.presentation-template", "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "ots" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet-template", "type" => "spreadsheet", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ], + "ott" => [ "mime" => "application/vnd.oasis.opendocument.text-template", "type" => "text", "conv" => true, "saveas" => ["docx", "odt", "pdf", "rtf", "txt"] ], "pdf" => [ "mime" => "application/pdf", "type" => "text" ], - "pot" => [ "type" => "presentation", "conv" => true ], - "potm" => [ "mime" => "application/vnd.ms-powerpoint.template.macroEnabled.12", "type" => "presentation", "conv" => true ], - "potx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.template", "type" => "presentation", "conv" => true ], - "pps" => [ "type" => "presentation", "conv" => true ], - "ppsm" => [ "mime" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", "type" => "presentation", "conv" => true ], - "ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "presentation", "conv" => true ], - "ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ], - "pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "presentation", "conv" => true ], - "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "presentation", "edit" => true, "def" => true ], - "rtf" => [ "mime" => "text/rtf", "type" => "text", "conv" => true, "editable" => true ], - "txt" => [ "mime" => "text/plain", "type" => "text", "edit" => true, "editable" => true ], - "xls" => [ "mime" => "application/vnd.ms-excel", "type" => "spreadsheet", "conv" => true ], - "xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], - "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "spreadsheet", "edit" => true, "def" => true ], - "xlt" => [ "type" => "spreadsheet", "conv" => true ], - "xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], - "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true ] + "pot" => [ "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "potm" => [ "mime" => "application/vnd.ms-powerpoint.template.macroEnabled.12", "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "potx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.template", "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "pps" => [ "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "ppsm" => [ "mime" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "presentation", "conv" => true, "saveas" => ["pdf", "pptx", "odp"] ], + "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "presentation", "edit" => true, "def" => true, "saveas" => ["pdf", "odp"] ], + "rtf" => [ "mime" => "text/rtf", "type" => "text", "conv" => true, "editable" => true, "saveas" => ["docx", "odt", "pdf", "txt"] ], + "txt" => [ "mime" => "text/plain", "type" => "text", "edit" => true, "editable" => true, "saveas" => ["docx", "odt", "pdf", "rtf"] ], + "xls" => [ "mime" => "application/vnd.ms-excel", "type" => "spreadsheet", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ], + "xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "spreadsheet", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ], + "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "spreadsheet", "edit" => true, "def" => true, "saveas" => ["csv", "ods", "pdf"] ], + "xlt" => [ "type" => "spreadsheet", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ], + "xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "spreadsheet", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ], + "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true, "saveas" => ["csv", "ods", "pdf", "xlsx"] ] ]; /** diff --git a/templates/downloadPicker.html b/templates/downloadPicker.html new file mode 100644 index 0000000..1cb0ce2 --- /dev/null +++ b/templates/downloadPicker.html @@ -0,0 +1,6 @@ +
+

+ +
-- cgit v1.2.3 From 68c187f57b6ad3f1c21cbca381f29fcebd28e2c9 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 8 Jun 2021 18:58:47 +0300 Subject: download without conversion --- controller/editorcontroller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index b66eede..2d057aa 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -735,6 +735,12 @@ class EditorController extends Controller { $fileName = $file->getName(); $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); + $toExtension = strtolower($toExtension); + + if ($toExtension === null + || $ext === $toExtension) { + return new DataDownloadResponse($file->getContent(), $fileName, $file->getMimeType()); + } $newFileUri = null; $documentService = new DocumentService($this->trans, $this->config); -- cgit v1.2.3 From 561f591c7755e787cb30932166a897f89a90b41b Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 8 Jun 2021 19:31:40 +0300 Subject: using template name on creation --- controller/editorcontroller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 47e3b88..e75d24c 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -1035,6 +1035,7 @@ class EditorController extends Controller { $templates = []; foreach($templatesList as $template) { $createParam["templateId"] = $template->getId(); + $createParam["name"] = $template->getName(); array_push($templates, [ "image" => "", -- cgit v1.2.3 From b37aee6355951239a1a61cf6e48844196ade8295 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 8 Jun 2021 19:33:17 +0300 Subject: template to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b37a3c..70c11c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## Added +- creation from a template from the editor + ## 7.0.2 ## Changed - fixed registration of file actions -- cgit v1.2.3 From 8401e121b2b9254e6d4c4339d0058e3632a6eab2 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 8 Jun 2021 22:02:17 +0300 Subject: check groups access --- controller/editorcontroller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 2d057aa..43dda72 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -720,6 +720,10 @@ class EditorController extends Controller { public function download($fileId, $toExtension = null) { $this->logger->debug("Download: $fileId $toExtension", ["app" => $this->appName]); + if (!$this->config->isUserAllowedToUse()) { + return $this->renderError($this->trans->t("Not permitted")); + } + $user = $this->userSession->getUser(); $userId = null; if (!empty($user)) { -- cgit v1.2.3 From 87d2aa68ac0028fa9c688daca68790103fd21a4a Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Tue, 6 Apr 2021 18:06:15 +0300 Subject: open with action link --- CHANGELOG.md | 1 + controller/editorcontroller.php | 19 ++++++++++++++++--- js/editor.js | 33 +++++++++++++++++++++++++++++++++ lib/directeditor.php | 3 ++- templates/editor.php | 1 + 5 files changed, 53 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10df188..0d51218 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Added - creation from a template from the editor - download as +- opening action link ## Changed - redirect from dashboard on desktop diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 9294275..ee7a7b3 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -798,13 +798,14 @@ class EditorController extends Controller { * @param integer $version - file version * @param bool $inframe - open in frame * @param bool $template - file is template + * @param string $anchor - anchor for file content * * @return TemplateResponse|RedirectResponse * * @NoAdminRequired * @NoCSRFRequired */ - public function index($fileId, $filePath = null, $shareToken = null, $version = 0, $inframe = false, $template = false) { + public function index($fileId, $filePath = null, $shareToken = null, $version = 0, $inframe = false, $template = false, $anchor = null) { $this->logger->debug("Open: $fileId ($version) $filePath ", ["app" => $this->appName]); $isLoggedIn = $this->userSession->isLoggedIn(); @@ -834,7 +835,8 @@ class EditorController extends Controller { "directToken" => null, "version" => $version, "isTemplate" => $template, - "inframe" => false + "inframe" => false, + "anchor" => $anchor ]; $response = null; @@ -911,13 +913,14 @@ class EditorController extends Controller { * @param bool $desktop - desktop label * @param string $guestName - nickname not logged user * @param bool $template - file is template + * @param string $anchor - anchor for file content * * @return array * * @NoAdminRequired * @PublicPage */ - public function config($fileId, $filePath = null, $shareToken = null, $directToken = null, $version = 0, $inframe = false, $desktop = false, $guestName = null, $template = false) { + public function config($fileId, $filePath = null, $shareToken = null, $directToken = null, $version = 0, $inframe = false, $desktop = false, $guestName = null, $template = false, $anchor = null) { if (!empty($directToken)) { list ($directData, $error) = $this->crypt->ReadHash($directToken); @@ -1151,6 +1154,16 @@ class EditorController extends Controller { $params["editorConfig"]["tenant"] = $this->config->GetSystemValue("instanceid", true); } + if ($anchor !== null) { + try { + $actionLink = json_decode($anchor, true); + + $params["editorConfig"]["actionLink"] = $actionLink; + } catch (\Exception $e) { + $this->logger->logException($e, ["message" => "Config: $fileId decode $anchor", "app" => $this->appName]); + } + } + if (!empty($this->config->GetDocumentServerSecret())) { $token = \Firebase\JWT\JWT::encode($params, $this->config->GetDocumentServerSecret()); $params["token"] = $token; diff --git a/js/editor.js b/js/editor.js index 4729fa0..01c3bde 100644 --- a/js/editor.js +++ b/js/editor.js @@ -40,6 +40,7 @@ OCA.Onlyoffice.template = $("#iframeEditor").data("template"); OCA.Onlyoffice.inframe = !!$("#iframeEditor").data("inframe"); OCA.Onlyoffice.filePath = $("#iframeEditor").data("path"); + OCA.Onlyoffice.anchor = $("#iframeEditor").attr("data-anchor"); var guestName = localStorage.getItem("nick"); if (!OCA.Onlyoffice.fileId && !OCA.Onlyoffice.shareToken && !directToken) { displayError(t(OCA.Onlyoffice.AppName, "FileId is empty")); @@ -77,6 +78,9 @@ if (guestName) { params.push("guestName=" + encodeURIComponent(guestName)); } + if (OCA.Onlyoffice.anchor) { + params.push("anchor=" + encodeURIComponent(OCA.Onlyoffice.anchor)); + } if (OCA.Onlyoffice.inframe || directToken) { params.push("inframe=true"); @@ -131,6 +135,7 @@ "onRequestHistory": OCA.Onlyoffice.onRequestHistory, "onRequestHistoryData": OCA.Onlyoffice.onRequestHistoryData, "onDocumentReady": OCA.Onlyoffice.onDocumentReady, + "onMakeActionLink": OCA.Onlyoffice.onMakeActionLink, }; if (!OCA.Onlyoffice.version) { @@ -420,6 +425,34 @@ }); }; + OCA.Onlyoffice.onMakeActionLink = function (event) { + var url = location.href; + if (event && event.data) { + var indexAnchor = url.indexOf("#"); + if (indexAnchor != -1) { + url = url.substring(0, indexAnchor); + } + + var data = JSON.stringify(event.data); + data = "anchor=" + encodeURIComponent(data); + + var inframeRegex = /inframe=([^&]*&?)/g; + if (inframeRegex.test(url)) { + url = url.replace(inframeRegex, data); + } + + var anchorRegex = /anchor=([^&]*)/g; + if (anchorRegex.test(url)) { + url = url.replace(anchorRegex, data); + } else { + url += (url.indexOf("?") == -1) ? "?" : "&"; + url += data; + } + } + + OCA.Onlyoffice.docEditor.setActionLink(url); + }; + OCA.Onlyoffice.InitEditor(); })(jQuery, OCA); diff --git a/lib/directeditor.php b/lib/directeditor.php index abea0c1..f7f694c 100644 --- a/lib/directeditor.php +++ b/lib/directeditor.php @@ -236,7 +236,8 @@ class DirectEditor implements IEditor { "directToken" => $directToken, "version" => 0, "isTemplate" => false, - "inframe" => false + "inframe" => false, + "anchor" => null ]; $response = new TemplateResponse($this->appName, "editor", $params, "base"); diff --git a/templates/editor.php b/templates/editor.php index e904b97..acf4e51 100644 --- a/templates/editor.php +++ b/templates/editor.php @@ -34,6 +34,7 @@ data-directtoken="" data-version="" data-template="" + data-anchor="" data-inframe=""> -- cgit v1.2.3 From 4f75b751f2fa0d12239649d8ea4bcb95202083da Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 9 Jun 2021 13:43:34 +0300 Subject: filepicker as modal --- js/editor.js | 20 ++++++++++++++++---- js/listener.js | 11 +++++++---- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/js/editor.js b/js/editor.js index 4729fa0..383d1ce 100644 --- a/js/editor.js +++ b/js/editor.js @@ -276,7 +276,7 @@ }, false, "httpd/unix-directory", - false, + true, OC.dialogs.FILEPICKER_TYPE_CHOOSE, currentDir); } @@ -314,7 +314,11 @@ }, "*"); } else { - OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Insert image"), OCA.Onlyoffice.editorInsertImage, false, imageMimes); + OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Insert image"), + OCA.Onlyoffice.editorInsertImage, + false, + imageMimes, + true); } }; @@ -349,7 +353,11 @@ }, "*"); } else { - OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select recipients"), OCA.Onlyoffice.editorSetRecipient, false, recipientMimes); + OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select recipients"), + OCA.Onlyoffice.editorSetRecipient, + false, + recipientMimes, + true); } }; @@ -401,7 +409,11 @@ }, "*"); } else { - OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select file to compare"), OCA.Onlyoffice.editorSetRevised, false, revisedMimes); + OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select file to compare"), + OCA.Onlyoffice.editorSetRevised, + false, + revisedMimes, + true); } }; diff --git a/js/listener.js b/js/listener.js index a88c626..3f4bdb3 100644 --- a/js/listener.js +++ b/js/listener.js @@ -50,7 +50,7 @@ }, false, "httpd/unix-directory", - false, + true, OC.dialogs.FILEPICKER_TYPE_CHOOSE, currentDir); }; @@ -59,21 +59,24 @@ OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Insert image"), $(OCA.Onlyoffice.frameSelector)[0].contentWindow.OCA.Onlyoffice.editorInsertImage, false, - imageMimes); + imageMimes, + true); }; OCA.Onlyoffice.onRequestMailMergeRecipients = function (recipientMimes) { OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select recipients"), $(OCA.Onlyoffice.frameSelector)[0].contentWindow.OCA.Onlyoffice.editorSetRecipient, false, - recipientMimes); + recipientMimes, + true); }; OCA.Onlyoffice.onRequestCompareFile = function (revisedMimes) { OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select file to compare"), $(OCA.Onlyoffice.frameSelector)[0].contentWindow.OCA.Onlyoffice.editorSetRevised, false, - revisedMimes); + revisedMimes, + true); }; OCA.Onlyoffice.onDocumentReady = function (documentType) { -- cgit v1.2.3 From a1128394010f03daa852fd3a774b2113b7424301 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 9 Jun 2021 14:18:55 +0300 Subject: preview template when click on title --- js/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/settings.js b/js/settings.js index bfbccbd..50dc47f 100644 --- a/js/settings.js +++ b/js/settings.js @@ -351,7 +351,7 @@ }); }); - $(document).on("click", ".onlyoffice-template-preview", function (event) { + $(document).on("click", ".onlyoffice-template-item p", function (event) { var item = $(event.target).parents(".onlyoffice-template-item"); var templateId = $(item).attr("data-id"); -- cgit v1.2.3 From 0ab0757887161999dd40fbb68374395ef3c70846 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 9 Jun 2021 18:26:29 +0300 Subject: download template --- CHANGELOG.md | 1 + controller/editorcontroller.php | 36 ++++++++++++++++++++++++------------ css/template.css | 9 +++++---- js/settings.js | 12 ++++++++++++ templates/settings.php | 2 +- templates/templateItem.html | 2 +- 6 files changed, 44 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10df188..28e3e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Added - creation from a template from the editor - download as +- downloading a template from settings ## Changed - redirect from dashboard on desktop diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 9294275..9936290 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -728,30 +728,41 @@ class EditorController extends Controller { * * @param int $fileId - file identifier * @param string $toExtension - file extension to download + * @param bool $template - file extension to download * * @return DataDownloadResponse|TemplateResponse * * @NoAdminRequired * @NoCSRFRequired */ - public function download($fileId, $toExtension = null) { + public function download($fileId, $toExtension = null, $template = false) { $this->logger->debug("Download: $fileId $toExtension", ["app" => $this->appName]); if (!$this->config->isUserAllowedToUse()) { return $this->renderError($this->trans->t("Not permitted")); } - $user = $this->userSession->getUser(); - $userId = null; - if (!empty($user)) { - $userId = $user->getUID(); - } - - list ($file, $error, $share) = $this->getFile($userId, $fileId); + if ($template) { + $template = TemplateManager::GetTemplate($fileId); + if (empty($template)) { + $this->logger->info("Download: template not found: $fileId", ["app" => $this->appName]); + return $this->renderError($this->trans->t("File not found")); + } - if (isset($error)) { - $this->logger->error("Download: $fileId $error", ["app" => $this->appName]); - return $this->renderError($error); + $file = $template; + } else { + $user = $this->userSession->getUser(); + $userId = null; + if (!empty($user)) { + $userId = $user->getUID(); + } + + list ($file, $error, $share) = $this->getFile($userId, $fileId); + + if (isset($error)) { + $this->logger->error("Download: $fileId $error", ["app" => $this->appName]); + return $this->renderError($error); + } } $fileName = $file->getName(); @@ -759,7 +770,8 @@ class EditorController extends Controller { $toExtension = strtolower($toExtension); if ($toExtension === null - || $ext === $toExtension) { + || $ext === $toExtension + || $template) { return new DataDownloadResponse($file->getContent(), $fileName, $file->getMimeType()); } diff --git a/css/template.css b/css/template.css index d86bab2..c1a9e05 100644 --- a/css/template.css +++ b/css/template.css @@ -29,23 +29,24 @@ } .onlyoffice-template-item img, .onlyoffice-template-delete, -.onlyoffice-template-preview, +.onlyoffice-template-download, .onlyoffice-template-item p { display: inline-block; margin-right: 10px; cursor: pointer; } .onlyoffice-template-delete, -.onlyoffice-template-preview { +.onlyoffice-template-download { margin-bottom: -4px; } .onlyoffice-template-delete { opacity: .6; } -.onlyoffice-template-preview { - background-image: url("../../../core/img/actions/toggle.svg"); +.onlyoffice-template-download { + background-image: url("../../../core/img/actions/download.svg"); height: 16px; width: 16px; + opacity: .6; } .onlyoffice-template-item img { float: left; diff --git a/js/settings.js b/js/settings.js index 50dc47f..78fb3c2 100644 --- a/js/settings.js +++ b/js/settings.js @@ -363,6 +363,18 @@ window.open(url); }); + + $(document).on("click", ".onlyoffice-template-download", function (event) { + var item = $(event.target).parents(".onlyoffice-template-item"); + var templateId = $(item).attr("data-id"); + + var downloadLink = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/downloadas?fileId={fileId}&template={template}",{ + fileId: templateId, + template: "true" + }); + + location.href = downloadLink; + }); }); })(jQuery, OC); diff --git a/templates/settings.php b/templates/settings.php index 9a5ec14..82c8921 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -242,7 +242,7 @@
  • class="onlyoffice-template-item" > .svg" />

    - +
  • diff --git a/templates/templateItem.html b/templates/templateItem.html index edeb9a8..1e39ea9 100644 --- a/templates/templateItem.html +++ b/templates/templateItem.html @@ -1,6 +1,6 @@
  • - +
  • \ No newline at end of file -- cgit v1.2.3 From bc7925d9279ab391038bfa536e33d7b126183c49 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 10 Jun 2021 09:46:58 +0300 Subject: rename params --- controller/editorcontroller.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 9936290..4a639be 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -240,9 +240,9 @@ class EditorController extends Controller { if (empty($templateId)) { $template = TemplateManager::GetEmptyTemplate($name); } else { - $template = TemplateManager::GetTemplate($templateId); - if ($template) { - $template = $template->getContent(); + $templateFile = TemplateManager::GetTemplate($templateId); + if ($templateFile) { + $template = $templateFile->getContent(); } } @@ -743,22 +743,22 @@ class EditorController extends Controller { } if ($template) { - $template = TemplateManager::GetTemplate($fileId); - if (empty($template)) { + $templateFile = TemplateManager::GetTemplate($fileId); + if (empty($templateFile)) { $this->logger->info("Download: template not found: $fileId", ["app" => $this->appName]); return $this->renderError($this->trans->t("File not found")); } - $file = $template; + $file = $templateFile; } else { $user = $this->userSession->getUser(); $userId = null; if (!empty($user)) { $userId = $user->getUID(); } - + list ($file, $error, $share) = $this->getFile($userId, $fileId); - + if (isset($error)) { $this->logger->error("Download: $fileId $error", ["app" => $this->appName]); return $this->renderError($error); -- cgit v1.2.3 From d32f43f94eba5a2d73932a6a46f321a61110b8ce Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 25 Mar 2021 14:29:57 +0300 Subject: get users for mention --- appinfo/routes.php | 1 + controller/editorcontroller.php | 28 ++++++++++++++++++++++++++++ js/editor.js | 10 ++++++++++ 3 files changed, 39 insertions(+) diff --git a/appinfo/routes.php b/appinfo/routes.php index b77e336..01fcb3d 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -28,6 +28,7 @@ return [ ["name" => "editor#download", "url" => "/downloadas", "verb" => "GET"], ["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"], ["name" => "editor#public_page", "url" => "/s/{shareToken}", "verb" => "GET"], + ["name" => "editor#users", "url" => "/ajax/users", "verb" => "GET"], ["name" => "editor#config", "url" => "/ajax/config/{fileId}", "verb" => "GET"], ["name" => "editor#create", "url" => "/ajax/new", "verb" => "POST"], ["name" => "editor#convert", "url" => "/ajax/convert", "verb" => "POST"], diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 623e0b5..745cc8b 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -296,6 +296,34 @@ class EditorController extends Controller { return new RedirectResponse($openEditor); } + /** + * Get users + * + * @return array + * + * @NoAdminRequired + * @NoCSRFRequired + */ + public function users() { + $this->logger->debug("Search users", ["app" => $this->appName]); + $result = []; + + $userId = $this->userSession->getUser()->getUID(); + $users = $this->userManager->search(""); + foreach ($users as $user) { + $email = $user->getEMailAddress(); + if ($user->getUID() != $userId + && !empty($email)) { + array_push($result, [ + "email" => $email, + "name" => $user->getDisplayName() + ]); + } + } + + return $result; + } + /** * Conversion file to Office Open XML format * diff --git a/js/editor.js b/js/editor.js index 53ea1a1..f891369 100644 --- a/js/editor.js +++ b/js/editor.js @@ -136,6 +136,7 @@ "onRequestHistoryData": OCA.Onlyoffice.onRequestHistoryData, "onDocumentReady": OCA.Onlyoffice.onDocumentReady, "onMakeActionLink": OCA.Onlyoffice.onMakeActionLink, + "onRequestUsers": OCA.Onlyoffice.onRequestUsers, }; if (!OCA.Onlyoffice.version) { @@ -465,6 +466,15 @@ OCA.Onlyoffice.docEditor.setActionLink(url); }; + OCA.Onlyoffice.onRequestUsers = function (event) { + $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/users"), + function onSuccess(response) { + OCA.Onlyoffice.docEditor.setUsers({ + "users": response + }); + }); + }; + OCA.Onlyoffice.InitEditor(); })(jQuery, OCA); -- cgit v1.2.3 From 55070698bb095439e1baf8230b2ead46006bdb91 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Tue, 6 Apr 2021 15:02:56 +0300 Subject: send notify about mention --- appinfo/application.php | 7 ++ appinfo/routes.php | 1 + controller/editorcontroller.php | 64 +++++++++++++++++ js/editor.js | 25 +++++++ l10n/ru.js | 6 +- l10n/ru.json | 6 +- lib/notifier.php | 152 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 259 insertions(+), 2 deletions(-) create mode 100644 lib/notifier.php diff --git a/appinfo/application.php b/appinfo/application.php index c97d8b1..bbbeec8 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -33,6 +33,7 @@ use OCP\Files\Template\ITemplateManager; use OCP\Files\Template\TemplateFileCreator; use OCP\IL10N; use OCP\IPreview; +use OCP\Notification\IManager; use OCP\Util; use OCA\Viewer\Event\LoadViewer; @@ -45,6 +46,7 @@ use OCA\Onlyoffice\Controller\TemplateController; use OCA\Onlyoffice\Crypt; use OCA\Onlyoffice\DirectEditor; use OCA\Onlyoffice\Hooks; +use OCA\Onlyoffice\Notifier; use OCA\Onlyoffice\Preview; use OCA\Onlyoffice\TemplateManager; use OCA\Onlyoffice\TemplateProvider; @@ -264,6 +266,11 @@ class Application extends App implements IBootstrap { $event->register($editor); } }); + + }); + + $context->injectFn(function (IManager $notificationsManager) { + $notificationsManager->registerNotifierService(Notifier::class); }); $context->injectFn(function(ITemplateManager $templateManager, IL10N $trans, $appName) { diff --git a/appinfo/routes.php b/appinfo/routes.php index 01fcb3d..e50cee5 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -29,6 +29,7 @@ return [ ["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"], ["name" => "editor#public_page", "url" => "/s/{shareToken}", "verb" => "GET"], ["name" => "editor#users", "url" => "/ajax/users", "verb" => "GET"], + ["name" => "editor#mention", "url" => "/ajax/mention", "verb" => "POST"], ["name" => "editor#config", "url" => "/ajax/config/{fileId}", "verb" => "GET"], ["name" => "editor#create", "url" => "/ajax/new", "verb" => "POST"], ["name" => "editor#convert", "url" => "/ajax/convert", "verb" => "POST"], diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 745cc8b..1c60712 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -324,6 +324,70 @@ class EditorController extends Controller { return $result; } + /** + * Send notify about mention + * + * @param int $fileId - file identifier + * @param string $anchor - the anchor on target content + * @param string $comment - comment + * @param array $emails - emails array to whom to send notify + * + * @return array + * + * @NoAdminRequired + * @NoCSRFRequired + */ + public function mention($fileId, $anchor, $comment, $emails) { + $this->logger->debug("mention: from $fileId to " . json_encode($emails), ["app" => $this->appName]); + + if (empty($emails)) { + return ["error" => $this->trans->t("Failed to send notification")]; + } + + $recipientIds = []; + foreach ($emails as $email) { + $recipients = $this->userManager->getByEmail($email); + foreach ($recipients as $recipient) { + $recipientId = $recipient->getUID(); + if (!in_array($recipientId, $recipientIds)) { + array_push($recipientIds, $recipientId); + } + } + } + + $user = $this->userSession->getUser(); + $userId = null; + if (!empty($user)) { + $userId = $user->getUID(); + } + + list ($file, $error, $share) = $this->getFile($userId, $fileId); + if (isset($error)) { + $this->logger->error("Mention: $fileId $error", ["app" => $this->appName]); + return ["error" => $this->trans->t("Failed to send notification")]; + } + + $notificationManager = \OC::$server->getNotificationManager(); + $notification = $notificationManager->createNotification(); + $notification->setApp($this->appName) + ->setDateTime(new \DateTime()) + ->setObject("mention", $comment) + ->setSubject("mention_info", [ + "notifierId" => $userId, + "fileId" => $file->getId(), + "fileName" => $file->getName(), + "anchor" => $anchor + ]); + + foreach ($recipientIds as $recipientId) { + $notification->setUser($recipientId); + + $notificationManager->notify($notification); + } + + return ["message" => $this->trans->t("Notification sent successfully")]; + } + /** * Conversion file to Office Open XML format * diff --git a/js/editor.js b/js/editor.js index f891369..89bbbb2 100644 --- a/js/editor.js +++ b/js/editor.js @@ -137,6 +137,7 @@ "onDocumentReady": OCA.Onlyoffice.onDocumentReady, "onMakeActionLink": OCA.Onlyoffice.onMakeActionLink, "onRequestUsers": OCA.Onlyoffice.onRequestUsers, + "onRequestSendNotify": OCA.Onlyoffice.onRequestSendNotify, }; if (!OCA.Onlyoffice.version) { @@ -475,6 +476,30 @@ }); }; + OCA.Onlyoffice.onRequestSendNotify = function (event) { + var actionLink = event.data.actionLink; + var comment = event.data.message; + var emails = event.data.emails; + + var fileId = OCA.Onlyoffice.fileId; + + $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/mention"), + { + fileId: fileId, + anchor: JSON.stringify(actionLink), + comment: comment, + emails: emails + }, + function onSuccess(response) { + if (response.error) { + OCP.Toast.error(response.error); + return; + } + + OCP.Toast.success(response.message); + }); + }; + OCA.Onlyoffice.InitEditor(); })(jQuery, OCA); diff --git a/l10n/ru.js b/l10n/ru.js index 999f7f9..eac6145 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -102,6 +102,10 @@ OC.L10N.register( "Download as": "Скачать как", "Download": "Скачать", "Convert into": "Конвертировать в", - "Origin format": "Оригинальный формат" + "Origin format": "Оригинальный формат", + "Failed to send notification": "Ошибка отправки оповещения", + "Notification sent successfully": "Оповещение успешно отправлено", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s упоминул в %2\$s: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} упоминул в {file}: \"%1\$s\"." }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/ru.json b/l10n/ru.json index 73d4d8e..fe4e904 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -100,6 +100,10 @@ "Download as": "Скачать как", "Download": "Скачать", "Convert into": "Конвертировать в", - "Origin format": "Оригинальный формат" + "Origin format": "Оригинальный формат", + "Failed to send notification": "Ошибка отправки оповещения", + "Notification sent successfully": "Оповещение успешно отправлено", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s упоминул в %2$s: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} упоминул в {file}: \"%1$s\"." },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/lib/notifier.php b/lib/notifier.php new file mode 100644 index 0000000..1b52fe3 --- /dev/null +++ b/lib/notifier.php @@ -0,0 +1,152 @@ +appName = $appName; + $this->l10nFactory = $l10nFactory; + $this->urlGenerator = $urlGenerator; + $this->logger = $logger; + $this->userManager = $userManager; + } + + /** + * Identifier of the notifier, only use [a-z0-9_] + * + * @return string + */ + public function getID(): string { + return $this->appName; + } + + /** + * Human readable name describing the notifier + * + * @return string + */ + public function getName(): string { + return $this->appName; + } + + /** + * @param INotification $notification - notification object + * @param string $languageCode - the code of the language that should be used to prepare the notification + * + * @return INotification + */ + public function prepare(INotification $notification, string $languageCode): INotification { + if ($notification->getApp() !== $this->appName) { + throw new \InvalidArgumentException("Notification not from " . $this->appName); + } + + $parameters = $notification->getSubjectParameters(); + + $notifierId = $parameters["notifierId"]; + $fileId = $parameters["fileId"]; + $fileName = $parameters["fileName"]; + $anchor = $parameters["anchor"]; + + $this->logger->info("Notify prepare: from $notifierId about $fileId ", ["app" => $this->appName]); + + $notifier = $this->userManager->get($notifierId); + $notifierName = $notifier->getDisplayName(); + $trans = $this->l10nFactory->get($this->appName, $languageCode); + + $notification->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath($this->appName, "app-dark.svg"))) + ->setParsedSubject($trans->t("%1\$s mentioned in the %2\$s: \"%3\$s\".", [$notifierName, $fileName, $notification->getObjectId()])) + ->setRichSubject($trans->t("{notifier} mentioned in the {file}: \"%1\$s\".", [$notification->getObjectId()]), [ + "notifier" => [ + "type" => "user", + "id" => $notifierId, + "name" => $notifierName + ], + "file" => [ + "type" => "highlight", + "id" => $fileId, + "name" => $fileName + ] + ]); + + $editorLink = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".editor.index", [ + "fileId" => $fileId, + "anchor" => $anchor + ]); + + $notification->setLink($editorLink); + + return $notification; + } +} \ No newline at end of file -- cgit v1.2.3 From c8ad76d12987339711b8d53f96a17330bc846a7e Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 7 Apr 2021 10:56:48 +0300 Subject: notifications not for public --- js/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/editor.js b/js/editor.js index 89bbbb2..374454e 100644 --- a/js/editor.js +++ b/js/editor.js @@ -136,8 +136,6 @@ "onRequestHistoryData": OCA.Onlyoffice.onRequestHistoryData, "onDocumentReady": OCA.Onlyoffice.onDocumentReady, "onMakeActionLink": OCA.Onlyoffice.onMakeActionLink, - "onRequestUsers": OCA.Onlyoffice.onRequestUsers, - "onRequestSendNotify": OCA.Onlyoffice.onRequestSendNotify, }; if (!OCA.Onlyoffice.version) { @@ -156,6 +154,8 @@ config.events.onRequestInsertImage = OCA.Onlyoffice.onRequestInsertImage; config.events.onRequestMailMergeRecipients = OCA.Onlyoffice.onRequestMailMergeRecipients; config.events.onRequestCompareFile = OCA.Onlyoffice.onRequestCompareFile; + config.events.onRequestUsers = OCA.Onlyoffice.onRequestUsers; + config.events.onRequestSendNotify = OCA.Onlyoffice.onRequestSendNotify; } if (OCA.Onlyoffice.directEditor || OCA.Onlyoffice.inframe) { -- cgit v1.2.3 From 6c5922d48a4158b775c7bee6ae7ecced8806054e Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 14 Apr 2021 11:45:31 +0300 Subject: add share when notify --- controller/editorcontroller.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 1c60712..5121327 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -40,6 +40,7 @@ use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; use OCP\Share\IManager; +use OCP\Share\IShare; use OCA\Files\Helper; use OCA\Files_Versions\Versions\IVersionManager; @@ -126,6 +127,13 @@ class EditorController extends Controller { */ private $versionManager; + /** + * Share manager + * + * @var IManager + */ + private $shareManager; + /** * Mobile regex from https://github.com/ONLYOFFICE/CommunityServer/blob/v9.1.1/web/studio/ASC.Web.Studio/web.appsettings.config#L35 */ @@ -168,6 +176,7 @@ class EditorController extends Controller { $this->logger = $logger; $this->config = $config; $this->crypt = $crypt; + $this->shareManager = $shareManager; if (\OC::$server->getAppManager()->isInstalled("files_versions")) { try { @@ -379,7 +388,21 @@ class EditorController extends Controller { "anchor" => $anchor ]); + $accessList = $this->shareManager->getAccessList($file); + foreach ($recipientIds as $recipientId) { + if (!in_array($recipientId, $accessList["users"])) { + $share = $this->shareManager->newShare(); + $share->setNode($file) + ->setShareType(IShare::TYPE_USER) + ->setSharedBy($userId) + ->setSharedWith($recipientId) + ->setShareOwner($userId) + ->setPermissions(Constants::PERMISSION_READ); + + $this->shareManager->createShare($share); + } + $notification->setUser($recipientId); $notificationManager->notify($notification); -- cgit v1.2.3 From 15de5fe2c68aa734118fa144371b2b75b0f74060 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 9 Jun 2021 12:46:34 +0300 Subject: check group on mentions --- controller/editorcontroller.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 5121327..f71c711 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -317,6 +317,10 @@ class EditorController extends Controller { $this->logger->debug("Search users", ["app" => $this->appName]); $result = []; + if (!$this->config->isUserAllowedToUse()) { + return $result; + } + $userId = $this->userSession->getUser()->getUID(); $users = $this->userManager->search(""); foreach ($users as $user) { @@ -349,6 +353,10 @@ class EditorController extends Controller { public function mention($fileId, $anchor, $comment, $emails) { $this->logger->debug("mention: from $fileId to " . json_encode($emails), ["app" => $this->appName]); + if (!$this->config->isUserAllowedToUse()) { + return ["error" => $this->trans->t("Not permitted")]; + } + if (empty($emails)) { return ["error" => $this->trans->t("Failed to send notification")]; } -- cgit v1.2.3 From 6e4a4e66fb9b5fab9249ae8f452c4af2537777a1 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Mon, 31 May 2021 18:31:40 +0300 Subject: favorite to config --- appinfo/application.php | 4 +++- controller/editorcontroller.php | 32 +++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/appinfo/application.php b/appinfo/application.php index c97d8b1..94207e3 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -33,6 +33,7 @@ use OCP\Files\Template\ITemplateManager; use OCP\Files\Template\TemplateFileCreator; use OCP\IL10N; use OCP\IPreview; +use OCP\ITagManager; use OCP\Util; use OCA\Viewer\Event\LoadViewer; @@ -143,7 +144,8 @@ class Application extends App implements IBootstrap { $this->appConfig, $this->crypt, $c->get("IManager"), - $c->get("Session") + $c->get("Session"), + $c->get(ITagManager::class) ); }); diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 623e0b5..44494c1 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -35,6 +35,8 @@ use OCP\IL10N; use OCP\ILogger; use OCP\IRequest; use OCP\ISession; +use OCP\ITags; +use OCP\ITagManager; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; @@ -126,6 +128,13 @@ class EditorController extends Controller { */ private $versionManager; + /** + * Tag manager + * + * @var ITagManager + */ + private $tagManager; + /** * Mobile regex from https://github.com/ONLYOFFICE/CommunityServer/blob/v9.1.1/web/studio/ASC.Web.Studio/web.appsettings.config#L35 */ @@ -144,6 +153,7 @@ class EditorController extends Controller { * @param Crypt $crypt - hash generator * @param IManager $shareManager - Share manager * @param ISession $ISession - Session + * @param ITagManager $tagManager - Tag manager */ public function __construct($AppName, IRequest $request, @@ -156,7 +166,8 @@ class EditorController extends Controller { AppConfig $config, Crypt $crypt, IManager $shareManager, - ISession $session + ISession $session, + ITagManager $tagManager ) { parent::__construct($AppName, $request); @@ -168,6 +179,7 @@ class EditorController extends Controller { $this->logger = $logger; $this->config = $config; $this->crypt = $crypt; + $this->tagManager = $tagManager; if (\OC::$server->getAppManager()->isInstalled("files_versions")) { try { @@ -1136,6 +1148,8 @@ class EditorController extends Controller { $params["editorConfig"]["templates"] = $templates; } + + $params["document"]["info"]["favorite"] = $this->isFavorite($fileId); } if ($folderLink !== null) { @@ -1491,6 +1505,22 @@ class EditorController extends Controller { return false; } + /** + * Check file favorite + * + * @param integer $fileId - file identifier + * + * @return bool + */ + private function isFavorite($fileId) { + $currentTags = $this->tagManager->load("files")->getTagsForObjects([$fileId]); + if ($currentTags) { + return in_array(ITags::TAG_FAVORITE, $currentTags[$fileId]); + } + + return false; + } + /** * Print error page * -- cgit v1.2.3 From 405d1ea77830795c3bde5c127cb132bf02579430 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 3 Jun 2021 17:26:04 +0300 Subject: change status favorite --- CHANGELOG.md | 1 + controller/editorcontroller.php | 1 + js/editor.js | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32d4c7..7e36e2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Change Log ## Added +- favorite status in the editor - creation from a template from the editor - download as - downloading a template from settings diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 44494c1..e31c24a 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -1150,6 +1150,7 @@ class EditorController extends Controller { } $params["document"]["info"]["favorite"] = $this->isFavorite($fileId); + $params["_file_path"] = $userFolder->getRelativePath($file->getPath()); } if ($folderLink !== null) { diff --git a/js/editor.js b/js/editor.js index 53ea1a1..9ed70be 100644 --- a/js/editor.js +++ b/js/editor.js @@ -154,6 +154,11 @@ config.events.onRequestInsertImage = OCA.Onlyoffice.onRequestInsertImage; config.events.onRequestMailMergeRecipients = OCA.Onlyoffice.onRequestMailMergeRecipients; config.events.onRequestCompareFile = OCA.Onlyoffice.onRequestCompareFile; + config.events.onMetaChange = OCA.Onlyoffice.onMetaChange; + + if (!OCA.Onlyoffice.filePath) { + OCA.Onlyoffice.filePath = config._file_path; + } } if (OCA.Onlyoffice.directEditor || OCA.Onlyoffice.inframe) { @@ -465,6 +470,23 @@ OCA.Onlyoffice.docEditor.setActionLink(url); }; + OCA.Onlyoffice.onMetaChange = function (event) { + if (event.data.favorite !== undefined) { + $.ajax({ + url: OC.generateUrl("apps/files/api/v1/files" + OC.encodePath(OCA.Onlyoffice.filePath)), + type: "post", + data: JSON.stringify({ + tags: event.data.favorite ? [OC.TAG_FAVORITE] : [] + }), + contentType: "application/json", + dataType: "json", + success: function(){ + OCA.Onlyoffice.docEditor.setFavorite(event.data.favorite); + } + }) + } + } + OCA.Onlyoffice.InitEditor(); })(jQuery, OCA); -- cgit v1.2.3 From c24ed750cb34ac4056028db72a15d8eb6a0bc7a0 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 11 Jun 2021 13:30:16 +0300 Subject: check can share --- controller/editorcontroller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index f71c711..97be564 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -396,10 +396,16 @@ class EditorController extends Controller { "anchor" => $anchor ]); + $canShare = ($file->getPermissions() & Constants::PERMISSION_SHARE) === Constants::PERMISSION_SHARE; + $accessList = $this->shareManager->getAccessList($file); foreach ($recipientIds as $recipientId) { if (!in_array($recipientId, $accessList["users"])) { + if (!$canShare) { + continue; + } + $share = $this->shareManager->newShare(); $share->setNode($file) ->setShareType(IShare::TYPE_USER) -- cgit v1.2.3 From 2915352d78696be3b09ccab1ec6f9df98dbc954e Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 15 Jun 2021 14:31:21 +0300 Subject: log share --- controller/editorcontroller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 97be564..f3ac255 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -415,6 +415,8 @@ class EditorController extends Controller { ->setPermissions(Constants::PERMISSION_READ); $this->shareManager->createShare($share); + + $this->logger->debug("mention: share $fileId to $recipientId", ["app" => $this->appName]); } $notification->setUser($recipientId); -- cgit v1.2.3 From 50a3c160df57618008bb9a16f48cc581b3731d6d Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 15 Jun 2021 14:33:27 +0300 Subject: mentions to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32d4c7..371ba6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Change Log ## Added +- mentions in comments - creation from a template from the editor - download as - downloading a template from settings -- cgit v1.2.3 From 0e3f8cdb2fd8e250936bf4d66cd04907774fc422 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 11 Jun 2021 18:30:56 +0300 Subject: format loader --- appinfo/routes.php | 1 - controller/editorcontroller.php | 13 ----- js/main.js | 2 +- templates/loader.html | 111 +++++++++++++++++++++++++++++++++++ templates/loader.php | 124 ---------------------------------------- 5 files changed, 112 insertions(+), 139 deletions(-) create mode 100644 templates/loader.html delete mode 100644 templates/loader.php diff --git a/appinfo/routes.php b/appinfo/routes.php index b77e336..26acd6a 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -23,7 +23,6 @@ return [ ["name" => "callback#emptyfile", "url" => "/empty", "verb" => "GET"], ["name" => "callback#track", "url" => "/track", "verb" => "POST"], ["name" => "template#preview", "url" => "/preview", "verb" => "GET"], - ["name" => "editor#loader", "url" => "/loader", "verb" => "GET"], ["name" => "editor#create_new", "url" => "/new", "verb" => "GET"], ["name" => "editor#download", "url" => "/downloadas", "verb" => "GET"], ["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"], diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index e31c24a..46778b5 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -912,19 +912,6 @@ class EditorController extends Controller { return $this->index($fileId, null, $shareToken, $version, $inframe); } - /** - * Get template loader Onlyoffice - * - * @return TemplateResponse - * - * @NoAdminRequired - * @NoCSRFRequired - * @PublicPage - */ - public function loader() { - return new TemplateResponse($this->appName, "loader", [], "plain"); - } - /** * Collecting the file parameters for the document service * diff --git a/js/main.js b/js/main.js index 1a6adf6..a16ad66 100644 --- a/js/main.js +++ b/js/main.js @@ -31,7 +31,7 @@ var dir = fileList.getCurrentDirectory(); if (!OCA.Onlyoffice.setting.sameTab || OCA.Onlyoffice.Desktop) { - $loaderUrl = OCA.Onlyoffice.Desktop ? "" : OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/loader"); + $loaderUrl = OCA.Onlyoffice.Desktop ? "" : OC.filePath(OCA.Onlyoffice.AppName, "templates", "loader.html"); var winEditor = window.open($loaderUrl); } diff --git a/templates/loader.html b/templates/loader.html new file mode 100644 index 0000000..0327d21 --- /dev/null +++ b/templates/loader.html @@ -0,0 +1,111 @@ + + + + + + +
    + + \ No newline at end of file diff --git a/templates/loader.php b/templates/loader.php deleted file mode 100644 index 217c84f..0000000 --- a/templates/loader.php +++ /dev/null @@ -1,124 +0,0 @@ - - - -
    -- cgit v1.2.3 From 630f776e8ea269f3cb028552ea0a4b5a6641ffa1 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 18 Jun 2021 09:50:30 +0300 Subject: saveAs in current folder on opening is same tab (d4c27dd77468bc5d44ffd738fe4c36e573da43e3) --- js/editor.js | 4 ++-- js/listener.js | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/js/editor.js b/js/editor.js index 4f3dd24..75257b8 100644 --- a/js/editor.js +++ b/js/editor.js @@ -272,7 +272,7 @@ var arrayPath = OCA.Onlyoffice.filePath.split("/"); arrayPath.pop(); arrayPath.shift(); - var currentDir = "/" + arrayPath.join("/"); + saveData.dir = "/" + arrayPath.join("/"); if (OCA.Onlyoffice.inframe) { window.parent.postMessage({ @@ -290,7 +290,7 @@ "httpd/unix-directory", true, OC.dialogs.FILEPICKER_TYPE_CHOOSE, - currentDir); + saveData.dir); } }; diff --git a/js/listener.js b/js/listener.js index 3f4bdb3..0e5dbc2 100644 --- a/js/listener.js +++ b/js/listener.js @@ -38,11 +38,6 @@ OCA.Onlyoffice.onRequestSaveAs = function (saveData) { - var arrayPath = OCA.Viewer.file.split("/"); - arrayPath.pop(); - arrayPath.shift(); - var currentDir = "/" + arrayPath.join("/"); - OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Save as"), function (fileDir) { saveData.dir = fileDir; @@ -52,7 +47,7 @@ "httpd/unix-directory", true, OC.dialogs.FILEPICKER_TYPE_CHOOSE, - currentDir); + saveData.dir); }; OCA.Onlyoffice.onRequestInsertImage = function (imageMimes) { -- cgit v1.2.3 From abb92baa75d840b651cf6faa2fd6df57d21f2575 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 18 Jun 2021 10:59:10 +0300 Subject: update document templates --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index d54aff3..d1d1822 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit d54aff3c6d3f8a163e96425528721256ff8da229 +Subproject commit d1d1822816a45528d5a92a7a258f557adc0450d5 -- cgit v1.2.3 From b824e35e87edc3c682894023402beea7321c6d54 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 18 Jun 2021 12:16:26 +0300 Subject: display the templates panel after configuration --- js/settings.js | 2 +- templates/settings.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/settings.js b/js/settings.js index 78fb3c2..7862da6 100644 --- a/js/settings.js +++ b/js/settings.js @@ -162,7 +162,7 @@ $("#onlyofficeStorageUrl").val(response.storageUrl); $("#onlyofficeSecret").val(response.secret); - $(".section-onlyoffice-common, .section-onlyoffice-watermark").toggleClass("onlyoffice-hide", (!response.documentserver.length && !demo) || !!response.error.length); + $(".section-onlyoffice-common, .section-onlyoffice-templates, .section-onlyoffice-watermark").toggleClass("onlyoffice-hide", (!response.documentserver.length && !demo) || !!response.error.length); var versionMessage = response.version ? (" (" + t(OCA.Onlyoffice.AppName, "version") + " " + response.version + ")") : ""; diff --git a/templates/settings.php b/templates/settings.php index 82c8921..2620651 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -230,7 +230,7 @@

    -
    +
    onlyoffice-hide">

    t("Common templates")) ?> -- cgit v1.2.3 From 2da019068dfebb6aa83b0297f8ea4651d8b6833a Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 18 Jun 2021 12:45:21 +0300 Subject: refresh the key after restoring the version --- lib/hooks.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/hooks.php b/lib/hooks.php index b338c6d..d5ca173 100644 --- a/lib/hooks.php +++ b/lib/hooks.php @@ -187,6 +187,8 @@ class Hooks { $fileId = $fileInfo->getId(); + KeyManager::delete($fileId); + FileVersions::deleteVersion($ownerId, $fileId, $versionId); } catch (\Exception $e) { \OC::$server->getLogger()->logException($e, ["message" => "Hook: fileVersionRestore " . json_encode($params), "app" => self::$appName]); -- cgit v1.2.3 From 4759aab9bcc4861e398a05f7df06005f60bcf398 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 18 Jun 2021 14:36:13 +0300 Subject: use the user from actions for forcesaving by click --- controller/callbackcontroller.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 96fa7ee..63aab6d 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -372,6 +372,8 @@ class CallbackController extends Controller { * @param string $token - request signature * @param array $history - file history * @param string $changesurl - link to file changes + * @param integer $forcesavetype - the type of force save action + * @param array $actions - the array of action * * @return array * @@ -380,7 +382,7 @@ class CallbackController extends Controller { * @PublicPage * @CORS */ - public function track($doc, $users, $key, $status, $url, $token, $history, $changesurl) { + public function track($doc, $users, $key, $status, $url, $token, $history, $changesurl, $forcesavetype, $actions) { list ($hashData, $error) = $this->crypt->ReadHash($doc); if ($hashData === null) { @@ -445,9 +447,18 @@ class CallbackController extends Controller { \OC_Util::tearDownFS(); + $isForcesave = $status === self::TrackerStatus_ForceSave || $status === self::TrackerStatus_CorruptedForceSave; + // author of the latest changes $userId = $this->parseUserId($users[0]); + if ($isForcesave + && $forcesavetype === 1 + && !empty($actions)) { + // the user who clicked Save + $userId = $this->parseUserId($actions[0]["userid"]); + } + $user = $this->userManager->get($userId); if (!empty($user)) { \OC_User::setUserId($userId); @@ -503,8 +514,6 @@ class CallbackController extends Controller { $prevIsForcesave = KeyManager::wasForcesave($fileId); - $isForcesave = $status === self::TrackerStatus_ForceSave || $status === self::TrackerStatus_CorruptedForceSave; - if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { $isLock = KeyManager::lockFederatedKey($file, $isForcesave, null); if ($isForcesave && !$isLock) { -- cgit v1.2.3 From a1b850288babbd1986b3853ef1db507a9a92a356 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 23 Jun 2021 18:30:21 +0300 Subject: hide goback by config --- controller/editorcontroller.php | 3 ++- lib/appconfig.php | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 8101267..afe0de4 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -1271,7 +1271,8 @@ class EditorController extends Controller { $params["_file_path"] = $userFolder->getRelativePath($file->getPath()); } - if ($folderLink !== null) { + if ($folderLink !== null + && $this->config->GetSystemValue($this->config->_customization_goback) !== false) { $params["editorConfig"]["customization"]["goback"] = [ "url" => $folderLink ]; diff --git a/lib/appconfig.php b/lib/appconfig.php index e8d30c5..0be9c94 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -270,6 +270,13 @@ class AppConfig { */ public $_customization_autosave = "customization_autosave"; + /** + * The config key for the goback + * + * @var string + */ + public $_customization_goback = "customization_goback"; + /** * @param string $AppName - application name */ -- cgit v1.2.3 From a2f791a663d773cea9e57b6fbc2f0192cf564fd1 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 23 Jun 2021 18:38:35 +0300 Subject: 2021-06 end of life nc19 --- CHANGELOG.md | 1 + appinfo/info.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a878076..125ebfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Changed - redirect from dashboard on desktop +- Nextcloud v19 is no longer supported ## 6.4.2 ## Changed diff --git a/appinfo/info.xml b/appinfo/info.xml index 05bf3e1..8497374 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -29,7 +29,7 @@ https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png - + OCA\Onlyoffice\AdminSettings -- cgit v1.2.3 From 56f5bb56458276157b1e95c6bbf61cf0a96ac9a4 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 23 Jun 2021 18:55:19 +0300 Subject: creation template since 21 --- appinfo/application.php | 86 ++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/appinfo/application.php b/appinfo/application.php index 9f8e000..81f7905 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -176,7 +176,9 @@ class Application extends App implements IBootstrap { ); }); - $context->registerTemplateProvider(TemplateProvider::class); + if (interface_exists("OCP\Files\Template\ICustomTemplateProvider")) { + $context->registerTemplateProvider(TemplateProvider::class); + } } @@ -245,15 +247,17 @@ class Application extends App implements IBootstrap { $container = $this->getContainer(); - $eventDispatcher->addListener(FileCreatedFromTemplateEvent::class, - function (FileCreatedFromTemplateEvent $event) { - $template = $event->getTemplate(); - if ($template === null) { - $targetFile = $event->getTarget(); - $templateEmpty = TemplateManager::GetEmptyTemplate($targetFile->getName()); - $targetFile->putContent($templateEmpty); - } - }); + if (class_exists("OCP\Files\Template\FileCreatedFromTemplateEvent")) { + $eventDispatcher->addListener(FileCreatedFromTemplateEvent::class, + function (FileCreatedFromTemplateEvent $event) { + $template = $event->getTemplate(); + if ($template === null) { + $targetFile = $event->getTarget(); + $templateEmpty = TemplateManager::GetEmptyTemplate($targetFile->getName()); + $targetFile->putContent($templateEmpty); + } + }); + } $previewManager = $container->query(IPreview::class); $previewManager->registerProvider(Preview::getMimeTypeRegex(), function() use ($container) { @@ -275,36 +279,38 @@ class Application extends App implements IBootstrap { $notificationsManager->registerNotifierService(Notifier::class); }); - $context->injectFn(function(ITemplateManager $templateManager, IL10N $trans, $appName) { - if (!empty($this->appConfig->GetDocumentServerUrl()) - && $this->appConfig->SettingsAreSuccessful() - && $this->appConfig->isUserAllowedToUse()) { - - $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { - $wordTemplate = new TemplateFileCreator($appName, $trans->t("Document"), ".docx"); - $wordTemplate->addMimetype("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); - $wordTemplate->setIconClass("icon-onlyoffice-new-docx"); - $wordTemplate->setRatio(21/29.7); - return $wordTemplate; - }); - - $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { - $cellTemplate = new TemplateFileCreator($appName, $trans->t("Spreadsheet"), ".xlsx"); - $cellTemplate->addMimetype("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); - $cellTemplate->setIconClass("icon-onlyoffice-new-xlsx"); - $cellTemplate->setRatio(21/29.7); - return $cellTemplate; - }); - - $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { - $slideTemplate = new TemplateFileCreator($appName, $trans->t("Presentation"), ".pptx"); - $slideTemplate->addMimetype("application/vnd.openxmlformats-officedocument.presentationml.presentation"); - $slideTemplate->setIconClass("icon-onlyoffice-new-pptx"); - $slideTemplate->setRatio(16/9); - return $slideTemplate; - }); - } - }); + if (class_exists("OCP\Files\Template\TemplateFileCreator")) { + $context->injectFn(function(ITemplateManager $templateManager, IL10N $trans, $appName) { + if (!empty($this->appConfig->GetDocumentServerUrl()) + && $this->appConfig->SettingsAreSuccessful() + && $this->appConfig->isUserAllowedToUse()) { + + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $wordTemplate = new TemplateFileCreator($appName, $trans->t("Document"), ".docx"); + $wordTemplate->addMimetype("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + $wordTemplate->setIconClass("icon-onlyoffice-new-docx"); + $wordTemplate->setRatio(21/29.7); + return $wordTemplate; + }); + + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $cellTemplate = new TemplateFileCreator($appName, $trans->t("Spreadsheet"), ".xlsx"); + $cellTemplate->addMimetype("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + $cellTemplate->setIconClass("icon-onlyoffice-new-xlsx"); + $cellTemplate->setRatio(21/29.7); + return $cellTemplate; + }); + + $templateManager->registerTemplateFileCreator(function () use ($appName, $trans) { + $slideTemplate = new TemplateFileCreator($appName, $trans->t("Presentation"), ".pptx"); + $slideTemplate->addMimetype("application/vnd.openxmlformats-officedocument.presentationml.presentation"); + $slideTemplate->setIconClass("icon-onlyoffice-new-pptx"); + $slideTemplate->setRatio(16/9); + return $slideTemplate; + }); + } + }); + } Hooks::connectHooks(); } -- cgit v1.2.3 From e8179c77713bdf6467982094881ab26617f3f77e Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 23 Jun 2021 18:58:13 +0300 Subject: Revert "remove old template picker" This reverts commit fdf083ea0dc47e024846f23e8c389599ad1f66eb. # Conflicts: # controller/editorcontroller.php --- appinfo/routes.php | 1 + controller/editorcontroller.php | 4 +- controller/templatecontroller.php | 23 +++++++++ js/main.js | 28 ++++++++-- js/template.js | 105 ++++++++++++++++++++++++++++++++++++-- l10n/bg.js | 3 ++ l10n/bg.json | 3 ++ l10n/de.js | 3 ++ l10n/de.json | 3 ++ l10n/de_DE.js | 3 ++ l10n/de_DE.json | 3 ++ l10n/es.js | 3 ++ l10n/es.json | 3 ++ l10n/fr.js | 3 ++ l10n/fr.json | 3 ++ l10n/it.js | 3 ++ l10n/it.json | 3 ++ l10n/ja.js | 3 ++ l10n/ja.json | 3 ++ l10n/pl.js | 3 ++ l10n/pl.json | 3 ++ l10n/pt_BR.js | 3 ++ l10n/pt_BR.json | 3 ++ l10n/ru.js | 3 ++ l10n/ru.json | 3 ++ l10n/sv.js | 3 ++ l10n/sv.json | 3 ++ l10n/zh_CN.js | 3 ++ l10n/zh_CN.json | 3 ++ templates/templatePicker.html | 11 ++++ 30 files changed, 234 insertions(+), 10 deletions(-) create mode 100644 templates/templatePicker.html diff --git a/appinfo/routes.php b/appinfo/routes.php index 9781046..f4809fa 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -43,6 +43,7 @@ return [ ["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"], + ["name" => "template#get_templates", "url" => "/ajax/template", "verb" => "GET"], ], "ocs" => [ ["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"], diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index afe0de4..b53679d 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -262,13 +262,13 @@ class EditorController extends Controller { $template = TemplateManager::GetEmptyTemplate($name); } else { $templateFile = TemplateManager::GetTemplate($templateId); - if ($templateFile) { + if ($templateFile !== null) { $template = $templateFile->getContent(); } } if (!$template) { - $this->logger->error("Template for file creation not found: $name", ["app" => $this->appName]); + $this->logger->error("Template for file creation not found: $name ($templateId)", ["app" => $this->appName]); return ["error" => $this->trans->t("Template not found")]; } diff --git a/controller/templatecontroller.php b/controller/templatecontroller.php index 97f01c5..57322f8 100644 --- a/controller/templatecontroller.php +++ b/controller/templatecontroller.php @@ -75,6 +75,29 @@ class TemplateController extends Controller { $this->preview = $preview; } + /** + * Get templates + * + * @return array + * + * @NoAdminRequired + */ + public function GetTemplates() { + $templatesList = TemplateManager::GetGlobalTemplates(); + + $templates = []; + foreach ($templatesList as $templatesItem) { + $template = [ + "id" => $templatesItem->getId(), + "name" => $templatesItem->getName(), + "type" => TemplateManager::GetTypeTemplate($templatesItem->getMimeType()) + ]; + array_push($templates, $template); + } + + return $templates; + } + /** * Add global template * diff --git a/js/main.js b/js/main.js index a16ad66..592114f 100644 --- a/js/main.js +++ b/js/main.js @@ -27,7 +27,7 @@ OCA.Onlyoffice.setting = {}; - OCA.Onlyoffice.CreateFile = function (name, fileList) { + OCA.Onlyoffice.CreateFile = function (name, fileList, templateId) { var dir = fileList.getCurrentDirectory(); if (!OCA.Onlyoffice.setting.sameTab || OCA.Onlyoffice.Desktop) { @@ -40,6 +40,10 @@ dir: dir }; + if (templateId) { + createData.templateId = templateId; + } + if ($("#isPublic").val()) { createData.shareToken = encodeURIComponent($("#sharingToken").val()); } @@ -319,7 +323,11 @@ iconClass: "icon-onlyoffice-new-docx", fileType: "docx", actionHandler: function (name) { - OCA.Onlyoffice.CreateFile(name + ".docx", fileList); + if (!$("#isPublic").val() && OCA.Onlyoffice.TemplateExist("document")) { + OCA.Onlyoffice.OpenTemplatePicker(name, ".docx", "document"); + } else { + OCA.Onlyoffice.CreateFile(name + ".docx", fileList); + } } }); @@ -330,7 +338,11 @@ iconClass: "icon-onlyoffice-new-xlsx", fileType: "xlsx", actionHandler: function (name) { - OCA.Onlyoffice.CreateFile(name + ".xlsx", fileList); + if (!$("#isPublic").val() && OCA.Onlyoffice.TemplateExist("spreadsheet")) { + OCA.Onlyoffice.OpenTemplatePicker(name, ".xlsx", "spreadsheet"); + } else { + OCA.Onlyoffice.CreateFile(name + ".xlsx", fileList); + } } }); @@ -341,9 +353,17 @@ iconClass: "icon-onlyoffice-new-pptx", fileType: "pptx", actionHandler: function (name) { - OCA.Onlyoffice.CreateFile(name + ".pptx", fileList); + if (!$("#isPublic").val() && OCA.Onlyoffice.TemplateExist("presentation")) { + OCA.Onlyoffice.OpenTemplatePicker(name, ".pptx", "presentation"); + } else { + OCA.Onlyoffice.CreateFile(name + ".pptx", fileList); + } } }); + + if (OCA.Onlyoffice.GetTemplates) { + OCA.Onlyoffice.GetTemplates(); + } } }; diff --git a/js/template.js b/js/template.js index 7455821..382494d 100644 --- a/js/template.js +++ b/js/template.js @@ -19,9 +19,69 @@ (function ($, OC) { OCA.Onlyoffice = _.extend({ - AppName: "onlyoffice" + AppName: "onlyoffice", + templates: null }, OCA.Onlyoffice); + OCA.Onlyoffice.OpenTemplatePicker = function (name, extension, type) { + + $("#onlyoffice-template-picker").remove(); + + $.get(OC.filePath(OCA.Onlyoffice.AppName, "templates", "templatePicker.html"), + function (tmpl) { + var $tmpl = $(tmpl) + var dialog = $tmpl.octemplate({ + dialog_name: "onlyoffice-template-picker", + dialog_title: t(OCA.Onlyoffice.AppName, "Select template") + }); + + OCA.Onlyoffice.AttachTemplates(dialog, type); + + $("body").append(dialog); + + $("#onlyoffice-template-picker").ocdialog({ + closeOnEscape: true, + modal: true, + buttons: [{ + text: t("core", "Cancel"), + classes: "cancel", + click: function() { + $(this).ocdialog("close") + } + }, { + text: t(OCA.Onlyoffice.AppName, "Create"), + classes: "primary", + click: function() { + var templateId = this.dataset.templateId; + var fileList = OCA.Files.App.fileList; + OCA.Onlyoffice.CreateFile(name + extension, fileList, templateId); + $(this).ocdialog("close") + } + }] + }); + }); + }; + + OCA.Onlyoffice.GetTemplates = function () { + if (OCA.Onlyoffice.templates != null) { + return; + } + + $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/template"), + function onSuccess(response) { + if (response.error) { + OC.Notification.show(response.error, { + type: "error", + timeout: 3 + }); + return; + } + + OCA.Onlyoffice.templates = response; + return; + }); + }; + OCA.Onlyoffice.AddTemplate = function (file, callback) { var data = new FormData(); data.append("file", file); @@ -41,7 +101,7 @@ callback(response, null); } }); - }; + } OCA.Onlyoffice.DeleteTemplate = function (templateId, callback) { $.ajax({ @@ -56,7 +116,36 @@ } } }); - }; + } + + OCA.Onlyoffice.AttachTemplates = function (dialog, type) { + var emptyItem = dialog[0].querySelector(".onlyoffice-template-item"); + + OCA.Onlyoffice.templates.forEach(template => { + if (template.type !== type) { + return; + } + var item = emptyItem.cloneNode(true); + + $(item.querySelector("label")).attr("for", "template_picker-" + template["id"]); + item.querySelector("input").id = "template_picker-" + template["id"]; + item.querySelector("img").src = "/core/img/filetypes/x-office-" + template["type"] + ".svg"; + item.querySelector("p").textContent = template["name"]; + item.onclick = function() { + dialog[0].dataset.templateId = template["id"]; + } + dialog[0].querySelector(".onlyoffice-template-container").appendChild(item); + }); + + $(emptyItem.querySelector("label")).attr("for", "template_picker-0"); + emptyItem.querySelector("input").id = "template_picker-0"; + emptyItem.querySelector("input").checked = true; + emptyItem.querySelector("img").src = "/core/img/filetypes/x-office-" + type + ".svg"; + emptyItem.querySelector("p").textContent = t(OCA.Onlyoffice.AppName, "Empty"); + emptyItem.onclick = function() { + dialog[0].dataset.templateId = "0"; + } + } OCA.Onlyoffice.AttachItemTemplate = function (template) { $.get(OC.filePath(OCA.Onlyoffice.AppName, "templates", "templateItem.html"), @@ -69,6 +158,14 @@ $(".onlyoffice-template-container").append(item); }); - }; + } + + OCA.Onlyoffice.TemplateExist = function (type) { + var isExist = OCA.Onlyoffice.templates.some((template) => { + return template.type === type; + }); + + return isExist; + } })(jQuery, OC); \ No newline at end of file diff --git a/l10n/bg.js b/l10n/bg.js index 11ff04f..fc0b6a8 100644 --- a/l10n/bg.js +++ b/l10n/bg.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Използвайте ONLYOFFICE, за да генерирате преглед на документа (ще заеме дисково пространство)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Запазете метаданните за всяка версия, щом документът бъде редактиран (ще заеме дисково пространство)", "All history successfully deleted": "Цялата история е успешно изтрита", + "Create": "Създай", + "Select template" : "Избор на шаблон", "Invalid file provided" : "Предоставен е невалиден файл", + "Empty": "Празно", "Error" : "Грешка", "Add a new template": "Добавяне на шаблон", "Template already exists": "Шаблонът вече съществува", diff --git a/l10n/bg.json b/l10n/bg.json index 590a917..28c4eb7 100644 --- a/l10n/bg.json +++ b/l10n/bg.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Използвайте ONLYOFFICE, за да генерирате преглед на документа (ще заеме дисково пространство)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Запазете метаданните за всяка версия, щом документът бъде редактиран (ще заеме дисково пространство)", "All history successfully deleted": "Цялата история е успешно изтрита", + "Create": "Създай", + "Select template" : "Избор на шаблон", "Invalid file provided" : "Предоставен е невалиден файл", + "Empty": "Празно", "Error" : "Грешка", "Add a new template": "Добавяне на шаблон", "Template already exists": "Шаблонът вече съществува", diff --git a/l10n/de.js b/l10n/de.js index bb85feb..804225d 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", + "Create": "Erstellen", + "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", + "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/de.json b/l10n/de.json index 5149e1f..7340de6 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", + "Create": "Erstellen", + "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", + "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 29ce666..87e832f 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", + "Create": "Erstellen", + "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", + "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 6088cfa..cb58722 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICE verwenden, um eine Dokumentvorschau zu erstellen (Speicherplatz erforderlich)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Metadaten für jede Version beim Bearbeiten des Dokuments aufbewahren (Speicherplatz erforderlich)", "All history successfully deleted": "Gesamtverlauf wurde erfolgreich gelöscht", + "Create": "Erstellen", + "Select template" : "Vorlage auswählen", "Invalid file provided" : "Ungültige Datei zur Verfügung gestellt", + "Empty": "Leer", "Error" : "Fehler", "Add a new template": "Neue Vorlage hinzufügen", "Template already exists": "Vorlage ist bereits vorhanden", diff --git a/l10n/es.js b/l10n/es.js index dfc1186..7a36edb 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para generar una vista previa del documento (ocupará espacio en el disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Guardar los metadatos de cada versión al editar el documento (ocupará espacio en el disco)", "All history successfully deleted": "Todo el historial se ha eliminado correctamente", + "Create": "Crear", + "Select template" : "Seleccionar plantilla", "Invalid file provided" : "Archivo proporcionado no válido", + "Empty": "Vacío", "Error" : "Error", "Add a new template": "Añadir una plantilla nueva", "Template already exists": "La plantilla ya existe", diff --git a/l10n/es.json b/l10n/es.json index 0499d22..24cd75a 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para generar una vista previa del documento (ocupará espacio en el disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Guardar los metadatos de cada versión al editar el documento (ocupará espacio en el disco)", "All history successfully deleted": "Todo el historial se ha eliminado correctamente", + "Create": "Crear", + "Select template" : "Seleccionar plantilla", "Invalid file provided" : "Archivo proporcionado no válido", + "Empty": "Vacío", "Error" : "Error", "Add a new template": "Añadir una plantilla nueva", "Template already exists": "La plantilla ya existe", diff --git a/l10n/fr.js b/l10n/fr.js index 242c8cb..ad97e74 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Utilisez ONLYOFFICE pour générer l'aperçu du document (occupe de l'espace disque)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Gardez les métadonnées pour chaque version dès que le document est modifié (occupe de l'espace disque)", "All history successfully deleted": "L'historique a été supprimé avec succès", + "Create": "Créer", + "Select template" : "Sélectionnez un modèle", "Invalid file provided" : "Fichier non valide", + "Empty": "Vide", "Error" : "Erreur", "Add a new template": "Ajouter un nouveau modèle", "Template already exists": "Le modèle existe déjà", diff --git a/l10n/fr.json b/l10n/fr.json index f7d0cfc..fceb0fd 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Utilisez ONLYOFFICE pour générer l'aperçu du document (occupe de l'espace disque)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Gardez les métadonnées pour chaque version dès que le document est modifié (occupe de l'espace disque)", "All history successfully deleted": "L'historique a été supprimé avec succès", + "Create": "Créer", + "Select template" : "Sélectionnez un modèle", "Invalid file provided" : "Fichier non valide", + "Empty": "Vide", "Error" : "Erreur", "Add a new template": "Ajouter un nouveau modèle", "Template already exists": "Le modèle existe déjà", diff --git a/l10n/it.js b/l10n/it.js index 0dbff7b..bc9a3a7 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usare ONLYOFFICE per generare anteprima documenti (occuperà spazio su disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Salvare metadati per ogni versione una volta modificato il documento (occuperà spazio su disco)", "All history successfully deleted": "Cronologia eliminata con successo", + "Create": "Crea", + "Select template" : "Seleziona modello", "Invalid file provided" : "File fornito non valido", + "Empty": "Vuoto", "Error" : "Errore", "Add a new template": "Aggiungi un nuovo modello", "Template already exists": "Modello già esiste", diff --git a/l10n/it.json b/l10n/it.json index b16536a..5018c13 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usare ONLYOFFICE per generare anteprima documenti (occuperà spazio su disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Salvare metadati per ogni versione una volta modificato il documento (occuperà spazio su disco)", "All history successfully deleted": "Cronologia eliminata con successo", + "Create": "Crea", + "Select template" : "Seleziona modello", "Invalid file provided" : "File fornito non valido", + "Empty": "Vuoto", "Error" : "Errore", "Add a new template": "Aggiungi un nuovo modello", "Template already exists": "Modello già esiste", diff --git a/l10n/ja.js b/l10n/ja.js index 26dc74f..7917435 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", "All history successfully deleted": "すべての履歴が正常に削除されました", + "Create": "作成", + "Select template" : "テンプレートを選択する", "Invalid file provided" : "無効なファイルが提供されました", + "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", "Template already exists": "テンプレートは既に存在しています", diff --git a/l10n/ja.json b/l10n/ja.json index 0438adc..21aa267 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", "All history successfully deleted": "すべての履歴が正常に削除されました", + "Create": "作成", + "Select template" : "テンプレートを選択する", "Invalid file provided" : "無効なファイルが提供されました", + "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", "Template already exists": "テンプレートは既に存在しています", diff --git a/l10n/pl.js b/l10n/pl.js index 1595e2f..3616182 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Skorzystaj z ONLYOFFICE, aby wygenerować podgląd dokumentu (zajmie to miejsce na dysku)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Zachowaj metadane dla każdej wersji, gdy dokument jest edytowany (zajmie to miejsce na dysku)", "All history successfully deleted": "Cała historia została pomyślnie usunięta", + "Create": "Utwórz", + "Select template" : "Wybierz szablon", "Invalid file provided" : "Wprowadzono niewłaściwy plik", + "Empty": "Pusty", "Error" : "Błąd", "Add a new template": "Dodaj nowy szablon", "Template already exists": "Szablon już istnieje", diff --git a/l10n/pl.json b/l10n/pl.json index d755181..5e74393 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Skorzystaj z ONLYOFFICE, aby wygenerować podgląd dokumentu (zajmie to miejsce na dysku)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Zachowaj metadane dla każdej wersji, gdy dokument jest edytowany (zajmie to miejsce na dysku)", "All history successfully deleted": "Cała historia została pomyślnie usunięta", + "Create": "Utwórz", + "Select template" : "Wybierz szablon", "Invalid file provided" : "Wprowadzono niewłaściwy plik", + "Empty": "Pusty", "Error" : "Błąd", "Add a new template": "Dodaj nowy szablon", "Template already exists": "Szablon już istnieje", diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 723ddbf..8731b08 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para gerar uma visualização do documento (ocupará espaço em disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Manter os metadados para cada versão após a edição (ocupará espaço em disco) (ocupará espaço em disco)", "All history successfully deleted": "O histórico foi excluído com sucesso", + "Create": "Criar", + "Select template" : "Selecionar um modelo", "Invalid file provided" : "Arquivo fornecido inválido", + "Empty": "Vazio", "Error" : "Erro", "Add a new template": "Adicionar um novo modelo", "Template already exists": "Modelo já existe", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 00ddcd4..5ed1329 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Usar ONLYOFFICE para gerar uma visualização do documento (ocupará espaço em disco)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Manter os metadados para cada versão após a edição (ocupará espaço em disco) (ocupará espaço em disco)", "All history successfully deleted": "O histórico foi excluído com sucesso", + "Create": "Criar", + "Select template" : "Selecionar um modelo", "Invalid file provided" : "Arquivo fornecido inválido", + "Empty": "Vazio", "Error" : "Erro", "Add a new template": "Adicionar um novo modelo", "Template already exists": "Modelo já existe", diff --git a/l10n/ru.js b/l10n/ru.js index eac6145..2353c83 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Использовать ONLYOFFICE для создания превью документа (займет место на диске)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Сохранять метаданные для каждой версии после редактирования (займет место на диске)", "All history successfully deleted": "История успешно удалена", + "Create": "Создать", + "Select template" : "Выбрать шаблон", "Invalid file provided" : "Указан неправильный файл", + "Empty": "Пустой", "Error" : "Ошибка", "Add a new template": "Добавить новый шаблон", "Template already exists": "Шаблон уже существует", diff --git a/l10n/ru.json b/l10n/ru.json index fe4e904..107ea60 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Использовать ONLYOFFICE для создания превью документа (займет место на диске)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Сохранять метаданные для каждой версии после редактирования (займет место на диске)", "All history successfully deleted": "История успешно удалена", + "Create": "Создать", + "Select template" : "Выбрать шаблон", "Invalid file provided" : "Указан неправильный файл", + "Empty": "Пустой", "Error" : "Ошибка", "Add a new template": "Добавить новый шаблон", "Template already exists": "Шаблон уже существует", diff --git a/l10n/sv.js b/l10n/sv.js index cac485c..74b1012 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Använd ONLYOFFICE för att generera en förhandsgranskning av dokument (detta använder diskutrymme)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Behåll metadata för varje version när dokumentet redigeras (detta använder diskutrymme) ", "All history successfully deleted": "All historik har tagits bort", + "Create": "Skapa", + "Select template" : "Välj mall", "Invalid file provided" : "Ogiltig fil tillhandahölls", + "Empty": "Tom", "Error" : "Fel", "Add a new template": "Lägg till en ny mall", "Template already exists": "Mallen finns redan", diff --git a/l10n/sv.json b/l10n/sv.json index ff7c343..1b61674 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Använd ONLYOFFICE för att generera en förhandsgranskning av dokument (detta använder diskutrymme)", "Keep metadata for each version once the document is edited (it will take up disk space)": "Behåll metadata för varje version när dokumentet redigeras (detta använder diskutrymme) ", "All history successfully deleted": "All historik har tagits bort", + "Create": "Skapa", + "Select template" : "Välj mall", "Invalid file provided" : "Ogiltig fil tillhandahölls", + "Empty": "Tom", "Error" : "Fel", "Add a new template": "Lägg till en ny mall", "Template already exists": "Mallen finns redan", diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index 78613d9..8a0bfd2 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -89,7 +89,10 @@ OC.L10N.register( "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "使用ONLYOFFICE生成文档预览(将占用磁盘空间)", "Keep metadata for each version once the document is edited (it will take up disk space)": "编辑文档后保留每个版本的元数据(它将占用磁盘空间)", "All history successfully deleted": "所有历史记录成功删除", + "Create": "创建", + "Select template" : "选择模板", "Invalid file provided" : "提供了无效文件", + "Empty": "空", "Error" : "错误", "Add a new template": "添加一个新的模板", "Template already exists": "模板已经存在", diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index 221072f..913f1be 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -87,7 +87,10 @@ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "使用ONLYOFFICE生成文档预览(将占用磁盘空间)", "Keep metadata for each version once the document is edited (it will take up disk space)": "编辑文档后保留每个版本的元数据(它将占用磁盘空间)", "All history successfully deleted": "所有历史记录成功删除", + "Create": "创建", + "Select template" : "选择模板", "Invalid file provided" : "提供了无效文件", + "Empty": "空", "Error" : "错误", "Add a new template": "添加一个新的模板", "Template already exists": "模板已经存在", diff --git a/templates/templatePicker.html b/templates/templatePicker.html new file mode 100644 index 0000000..55f6b75 --- /dev/null +++ b/templates/templatePicker.html @@ -0,0 +1,11 @@ +
    +
      +
    • + + +
    • +
    +
    \ No newline at end of file -- cgit v1.2.3 From 2a513f88fc4ad54e23be878ac89e6ea07fc91467 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 23 Jun 2021 19:03:51 +0300 Subject: old creator in 20 version --- js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 592114f..df195ce 100644 --- a/js/main.js +++ b/js/main.js @@ -443,7 +443,8 @@ OCA.Onlyoffice.GetSettings(initSharedButton); } else { - if ($("#isPublic").val() === "1" && !!$("#filestable").length) { + if ($("#isPublic").val() === "1" && !!$("#filestable").length + || OC.config.version.split(".")[0] < 21) { //folder by shared link OC.Plugins.register("OCA.Files.NewFileMenu", OCA.Onlyoffice.NewFileMenu); } -- cgit v1.2.3 From 4fb6f18511a810769b94795efaeafa747be301c7 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 24 Jun 2021 14:04:21 +0300 Subject: nc 22 (Fix #491) --- CHANGELOG.md | 1 + appinfo/info.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93e3b9d..d5cd7d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ## Changed - redirect from dashboard on desktop +- compatible with Nextcloud 22 - Nextcloud v19 is no longer supported ## 7.0.2 diff --git a/appinfo/info.xml b/appinfo/info.xml index 4816a87..5ea41cb 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -29,7 +29,7 @@ https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png - + OCA\Onlyoffice\AdminSettings -- cgit v1.2.3 From 44fb802d7e3d85394815f3c2f38451f9ec87c34e Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Tue, 15 Jun 2021 14:44:38 +0300 Subject: delete group if group is unknown --- lib/appconfig.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/appconfig.php b/lib/appconfig.php index 0be9c94..87865dc 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -967,6 +967,7 @@ class AppConfig { $group = \OC::$server->getGroupManager()->get($groupName); if ($group === null) { \OC::$server->getLogger()->error("Group is unknown $groupName", ["app" => $this->appName]); + $this->SetLimitGroups(array_diff($groups, [$groupName])); } else { if ($group->inGroup($user)) { return true; -- cgit v1.2.3 From d2ffcb9eb6a3d342a363a6575286ebbcbb3d174b Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Mon, 28 Jun 2021 18:03:09 +0300 Subject: open new tab for mobile --- js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index df195ce..be7dba0 100644 --- a/js/main.js +++ b/js/main.js @@ -26,11 +26,12 @@ }, OCA.Onlyoffice); OCA.Onlyoffice.setting = {}; + OCA.Onlyoffice.mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent); OCA.Onlyoffice.CreateFile = function (name, fileList, templateId) { var dir = fileList.getCurrentDirectory(); - if (!OCA.Onlyoffice.setting.sameTab || OCA.Onlyoffice.Desktop) { + if (!OCA.Onlyoffice.setting.sameTab || OCA.Onlyoffice.mobile || OCA.Onlyoffice.Desktop) { $loaderUrl = OCA.Onlyoffice.Desktop ? "" : OC.filePath(OCA.Onlyoffice.AppName, "templates", "loader.html"); var winEditor = window.open($loaderUrl); } @@ -95,7 +96,7 @@ if (winEditor && winEditor.location) { winEditor.location.href = url; - } else if (!OCA.Onlyoffice.setting.sameTab || OCA.Onlyoffice.Desktop) { + } else if (!OCA.Onlyoffice.setting.sameTab || OCA.Onlyoffice.mobile || OCA.Onlyoffice.Desktop) { winEditor = window.open(url, "_blank"); } else if ($("#isPublic").val() === "1" && !$("#filestable").length) { location.href = url; -- cgit v1.2.3 From 2321d716460279edf2a0ade44268db47cdc7b984 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Tue, 29 Jun 2021 10:35:46 +0300 Subject: fix scroll top when adding template --- css/template.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/css/template.css b/css/template.css index c1a9e05..b7b471e 100644 --- a/css/template.css +++ b/css/template.css @@ -58,4 +58,7 @@ } .onlyoffice-template-item input:checked + label { color: rgb(55, 137, 243); +} +.section-onlyoffice-templates input { + display: none; } \ No newline at end of file -- cgit v1.2.3 From 70f40f6a19e2d6f63866024687d23e32d34725d6 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 24 Jun 2021 14:04:21 +0300 Subject: nc 22 (Fix #491) # Conflicts: # CHANGELOG.md # appinfo/info.xml --- CHANGELOG.md | 3 +++ appinfo/info.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b37a3c..ef59f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## Changed +- compatible with Nextcloud 22 + ## 7.0.2 ## Changed - fixed registration of file actions diff --git a/appinfo/info.xml b/appinfo/info.xml index b37a54b..0638551 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -29,7 +29,7 @@ https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png - + OCA\Onlyoffice\AdminSettings -- cgit v1.2.3 From 7fccc6d75319e350ca70252359e12bd9c5c96aa3 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 30 Jun 2021 12:20:19 +0300 Subject: check exist empty template (Fix #492) --- appinfo/application.php | 4 +++- lib/templatemanager.php | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/appinfo/application.php b/appinfo/application.php index 81f7905..26769ea 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -254,7 +254,9 @@ class Application extends App implements IBootstrap { if ($template === null) { $targetFile = $event->getTarget(); $templateEmpty = TemplateManager::GetEmptyTemplate($targetFile->getName()); - $targetFile->putContent($templateEmpty); + if ($templateEmpty) { + $targetFile->putContent($templateEmpty); + } } }); } diff --git a/lib/templatemanager.php b/lib/templatemanager.php index cd6a770..dcadfb0 100644 --- a/lib/templatemanager.php +++ b/lib/templatemanager.php @@ -197,6 +197,9 @@ class TemplateManager { $lang = \OC::$server->getL10NFactory("")->get("")->getLanguageCode(); $templatePath = self::GetEmptyTemplatePath($lang, $ext); + if (!file_exists($templatePath)) { + return false; + } $template = file_get_contents($templatePath); return $template; -- cgit v1.2.3 From ef22e96032ac57315309e656a18117622ec66789 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 1 Jul 2021 19:26:56 +0300 Subject: check isUpdateable folder when create/convert file --- controller/editorcontroller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index b53679d..1521641 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -253,7 +253,7 @@ class EditorController extends Controller { $this->logger->error("Folder for file creation was not found: $dir", ["app" => $this->appName]); return ["error" => $this->trans->t("The required folder was not found")]; } - if (!$folder->isCreatable()) { + if (!($folder->isCreatable() && $folder->isUpdateable())) { $this->logger->error("Folder for file creation without permission: $dir", ["app" => $this->appName]); return ["error" => $this->trans->t("You don't have enough permission to create")]; } @@ -510,7 +510,7 @@ class EditorController extends Controller { } $folder = $file->getParent(); - if (!$folder->isCreatable()) { + if (!($folder->isCreatable() && $folder->isUpdateable())) { $folder = $this->root->getUserFolder($userId); } -- cgit v1.2.3 From f1040cd503445f6a47e725adef49a12be0571957 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 2 Jul 2021 13:59:26 +0300 Subject: 7.0.4 --- CHANGELOG.md | 1 + appinfo/info.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef59f59..467e9d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Change Log +## 7.0.4 ## Changed - compatible with Nextcloud 22 diff --git a/appinfo/info.xml b/appinfo/info.xml index 0638551..c10c3b1 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ 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. apache Ascensio System SIA - 7.0.2 + 7.0.4 Onlyoffice @@ -29,7 +29,7 @@ https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png - + OCA\Onlyoffice\AdminSettings -- cgit v1.2.3 From c8712b270b9e4faa077961b5f294e92d1b65d53c Mon Sep 17 00:00:00 2001 From: Nadya Knyazeva Date: Wed, 14 Jul 2021 17:12:52 +0300 Subject: Update README.md --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 62e6abd..48d6bd7 100644 --- a/README.md +++ b/README.md @@ -165,12 +165,12 @@ The table below will help you to make the right choice. | Pricing and licensing | Community Edition | Enterprise Edition | | ------------- | ------------- | ------------- | | | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Start Free Trial](https://www.onlyoffice.com/enterprise-edition-free.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | -| Cost | FREE | [Go to the pricing page](https://www.onlyoffice.com/enterprise-edition.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | +| Cost | FREE | [Go to the pricing page](https://www.onlyoffice.com/docs-enterprise-prices.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | | Simultaneous connections | up to 20 maximum | As in chosen pricing plan | | Number of users | up to 20 recommended | As in chosen pricing plan | | License | GNU AGPL v.3 | Proprietary | | **Support** | **Community Edition** | **Enterprise Edition** | -| Documentation | [Help Center](https://helpcenter.onlyoffice.com/server/docker/opensource/index.aspx) | [Help Center](https://helpcenter.onlyoffice.com/server/integration-edition/index.aspx) | +| Documentation | [Help Center](https://helpcenter.onlyoffice.com/installation/docs-community-index.aspx) | [Help Center](https://helpcenter.onlyoffice.com/installation/docs-enterprise-index.aspx) | | Standard support | [GitHub](https://github.com/ONLYOFFICE/DocumentServer/issues) or paid | One year support included | | Premium support | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | | **Services** | **Community Edition** | **Enterprise Edition** | @@ -178,6 +178,8 @@ The table below will help you to make the right choice. | Document Builder Service | + | + | | **Interface** | **Community Edition** | **Enterprise Edition** | | Tabbed interface | + | + | +| Dark theme | + | + | +| 150% scaling | + | + | | White Label | - | - | | Integrated test example (node.js)* | - | + | | Mobile web editors | - | + | @@ -208,11 +210,12 @@ The table below will help you to make the right choice. | Functions, formulas, equations | + | + | | Table templates | + | + | | Pivot tables | + | + | +| Data validation | + | + | | Conditional formatting for viewing | +** | +** | | **Presentation Editor features** | **Community Edition** | **Enterprise Edition** | | Font and paragraph formatting | + | + | | Object insertion | + | + | -| Animations | + | + | +| Transitions | + | + | | Presenter mode | + | + | | Notes | + | + | | | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Start Free Trial](https://www.onlyoffice.com/enterprise-edition-free.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | -- cgit v1.2.3 From 3a5733cdee19416252b65f7818ad49ca0c47ff87 Mon Sep 17 00:00:00 2001 From: Ilya Sobolev Date: Mon, 28 Jun 2021 16:09:33 +0300 Subject: l10n --- l10n/bg.js | 10 +++++++++- l10n/bg.json | 10 +++++++++- l10n/de.js | 10 +++++++++- l10n/de.json | 10 +++++++++- l10n/de_DE.js | 10 +++++++++- l10n/de_DE.json | 10 +++++++++- l10n/es.js | 10 +++++++++- l10n/es.json | 10 +++++++++- l10n/fr.js | 10 +++++++++- l10n/fr.json | 10 +++++++++- l10n/it.js | 10 +++++++++- l10n/it.json | 10 +++++++++- l10n/ja.js | 10 +++++++++- l10n/ja.json | 10 +++++++++- l10n/pl.js | 10 +++++++++- l10n/pl.json | 10 +++++++++- l10n/pt_BR.js | 10 +++++++++- l10n/pt_BR.json | 10 +++++++++- l10n/sv.js | 10 +++++++++- l10n/sv.json | 10 +++++++++- l10n/zh_CN.js | 10 +++++++++- l10n/zh_CN.json | 10 +++++++++- 22 files changed, 198 insertions(+), 22 deletions(-) diff --git a/l10n/bg.js b/l10n/bg.js index fc0b6a8..0ec75ee 100644 --- a/l10n/bg.js +++ b/l10n/bg.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Шаблонът е изтрит успешно", "Common templates": "Често срещани шаблони", "Failed to delete template": "Неуспешно изтриване на шаблон", - "File has been converted. Its content might look different.": "Файлът бе преобразуван. Съдържанието му може да изглежда различно." + "File has been converted. Its content might look different.": "Файлът бе преобразуван. Съдържанието му може да изглежда различно.", + "Download as": "Изтегли като", + "Download": "Изтегли", + "Convert into": "Конвертирай в", + "Origin format": "Формат на произход", + "Failed to send notification": "Неуспешно изпращане на известие", + "Notification sent successfully": "Успешно изпратено известие", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s, споменат във %2\$s: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} ha mencionado en {file}: \"%1\$s\"." }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/bg.json b/l10n/bg.json index 28c4eb7..36efa33 100644 --- a/l10n/bg.json +++ b/l10n/bg.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Шаблонът е изтрит успешно", "Common templates": "Често срещани шаблони", "Failed to delete template": "Неуспешно изтриване на шаблон", - "File has been converted. Its content might look different.": "Файлът бе преобразуван. Съдържанието му може да изглежда различно." + "File has been converted. Its content might look different.": "Файлът бе преобразуван. Съдържанието му може да изглежда различно.", + "Download as": "Изтегли като", + "Download": "Изтегли", + "Convert into": "Конвертирай в", + "Origin format": "Формат на произход", + "Failed to send notification": "Неуспешно изпращане на известие", + "Notification sent successfully": "Успешно изпратено известие", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s, споменат във %2$s: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier}, споменат във {file}: \"%1$s\"." },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/l10n/de.js b/l10n/de.js index 804225d..a0f29a1 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", "Failed to delete template": "Fehler beim Löschen einer Vorlage", - "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen.", + "Download as": "Herunterladen als", + "Download": "Herunterladen", + "Convert into": "Konvertieren in", + "Origin format": "Ursprüngliches Format", + "Failed to send notification": "Fehler beim Senden einer Benachrichtigung", + "Notification sent successfully": "Benachrichtigung erfolgreich gesendet", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s hat in %2\$s erwähnt: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} hat in {file} erwähnt: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 7340de6..3a09a29 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", "Failed to delete template": "Fehler beim Löschen einer Vorlage", - "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen.", + "Download as": "Herunterladen als", + "Download": "Herunterladen", + "Convert into": "Konvertieren in", + "Origin format": "Ursprüngliches Format", + "Failed to send notification": "Fehler beim Senden einer Benachrichtigung", + "Notification sent successfully": "Benachrichtigung erfolgreich gesendet", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s hat in %2$s erwähnt: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} hat in {file} erwähnt: \"%1$s\"." },"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 87e832f..34281a7 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", "Failed to delete template": "Fehler beim Löschen einer Vorlage", - "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen.", + "Download as": "Herunterladen als", + "Download": "Herunterladen", + "Convert into": "Konvertieren in", + "Origin format": "Ursprüngliches Format", + "Failed to send notification": "Fehler beim Senden einer Benachrichtigung", + "Notification sent successfully": "Benachrichtigung erfolgreich gesendet", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s hat in %2\$s erwähnt: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} hat in {file} erwähnt: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index cb58722..a12dfd6 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Vorlage wurde erfolgreich entfernt", "Common templates": "Gemeinsame Vorlagen", "Failed to delete template": "Fehler beim Löschen einer Vorlage", - "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen." + "File has been converted. Its content might look different.": "Die Datei wurde konvertiert. Der Inhalt könnte anders aussehen.", + "Download as": "Herunterladen als", + "Download": "Herunterladen", + "Convert into": "Konvertieren in", + "Origin format": "Ursprüngliches Format", + "Failed to send notification": "Fehler beim Senden einer Benachrichtigung", + "Notification sent successfully": "Benachrichtigung erfolgreich gesendet", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s hat in %2$s erwähnt: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} hat in {file} erwähnt: \"%1$s\"." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/es.js b/l10n/es.js index 7a36edb..687f814 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "La plantilla se eliminó correctamente", "Common templates": "Plantillas comunes", "Failed to delete template": "No se pudo eliminar la plantilla", - "File has been converted. Its content might look different.": "El archivo se ha convertido. Su contenido puede ser distinto." + "File has been converted. Its content might look different.": "El archivo se ha convertido. Su contenido puede ser distinto.", + "Download as": "Descargar como", + "Download": "Descargar", + "Convert into": "Convertir en", + "Origin format": "Formato original", + "Failed to send notification": "Error al enviar la notificación", + "Notification sent successfully": "Notificación enviada correctamente", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s ha mencionado en %2\$s: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} ha mencionado en {file}: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 24cd75a..6c3871a 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -99,6 +99,14 @@ "Template successfully deleted": "La plantilla se eliminó correctamente", "Common templates": "Plantillas comunes", "Failed to delete template": "No se pudo eliminar la plantilla", - "File has been converted. Its content might look different.": "El archivo se ha convertido. Su contenido puede ser distinto." + "File has been converted. Its content might look different.": "El archivo se ha convertido. Su contenido puede ser distinto.", + "Download as": "Descargar como", + "Download": "Descargar", + "Convert into": "Convertir en", + "Origin format": "Formato original", + "Failed to send notification": "Error al enviar la notificación", + "Notification sent successfully": "Notificación enviada correctamente", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s ha mencionado en %2$s: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} ha mencionado en {file}: \"%1$s\"." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index ad97e74..50a5da8 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Le modèle a été supprimé avec succès", "Common templates": "Modèles communs", "Failed to delete template": "Impossible de supprimer le modèle", - "File has been converted. Its content might look different.": "Le fichier a été converti. Son contenu peut s'afficher différemment." + "File has been converted. Its content might look different.": "Le fichier a été converti. Son contenu peut s'afficher différemment.", + "Download as": "Télécharger sous", + "Download": "Télécharger", + "Convert into": "Convertir en", + "Origin format": "Format d’origin", + "Failed to send notification": "Échec de l’envoi de la notification", + "Notification sent successfully": "Notification a été envoyée avec succès", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s a mentionné dans %2\$s: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} a mentionné dans {file}: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index fceb0fd..be55565 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Le modèle a été supprimé avec succès", "Common templates": "Modèles communs", "Failed to delete template": "Impossible de supprimer le modèle", - "File has been converted. Its content might look different.": "Le fichier a été converti. Son contenu peut s'afficher différemment." + "File has been converted. Its content might look different.": "Le fichier a été converti. Son contenu peut s'afficher différemment.", + "Download as": "Télécharger sous", + "Download": "Télécharger", + "Convert into": "Convertir en", + "Origin format": "Format d’origin", + "Failed to send notification": "Échec de l’envoi de la notification", + "Notification sent successfully": "Notification a été envoyée avec succès", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s a mentionné dans %2$s: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} a mentionné dans {file}: \"%1$s\"." },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index bc9a3a7..d7248ab 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Modello è stato cancellato con successo", "Common templates": "Modelli comuni", "Failed to delete template": "Impossibile eliminare il modello", - "File has been converted. Its content might look different.": "Il file è stato convertito. Il suo contenuto potrebbe avere un aspetto diverso." + "File has been converted. Its content might look different.": "Il file è stato convertito. Il suo contenuto potrebbe avere un aspetto diverso.", + "Download as": "Scaricare come", + "Download": "Scaricare", + "Convert into": "Convertire in", + "Origin format": "Formato di origine", + "Failed to send notification": "Invio di notifica non riuscito", + "Notification sent successfully": "Notifica è stata inviata con successo", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s ha menzionato in %2\$s: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} ha menzionato nel {file}: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); \ No newline at end of file diff --git a/l10n/it.json b/l10n/it.json index 5018c13..d693f0f 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Modello è stato cancellato con successo", "Common templates": "Modelli comuni", "Failed to delete template": "Impossibile eliminare il modello", - "File has been converted. Its content might look different.": "Il file è stato convertito. Il suo contenuto potrebbe avere un aspetto diverso." + "File has been converted. Its content might look different.": "Il file è stato convertito. Il suo contenuto potrebbe avere un aspetto diverso.", + "Download as": "Scaricare come", + "Download": "Scaricare", + "Convert into": "Convertire in", + "Origin format": "Formato di origine", + "Failed to send notification": "Invio di notifica non riuscito", + "Notification sent successfully": "Notifica è stata inviata con successo", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s ha menzionato in %2$s: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} ha menzionato nel {file}: \"%1$s\"." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/ja.js b/l10n/ja.js index 7917435..fc2ee54 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", "Failed to delete template": "テンプレートの削除に失敗しました", - "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。" + "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。", + "Download as": "別の形式でダウンロード", + "Download": "ダウンロード", + "Convert into": "に変換する", + "Origin format": "オリジンの形式", + "Failed to send notification": "通知を送信できませんでした", + "Notification sent successfully": "通知を送信しました", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s は %2\$s: \"%3\$s\"に記載されました。", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} は {file}: \"%1\$s\"に記載しました。" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/ja.json b/l10n/ja.json index 21aa267..102c036 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -99,6 +99,14 @@ "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", "Failed to delete template": "テンプレートの削除に失敗しました", - "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。" + "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。", + "Download as": "別の形式でダウンロード", + "Download": "ダウンロード", + "Convert into": "に変換する", + "Origin format": "オリジンの形式", + "Failed to send notification": "通知を送信できませんでした", + "Notification sent successfully": "通知を送信しました", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s は %2$s: \"%3$s\"に記載されました。", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} は {file}: \"%1$s\"に記載しました。" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/pl.js b/l10n/pl.js index 3616182..f3d12c2 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Szablon został pomyślnie usunięty", "Common templates": "Popularne szablony", "Failed to delete template": "Nie udało się usunąć szablonu", - "File has been converted. Its content might look different.": "Plik został przekonwertowany. Jego zawartość może wyglądać inaczej." + "File has been converted. Its content might look different.": "Plik został przekonwertowany. Jego zawartość może wyglądać inaczej.", + "Download as": "Pobierz jako", + "Download": "Pobierz", + "Convert into": "Konwertuj do", + "Origin format": "Oryginalny format", + "Failed to send notification": "Nie udało się wysłać powiadomienia", + "Notification sent successfully": "Powiadomienie zostało wysłane", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s dodał(a) w %2\$s następujący komentarz: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} dodał(a) w {file} następujący komentarz: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); \ No newline at end of file diff --git a/l10n/pl.json b/l10n/pl.json index 5e74393..0e52960 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Szablon został pomyślnie usunięty", "Common templates": "Popularne szablony", "Failed to delete template": "Nie udało się usunąć szablonu", - "File has been converted. Its content might look different.": "Plik został przekonwertowany. Jego zawartość może wyglądać inaczej." + "File has been converted. Its content might look different.": "Plik został przekonwertowany. Jego zawartość może wyglądać inaczej.", + "Download as": "Pobierz jako", + "Download": "Pobierz", + "Convert into": "Konwertuj do", + "Origin format": "Oryginalny format", + "Failed to send notification": "Nie udało się wysłać powiadomienia", + "Notification sent successfully": "Powiadomienie zostało wysłane", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s dodał(a) w %2$s następujący komentarz: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} dodał(a) w {file} następujący komentarz: \"%1$s\"." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 8731b08..34b1b59 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Modelo excluído com sucesso", "Common templates": "Modelos comuns", "Failed to delete template": "Falha ao excluir modelo", - "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente." + "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente.", + "Download as": "Baixar", + "Download": "Baixar como", + "Convert into": "Converter em", + "Origin format": "Formato de origem", + "Failed to send notification": "Falha ao enviar notificação", + "Notification sent successfully": "Notificação enviada com sucesso", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s mencionado em %2\$s: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} mencionado em {file}: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 5ed1329..a5099cd 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Modelo excluído com sucesso", "Common templates": "Modelos comuns", "Failed to delete template": "Falha ao excluir modelo", - "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente." + "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente.", + "Download as": "Baixar", + "Download": "Baixar como", + "Convert into": "Converter em", + "Origin format": "Formato de origem", + "Failed to send notification": "Falha ao enviar notificação", + "Notification sent successfully": "Notificação enviada com sucesso", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s mencionado em %2$s: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} mencionado em {file}: \"%1$s\"." },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/sv.js b/l10n/sv.js index 74b1012..0318bb0 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "Mallen har tagits bort", "Common templates": "Delade mallar", "Failed to delete template": "Det gick inte att ta bort mallen", - "File has been converted. Its content might look different.": "Filen har konverterats. Dess innehåll kan se annorlunda ut." + "File has been converted. Its content might look different.": "Filen har konverterats. Dess innehåll kan se annorlunda ut.", + "Download as": "Ladda ned som", + "Download": "Ladda ned", + "Convert into": "Konvertera till", + "Origin format": "Ursprungsformat", + "Failed to send notification": "Det gick inte att skicka aviseringen", + "Notification sent successfully": "Aviseringen har skickats", + "%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} har nämnt i {file}: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/sv.json b/l10n/sv.json index 1b61674..7621a63 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -99,6 +99,14 @@ "Template successfully deleted": "Mallen har tagits bort", "Common templates": "Delade mallar", "Failed to delete template": "Det gick inte att ta bort mallen", - "File has been converted. Its content might look different.": "Filen har konverterats. Dess innehåll kan se annorlunda ut." + "File has been converted. Its content might look different.": "Filen har konverterats. Dess innehåll kan se annorlunda ut.", + "Download as": "Ladda ned som", + "Download": "Ladda ned", + "Convert into": "Konvertera till", + "Origin format": "Ursprungsformat", + "Failed to send notification": "Det gick inte att skicka aviseringen", + "Notification sent successfully": "Aviseringen har skickats", + "%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} har nämnt i {file}: \"%1$s\"." },"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 8a0bfd2..744ce17 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -101,6 +101,14 @@ OC.L10N.register( "Template successfully deleted": "模板成功删除", "Common templates": "通用模板", "Failed to delete template": "删除模板失败", - "File has been converted. Its content might look different.": "文件已被转换。其内容可能看起来有所不同。" + "File has been converted. Its content might look different.": "文件已被转换。其内容可能看起来有所不同。", + "Download as": "下载为", + "Download": "下载", + "Convert into": "转换为", + "Origin format": "原产地格式", + "Failed to send notification": "发送通知失败", + "Notification sent successfully": "通知发送成功", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s 提到 %2\$s: \"%3\$s\".", + "{notifier} mentioned in the {file}: \"%1\$s\".": "{notifier} 提到 {file}: \"%1\$s\"." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index 913f1be..b253aab 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -99,6 +99,14 @@ "Template successfully deleted": "模板成功删除", "Common templates": "通用模板", "Failed to delete template": "删除模板失败", - "File has been converted. Its content might look different.": "文件已被转换。其内容可能看起来有所不同。" + "File has been converted. Its content might look different.": "文件已被转换。其内容可能看起来有所不同。", + "Download as": "下载为", + "Download": "下载", + "Convert into": "转换为", + "Origin format": "原产地格式", + "Failed to send notification": "发送通知失败", + "Notification sent successfully": "通知发送成功", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s 提到 %2$s: \"%3$s\".", + "{notifier} mentioned in the {file}: \"%1$s\".": "{notifier} 提到 {file}: \"%1$s\"." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file -- cgit v1.2.3 From 0860f95695d9d61def112068bae5dffcf7c70c13 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 15 Jul 2021 12:09:55 +0300 Subject: update submodule --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index d1d1822..2c722cc 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit d1d1822816a45528d5a92a7a258f557adc0450d5 +Subproject commit 2c722cce9e046999afbff7b956c9a9f6f8c773c0 -- cgit v1.2.3 From d62474f3002902d61df3e6b063e89780d3eb2c74 Mon Sep 17 00:00:00 2001 From: svetlana maleeva Date: Mon, 26 Jul 2021 14:49:46 +0300 Subject: Renamed DocumentServer/Document Editing Service -> ONLYOFFICE Docs --- controller/settingscontroller.php | 2 +- js/editor.js | 2 +- l10n/bg.js | 16 ++++++++-------- l10n/bg.json | 16 ++++++++-------- l10n/de.js | 16 ++++++++-------- l10n/de.json | 16 ++++++++-------- l10n/de_DE.js | 16 ++++++++-------- l10n/de_DE.json | 16 ++++++++-------- l10n/es.js | 16 ++++++++-------- l10n/es.json | 16 ++++++++-------- l10n/fr.js | 16 ++++++++-------- l10n/fr.json | 16 ++++++++-------- l10n/it.js | 16 ++++++++-------- l10n/it.json | 16 ++++++++-------- l10n/ja.js | 16 ++++++++-------- l10n/ja.json | 16 ++++++++-------- l10n/pl.js | 16 ++++++++-------- l10n/pl.json | 16 ++++++++-------- l10n/pt_BR.js | 16 ++++++++-------- l10n/pt_BR.json | 16 ++++++++-------- l10n/ru.js | 16 ++++++++-------- l10n/ru.json | 16 ++++++++-------- l10n/sv.js | 16 ++++++++-------- l10n/sv.json | 16 ++++++++-------- l10n/zh_CN.js | 18 +++++++++--------- l10n/zh_CN.json | 16 ++++++++-------- lib/documentservice.php | 2 +- templates/settings.php | 12 ++++++------ 28 files changed, 202 insertions(+), 202 deletions(-) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 09ce609..b7c3b65 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -154,7 +154,7 @@ class SettingsController extends Controller { ) { $error = null; if (!$this->config->SelectDemo($demo === true)) { - $error = $this->trans->t("The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server."); + $error = $this->trans->t("The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server."); } if ($demo !== true) { $this->config->SetDocumentServerUrl($documentserver); diff --git a/js/editor.js b/js/editor.js index 75257b8..3537a9d 100644 --- a/js/editor.js +++ b/js/editor.js @@ -144,7 +144,7 @@ if (config.editorConfig.tenant) { config.events.onAppReady = function () { - OCA.Onlyoffice.docEditor.showMessage(t(OCA.Onlyoffice.AppName, "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data.")); + OCA.Onlyoffice.docEditor.showMessage(t(OCA.Onlyoffice.AppName, "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.")); }; } diff --git a/l10n/bg.js b/l10n/bg.js index fc0b6a8..0394222 100644 --- a/l10n/bg.js +++ b/l10n/bg.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Невъзможно прочитане на xml файла на сървъра", "Bad Response. Errors: " : "Неправилен отговор. Грешки:", "Documentation" : "Документация", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Адреса на ONLYOFFICE Document услугата определя адреса на сървъра с инсталирани услуги за документи. Моля, променете '' адреса на сървъра в долния ред.", - "Document Editing Service address" : "Адрес на услугата за редактиране на документи", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Адреса на ONLYOFFICE Docs определя адреса на сървъра с инсталирани услуги за документи. Моля, променете '' адреса на сървъра в долния ред.", + "ONLYOFFICE Docs address" : "Адрес на ONLYOFFICE Docs", "Advanced server settings" : "Допълнителни настройки на сървъра", - "Document Editing Service address for internal requests from the server" : "Адрес на услугата за редактиране на документи за вътрешни заявки към сървъра", - "Server address for internal requests from the Document Editing Service" : "Адрес на сървъра за вътрешни заявки на услугата за редактиране на документи", + "ONLYOFFICE Docs address for internal requests from the server" : "Адрес на ONLYOFFICE Docs за вътрешни заявки към сървъра", + "Server address for internal requests from ONLYOFFICE Docs" : "Адрес на сървъра за вътрешни заявки на ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Секретен ключ (оставете празно за забрана)", "Open file in the same tab" : "Отваряне на файла в същия прозорец", "The default application for opening the format" : "Приложение по подразбиране за отваряне на следните формати", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Отваряне на файла за редактиране (според ограниченята на формата данните могат да бъдат загубени при запис във формати от списъка по-долу)", "View details" : "Виж детайли", "Save" : "Запази", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смесеното активно съдържание е недопустимо. За услугата за редактиране на документи е необходимо използването на HTTPS-адрес.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смесеното активно съдържание е недопустимо. За ONLYOFFICE Docs е необходимо използването на HTTPS-адрес.", "Restrict access to editors to following groups" : "Разреши достъп до редакторите само за тези групи", "Server settings" : "Настройки на сървъра", "Common settings" : "Общи настройки", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "Файлът е запазен", "Insert image" : "Вмъкване на изображение", "Select recipients" : "Изберете получатели", - "Connect to demo ONLYOFFICE Document Server" : "Свързване с демо ONLYOFFICE Сървър за Документи", + "Connect to demo ONLYOFFICE Docs server" : "Свързване с демо ONLYOFFICE Docs сървър", "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 Document Server." : "30-дневният тестов период приключи, вече не можете да се свържете с демо ONLYOFFICE Сървър за Документи.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Използвате обществения демо ONLYOFFICE Сървър за Документи. Моля, не съхранявайте чувствителни частни данни на него.", + "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" : "Активиране на воден знак", diff --git a/l10n/bg.json b/l10n/bg.json index 28c4eb7..ef9d35d 100644 --- a/l10n/bg.json +++ b/l10n/bg.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Невъзможно прочитане на xml файла на сървъра", "Bad Response. Errors: " : "Неправилен отговор. Грешки:", "Documentation" : "Документация", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Адреса на ONLYOFFICE Document услугата определя адреса на сървъра с инсталирани услуги за документи. Моля, променете '' адреса на сървъра в долния ред.", - "Document Editing Service address" : "Адрес на услугата за редактиране на документи", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Адреса на ONLYOFFICE Docs определя адреса на сървъра с инсталирани услуги за документи. Моля, променете '' адреса на сървъра в долния ред.", + "ONLYOFFICE Docs address" : "Адрес на ONLYOFFICE Docs", "Advanced server settings" : "Допълнителни настройки на сървъра", - "Document Editing Service address for internal requests from the server" : "Адрес на услугата за редактиране на документи за вътрешни заявки към сървъра", - "Server address for internal requests from the Document Editing Service" : "Адрес на сървъра за вътрешни заявки на услугата за редактиране на документи", + "ONLYOFFICE Docs address for internal requests from the server" : "Адрес на ONLYOFFICE Docs за вътрешни заявки към сървъра", + "Server address for internal requests from ONLYOFFICE Docs" : "Адрес на сървъра за вътрешни заявки на ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Секретен ключ (оставете празно за забрана)", "Open file in the same tab" : "Отваряне на файла в същия прозорец", "The default application for opening the format" : "Приложение по подразбиране за отваряне на следните формати", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Отваряне на файла за редактиране (според ограниченята на формата данните могат да бъдат загубени при запис във формати от списъка по-долу)", "View details" : "Виж детайли", "Save" : "Запази", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смесеното активно съдържание е недопустимо. За услугата за редактиране на документи е необходимо използването на HTTPS-адрес.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смесеното активно съдържание е недопустимо. За ONLYOFFICE Docs е необходимо използването на HTTPS-адрес.", "Restrict access to editors to following groups" : "Разреши достъп до редакторите само за тези групи", "Server settings" : "Настройки на сървъра", "Common settings" : "Общи настройки", @@ -56,10 +56,10 @@ "File saved" : "Файлът е запазен", "Insert image" : "Вмъкване на изображение", "Select recipients" : "Изберете получатели", - "Connect to demo ONLYOFFICE Document Server" : "Свързване с демо ONLYOFFICE Сървър за Документи", + "Connect to demo ONLYOFFICE Docs server" : "Свързване с демо ONLYOFFICE Docs сървър", "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 Document Server." : "30-дневният тестов период приключи, вече не можете да се свържете с демо ONLYOFFICE Сървър за Документи.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Използвате обществения демо ONLYOFFICE Сървър за Документи. Моля, не съхранявайте чувствителни частни данни на него.", + "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" : "Активиране на воден знак", diff --git a/l10n/de.js b/l10n/de.js index 804225d..24a7423 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", "Bad Response. Errors: " : "Bad Response. Fehler:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' für die Serveradresse in der folgenden Zeile.", - "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docsstandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' für die Serveradresse in der folgenden Zeile.", + "ONLYOFFICE Docs address" : "Die Adresse von ONLYOFFICE Docs", "Advanced server settings" : "Erweiterte Servereinstellungen", - "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", - "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service", + "ONLYOFFICE Docs address for internal requests from the server" : "Die Adresse von ONLYOFFICE Docs für interne Anforderungen vom Server", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradresse für interne Anforderungen vom ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)", "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen", "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffne die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "Save" : "Speichern", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "Datei wurde gespeichert", "Insert image" : "Bild einfügen", "Select recipients" : "Empfänger auswählen", - "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "Connect to demo ONLYOFFICE Docs server" : "Verbindung zu Demo ONLYOFFICE Docs Server herstellen", "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 Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Du kannst keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du verwendest den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutze ihn nicht zum Speichern von Deinen privaten sensiblen Daten.", + "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", diff --git a/l10n/de.json b/l10n/de.json index 7340de6..24a29c0 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", "Bad Response. Errors: " : "Bad Response. Fehler:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' für die Serveradresse in der folgenden Zeile.", - "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docsstandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' für die Serveradresse in der folgenden Zeile.", + "ONLYOFFICE Docs address" : "Die Adresse von ONLYOFFICE Docs", "Advanced server settings" : "Erweiterte Servereinstellungen", - "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", - "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service", + "ONLYOFFICE Docs address for internal requests from the server" : "Die Adresse von ONLYOFFICE Docs für interne Anforderungen vom Server", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradresse für interne Anforderungen vom ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)", "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen", "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffne die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "Save" : "Speichern", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -56,10 +56,10 @@ "File saved" : "Datei wurde gespeichert", "Insert image" : "Bild einfügen", "Select recipients" : "Empfänger auswählen", - "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "Connect to demo ONLYOFFICE Docs server" : "Verbindung zu Demo ONLYOFFICE Docs Server herstellen", "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 Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Du kannst keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du verwendest den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutze ihn nicht zum Speichern von Deinen privaten sensiblen Daten.", + "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", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 87e832f..797ecfd 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", "Bad Response. Errors: " : "Bad Response. Fehler:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", - "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docsstandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", + "ONLYOFFICE Docs address" : "Die Adresse von ONLYOFFICE Docs", "Advanced server settings" : "Erweiterte Servereinstellungen", - "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", - "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service", + "ONLYOFFICE Docs address for internal requests from the server" : "Die Adresse von ONLYOFFICE Docs für interne Anforderungen vom Server", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradresse für interne Anforderungen vom ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)", "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen", "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffnen Sie die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "Save" : "Speichern", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "Datei wurde gespeichert", "Insert image" : "Bild einfügen", "Select recipients" : "Empfänger auswählen", - "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "Connect to demo ONLYOFFICE Docs server": "Verbindung zu Demo ONLYOFFICE Docs Server herstellen", "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 Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Sie können keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Sie verwenden den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutzen Sie ihn nicht zum Speichern von Ihren privaten sensiblen Daten.", + "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", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index cb58722..1c04b89 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", "Bad Response. Errors: " : "Bad Response. Fehler:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", - "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docsstandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", + "ONLYOFFICE Docs address" : "Die Adresse von ONLYOFFICE Docs", "Advanced server settings" : "Erweiterte Servereinstellungen", - "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", - "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service", + "ONLYOFFICE Docs address for internal requests from the server" : "Die Adresse von ONLYOFFICE Docs für interne Anforderungen vom Server", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradresse für interne Anforderungen vom ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)", "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen", "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffnen Sie die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "Save" : "Speichern", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -56,10 +56,10 @@ "File saved" : "Datei wurde gespeichert", "Insert image" : "Bild einfügen", "Select recipients" : "Empfänger auswählen", - "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "Connect to demo ONLYOFFICE Docs server": "Verbindung zu Demo ONLYOFFICE Docs Server herstellen", "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 Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Sie können keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Sie verwenden den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutzen Sie ihn nicht zum Speichern von Ihren privaten sensiblen Daten.", + "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", diff --git a/l10n/es.js b/l10n/es.js index 7a36edb..8f106df 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Servidor no puede leer xml", "Bad Response. Errors: " : "Respuesta Mala. Errores:", "Documentation" : "Documentación", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Ubicación del Servidor de Documentos de ONLYOFFICE especifica la dirección del servidor con los servicios de documentos instalados. Por favor, cambie '' para la dirección de servidor en la línea inferior.", - "Document Editing Service address" : "Dirección del Servicio de Edición de Documentos", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Ubicación del ONLYOFFICE Docs especifica la dirección del servidor con los servicios de documentos instalados. Por favor, cambie '' para la dirección de servidor en la línea inferior.", + "ONLYOFFICE Docs address" : "Dirección de ONLYOFFICE Docs", "Advanced server settings" : "Ajustes de servidor avanzados", - "Document Editing Service address for internal requests from the server" : "Dirección del Servicio de Edición de Documentos para solicitudes internas del servidor", - "Server address for internal requests from the Document Editing Service" : "Dirección de servidor para solicitudes internas del Servicio de Edición de Documentos", + "ONLYOFFICE Docs address for internal requests from the server" : "Dirección de ONLYOFFICE Docs para solicitudes internas del servidor", + "Server address for internal requests from ONLYOFFICE Docs" : "Dirección de servidor para solicitudes internas del ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Clave secreta (deje en blanco o desactive)", "Open file in the same tab" : "Abrir archivo en la misma pestaña", "The default application for opening the format" : "La aplicación predeterminada para abrir el formato", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Abrir archivo para editar (debido a las restricciones de formato los datos podrían perderse al guardar en los formatos de la siguiente lista)", "View details" : "Ver detalles", "Save" : "Guardar", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "El archivo ha sido guardado", "Insert image" : "Insertar imagen", "Select recipients" : "Seleccionar destinatarios", - "Connect to demo ONLYOFFICE Document Server" : "Conectarse al ONLYOFFICE Document Server de demostración", + "Connect to demo ONLYOFFICE Docs server" : "Conectarse al servidor de ONLYOFFICE Docs de demostración", "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 Document Server." : "El período de prueba de 30 días ha terminado, ya no puedes conectarte al ONLYOFFICE Document Server de demostración", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Estás usando el ONLYOFFICE Document Server de demostración. Por favor, no almacenes tus datos confidenciales aquí.", + "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", diff --git a/l10n/es.json b/l10n/es.json index 24cd75a..dfff2b9 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Servidor no puede leer xml", "Bad Response. Errors: " : "Respuesta Mala. Errores:", "Documentation" : "Documentación", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Ubicación del Servidor de Documentos de ONLYOFFICE especifica la dirección del servidor con los servicios de documentos instalados. Por favor, cambie '' para la dirección de servidor en la línea inferior.", - "Document Editing Service address" : "Dirección del Servicio de Edición de Documentos", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Ubicación del ONLYOFFICE Docs especifica la dirección del servidor con los servicios de documentos instalados. Por favor, cambie '' para la dirección de servidor en la línea inferior.", + "ONLYOFFICE Docs address" : "Dirección de ONLYOFFICE Docs", "Advanced server settings" : "Ajustes de servidor avanzados", - "Document Editing Service address for internal requests from the server" : "Dirección del Servicio de Edición de Documentos para solicitudes internas del servidor", - "Server address for internal requests from the Document Editing Service" : "Dirección de servidor para solicitudes internas del Servicio de Edición de Documentos", + "ONLYOFFICE Docs address for internal requests from the server" : "Dirección de ONLYOFFICE Docs para solicitudes internas del servidor", + "Server address for internal requests from ONLYOFFICE Docs" : "Dirección de servidor para solicitudes internas del ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Clave secreta (deje en blanco o desactive)", "Open file in the same tab" : "Abrir archivo en la misma pestaña", "The default application for opening the format" : "La aplicación predeterminada para abrir el formato", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Abrir archivo para editar (debido a las restricciones de formato los datos podrían perderse al guardar en los formatos de la siguiente lista)", "View details" : "Ver detalles", "Save" : "Guardar", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", @@ -56,10 +56,10 @@ "File saved" : "El archivo ha sido guardado", "Insert image" : "Insertar imagen", "Select recipients" : "Seleccionar destinatarios", - "Connect to demo ONLYOFFICE Document Server" : "Conectarse al ONLYOFFICE Document Server de demostración", + "Connect to demo ONLYOFFICE Docs server" : "Conectarse al servidor de ONLYOFFICE Docs de demostración", "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 Document Server." : "El período de prueba de 30 días ha terminado, ya no puedes conectarte al ONLYOFFICE Document Server de demostración", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Estás usando el ONLYOFFICE Document Server de demostración. Por favor, no almacenes tus datos confidenciales aquí.", + "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", diff --git a/l10n/fr.js b/l10n/fr.js index ad97e74..39f0821 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Le serveur ne peut pas lire le XML", "Bad Response. Errors: " : "Mauvaise réponse. Erreurs:", "Documentation" : "Documentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "L'emplacement du service d'édition de document ONLYOFFICE désigne l'adresse du serveur sur lequel est installé le service de document. Veuillez modifier le '' avec l'adresse du serveur de service de document dans la ligne ci-dessous", - "Document Editing Service address" : "Adresse du service d'édition de document", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "L'emplacement du ONLYOFFICE Docs désigne l'adresse du serveur sur lequel est installé le service de document. Veuillez modifier le '' avec l'adresse du serveur de service de document dans la ligne ci-dessous", + "ONLYOFFICE Docs address" : "Adresse du ONLYOFFICE Docs", "Advanced server settings" : "Paramètres avancés du serveur", - "Document Editing Service address for internal requests from the server" : "Adresse du service d'édition de document pour les demandes internes du serveur", - "Server address for internal requests from the Document Editing Service" : "Adresse du serveur pour les demandes internes du service d'édition de document", + "ONLYOFFICE Docs address for internal requests from the server" : "Adresse du ONLYOFFICE Docs pour les demandes internes du serveur", + "Server address for internal requests from ONLYOFFICE Docs" : "Adresse du serveur pour les demandes internes du ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Clé secrète (laisser vide pour désactiver)", "Open file in the same tab" : "Ouvrir le fichier dans le même onglet", "The default application for opening the format" : "Application par défaut pour ouvrir le format", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Ouvrir le fichier pour édition (en raison de restrictions de format, des données peuvent être perdues lors de l'enregistrement dans les formats de la liste ci-dessous)", "View details" : "Voir les détails", "Save" : "Enregistrer", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le serveur de document est requise", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le ONLYOFFICE Docs est requise", "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants", "Server settings" : "Paramètres du serveur", "Common settings" : "Paramètres communs", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "Le fichier a été enregistré", "Insert image" : "Insérer une image", "Select recipients" : "Sélectionner les destinataires", - "Connect to demo ONLYOFFICE Document Server" : "Se connecter à la version démo de ONLYOFFICE Document Server", + "Connect to demo ONLYOFFICE Docs server" : "Se connecter à la version démo de ONLYOFFICE Docs", "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 Document 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 Document Server.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Vous utilisez la version démo de ONLYOFFICE Document Server, proposée à des fins de tests. Veuillez ne pas stocker vos données confidentielles.", + "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", diff --git a/l10n/fr.json b/l10n/fr.json index fceb0fd..4d6fea9 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Le serveur ne peut pas lire le XML", "Bad Response. Errors: " : "Mauvaise réponse. Erreurs:", "Documentation" : "Documentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "L'emplacement du service d'édition de document ONLYOFFICE désigne l'adresse du serveur sur lequel est installé le service de document. Veuillez modifier le '' avec l'adresse du serveur de service de document dans la ligne ci-dessous", - "Document Editing Service address" : "Adresse du service d'édition de document", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "L'emplacement du ONLYOFFICE Docs désigne l'adresse du serveur sur lequel est installé le service de document. Veuillez modifier le '' avec l'adresse du serveur de service de document dans la ligne ci-dessous", + "ONLYOFFICE Docs address" : "Adresse du ONLYOFFICE Docs", "Advanced server settings" : "Paramètres avancés du serveur", - "Document Editing Service address for internal requests from the server" : "Adresse du service d'édition de document pour les demandes internes du serveur", - "Server address for internal requests from the Document Editing Service" : "Adresse du serveur pour les demandes internes du service d'édition de document", + "ONLYOFFICE Docs address for internal requests from the server" : "Adresse du ONLYOFFICE Docs pour les demandes internes du serveur", + "Server address for internal requests from ONLYOFFICE Docs" : "Adresse du serveur pour les demandes internes du ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Clé secrète (laisser vide pour désactiver)", "Open file in the same tab" : "Ouvrir le fichier dans le même onglet", "The default application for opening the format" : "Application par défaut pour ouvrir le format", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Ouvrir le fichier pour édition (en raison de restrictions de format, des données peuvent être perdues lors de l'enregistrement dans les formats de la liste ci-dessous)", "View details" : "Voir les détails", "Save" : "Enregistrer", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le serveur de document est requise", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le ONLYOFFICE Docs est requise", "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants", "Server settings" : "Paramètres du serveur", "Common settings" : "Paramètres communs", @@ -56,10 +56,10 @@ "File saved" : "Le fichier a été enregistré", "Insert image" : "Insérer une image", "Select recipients" : "Sélectionner les destinataires", - "Connect to demo ONLYOFFICE Document Server" : "Se connecter à la version démo de ONLYOFFICE Document Server", + "Connect to demo ONLYOFFICE Docs server" : "Se connecter à la version démo de ONLYOFFICE Docs", "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 Document 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 Document Server.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Vous utilisez la version démo de ONLYOFFICE Document Server, proposée à des fins de tests. Veuillez ne pas stocker vos données confidentielles.", + "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", diff --git a/l10n/it.js b/l10n/it.js index bc9a3a7..d962c63 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Il server non può leggere xml", "Bad Response. Errors: " : "Risposta non corretta. Errori: ", "Documentation" : "Documentazione" , - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Document Service Location specifica l'indirizzo del server con i servizi documenti installati. Modifica il '' con l'indirizzo del server nella riga sottostante.", - "Document Editing Service address" : "Indirizzo del Document Editing Service", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs Location specifica l'indirizzo del server con i servizi documenti installati. Modifica il '' con l'indirizzo del server nella riga sottostante.", + "ONLYOFFICE Docs address" : "Indirizzo di ONLYOFFICE Docs", "Advanced server settings" : "Impostazioni avanzate del server", - "Document Editing Service address for internal requests from the server": "Indirizzo del Document Editing Service per le richieste interne del server", - "Server address for internal requests from the Document Editing Service": "Indirizzo del server per le richieste interne del Document Editing Service", + "ONLYOFFICE Docs address for internal requests from the server" : "Indirizzo di ONLYOFFICE Docs per le richieste interne del server", + "Server address for internal requests from ONLYOFFICE Docs" : "Indirizzo del server per le richieste interne da ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Chiave segreta (lasciare vuoto per disabilitare)", "Open file in the same tab" : "Apri il file nella stessa scheda", "The default application for opening the format": "L'applicazione predefinita per l'apertura del formato", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Apri il file per la modifica (a causa di restrizioni di formato, i dati potrebbero andare persi durante il salvataggio nei formati della lista sottostante)", "View details" : "Vedi dettagli", "Save" : "Salva", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Il contenuto attivo misto non è consentito. È richiesto l'indirizzo HTTPS per Document Server.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Il contenuto attivo misto non è consentito. È richiesto l'indirizzo HTTPS per ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Limita l'accesso degli editor ai seguenti gruppi", "Server settings" : "Impostazioni del server", "Common settings" : "Impostazioni comuni", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "File salvato", "Insert image" : "Inserisci l'immagine", "Select recipients" : "Seleziona i destinatari", - "Connect to demo ONLYOFFICE Document Server" : "Collegati alla demo di ONLYOFFICE Document Server", + "Connect to demo ONLYOFFICE Docs server" : "Collegati alla versione demo di ONLYOFFICE Docs", "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 Document Server." : "Il periodo di prova di 30 giorni è terminato; non è più possibile connettersi alla versione demo di ONLYOFFICE Document Server.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Stai utilizzando la versione demo pubblica di ONLYOFFICE Document Server. Non memorizzare dati sensibili privati.", + "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", diff --git a/l10n/it.json b/l10n/it.json index 5018c13..2303681 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Il server non può leggere xml", "Bad Response. Errors: " : "Risposta non corretta. Errori: ", "Documentation" : "Documentazione" , - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Document Service Location specifica l'indirizzo del server con i servizi documenti installati. Modifica il '' con l'indirizzo del server nella riga sottostante.", - "Document Editing Service address" : "Indirizzo del Document Editing Service", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs Location specifica l'indirizzo del server con i servizi documenti installati. Modifica il '' con l'indirizzo del server nella riga sottostante.", + "ONLYOFFICE Docs address" : "Indirizzo di ONLYOFFICE Docs", "Advanced server settings" : "Impostazioni avanzate del server", - "Document Editing Service address for internal requests from the server": "Indirizzo del Document Editing Service per le richieste interne del server", - "Server address for internal requests from the Document Editing Service": "Indirizzo del server per le richieste interne del Document Editing Service", + "ONLYOFFICE Docs address for internal requests from the server" : "Indirizzo di ONLYOFFICE Docs per le richieste interne del server", + "Server address for internal requests from ONLYOFFICE Docs" : "Indirizzo del server per le richieste interne da ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Chiave segreta (lasciare vuoto per disabilitare)", "Open file in the same tab" : "Apri il file nella stessa scheda", "The default application for opening the format": "L'applicazione predefinita per l'apertura del formato", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Apri il file per la modifica (a causa di restrizioni di formato, i dati potrebbero andare persi durante il salvataggio nei formati della lista sottostante)", "View details" : "Vedi dettagli", "Save" : "Salva", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Il contenuto attivo misto non è consentito. È richiesto l'indirizzo HTTPS per Document Server.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Il contenuto attivo misto non è consentito. È richiesto l'indirizzo HTTPS per ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Limita l'accesso degli editor ai seguenti gruppi", "Server settings" : "Impostazioni del server", "Common settings" : "Impostazioni comuni", @@ -56,10 +56,10 @@ "File saved" : "File salvato", "Insert image" : "Inserisci l'immagine", "Select recipients" : "Seleziona i destinatari", - "Connect to demo ONLYOFFICE Document Server" : "Collegati alla demo di ONLYOFFICE Document Server", + "Connect to demo ONLYOFFICE Docs server" : "Collegati alla versione demo di ONLYOFFICE Docs", "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 Document Server." : "Il periodo di prova di 30 giorni è terminato; non è più possibile connettersi alla versione demo di ONLYOFFICE Document Server.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Stai utilizzando la versione demo pubblica di ONLYOFFICE Document Server. Non memorizzare dati sensibili privati.", + "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", diff --git a/l10n/ja.js b/l10n/ja.js index 7917435..d261c66 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "サーバーでxmlを読み込ませんでした", "Bad Response. Errors: " : "不正なレスポンス エラー: ", "Documentation" : "ドキュメンテーション", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE ドキュメントサービスの位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", - "Document Editing Service address" : "ドキュメント編集サービスサーバーアドレス", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs の位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", + "ONLYOFFICE Docs address" : "ONLYOFFICE Docs アドレス", "Advanced server settings" : "詳細サーバー設定", - "Document Editing Service address for internal requests from the server": "内部利用向けドキュメント編集サービスアドレス", - "Server address for internal requests from the Document Editing Service": "内部利用向けドキュメント編集サービスアドレス", + "ONLYOFFICE Docs address for internal requests from the server" : "サーバーからの内部リクエストにはONLYOFFICE Docs アドレス", + "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsからの内部リクエストにはサーバーアドレス", "Secret key (leave blank to disable)" : "シークレットキー (ブランクで無効)", "Open file in the same tab" : "ファイルを同じタブで開く", "The default application for opening the format": "以下のファイルフォーマットをデフォルトで開く", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "編集できるファイルフォーマット (フォーマットの制限により、以下のフォーマットを保存する時にデータが失われる可能性があります)", "View details" : "詳細表示", "Save" : "保存", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "アクティブコンテンツの混在は許可されていません。ドキュメントサーバーにはHTTPSアドレスが必要です", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", "Restrict access to editors to following groups" : "アクセス編集できる人を以下のグループに制限する", "Server settings" : "サーバー設定", "Common settings" : "共通設定", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "ファイルが保存されました", "Insert image" : "画像を挿入", "Select recipients" : "受取者を選択", - "Connect to demo ONLYOFFICE Document Server" : "ONLYOFFICEドキュメントのデモサーバーに接続する", + "Connect to demo ONLYOFFICE Docs server" : "ONLYOFFICE Docsのデモサーバーに接続する", "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 Document Server." : "30日間のテスト期間が終了したら、ONLYOFFICEドキュメントデモサーバーには繋がらなくなります。", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "パブリックONLYOFFICEドキュメントサーバーを使っているので、プライベートな機密データを利用しないようにしてください。", + "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" : "透かしを有効", diff --git a/l10n/ja.json b/l10n/ja.json index 21aa267..505195e 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -30,18 +30,18 @@ "Server can't read xml" : "サーバーでxmlを読み込ませんでした", "Bad Response. Errors: " : "不正なレスポンス エラー: ", "Documentation" : "ドキュメンテーション", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE ドキュメントサービスの位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", - "Document Editing Service address" : "ドキュメント編集サービスサーバーアドレス", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs の位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", + "ONLYOFFICE Docs address" : "ONLYOFFICE Docs アドレス", "Advanced server settings" : "詳細サーバー設定", - "Document Editing Service address for internal requests from the server": "内部利用向けドキュメント編集サービスアドレス", - "Server address for internal requests from the Document Editing Service": "内部利用向けドキュメント編集サービスアドレス", + "ONLYOFFICE Docs address for internal requests from the server" : "サーバーからの内部リクエストにはONLYOFFICE Docs アドレス", + "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsからの内部リクエストにはサーバーアドレス", "Secret key (leave blank to disable)" : "シークレットキー (ブランクで無効)", "Open file in the same tab" : "ファイルを同じタブで開く", "The default application for opening the format": "以下のファイルフォーマットをデフォルトで開く", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "編集できるファイルフォーマット (フォーマットの制限により、以下のフォーマットを保存する時にデータが失われる可能性があります)", "View details" : "詳細表示", "Save" : "保存", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "アクティブコンテンツの混在は許可されていません。ドキュメントサーバーにはHTTPSアドレスが必要です", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", "Restrict access to editors to following groups" : "アクセス編集できる人を以下のグループに制限する", "Server settings" : "サーバー設定", "Common settings" : "共通設定", @@ -56,10 +56,10 @@ "File saved" : "ファイルが保存されました", "Insert image" : "画像を挿入", "Select recipients" : "受取者を選択", - "Connect to demo ONLYOFFICE Document Server" : "ONLYOFFICEドキュメントのデモサーバーに接続する", + "Connect to demo ONLYOFFICE Docs server" : "ONLYOFFICE Docsのデモサーバーに接続する", "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 Document Server." : "30日間のテスト期間が終了したら、ONLYOFFICEドキュメントデモサーバーには繋がらなくなります。", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "パブリックONLYOFFICEドキュメントサーバーを使っているので、プライベートな機密データを利用しないようにしてください。", + "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" : "透かしを有効", diff --git a/l10n/pl.js b/l10n/pl.js index 3616182..1c7a8e5 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Serwer nie może przeczytać xml", "Bad Response. Errors: " : "Zła odpowiedź. Błędy:", "Documentation" : "Dokumentacja", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Lokacja Usługi Dokumentów ONLYOFFICE to adres serwera na którym Usługi Dokumentów są zainstalowe. Proszę zmienić '' na adres poniżej.", - "Document Editing Service address" : "Adres Usługi Edycji Dokumentów", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Lokacja ONLYOFFICE Docs to adres serwera na którym Usługi Dokumentów są zainstalowe. Proszę zmienić '' na adres poniżej.", + "ONLYOFFICE Docs address" : "Adres ONLYOFFICE Docs", "Advanced server settings" : "Zaawansowane ustawienia serwera", - "Document Editing Service address for internal requests from the server" : "Adres Usługi Edycji Dokumentów dla zapytań wewnętrznych", - "Server address for internal requests from the Document Editing Service" : "Adres serwera dla zapytań wewnętrznych z Usługi Edycji Dokumentów", + "ONLYOFFICE Docs address for internal requests from the server" : "Adres ONLYOFFICE Docs dla zapytań wewnętrznych", + "Server address for internal requests from ONLYOFFICE Docs" : "Adres serwera dla zapytań wewnętrznych z ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Klucz zabezpieczeń (pozostaw puste aby wyłączyć)", "Open file in the same tab" : "Otwórz plik w tym samym oknie", "The default application for opening the format" : "Domyślna aplikacja do otwierania formatów", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Otwórz plik do edycji (ze względu na ograniczenia formatów, dane mogą zostac utracone przy zapisie do formatów podanych poniżej)", "View details" : "Szczegóły", "Save" : "Zapisz", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Aktywna Zawartość Mieszana nie jest dozwolona. Adres HTTPS jest wymagany dla Serwera Dokumentów.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Aktywna Zawartość Mieszana nie jest dozwolona. Adres HTTPS jest wymagany dla ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Ogranicz dostęp do edytorów dla tych grup", "Server settings" : "Ustawienia serwera", "Common settings" : "Ustawienia ogólne", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "Plik zapisany", "Insert image" : "Wstaw obraz", "Select recipients" : "Wybierz odbiorców", - "Connect to demo ONLYOFFICE Document Server" : "Połącz się z serwerem demo ONLYOFFICE", + "Connect to demo ONLYOFFICE Docs server" : "Połącz się z serwerem demo ONLYOFFICE Docs", "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 Document Server." : "Upłyneło 30 dni, nie możesz się już łączyć z serwerem demo.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Używasz publicznego serwera demo. Nie przechowuj tu prywatnych danych.", + "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", diff --git a/l10n/pl.json b/l10n/pl.json index 5e74393..1dd72d8 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Serwer nie może przeczytać xml", "Bad Response. Errors: " : "Zła odpowiedź. Błędy:", "Documentation" : "Dokumentacja", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Lokacja Usługi Dokumentów ONLYOFFICE to adres serwera na którym Usługi Dokumentów są zainstalowe. Proszę zmienić '' na adres poniżej.", - "Document Editing Service address" : "Adres Usługi Edycji Dokumentów", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Lokacja ONLYOFFICE Docs to adres serwera na którym Usługi Dokumentów są zainstalowe. Proszę zmienić '' na adres poniżej.", + "ONLYOFFICE Docs address" : "Adres ONLYOFFICE Docs", "Advanced server settings" : "Zaawansowane ustawienia serwera", - "Document Editing Service address for internal requests from the server" : "Adres Usługi Edycji Dokumentów dla zapytań wewnętrznych", - "Server address for internal requests from the Document Editing Service" : "Adres serwera dla zapytań wewnętrznych z Usługi Edycji Dokumentów", + "ONLYOFFICE Docs address for internal requests from the server" : "Adres ONLYOFFICE Docs dla zapytań wewnętrznych", + "Server address for internal requests from ONLYOFFICE Docs" : "Adres serwera dla zapytań wewnętrznych z ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Klucz zabezpieczeń (pozostaw puste aby wyłączyć)", "Open file in the same tab" : "Otwórz plik w tym samym oknie", "The default application for opening the format" : "Domyślna aplikacja do otwierania formatów", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Otwórz plik do edycji (ze względu na ograniczenia formatów, dane mogą zostac utracone przy zapisie do formatów podanych poniżej)", "View details" : "Szczegóły", "Save" : "Zapisz", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Aktywna Zawartość Mieszana nie jest dozwolona. Adres HTTPS jest wymagany dla Serwera Dokumentów.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Aktywna Zawartość Mieszana nie jest dozwolona. Adres HTTPS jest wymagany dla ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Ogranicz dostęp do edytorów dla tych grup", "Server settings" : "Ustawienia serwera", "Common settings" : "Ustawienia ogólne", @@ -56,10 +56,10 @@ "File saved" : "Plik zapisany", "Insert image" : "Wstaw obraz", "Select recipients" : "Wybierz odbiorców", - "Connect to demo ONLYOFFICE Document Server" : "Połącz się z serwerem demo ONLYOFFICE", + "Connect to demo ONLYOFFICE Docs server" : "Połącz się z serwerem demo ONLYOFFICE Docs", "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 Document Server." : "Upłyneło 30 dni, nie możesz się już łączyć z serwerem demo.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Używasz publicznego serwera demo. Nie przechowuj tu prywatnych danych.", + "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", diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 8731b08..563f28d 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Servidor não pode ler xml", "Bad Response. Errors: " : "Resposta ruim. Erros:", "Documentation" : "Documentação", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "O Endereço do Serviço de Edição de Documentos especifica o servidor onde o serviço de documentos está instalado.\nPor favor mude '' para o endereço do servidor na linha abaixo.", - "Document Editing Service address" : "Endereço do Serviço de Edição de Documentos", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "O Endereço do ONLYOFFICE Docs especifica o servidor onde o serviço de documentos está instalado.\nPor favor mude '' para o endereço do servidor na linha abaixo.", + "ONLYOFFICE Docs address" : "Endereço do ONLYOFFICE Docs", "Advanced server settings" : "Configurações avançadas do servidor", - "Document Editing Service address for internal requests from the server" : "Endereço do Serviço de Edição de Documentos para pedidos internos do servidor", - "Server address for internal requests from the Document Editing Service" : "Endereço do servidor para pedidos internos do Serviço de Edição de Documentos", + "ONLYOFFICE Docs address for internal requests from the server" : "Endereço do ONLYOFFICE Docs para pedidos internos do servidor", + "Server address for internal requests from ONLYOFFICE Docs" : "Endereço do servidor para pedidos internos do ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Chave secreta (deixe em branco para desativar)", "Open file in the same tab" : "Abrir arquivo na mesma aba", "The default application for opening the format" : "Aplicação padrão para os formatos", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Habilitar edição (devido à restrição dos formatos, dados podem ser perdidos ao salvar nos formatos abaixo)", "View details" : "Ver detalhes", "Save" : "Salvar", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o Servidor de Documentos.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Acesso apenas para os seguintes grupos", "Server settings" : "Configurações do servidor", "Common settings" : "Configurações comuns", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "O arquivo foi salvo", "Insert image" : "Inserir imagem", "Select recipients" : "Selecione os destinatários", - "Connect to demo ONLYOFFICE Document Server" : "Conectar ao Servidor de documentos de demonstração do ONLYOFFICE", + "Connect to demo ONLYOFFICE Docs server" : "Conectar ao Servidor de demonstração do ONLYOFFICE Docs", "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 Document Server." : "O período de teste de 30 dias acabou, você não pode mais se conectar ao Servidor de documentos de demonstração do ONLYOFFICE", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Você está usando o Servidor de documentos de demonstração pública. Não armazene dados confidenciais.", + "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", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 5ed1329..4bd031b 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Servidor não pode ler xml", "Bad Response. Errors: " : "Resposta ruim. Erros:", "Documentation" : "Documentação", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "O Endereço do Serviço de Edição de Documentos especifica o servidor onde o serviço de documentos está instalado.\nPor favor mude '' para o endereço do servidor na linha abaixo.", - "Document Editing Service address" : "Endereço do Serviço de Edição de Documentos", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "O Endereço do ONLYOFFICE Docs especifica o servidor onde o serviço de documentos está instalado.\nPor favor mude '' para o endereço do servidor na linha abaixo.", + "ONLYOFFICE Docs address" : "Endereço do ONLYOFFICE Docs", "Advanced server settings" : "Configurações avançadas do servidor", - "Document Editing Service address for internal requests from the server" : "Endereço do Serviço de Edição de Documentos para pedidos internos do servidor", - "Server address for internal requests from the Document Editing Service" : "Endereço do servidor para pedidos internos do Serviço de Edição de Documentos", + "ONLYOFFICE Docs address for internal requests from the server" : "Endereço do ONLYOFFICE Docs para pedidos internos do servidor", + "Server address for internal requests from ONLYOFFICE Docs" : "Endereço do servidor para pedidos internos do ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Chave secreta (deixe em branco para desativar)", "Open file in the same tab" : "Abrir arquivo na mesma aba", "The default application for opening the format" : "Aplicação padrão para os formatos", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Habilitar edição (devido à restrição dos formatos, dados podem ser perdidos ao salvar nos formatos abaixo)", "View details" : "Ver detalhes", "Save" : "Salvar", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o Servidor de Documentos.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o ONLYOFFICE Docs.", "Restrict access to editors to following groups" : "Acesso apenas para os seguintes grupos", "Server settings" : "Configurações do servidor", "Common settings" : "Configurações comuns", @@ -56,10 +56,10 @@ "File saved" : "O arquivo foi salvo", "Insert image" : "Inserir imagem", "Select recipients" : "Selecione os destinatários", - "Connect to demo ONLYOFFICE Document Server" : "Conectar ao Servidor de documentos de demonstração do ONLYOFFICE", + "Connect to demo ONLYOFFICE Docs server" : "Conectar ao Servidor de demonstração do ONLYOFFICE Docs", "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 Document Server." : "O período de teste de 30 dias acabou, você não pode mais se conectar ao Servidor de documentos de demonstração do ONLYOFFICE", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Você está usando o Servidor de documentos de demonstração pública. Não armazene dados confidenciais.", + "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", diff --git a/l10n/ru.js b/l10n/ru.js index 2353c83..6543f1b 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Невозможно прочитать xml файл на сервере", "Bad Response. Errors: " : "Неправильный ответ. Ошибки:", "Documentation" : "Документация", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Расположение службы документов ONLYOFFICE определяет адрес сервера с установлеными службами документов. Пожалуйста, замените '' в поле ниже на адрес сервера.", - "Document Editing Service address" : "Адрес службы редактирования документов", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Расположение ONLYOFFICE Docs определяет адрес сервера с установлеными службами документов. Пожалуйста, замените '' в поле ниже на адрес сервера.", + "ONLYOFFICE Docs address" : "Адрес ONLYOFFICE Docs", "Advanced server settings" : "Дополнительные настройки сервера", - "Document Editing Service address for internal requests from the server" : "Адрес службы редактирования документов для внутренних запросов сервера", - "Server address for internal requests from the Document Editing Service" : "Адрес сервера для внутренних запросов службы редактирования документов", + "ONLYOFFICE Docs address for internal requests from the server" : "Адрес ONLYOFFICE Docs для внутренних запросов сервера", + "Server address for internal requests from ONLYOFFICE Docs" : "Адрес сервера для внутренних запросов ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Секретный ключ (оставьте пустым для отключения)", "Open file in the same tab" : "Открыть файл в той же вкладке", "The default application for opening the format" : "Приложение по умолчанию для открытия формата", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Открыть файл на редактирование (из-за ограничений формата данные могут быть утеряны при сохранении в форматы из списка ниже)", "View details" : "Подробнее", "Save" : "Сохранить", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смешанное активное содержимое запрещено. Для Сервера документов необходимо использовать HTTPS-адрес.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смешанное активное содержимое запрещено. Для ONLYOFFICE Docs необходимо использовать HTTPS-адрес.", "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам", "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "Файл сохранён", "Insert image" : "Вставить изображение", "Select recipients" : "Выберите получателей", - "Connect to demo ONLYOFFICE Document Server" : "Подключиться к демонстрационному Серверу Документов ONLYOFFICE", + "Connect to demo ONLYOFFICE Docs server" : "Подключиться к демонстрационному серверу ONLYOFFICE Docs", "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 Document Server." : "30-дневный тестовый период закончен, вы больше не можете подключаться к демонстрационному Серверу Документов ONLYOFFICE", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Вы используете публичный демонстрационный сервер документов ONLYOFFICE. Пожалуйста, не храните конфиденциальные данные.", + "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" : "Включить водяной знак", diff --git a/l10n/ru.json b/l10n/ru.json index 107ea60..38b928e 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Невозможно прочитать xml файл на сервере", "Bad Response. Errors: " : "Неправильный ответ. Ошибки:", "Documentation" : "Документация", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Расположение службы документов ONLYOFFICE определяет адрес сервера с установлеными службами документов. Пожалуйста, замените '' в поле ниже на адрес сервера.", - "Document Editing Service address" : "Адрес службы редактирования документов", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Расположение ONLYOFFICE Docs определяет адрес сервера с установлеными службами документов. Пожалуйста, замените '' в поле ниже на адрес сервера.", + "ONLYOFFICE Docs address" : "Адрес ONLYOFFICE Docs", "Advanced server settings" : "Дополнительные настройки сервера", - "Document Editing Service address for internal requests from the server" : "Адрес службы редактирования документов для внутренних запросов сервера", - "Server address for internal requests from the Document Editing Service" : "Адрес сервера для внутренних запросов службы редактирования документов", + "ONLYOFFICE Docs address for internal requests from the server" : "Адрес ONLYOFFICE Docs для внутренних запросов сервера", + "Server address for internal requests from ONLYOFFICE Docs" : "Адрес сервера для внутренних запросов ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Секретный ключ (оставьте пустым для отключения)", "Open file in the same tab" : "Открыть файл в той же вкладке", "The default application for opening the format" : "Приложение по умолчанию для открытия формата", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Открыть файл на редактирование (из-за ограничений формата данные могут быть утеряны при сохранении в форматы из списка ниже)", "View details" : "Подробнее", "Save" : "Сохранить", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смешанное активное содержимое запрещено. Для Сервера документов необходимо использовать HTTPS-адрес.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смешанное активное содержимое запрещено. Для ONLYOFFICE Docs необходимо использовать HTTPS-адрес.", "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам", "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", @@ -56,10 +56,10 @@ "File saved" : "Файл сохранён", "Insert image" : "Вставить изображение", "Select recipients" : "Выберите получателей", - "Connect to demo ONLYOFFICE Document Server" : "Подключиться к демонстрационному Серверу Документов ONLYOFFICE", + "Connect to demo ONLYOFFICE Docs server" : "Подключиться к демонстрационному серверу ONLYOFFICE Docs", "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 Document Server." : "30-дневный тестовый период закончен, вы больше не можете подключаться к демонстрационному Серверу Документов ONLYOFFICE", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Вы используете публичный демонстрационный сервер документов ONLYOFFICE. Пожалуйста, не храните конфиденциальные данные.", + "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" : "Включить водяной знак", diff --git a/l10n/sv.js b/l10n/sv.js index 74b1012..2f79b28 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "Servern kan inte läsa XML", "Bad Response. Errors: " : "Felaktigt svar. Fel:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Dokumenttjänstens plats specificerar adressen till servern där ONLYOFFICE är installerad. Ändra '' till serverns adress i nedanstående rad.", - "Document Editing Service address" : "Adress till dokumentredigeringstjänsten", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs plats specificerar adressen till servern där ONLYOFFICE är installerad. Ändra '' till serverns adress i nedanstående rad.", + "ONLYOFFICE Docs address" : "Adress till ONLYOFFICE Docs", "Advanced server settings" : "Avancerade serverinställningar", - "Document Editing Service address for internal requests from the server" : "Adress till dokumentredigeringstjänsten för interna förfragningar från servern", - "Server address for internal requests from the Document Editing Service" : "Serveradress för interna förfrågningar från dokumentredigeringstjänsten", + "ONLYOFFICE Docs address for internal requests from the server" : "Adress till ONLYOFFICE Docs för interna förfragningar från servern", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradress för interna förfrågningar från ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Hemlig nyckel (lämna blank för att inaktivera)", "Open file in the same tab" : "Öppna dokument i samma flik", "The default application for opening the format" : "Standardprogram for att öppna format", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öppna filen för redigering (på grund av formatrestriktioner kan data gå förlorade när du sparar i format från listan nedan)", "View details" : "Visa detaljer", "Save" : "Spara", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Blandat aktivt innehåll är inte tillåtet. HTTPS-adress till dokumentserver krävs.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Blandat aktivt innehåll är inte tillåtet. HTTPS-adress till ONLYOFFICE Docs krävs.", "Restrict access to editors to following groups" : "Begränsa åtkomst till följande grupper", "Server settings" : "Serverinställningar", "Common settings" : "Allmänna inställningar", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "Filen har sparats", "Insert image" : "Infoga bild", "Select recipients" : "Välj mottagare", - "Connect to demo ONLYOFFICE Document Server" : "Anslut till demo ONLYOFFICE Dokumentserver", + "Connect to demo ONLYOFFICE Docs server" : "Anslut till demo ONLYOFFICE Docsserver", "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 Document Server." : "När 30-dagars testperioden är över, kan du inte längre ansluta till demo ONLYOFFICE Dokumentserver.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du använder en offentlig demo ONLYOFFICE Dokumentserver. Lagra inte privat känslig information.", + "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", diff --git a/l10n/sv.json b/l10n/sv.json index 1b61674..8505c15 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -30,18 +30,18 @@ "Server can't read xml" : "Servern kan inte läsa XML", "Bad Response. Errors: " : "Felaktigt svar. Fel:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "Dokumenttjänstens plats specificerar adressen till servern där ONLYOFFICE är installerad. Ändra '' till serverns adress i nedanstående rad.", - "Document Editing Service address" : "Adress till dokumentredigeringstjänsten", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs plats specificerar adressen till servern där ONLYOFFICE är installerad. Ändra '' till serverns adress i nedanstående rad.", + "ONLYOFFICE Docs address" : "Adress till ONLYOFFICE Docs", "Advanced server settings" : "Avancerade serverinställningar", - "Document Editing Service address for internal requests from the server" : "Adress till dokumentredigeringstjänsten för interna förfragningar från servern", - "Server address for internal requests from the Document Editing Service" : "Serveradress för interna förfrågningar från dokumentredigeringstjänsten", + "ONLYOFFICE Docs address for internal requests from the server" : "Adress till ONLYOFFICE Docs för interna förfragningar från servern", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradress för interna förfrågningar från ONLYOFFICE Docs", "Secret key (leave blank to disable)" : "Hemlig nyckel (lämna blank för att inaktivera)", "Open file in the same tab" : "Öppna dokument i samma flik", "The default application for opening the format" : "Standardprogram for att öppna format", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öppna filen för redigering (på grund av formatrestriktioner kan data gå förlorade när du sparar i format från listan nedan)", "View details" : "Visa detaljer", "Save" : "Spara", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Blandat aktivt innehåll är inte tillåtet. HTTPS-adress till dokumentserver krävs.", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Blandat aktivt innehåll är inte tillåtet. HTTPS-adress till ONLYOFFICE Docs krävs.", "Restrict access to editors to following groups" : "Begränsa åtkomst till följande grupper", "Server settings" : "Serverinställningar", "Common settings" : "Allmänna inställningar", @@ -56,10 +56,10 @@ "File saved" : "Filen har sparats", "Insert image" : "Infoga bild", "Select recipients" : "Välj mottagare", - "Connect to demo ONLYOFFICE Document Server" : "Anslut till demo ONLYOFFICE Dokumentserver", + "Connect to demo ONLYOFFICE Docs server" : "Anslut till demo ONLYOFFICE Docsserver", "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 Document Server." : "När 30-dagars testperioden är över, kan du inte längre ansluta till demo ONLYOFFICE Dokumentserver.", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du använder en offentlig demo ONLYOFFICE Dokumentserver. Lagra inte privat känslig information.", + "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", diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index 8a0bfd2..b599dc2 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -32,18 +32,18 @@ OC.L10N.register( "Server can't read xml" : "服务器无法读取XML", "Bad Response. Errors: " : "错误的返回: ", "Documentation" : "文档集", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE 文档服务地址需要一个确切的文档服务器的地址,请在下方的'' 中填入。", - "Document Editing Service address" : "文档编辑服务地址", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs 位置指定了安装了文档服务的服务器的地址,请将''改为下面一行中的服务器地址。", + "ONLYOFFICE Docs address" : "ONLYOFFICE Docs地址", "Advanced server settings" : "更多设置", - "Document Editing Service address for internal requests from the server": "用于服务器内部访问的文档编辑服务器的地址", - "Server address for internal requests from the Document Editing Service": "用于文档编辑服务内部请求的服务器的地址", + "ONLYOFFICE Docs address for internal requests from the server" : "用于服务器内部的ONLYOFFICE Docs的地址", + "Server address for internal requests from ONLYOFFICE Docs" : "用于ONLYOFFICE Docs内部请求的服务器的地址", "Secret key (leave blank to disable)" : "秘钥(留空为关闭)", "Open file in the same tab" : "在相同的切签中打开", "The default application for opening the format": "默认关联的文件格式", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "默认的文件编辑器 (由于文件格式限制,保存为下列格式时,数据可能会缺失)", "View details" : "查看详情", "Save" : "保存", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "不允许混合活动内容,请使用HTTPS连接文件服务器。", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "不允许混合活动内容,请使用HTTPS连接ONLYOFFICE Docs。", "Restrict access to editors to following groups" : "仅授权的用户组可以使用该服务", "Server settings" : "服务器设置", "Common settings" : "常用设置", @@ -58,10 +58,10 @@ OC.L10N.register( "File saved" : "文件已保存", "Insert image" : "插入图片", "Select recipients" : "选择接收者", - "Connect to demo ONLYOFFICE Document Server" : "连接到 ONLYOFFICE 演示服务器", - "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 Document Server." : "30天试用期已结束,无法连接演示服务器。", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "您正在使用公开的演示服务器,请勿存储隐私数据。", + "Connect to demo ONLYOFFICE Docs server" : "连接到 ONLYOFFICE Docs 服务器的演示", + "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" : "启用水印", diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index 913f1be..105095d 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -30,18 +30,18 @@ "Server can't read xml" : "服务器无法读取XML", "Bad Response. Errors: " : "错误的返回: ", "Documentation" : "文档集", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE 文档服务地址需要一个确切的文档服务器的地址,请在下方的'' 中填入。", - "Document Editing Service address" : "文档编辑服务地址", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs 位置指定了安装了文档服务的服务器的地址,请将''改为下面一行中的服务器地址。", + "ONLYOFFICE Docs address" : "ONLYOFFICE Docs地址", "Advanced server settings" : "更多设置", - "Document Editing Service address for internal requests from the server": "用于服务器内部访问的文档编辑服务器的地址", - "Server address for internal requests from the Document Editing Service": "用于文档编辑服务内部请求的服务器的地址", + "ONLYOFFICE Docs address for internal requests from the server" : "用于服务器内部的ONLYOFFICE Docs的地址", + "Server address for internal requests from ONLYOFFICE Docs" : "用于ONLYOFFICE Docs内部请求的服务器的地址", "Secret key (leave blank to disable)" : "秘钥(留空为关闭)", "Open file in the same tab" : "在相同的切签中打开", "The default application for opening the format": "默认关联的文件格式", "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "默认的文件编辑器 (由于文件格式限制,保存为下列格式时,数据可能会缺失)", "View details" : "查看详情", "Save" : "保存", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "不允许混合活动内容,请使用HTTPS连接文件服务器。", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "不允许混合活动内容,请使用HTTPS连接ONLYOFFICE Docs。", "Restrict access to editors to following groups" : "仅授权的用户组可以使用该服务", "Server settings" : "服务器设置", "Common settings" : "常用设置", @@ -56,10 +56,10 @@ "File saved" : "文件已保存", "Insert image" : "插入图片", "Select recipients" : "选择接收者", - "Connect to demo ONLYOFFICE Document Server" : "连接到 ONLYOFFICE 演示服务器", + "Connect to demo ONLYOFFICE Docs server" : "连接到 ONLYOFFICE Docs 服务器的演示", "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 Document Server." : "30天试用期已结束,无法连接演示服务器。", - "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "您正在使用公开的演示服务器,请勿存储隐私数据。", + "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" : "启用水印", diff --git a/lib/documentservice.php b/lib/documentservice.php index 308d1d6..5069506 100644 --- a/lib/documentservice.php +++ b/lib/documentservice.php @@ -383,7 +383,7 @@ class DocumentService { if (preg_match("/^https:\/\//i", $urlGenerator->getAbsoluteURL("/")) && preg_match("/^http:\/\//i", $this->config->GetDocumentServerUrl())) { - throw new \Exception($this->trans->t("Mixed Active Content is not allowed. HTTPS address for Document Server is required.")); + throw new \Exception($this->trans->t("Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.")); } } catch (\Exception $e) { diff --git a/templates/settings.php b/templates/settings.php index 2620651..73372d6 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -37,9 +37,9 @@

    t("Server settings")) ?>

    -

    t("ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.")) ?>

    +

    t("ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.")) ?>

    -

    t("Document Editing Service address")) ?>

    +

    t("ONLYOFFICE Docs address")) ?>

    " placeholder="https:///" type="text">

    @@ -62,10 +62,10 @@

    -

    t("Document Editing Service address for internal requests from the server")) ?>

    +

    t("ONLYOFFICE Docs address for internal requests from the server")) ?>

    " placeholder="https:///" type="text">

    -

    t("Server address for internal requests from the Document Editing Service")) ?>

    +

    t("Server address for internal requests from ONLYOFFICE Docs")) ?>

    " placeholder="" type="text">

    @@ -78,13 +78,13 @@ checked="checked" disabled="disabled" /> - +
    t("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.")) ?> - t("The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server.")) ?> + t("The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.")) ?>

    -- cgit v1.2.3 From 8c3cb3ea1886048012312afc66b9c15a0e12e53b Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 28 Jul 2021 12:01:37 +0300 Subject: check if ext exists --- controller/editorcontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 1521641..4660c39 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -1109,7 +1109,7 @@ class EditorController extends Controller { $fileName = $file->getName(); $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); - $format = $this->config->FormatsSetting()[$ext]; + $format = !empty($ext) ? $this->config->FormatsSetting()[$ext] : null; if (!isset($format)) { $this->logger->info("Format is not supported for editing: $fileName", ["app" => $this->appName]); return ["error" => $this->trans->t("Format is not supported")]; -- cgit v1.2.3 From 4b3a12f45d325643f68cad25c625afcda54d2f62 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 28 Jul 2021 12:36:06 +0300 Subject: hide favorite for template --- controller/editorcontroller.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 4660c39..ae17e08 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -1253,13 +1253,13 @@ class EditorController extends Controller { $templatesList = TemplateManager::GetGlobalTemplates($file->getMimeType()); if (!empty($templatesList)) { $templates = []; - foreach($templatesList as $template) { - $createParam["templateId"] = $template->getId(); - $createParam["name"] = $template->getName(); + foreach($templatesList as $templateItem) { + $createParam["templateId"] = $templateItem->getId(); + $createParam["name"] = $templateItem->getName(); array_push($templates, [ "image" => "", - "title" => $template->getName(), + "title" => $templateItem->getName(), "url" => urldecode($this->urlGenerator->linkToRouteAbsolute($this->appName . ".editor.create_new", $createParam)) ]); } @@ -1267,7 +1267,9 @@ class EditorController extends Controller { $params["editorConfig"]["templates"] = $templates; } - $params["document"]["info"]["favorite"] = $this->isFavorite($fileId); + if (!$template) { + $params["document"]["info"]["favorite"] = $this->isFavorite($fileId); + } $params["_file_path"] = $userFolder->getRelativePath($file->getPath()); } -- cgit v1.2.3 From b70de8c79e4fbebeff651698f0468d17166b60e5 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 28 Jul 2021 12:42:13 +0300 Subject: hide history for template --- js/editor.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/editor.js b/js/editor.js index 3537a9d..ec52ddf 100644 --- a/js/editor.js +++ b/js/editor.js @@ -132,14 +132,17 @@ config.events = { "onDocumentStateChange": setPageTitle, - "onRequestHistory": OCA.Onlyoffice.onRequestHistory, - "onRequestHistoryData": OCA.Onlyoffice.onRequestHistoryData, "onDocumentReady": OCA.Onlyoffice.onDocumentReady, "onMakeActionLink": OCA.Onlyoffice.onMakeActionLink, }; - if (!OCA.Onlyoffice.version) { - config.events.onRequestHistoryClose = OCA.Onlyoffice.onRequestHistoryClose; + if (!OCA.Onlyoffice.template) { + config.events.onRequestHistory = OCA.Onlyoffice.onRequestHistory; + config.events.onRequestHistoryData = OCA.Onlyoffice.onRequestHistoryData; + + if (!OCA.Onlyoffice.version) { + config.events.onRequestHistoryClose = OCA.Onlyoffice.onRequestHistoryClose; + } } if (config.editorConfig.tenant) { -- cgit v1.2.3 From 0606869c2e161110906620521a4cfadf93091a2a Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 28 Jul 2021 13:44:21 +0300 Subject: check isUpdateable folder on saveAs --- controller/editorcontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index ae17e08..55581aa 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -566,7 +566,7 @@ class EditorController extends Controller { $this->logger->error("Folder for saving file was not found: $dir", ["app" => $this->appName]); return ["error" => $this->trans->t("The required folder was not found")]; } - if (!$folder->isCreatable()) { + if (!($folder->isCreatable() && $folder->isUpdateable())) { $this->logger->error("Folder for saving file without permission: $dir", ["app" => $this->appName]); return ["error" => $this->trans->t("You don't have enough permission to create")]; } -- cgit v1.2.3 From c26abcbb03cc707d16f90d50c193c26a89802574 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 29 Jul 2021 12:53:34 +0300 Subject: fix saveAs for template --- js/editor.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/editor.js b/js/editor.js index ec52ddf..062af8f 100644 --- a/js/editor.js +++ b/js/editor.js @@ -272,10 +272,12 @@ url: event.data.url }; - var arrayPath = OCA.Onlyoffice.filePath.split("/"); - arrayPath.pop(); - arrayPath.shift(); - saveData.dir = "/" + arrayPath.join("/"); + if (OCA.Onlyoffice.filePath) { + var arrayPath = OCA.Onlyoffice.filePath.split("/"); + arrayPath.pop(); + arrayPath.shift(); + saveData.dir = "/" + arrayPath.join("/"); + } if (OCA.Onlyoffice.inframe) { window.parent.postMessage({ -- cgit v1.2.3 From d751c5e17b7af0ae3da17cf77a8ad6046bd0649a Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 2 Aug 2021 11:46:51 +0300 Subject: 7.1.0 --- CHANGELOG.md | 6 +++++- appinfo/info.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5cd7d3..840b520 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Change Log +## 7.1.0 ## Added - mentions in comments - favorite status in the editor @@ -10,9 +11,12 @@ ## Changed - redirect from dashboard on desktop -- compatible with Nextcloud 22 - Nextcloud v19 is no longer supported +## 7.0.4 +## Changed +- compatible with Nextcloud 22 + ## 7.0.2 ## Changed - fixed registration of file actions diff --git a/appinfo/info.xml b/appinfo/info.xml index 1a4dff4..b835d8c 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ 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. apache Ascensio System SIA - 7.0.4 + 7.1.0 Onlyoffice -- cgit v1.2.3