From 45ac04aa366ed065bd3bd19747972ee1deebd2e4 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 18 Aug 2017 16:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/common/_file.html.erb | 4 +++- app/views/games/_code_actions.html.erb | 3 ++- app/views/games/_repository.html.erb | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/common/_file.html.erb b/app/views/common/_file.html.erb index f3d1c3841..45689e399 100644 --- a/app/views/common/_file.html.erb +++ b/app/views/common/_file.html.erb @@ -26,5 +26,7 @@ lint: true, readOnly: "nocursor" }); - shixun_show_CodeMirror.setSize("auto","auto"); + $(function(){ + shixun_show_CodeMirror.setSize("auto","auto"); + }); \ 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 3f6254735..601c65cd0 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -159,9 +159,10 @@ $("#exit_shixun").attr("href", "javascript:void(0);").removeClass("shixun-task-btn").removeClass("task-btn-blue").addClass("task-btn"); $(".blacktab_con").eq(1).trigger("click"); // 回到测试结果页面 // 保存版本库代码 + var fileUpdateUrl = $("#current_repository_path").html(); $.ajax({ type: "POST", - url: '<%= file_update_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %>', + url: fileUpdateUrl, data:{ content: $('#challenge-answer-edit-small').val()}, success: function(data){ if(data.success == "success"){ diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index 60868bbe0..bced475e8 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -62,6 +62,7 @@ +