Display a message when no apps can be found for this oc version
This commit is contained in:
parent
9cb07f126d
commit
c3c2517131
3 changed files with 22 additions and 7 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue