Bug 10444: Fix prevent the default action on click
In particular, clicking the [+] and [-] links on the
OPAC advanced search page will no longer scroll
the page back to the top.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6e6ed43065)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
7d767f44ff
commit
ed27574a6f
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue