From c4c569a1923114d5ef5dd4ad9ceb50e64077458c Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 14 Feb 2024 16:00:59 +0300 Subject: [PATCH] fix: format icons to separate file --- css/format.css | 30 +++++++++++++++++++++++++++ css/main.css | 12 ----------- lib/listeners/filesharinglistener.php | 1 + lib/listeners/fileslistener.php | 1 + lib/listeners/viewerlistener.php | 1 + 5 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 css/format.css diff --git a/css/format.css b/css/format.css new file mode 100644 index 0000000..e0b439a --- /dev/null +++ b/css/format.css @@ -0,0 +1,30 @@ +/** + * + * (c) Copyright Ascensio System SIA 2024 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + + .icon-onlyoffice-new-docx { + background-image: url("../img/new-docx.svg"); +} +.icon-onlyoffice-new-xlsx { + background-image: url("../img/new-xlsx.svg"); +} +.icon-onlyoffice-new-pptx { + background-image: url("../img/new-pptx.svg"); +} +.icon-onlyoffice-new-docxf { + background-image: url("../img/new-docxf.svg"); +} \ No newline at end of file diff --git a/css/main.css b/css/main.css index e2742fc..efac08c 100644 --- a/css/main.css +++ b/css/main.css @@ -16,18 +16,6 @@ * */ -.icon-onlyoffice-new-docx { - background-image: url("../img/new-docx.svg"); -} -.icon-onlyoffice-new-xlsx { - background-image: url("../img/new-xlsx.svg"); -} -.icon-onlyoffice-new-pptx { - background-image: url("../img/new-pptx.svg"); -} -.icon-onlyoffice-new-docxf { - background-image: url("../img/new-docxf.svg"); -} .icon-onlyoffice-open, .icon-onlyoffice-convert, .icon-onlyoffice-download, diff --git a/lib/listeners/filesharinglistener.php b/lib/listeners/filesharinglistener.php index 2fdf4bb..3fde491 100644 --- a/lib/listeners/filesharinglistener.php +++ b/lib/listeners/filesharinglistener.php @@ -89,6 +89,7 @@ class FileSharingListener implements IEventListener { }); Util::addStyle("onlyoffice", "main"); + Util::addStyle("onlyoffice", "format"); } } } diff --git a/lib/listeners/fileslistener.php b/lib/listeners/fileslistener.php index 16ba11b..4dcc220 100644 --- a/lib/listeners/fileslistener.php +++ b/lib/listeners/fileslistener.php @@ -98,6 +98,7 @@ class FilesListener implements IEventListener { Util::addStyle("onlyoffice", "main"); Util::addStyle("onlyoffice", "template"); + Util::addStyle("onlyoffice", "format"); } } } diff --git a/lib/listeners/viewerlistener.php b/lib/listeners/viewerlistener.php index 300dfd6..5223e16 100644 --- a/lib/listeners/viewerlistener.php +++ b/lib/listeners/viewerlistener.php @@ -82,6 +82,7 @@ class ViewerListener implements IEventListener { Util::addScript("onlyoffice", "listener", "viewer"); Util::addStyle("onlyoffice", "viewer"); + Util::addStyle("onlyoffice", "format"); $container = $this->serverContainer; $this->initialState->provideLazyInitialState("settings", function () use ($container) {