Permalink
Browse files

Merge pull request #290 from booxood/master

修复评论回复的问题
  • Loading branch information...
2 parents dd99112 + edc0db1 commit ddd0a4a29ba435e46d2d5f54ea3080328fe680af @alsotang alsotang committed Mar 8, 2014
Showing with 5 additions and 2 deletions.
  1. +4 −1 public/javascripts/editor.js
  2. +1 −1 views/topic/index.html
@@ -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
@@ -166,7 +166,7 @@ <h3>
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);

0 comments on commit ddd0a4a

Please sign in to comment.