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
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-15 16:42:55 +0300
committerJulius Härtl <jus@bitgrid.net>2021-01-29 15:55:07 +0300
commitb3e2c9335fe03b9c8a6ba7d105495579257eac5b (patch)
tree9444fb1246297049da953ac01863d4bf3ef33715 /src
parent65685cd8dd1f542f7a9e2cb83a8e7956c7b8de97 (diff)
Implement support for server template handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r--src/files.js4
-rw-r--r--src/view/NewFileMenu.js12
2 files changed, 9 insertions, 7 deletions
diff --git a/src/files.js b/src/files.js
index 54123615..3c657941 100644
--- a/src/files.js
+++ b/src/files.js
@@ -291,7 +291,9 @@ $(document).ready(function() {
}
odfViewer.registerFileActions()
- OC.Plugins.register('OCA.Files.NewFileMenu', NewFileMenu)
+ if (isPublic) {
+ OC.Plugins.register('OCA.Files.NewFileMenu', NewFileMenu)
+ }
}
// Open the template picker if there was a create parameter detected on load
diff --git a/src/view/NewFileMenu.js b/src/view/NewFileMenu.js
index b5dc2f22..da033ca2 100644
--- a/src/view/NewFileMenu.js
+++ b/src/view/NewFileMenu.js
@@ -32,8 +32,8 @@ const NewFileMenu = {
newFileMenu.addMenuEntry({
id: 'add-' + document.extension,
- displayName: t('richdocuments', 'New Document'),
- templateName: t('richdocuments', 'New Document') + '.' + document.extension,
+ displayName: t('richdocuments', 'New document'),
+ templateName: t('richdocuments', 'New document') + '.' + document.extension,
iconClass: 'icon-filetype-document',
fileType: 'x-office-document',
actionHandler: function(filename) {
@@ -47,8 +47,8 @@ const NewFileMenu = {
newFileMenu.addMenuEntry({
id: 'add-' + spreadsheet.extension,
- displayName: t('richdocuments', 'New Spreadsheet'),
- templateName: t('richdocuments', 'New Spreadsheet') + '.' + spreadsheet.extension,
+ displayName: t('richdocuments', 'New spreadsheet'),
+ templateName: t('richdocuments', 'New spreadsheet') + '.' + spreadsheet.extension,
iconClass: 'icon-filetype-spreadsheet',
fileType: 'x-office-spreadsheet',
actionHandler: function(filename) {
@@ -62,8 +62,8 @@ const NewFileMenu = {
newFileMenu.addMenuEntry({
id: 'add-' + presentation.extension,
- displayName: t('richdocuments', 'New Presentation'),
- templateName: t('richdocuments', 'New Presentation') + '.' + presentation.extension,
+ displayName: t('richdocuments', 'New presentation'),
+ templateName: t('richdocuments', 'New presentation') + '.' + presentation.extension,
iconClass: 'icon-filetype-presentation',
fileType: 'x-office-presentation',
actionHandler: function(filename) {