Filter
$("#filterFeedback-question__yes").on("click", () => { const $container = $("#filterFeedback") const data = { id: $container.data("id"), type: $container.attr("id"), url: window.location.href, yesOrNo: 'yes' }; $.ajax({ type: "POST", url: "/rest/pollfeedback/", data, error: console.log }); if ($container.data("has-no-thanks")) { $("#filterFeedback-header").css("border-bottom", "none"); $("#filterFeedback-body").css("padding", "0"); } $("#filterFeedback-heading").text("Vielen Dank für Ihr Feedback!") $("#filterFeedback-question").hide() $("#filterFeedback-thanks").show() }) $("#filterFeedback-question__no").on("click", () => { const $container = $("#filterFeedback") const data = { id: $container.data("id"), type: $container.attr("id"), url: window.location.href, yesOrNo: 'no' }; $.ajax({ type: "POST", url: "/rest/pollfeedback/", data, error: console.log }); $("#filterFeedback-question").hide() $("#filterFeedback-heading").text("Warum waren diese Filter nicht hilfreich?") if ($container.data("show-reasons")) $("#filterFeedback-reason").show() else $("#filterFeedback-explanation").show() }) $(".filterFeedback-reason__btn").on("click", (e) => { const $container = $("#filterFeedback") const $pressedButton = $(e.target) const reason = $pressedButton.data("reason") const data = { id: $container.data("id"), reason }; $.ajax({ type: "POST", url: "/rest/pollfeedback-reason/", data, error: console.log }); $("#filterFeedback-form__reason").text($pressedButton.text()) $("#filterFeedback-reason").hide() $("#filterFeedback-explanation").show() }) $("#filterFeedback-form").on("submit", (e) => { e.preventDefault() const $container = $("#filterFeedback") const explanation = $("#filterFeedback-form__feedback").val() const data = { id: $container.data("id"), explanation }; $.ajax({ type: "POST", url: "/rest/pollfeedback-explanation/", data, error: console.log }); if ($container.data("has-no-thanks")) { $("#filterFeedback-header").css("border-bottom", "none"); $("#filterFeedback-body").css("padding", "0"); } $("#filterFeedback-heading").text("Vielen Dank für Ihr Feedback!") $("#filterFeedback-explanation").hide() $("#filterFeedback-thanks").show() })

Suchergebnis

5 Ergebnisse gefunden
if ($("#searchFeedback").data("show-reasons")) $("#searchFeedback-explanation").hide() else $("#searchFeedback-reason").hide() $("#searchFeedback-question__yes").on("click", () => { const $container = $("#searchFeedback") const data = { id: $container.data("id"), type: $container.attr("id"), url: window.location.href, yesOrNo: 'yes' }; $.ajax({ type: "POST", url: "/rest/pollfeedback/", data, error: console.log }); if ($container.data("has-no-thanks")) { $("#searchFeedback-header").css("border-bottom", "none"); $("#searchFeedback-body").css("padding", "0"); } $("#searchFeedback-heading").text("Vielen Dank für Ihr Feedback!") $("#searchFeedback-question").hide() $("#searchFeedback-thanks").show() }) $("#searchFeedback-question__no").on("click", () => { const $container = $("#searchFeedback") const data = { id: $container.data("id"), type: $container.attr("id"), url: window.location.href, yesOrNo: 'no' }; $.ajax({ type: "POST", url: "/rest/pollfeedback/", data, error: console.log }); }) $("#searchFeedback-close").on("click", () => { $("#searchFeedback-question").hide() $("#searchFeedback-thanks").show() }) $(".searchFeedback-reason__btn").on("click", (e) => { const $container = $("#searchFeedback") const $pressedButton = $(e.target) const reason = $pressedButton.data("reason") const data = { id: $container.data("id"), reason }; $.ajax({ type: "POST", url: "/rest/pollfeedback-reason/", data, error: console.log }); $("#searchFeedback-form__reason").text($pressedButton.text()) $("#searchFeedback-reason").hide() $("#searchFeedback-explanation").show() }) $("#searchFeedback-form").on("submit", (e) => { e.preventDefault() const $container = $("#searchFeedback") const explanation = $("#searchFeedback-form__feedback").val() const data = { id: $container.data("id"), explanation }; $.ajax({ type: "POST", url: "/rest/pollfeedback-explanation/", data, error: console.log }); if ($container.data("has-no-thanks")) { $("#searchFeedback-header").css("border-bottom", "none"); $("#searchFeedback-body").css("padding", "0"); } $("#searchFeedback-heading").text("Vielen Dank für Ihr Feedback!") $("#searchFeedback-question").hide() $("#searchFeedback-thanks").show() $("#searchFeedback-close").click() })