diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 12:50:21 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 12:50:21 +0100 |
commit | 0cca9e26c41a1957b3a574d33b3835ea76c63e13 (patch) | |
tree | b4795ecd6a32dddebcd9e359343579d0ba73ab75 /apps | |
parent | 9e3f4e043f6204a336a6efc4a9c39f23723d0522 (diff) | |
download | nextcloud-server-0cca9e26c41a1957b3a574d33b3835ea76c63e13.tar.gz nextcloud-server-0cca9e26c41a1957b3a574d33b3835ea76c63e13.zip |
show no files found message
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/css/files.css | 23 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 5 | ||||
-rw-r--r-- | apps/files/js/search.js | 8 | ||||
-rw-r--r-- | apps/files/templates/list.php | 6 |
4 files changed, 42 insertions, 0 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css index a75ad57c833..a6a28b594ae 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -599,3 +599,26 @@ table.dragshadow td.size { .mask.transparent{ opacity: 0; } + +#nofilterresults { + font-size: 16px; + color: #888; + position: absolute; + text-align: center; + top: 30%; + width: 100%; +} +#nofilterresults h2 { + font-size: 22px; + margin-bottom: 10px; +} +#nofilterresults [class^="icon-"], +#nofilterresults [class*=" icon-"] { + background-size: 64px; + height: 64px; + width: 64px; + margin: 0 auto 15px; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); + opacity: .5; +}
\ No newline at end of file diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e01a029bc97..48c990872d1 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1685,9 +1685,14 @@ if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) { this.$el.find('#filestable thead th').addClass('hidden'); this.$el.find('#emptycontent').addClass('hidden'); + if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden')) { + this.$el.find('#nofilterresults').removeClass('hidden'). + find('p').text(t('files', 'No entries in this folder match \'{filter}\'', {filter:this._filter})); + } } else { this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty); this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty); + this.$el.find('#nofilterresults').addClass('hidden'); } }, /** diff --git a/apps/files/js/search.js b/apps/files/js/search.js index 73eccd06dcf..ec93b937690 100644 --- a/apps/files/js/search.js +++ b/apps/files/js/search.js @@ -40,11 +40,18 @@ result.mime = result.mime_type; } } + function hideNoFilterResults (){ + var $nofilterresults = $('#nofilterresults'); + if ( ! $nofilterresults.hasClass('hidden') ) { + $nofilterresults.addClass('hidden'); + } + } this.renderFolderResult = function($row, result) { if (inFileList($row, result)) { return null; } + hideNoFilterResults(); /*render folder icon, show path beneath filename, show size and last modified date on the right */ this.updateLegacyMimetype(result); @@ -61,6 +68,7 @@ if (inFileList($row, result)) { return null; } + hideNoFilterResults(); /*render preview icon, show path beneath filename, show size and last modified date on the right */ this.updateLegacyMimetype(result); diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 4224d9bc100..5b90e629ddd 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -60,6 +60,12 @@ <p><?php p($l->t('Upload some content or sync with your devices!')); ?></p> </div> +<div id="nofilterresults" class="hidden"> + <div class="icon-folder"></div> + <h2><?php p($l->t('No files found in this folder')); ?></h2> + <p></p> +</div> + <table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="36" data-preview-y="36"> <thead> <tr> |