Skip to content

Commit

Permalink
Merge pull request #574 from ONLYOFFICE/release/7.3.0
Browse files Browse the repository at this point in the history
Release/7.3.0
  • Loading branch information
LinneyS authored Jan 18, 2022
2 parents 1a51c8e + dc3870a commit 9806407
Show file tree
Hide file tree
Showing 38 changed files with 540 additions and 100 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.0
## Added
- support docxf and oform formats
- create blank docxf from creation menu
- create docxf from docx from creation menu
- create oform from docxf from document manager

## 7.2.1
## Added
- check document server version
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The app allows to:

Supported formats:

* For viewing and editing: DOCX, XLSX, PPTX, CSV, TXT.
* For viewing and editing: DOCX, XLSX, PPTX, CSV, TXT, DOCXF, OFORM.
* For viewing only: PDF.
* For converting to Office Open XML formats: DOC, DOCM, DOT, DOTX, EPUB, HTM, HTML, ODP, ODT, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, RTF, XLS, XLSM, XLT, XLTM, XLTX.

Expand Down Expand Up @@ -172,18 +172,17 @@ The table below will help you to make the right choice.
| **Support** | **Community Edition** | **Enterprise Edition** |
| 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) |
| Premium support | [Contact us](mailto:sales@onlyoffice.com) | [Contact us](mailto:sales@onlyoffice.com) |
| **Services** | **Community Edition** | **Enterprise Edition** |
| Conversion Service | + | + |
| Document Builder Service | + | + |
| **Interface** | **Community Edition** | **Enterprise Edition** |
| Tabbed interface | + | + |
| Dark theme | + | + |
| 150% scaling | + | + |
| 125%, 150%, 175%, 200% scaling | + | + |
| White Label | - | - |
| Integrated test example (node.js)* | - | + |
| Mobile web editors | - | + |
| Access to pro features via desktop | - | + |
| Integrated test example (node.js) | + | + |
| Mobile web editors | - | +* |
| **Plugins & Macros** | **Community Edition** | **Enterprise Edition** |
| Plugins | + | + |
| Macros | + | + |
Expand All @@ -197,30 +196,34 @@ The table below will help you to make the right choice.
| **Document Editor features** | **Community Edition** | **Enterprise Edition** |
| Font and paragraph formatting | + | + |
| Object insertion | + | + |
| Adding Content control | - | + |
| Adding Content control | + | + |
| Editing Content control | + | + |
| Layout tools | + | + |
| Table of contents | + | + |
| Navigation panel | + | + |
| Mail Merge | + | + |
| Comparing Documents | - | +* |
| Comparing Documents | + | + |
| **Spreadsheet Editor features** | **Community Edition** | **Enterprise Edition** |
| Font and paragraph formatting | + | + |
| Object insertion | + | + |
| Functions, formulas, equations | + | + |
| Table templates | + | + |
| Pivot tables | + | + |
| Data validation | + | + |
| Conditional formatting for viewing | +** | +** |
| Data validation | + | + |
| Conditional formatting | + | + |
| Sparklines | + | + |
| Sheet Views | + | + |
| **Presentation Editor features** | **Community Edition** | **Enterprise Edition** |
| Font and paragraph formatting | + | + |
| Object insertion | + | + |
| Transitions | + | + |
| Presenter mode | + | + |
| Notes | + | + |
| **Form creator features** | **Community Edition** | **Enterprise Edition** |
| Adding form fields | + | + |
| Form preview | + | + |
| Saving as PDF | + | + |
| | [Get it now](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud#docs-community) | [Start Free Trial](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud#docs-enterprise) |
\* It's possible to add documents for comparison from your local drive, from URL and from Nextcloud storage.
\** Support for all conditions and gradient. Adding/Editing capabilities are coming soon
\* If supported by DMS.
5 changes: 5 additions & 0 deletions appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
use OCP\Files\Template\ITemplateManager;
use OCP\Files\Template\TemplateFileCreator;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCP\Files\IMimeTypeDetector;
use OCP\IL10N;
use OCP\IPreview;
use OCP\ITagManager;
Expand Down Expand Up @@ -217,6 +218,10 @@ public function register(IRegistrationContext $context): void {
return $container->query(Preview::class);
});

$detector = $container->query(IMimeTypeDetector::class);
$detector->getAllMappings();
$detector->registerType("docxf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf");
$detector->registerType("oform", "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform");
}

