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 <button
type="button" type="button"
class="btn-close" class="btn-close"
@click="closeModal" data-bs-dismiss="modal"
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"
@click="closeModal" data-bs-dismiss="modal"
> >
<i class="fa fa-times"></i> Cancel <i class="fa fa-times"></i> Cancel
</button> </button>
@ -522,7 +522,7 @@ export default {
) )
}, },
selectTrainForCopy(train_item_id) { selectTrainForCopy(train_item_id) {
$("#copy_item_to_train").show() $("#copy_item_to_train").modal("show")
this.train_item_id_to_copy = train_item_id this.train_item_id_to_copy = train_item_id
}, },
copyItem(event) { copyItem(event) {
@ -537,7 +537,7 @@ export default {
.then( .then(
success => { success => {
this.setMessage(this.$__("Item copied successfully.")) this.setMessage(this.$__("Item copied successfully."))
this.closeModal() $("#copy_item_to_train").modal("hide")
}, },
error => { error => {
this.setWarning( this.setWarning(
@ -548,9 +548,6 @@ 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) {