Merge pull request #1850 from nextcloud/filepicker-empty-folder

show empty folder message in filepicker
This commit is contained in:
Roeland Jago Douma 2016-10-25 08:20:57 +02:00 committed by GitHub
commit 44e9f5d5a1
3 changed files with 20 additions and 1 deletions

View File

@ -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%;

View File

@ -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) {

View File

@ -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}">