Use OC.Dialogs for modal reload message

This commit is contained in:
Morris Jobke 2015-10-02 14:12:29 +02:00 committed by Thomas Müller
parent 69d68fbe8e
commit 264d123396
1 changed files with 15 additions and 1 deletions

View File

@ -246,7 +246,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
appItem.addClass('appwarning');
} else {
if (result.data.update_required) {
OC.Notification.show(t('settings', 'The app needs to be updated, please reload the page'));
OC.Settings.Apps.showReloadMessage();
setTimeout(function() {
location.reload();
@ -398,6 +398,20 @@ OC.Settings.Apps = OC.Settings.Apps || {
.text('');
},
showReloadMessage: function(appId) {
OC.dialogs.info(
t(
'settings',
'The app needs to be updated. This page will be reloaded 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');