Skip to content

Commit

Permalink
Merge pull request #10474 from danielkesselberg/bugfix/10379/no-files…
Browse files Browse the repository at this point in the history
…-in-here

Set emptyText depending on filepicker type
  • Loading branch information
rullzer authored Aug 1, 2018
2 parents 8162b34 + 6b9093c commit 369a6c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/js/oc-dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 369a6c1

Please sign in to comment.