diff --git a/Web/Presenters/templates/Photos/Photo.xml b/Web/Presenters/templates/Photos/Photo.xml index ad9f9efd..a5e17caa 100644 --- a/Web/Presenters/templates/Photos/Photo.xml +++ b/Web/Presenters/templates/Photos/Photo.xml @@ -26,7 +26,7 @@
-
+
{include "../components/comments.xml", comments => $comments, count => $cCount, page => $cPage, model => "photos", parent => $photo}
diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 297e7e43..864d492f 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -188,8 +188,11 @@ function OpenMiniature(e, photo, post, photo_id) {
- +
+
+ +
`); u("body").addClass("dimmed").append(dialog); @@ -265,6 +268,23 @@ function OpenMiniature(e, photo, post, photo_id) { } }); + ky("/photo" + photo_id, { + hooks: { + afterResponse: [ + async (_request, _options, response) => { + let parser = new DOMParser(); + let body = parser.parseFromString(await response.text(), "text/html"); + + let element = u(body.getElementsByClassName("ovk-photo-details")).last(); + + u(".ovk-photo-details").last().innerHTML = element.innerHTML; + + u("#photo_com_title_photos").last().innerHTML = "Фотография " + imagesIndex + " из " + imagesCount; + } + ] + } + }); + return u(".ovk-photo-view-dimmer"); }