aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-10-25 08:20:57 +0200
committerGitHub <noreply@github.com>2016-10-25 08:20:57 +0200
commit44e9f5d5a17337458c74f285c7b53a92df7e76da (patch)
treee3c205e9f3b821ce06e4a8e83cff9fcc87f65612 /core
parent8a231a4223a45b7e58bfeb30196c54126fc56521 (diff)
parent7427fb170f853cde26289890aabc98d74f8707be (diff)
downloadnextcloud-server-44e9f5d5a17337458c74f285c7b53a92df7e76da.tar.gz
nextcloud-server-44e9f5d5a17337458c74f285c7b53a92df7e76da.zip
Merge pull request #1850 from nextcloud/filepicker-empty-folder
show empty folder message in filepicker
Diffstat (limited to 'core')
-rw-r--r--core/css/styles.css8
-rw-r--r--core/js/oc-dialogs.js9
-rw-r--r--core/templates/filepicker.html4
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}">