# HG changeset patch # User bsw # Date 1634548231 -7200 # Node ID 048d6bae28551a2a313663e5f0bbdb6341446d74 # Parent 7df91db759ce1bbff2aa6aeffd57295321ae5fd4 Fixed dialog cross-browser functionality diff -r 7df91db759ce -r 048d6bae2855 app/main/initiative/_suggestions.lua --- a/app/main/initiative/_suggestions.lua Fri Oct 15 09:57:42 2021 +0200 +++ b/app/main/initiative/_suggestions.lua Mon Oct 18 11:10:31 2021 +0200 @@ -6,7 +6,7 @@ if direct_supporter then - ui.tag{ tag = "dialog", attr = { id = "rating_dialog" }, content = function () + ui.tag{ tag = "div", attr = { id = "rating_dialog", class = "hidden" }, content = function () local opinion = {} ui.form { @@ -112,7 +112,7 @@ ui.tag{ tag = "input", attr = { - onclick = "document.getElementById('rating_dialog').close(); return false;", + onclick = "document.getElementById('rating_dialog').classList.add('hidden'); return false;", type = "submit", class = "mdl-button mdl-js-button", value = _"cancel" diff -r 7df91db759ce -r 048d6bae2855 static/js/xhr.js --- a/static/js/xhr.js Fri Oct 15 09:57:42 2021 +0200 +++ b/static/js/xhr.js Mon Oct 18 11:10:31 2021 +0200 @@ -41,7 +41,9 @@ document.getElementById('rating_fulfilled').MaterialRadio.uncheck(); document.getElementById('rating_notfulfilled').MaterialRadio.uncheck(); } - document.getElementById('rating_dialog').showModal(); +// document.getElementById('rating_dialog').showModal(); + document.getElementById('rating_dialog').classList.remove("hidden"); + } function updateOpinion() { @@ -102,7 +104,8 @@ document.getElementById("s" + suggestionId + "_rate_button").innerHTML = rateSuggestionUpdateRatingText; } document.getElementById("s" + suggestionId + "_rate_button").setAttribute("onclick", "rateSuggestion(" + suggestionId + ", " + degree + ", " + fulfilled + ");return false;") - document.getElementById('rating_dialog').close(); +// document.getElementById('rating_dialog').close(); + document.getElementById('rating_dialog').classList.add("hidden"); fetch(baseURL + "opinion/xhr_update", { method: "POST", diff -r 7df91db759ce -r 048d6bae2855 static/lf4.css --- a/static/lf4.css Fri Oct 15 09:57:42 2021 +0200 +++ b/static/lf4.css Mon Oct 18 11:10:31 2021 +0200 @@ -741,6 +741,31 @@ margin-top: 0; } +#rating_dialog { + position: fixed; + top: 0px; + bottom: 0px; + max-width: calc((100% - 6px) - 2em); + max-height: calc((100% - 6px) - 2em); + overflow: auto; + display: block; + left: 0px; + right: 0px; + width: fit-content; + width: -moz-fit-content; + height: fit-content; + height: -moz-fit-content; + color: #000; + margin: auto; + border-width: initial; + border-style: solid; + border-color: initial; + border-image: initial; + padding: 1em; + background: #fff; + z-index: 1; +} + .survey_counter { position: absolute;; right: 20px;