Bug 21645: e.preventDefault on click

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2018-10-25 17:09:26 -03:00 committed by Nick Clemens
parent f6808f5e55
commit 1dc17d8502

View file

@ -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');