diff --git a/VERSIONS_HOTLINE/139853 b/VERSIONS_HOTLINE/139853 new file mode 100644 index 0000000000000000000000000000000000000000..cb1cee0f6cd8d82d176a3abc8cc593f560ebc7f3 --- /dev/null +++ b/VERSIONS_HOTLINE/139853 @@ -0,0 +1 @@ + - ticket #139853 : Magasin de thèmes : Correction de l'affichage du bouton de recherche avancée. \ No newline at end of file diff --git a/library/templates/Intonation/Library/Link.php b/library/templates/Intonation/Library/Link.php index 38fabd728d5fa6f04ff4e2aff201b2eec605a15c..358f318d051607a6c352e393e594c59ab1f24568 100644 --- a/library/templates/Intonation/Library/Link.php +++ b/library/templates/Intonation/Library/Link.php @@ -21,6 +21,7 @@ class Intonation_Library_Link extends Class_Button { + protected $_inline_text, $_class = '', @@ -61,12 +62,13 @@ class Intonation_Library_Link extends Class_Button { public function getClass() { - return $this->_class; + return $this->getAttrib('class'); } public function setClass($class) { - $this->_class = $class; + $classes = $this->getAttrib('class'); + $this->setAttrib('class', $classes . ' ' . $class); return $this; } @@ -102,4 +104,4 @@ class Intonation_Library_Link extends Class_Button { $this->_callback = $callback; return $this; } -} +} \ No newline at end of file diff --git a/library/templates/Intonation/Library/View/Wrapper/Record.php b/library/templates/Intonation/Library/View/Wrapper/Record.php index 71d85f215b383c8a614205ef149f735b09a8303c..3d011c90c7597d630cf808a5de559537bd537a34 100644 --- a/library/templates/Intonation/Library/View/Wrapper/Record.php +++ b/library/templates/Intonation/Library/View/Wrapper/Record.php @@ -527,7 +527,6 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra ->setTitle($this->_('Voir plus d\'actions pour le document %s', $this->_model->getTitrePrincipal(' '))) ->setClass('view_more_record_actions') - ->setAttrib('class', 'more_action') ->setCallback(function($button) use ($actions) { $button->setCallback(null); diff --git a/library/templates/Intonation/View/TagAction.php b/library/templates/Intonation/View/TagAction.php index ff96bbc7bd78b4db0cfc96499ae1d904aac21713..5d982c024c966e845e291e584f16a235783ed492 100644 --- a/library/templates/Intonation/View/TagAction.php +++ b/library/templates/Intonation/View/TagAction.php @@ -57,9 +57,6 @@ class Intonation_View_TagAction extends ZendAfi_View_Helper_BaseHelper { unset($attribs['class']); } - if ($class = $action->getClass()) - $classes[] = $class; - if ($only_classes = $action->getOnlyClasses()) $classes = [$only_classes]; diff --git a/library/templates/Intonation/View/Template/Permalink.php b/library/templates/Intonation/View/Template/Permalink.php index afe778af0c17cf760bb4e0e15303d0971fd14425..6979cc0b070f5d4f39fdc065e6d717ce0f4e905f 100644 --- a/library/templates/Intonation/View/Template/Permalink.php +++ b/library/templates/Intonation/View/Template/Permalink.php @@ -25,8 +25,8 @@ class Intonation_View_Template_Permalink extends ZendAfi_View_Helper_BaseHelper ->setText($this->_('Lien …')) ->setImage($this->view->templateIco('permalink', 'utils')) ->setTitle($this->_('Voir le lien permanent suivant: %s', $url)) - ->setClass('view_permalink permalink py-1 my-1') - ->setAttribs(['data-url' => $url, + ->setAttribs(['class' => 'view_permalink permalink py-1 my-1', + 'data-url' => $url, 'data-helptext' => $this->_('Copiez le lien suivant'), 'onclick' => 'popupPermalink(this);']); } diff --git a/tests/scenarios/Templates/TemplatesWidgetTest.php b/tests/scenarios/Templates/TemplatesWidgetTest.php index f1f616149cf3fe3c7fd3b254b1558bdac50b8bbe..6e1c8964cc717612eca68a77e915404a60b716da 100644 --- a/tests/scenarios/Templates/TemplatesWidgetTest.php +++ b/tests/scenarios/Templates/TemplatesWidgetTest.php @@ -566,6 +566,12 @@ class TemplatesWidgetSearchInlineStyleTest extends TemplatesIntonationTestCase { public function searchButtonSubmitShouldHaveClassBtnSm() { $this->assertXPath('//div[contains(@class,"boite rech_simple")]//form//div[contains(@class, "form-row")]//input[@type="submit"][contains(@class, "btn-sm")]'); } + + + /** @test */ + public function advancedSearchButtonShouldHaveClassDropdownToggle() { + $this->assertXPath('//div[contains(@class,"boite rech_simple")]//div[@class="dropdown"]/button[contains(@class, "dropdown-toggle")]'); + } }