update to new confirm pattern
This commit is contained in:
@@ -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);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user