diff --git a/app/assets/javascripts/sitewide/repository_row_card.js b/app/assets/javascripts/sitewide/repository_row_card.js index 556964270..834c2e9bf 100644 --- a/app/assets/javascripts/sitewide/repository_row_card.js +++ b/app/assets/javascripts/sitewide/repository_row_card.js @@ -20,7 +20,7 @@ e.stopPropagation(); if (typeof PrintModalComponent !== 'undefined') { - PrintModalComponent.showModal = true; + PrintModalComponent.openModal(); if (selectedRows && selectedRows.length) { $('#modal-info-repository-row').modal('hide'); PrintModalComponent.row_ids = selectedRows; diff --git a/app/javascript/packs/vue/repository_print_modal.js b/app/javascript/packs/vue/repository_print_modal.js index 064ee2dc5..06e1f3788 100644 --- a/app/javascript/packs/vue/repository_print_modal.js +++ b/app/javascript/packs/vue/repository_print_modal.js @@ -25,12 +25,15 @@ function initPrintModalComponent() { methods: { closeModal() { this.showModal = false; + }, + openModal() { + this.showModal = true; } } }); app.component('PrintModalContainer', PrintModalContainer); app.config.globalProperties.i18n = window.I18n; - mountWithTurbolinks(app, '.print-label-modal-container'); + window.PrintModalComponent = mountWithTurbolinks(app, '.print-label-modal-container'); } }