Commits

Yang Zhang committed 825c267

add replay

  • Participants
  • Parent commits 7c3f154

Comments (0)

Files changed (2)

File static/main.js

     setTimeout(function(){$('#notifybar').fadeOut('slow');}, 3000);
 }
 
+function reply_at(name){
+    $('#wmd-input').focus();
+    $('#wmd-input').val($('#wmd-input').val()+'@'+name+' ');
+    
 
+}
 
 
 
 
 
 
-

File templates/topic.html

             </small>
         </div>
         <div class='span3'>
-            <a class="" href="#">回复 <i class="icon-comment"></i></a>
+            <a class="" href="#wmd-input" onclick='reply_at("{{topic.poster.nickname}}")'>回复 <i class="icon-comment"></i></a>
         </div>
         
         <div class='span12'>
                 </small>
             </div>
             <div class='span4'>
-                <a class="" href="#">回复 <i class="icon-comment"></i></a>
+                <a class="" href="#wmd-input" onclick='reply_at("{{comment.commenter.nickname}}")'>回复 <i class="icon-comment"></i></a>
             </div>
             
         </div>
     <form id='comment-form'action='/ua/comment?topicid={{topic.id}}' method='post' class='span9 offset1'>
         <div id="wmd-button-bar"></div>
         <textarea id='wmd-input'class="span12 can_at" name='content'rows="4" placeholder="评论内容"></textarea>
-        <input type="submit" id='signupsubmmit' onclick='return comment_submit();'class='btn pull-right' value='创建' />
+        <input type="submit" id='signupsubmmit' onclick='return comment_submit();'class='btn pull-right' value='发表' />
     </form>
     </div>
 </div>