diff options
author | Robin Appelman <robin@icewind.nl> | 2016-10-21 16:35:55 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-10-21 16:35:55 +0200 |
commit | 7427fb170f853cde26289890aabc98d74f8707be (patch) | |
tree | f1a38f97b60c5539e9b09ae9437cab1c6e69d547 /core/js | |
parent | 9965a95e3b9aff118fa7a34102e5ac31367ac7e2 (diff) | |
download | nextcloud-server-7427fb170f853cde26289890aabc98d74f8707be.tar.gz nextcloud-server-7427fb170f853cde26289890aabc98d74f8707be.zip |
show empty folder message in filepicker
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/oc-dialogs.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 7a7876bf30f..5cf45fe0fb9 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -157,7 +157,8 @@ var OCdialogs = { } self.$filePicker = $tmpl.octemplate({ dialog_name: dialogName, - title: title + title: title, + emptytext: t('core', 'No files in here') }).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter); if (modal === undefined) { @@ -771,6 +772,12 @@ var OCdialogs = { self._fillSlug(); + if (files.length === 0) { + self.$filePicker.find('.emptycontent').show(); + } else { + self.$filePicker.find('.emptycontent').hide(); + } + $.each(files, function(idx, entry) { entry.icon = OC.MimeType.getIconUrl(entry.mimetype); if (typeof(entry.size) !== 'undefined' && entry.size >= 0) { |