From d84601e550418e0d00fd6ad6682440b94c95302e Mon Sep 17 00:00:00 2001
From: llaffont <llaffont@afi-sa.fr>
Date: Fri, 25 Sep 2015 15:05:18 +0200
Subject: [PATCH] sandbox gladys suggests

fix suggest link not working in chrome
---
 library/ZendAfi/View/Helper/Facettes.php                      | 2 +-
 public/opac/js/recherche.js                                   | 2 +-
 .../modules/opac/controllers/RechercheControllerTest.php      | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/library/ZendAfi/View/Helper/Facettes.php b/library/ZendAfi/View/Helper/Facettes.php
index f46781df591..54e4b94cad8 100644
--- a/library/ZendAfi/View/Helper/Facettes.php
+++ b/library/ZendAfi/View/Helper/Facettes.php
@@ -123,7 +123,7 @@ class ZendAfi_View_Helper_Facettes extends ZendAfi_View_Helper_BaseHelper {
              $this->renderLabel($url, $label)
              . $this->renderCount($count)
              . $this->renderRemove($code, $label),
-             ['class' => 'facette' . ($this->isActive($code) ? 'selected' : '')]);
+             ['class' => 'facette' . ($this->isActive($code) ? ' selected' : '')]);
   }
 
 
diff --git a/public/opac/js/recherche.js b/public/opac/js/recherche.js
index 9af1afd2ab3..128533e4de9 100644
--- a/public/opac/js/recherche.js
+++ b/public/opac/js/recherche.js
@@ -433,7 +433,7 @@ var scrollToSelectedNoticeInResult = function() {
 
 
 function modeFacetteCochable() {
-  $('.filtre_recherche li.facette').each(function() {
+  $('.filtre_recherche li.facette').not('.suggests .facette').each(function() {
     $(this).click(function(){
       $(this).find('a').each(function(){
 	event.preventDefault();
diff --git a/tests/application/modules/opac/controllers/RechercheControllerTest.php b/tests/application/modules/opac/controllers/RechercheControllerTest.php
index 67531161b65..d36c80b9450 100644
--- a/tests/application/modules/opac/controllers/RechercheControllerTest.php
+++ b/tests/application/modules/opac/controllers/RechercheControllerTest.php
@@ -1280,13 +1280,13 @@ class RechercheControllerFacetteSelectedTest extends AbstractControllerTestCase
 
   /** @test */
   public function facetteLivresShouldBeChecked() {
-    $this->assertXPath('//div[@class="facette"]//li[contains(@class,"selected")]',$this->_response->getBody());
+    $this->assertXPath('//div[@class="facette"]//li[contains(@class," selected")]',$this->_response->getBody());
   }
 
 
   /** @test */
   public function liFacetteLivresShouldHaveSiblingsAWidthHrefRemoveFacetteLivre() {
-    $this->assertXPath('//div[@class="facette"]//li[contains(@class,"selected")]/a[@href="/recherche/simple/expressionRecherche/hello/tri/%2A"]',$this->_response->getBody());
+    $this->assertXPath('//div[@class="facette"]//li[contains(@class," selected")]/a[@href="/recherche/simple/expressionRecherche/hello/tri/%2A"]',$this->_response->getBody());
   }
 }
 
-- 
GitLab