Bugzilla – Attachment 174613 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: Remove methods
Bug-37301-Remove-methods.patch (text/plain), 3.47 KB, created by
Pedro Amorim
on 2024-11-15 16:44:48 UTC
(
hide
)
Description:
Bug 37301: Remove methods
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-11-15 16:44:48 UTC
Size:
3.47 KB
patch
obsolete
>From b7eef0af0ad3dc20a9ef3fdc7db1fa335f022bc9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 Jul 2024 14:01:27 +0200 >Subject: [PATCH] Bug 37301: Remove methods > >We do not need the methods, we can emit from the template. >Also rename the events to the wording more consistent with what we have. >--- > .../js/vue/components/ERM/AgreementsList.vue | 2 +- > .../js/vue/components/ERM/AgreementsShow.vue | 4 ++-- > .../prog/js/vue/components/ToolbarButton.vue | 19 ++++--------------- > 3 files changed, 7 insertions(+), 18 deletions(-) > >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 ea50ea92f9..acfb010dd5 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 >@@ -4,7 +4,7 @@ > <Toolbar v-if="!embedded"> > <ToolbarButton > type="add" >- @add-clicked="add_agreement" >+ @addResource="add_agreement" > :title="$__('New agreement')" > /> > </Toolbar> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue >index f0745ca7db..a0d58d2b4f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue >@@ -2,8 +2,8 @@ > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="agreements_show"> > <Toolbar> >- <ToolbarButton type="edit" @edit-clicked="edit_agreement" /> >- <ToolbarButton type="delete" @delete-clicked="delete_agreement" /> >+ <ToolbarButton type="edit" @editResource="edit_agreement" /> >+ <ToolbarButton type="delete" @deleteResource="delete_agreement" /> > </Toolbar> > > <h2> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue >index 84cec0d11f..c226ed98f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue >@@ -1,11 +1,11 @@ > <template> >- <a v-if="type === 'add'" @click="click_add" :class="class" >+ <a v-if="type === 'add'" @click="$emit('addResource')" :class="class" > ><font-awesome-icon icon="plus" /> {{ title }}</a > > >- <a v-if="type === 'delete'" @click="click_delete" :class="class" >+ <a v-if="type === 'delete'" @click="$emit('deleteResource')" :class="class" > ><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a > > >- <a v-if="type === 'edit'" @click="click_edit" :class="class" >+ <a v-if="type === 'edit'" @click="$emit('editResource')" :class="class" > ><font-awesome-icon icon="pencil" /> {{ $__("Edit") }}</a > > > </template> >@@ -32,18 +32,7 @@ export default { > type: String, > }, > }, >- methods: { >- click_add() { >- this.$emit("add-clicked") >- }, >- click_delete() { >- this.$emit("delete-clicked") >- }, >- click_edit() { >- this.$emit("edit-clicked") >- }, >- }, >- emits: ["add-clicked", "delete-clicked", "edit-clicked"], >+ emits: ["addResource", "deleteResource", "editResource"], > name: "Toolbar", > } > </script> >-- >2.39.5
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