summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-06-10 12:01:54 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-06-10 12:11:05 +0200
commit580155abe716dd9fb385823819c473313c4e3dd1 (patch)
tree9fd49a97b5c0b64e0b37b5dbc6a95715fbf0d8d6 /settings/js
parent4d88302b3adba16e99899d31e4e04ae48aa067d8 (diff)
downloadnextcloud-server-580155abe716dd9fb385823819c473313c4e3dd1.tar.gz
nextcloud-server-580155abe716dd9fb385823819c473313c4e3dd1.zip
Load the update information asyncroniously to fix the page load speed
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/apps.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 1d115eb8182..2863e86dba8 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -81,7 +81,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
$('#app-category-' + categoryId).addClass('active');
OC.Settings.Apps.State.currentCategory = categoryId;
- this._loadCategoryCall = $.ajax(OC.generateUrl('settings/apps/list?category={categoryId}', {
+ this._loadCategoryCall = $.ajax(OC.generateUrl('settings/apps/list?category={categoryId}&includeUpdateInfo=0', {
categoryId: categoryId
}), {
type:'GET',
@@ -123,6 +123,20 @@ OC.Settings.Apps = OC.Settings.Apps || {
},
complete: function() {
$('#apps-list').removeClass('icon-loading');
+ $.ajax(OC.generateUrl('settings/apps/list?category={categoryId}&includeUpdateInfo=1', {
+ categoryId: categoryId
+ }), {
+ type: 'GET',
+ success: function (apps) {
+ _.each(apps.apps, function(app) {
+ if (app.update) {
+ var $update = $('#app-' + app.id + ' .update');
+ $update.removeClass('hidden');
+ $update.val(t('settings', 'Update to %s').replace(/%s/g, app.update));
+ }
+ })
+ }
+ });
}
});
},