remove whitespace on bottom when no search results, fix laylout, fix #16878

This commit is contained in:
Jan-Christoph Borchardt 2015-06-22 15:30:29 +02:00
parent 8eda9ae83c
commit 9dde482315
2 changed files with 6 additions and 2 deletions

View File

@ -1708,13 +1708,13 @@
if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) { if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {
this.$el.find('#filestable thead th').addClass('hidden'); this.$el.find('#filestable thead th').addClass('hidden');
this.$el.find('#emptycontent').addClass('hidden'); this.$el.find('#emptycontent').addClass('hidden');
$('#app-content-files').addClass('filter-empty'); $('#searchresults').addClass('filter-empty');
if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) { if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) {
this.$el.find('.nofilterresults').removeClass('hidden'). this.$el.find('.nofilterresults').removeClass('hidden').
find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}, null, {'escape': false})); find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}, null, {'escape': false}));
} }
} else { } else {
$('#app-content-files').removeClass('filter-empty'); $('#searchresults').removeClass('filter-empty');
this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty); this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty);
if (!this.$el.find('.mask').exists()) { if (!this.$el.find('.mask').exists()) {
this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty); this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);

View File

@ -12,6 +12,10 @@
/* account for margin-bottom in files list */ /* account for margin-bottom in files list */
margin-top: -250px; margin-top: -250px;
} }
#searchresults.filter-empty {
/* remove whitespace on bottom when no search results, to fix layout */
margin-top: 0 !important;
}
#searchresults.hidden { #searchresults.hidden {
display: none; display: none;