toodego: add intertitles to publik notification themes checkboxes (#62951)

This commit is contained in:
Frédéric Péters 2022-04-11 16:58:09 +02:00
parent 7925857503
commit 9c871079f8
1 changed files with 14 additions and 0 deletions

View File

@ -909,6 +909,20 @@ $(function() {
}
});
/* custom checkboxes intertitles for publik notification */
$('.template-pn-thematiques').each(function(idx, elem) {
const titles = Array();
$(elem).find('li label span').each(function(idx, label) {
const title = $(label).text().split('/')[0];
if (titles.indexOf(title) == -1) {
const $title_tag = $('<li class="intertitle"><strong>' + title + '</strong></li>');
$title_tag.prependTo($(label).parents('li').first());
titles.push(title);
}
$(label).text($(label).text().split('/')[1]);
});
});
/* collectivity selector */
$('div.mairie-usager').delegate('select#collectivities', 'change', function(a, b) {
var $selected = $(this).find(':selected');