From 16c06bc0260b5efaa0e93f3773f4fe78858cce42 Mon Sep 17 00:00:00 2001 From: Jonathan Druart <jonathan.druart@biblibre.com> Date: Thu, 13 Jun 2013 11:11:07 +0200 Subject: [PATCH] Bug 10444: Fix prevent the default action on click --- koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt index eeed2eb..6d9ff8e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt @@ -338,7 +338,8 @@ <script type="text/javascript" language="javascript"> /* This function allows to display a new field to search. */ - $(document).on("click", '.ButtonPlus', function() { + $(document).on("click", '.ButtonPlus', function(e) { + e.preventDefault(); $('.ButtonLess').show(); var thisLine = $(this).parent(); var newLine = thisLine.clone(); @@ -346,7 +347,8 @@ thisLine.after(newLine); }); - $(document).on("click", '.ButtonLess', function() { + $(document).on("click", '.ButtonLess', function(e) { + e.preventDefault(); if($(this).parent().siblings().length <= 3 ) { $('.ButtonLess').hide(); } -- 1.7.10.4