[Fix] Fixed confirmation callback firing
This commit is contained in:
parent
66bbee592a
commit
aa74b372a7
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "strolch-wc-plc",
|
||||
"description": "Strolch PLC WebComponents",
|
||||
"version": "0.3.8",
|
||||
"version": "0.3.9",
|
||||
"authors": ["Robert von Burg"],
|
||||
"keywords": [
|
||||
"strolch",
|
||||
|
|
|
@ -85,24 +85,18 @@
|
|||
|
||||
confirmActionWarning: function (callback) {
|
||||
var bound = callback.bind(this);
|
||||
|
||||
if (this.warningConfirmed) {
|
||||
bound();
|
||||
return;
|
||||
}
|
||||
|
||||
var confirmedCallback = function (confirmed) {
|
||||
if (confirmed) {
|
||||
this.fire("cx-show-info", {
|
||||
title: this.localize('confirmActionWarning'),
|
||||
line1: this.localize('confirmActionWarningMsg'),
|
||||
callback: function () {
|
||||
this.warningConfirmed = true;
|
||||
bound();
|
||||
}
|
||||
}.bind(this);
|
||||
|
||||
this.fire("cx-show-confirmation", {
|
||||
title: this.localize('confirmActionWarning'),
|
||||
text: this.localize('confirmActionWarningMsg'),
|
||||
callback: confirmedCallback,
|
||||
bind: this
|
||||
}.bind(this)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue