diff --git a/app/assets/javascripts/description.js b/app/assets/javascripts/description.js index 0948b9164..652aadf06 100644 --- a/app/assets/javascripts/description.js +++ b/app/assets/javascripts/description.js @@ -54,7 +54,7 @@ function toggle_header_section_composents() { header_section_id = target.id.split('mask_button_')[1]; header_section_composents = $(".header_section_" + header_section_id); - header_section_composents.slideToggle(200, function(){ + header_section_composents.slideToggle(200, function () { if (header_section_composents.css('display') == 'none') { $(target).html('Afficher la section ') } @@ -63,4 +63,11 @@ function toggle_header_section_composents() { } }); }); + + $.each($("a.mask_section_button"), function (index, e) { + if (index != 0) { + $(e).click(); + $(e).html('Afficher la section ') + } + }); } \ No newline at end of file diff --git a/app/views/users/description/champs/_header_section.html.haml b/app/views/users/description/champs/_header_section.html.haml index 18b34e181..ca20b7342 100644 --- a/app/views/users/description/champs/_header_section.html.haml +++ b/app/views/users/description/champs/_header_section.html.haml @@ -1,6 +1,6 @@ %h3.text-primary.page-header =champ.libelle %span.mask_section{style:'float: right'} - %a.mask_section_button.btn.btn-xs.btn-default{id: "mask_button_"+champ.id.to_s} + %a.mask_section_button.btn.btn-xs.btn-info{id: "mask_button_"+champ.id.to_s} Masquer la section %i.fa.fa-chevron-up \ No newline at end of file