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 d20f07353..861fd5806 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -167,9 +167,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..b28fc4639 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -62,6 +62,7 @@ +