]> source.dussan.org Git - nextcloud-server.git/commitdiff
show empty folder message in filepicker 1850/head
authorRobin Appelman <robin@icewind.nl>
Fri, 21 Oct 2016 14:35:55 +0000 (16:35 +0200)
committerRobin Appelman <robin@icewind.nl>
Fri, 21 Oct 2016 14:35:55 +0000 (16:35 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
core/css/styles.css
core/js/oc-dialogs.js
core/templates/filepicker.html

index 94e60562ad818b2d1ae4fa279fb795d96a7d7e1f..d94a31c4cf1f4e7bf42502611bf180f51bd6995b 100644 (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%;
index 7a7876bf30f8eaba65eba8b18fae16241b989e3e..5cf45fe0fb9a4bd761fb4dd256335872b04e7919 100644 (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) {
index b665ca26893f6ded2ee88ec3f4b7a01e55562356..215311348cb8474b481be6b5310ef25d88d0b93a 100644 (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}">