mirror of
https://github.com/openvk/openvk
synced 2025-07-07 08:19:49 +03:00
AJAX added
This commit is contained in:
parent
ce3ab61b65
commit
bcdb62675f
1 changed files with 12 additions and 2 deletions
|
@ -6,6 +6,16 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
<script>
|
||||||
|
function markAnswer(id, mark) {
|
||||||
|
xhr = new XMLHttpRequest();
|
||||||
|
xhr.open("POST", "/support/comment/" + id + "/rate/" + mark);
|
||||||
|
xhr.send();
|
||||||
|
|
||||||
|
location.reload();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
{if $ticket->isDeleted() == 0 }
|
{if $ticket->isDeleted() == 0 }
|
||||||
<div class="post-author">
|
<div class="post-author">
|
||||||
<a href="#" style="font-size:13px;">
|
<a href="#" style="font-size:13px;">
|
||||||
|
@ -108,9 +118,9 @@
|
||||||
{/if}
|
{/if}
|
||||||
</strong>
|
</strong>
|
||||||
{else}
|
{else}
|
||||||
<a href="/support/comment/{$comment->getId()}/rate/1">{_support_rate_good_answer}</a>
|
<a onClick="markAnswer({$comment->getId()}, 1)">{_support_rate_good_answer}</a>
|
||||||
|
|
|
|
||||||
<a href="/support/comment/{$comment->getId()}/rate/2">{_support_rate_bad_answer}</a>
|
<a onClick="markAnswer({$comment->getId()}, 2)">{_support_rate_bad_answer}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue