From 6714f509190f0c9dbbd76946089e05ab715d24d5 Mon Sep 17 00:00:00 2001 From: lalka2016 <99399973+lalka2016@users.noreply.github.com> Date: Fri, 15 Sep 2023 15:38:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A7=D1=82=D0=BE=20=D1=8F=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=BB=D0=B6=D0=B5=D0=BD=20=D0=B7=D0=B4=D0=B5=D1=81=D1=8C=20?= =?UTF-8?q?=D1=81=D0=BA=D0=B0=D0=B7=D0=B0=D1=82=D1=8C=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/Presenters/WallPresenter.php | 1 + Web/Presenters/templates/Photos/UploadPhoto.xml | 2 +- Web/Presenters/templates/components/comment.xml | 6 +++--- .../templates/components/post/microblogpost.xml | 2 +- Web/Presenters/templates/components/post/oldpost.xml | 2 +- Web/static/js/al_photos.js | 8 ++++---- Web/static/js/al_wall.js | 3 ++- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 09392bc3..96b61b48 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -552,6 +552,7 @@ final class WallPresenter extends OpenVKPresenter "nsfw" => $this->postParam("type") === "post" ? (int)$post->isExplicit() : 0, "from_group" => $this->postParam("type") === "post" && $post->getTargetWall() < 0 ? ((int)$post->isPostedOnBehalfOfGroup()) : "false", + "new_text" => $post->getText(false), "author" => [ "name" => $post->getOwner()->getCanonicalName(), "avatar" => $post->getOwner()->getAvatarUrl() diff --git a/Web/Presenters/templates/Photos/UploadPhoto.xml b/Web/Presenters/templates/Photos/UploadPhoto.xml index 6ea987cb..16b03262 100644 --- a/Web/Presenters/templates/Photos/UploadPhoto.xml +++ b/Web/Presenters/templates/Photos/UploadPhoto.xml @@ -23,7 +23,7 @@ -
+
diff --git a/Web/Presenters/templates/components/comment.xml b/Web/Presenters/templates/components/comment.xml index fb8fb244..69238417 100644 --- a/Web/Presenters/templates/components/comment.xml +++ b/Web/Presenters/templates/components/comment.xml @@ -8,19 +8,19 @@ - +
- {$comment->getText()|noescape} + {$comment->getText()|noescape}
diff --git a/Web/Presenters/templates/components/post/microblogpost.xml b/Web/Presenters/templates/components/post/microblogpost.xml index c8cd2a12..6b0444c7 100644 --- a/Web/Presenters/templates/components/post/microblogpost.xml +++ b/Web/Presenters/templates/components/post/microblogpost.xml @@ -72,7 +72,7 @@
- {$post->getText()|noescape} + {$post->getText()|noescape}
diff --git a/Web/Presenters/templates/components/post/oldpost.xml b/Web/Presenters/templates/components/post/oldpost.xml index ad7896f2..6e0b4c53 100644 --- a/Web/Presenters/templates/components/post/oldpost.xml +++ b/Web/Presenters/templates/components/post/oldpost.xml @@ -63,7 +63,7 @@
{var $owner = $author->getId()} - {$post->getText()|noescape} + {$post->getText()|noescape}
diff --git a/Web/static/js/al_photos.js b/Web/static/js/al_photos.js index 59965c09..41bf729b 100644 --- a/Web/static/js/al_photos.js +++ b/Web/static/js/al_photos.js @@ -142,23 +142,23 @@ $(document).on("dragover drop", (e) => { return false; }) -$(document).on("dragover", (e) => { +$(".container_gray").on("dragover", (e) => { e.preventDefault() document.querySelector("#fakeButton").classList.add("dragged") document.querySelector("#fakeButton").value = tr("drag_files_here") }) -$(document).on("dragleave", (e) => { +$(".container_gray").on("dragleave", (e) => { e.preventDefault() document.querySelector("#fakeButton").classList.remove("dragged") document.querySelector("#fakeButton").value = tr("upload_picts") }) -$("#fakeButton").on("drop", (e) => { +$(".container_gray").on("drop", (e) => { e.originalEvent.dataTransfer.dropEffect = 'move'; e.preventDefault() - $(document).trigger("dragleave") + $(".container_gray").trigger("dragleave") let files = e.originalEvent.dataTransfer.files diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 9b54adce..4c8bb933 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -273,7 +273,7 @@ $(document).on("click", "#editPost", (e) => { content.insertAdjacentHTML("afterbegin", `
- +
@@ -343,6 +343,7 @@ $(document).on("click", "#editPost", (e) => { post.querySelector(".post-avatar").setAttribute("src", result.author.avatar) post.querySelector(".post-author-name").innerHTML = result.author.name + post.querySelector(".really_text").setAttribute("data-text", result.new_text) } else { MessageBox(tr("error"), result.error, [tr("ok")], [Function.noop]) post.querySelector("#editPost").click()