Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #290 from booxood/master

修复评论回复的问题
  • Loading branch information...
commit ddd0a4a29ba435e46d2d5f54ea3080328fe680af 2 parents dd99112 + edc0db1
@alsotang alsotang authored
Showing with 5 additions and 2 deletions.
  1. +4 −1 public/javascripts/editor.js
  2. +1 −1  views/topic/index.html
View
5 public/javascripts/editor.js
@@ -8,7 +8,10 @@ function createEpicEditor (textarea) {
var $node = $(textarea);
var id = $node.attr('id');
var h = $node.height();
- $node.before('<div id="editor_' + id + '" style="height:' + h + 'px; border: 1px solid #DDD; border-radius: 4px;"></div>');
+ var l = $node.parents('.reply2_form').find('#editor_'+id).length;
+ if (l == 0) {
+ $node.before('<div id="editor_' + id + '" style="height:' + h + 'px; border: 1px solid #DDD; border-radius: 4px;"></div>');
+ }
$node.hide();
var opts = {
View
2  views/topic/index.html
@@ -166,7 +166,7 @@
var editorWrap = parent.find('.reply2_form');
parent.find('.reply2_area').prepend(editorWrap);
var textarea = editorWrap.find('textarea.editor');
- var user = $btn.parents('.cell').find('.reply_author a').html();
+ textarea.val('');
editorWrap.show('fast', function () {
var editor = createEpicEditor(textarea);
Please sign in to comment.
Something went wrong with that request. Please try again.