From 3a81cb377d6b96cfd678cfaeafb2f8e2eccb2d09 Mon Sep 17 00:00:00 2001 From: jiyinyiyong Date: Sun, 1 Jul 2012 10:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=A1=86=E6=9B=B4=E5=AE=B9?= =?UTF-8?q?=E6=98=93=E8=81=9A=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/style.css | 2 +- views/topic/index.html | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 61ff43b..6471ed0 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -507,7 +507,7 @@ textarea[id^=wmd-input] { height: 213px; } .reply2-wmd-preview { - width: 460px; + width: 518px; } .wmd-prompt-background { background-color: Black; diff --git a/views/topic/index.html b/views/topic/index.html index 47bd26d..3de80ee 100644 --- a/views/topic/index.html +++ b/views/topic/index.html @@ -178,17 +178,23 @@ } run_md_editor(); + $('#wmd-input').mouseover(function(){ + $('#wmd-input').focus() + }); + $('.reply2_btn').click(function () { var $btn = $(this); // var editor = $btn.parent().next('.reply2_area').find('.reply2_editor'); var editor = $btn.parent().parent().find('.reply2_editor'); - editor.slideToggle('fast'); + editor.slideToggle('fast'); + editor.find('textarea').focus(); }); $('.reply2_at_btn').click(function () { var $btn = $(this); var editor = $btn.parents('.reply2_area').find('.reply2_editor'); editor.show('fast'); + editor.find('textarea').focus(); var user = $btn.parents('.reply2_item').find('.reply_author').find('a').html(); var textarea = editor.find('textarea'); if (textarea.val().indexOf(user) === -1) {