var resShowDoc; $(document).ready(function(){ $("#btnPrint").click(function(){ window.print(); }); $("#btnGoBack").click(function(){ goBack(); }); $("#docTemplateBody").click(function(){ if(window.load) window.load(); }); resShowDoc = { "alpha" : $("#alpha").val(), "title" : $("#title").val(), "dbType" : $("#dbType").val(), "langCont" : $("#langCont").val(), "otherLangCont" : $("#otherLangCont").val(), "showSelections" : $("#showSelections").val(), "consolidetedDateLabel" : $("#consolidetedDateLabel").val() }; if(typeof resShowDoc !== 'undefined' && resShowDoc.showSelections == "true"){ $("#DocTemplateTable").addClass("showSelections"); $("span.card-header").removeClass("d-block").addClass("d-none"); } $('#copyToClipboard').removeClass("d-block").addClass("d-none"); $('a.back-to-top').remove(); if(resShowDoc.output == 'selections'){ var listTextSpan = $('span.texte-courant'); var i = 1; while (i < listTextSpan.length){ if ((($(listTextSpan[i]).text() == '[...]') && ($(listTextSpan[i - 1]).text() == '[...]')) && ($(listTextSpan[i]).parents('.section').attr('id').split(':')[1] == $(listTextSpan[i - 1]).parents('.section').attr('id').split(':')[1])) { if ($(listTextSpan[i]).prev("span.Label-Z.LabelBase") != 'undefined' && $(listTextSpan[i]).prev("span.Label-Z.LabelBase") != null){ $(listTextSpan[i]).prev("span.Label-Z.LabelBase").remove(); } $(listTextSpan[i]).remove(); listTextSpan.splice(i, 1); } else{ i = i + 1; } } $('span.Label-Section').each(function(){ var me = $(this); if (me.next().text() == '[...]') { $('
').insertAfter(this); $('
').insertAfter(this); } }); } }); function goBack() { window.history.back(); }