From 0721c40cfc30b28144333f7d0ed2240707aa3bd0 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 17 Oct 2017 09:17:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E4=B8=AD=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E2=80=9C=E5=90=91=E4=B8=8B=E6=8F=92=E5=85=A5xx?= =?UTF-8?q?=E9=A2=98=E2=80=9D=E6=97=B6=EF=BC=8C=E5=85=89=E6=A0=87=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=AE=9A=E4=BD=8D=E5=88=B0=E6=96=B0=E7=9A=84=E9=A2=98?= =?UTF-8?q?=E7=9B=AE=E6=A1=86=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_show_MC.html.erb | 1 + app/views/exercise/_show_MCQ.html.erb | 1 + app/views/exercise/_show_multi.html.erb | 1 + app/views/exercise/_show_single.html.erb | 1 + 4 files changed, 4 insertions(+) diff --git a/app/views/exercise/_show_MC.html.erb b/app/views/exercise/_show_MC.html.erb index 9218eeef1..0cbd131ab 100644 --- a/app/views/exercise/_show_MC.html.erb +++ b/app/views/exercise/_show_MC.html.erb @@ -55,6 +55,7 @@ if(params.textarea.data('init') == undefined) { params.editor = init_exercise_quetison_editor(params); new_quetion_title_editor = params.editor; + new_quetion_title_editor.focus(); params.textarea.data('init', 1); } }); diff --git a/app/views/exercise/_show_MCQ.html.erb b/app/views/exercise/_show_MCQ.html.erb index ffe7db1d4..6509a3a22 100644 --- a/app/views/exercise/_show_MCQ.html.erb +++ b/app/views/exercise/_show_MCQ.html.erb @@ -54,6 +54,7 @@ if(params.textarea.data('init') == undefined) { params.editor = init_exercise_quetison_editor(params); new_quetion_title_editor = params.editor; + new_quetion_title_editor.focus(); params.textarea.data('init', 1); } }); diff --git a/app/views/exercise/_show_multi.html.erb b/app/views/exercise/_show_multi.html.erb index 664453873..3d8a9f653 100644 --- a/app/views/exercise/_show_multi.html.erb +++ b/app/views/exercise/_show_multi.html.erb @@ -47,6 +47,7 @@ if(params.textarea.data('init') == undefined) { params.editor = init_exercise_quetison_editor(params); new_quetion_title_editor = params.editor; + new_quetion_title_editor.focus(); params.textarea.data('init', 1); } }); diff --git a/app/views/exercise/_show_single.html.erb b/app/views/exercise/_show_single.html.erb index d810585e4..1d74962c2 100644 --- a/app/views/exercise/_show_single.html.erb +++ b/app/views/exercise/_show_single.html.erb @@ -48,6 +48,7 @@ if(params.textarea.data('init') == undefined) { params.editor = init_exercise_quetison_editor(params); new_quetion_title_editor = params.editor; + new_quetion_title_editor.focus(); params.textarea.data('init', 1); } }); From adc4f655f91059fa3c0765e441454276ff340063 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 17 Oct 2017 09:19:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E4=B8=AD=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E2=80=9C=E5=90=91=E4=B8=8B=E6=8F=92=E5=85=A5xx?= =?UTF-8?q?=E9=A2=98=E2=80=9D=E6=97=B6=EF=BC=8C=E5=85=89=E6=A0=87=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=AE=9A=E4=BD=8D=E5=88=B0=E6=96=B0=E7=9A=84=E9=A2=98?= =?UTF-8?q?=E7=9B=AE=E6=A1=86=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_show_multi.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/exercise/_show_multi.html.erb b/app/views/exercise/_show_multi.html.erb index 3d8a9f653..f1091e2b9 100644 --- a/app/views/exercise/_show_multi.html.erb +++ b/app/views/exercise/_show_multi.html.erb @@ -48,6 +48,7 @@ params.editor = init_exercise_quetison_editor(params); new_quetion_title_editor = params.editor; new_quetion_title_editor.focus(); + params.textarea.data('init', 1); } });