diff --git a/VERSIONS_WIP/118036 b/VERSIONS_WIP/118036 new file mode 100644 index 0000000000000000000000000000000000000000..70cd8e489eeb0221c529988f21482767469fbf66 --- /dev/null +++ b/VERSIONS_WIP/118036 @@ -0,0 +1 @@ + - ticket #118036 : Magasin de thèmes : Correction de l'interface de chargement dans les onglets \ No newline at end of file diff --git a/library/templates/Intonation/View/Jumbotron.php b/library/templates/Intonation/View/Jumbotron.php index 2ffb254249b9c1adc913b305a40f943afe2ccc01..2b17459c6428fc464882dd1c41a8667ca903877d 100644 --- a/library/templates/Intonation/View/Jumbotron.php +++ b/library/templates/Intonation/View/Jumbotron.php @@ -216,8 +216,7 @@ class Intonation_View_Jumbotron extends ZendAfi_View_Helper_BaseHelper { ['class' => 'jumbotron_section_title']) . $this->view->div(['class' => 'jumbotron_section_content'], $element->getContent())); - - return ($element->isAjax()) + return ($element->isAjax() && $element->isvisible()) ? ($this->_renderLoadingIcon() . $content) : $content; } diff --git a/tests/scenarios/Templates/TemplatesAbonneTest.php b/tests/scenarios/Templates/TemplatesAbonneTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e1027b80993aeb5d2412462ccaa50d889630081e --- /dev/null +++ b/tests/scenarios/Templates/TemplatesAbonneTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +require_once 'TemplatesTest.php'; + +class TemplatesAbonneInformationsTest extends TemplatesIntonationAccountTestCase { + + public function setUp() { + parent::setUp(); + $this->dispatch('/opac/abonne/informations/id_profil/72'); + } + + + /** @test */ + public function shouldDisplayPaulInDD() { + $this->assertXpathContentContains('//div//dd', 'Paul'); + } + + + /** @test */ + public function shouldNotContainsLoadingIcon() { + $this->assertNotXPath('//div[contains(@class, "loading_icon")]'); + } +} \ No newline at end of file diff --git a/tests/scenarios/Templates/TemplatesTest.php b/tests/scenarios/Templates/TemplatesTest.php index f73f4aeaf02c63aee06ad8c84fb418a6954211be..9ebb996985e996c3de6899f6c3147f6797aa174c 100644 --- a/tests/scenarios/Templates/TemplatesTest.php +++ b/tests/scenarios/Templates/TemplatesTest.php @@ -2094,17 +2094,6 @@ class TemplatesDispatchIntonationChangeIconAccountWithWrongFilePathTest extends -class TemplatesDispatchAbonneInformationsTest extends TemplatesIntonationAccountTestCase { - /** @test */ - public function shouldDisplayPaulInDD() { - $this->dispatch('/opac/abonne/informations/id_profil/72'); - $this->assertXpathContentContains('//div//dd', 'Paul'); - } -} - - - - class TemplatesDispatchAbonneLoansTest extends TemplatesIntonationAccountTestCase { public function setUp() { parent::setUp();