var d = document; var e; e = d.getElementById ("kunleisys-reviews"); if (e != null) { e.innerHTML = "
5.9 / 6.0
100% 
235
:
09.09.2023
:
Nezapomenutelný zážitek. S manželkou jsme zde strávili nádherný týden obklopeni útulným prostředím a vřelým personálem. Pokoje byly elegantní, jídlo vynikající a pohledy z okna jako z pohádky. Děkujeme za překrásné momenty a těšíme se na další návštěvu!
6.0 / 6.0
"; } else { alert ("Cannot find DIV-Element for KunLeiSys-Widget"); } (function doMagic() { let btnShowLess = null; let btnShowMore = document.getElementById("btn-show-more"); let maxComments = 10; // Amount of comments to show on btnClick if (document.querySelectorAll("#table_detail").length <= 0) return; if (hideElements()) addButton(); function addButton() { let parentContainer = document.querySelector("#kunleisys-reviews"); if (parentContainer == null || document.querySelector("#table_detail") === null) return false; if (btnShowMore !== null) btnShowMore.parentElement.remove(); let div = document.createElement("div"); div.id = "btn-wrapper"; div.setAttribute("style", "display:grid;grid-template-columns:auto auto;grid-gap:8px;justify-content:center;padding:16px;text-align:center;") btnShowLess = createButton("btn-show-less", "Weniger Bewertungen anzeigen", "none"); btnShowLess.onclick = () => { showLess(); }; div.appendChild(btnShowLess); btnShowMore = createButton("btn-show-more", "Mehr Bewertungen anzeigen"); btnShowMore.onclick = () => { showMore(); }; div.appendChild(btnShowMore); parentContainer.appendChild(div); return true; } function createButton(id, content, display) { let btn = document.createElement("button"); btn.id = id; btn.setAttribute("style", "border:1px solid #ccc;color:#888;background-color:#fff;font-size:medium;padding:16px 10px;width:auto;height:auto;line-height:unset;"); btn.innerHTML = content; if (display != null && display !== "") btn.style.display = display; return btn; } function hideElements() { let max = Math.max(maxComments, 15) let comments = document.querySelectorAll("#table_detail"); if (comments == null || comments.length <= max) return false; for(let i = maxComments; i < comments.length; i++) comments[i].style.display = "none"; return true; } function showMore() { let hiddenComments = document.querySelectorAll("#table_detail[style*='display: none']"); if (hiddenComments == null) return false; for(let i = 0; i < 10 && i < hiddenComments.length; i++) hiddenComments[i].style.display = ""; setButtonState(); } function showLess() { let visibleComments = document.querySelectorAll("#table_detail:not([style*='display: none'])"); if (visibleComments == null || visibleComments.length <= 10) return false; let start = Math.max(maxComments, visibleComments.length - 10); for(let i = start; i < visibleComments.length; i++) visibleComments[i].style.display = "none"; setButtonState(); } function setButtonState() { let vc = document.querySelectorAll("#table_detail:not([style*='display: none'])"); if (vc.length <= maxComments) btnShowLess.style.display = "none"; else btnShowLess.style.display = ""; let hc = document.querySelectorAll("#table_detail[style*='display: none']"); if (hc == null || hc.length <= 0) btnShowMore.style.display = "none"; else btnShowMore.style.display = ""; } })();