Set emptyText depending on filepicker type

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2018-07-31 22:49:01 +02:00
parent 9886805ad4
commit 6b9093ce6d
1 changed files with 6 additions and 1 deletions

View File

@ -193,6 +193,11 @@ var OCdialogs = {
type = this.FILEPICKER_TYPE_CHOOSE; 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.loading = true;
this.filepicker.filesClient = (OCA.Sharing && OCA.Sharing.PublicApp && OCA.Sharing.PublicApp.fileList)? OCA.Sharing.PublicApp.fileList.filesClient: OC.Files.getClient(); 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) { $.when(this._getFilePickerTemplate()).then(function($tmpl) {
@ -204,7 +209,7 @@ var OCdialogs = {
self.$filePicker = $tmpl.octemplate({ self.$filePicker = $tmpl.octemplate({
dialog_name: dialogName, dialog_name: dialogName,
title: title, title: title,
emptytext: t('core', 'No files in here') emptytext: emptyText
}).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter); }).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter);
if (modal === undefined) { if (modal === undefined) {