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

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2016-10-13 09:58:54 +0300
committerPranav Kant <pranavk@collabora.co.uk>2016-10-13 12:11:49 +0300
commit145854400e3e82c6a04d68e58e9661de7e3cace2 (patch)
tree8bd682b909aa683fee063c33fca539b7f5bc943c /appinfo
parentf2e6c36060a2fdf2689c38cbda55c8ae99692cf0 (diff)
New 'Use OOXML by default' option in admin settings
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/app.php8
-rw-r--r--appinfo/routes.php1
2 files changed, 9 insertions, 0 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index b057f763..d7845a3a 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -51,5 +51,13 @@ $eventDispatcher->addListener(
}
);
+if (class_exists('\OC\Files\Type\TemplateManager')) {
+ $manager = \OC_Helper::getFileTemplateManager();
+
+ $manager->registerTemplate('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'apps/richdocuments/assets/docxtemplate.docx');
+ $manager->registerTemplate('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'apps/richdocuments/assets/xlsxtemplate.xlsx');
+ $manager->registerTemplate('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'apps/richdocuments/assets/pptxtemplate.pptx');
+}
+
//Listen to delete file signal
\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 3b5d539c..37d996ab 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -41,5 +41,6 @@ $application->registerRoutes($this, [
//settings
['name' => 'settings#setSettings', 'url' => 'ajax/admin.php', 'verb' => 'POST'],
['name' => 'settings#getSupportedMimes', 'url' => 'ajax/mimes.php', 'verb' => 'GET'],
+ ['name' => 'settings#getSettings', 'url' => 'ajax/settings.php', 'verb' => 'GET'],
]
]);