From 966bc06e8d4a6e010116967792f26e92b0ed9678 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Wed, 26 Apr 2023 19:46:13 -0700 Subject: Create new file/folder labels Signed-off-by: Christopher Ng Signed-off-by: nextcloud-command --- apps/files/js/newfilemenu.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/files/js/newfilemenu.js') diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js index a101eccef29..ce23b4a9c58 100644 --- a/apps/files/js/newfilemenu.js +++ b/apps/files/js/newfilemenu.js @@ -51,6 +51,7 @@ templateName: t('files', 'New folder'), iconClass: 'icon-folder', fileType: 'folder', + actionLabel: t('files', 'Create new folder'), actionHandler: function(name) { self.fileList.createDirectory(name); } @@ -112,10 +113,12 @@ var newName = $target.attr('data-templatename'); var fileType = $target.attr('data-filetype'); + var actionLabel = $target.attr('data-action-label'); var $form = $(OCA.Files.Templates['newfilemenu_filename_form']({ fileName: newName, cid: this.cid, - fileType: fileType + fileType: fileType, + actionLabel, })); //this.trigger('actionPerformed', action); @@ -207,6 +210,7 @@ iconClass: actionSpec.iconClass, fileType: actionSpec.fileType, useInput: actionSpec.useInput, + actionLabel: actionSpec.actionLabel, actionHandler: actionSpec.actionHandler, checkFilename: actionSpec.checkFilename, shouldShow: actionSpec.shouldShow, -- cgit v1.2.3