summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-01-16 13:42:40 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-01-16 13:42:40 +0100
commit9526acbcc44c303d9290a2f5ad77e0b9a6820310 (patch)
tree7f6bc5c640d6c33b131746bce7b2ceea5b47f8c9 /settings
parent0f0204ee3594af75e47fa59d004f9af8eb56aacc (diff)
parent6e20a408b4c4ece458fe73930e18a77c396f605a (diff)
downloadnextcloud-server-9526acbcc44c303d9290a2f5ad77e0b9a6820310.tar.gz
nextcloud-server-9526acbcc44c303d9290a2f5ad77e0b9a6820310.zip
Merge pull request #13413 from owncloud/apps-cancelloadonswitch
Cancel app list load when switching categories
Diffstat (limited to 'settings')
-rw-r--r--settings/js/apps.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 328c57db8ed..f844bcc08e2 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -24,6 +24,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
},
loadCategories: function() {
+ if (this._loadCategoriesCall) {
+ this._loadCategoriesCall.abort();
+ }
+
var categories = [
{displayName: 'Enabled', id: '0'}
];
@@ -35,7 +39,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
OC.Settings.Apps.loadCategory(0);
- $.ajax(OC.generateUrl('settings/apps/categories'), {
+ this._loadCategoriesCall = $.ajax(OC.generateUrl('settings/apps/categories'), {
data:{},
type:'GET',
success:function (jsondata) {
@@ -54,6 +58,9 @@ OC.Settings.Apps = OC.Settings.Apps || {
if (OC.Settings.Apps.State.currentCategory === categoryId) {
return;
}
+ if (this._loadCategoryCall) {
+ this._loadCategoryCall.abort();
+ }
$('#apps-list')
.addClass('icon-loading')
.html('');
@@ -61,7 +68,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
$('#app-category-' + categoryId).addClass('active');
OC.Settings.Apps.State.currentCategory = categoryId;
- $.ajax(OC.generateUrl('settings/apps/list?category={categoryId}', {
+ this._loadCategoryCall = $.ajax(OC.generateUrl('settings/apps/list?category={categoryId}', {
categoryId: categoryId
}), {
data:{},