mirror of
https://github.com/QingdaoU/Spirit.git
synced 2024-12-29 16:02:04 +00:00
parent
ff5c9fe3bb
commit
9a4064ac28
@ -69,7 +69,7 @@
|
||||
|
||||
{% ifnotequal c.user.pk user.pk %}
|
||||
<li><a href="{% url "spirit:comment:publish" topic_id=topic.pk pk=c.pk %}" >{% trans "quote" %}</a></li>
|
||||
<li><a href="#reply" >{% trans "reply" %}</a></li>
|
||||
<li><a href="#reply" class="js-reply-button" data="@{{ c.user.username }}" >{% trans "reply" %}</a></li>
|
||||
{% endifnotequal %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@ -37,6 +37,7 @@ class Editor
|
||||
$('.js-box-image').on('click', @addImage)
|
||||
$('.js-box-poll').on('click', @addPoll)
|
||||
$('.js-box-preview').on('click', @togglePreview)
|
||||
$('.js-reply-button').on('click', @replyButton)
|
||||
|
||||
wrapSelection: (preTxt, postTxt, defaultTxt) =>
|
||||
preSelection = @el
|
||||
@ -99,6 +100,11 @@ class Editor
|
||||
|
||||
return false
|
||||
|
||||
replyButton: (e) =>
|
||||
@wrapSelection(" ", " ", $(e.currentTarget).attr("data"))
|
||||
$('#id_comment').focus()
|
||||
return false
|
||||
|
||||
|
||||
$.fn.extend
|
||||
editor: (options) ->
|
||||
|
Loading…
Reference in New Issue
Block a user