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 | |
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')
-rw-r--r-- | core/css/styles.css | 8 | ||||
-rw-r--r-- | core/js/oc-dialogs.js | 9 | ||||
-rw-r--r-- | core/templates/filepicker.html | 4 |
3 files changed, 20 insertions, 1 deletions
diff --git a/core/css/styles.css b/core/css/styles.css index 94e60562ad8..d94a31c4cf1 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -782,6 +782,14 @@ a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;paddin width: 100%; padding-bottom: 55px; } + +#oc-dialog-filepicker-content .emptycontent { + color: #888; + text-align: center; + margin-top: 80px; + width: 100%; + display: none; +} #oc-dialog-filepicker-content .filelist { background-color:white; width:100%; 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) { diff --git a/core/templates/filepicker.html b/core/templates/filepicker.html index b665ca26893..215311348cb 100644 --- a/core/templates/filepicker.html +++ b/core/templates/filepicker.html @@ -1,6 +1,10 @@ <div id="{dialog_name}" title="{title}"> <span class="dirtree breadcrumb"></span> <div class="filelist-container"> + <div class="emptycontent"> + <div class="icon-folder"></div> + <h2>{emptytext}</h2> + </div> <table id="filestable" class="filelist"> <tbody> <tr data-entryname="{filename}" data-type="{type}"> |