Bug 37812: Prevent initialisation failure by using modal methods, not plain show, hide

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 18:02:51 +00:00 committed by Martin Renvoize
parent b28201d7f8
commit 3ecfeeb3e9
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

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