From 837f4ca6e3c648e2bf395bd836b3344dc7c77917 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 11 Jul 2024 15:02:46 +0000 Subject: [PATCH] Bug 37301: Get rid of e.preventDefault Feels wrong to have datatable+event related args in BaseResource, remove that. The only reason we needed preventDefault was because 'show' action was a link with an href, but we dont even need that, and add 'role="button"' for cursor:pointer mouseover interaction. --- .../intranet-tmpl/prog/js/vue/components/BaseResource.vue | 3 +-- .../prog/js/vue/components/ERM/AgreementsList.vue | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue index e5ceb80752..65f93af2ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue @@ -15,8 +15,7 @@ export default { * @param {Object} resource - The resource to navigate to * @return {void} */ - goToResourceShow: function (resource, dt, event) { - event?.preventDefault() + goToResourceShow: function (resource) { this.$router.push({ name: this.show_component, params: { [this.id_attr]: resource[this.id_attr] }, diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue index 9fc9b3643d..d256e1ce79 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue @@ -292,9 +292,7 @@ export default { orderable: true, render: function (data, type, row, meta) { return ( - '' + + '' + escape_str(`${row.name} (#${row.agreement_id})`) + "" ) -- 2.39.5