From 1dc17d8502baa50885871419c0152fedc1977710 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 25 Oct 2018 17:09:26 -0300 Subject: [PATCH] Bug 21645: e.preventDefault on click Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- .../prog/en/modules/admin/library_groups.tt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt index 81d4959f3e..bcf77af6ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt @@ -237,12 +237,14 @@ clickableNodeNames: true, }); - $('.add-group').on('click', function() { + $('.add-group').on('click', function(e) { + e.preventDefault(); var id = $(this).data('groupId'); add_group( id ); }); - $('.edit-group').on('click', function() { + $('.edit-group').on('click', function(e) { + e.preventDefault(); var id = $(this).data('groupId'); var parent_id = $(this).data('groupParentId'); var title = $(this).data('groupTitle'); @@ -253,13 +255,15 @@ edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff ); }); - $('.delete-group').on('click', function() { + $('.delete-group').on('click', function(e) { + e.preventDefault(); var id = $(this).data('groupId'); var title = $(this).data('groupTitle'); delete_group( id, title ); }); - $('.remove-library').on('click', function() { + $('.remove-library').on('click', function(e) { + e.preventDefault(); var id = $(this).data('groupId'); var library = $(this).data('groupLibrary'); var parent_title = $(this).data('groupParentTitle'); -- 2.39.5