Skip to content

Commit

Permalink
Merge pull request #377 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/7.3.3
  • Loading branch information
LinneyS authored Mar 14, 2022
2 parents 4d79239 + 31b8ed0 commit e833f47
Show file tree
Hide file tree
Showing 59 changed files with 159 additions and 132 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## 7.3.3
## Added
- Turkish and Galician empty file templates

## Changed
- redesign of the creation dialog

## 7.3.1
## Added
- support docxf and oform formats
Expand Down
2 changes: 1 addition & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion appinfo/application.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within ownCloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.</description>
<licence>apl2</licence>
<author>Ascensio System SIA</author>
<version>7.3.1</version>
<version>7.3.3</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
Expand Down
2 changes: 1 addition & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion assets
2 changes: 1 addition & 1 deletion controller/callbackcontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion controller/editorapicontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
38 changes: 15 additions & 23 deletions controller/editorcontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -140,11 +140,6 @@ class EditorController extends Controller {
*/
private $groupManager;

/**
* Mobile regex from https://github.com/ONLYOFFICE/CommunityServer/blob/v9.1.1/web/studio/ASC.Web.Studio/web.appsettings.config#L35
*/
const USER_AGENT_MOBILE = "/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i";

/**
* @param string $AppName - application name
* @param IRequest $request - request object
Expand Down Expand Up @@ -693,16 +688,15 @@ public function save($name, $dir, $url) {
* Get versions history for file
*
* @param integer $fileId - file identifier
* @param string $shareToken - access token
*
* @return array
*
* @NoAdminRequired
*/
public function history($fileId, $shareToken = null) {
public function history($fileId) {
$this->logger->debug("Request history for: $fileId", ["app" => $this->appName]);

if (empty($shareToken) && !$this->config->isUserAllowedToUse()) {
if (!$this->config->isUserAllowedToUse()) {
return ["error" => $this->trans->t("Not permitted")];
}

Expand All @@ -714,7 +708,7 @@ public function history($fileId, $shareToken = null) {
$userId = $user->getUID();
}

list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->fileUtility->getFileByToken($fileId, $shareToken);
list ($file, $error, $share) = $this->getFile($userId, $fileId);

if (isset($error)) {
$this->logger->error("History: $fileId $error", ["app" => $this->appName]);
Expand Down Expand Up @@ -813,16 +807,15 @@ public function history($fileId, $shareToken = null) {
*
* @param integer $fileId - file identifier
* @param integer $version - file version
* @param string $shareToken - access token
*
* @return array
*
* @NoAdminRequired
*/
public function version($fileId, $version, $shareToken = null) {
public function version($fileId, $version) {
$this->logger->debug("Request version for: $fileId ($version)", ["app" => $this->appName]);

if (empty($shareToken) && !$this->config->isUserAllowedToUse()) {
if (!$this->config->isUserAllowedToUse()) {
return ["error" => $this->trans->t("Not permitted")];
}

Expand All @@ -834,7 +827,7 @@ public function version($fileId, $version, $shareToken = null) {
$userId = $user->getUID();
}

list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->fileUtility->getFileByToken($fileId, $shareToken);
list ($file, $error, $share) = $this->getFile($userId, $fileId);

if (isset($error)) {
$this->logger->error("History: $fileId $error", ["app" => $this->appName]);
Expand Down Expand Up @@ -863,14 +856,14 @@ public function version($fileId, $version, $shareToken = null) {
$key = $this->fileUtility->getKey($file, true);
$versionId = $file->getFileInfo()->getMtime();

$fileUrl = $this->getUrl($file, $user, $shareToken);
$fileUrl = $this->getUrl($file, $user);
} else {
$fileVersion = array_values($versions)[$version - 1];

$key = $this->fileUtility->getVersionKey($fileVersion);
$versionId = $fileVersion->getRevisionId();

$fileUrl = $this->getUrl($file, $user, $shareToken, $version);
$fileUrl = $this->getUrl($file, $user, null, $version);
}
$key = DocumentService::GenerateRevisionId($key);

Expand All @@ -884,14 +877,14 @@ public function version($fileId, $version, $shareToken = null) {
&& count($versions) >= $version - 1
&& FileVersions::hasChanges($ownerId, $fileId, $versionId)) {

$changesUrl = $this->getUrl($file, $user, $shareToken, $version, true);
$changesUrl = $this->getUrl($file, $user, null, $version, true);
$result["changesUrl"] = $changesUrl;

$prevVersion = array_values($versions)[$version - 2];
$prevVersionKey = $this->fileUtility->getVersionKey($prevVersion);
$prevVersionKey = DocumentService::GenerateRevisionId($prevVersionKey);

$prevVersionUrl = $this->getUrl($file, $user, $shareToken, $version - 1);
$prevVersionUrl = $this->getUrl($file, $user, null, $version - 1);

$result["previous"] = [
"key" => $prevVersionKey,
Expand All @@ -912,17 +905,16 @@ public function version($fileId, $version, $shareToken = null) {
*
* @param integer $fileId - file identifier
* @param integer $version - file version
* @param string $shareToken - access token
*
* @return array
*
* @NoAdminRequired
* @PublicPage
*/
public function restore($fileId, $version, $shareToken = null) {
public function restore($fileId, $version) {
$this->logger->debug("Request restore version for: $fileId ($version)", ["app" => $this->appName]);

if (empty($shareToken) && !$this->config->isUserAllowedToUse()) {
if (!$this->config->isUserAllowedToUse()) {
return ["error" => $this->trans->t("Not permitted")];
}

Expand All @@ -934,7 +926,7 @@ public function restore($fileId, $version, $shareToken = null) {
$userId = $user->getUID();
}

list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->fileUtility->getFileByToken($fileId, $shareToken);
list ($file, $error, $share) = $this->getFile($userId, $fileId);

if (isset($error)) {
$this->logger->error("Restore: $fileId $error", ["app" => $this->appName]);
Expand All @@ -959,7 +951,7 @@ public function restore($fileId, $version, $shareToken = null) {
}
}

return $this->history($fileId, $shareToken);
return $this->history($fileId);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion controller/federationcontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion controller/settingsapicontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion controller/settingscontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion controller/templatecontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2020
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion controller/webassetcontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion css/editor.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion css/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
5 changes: 4 additions & 1 deletion css/settings.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,6 +44,9 @@
#onlyofficeAddrSave {
float: left;
}
#onlyofficeSave {
margin-bottom: 25px;
}
.onlyoffice-demo {
margin-left: 90px;
}
Expand Down
27 changes: 19 additions & 8 deletions css/template.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2020
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,9 +18,15 @@

.onlyoffice-template-container {
margin-left: 0px !important;
max-width: 500px;
}
.onlyoffice-template-container li {
margin-bottom: 10px;
height: 27px;
padding-top: 5px;
}
.onlyoffice-template-container.container-dialog li:hover,
.onlyoffice-template-item.selected {
background-color: rgb(230, 230, 230);
}
.onlyoffice-template-item img,
.onlyoffice-template-item p,
Expand All @@ -30,20 +36,25 @@
margin-right: 10px;
cursor: pointer;
}
.onlyoffice-template-item.item-dialog {
padding-left: 5px;
}
.onlyoffice-template-delete,
.onlyoffice-template-download {
margin-bottom: -4px;
margin-bottom: 2px;
opacity: .8;
}
.onlyoffice-template-item p {
max-width: 400px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.onlyoffice-template-item img {
float: left;
margin-top: 3px;
}
.onlyoffice-template-item input {
position: absolute;
left: -10000px;
}
.onlyoffice-template-item input:checked + label {
.onlyoffice-template-item.selected label {
color: rgb(55, 137, 243);
}
.onlyoffice-template-download {
Expand Down
2 changes: 1 addition & 1 deletion js/desktop.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
* (c) Copyright Ascensio System SIA 2022
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit e833f47

Please sign in to comment.