improve emptycontent styles

This commit is contained in:
Jan-Christoph Borchardt 2016-03-31 15:26:37 +02:00
parent 8ef6c6c7bc
commit a8a98d42cb
4 changed files with 9 additions and 4 deletions

View File

@ -2280,12 +2280,14 @@
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');
$('#searchresults').addClass('filter-empty'); $('#searchresults').addClass('filter-empty');
$('#searchresults .emptycontent').addClass('emptycontent-search');
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 {
$('#searchresults').removeClass('filter-empty'); $('#searchresults').removeClass('filter-empty');
$('#searchresults .emptycontent').removeClass('emptycontent-search');
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

@ -177,17 +177,20 @@ body {
#emptycontent, #emptycontent,
.emptycontent { .emptycontent {
font-size: 16px;
color: #888; color: #888;
text-align: center; text-align: center;
margin-top: 100px; /* ie8 */ margin-top: 100px; /* ie8 */
margin-top: 30vh; margin-top: 30vh;
width: 100%; width: 100%;
} }
#emptycontent.emptycontent-search,
.emptycontent.emptycontent-search {
position: static;
}
#emptycontent h2, #emptycontent h2,
.emptycontent h2 { .emptycontent h2 {
font-weight: 600;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 150%;
} }
#emptycontent [class^="icon-"], #emptycontent [class^="icon-"],
.emptycontent [class^="icon-"], .emptycontent [class^="icon-"],

View File

@ -506,7 +506,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
if (apps.length === 0) { if (apps.length === 0) {
$appList.addClass('hidden'); $appList.addClass('hidden');
$emptyList.removeClass('hidden'); $emptyList.removeClass('hidden');
$emptyList.removeClass('hidden').find('h2').text(t('settings', 'No apps found for "{query}"', { $emptyList.removeClass('hidden').find('h2').text(t('settings', 'No apps found for {query}', {
query: query query: query
})); }));
} else { } else {

View File

@ -167,7 +167,7 @@ script(
</div> </div>
<div id="app-content"> <div id="app-content">
<div id="apps-list" class="icon-loading"></div> <div id="apps-list" class="icon-loading"></div>
<div id="apps-list-empty" class="hidden emptycontent"> <div id="apps-list-empty" class="hidden emptycontent emptycontent-search">
<div class="icon-search"></div> <div class="icon-search"></div>
<h2><?php p($l->t('No apps found for your version')) ?></h2> <h2><?php p($l->t('No apps found for your version')) ?></h2>
</div> </div>