mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update to new confirm pattern
This commit is contained in:
parent
28d045d7fa
commit
ec1c286c91
4 changed files with 13 additions and 19 deletions
|
@ -4,16 +4,15 @@
|
|||
|
||||
var msg = Globalize.translate('UninstallPluginConfirmation').replace("{0}", name);
|
||||
|
||||
Dashboard.confirm(msg, Globalize.translate('UninstallPluginHeader'), function (result) {
|
||||
|
||||
if (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
confirm(msg, Globalize.translate('UninstallPluginHeader')).then(function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.uninstallPlugin(uniqueid).then(function () {
|
||||
|
||||
reloadList(page);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -169,14 +169,11 @@ var ScheduledTaskPage = {
|
|||
|
||||
confirmDeleteTrigger: function (index) {
|
||||
|
||||
Dashboard.confirm(Globalize.translate('MessageDeleteTaskTrigger'), Globalize.translate('HeaderDeleteTaskTrigger'), function (result) {
|
||||
|
||||
if (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
confirm(Globalize.translate('MessageDeleteTaskTrigger'), Globalize.translate('HeaderDeleteTaskTrigger')).then(function () {
|
||||
ScheduledTaskPage.deleteTrigger(index);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
deleteTrigger: function (index) {
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
function revoke(page, key) {
|
||||
|
||||
Dashboard.confirm(Globalize.translate('MessageConfirmRevokeApiKey'), Globalize.translate('HeaderConfirmRevokeApiKey'), function (result) {
|
||||
|
||||
if (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(Globalize.translate('MessageConfirmRevokeApiKey'), Globalize.translate('HeaderConfirmRevokeApiKey')).then(function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.ajax({
|
||||
|
@ -16,7 +15,7 @@
|
|||
|
||||
loadData(page);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -95,15 +95,14 @@
|
|||
msg += '<a class="clearLink" href="scheduledtasks.html"><paper-button style="color:#3f51b5!important;margin:0;">' + Globalize.translate('ButtonScheduledTasks') + '</paper-button></a>';
|
||||
msg += '</div>';
|
||||
|
||||
Dashboard.confirm(msg, Globalize.translate('HeaderConfirmation'), function (result) {
|
||||
|
||||
if (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(msg, Globalize.translate('HeaderConfirmation')).then(function () {
|
||||
appStorage.setItem(key, expectedValue);
|
||||
onScheduledTaskMessageConfirmed(button, id);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue