mirror of
https://github.com/openvk/openvk
synced 2024-11-14 19:19:14 +03:00
dont remove repost when editin'
This commit is contained in:
parent
49d8bc39a1
commit
51276d66cc
6 changed files with 18 additions and 3 deletions
|
@ -1003,7 +1003,12 @@ final class Wall extends VKAPIRequestHandler
|
||||||
$post->save(true);
|
$post->save(true);
|
||||||
|
|
||||||
if($attachments == 'remove' || sizeof($final_attachments) > 0) {
|
if($attachments == 'remove' || sizeof($final_attachments) > 0) {
|
||||||
$post->unwire();
|
foreach($post->getChildren() as $att) {
|
||||||
|
if(!($att instanceof Post)) {
|
||||||
|
$post->detach($att);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach($final_attachments as $attachment) {
|
foreach($final_attachments as $attachment) {
|
||||||
$post->attach($attachment);
|
$post->attach($attachment);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='post-edit'></div>
|
<div class='post-edit' n:if='!$compact'></div>
|
||||||
<div class="post-menu" n:if="$compact == false">
|
<div class="post-menu" n:if="$compact == false">
|
||||||
<a href="{if !$suggestion}/wall{$post->getPrettyId()}{else}javascript:void(0){/if}" class="date">{$post->getPublicationTime()}
|
<a href="{if !$suggestion}/wall{$post->getPrettyId()}{else}javascript:void(0){/if}" class="date">{$post->getPublicationTime()}
|
||||||
<span n:if="$post->getEditTime()" class="edited editedMark">({_edited_short})</span>
|
<span n:if="$post->getEditTime()" class="edited editedMark">({_edited_short})</span>
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='post-edit'></div>
|
<div class='post-edit' n:if='!$compact'></div>
|
||||||
<div n:if="!($compact ?? false)" class="post-menu">
|
<div n:if="!($compact ?? false)" class="post-menu">
|
||||||
{if is_null($thisUser)}
|
{if is_null($thisUser)}
|
||||||
{var $forceNoDeleteLink = true}
|
{var $forceNoDeleteLink = true}
|
||||||
|
|
|
@ -630,6 +630,7 @@ u(document).on("click", "#editPost", async (e) => {
|
||||||
<div class='post-buttons'>
|
<div class='post-buttons'>
|
||||||
<div class="post-horizontal"></div>
|
<div class="post-horizontal"></div>
|
||||||
<div class="post-vertical"></div>
|
<div class="post-vertical"></div>
|
||||||
|
<div class="post-repost"></div>
|
||||||
<div class="post-source"></div>
|
<div class="post-source"></div>
|
||||||
|
|
||||||
<div class='post-opts'>
|
<div class='post-opts'>
|
||||||
|
@ -695,6 +696,13 @@ u(document).on("click", "#editPost", async (e) => {
|
||||||
edit_place.find(`input[name='source']`).attr('value', 'remove')
|
edit_place.find(`input[name='source']`).attr('value', 'remove')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(api_post.copy_history && api_post.copy_history.length > 0) {
|
||||||
|
edit_place.find('.post-repost').html(`
|
||||||
|
<span>${tr('has_repost')}.</span>
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
// horizontal attachments
|
// horizontal attachments
|
||||||
api_post.attachments.forEach(att => {
|
api_post.attachments.forEach(att => {
|
||||||
const type = att.type
|
const type = att.type
|
||||||
|
|
|
@ -257,6 +257,7 @@
|
||||||
"others_posts" = "Others posts";
|
"others_posts" = "Others posts";
|
||||||
|
|
||||||
"show_more" = "Show more";
|
"show_more" = "Show more";
|
||||||
|
"has_repost" = "Has repost";
|
||||||
|
|
||||||
/* Friends */
|
/* Friends */
|
||||||
|
|
||||||
|
|
|
@ -236,6 +236,7 @@
|
||||||
"clubs_posts" = "Записи сообщества";
|
"clubs_posts" = "Записи сообщества";
|
||||||
"others_posts" = "Чужие записи";
|
"others_posts" = "Чужие записи";
|
||||||
"show_more" = "Показать больше";
|
"show_more" = "Показать больше";
|
||||||
|
"has_repost" = "Содержит репост";
|
||||||
|
|
||||||
/* Friends */
|
/* Friends */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue