From 6b9093ce6d15fcdd271a1016b364ce09b2b49aca Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 31 Jul 2018 22:49:01 +0200 Subject: [PATCH] Set emptyText depending on filepicker type Signed-off-by: Daniel Kesselberg --- core/js/oc-dialogs.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 3c3ed1469c..d346b5231d 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -193,6 +193,11 @@ var OCdialogs = { type = this.FILEPICKER_TYPE_CHOOSE; } + var emptyText = t('core', 'No files in here'); + if (type === this.FILEPICKER_TYPE_COPY || type === this.FILEPICKER_TYPE_MOVE || type === this.FILEPICKER_TYPE_COPY_MOVE) { + emptyText = t('core', 'No more subfolders in here'); + } + this.filepicker.loading = true; this.filepicker.filesClient = (OCA.Sharing && OCA.Sharing.PublicApp && OCA.Sharing.PublicApp.fileList)? OCA.Sharing.PublicApp.fileList.filesClient: OC.Files.getClient(); $.when(this._getFilePickerTemplate()).then(function($tmpl) { @@ -204,7 +209,7 @@ var OCdialogs = { self.$filePicker = $tmpl.octemplate({ dialog_name: dialogName, title: title, - emptytext: t('core', 'No files in here') + emptytext: emptyText }).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter); if (modal === undefined) {