Commit c3c25171 authored by Joas Schilling's avatar Joas Schilling
Browse files

Display a message when no apps can be found for this oc version

parent 9cb07f12
......@@ -324,7 +324,8 @@ input[type="submit"].enabled {
overflow-x: auto;
}
#emptycontent {
#emptycontent,
.emptycontent {
font-size: 16px;
color: #888;
position: absolute;
......@@ -332,12 +333,15 @@ input[type="submit"].enabled {
top: 30%;
width: 100%;
}
#emptycontent h2 {
#emptycontent h2,
.emptycontent h2 {
font-size: 22px;
margin-bottom: 10px;
}
#emptycontent [class^="icon-"],
#emptycontent [class*=" icon-"] {
.emptycontent [class^="icon-"],
#emptycontent [class*=" icon-"],
.emptycontent [class*=" icon-"] {
background-size: 64px;
height: 64px;
width: 64px;
......
......@@ -63,7 +63,9 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
$('#apps-list')
.addClass('icon-loading')
.removeClass('hidden')
.html('');
$('#apps-list-empty').addClass('hidden');
$('#app-category-' + OC.Settings.Apps.State.currentCategory).removeClass('active');
$('#app-category-' + categoryId).addClass('active');
OC.Settings.Apps.State.currentCategory = categoryId;
......@@ -73,14 +75,19 @@ OC.Settings.Apps = OC.Settings.Apps || {
}), {
data:{},
type:'GET',
success:function (apps) {
success: function (apps) {
OC.Settings.Apps.State.apps = _.indexBy(apps.apps, 'id');
var source = $("#app-template").html();
var template = Handlebars.compile(source);
_.each(apps.apps, function(app) {
OC.Settings.Apps.renderApp(app, template, null);
});
if (apps.apps.length) {
_.each(apps.apps, function(app) {
OC.Settings.Apps.renderApp(app, template, null);
});
} else {
$('#apps-list').addClass('hidden');
$('#apps-list-empty').removeClass('hidden');
}
},
complete: function() {
$('#apps-list').removeClass('icon-loading');
......
......@@ -96,4 +96,8 @@
</div>
<div id="app-content">
<div id="apps-list" class="icon-loading"></div>
<div id="apps-list-empty" class="hidden emptycontent">
<div class="icon-search"></div>
<h2><?php p($l->t('No apps found for your version')) ?></h2>
</div>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment