diff --git a/app/views/common/403.html b/app/views/common/403.html
index cd8112d6a..cadf821c2 100644
--- a/app/views/common/403.html
+++ b/app/views/common/403.html
@@ -39,6 +39,19 @@
$("#textCount").text(50-$("#subject").val().length)
}
});
+
+ $("#message_to_admin").on("click", function(){
+ if($("#subject").val().trim() == ""){
+ $("#error_tip").show();
+ return;
+ }else{
+ $('#new_memo').submit();
+ }
+ })
+
+ $("#subject").on("focus", function(){
+ $("#error_tip").hide();
+ })
});
@@ -58,8 +71,9 @@
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.text_area :subject, :id=>"subject", :class => "feedbackText mb5", :placeholder => "请在此输入平台的问题和建议,您也可以通过QQ留言,谢谢!" %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
+ 留言不能为空
还能输入50个字符
- 留 言
+ 留 言
取 消
<% end %>
diff --git a/app/views/games/_choice_question.html.erb b/app/views/games/_choice_question.html.erb
index af0d42668..ef47ac332 100644
--- a/app/views/games/_choice_question.html.erb
+++ b/app/views/games/_choice_question.html.erb
@@ -29,19 +29,4 @@
-
-
\ No newline at end of file
+
diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb
index 8405338b8..3f6254735 100644
--- a/app/views/games/_code_actions.html.erb
+++ b/app/views/games/_code_actions.html.erb
@@ -76,13 +76,6 @@
$("#time-consuming").html("耗时:" + days + " 天 " + hours + " 小时 " + minutes + " 分钟 " + seconds + " 秒 ");
}
- /* -----------------下一关增加loading效果--------------------- */
- $("#next_step").live("click", function(){
- nNext = $("#code_estimate");
- html = "下一关
";
- nNext.html(html);
- });
-
// 选择题提交评测
// answer 选择的答案
@@ -149,24 +142,18 @@
/* ----------------- 评测 -------------------- */
function training_task_submmit(){
// 加载页面
- nEvalContent = $("#evaluating_contents");
- nEvalInfo = $("#evaluating_info");
- //nHtmlContent = $("#html_contents");
- nAjaxLoading = $("#evaluating_ajax_loading");
- //nHtmlAjaxLoading = $("#html_ajax_loading");
- nInfoAjaxLoading = $("#info_ajax_loading");
- nAjaxLoading.css("display","flex");
- nInfoAjaxLoading.css("display","flex");
- //nHtmlAjaxLoading.css("display","flex");
- nEvalContent.hide();
- nEvalInfo.hide();
- //nHtmlContent.hide();
- nAjaxLoading.show();
- nInfoAjaxLoading.show();
- // nHtmlAjaxLoading.show();
- nAjaxLoading.html("");
- nInfoAjaxLoading.html("");
- //nHtmlAjaxLoading.html("");
+ nEvalContent = $("#evaluating_contents").hide();
+ nEvalInfo = $("#evaluating_info").hide();
+ nAjaxLoading = $("#evaluating_ajax_loading").css("display","flex").show().html("");
+ nInfoAjaxLoading = $("#info_ajax_loading").css("display","flex").show().html("");
+// nAjaxLoading.css("display","flex");
+// nInfoAjaxLoading.css("display","flex");
+// nEvalContent.hide();
+// nEvalInfo.hide();
+// nAjaxLoading.show();
+// nInfoAjaxLoading.show();
+// nAjaxLoading.html("");
+// nInfoAjaxLoading.html("");
$("#code_test").html("评测中..");
$("#next_step").attr("href", "javascript:void(0);").removeClass("shixun-task-btn").removeClass("task-btn-blue").addClass("task-btn");
$("#exit_shixun").attr("href", "javascript:void(0);").removeClass("shixun-task-btn").removeClass("task-btn-blue").addClass("task-btn");
@@ -201,28 +188,25 @@
clearInterval(intId);
nEvalContent.show();
nEvalInfo.show();
- //nHtmlContent.show();
nAjaxLoading.val("");
nInfoAjaxLoading.val("");
nAjaxLoading.hide();
nInfoAjaxLoading.hide();
- //nHtmlAjaxLoading.hide();
// test_sets 公开测,hide_test_sets 隐藏测试集
- var html = bt('t:exec_results_1',{
- "test_sets": eval('[' + data.test_sets + ']'),
- had_test_count: data.had_test_count,
- test_sets_count: data.test_sets_count,
- had_passed_testsests_error_count: data.had_passed_testsests_error_count,
- test_sets_hidden_count: data.test_sets_hidden_count,
- test_sets_public_count: data.test_sets_public_count,
- had_passed_testsests_hidden_count: data.had_passed_testsests_hidden_count,
- had_passed_testsests_public_count: data.had_passed_testsests_public_count,
- final_score: data.final_score,
- latest_output: data.latest_output,
- language: data.language
- });
- $("#game_test_set_results").html(html);
- $(".blacktab_con").eq(1).trigger("click"); // 回到测试结果页面
+ code_evaluation(
+ eval('[' + data.test_sets + ']'),
+ data.had_test_count,
+ data.test_sets_count,
+ data.had_passed_testsests_error_count,
+ data.test_sets_hidden_count,
+ data.test_sets_public_count,
+ data.had_passed_testsests_hidden_count,
+ data.had_passed_testsests_public_count,
+ data.final_score,
+ data.latest_output,
+ data.language
+ );
+ $("#blacktab_nav_1").trigger("click");
if(data.status == 2){
clearInterval(cm);
clearInterval(intId);
@@ -261,12 +245,10 @@
clearInterval(intId);
nEvalContent.show();
nEvalInfo.show();
- //nHtmlContent.show();
nAjaxLoading.val("");
nInfoAjaxLoading.val("");
nAjaxLoading.hide();
nInfoAjaxLoading.hide();
- //nHtmlAjaxLoading.hide();
var html = "评测";
var html_1 = "实训云平台繁忙(繁忙等级:88)";
$("#code_test").html(html);
@@ -276,13 +258,11 @@
complete: function(XMLHttpRequest,status){if(status=='timeout'){
clearInterval(intId);
nEvalContent.show();
- //nHtmlContent.show();
nEvalInfo.show();
nAjaxLoading.val("");
nInfoAjaxLoading.val("");
nAjaxLoading.hide();
nInfoAjaxLoading.hide();
- //nHtmlAjaxLoading.hide();
ajaxTimeoutTest.abort();
clearInterval(intId);
}}
diff --git a/app/views/games/_file_edit_form.html.erb b/app/views/games/_file_edit_form.html.erb
index 992be58fc..36f240f9a 100644
--- a/app/views/games/_file_edit_form.html.erb
+++ b/app/views/games/_file_edit_form.html.erb
@@ -4,52 +4,38 @@
\ No newline at end of file
diff --git a/app/views/games/_game_results.html.erb b/app/views/games/_game_results.html.erb
index c18486db3..9fdf304f3 100644
--- a/app/views/games/_game_results.html.erb
+++ b/app/views/games/_game_results.html.erb
@@ -20,6 +20,7 @@
\ No newline at end of file
diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb
index 7fa73476b..9ede76d8d 100644
--- a/app/views/games/_game_show.html.erb
+++ b/app/views/games/_game_show.html.erb
@@ -20,7 +20,7 @@
背景知识
<% unless @game_challenge.answer.blank? %>
-
+
参考答案
<% end %>
@@ -68,10 +68,10 @@
<%= render :partial => "games/shixun_comment_block" %>
发送
- " onclick="game_praise()" id="game_praise_tread" class="pt5 color-grey mr20">
+ " onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20">
" alt="赞" ><%= @praise_count %>
- " onclick="game_tread()" id="game_tread" class="color-grey" style="padding-top:7px;">
+ " onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;">
" ><%= @tread_count %>
@@ -92,7 +92,7 @@
<% if @st != 0 %>
<%= render :partial => "games/choice_question" %>
- <% else %>
+ <% else %>
@@ -120,90 +120,12 @@
\ No newline at end of file
diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb
index 03f65361a..60868bbe0 100644
--- a/app/views/games/_repository.html.erb
+++ b/app/views/games/_repository.html.erb
@@ -61,26 +61,8 @@
-
\ No newline at end of file
diff --git a/app/views/layouts/base_myshixun.html.erb b/app/views/layouts/base_myshixun.html.erb
index 4f3a2a245..9eacf107a 100644
--- a/app/views/layouts/base_myshixun.html.erb
+++ b/app/views/layouts/base_myshixun.html.erb
@@ -10,13 +10,13 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/font-awesome','css/taskstyle', 'css/project','css/popup','repository','css/gantt','css/cssPlus-v.0.2-build', 'css/edu-common','css/edu-public', 'css/edu-popup', 'css/edu-tooltipster' %>
- <%= javascript_include_tag 'edu/application' %>
+ <%= javascript_include_tag 'edu/application', 'edu/edu_tpi' %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
-
+
@@ -52,11 +52,12 @@
<%= yield %>
-
--->
+