summaryrefslogtreecommitdiffstats
path: root/settings/js/apps.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js/apps.js')
-rw-r--r--settings/js/apps.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index f775ecad620..d51c642c9c9 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -245,6 +245,14 @@ OC.Settings.Apps = OC.Settings.Apps || {
element.val(t('settings','Enable'));
appItem.addClass('appwarning');
} else {
+ if (result.data.update_required) {
+ OC.Settings.Apps.showReloadMessage();
+
+ setTimeout(function() {
+ location.reload();
+ }, 5000);
+ }
+
OC.Settings.Apps.rebuildNavigation();
appItem.data('active',true);
element.data('active',true);
@@ -390,6 +398,20 @@ OC.Settings.Apps = OC.Settings.Apps || {
.text('');
},
+ showReloadMessage: function(appId) {
+ OC.dialogs.info(
+ t(
+ 'settings',
+ 'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.'
+ ),
+ t('settings','App update'),
+ function (result) {
+ window.location.reload();
+ },
+ true
+ );
+ },
+
filter: function(query) {
query = query.toLowerCase();
$('#apps-list').find('.section').addClass('hidden');