Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Linnik <sergey.linnik@onlyoffice.com>2018-08-20 11:05:30 +0300
committerGitHub <noreply@github.com>2018-08-20 11:05:30 +0300
commit038d9e72ddf1cfa6c529cbf3bcec392f3a50b882 (patch)
tree089d489e9596dd3ce96b2076b22cecfa0c4dd453
parent93399ca8fa007d10b931b1b5dcee26529c97e5cf (diff)
parent9fb4732dfc882fb928625a3a03391c56fcf1e7f7 (diff)
Merge pull request #1 from ONLYOFFICE/developv2.0.2
Release/2.0.2
-rw-r--r--CHANGELOG.md4
-rw-r--r--README.md111
-rw-r--r--appinfo/app.php7
-rw-r--r--appinfo/application.php9
-rw-r--r--appinfo/info.xml23
-rw-r--r--controller/settingscontroller.php5
-rw-r--r--css/editor.css6
-rw-r--r--css/main.css4
-rw-r--r--img/new-docx.svg2
-rw-r--r--img/new-pptx.svg2
-rw-r--r--img/new-xlsx.svg2
-rw-r--r--js/main.js19
-rw-r--r--lib/adminsettings.php22
-rw-r--r--lib/appconfig.php36
-rw-r--r--lib/hookhandler.php47
-rw-r--r--screenshots/main.pngbin45243 -> 70049 bytes
-rw-r--r--screenshots/main_small.pngbin11763 -> 17673 bytes
-rw-r--r--screenshots/new.pngbin0 -> 12988 bytes
-rw-r--r--screenshots/open.pngbin0 -> 29429 bytes
-rw-r--r--screenshots/settings.pngbin17165 -> 32969 bytes
-rw-r--r--templates/settings.php10
21 files changed, 138 insertions, 171 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9fe4aad..ca4e2b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Change Log
+## 2.0.2
+## Changed
+- deleted unsupported methods
+
## 1.4.0
## Added
- transition from the editor to the list of files in the same tab
diff --git a/README.md b/README.md
index 7e2378c..b7c42d4 100644
--- a/README.md
+++ b/README.md
@@ -1,69 +1,91 @@
-# ![](screenshots/icon.png) ownCloud/Nextcloud ONLYOFFICE integration app
+# ![](screenshots/icon.png) Nextcloud ONLYOFFICE integration app
-This app enables users to edit office documents from [ownCloud](https://owncloud.com)/[Nextcloud](https://nextcloud.com) using ONLYOFFICE Document Server. Currently the following document formats can be edited with this app: DOCX, XLSX, PPTX, TXT, CSV. The above mentioned formats are also available for viewing together with PDF. The edited files of the corresponding type can be converted into the Office Open XML formats: ODT, ODS, ODP, DOC, XLS, PPT, PPS, EPUB, RTF, HTML, HTM.
+This app enables users to edit office documents from [Nextcloud](https://nextcloud.com) using ONLYOFFICE Document Server.
+Currently the following document formats can be edited with this app: csv, docx, pptx, txt, xlsx.
+The above mentioned formats are also available for viewing together with pdf.
+The edited files of the corresponding type can be converted into the Office Open XML formats: doc, docm, dot, dotx, epub, htm, html, odp, odt, pot, potm, potx, pps, ppsm, ppsx, ppt, pptm, rtf, xls, xlsm, xlsx, xlt, xltm, xltx.
-The app will create an item in the `new` (+) menu to create **Document**, **Spreadsheet**, **Presentation**. It will also create a new **Open in ONLYOFFICE** menu option within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to ownCloud/Nextcloud.
+The app will create an item in the `new` (+) menu to create **Document**, **Spreadsheet**, **Presentation**.
+It will also create a new **Open in ONLYOFFICE** menu option within the document library for Office documents.
+This allows multiple users to collaborate in real time and to save back those changes to Nextcloud.
-You can also use our **[Docker installation](https://github.com/ONLYOFFICE/docker-onlyoffice-owncloud)** to get installed and configured Document Server and ownCloud installation with a couple of commands.
+You can also use our **[Docker installation](https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud)** to get installed and configured Document Server and Nextcloud installation with a couple of commands.
## Installing ONLYOFFICE Document Server
-You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from ownCloud/Nextcloud and any end clients (version 4.2.7 and later are supported for use with the app). If that is not the case, use the official ONLYOFFICE Document Server documentation page: [Document Server for Linux](http://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx). ONLYOFFICE Document Server must also be able to POST to ownCloud/Nextcloud directly.
+You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from Nextcloud and any end clients (version 4.2.7 and later are supported for use with the app).
+If that is not the case, use the official ONLYOFFICE Document Server documentation page: [Document Server for Linux](https://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx). ONLYOFFICE Document Server must also be able to POST to Nextcloud directly.
+
+Starting with version 4.3.0, ONLYOFFICE Document Server and Nextcloud can be installed either on different computers, or on the same machine.
+In case you select the latter variant, you will need to set up a custom port for Document Server as by default both ONLYOFFICE Document Server and Nextcloud work on port 80.
+Or you can use Document Server behind a proxy, please refer to [this article](https://helpcenter.onlyoffice.com/server/document/document-server-proxy.aspx) to learn how you can configure it.
The easiest way to start an instance of ONLYOFFICE Document Server is to use [Docker](https://github.com/ONLYOFFICE/Docker-DocumentServer).
-## Installing ownCloud/Nextcloud ONLYOFFICE integration app
+## Installing Nextcloud ONLYOFFICE integration app
-To start using ONLYOFFICE Document Server with ownCloud/Nextcloud, the following steps must be performed:
+The Nextcloud administrator can install the integration app from the in-built application market.
+For that go to the user name and select **Apps**.
+After that find **ONLYOFFICE** in the list of available applications and install it.
-1. Go to the ownCloud/Nextcloud server _apps/_ directory (or some other directory [used](https://doc.owncloud.org/server/9.0/admin_manual/installation/apps_management_installation.html#using-custom-app-directories)):
-```
-cd apps/
-```
+If the server with the Nextcloud installed does not have an Internet access, or if you need it for some other reason, the administrator can install the application manually.
+To start using ONLYOFFICE Document Server with Nextcloud, the following steps must be performed:
+
+1. Go to the Nextcloud server _apps/_ directory (or some other directory [used](https://docs.nextcloud.com/server/13/admin_manual/installation/apps_management_installation.html#using-custom-app-directories)):
+ ```
+ cd apps/
+ ```
-2. Get the ownCloud/Nextcloud ONLYOFFICE integration app. There are several ways to do that:
+2. Get the Nextcloud ONLYOFFICE integration app.
+There are several ways to do that:
- a. Download the latest signed version from the official store for [ownCloud 9](https://apps.owncloud.com/content/show.php?content=174798), [ownCloud 10](https://marketplace.owncloud.com/apps/onlyoffice) or [Nextcloud](https://apps.nextcloud.com/apps/onlyoffice).
+ a. Download the latest signed version from the official store for [Nextcloud](https://apps.nextcloud.com/apps/onlyoffice).
- b. Or you can download the latest signed version from the application [release page](https://github.com/ONLYOFFICE/onlyoffice-owncloud/releases) on GitHub.
+ b. Or you can download the latest signed version from the application [release page](https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases) on GitHub.
c. Or you can clone the application source code and compile it yourself:
```
- git clone https://github.com/ONLYOFFICE/onlyoffice-owncloud.git onlyoffice
+ git clone https://github.com/ONLYOFFICE/onlyoffice-nextcloud.git onlyoffice
```
-> ownCloud version 10 does not work with unsigned applications giving an alert, so you will need to use either option **a** or **b** to get the application.
-
-2. Change the owner to update the application right from ownCloud/Nextcloud web interface:
-```
-chown -R www-data:www-data onlyoffice
-```
+2. Change the owner to update the application right from Nextcloud web interface:
+ ```
+ chown -R www-data:www-data onlyoffice
+ ```
-3. In ownCloud/Nextcloud open the `~/index.php/settings/apps?category=disabled` page with _Not enabled_ apps by administrator and click _Enable_ for the **ONLYOFFICE** application.
+3. In Nextcloud open the `~/index.php/settings/apps?category=disabled` page with _Not enabled_ apps by administrator and click _Enable_ for the **ONLYOFFICE** application.
-## Configuring ownCloud/Nextcloud ONLYOFFICE integration app
+## Configuring Nextcloud ONLYOFFICE integration app
-In ownCloud/Nextcloud open the `~/index.php/settings/admin#onlyoffice` page with administrative settings for **ONLYOFFICE** section. Enter the following address to connect ONLYOFFICE Document Server:
+In Nextcloud open the `~/index.php/settings/admin/onlyoffice` page with administrative settings for **ONLYOFFICE** section.
+Enter the following address to connect ONLYOFFICE Document Server:
```
https://<documentserver>/
```
-Where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed. The address must be accessible for the user browser and from the ownCloud/Nextcloud server. The ownCloud/Nextcloud server address must also be accessible from ONLYOFFICE Document Server for correct work.
+Where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed.
+The address must be accessible for the user browser and from the Nextcloud server.
+The Nextcloud server address must also be accessible from ONLYOFFICE Document Server for correct work.
-Sometimes your network configuration might not allow the requests between installed ownCloud/Nextcloud and ONLYOFFICE Document Server using the public addresses. The _Advanced server settings_ allows to set the ONLYOFFICE Document Server address for internal requests from ownCloud/Nextcloud server and the returning ownCloud/Nextcloud address for the internal requests from ONLYOFFICE Document Server. You need to enter them in the appropriate fields.
+Sometimes your network configuration might not allow the requests between installed Nextcloud and ONLYOFFICE Document Server using the public addresses.
+The _Advanced server settings_ allows to set the ONLYOFFICE Document Server address for internal requests from Nextcloud server and the returning Nextcloud address for the internal requests from ONLYOFFICE Document Server.
+You need to enter them in the appropriate fields.
-To restrict the access to ONLYOFFICE Document Server and for security reasons and data integrity the encrypted signature is used. Specify the _Secret key_ in the ownCloud/Nextcloud administrative configuration. In the ONLYOFFICE Document Server [config file](https://api.onlyoffice.com/editors/signature/) specify the same secret key and enable the validation.
+To restrict the access to ONLYOFFICE Document Server and for security reasons and data integrity the encrypted signature is used.
+Specify the _Secret key_ in the Nextcloud administrative configuration.
+In the ONLYOFFICE Document Server [config file](https://api.onlyoffice.com/editors/signature/) specify the same secret key and enable the validation.
Enable or disable the _Open file in the same tab_ setting.
-The **Open in ONLYOFFICE** action will be added to the file context menu. You can specify this action as default and it will be used when the file name is clicked for the selected file types.
+The **Open in ONLYOFFICE** action will be added to the file context menu.
+You can specify this action as default and it will be used when the file name is clicked for the selected file types.
@@ -71,11 +93,12 @@ The **Open in ONLYOFFICE** action will be added to the file context menu. You ca
The ONLYOFFICE integration follows the API documented here https://api.onlyoffice.com/editors/basic:
-* When creating a new file, the user navigates to a document folder within ownCloud/Nextcloud and clicks the **Document**, **Spreadsheet** or **Presentation** item in the _new_ (+) menu.
+* When creating a new file, the user navigates to a document folder within Nextcloud and clicks the **Document**, **Spreadsheet** or **Presentation** item in the _new_ (+) menu.
-* The browser invokes the `create` method in the `/lib/Controller/EditorController.php` controller. This method adds the copy of the file from the assets folder to the folder the user is currently in.
+* The browser invokes the `create` method in the `/lib/Controller/EditorController.php` controller.
+This method adds the copy of the file from the assets folder to the folder the user is currently in.
-* Or, when opening an existing file, the user navigates to it within ownCloud/Nextcloud and selects the **Open in ONLYOFFICE** menu option.
+* Or, when opening an existing file, the user navigates to it within Nextcloud and selects the **Open in ONLYOFFICE** menu option.
* A new browser tab is opened and the `index` method of the `/lib/Controller/EditorController.php` controller is invoked.
@@ -83,32 +106,40 @@ The ONLYOFFICE integration follows the API documented here https://api.onlyoffic
* **url** - the URL that ONLYOFFICE Document Server uses to download the document;
* **callback** - the URL that ONLYOFFICE Document Server informs about status of the document editing;
- * **documentServerUrl** - the URL that the client needs to reply to ONLYOFFICE Document Server (can be set at the administrative settings page);
+ * **documentServerUrl** - the URL that the client needs to respond to ONLYOFFICE Document Server (can be set at the administrative settings page);
* **key** - the UUID+Modified Timestamp to instruct ONLYOFFICE Document Server whether to download the document again or not;
* **fileName** - the document Title (name);
* **userId** - the identification of the user;
* **userName** - the name of the user.
-* ownCloud/Nextcloud takes this object and constructs a page from `templates/editor.php` template, filling in all of those values so that the client browser can load up the editor.
+* Nextcloud takes this object and constructs a page from `templates/editor.php` template, filling in all of those values so that the client browser can load up the editor.
* The client browser makes a request for the javascript library from ONLYOFFICE Document Server and sends ONLYOFFICE Document Server the DocEditor configuration with the above properties.
-* Then ONLYOFFICE Document Server downloads the document from ownCloud/Nextcloud and the user begins editing.
+* Then ONLYOFFICE Document Server downloads the document from Nextcloud and the user begins editing.
-* ONLYOFFICE Document Server sends a POST request to the _callback_ URL to inform ownCloud/Nextcloud that a user is editing the document.
+* ONLYOFFICE Document Server sends a POST request to the _callback_ URL to inform Nextcloud that a user is editing the document.
* When all users and client browsers are done with editing, they close the editing window.
-* After 10 seconds of inactivity, ONLYOFFICE Document Server sends a POST to the _callback_ URL letting ownCloud/Nextcloud know that the clients have finished editing the document and closed it.
+* After [10 seconds](https://api.onlyoffice.com/editors/save#savedelay) of inactivity, ONLYOFFICE Document Server sends a POST to the _callback_ URL letting Nextcloud know that the clients have finished editing the document and closed it.
-* ownCloud/Nextcloud downloads the new version of the document, replacing the old one.
+* Nextcloud downloads the new version of the document, replacing the old one.
## Known issues
-* If the document is shared using the **Federated Cloud Sharing** app, the co-editing among the servers will not be avaialble. The users from one and the same server can edit the document in the co-editing mode, but the users from two (or more) different servers will not be able to collaborate on the same document in real time.
+* If the document is shared using the **Federated Cloud Sharing** app, the co-editing among the servers will not be avaialble.
+The users from one and the same server can edit the document in the co-editing mode, but the users from two (or more) different servers will not be able to collaborate on the same document in real time.
-* Adding the storage using the **External storages** app has issues with the co-editing in some cases. If the connection is made using the same authorization keys (the _Username and password_ or _Global credentials_ authentication type is selected), then the co-editing is available for the users. If different authorization keys are used (_Log-in credentials, save in database_ or _User entered, store in database_ authentication options), the co-editing is not available. When the _Log-in credentials, save in session_ authentication type is used, the files cannot be opened in the editor.
+* Adding the storage using the **External storages** app has issues with the co-editing in some cases.
+If the connection is made using the same authorization keys (the _Username and password_ or _Global credentials_ authentication type is selected), then the co-editing is available for the users.
+If different authorization keys are used (_Log-in credentials, save in database_ or _User entered, store in database_ authentication options), the co-editing is not available.
+When the _Log-in credentials, save in session_ authentication type is used, the files cannot be opened in the editor.
-* ownCloud/Nextcloud provides an option to encrypt the file storage. But if the encryption with the _per-user encryption keys_ (used by default in ownCloud/Nextcloud **Default encryption module** app) is enabled, ONLYOFFICE Document Server cannot open the encrypted files for editing and save them after the editing. The ONLYOFFICE section of the administrative settings page will display a notification about it. However if you set the encryption with the _master key_, ONLYOFFICE application will work as intended. The instruction on enabling _master key_ based encryption is available in the official documentation on [ownCloud](https://doc.owncloud.org/server/latest/admin_manual/configuration_files/encryption_configuration.html#enabling-master-key-based-encryption)/[Nextcloud](https://docs.nextcloud.com/server/12/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands) websites.
+* Nextcloud provides an option to encrypt the file storage.
+But if the encryption with the _per-user encryption keys_ (used by default in Nextcloud **Default encryption module** app) is enabled, ONLYOFFICE Document Server cannot open the encrypted files for editing and save them after the editing.
+The ONLYOFFICE section of the administrative settings page will display a notification about it.
+However if you set the encryption with the _master key_, ONLYOFFICE application will work as intended.
+The instruction on enabling _master key_ based encryption is available in the official documentation on [Nextcloud](https://docs.nextcloud.com/server/13/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands) websites.
diff --git a/appinfo/app.php b/appinfo/app.php
index 7ddc062..e39c69a 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -29,11 +29,4 @@
namespace OCA\Onlyoffice\AppInfo;
-use OCP\App;
-
-/**
- * Administration settings
- */
-App::registerAdmin("onlyoffice", "settings");
-
$app = new Application();
diff --git a/appinfo/application.php b/appinfo/application.php
index 8589757..b13b7f3 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -38,7 +38,6 @@ use OCA\Onlyoffice\Controller\CallbackController;
use OCA\Onlyoffice\Controller\EditorController;
use OCA\Onlyoffice\Controller\SettingsController;
use OCA\Onlyoffice\Crypt;
-use OCA\Onlyoffice\Hookhandler;
class Application extends App {
@@ -74,7 +73,13 @@ class Application extends App {
}
});
- Util::connectHook("OCP\Share", "share_link_access", Hookhandler::class, "PublicPage");
+ $eventDispatcher->addListener("OCA\Files_Sharing::loadAdditionalScripts",
+ function() {
+ if (!empty($this->appConfig->GetDocumentServerUrl()) && $this->appConfig->SettingsAreSuccessful()) {
+ Util::addScript("onlyoffice", "main");
+ Util::addStyle("onlyoffice", "main");
+ }
+ });
require_once __DIR__ . "/../3rdparty/jwt/BeforeValidException.php";
require_once __DIR__ . "/../3rdparty/jwt/ExpiredException.php";
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 8c41b30..e052996 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,16 +6,16 @@
<summary>ONLYOFFICE connector</summary>
<description>ONLYOFFICE connector enables you to edit Office documents within ONLYOFFICE from the familiar web interface. This will create a new Open in ONLYOFFICE action within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to your file storage.</description>
<licence>agpl</licence>
- <author>Ascensio System SIA</author>
- <version>1.4.0</version>
+ <author mail="dev@onlyoffice.com" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
+ <version>2.0.2</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
</types>
<documentation>
- <admin>https://api.onlyoffice.com/editors/owncloud</admin>
- <developer>https://api.onlyoffice.com/editors/owncloud</developer>
- <user>https://api.onlyoffice.com/editors/owncloud</user>
+ <admin>https://api.onlyoffice.com/editors/nextcloud</admin>
+ <developer>https://api.onlyoffice.com/editors/nextcloud</developer>
+ <user>https://api.onlyoffice.com/editors/nextcloud</user>
</documentation>
<category>files</category>
<category>integration</category>
@@ -23,13 +23,14 @@
<category>organization</category>
<category>tools</category>
<website>https://www.onlyoffice.com</website>
- <bugs>https://github.com/ONLYOFFICE/onlyoffice-owncloud/issues</bugs>
- <repository type="git">https://github.com/ONLYOFFICE/onlyoffice-owncloud.git</repository>
- <screenshot small-thumbnail="https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-owncloud/master/screenshots/main_small.png">https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-owncloud/master/screenshots/main.png</screenshot>
- <screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-owncloud/master/screenshots/settings.png</screenshot>
+ <bugs>https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues</bugs>
+ <repository type="git">https://github.com/ONLYOFFICE/onlyoffice-nextcloud.git</repository>
+ <screenshot small-thumbnail="https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/main_small.png">https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/main.png</screenshot>
+ <screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/settings.png</screenshot>
+ <screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png</screenshot>
+ <screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png</screenshot>
<dependencies>
- <owncloud min-version="9.0" max-version="10.0" />
- <nextcloud min-version="12" max-version="13"/>
+ <nextcloud min-version="12" max-version="14"/>
</dependencies>
<settings>
<admin>OCA\Onlyoffice\AdminSettings</admin>
diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php
index 39d3621..44a78f6 100644
--- a/controller/settingscontroller.php
+++ b/controller/settingscontroller.php
@@ -130,8 +130,8 @@ class SettingsController extends Controller {
* Save app settings
*
* @param string $documentserver - document service address
- * @param string $documentserverInternal - document service address available from ownCloud
- * @param string $storageUrl - ownCloud address available from document server
+ * @param string $documentserverInternal - document service address available from Nextcloud
+ * @param string $storageUrl - Nextcloud address available from document server
* @param string $secret - secret key for signature
* @param string $defFormats - formats array with default action
*
@@ -179,7 +179,6 @@ class SettingsController extends Controller {
* @return array
*
* @NoAdminRequired
- * @NoCSRFRequired
* @PublicPage
*/
public function GetSettings() {
diff --git a/css/editor.css b/css/editor.css
index 7d74b5c..1525dfd 100644
--- a/css/editor.css
+++ b/css/editor.css
@@ -26,7 +26,11 @@
*
*/
-#app > iframe {
+#content.app-onlyoffice {
+ min-height: calc(100% - 50px);
+}
+
+ #app > iframe {
position: absolute;
vertical-align: top;
}
diff --git a/css/main.css b/css/main.css
index 40cbb0c..87df0ff 100644
--- a/css/main.css
+++ b/css/main.css
@@ -34,4 +34,8 @@
}
.icon-onlyoffice-new-pptx {
background-image: url("../img/new-pptx.svg");
+}
+.icon-onlyoffice-open,
+.icon-onlyoffice-convert {
+ background-image: url("../img/app-dark.svg");
} \ No newline at end of file
diff --git a/img/new-docx.svg b/img/new-docx.svg
index 449c626..20a4d2c 100644
--- a/img/new-docx.svg
+++ b/img/new-docx.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
- <title>ownCloud-icon-doc-16x16</title>
+ <title>Nextcloud-icon-doc-16x16</title>
<desc>Created with Sketch.</desc>
<defs>
<path d="M7.92893219,1.77635684e-15 L0.995577499,1.77635684e-15 C0.444836974,1.77635684e-15 0,0.450780073 0,1.00684547 L0,12.9931545 C0,13.5500512 0.445735229,14 0.995577499,14 L10.0044225,14 C10.555163,14 11,13.5492199 11,12.9931545 L11,3.07106781 L7.92893219,4.99600361e-16 Z" id="path-1"></path>
diff --git a/img/new-pptx.svg b/img/new-pptx.svg
index 15f7ded..b818a8d 100644
--- a/img/new-pptx.svg
+++ b/img/new-pptx.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
- <title>ownCloud-icon-pres-16x16</title>
+ <title>Nextcloud-icon-pres-16x16</title>
<desc>Created with Sketch.</desc>
<defs>
<path d="M7.92893219,8.8817842e-16 L0.995577499,8.8817842e-16 C0.444836974,8.8817842e-16 0,0.450780073 0,1.00684547 L0,12.9931545 C0,13.5500512 0.445735229,14 0.995577499,14 L10.0044225,14 C10.555163,14 11,13.5492199 11,12.9931545 L11,3.07106781 L7.92893219,4.99600361e-16 Z" id="path-1"></path>
diff --git a/img/new-xlsx.svg b/img/new-xlsx.svg
index fecfcf4..5da580f 100644
--- a/img/new-xlsx.svg
+++ b/img/new-xlsx.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
- <title>ownCloud-icon-ss-16x16</title>
+ <title>Nextcloud-icon-ss-16x16</title>
<desc>Created with Sketch.</desc>
<defs>
<path d="M7.92893219,-8.8817842e-16 L0.995577499,-8.8817842e-16 C0.444836974,-8.8817842e-16 0,0.450780073 0,1.00684547 L0,12.9931545 C0,13.5500512 0.445735229,14 0.995577499,14 L10.0044225,14 C10.555163,14 11,13.5492199 11,12.9931545 L11,3.07106781 L7.92893219,-1.94289029e-15 Z" id="path-1"></path>
diff --git a/js/main.js b/js/main.js
index e87de71..e02aa93 100644
--- a/js/main.js
+++ b/js/main.js
@@ -153,17 +153,18 @@
}
var register = function() {
- var mimes = OCA.Onlyoffice.setting.formats;
+ var formats = OCA.Onlyoffice.setting.formats;
- $.each(mimes, function (ext, attr) {
+ $.each(formats, function (ext, attr) {
+ if (!attr.mime) {
+ return true;
+ }
fileList.fileActions.registerAction({
name: "onlyofficeOpen",
displayName: t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE"),
mime: attr.mime,
permissions: OC.PERMISSION_READ,
- icon: function () {
- return OC.imagePath(OCA.Onlyoffice.AppName, "app-dark");
- },
+ iconClass: "icon-onlyoffice-open",
actionHandler: OCA.Onlyoffice.FileClick
});
@@ -177,9 +178,7 @@
displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"),
mime: attr.mime,
permissions: OC.PERMISSION_READ,
- icon: function () {
- return OC.imagePath(OCA.Onlyoffice.AppName, "app-dark");
- },
+ iconClass: "icon-onlyoffice-convert",
actionHandler: OCA.Onlyoffice.FileConvertClick
});
}
@@ -239,9 +238,9 @@
var extension = fileName.substr(fileName.lastIndexOf(".") + 1).toLowerCase();
var initSharedButton = function() {
- var mimes = OCA.Onlyoffice.setting.formats;
+ var formats = OCA.Onlyoffice.setting.formats;
- var conf = mimes[extension];
+ var conf = formats[extension];
if (conf) {
var button = document.createElement("a");
button.href = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val()));
diff --git a/lib/adminsettings.php b/lib/adminsettings.php
index 9f96d86..e0376d4 100644
--- a/lib/adminsettings.php
+++ b/lib/adminsettings.php
@@ -43,25 +43,7 @@ class AdminSettings implements ISettings {
}
/**
- * Print config section (ownCloud 10)
- *
- * @return TemplateResponse
- */
- public function getPanel() {
- return $this->getForm();
- }
-
- /**
- * Get section ID (ownCloud 10)
- *
- * @return string
- */
- public function getSectionID() {
- return "general";
- }
-
- /**
- * Print config section (Nextcloud)
+ * Print config section
*
* @return TemplateResponse
*/
@@ -73,7 +55,7 @@ class AdminSettings implements ISettings {
}
/**
- * Get section ID (Nextcloud)
+ * Get section ID
*
* @return string
*/
diff --git a/lib/appconfig.php b/lib/appconfig.php
index 07df837..c585ec8 100644
--- a/lib/appconfig.php
+++ b/lib/appconfig.php
@@ -68,14 +68,14 @@ class AppConfig {
private $_documentserver = "DocumentServerUrl";
/**
- * The config key for the document server address available from ownCloud
+ * The config key for the document server address available from Nextcloud
*
* @var string
*/
private $_documentserverInternal = "DocumentServerInternalUrl";
/**
- * The config key for the ownCloud address available from document server
+ * The config key for the Nextcloud address available from document server
*
* @var string
*/
@@ -230,7 +230,7 @@ class AppConfig {
}
/**
- * Save the document service address available from ownCloud to the application configuration
+ * Save the document service address available from Nextcloud to the application configuration
*
* @param string $documentServer - document service address
*/
@@ -249,7 +249,7 @@ class AppConfig {
}
/**
- * Get the document service address available from ownCloud from the application configuration
+ * Get the document service address available from Nextcloud from the application configuration
*
* @return string
*/
@@ -265,7 +265,7 @@ class AppConfig {
}
/**
- * Save the ownCloud address available from document server to the application configuration
+ * Save the Nextcloud address available from document server to the application configuration
*
* @param string $documentServer - document service address
*/
@@ -284,7 +284,7 @@ class AppConfig {
}
/**
- * Get the ownCloud address available from document server from the application configuration
+ * Get the Nextcloud address available from document server from the application configuration
*
* @return string
*/
@@ -439,33 +439,24 @@ class AppConfig {
*/
public $formats = [
"csv" => [ "mime" => "text/csv", "type" => "spreadsheet", "edit" => true ],
- "djvu" => [ "mime" => "image/vnd.djvu", "type" => "text" ],
"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" => [ "mime" => "application/msword", "type" => "text", "conv" => true ],
- "dotm" => [ "mime" => "application/vnd.ms-word.template.macroEnabled.12", "type" => "text", "conv" => 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 ],
- "fodp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ],
- "fods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ],
- "fodt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ],
- "htm" => [ "mime" => "text/html", "type" => "text", "conv" => true ],
+ "htm" => [ "type" => "text", "conv" => true ],
"html" => [ "mime" => "text/html", "type" => "text", "conv" => true ],
- "mht" => [ "mime" => "message/rfc822", "conv" => true ],
"odp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ],
"ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ],
"odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => 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 ],
"pdf" => [ "mime" => "application/pdf", "type" => "text" ],
- "pot" => [ "mime" => "application/mspowerpoint", "type" => "presentation", "conv" => true ],
+ "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" => [ "mime" => "application/vnd.ms-powerpoint", "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", "edit" => true, "def" => 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 ],
@@ -474,9 +465,8 @@ class AppConfig {
"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" => [ "mime" => "application/excel", "type" => "spreadsheet", "conv" => 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 ],
- "xps" => [ "mime" => "application/vnd.ms-xpsdocument", "type" => "text" ]
+ "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true ]
];
}
diff --git a/lib/hookhandler.php b/lib/hookhandler.php
deleted file mode 100644
index d61a3b8..0000000
--- a/lib/hookhandler.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- *
- * @copyright Copyright (c) 2018, ownCloud GmbH
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Onlyoffice;
-
-use OCP\Util;
-
-use OCA\Onlyoffice\AppConfig;
-
-/**
- * Class HookHandler
- *
- * handles hooks
- *
- * @package OCA\Onlyoffice
- */
-class HookHandler {
-
- public static function PublicPage() {
- $appName = "onlyoffice";
-
- $appConfig = new AppConfig($appName);
-
- if (!empty($appConfig->GetDocumentServerUrl()) && $appConfig->SettingsAreSuccessful()) {
- Util::addScript("onlyoffice", "main");
- Util::addStyle("onlyoffice", "main");
- }
- }
-}
diff --git a/screenshots/main.png b/screenshots/main.png
index d7f7c18..5b1ea55 100644
--- a/screenshots/main.png
+++ b/screenshots/main.png
Binary files differ
diff --git a/screenshots/main_small.png b/screenshots/main_small.png
index c80dfe2..3c9d25d 100644
--- a/screenshots/main_small.png
+++ b/screenshots/main_small.png
Binary files differ
diff --git a/screenshots/new.png b/screenshots/new.png
new file mode 100644
index 0000000..28e6dab
--- /dev/null
+++ b/screenshots/new.png
Binary files differ
diff --git a/screenshots/open.png b/screenshots/open.png
new file mode 100644
index 0000000..de46454
--- /dev/null
+++ b/screenshots/open.png
Binary files differ
diff --git a/screenshots/settings.png b/screenshots/settings.png
index 2dc9f49..de80513 100644
--- a/screenshots/settings.png
+++ b/screenshots/settings.png
Binary files differ
diff --git a/templates/settings.php b/templates/settings.php
index f9e99ec..650ddd8 100644
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -32,14 +32,14 @@
?>
<div class="section section-onlyoffice">
<h2>ONLYOFFICE</h2>
- <a target="_blank" class="icon-info svg" title="" href="https://api.onlyoffice.com/editors/owncloud" data-original-title="<?php p($l->t("Documentation")) ?>"></a>
+ <a target="_blank" class="icon-info svg" title="" href="https://api.onlyoffice.com/editors/nextcloud" data-original-title="<?php p($l->t("Documentation")) ?>"></a>
<p><?php p($l->t("ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line.")) ?></p>
<?php if ($_["encryption"]) { ?>
<p class="onlyoffice-error">
<?php p($l->t("Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.")) ?>
- <a target="_blank" class="icon-info svg" title="" href="https://api.onlyoffice.com/editors/owncloud#masterKey" data-original-title="encryption:enable-master-key"></a>
+ <a target="_blank" class="icon-info svg" title="" href="https://api.onlyoffice.com/editors/nextcloud#masterKey" data-original-title="encryption:enable-master-key"></a>
</p>
<?php } ?>
@@ -68,7 +68,8 @@
<h3 class="onlyoffice-header"><?php p($l->t("The default application for opening the format")) ?></h3>
<div class="onlyoffice-exts">
- <?php foreach ($_["formats"] as $format => $setting) { ?>
+ <?php foreach ($_["formats"] as $format => $setting) {
+ if (array_key_exists("mime", $setting)) { ?>
<div>
<input type="checkbox" class="checkbox"
id="onlyofficeDefFormat<?php p($format) ?>"
@@ -76,7 +77,8 @@
<?php if ($setting["def"]) { ?>checked="checked"<?php } ?> />
<label for="onlyofficeDefFormat<?php p($format) ?>"><?php p($format) ?></label>
</div>
- <?php } ?>
+ <?php }
+ } ?>
</div>
<a id="onlyofficeSave" class="button onlyoffice-header"><?php p($l->t("Save")) ?></a>