Bug 38201: 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. Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
5e82ac70f1
commit
b95a975d5a
|
|
@ -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] },
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ export default {
|
|||
},
|
||||
actions: {
|
||||
0: ["show"],
|
||||
1: ["show"],
|
||||
"-1": this.embedded
|
||||
? [
|
||||
{
|
||||
|
|
@ -291,9 +292,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.agreement_id}`) +
|
||||
"</a>"
|
||||
);
|
||||
|
|
@ -306,9 +305,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) +
|
||||
"</a>"
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue