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

@ -2,4 +2,4 @@
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage) && $conf->page < $pageCount" class="showMore" data-pageсount="{$pageCount}" data-page="{$conf->page}"> <div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage) && $conf->page < $pageCount" class="showMore" data-pageсount="{$pageCount}" data-page="{$conf->page}">
{_show_more} {_show_more}
</div> </div>

View file

@ -3,7 +3,7 @@
<div id="write" style="padding: 5px 0;" onfocusin="expand_wall_textarea({$textAreaId});"> <div id="write" style="padding: 5px 0;" onfocusin="expand_wall_textarea({$textAreaId});">
<form action="{$route}" method="post" enctype="multipart/form-data" style="margin:0;"> <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> <div>
<!-- padding to fix <br/> bug --> <!-- padding to fix <br/> bug -->
</div> </div>

View file

@ -2697,22 +2697,9 @@ body.article .floating_sidebar, body.article .page_content {
font-size: 12px; 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 { .showMore {
text-align: center; text-align: center;
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
cursor: pointer; cursor: pointer;
} }

View file

@ -44,4 +44,4 @@ tippy(".mention", {
}); });
} }
initMentions() initMentions()

View file

@ -305,6 +305,16 @@ $(document).on("click", ".showMore", async (e) => {
for(const obj of objects) { for(const obj of objects) {
container.insertAdjacentHTML("beforeend", obj.outerHTML) 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() bsdnHydrate()