View | Details | Raw Unified | Return to bug 33529
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue (-17 / +8 lines)
Lines 86-104 export default { Link Here
86
                    render: (data, type, row) => {
86
                    render: (data, type, row) => {
87
                        let content = []
87
                        let content = []
88
                        this.actions["-1"].forEach(a => {
88
                        this.actions["-1"].forEach(a => {
89
                            if (a == "edit") {
89
                            content.push(
90
                                content.push(
90
                                `<a class="${a.action} btn btn-default btn-xs" role="button"><i class="${a.icon}"></i>` +
91
                                    '<a class="edit btn btn-default btn-xs" role="button"><i class="fa fa-pencil"></i>' +
91
                                    this.$__(a.title) +
92
                                        this.$__("Edit") +
92
                                    "</a>"
93
                                        "</a>"
93
                            )
94
                                )
95
                            } else if (a == "delete") {
96
                                content.push(
97
                                    '<a class="delete btn btn-default btn-xs" role="button"><i class="fa fa-trash"></i>' +
98
                                        this.$__("Delete") +
99
                                        "</a>"
100
                                )
101
                            }
102
                        })
94
                        })
103
                        return content.join(" ")
95
                        return content.join(" ")
104
                    },
96
                    },
Lines 156-164 export default { Link Here
156
                        .to$()
148
                        .to$()
157
                        .each(function (idx) {
149
                        .each(function (idx) {
158
                            const data = dataSet[idx]
150
                            const data = dataSet[idx]
159
                            actions.forEach(action => {
151
                            actions.forEach(a => {
160
                                $("." + action, this).on("click", e => {
152
                                $("." + a.action, this).on("click", e => {
161
                                    self.$emit(action, data, dt, e)
153
                                    self.$emit(a.action, data, dt, e)
162
                                })
154
                                })
163
                            })
155
                            })
164
                        })
156
                        })
165
- 

Return to bug 33529