Newlines and fix textareas

This commit is contained in:
lalka2016 2023-08-11 12:37:25 +03:00
parent 8e6d396f93
commit 8bccab7bc0
5 changed files with 14 additions and 17 deletions

View file

@ -3,7 +3,7 @@
<div id="write" style="padding: 5px 0;" onfocusin="expand_wall_textarea({$textAreaId});">
<form action="{$route}" method="post" enctype="multipart/form-data" style="margin:0;">
<textarea id="wall-post-input{$textAreaId}" placeholder="{_write}" name="text" style="width: 100%;resize: none;" class="small-textarea"></textarea>
<textarea id="wall-post-input{$textAreaId}" data-id="{$textAreaId}" placeholder="{_write}" name="text" style="width: 100%;resize: none;" class="small-textarea"></textarea>
<div>
<!-- padding to fix <br/> bug -->
</div>

View file

@ -2697,19 +2697,6 @@ body.article .floating_sidebar, body.article .page_content {
font-size: 12px;
}
.small_red_button {
float: right;
font-weight: bold;
}
.small_red_button a {
color: #B0B0B0;
}
.small_red_button a:hover {
color: #a7a7a7;
}
.showMore {
text-align: center;
padding-top: 10px;

View file

@ -306,6 +306,16 @@ $(document).on("click", ".showMore", async (e) => {
container.insertAdjacentHTML("beforeend", obj.outerHTML)
}
if(result.querySelectorAll("textarea").length > 0) {
for(const trea of result.querySelectorAll("textarea")) {
setupWallPostInputHandlers(trea.dataset.id)
u("#post-buttons" + trea.dataset.id + " .postFileSel").on("change", function() {
handleUpload.bind(this, trea.dataset.id)();
});
}
}
bsdnHydrate()
initMentions()