summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/css/styles.css10
-rw-r--r--settings/js/apps.js15
-rw-r--r--settings/templates/apps.php4
3 files changed, 22 insertions, 7 deletions
diff --git a/core/css/styles.css b/core/css/styles.css
index 74df29140a9..ceb49724b48 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -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;
diff --git a/settings/js/apps.js b/settings/js/apps.js
index bb52aa3a155..8d8b2ca7398 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -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');
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 7465992b3b4..1d059d4f77f 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -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>