From cbbc93acbdda6be9a0a043b0ec604dc264d2a930 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 1 Aug 2015 10:45:32 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E6=A0=87=E5=87=86=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=E6=94=B9=E5=8F=98=E6=97=B6=EF=BC=8C=E8=87=AA?=
=?UTF-8?q?=E5=8A=A8=E8=BF=98=E5=8E=9F=E6=89=80=E6=9C=89=E7=9A=84=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../_homework_detail_programing_form.html.erb | 14 +++++++++++---
app/views/homework_common/programing_test.js.erb | 2 +-
public/javascripts/course.js | 2 +-
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/app/views/homework_common/_homework_detail_programing_form.html.erb b/app/views/homework_common/_homework_detail_programing_form.html.erb
index 5e53c4b15..7c66df057 100644
--- a/app/views/homework_common/_homework_detail_programing_form.html.erb
+++ b/app/views/homework_common/_homework_detail_programing_form.html.erb
@@ -78,7 +78,7 @@
-
+
@@ -96,7 +96,7 @@
- 测试
+ 测试
@@ -115,7 +115,7 @@
- 测试
+ 测试
@@ -142,4 +142,12 @@
}
);
}
+
+ function init_programing_test()
+ {
+ $(".programing_test").each(function(){
+ $(this).removeClass("green_btn red_btn").addClass("blue_btn").text("测试");
+ $(this).next("input").val("");
+ });
+ }
\ No newline at end of file
diff --git a/app/views/homework_common/programing_test.js.erb b/app/views/homework_common/programing_test.js.erb
index 74ec9439a..8f76642f1 100644
--- a/app/views/homework_common/programing_test.js.erb
+++ b/app/views/homework_common/programing_test.js.erb
@@ -1,2 +1,2 @@
-$("#test_send_<%= @index%>").replaceWith(" fl ml5 mt1' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%>");
+$("#test_send_<%= @index%>").replaceWith(" fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%>");
$("#test_result_<%= @index%>").val("<%= @result%>");
\ No newline at end of file
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index c7b01cee1..6ba202b28 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -550,7 +550,7 @@ function add_programing_test(obj) {
"" +
"" +
"" +
- "测试" +
+ "测试" +
"" +
"");
}