Bugzilla – Attachment 168836 Details for
Bug 37301
Further improve how we build Vue components
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37301: Get rid of e.preventDefault
Bug-37301-Get-rid-of-epreventDefault.patch (text/plain), 2.28 KB, created by
Pedro Amorim
on 2024-07-11 15:17:57 UTC
(
hide
)
Description:
Bug 37301: Get rid of e.preventDefault
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-07-11 15:17:57 UTC
Size:
2.28 KB
patch
obsolete
>From 645d7089fc939a21dc4717e3372a63f5079df948 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >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 9a73155238..598cc701d4 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 >@@ -243,9 +243,7 @@ export default { > orderable: true, > render: function (data, type, row, meta) { > return ( >- '<a href="/cgi-bin/koha/erm/agreements/' + >- row.agreement_id + >- '" class="show">' + >+ '<a role="button" class="show">' + > escape_str(`${row.name} (#${row.agreement_id})`) + > "</a>" > ) >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37301
:
168709
|
168739
|
168740
|
168741
|
168800
|
168827
|
168828
|
168829
|
168836
|
172713
|
172911
|
172912
|
172913
|
172914
|
172915
|
172916
|
172917
|
172918
|
172919
|
172920
|
172921
|
174612
|
174613
|
174614
|
174615
|
174616
|
174617
|
174618
|
174619
|
174620
|
174621
|
174622
|
174623
|
174624
|
174625
|
174626
|
174627
|
174628
|
174629
|
174630
|
174631