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
a42596f118
commit
166a16b60d
11 changed files with 46 additions and 55 deletions
|
@ -119,17 +119,18 @@
|
|||
var type = this.getAttribute('data-imagetype');
|
||||
var index = this.getAttribute('data-index');
|
||||
index = index == "null" ? null : parseInt(index);
|
||||
Dashboard.confirm(Globalize.translate('DeleteImageConfirmation'), Globalize.translate('HeaderDeleteImage'), function (result) {
|
||||
|
||||
if (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(Globalize.translate('DeleteImageConfirmation'), Globalize.translate('HeaderDeleteImage')).then(function () {
|
||||
|
||||
ApiClient.deleteItemImage(currentItem.Id, type, index).then(function () {
|
||||
|
||||
hasChanges = true;
|
||||
reload(page);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
|
||||
var location = virtualFolder.Locations[index];
|
||||
|
||||
Dashboard.confirm(Globalize.translate('MessageConfirmRemoveMediaLocation'), Globalize.translate('HeaderRemoveMediaLocation'), function (confirmResult) {
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
if (confirmResult) {
|
||||
confirm(Globalize.translate('MessageConfirmRemoveMediaLocation'), Globalize.translate('HeaderRemoveMediaLocation')).then(function () {
|
||||
|
||||
var refreshAfterChange = currentOptions.refresh;
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
Dashboard.alert(Globalize.translate('DefaultErrorMessage'));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -64,9 +64,9 @@
|
|||
|
||||
var msg = Globalize.translate('MessageAreYouSureDeleteSubtitles');
|
||||
|
||||
Dashboard.confirm(msg, Globalize.translate('HeaderConfirmDeletion'), function (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
if (result) {
|
||||
confirm(msg, Globalize.translate('HeaderConfirmDeletion')).then(function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
@ -82,8 +82,7 @@
|
|||
|
||||
reload(page, itemId);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue