diff --git a/Web/Presenters/AdminPresenter.php b/Web/Presenters/AdminPresenter.php index 02e4086e..0465f036 100644 --- a/Web/Presenters/AdminPresenter.php +++ b/Web/Presenters/AdminPresenter.php @@ -21,7 +21,7 @@ final class AdminPresenter extends OpenVKPresenter $query = $this->queryParam("q") ?? ""; $page = (int) ($this->queryParam("p") ?? 1); - $count = $repo->getFoundCount($query); + $count = $repo->findCount($query); return $repo->find($query, $page); } diff --git a/Web/Presenters/templates/Wall/Wall.xml b/Web/Presenters/templates/Wall/Wall.xml index a7f4936c..fdc6947c 100644 --- a/Web/Presenters/templates/Wall/Wall.xml +++ b/Web/Presenters/templates/Wall/Wall.xml @@ -1,5 +1,5 @@
-
+
{_"wall"} {tr("wall", $count)}
diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js index 07eb8a2c..3d6443d5 100644 --- a/Web/static/js/openvk.cls.js +++ b/Web/static/js/openvk.cls.js @@ -22,15 +22,18 @@ function edit_post(id, wid) { } +function hidePanel(panel, count = 0) +{ + $(panel).toggleClass("content_title_expanded content_title_unexpanded"); + $(panel).next('div').slideToggle(300); + if(count != 0){ + if($(panel).hasClass("content_title_expanded")) + $(panel).html($(panel).html().replaceAll(" ("+count+")", "")); + else + $(panel).html($(panel).html() + " ("+count+")"); + } - - $(function () { -$('.content_title_expanded').click(function(){ - $(this).toggleClass("content_title_expanded content_title_unexpanded"); - $(this).next('div').slideToggle(300); -});}); - - +} document.addEventListener("DOMContentLoaded", function() { //BEGIN