Use OC.Dialogs for modal reload message
This commit is contained in:
parent
69d68fbe8e
commit
264d123396
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue