From e4d35cfa45bc7fbe2e3d62a329582cca9a1227a5 Mon Sep 17 00:00:00 2001 From: gloas <gloas@git-test.afi-sa.fr> Date: Fri, 3 Jan 2014 09:19:34 +0000 Subject: [PATCH] facette cochable: maj recherche.js: fonctionnement sans checkbox --- public/opac/js/recherche.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/public/opac/js/recherche.js b/public/opac/js/recherche.js index 4eca21f9ee7..f4e2f621d93 100644 --- a/public/opac/js/recherche.js +++ b/public/opac/js/recherche.js @@ -414,12 +414,14 @@ var scrollToSelectedNoticeInResult = function() { function modeFacetteCochable() { $('.filtre_recherche li.facette_cochable').each(function() { - $(this).find('a').click(function(event) { - event.preventDefault(); - $(this).siblings('input').click(); - }); - $(this).find('input').click(function(){ - window.location = $(this).attr('checked') ? $(this).next().attr('href') : $(this).siblings('.remove_facette').attr('href'); + $(this).click(function(){ + $(this).find('a').each(function(){ + event.preventDefault(); + }); + + window.location = $(this).hasClass('checked') + ? $(this).children('a.remove_facette').attr('href') + : $(this).children('a.facette').attr('href'); }); }); } -- GitLab