Bug 37812: Prevent non-functional close buttons by using vue event handlers

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Paul Derscheid 2024-09-17 13:27:57 +00:00 committed by Martin Renvoize
parent 951ad25ac8
commit b28201d7f8
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -16,7 +16,7 @@
<button <button
type="button" type="button"
class="btn-close" class="btn-close"
data-bs-dismiss="modal" @click="closeModal"
aria-label="Close" aria-label="Close"
></button> ></button>
</div> </div>
@ -60,7 +60,7 @@
<button <button
class="btn btn-default deny cancel" class="btn btn-default deny cancel"
type="button" type="button"
data-bs-dismiss="modal" @click="closeModal"
> >
<i class="fa fa-times"></i> Cancel <i class="fa fa-times"></i> Cancel
</button> </button>
@ -537,7 +537,7 @@ export default {
.then( .then(
success => { success => {
this.setMessage(this.$__("Item copied successfully.")) this.setMessage(this.$__("Item copied successfully."))
$("#copy_item_to_train").hide() this.closeModal()
}, },
error => { error => {
this.setWarning( this.setWarning(
@ -548,6 +548,9 @@ export default {
} }
) )
}, },
closeModal() {
$("#copy_item_to_train").hide()
},
clearAll() { clearAll() {
this.selected_items = [] this.selected_items = []
if (this.item_table.display) { if (this.item_table.display) {