Tento commit je obsažen v:
sneedmaster 2024-02-26 19:17:36 +01:00
rodič dbbcc67e93
revize feb21b2e02
4 změnil soubory, kde provedl 25 přidání a 17 odebrání

Zobrazit soubor

@ -35,11 +35,13 @@ $(function () {
$(".thread").append(data.html + "<br>");
update_expandable($(`#${data.id} .expandable`));
update_reltimes($(`#${data.id}`).find("time"));
update_quote_links($(`#${data.id}`).find(".quote-link"));
break;
case "updated":
$(`#${data.id}`).replaceWith(data.html);
update_expandable($(`#${data.id} .expandable`));
update_reltimes($(`#${data.id}`).find("time"));
update_quote_links($(`#${data.id}`)).find(".quote-link");
break;
case "removed":
if (data.id === parseInt(thread[1])) {

Zobrazit soubor

@ -7,20 +7,26 @@ $(function() {
window.localStorage.removeItem("quoted_post");
}
$(".quote-link").click(function () {
let post_id = $(this).text();
let thread_url = $(this).attr("data-thread-url");
let current_url = window.location.pathname;
update_quote_links($(".quote-link"));
});
if (current_url !== thread_url) {
window.localStorage.setItem("quoted_post", post_id);
window.location.href = `${thread_url}#${post_id}`;
function update_quote_links(elements) {
elements.each(function() {
$(this).click(function () {
let post_id = $(this).text();
let thread_url = $(this).attr("data-thread-url");
let current_url = window.location.pathname;
if (current_url !== thread_url) {
window.localStorage.setItem("quoted_post", post_id);
window.location.href = `${thread_url}#${post_id}`;
return false;
}
$("#post-form").attr("data-visible", true);
$("#content").append(`&gt;&gt;${post_id}\n`);
return false;
}
$("#post-form").attr("data-visible", true);
$("#content").append(`&gt;&gt;${post_id}\n`);
return false;
});
});
});
})
}

Zobrazit soubor

@ -71,7 +71,7 @@ summary {
visibility: visible;
}
.draggable {
#post-form-handle {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;

Zobrazit soubor

@ -6,7 +6,7 @@
{% endif %}
<table class="form-table">
<tr>
<td class="label draggable center" colspan="2">
<td id="post-form-handle" class="label center" colspan="2">
{% if reply %}
Nová odpověď
{% else %}