Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/7.3.0 #574

Merged
merged 28 commits into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
573737d
support docxf and oform
Antipkin-A Nov 16, 2021
801fddf
create master form by blank
Antipkin-A Nov 16, 2021
5466812
create master form by existing file
Antipkin-A Nov 17, 2021
1871220
own mimetypes for docxf, oform
Antipkin-A Nov 22, 2021
f4226b8
use convert for create new docxf by docx
Antipkin-A Nov 22, 2021
4acfb73
action for oform - Fill in onlyoffice
Antipkin-A Nov 24, 2021
f076fc2
format titles
Antipkin-A Nov 24, 2021
c7c580c
form icons to create and context menu
Antipkin-A Nov 25, 2021
f03a0e4
create oform by docxf to context menu
Antipkin-A Nov 26, 2021
a1389e9
don't open file when create oform throw context menu
Antipkin-A Nov 26, 2021
2579688
format title for create master form
Antipkin-A Dec 2, 2021
e810191
preview for docxf, oform
Antipkin-A Dec 2, 2021
276e848
translation ru
Antipkin-A Dec 6, 2021
685ffa1
can use docserver > 7 for fill form
Antipkin-A Dec 8, 2021
1d61acd
repair aliase icon for docxf, oform when update plugin
Antipkin-A Nov 26, 2021
49f8203
docxf templates
LinneyS Dec 10, 2021
5936a7f
use global filelist in OpenFormPicker
Antipkin-A Dec 17, 2021
4b8883f
find target file in user folder
Antipkin-A Dec 17, 2021
6ce8332
format permission for fill in form
Antipkin-A Dec 17, 2021
a7a75c7
format context for opening editor when create file
Antipkin-A Dec 21, 2021
9f9d8ec
opening filepicker to current directory when create docxf
Antipkin-A Dec 21, 2021
9cae2b3
forms to changelog
LinneyS Dec 25, 2021
30e9d80
add translations
Maria-Sukhova Dec 24, 2021
49785c8
new tr-TR
LinneyS Dec 27, 2021
60657e3
fix assets
LinneyS Dec 27, 2021
1c779f4
Merge remote-tracking branch 'remotes/origin/feature/forms-translate'…
LinneyS Dec 27, 2021
c09c903
7.3.0
LinneyS Dec 27, 2021
dc3870a
Update README.md
kseniafedoruk Jan 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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