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');
|
appItem.addClass('appwarning');
|
||||||
} else {
|
} else {
|
||||||
if (result.data.update_required) {
|
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() {
|
setTimeout(function() {
|
||||||
location.reload();
|
location.reload();
|
||||||
|
@ -398,6 +398,20 @@ OC.Settings.Apps = OC.Settings.Apps || {
|
||||||
.text('');
|
.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) {
|
filter: function(query) {
|
||||||
query = query.toLowerCase();
|
query = query.toLowerCase();
|
||||||
$('#apps-list').find('.section').addClass('hidden');
|
$('#apps-list').find('.section').addClass('hidden');
|
||||||
|
|
Loading…
Reference in New Issue