mirror of
https://github.com/openvk/openvk
synced 2025-07-07 08:19:49 +03:00
Compare commits
25 commits
1bf662c5e2
...
bf30cfaeeb
Author | SHA1 | Date | |
---|---|---|---|
|
bf30cfaeeb | ||
|
9d7971ad77 | ||
|
b9f3a67433 | ||
|
718d4ffd86 | ||
|
fcc4a99799 | ||
|
40b6b2715a | ||
|
3faab6f9e9 | ||
|
89cccd5878 | ||
|
ca07849bb9 | ||
|
c5d4e8d1a0 | ||
|
800ad5d7b8 | ||
|
074bdec314 | ||
|
dd3e355504 | ||
|
cdf2eb685e | ||
|
78dd0bf0d6 | ||
|
a88e17a6e5 | ||
|
acd00c5f86 | ||
|
9e7956ec03 | ||
|
911247b396 | ||
|
f05ea1973e | ||
|
cca6f55bc8 | ||
|
bb2f1b55f7 | ||
|
1ce92f7c58 | ||
|
f276522fc5 | ||
|
5755d13425 |
25 changed files with 181 additions and 60 deletions
|
@ -56,7 +56,7 @@ final class Board extends VKAPIRequestHandler
|
||||||
|
|
||||||
$comment->save();
|
$comment->save();
|
||||||
}
|
}
|
||||||
} catch(\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return $topic->getId();
|
return $topic->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ final class Board extends VKAPIRequestHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = (object) [
|
$obj = (object) [
|
||||||
"items" => []
|
"items" => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($extended) {
|
if ($extended) {
|
||||||
|
@ -222,7 +222,7 @@ final class Board extends VKAPIRequestHandler
|
||||||
$this->fail(4, "Invalid count");
|
$this->fail(4, "Invalid count");
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = (object)[];
|
$obj = (object) [];
|
||||||
|
|
||||||
$club = (new ClubsRepo())->get($group_id);
|
$club = (new ClubsRepo())->get($group_id);
|
||||||
|
|
||||||
|
|
|
@ -411,7 +411,7 @@ final class Groups extends VKAPIRequestHandler
|
||||||
|
|
||||||
$obj = (object) [
|
$obj = (object) [
|
||||||
"count" => sizeof($members),
|
"count" => sizeof($members),
|
||||||
"items" => []
|
"items" => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($members as $member) {
|
foreach ($members as $member) {
|
||||||
|
|
|
@ -75,9 +75,9 @@ abstract class Postable extends Attachable
|
||||||
return new DateTime($edited);
|
return new DateTime($edited);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getComments(int $page, ?int $perPage = null): \Traversable
|
public function getComments(int $page, ?int $perPage = null, string $sort = "ASC"): \Traversable
|
||||||
{
|
{
|
||||||
return (new Comments())->getCommentsByTarget($this, $page, $perPage);
|
return (new Comments())->getCommentsByTarget($this, $page, $perPage, $sort);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCommentsCount(): int
|
public function getCommentsCount(): int
|
||||||
|
|
|
@ -135,7 +135,7 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
$this->template->paginatorConf = (object) [
|
$this->template->paginatorConf = (object) [
|
||||||
"count" => $this->template->count,
|
"count" => $this->template->count,
|
||||||
"page" => $this->queryParam("p") ?? 1,
|
"page" => (int)($this->queryParam("p") ?? 1),
|
||||||
"amount" => 10,
|
"amount" => 10,
|
||||||
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
||||||
];
|
];
|
||||||
|
|
|
@ -146,7 +146,7 @@ final class InternalAPIPresenter extends OpenVKPresenter
|
||||||
{
|
{
|
||||||
if ($_SERVER["REQUEST_METHOD"] !== "POST") {
|
if ($_SERVER["REQUEST_METHOD"] !== "POST") {
|
||||||
header("HTTP/1.1 405 Method Not Allowed");
|
header("HTTP/1.1 405 Method Not Allowed");
|
||||||
exit("ты не по адресу");
|
$this->redirect("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = $this->queryParam("type", false);
|
$type = $this->queryParam("type", false);
|
||||||
|
@ -165,7 +165,7 @@ final class InternalAPIPresenter extends OpenVKPresenter
|
||||||
if ($type == 'post') {
|
if ($type == 'post') {
|
||||||
$this->template->_template = 'components/post.xml';
|
$this->template->_template = 'components/post.xml';
|
||||||
$this->template->post = $post;
|
$this->template->post = $post;
|
||||||
$this->template->commentSection = true;
|
$this->template->commentSection = $this->queryParam("from_page") == "another";
|
||||||
} elseif ($type == 'comment') {
|
} elseif ($type == 'comment') {
|
||||||
$this->template->_template = 'components/comment.xml';
|
$this->template->_template = 'components/comment.xml';
|
||||||
$this->template->comment = $post;
|
$this->template->comment = $post;
|
||||||
|
|
|
@ -102,7 +102,7 @@ final class NoSpamPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
$item = new $model($item);
|
$item = new $model($item);
|
||||||
|
|
||||||
if (key_exists("deleted", $item->unwrap()) && $item->isDeleted()) {
|
if (property_exists($item->unwrap(), "deleted") && $item->isDeleted()) {
|
||||||
$item->setDeleted(0);
|
$item->setDeleted(0);
|
||||||
$item->save();
|
$item->save();
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,6 +133,7 @@ final class VideosPresenter extends OpenVKPresenter
|
||||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
$video->setName(empty($this->postParam("name")) ? null : $this->postParam("name"));
|
$video->setName(empty($this->postParam("name")) ? null : $this->postParam("name"));
|
||||||
$video->setDescription(empty($this->postParam("desc")) ? null : $this->postParam("desc"));
|
$video->setDescription(empty($this->postParam("desc")) ? null : $this->postParam("desc"));
|
||||||
|
$video->setUnlisted(false);
|
||||||
$video->save();
|
$video->save();
|
||||||
|
|
||||||
$this->flash("succ", tr("changes_saved"), tr("changes_saved_video_comment"));
|
$this->flash("succ", tr("changes_saved"), tr("changes_saved_video_comment"));
|
||||||
|
|
|
@ -469,7 +469,11 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
$this->template->cCount = $post->getCommentsCount();
|
$this->template->cCount = $post->getCommentsCount();
|
||||||
$this->template->cPage = (int) ($_GET["p"] ?? 1);
|
$this->template->cPage = (int) ($_GET["p"] ?? 1);
|
||||||
$this->template->comments = iterator_to_array($post->getComments($this->template->cPage));
|
$this->template->sort = $this->queryParam("sort") ?? "asc";
|
||||||
|
|
||||||
|
$input_sort = $this->template->sort == "asc" ? "ASC" : "DESC";
|
||||||
|
|
||||||
|
$this->template->comments = iterator_to_array($post->getComments($this->template->cPage, null, $input_sort));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderLike(int $wall, int $post_id): void
|
public function renderLike(int $wall, int $post_id): void
|
||||||
|
|
|
@ -210,7 +210,7 @@
|
||||||
{var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')}
|
{var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')}
|
||||||
<div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" class="menu_divider"></div>
|
<div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" class="menu_divider"></div>
|
||||||
<a href="/admin" class="link" n:if="$canAccessAdminPanel" title="{_admin} [Alt+Shift+A]" accesskey="a" rel="nofollow">{_admin}</a>
|
<a href="/admin" class="link" n:if="$canAccessAdminPanel" title="{_admin} [Alt+Shift+A]" accesskey="a" rel="nofollow">{_admin}</a>
|
||||||
<a href="/support/tickets" class="link" n:if="$canAccessHelpdesk" rel="nofollow">{_helpdesk}
|
<a href="/support/tickets" class="link" n:if="$canAccessHelpdesk">{_helpdesk}
|
||||||
{if $helpdeskTicketNotAnsweredCount > 0}
|
{if $helpdeskTicketNotAnsweredCount > 0}
|
||||||
(<b>{$helpdeskTicketNotAnsweredCount}</b>)
|
(<b>{$helpdeskTicketNotAnsweredCount}</b>)
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="120" valign="top"><span class="nobold">{_pronouns}: </span></td>
|
<td width="120" valign="top"><span class="nobold">{_pronouns}: </span></td>
|
||||||
<td>{$x->isFemale() ? tr("female") : ($x->isNeutral() ? tr("neutral") : tr("male"))}</td>
|
<td>{$user->isFemale() ? tr("female") : ($user->isNeutral() ? tr("neutral") : tr("male"))}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="120" valign="top"><span class="nobold">{_registration_date}: </span></td>
|
<td width="120" valign="top"><span class="nobold">{_registration_date}: </span></td>
|
||||||
|
|
|
@ -269,7 +269,13 @@
|
||||||
search();
|
search();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#apply").on("click", () => { search(Number($("#noSpam-ban-type").val())); })
|
$("#apply").on("click", (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
MessageBox(tr("warning"), tr("nospam_prevention"), [tr("no"), tr("yes")], [Function.noop, () => {
|
||||||
|
search(Number($("#noSpam-ban-type").val()));
|
||||||
|
}]);
|
||||||
|
})
|
||||||
|
|
||||||
async function selectChange(value) {
|
async function selectChange(value) {
|
||||||
console.log(value);
|
console.log(value);
|
||||||
|
|
|
@ -42,6 +42,6 @@
|
||||||
{block description}
|
{block description}
|
||||||
{var $author = $x->getUser()}
|
{var $author = $x->getUser()}
|
||||||
|
|
||||||
{ovk_proc_strtr($x->getContext(), 50)}<br/>
|
{ovk_proc_strtr($x->getContext(), 200)}<br/>
|
||||||
<span class="nobold">{_author}: </span> <a href="{$author->getURL()}">{$author->getCanonicalName()}</a>
|
<span class="nobold">{_author}: </span> <a href="{$author->getURL()}">{$author->getCanonicalName()}</a>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="button" href="/topic{$topic->getPrettyId()}/delete?hash={urlencode($csrfToken)}">{_delete_topic}</a>
|
<a id="_anotherDelete" class="button" href="/topic{$topic->getPrettyId()}/delete?hash={urlencode($csrfToken)}">{_delete_topic}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
|
|
|
@ -36,9 +36,10 @@
|
||||||
count => $cCount,
|
count => $cCount,
|
||||||
page => $cPage,
|
page => $cPage,
|
||||||
model => "posts",
|
model => "posts",
|
||||||
parent => $post }
|
parent => $post,
|
||||||
|
sort => $sort}
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left; min-height: 100px; width: 32%;">
|
<div style="float: left; min-height: 100px; width: 32%;padding-left: 10px;width: 30%;">
|
||||||
<h4>{_actions}</h4>
|
<h4>{_actions}</h4>
|
||||||
{if isset($thisUser)}
|
{if isset($thisUser)}
|
||||||
{var $canDelete = $post->canBeDeletedBy($thisUser)}
|
{var $canDelete = $post->canBeDeletedBy($thisUser)}
|
||||||
|
@ -47,7 +48,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<a n:if="$canDelete ?? false" class="profile_link" style="display:block;width:96%;" href="/wall{$post->getPrettyId()}/delete">{_delete}</a>
|
<a n:if="$canDelete ?? false" id="_ajaxDelete" class="profile_link" style="display:block;width:96%;" href="/wall{$post->getPrettyId()}/delete">{_delete}</a>
|
||||||
<a
|
<a
|
||||||
n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) AND $post->getEditTime()"
|
n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) AND $post->getEditTime()"
|
||||||
style="display:block;width:96%;"
|
style="display:block;width:96%;"
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
{if !$timeOnly}
|
{if !$timeOnly}
|
||||||
{if $comment->canBeDeletedBy($thisUser)}
|
{if $comment->canBeDeletedBy($thisUser)}
|
||||||
|
|
|
|
||||||
<a href="/comment{$comment->getId()}/delete">{_delete}</a>
|
<a href="/comment{$comment->getId()}/delete" id="_ajaxDelete">{_delete}</a>
|
||||||
{/if}
|
{/if}
|
||||||
{if $comment->canBeEditedBy($thisUser)}
|
{if $comment->canBeEditedBy($thisUser)}
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,5 +1,18 @@
|
||||||
<h4 n:if="$showTitle ?? true">{_comments} ({$count})</h4>
|
<div>
|
||||||
|
<h4 n:if="$showTitle ?? true">{_comments} ({$count})</h4>
|
||||||
|
|
||||||
|
{if !is_null($sort) && $count > 5}
|
||||||
|
<a class="sort_link" n:attr="href => $sort == 'desc' ? '?sort=asc' : '?sort=desc'">
|
||||||
|
{if $sort == 'desc'}
|
||||||
|
{_new_first}
|
||||||
|
{else}
|
||||||
|
{_old_first}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div n:class="sort_link_icon, $sort == 'desc' ? sort_link_icon_desc : sort_link_icon_asc"></div>
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
<div n:ifset="$thisUser" id="standaloneCommentBox">
|
<div n:ifset="$thisUser" id="standaloneCommentBox">
|
||||||
{var $commentsURL = "/al_comments/create/$model/" . $parent->getId()}
|
{var $commentsURL = "/al_comments/create/$model/" . $parent->getId()}
|
||||||
{var $club = $parent instanceof \openvk\Web\Models\Entities\Post && $parent->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($parent->getTargetWall())) : $club}
|
{var $club = $parent instanceof \openvk\Web\Models\Entities\Post && $parent->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($parent->getTargetWall())) : $club}
|
||||||
|
|
|
@ -148,7 +148,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div n:if="!($forceNoCommentsLink ?? false) && $commentSection == true && $compact == false" class="post-menu-s">
|
<div n:if="!($forceNoCommentsLink ?? false) && $commentSection == true && $compact == false" class="post-menu-s">
|
||||||
<a n:if="$commentsCount > 3" href="/wall{$post->getPrettyId()}" class="expand_button">{_view_other_comments}</a>
|
<a n:if="$commentsCount > 3" href="/wall{$post->getPrettyId()}" class="expand_button">{_view_other_comments} ({$commentsCount - 3})</a>
|
||||||
{foreach $comments as $comment}
|
{foreach $comments as $comment}
|
||||||
{include "../comment.xml", comment => $comment, $compact => true}
|
{include "../comment.xml", comment => $comment, $compact => true}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
|
@ -49,7 +49,7 @@ body.dimmed > .dimmer #absolute_territory {
|
||||||
.ovk-diag-body {
|
.ovk-diag-body {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 80vh
|
max-height: 83vh
|
||||||
}
|
}
|
||||||
|
|
||||||
.ovk-diag-action {
|
.ovk-diag-action {
|
||||||
|
|
|
@ -880,7 +880,7 @@ h4 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-geo {
|
.post-geo {
|
||||||
margin: 1px 0px;
|
margin: 8px 0px 2px -3px;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1570,6 +1570,10 @@ body.scrolled .toTop:hover, .toTop.has_down:hover {
|
||||||
color: #3c3c3c;
|
color: #3c3c3c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-has-geo.appended-geo {
|
||||||
|
padding: 6px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.post-source #remove_source_button, #small_remove_button {
|
.post-source #remove_source_button, #small_remove_button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
@ -1884,6 +1888,7 @@ body.scrolled .toTop:hover, .toTop.has_down:hover {
|
||||||
|
|
||||||
#ovkDraw {
|
#ovkDraw {
|
||||||
border: 1px solid #757575;
|
border: 1px solid #757575;
|
||||||
|
min-height: 510px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ovkDraw .lc-drawing.with-gui {
|
#ovkDraw .lc-drawing.with-gui {
|
||||||
|
@ -1892,6 +1897,7 @@ body.scrolled .toTop:hover, .toTop.has_down:hover {
|
||||||
|
|
||||||
#ovkDraw .literally {
|
#ovkDraw .literally {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
height: 510px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ovkDraw .literally .lc-picker,
|
#ovkDraw .literally .lc-picker,
|
||||||
|
@ -2670,7 +2676,8 @@ a.poll-retract-vote {
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-buttons .vertical-attachment .vertical-attachment-content {
|
.post-buttons .vertical-attachment .vertical-attachment-content {
|
||||||
max-height: 27px;
|
/*max-height: 27px;*/
|
||||||
|
padding: 3px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vertical-attachment .vertical-attachment-content .overflowedName {
|
.vertical-attachment .vertical-attachment-content .overflowedName {
|
||||||
|
@ -3201,6 +3208,11 @@ a.poll-retract-vote {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1px;
|
gap: 1px;
|
||||||
|
padding: 5px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-buttons .attachment_note {
|
||||||
|
padding: 3px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment_note svg {
|
.attachment_note svg {
|
||||||
|
@ -3216,6 +3228,10 @@ a.poll-retract-vote {
|
||||||
height: 12px;
|
height: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.attachments .attachment_note {
|
||||||
|
padding: 5px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
#notesList
|
#notesList
|
||||||
{
|
{
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
@ -3252,7 +3268,7 @@ body.article .floating_sidebar, body.article .page_content {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 128;
|
z-index: 128;
|
||||||
width: 100%;
|
width: 98%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -3286,6 +3302,7 @@ body.article .floating_sidebar, body.article .page_content {
|
||||||
.articleView_author > div {
|
.articleView_author > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
margin-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.articleView_author > div > span {
|
.articleView_author > div > span {
|
||||||
|
@ -3383,6 +3400,7 @@ body.article .floating_sidebar, body.article .page_content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 22px;
|
gap: 22px;
|
||||||
|
padding: 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sugglist {
|
.sugglist {
|
||||||
|
@ -3656,7 +3674,7 @@ hr {
|
||||||
.entity_vertical_list {
|
.entity_vertical_list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 3px;
|
gap: 10px;
|
||||||
height: 197px;
|
height: 197px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
@ -3664,6 +3682,7 @@ hr {
|
||||||
.entity_vertical_list.scroll_container {
|
.entity_vertical_list.scroll_container {
|
||||||
height: unset;
|
height: unset;
|
||||||
overflow-y: unset;
|
overflow-y: unset;
|
||||||
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entity_vertical_list .entity_vertical_list_item {
|
.entity_vertical_list .entity_vertical_list_item {
|
||||||
|
@ -3681,12 +3700,16 @@ hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
.entity_vertical_list.m_mini .entity_vertical_list_item .first_column {
|
.entity_vertical_list.m_mini .entity_vertical_list_item .first_column {
|
||||||
gap: 10px;
|
gap: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entity_vertical_list.m_mini .entity_vertical_list_item:hover .first_column a {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entity_vertical_list.m_mini .entity_vertical_list_item .first_column .avatar img {
|
.entity_vertical_list.m_mini .entity_vertical_list_item .first_column .avatar img {
|
||||||
width: 30px;
|
width: 40px;
|
||||||
height: 30px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entity_vertical_list .entity_vertical_list_item .avatar {
|
.entity_vertical_list .entity_vertical_list_item .avatar {
|
||||||
|
@ -4269,8 +4292,8 @@ hr {
|
||||||
.attachments .docGalleryItem {
|
.attachments .docGalleryItem {
|
||||||
display: block;
|
display: block;
|
||||||
min-width: 170px;
|
min-width: 170px;
|
||||||
height: 170px;
|
min-height: 170px;
|
||||||
width: 50%;
|
width: 60%;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4296,3 +4319,23 @@ hr {
|
||||||
.deleted_mark_average {
|
.deleted_mark_average {
|
||||||
padding: 5px 61px;
|
padding: 5px 61px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sort_link {
|
||||||
|
padding: 5px 2px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sort_link_icon {
|
||||||
|
background: url(/assets/packages/static/openvk/img/wall.png?v=3) no-repeat;
|
||||||
|
display: inline-block;
|
||||||
|
height: 11px;
|
||||||
|
width: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sort_link_icon_desc {
|
||||||
|
background-position: 0px -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sort_link_icon_asc {
|
||||||
|
background-position: -11px -15px;
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -845,22 +845,14 @@ u(document).on('click', '.audioEntry .playerButton > .playIcon', async (e) => {
|
||||||
|
|
||||||
if(!window.player.hasTrackWithId(id) && !window.player.isAtAudiosPage()) {
|
if(!window.player.hasTrackWithId(id) && !window.player.isAtAudiosPage()) {
|
||||||
let _nodes = null
|
let _nodes = null
|
||||||
if(u(e.target).closest('.attachments').length > 0) {
|
|
||||||
window.player.connectionType = '.attachments'
|
try_these_containers = [".attachments", ".content_list", ".generic_audio_list", ".audiosInsert", ".scroll_container", ".container_gray"]
|
||||||
_nodes = u(e.target).closest('.attachments').find('.audioEmbed').nodes
|
try_these_containers.forEach(__container => {
|
||||||
} else if(u(e.target).closest('.content_list').length > 0) {
|
if(u(e.target).closest(__container).length > 0) {
|
||||||
window.player.connectionType = '.content_list'
|
window.player.connectionType = __container
|
||||||
_nodes = u(e.target).closest('.content_list').find('.audioEmbed').nodes
|
_nodes = u(e.target).closest(__container).find('.audioEmbed').nodes
|
||||||
} else if(u(e.target).closest('.generic_audio_list').length > 0) {
|
|
||||||
window.player.connectionType = '.generic_audio_list'
|
|
||||||
_nodes = u(e.target).closest('.generic_audio_list').find('.audioEmbed').nodes
|
|
||||||
} else if(u(e.target).closest('.audiosInsert').length > 0) {
|
|
||||||
window.player.connectionType = '.audiosInsert'
|
|
||||||
_nodes = u(e.target).closest('.audiosInsert').find('.audioEmbed').nodes
|
|
||||||
} else if(u(e.target).closest('.scroll_container').length > 0) {
|
|
||||||
window.player.connectionType = '.scroll_container'
|
|
||||||
_nodes = u(e.target).closest('.scroll_container').find('.audioEmbed').nodes
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
window.player.tracks = []
|
window.player.tracks = []
|
||||||
_nodes.forEach(el => {
|
_nodes.forEach(el => {
|
||||||
|
@ -1859,7 +1851,7 @@ function showAudioAttachment(type = 'form', form = null)
|
||||||
}
|
}
|
||||||
let is_attached = false
|
let is_attached = false
|
||||||
if(type == 'form') {
|
if(type == 'form') {
|
||||||
is_attached = (u(form).find(`.post-vertical .vertical-attachment[data-id='${id}']`)).length > 0
|
is_attached = (u(form).find(`.post-vertical .vertical-attachment[data-type='audio'][data-id='${id}']`)).length > 0
|
||||||
} else {
|
} else {
|
||||||
is_attached = (u(form).find(`.PE_audios .vertical-attachment[data-id='${id}']`)).length > 0
|
is_attached = (u(form).find(`.PE_audios .vertical-attachment[data-id='${id}']`)).length > 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -606,7 +606,22 @@ function reportClub(club_id) {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", "#_photoDelete, #_videoDelete", function(e) {
|
$(document).on("click", "#_ajaxDelete", function(e) {
|
||||||
|
MessageBox(tr('warning'), tr('question_confirm'), [
|
||||||
|
tr('yes'),
|
||||||
|
tr('no')
|
||||||
|
], [
|
||||||
|
() => {
|
||||||
|
window.router.route(e.target.href)
|
||||||
|
},
|
||||||
|
Function.noop
|
||||||
|
]);
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
|
return e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#_photoDelete, #_videoDelete, #_anotherDelete", function(e) {
|
||||||
var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
|
var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
|
||||||
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
|
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
|
||||||
formHtml += "</form>";
|
formHtml += "</form>";
|
||||||
|
@ -1125,7 +1140,14 @@ u(document).on("click", "#editPost", async (e) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const new_post_html = await (await fetch(`/iapi/getPostTemplate/${id[0]}_${id[1]}?type=${type}`, {
|
let is_at_post_page = false
|
||||||
|
try {
|
||||||
|
if(location.pathname.indexOf("wall") != -1 && location.pathname.split("_").length == 2) {
|
||||||
|
is_at_post_page = true
|
||||||
|
}
|
||||||
|
} catch(e) {}
|
||||||
|
|
||||||
|
const new_post_html = await (await fetch(`/iapi/getPostTemplate/${id[0]}_${id[1]}?type=${type}&from_page=${is_at_post_page ? "post" : "another"}`, {
|
||||||
'method': 'POST'
|
'method': 'POST'
|
||||||
})).text()
|
})).text()
|
||||||
u(ev.target).removeClass('lagged')
|
u(ev.target).removeClass('lagged')
|
||||||
|
@ -1647,7 +1669,7 @@ u(document).on('click', '#__notesAttachment', async (e) => {
|
||||||
insert_place.append(tr('no_notes'))
|
insert_place.append(tr('no_notes'))
|
||||||
}
|
}
|
||||||
|
|
||||||
notes.notes.forEach(note => {
|
notes.items.forEach(note => {
|
||||||
is_attached = (form.find(`.upload-item[data-type='note'][data-id='${note.owner_id}_${note.id}']`)).length > 0
|
is_attached = (form.find(`.upload-item[data-type='note'][data-id='${note.owner_id}_${note.id}']`)).length > 0
|
||||||
insert_place.append(`
|
insert_place.append(`
|
||||||
<div class='display_flex_row _content' data-attachmentdata="${note.owner_id}_${note.id}" data-name='${escapeHtml(note.title)}'>
|
<div class='display_flex_row _content' data-attachmentdata="${note.owner_id}_${note.id}" data-name='${escapeHtml(note.title)}'>
|
||||||
|
@ -2373,7 +2395,10 @@ async function __processPaginatorNextPage(page)
|
||||||
|
|
||||||
const new_url = new URL(location.href)
|
const new_url = new URL(location.href)
|
||||||
new_url.hash = page
|
new_url.hash = page
|
||||||
history.replaceState(null, null, new_url)
|
//history.replaceState(null, null, new_url)
|
||||||
|
|
||||||
|
showMoreObserver.disconnect()
|
||||||
|
showMoreObserver.observe(u('.paginator:not(.paginator-at-top)').nodes[0])
|
||||||
|
|
||||||
if(typeof __scrollHook != 'undefined') {
|
if(typeof __scrollHook != 'undefined') {
|
||||||
__scrollHook(page)
|
__scrollHook(page)
|
||||||
|
@ -2439,8 +2464,7 @@ u(document).on('click', '#__sourceAttacher', (e) => {
|
||||||
MessageBox(tr('add_source'), `
|
MessageBox(tr('add_source'), `
|
||||||
<div id='source_flex_kunteynir'>
|
<div id='source_flex_kunteynir'>
|
||||||
<span>${tr('set_source_tip')}</span>
|
<span>${tr('set_source_tip')}</span>
|
||||||
<!-- давай, копируй ссылку и переходи по ней -->
|
<input type='text' maxlength='400' placeholder='...'>
|
||||||
<input type='text' maxlength='400' placeholder='https://www.youtube.com/watch?v=lkWuk_nzzVA'>
|
|
||||||
</div>
|
</div>
|
||||||
`, [tr('cancel')], [
|
`, [tr('cancel')], [
|
||||||
() => {Function.noop}
|
() => {Function.noop}
|
||||||
|
@ -2650,7 +2674,7 @@ u(document).on('click', "#__geoAttacher", async (e) => {
|
||||||
${tplMapIcon}
|
${tplMapIcon}
|
||||||
<span>${escapeHtml(geo_name)}</span>
|
<span>${escapeHtml(geo_name)}</span>
|
||||||
<div id="small_remove_button"></div>
|
<div id="small_remove_button"></div>
|
||||||
`)
|
`).addClass("appended-geo")
|
||||||
}, () => {}]
|
}, () => {}]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -2953,3 +2977,28 @@ u(document).on("submit", "#additional_fields_form", (e) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(Number(localStorage.getItem('ux.gif_autoplay') ?? 0) == 1) {
|
||||||
|
const showMoreObserver = new IntersectionObserver(entries => {
|
||||||
|
entries.forEach(async x => {
|
||||||
|
doc_item = x.target.closest(".docGalleryItem")
|
||||||
|
if(doc_item.querySelector(".play-button") != null) {
|
||||||
|
if(x.isIntersecting) {
|
||||||
|
doc_item.classList.add("playing")
|
||||||
|
} else {
|
||||||
|
doc_item.classList.remove("playing")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, {
|
||||||
|
root: null,
|
||||||
|
rootMargin: '0px',
|
||||||
|
threshold: 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
if(u('.docGalleryItem').length > 0) {
|
||||||
|
u('.docGalleryItem').nodes.forEach(item => {
|
||||||
|
showMoreObserver.observe(item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -401,8 +401,10 @@ window.addEventListener('popstate', (e) => {
|
||||||
return
|
return
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
if(e.state != null) {
|
||||||
window.router.route({
|
window.router.route({
|
||||||
url: location.href,
|
url: location.href,
|
||||||
push_state: false,
|
push_state: false,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -868,6 +868,9 @@
|
||||||
"sort_up" = "Sort by ID up";
|
"sort_up" = "Sort by ID up";
|
||||||
"sort_down" = "Sort by ID down";
|
"sort_down" = "Sort by ID down";
|
||||||
|
|
||||||
|
"new_first" = "New frist";
|
||||||
|
"old_first" = "Old first";
|
||||||
|
|
||||||
/* Videos */
|
/* Videos */
|
||||||
|
|
||||||
"videos" = "Videos";
|
"videos" = "Videos";
|
||||||
|
@ -2322,6 +2325,8 @@
|
||||||
"roll_back" = "rollback";
|
"roll_back" = "rollback";
|
||||||
"roll_backed" = "rollbacked";
|
"roll_backed" = "rollbacked";
|
||||||
|
|
||||||
|
"nospam_prevention" = "This action will affect a lot of data. Are you sure you want to apply?";
|
||||||
|
|
||||||
/* RSS */
|
/* RSS */
|
||||||
|
|
||||||
"post_deact_in_general" = "Page deletion";
|
"post_deact_in_general" = "Page deletion";
|
||||||
|
|
|
@ -826,6 +826,9 @@
|
||||||
"sort_up" = "Сортировать по дате создания вверх";
|
"sort_up" = "Сортировать по дате создания вверх";
|
||||||
"sort_down" = "Сортировать по дате создания вниз";
|
"sort_down" = "Сортировать по дате создания вниз";
|
||||||
|
|
||||||
|
"new_first" = "Сначала новые";
|
||||||
|
"old_first" = "Сначала старые";
|
||||||
|
|
||||||
/* Videos */
|
/* Videos */
|
||||||
|
|
||||||
"videos" = "Видеозаписи";
|
"videos" = "Видеозаписи";
|
||||||
|
@ -2217,6 +2220,8 @@
|
||||||
"roll_back" = "откатить";
|
"roll_back" = "откатить";
|
||||||
"roll_backed" = "откачено";
|
"roll_backed" = "откачено";
|
||||||
|
|
||||||
|
"nospam_prevention" = "Данное действие затронет множество данных. Вы действительно хотите применить?";
|
||||||
|
|
||||||
/* RSS */
|
/* RSS */
|
||||||
|
|
||||||
"post_deact_in_general" = "Удаление страницы";
|
"post_deact_in_general" = "Удаление страницы";
|
||||||
|
|
Loading…
Reference in a new issue