By default, mask all section in user form expect the first
This commit is contained in:
parent
c2f014e59f
commit
a781473b42
2 changed files with 9 additions and 2 deletions
|
@ -54,7 +54,7 @@ function toggle_header_section_composents() {
|
||||||
header_section_id = target.id.split('mask_button_')[1];
|
header_section_id = target.id.split('mask_button_')[1];
|
||||||
header_section_composents = $(".header_section_" + header_section_id);
|
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') {
|
if (header_section_composents.css('display') == 'none') {
|
||||||
$(target).html('Afficher la section <i class="fa fa-chevron-down" />')
|
$(target).html('Afficher la section <i class="fa fa-chevron-down" />')
|
||||||
}
|
}
|
||||||
|
@ -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 <i class="fa fa-chevron-down" />')
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
%h3.text-primary.page-header
|
%h3.text-primary.page-header
|
||||||
=champ.libelle
|
=champ.libelle
|
||||||
%span.mask_section{style:'float: right'}
|
%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
|
Masquer la section
|
||||||
%i.fa.fa-chevron-up
|
%i.fa.fa-chevron-up
|
Loading…
Reference in a new issue