public function boot(IBootContext $context): void {
Expand Down
7 changes: 6 additions & 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 Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.</description>
<licence>apache</licence>
<author mail="dev@onlyoffice.com" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
<version>7.2.1</version>
<version>7.3.0</version>
<namespace>Onlyoffice</namespace>
<types>
<prevent_group_restriction/>
Expand Down Expand Up @@ -38,4 +38,9 @@
<commands>
<command>OCA\Onlyoffice\Command\DocumentServer</command>
</commands>
<repair-steps>
<post-migration>
<step>OCA\Onlyoffice\Migration\MimeRepair</step>
</post-migration>
</repair-steps>
</info>
3 changes: 2 additions & 1 deletion controller/editorapicontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,14 @@ public function config($fileId, $filePath = null, $shareToken = null, $directTok
}

$canEdit = isset($format["edit"]) && $format["edit"];
$canFillForms = isset($format["fillForms"]) && $format["fillForms"];
$editable = $version < 1
&& !$template
&& $file->isUpdateable()
&& !$isTempLock
&& (empty($shareToken) || ($share->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE);
$params["document"]["permissions"]["edit"] = $editable;
if ($editable && $canEdit) {
if ($editable && ($canEdit || $canFillForms)) {
$hashCallback = $this->crypt->GetHash(["userId" => $userId, "fileId" => $file->getId(), "filePath" => $filePath, "shareToken" => $shareToken, "action" => "track"]);
$callback = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.track", ["doc" => $hashCallback]);

Expand Down
30 changes: 25 additions & 5 deletions controller/editorcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,15 @@ public function __construct($AppName,
* @param string $name - file name
* @param string $dir - folder path
* @param string $templateId - file identifier
* @param int $targetId - identifier of the file for using as template for create
* @param string $shareToken - access token
*
* @return array
*
* @NoAdminRequired
* @PublicPage
*/
public function create($name, $dir, $templateId = null, $shareToken = null) {
public function create($name, $dir, $templateId = null, $targetId = 0, $shareToken = null) {
$this->logger->debug("Create: $name", ["app" => $this->appName]);

if (empty($shareToken) && !$this->config->isUserAllowedToUse()) {
Expand All @@ -219,8 +220,10 @@ public function create($name, $dir, $templateId = null, $shareToken = null) {
return ["error" => $this->trans->t("Template not found")];
}

$user = null;
if (empty($shareToken)) {
$userId = $this->userSession->getUser()->getUID();
$user = $this->userSession->getUser();
$userId = $user->getUID();
$userFolder = $this->root->getUserFolder($userId);
} else {
list ($userFolder, $error, $share) = $this->fileUtility->getNodeByToken($shareToken);
Expand Down Expand Up @@ -251,13 +254,30 @@ public function create($name, $dir, $templateId = null, $shareToken = null) {
return ["error" => $this->trans->t("You don't have enough permission to create")];
}

if (empty($templateId)) {
$template = TemplateManager::GetEmptyTemplate($name);
} else {
if (!empty($templateId)) {
$templateFile = TemplateManager::GetTemplate($templateId);
if ($templateFile !== null) {
$template = $templateFile->getContent();
}
} elseif (!empty($targetId)) {
$targetFile = $userFolder->getById($targetId)[0];
$targetName = $targetFile->getName();
$targetExt = strtolower(pathinfo($targetName, PATHINFO_EXTENSION));
$targetKey = $this->fileUtility->getKey($targetFile);

$fileUrl = $this->getUrl($targetFile, $user, $shareToken);

$ext = strtolower(pathinfo($name, PATHINFO_EXTENSION));
$documentService = new DocumentService($this->trans, $this->config);
try {
$newFileUri = $documentService->GetConvertedUri($fileUrl, $targetExt, $ext, $targetKey);
} catch (\Exception $e) {
$this->logger->logException($e, ["message" => "GetConvertedUri: " . $targetFile->getId(), "app" => $this->appName]);
return ["error" => $e->getMessage()];
}
$template = $documentService->Request($newFileUri);
} else {
$template = TemplateManager::GetEmptyTemplate($name);
}

if (!$template) {
Expand Down
7 changes: 6 additions & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@
.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 {
.icon-onlyoffice-download,
.icon-onlyoffice-fill,
.icon-onlyoffice-create {
background-image: url("../img/app-dark.svg");
}

Expand Down
13 changes: 13 additions & 0 deletions img/new-docxf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
return;
}

if ((config.document.fileType === "docxf" || config.document.fileType === "oform")
&& DocsAPI.DocEditor.version().split(".")[0] < 7) {
OCA.Onlyoffice.showMessage(t(OCA.Onlyoffice.AppName, "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online"), "error", {timeout: -1});
return;
}

if (config.redirectUrl) {
location.href = config.redirectUrl;
return;
Expand Down
Loading

0 comments on commit 9806407

Please sign in to comment.