Card Details Popup, every "Sub-Popup" must use .back() instead of .close()

- .close() closes the popup. Until now it was ok, but as the Card
  Details are opened in a popup too, .back() must be used to get the
  same behaviour back
- .back() is also .close() if there is no "popup layer" left
This commit is contained in:
Martin Filser 2021-10-21 10:12:55 +02:00
parent a6d3810e19
commit a59dfa8fc0
5 changed files with 51 additions and 77 deletions

View file

@ -34,7 +34,7 @@ BlazeComponent.extendComponent({
}
if (spentTime >= 0) {
this.storeTime(spentTime, isOvertime);
Popup.close();
Popup.back();
} else {
this.error.set('invalid-time');
evt.target.time.focus();
@ -43,7 +43,7 @@ BlazeComponent.extendComponent({
'click .js-delete-time'(evt) {
evt.preventDefault();
this.deleteTime();
Popup.close();
Popup.back();
},
'click a.js-toggle-overtime': this.toggleOvertime,
},