版本库路径刷新
This commit is contained in:
parent
ab5b9ec5c3
commit
45ac04aa36
|
|
@ -26,5 +26,7 @@
|
|||
lint: true,
|
||||
readOnly: "nocursor"
|
||||
});
|
||||
shixun_show_CodeMirror.setSize("auto","auto");
|
||||
$(function(){
|
||||
shixun_show_CodeMirror.setSize("auto","auto");
|
||||
});
|
||||
</script>
|
||||
|
|
@ -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"){
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="current_repository_path" class="undis"><%= file_update_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %></div>
|
||||
<script>
|
||||
<% if @myshixun.shixun.try(:webssh) %>
|
||||
$('#codetab_nav_2').on("click", function(){
|
||||
|
|
@ -78,7 +79,7 @@
|
|||
var html = "<iframe src='<%= Redmine::Configuration['webssh'] %>/?Host=" + data.host + "&Port=" + data.port + "&Username=" + data.username + "&Password=" + data.password + "&Gameid=" + data.game_id + "&rows=" + rows + "'" + " style='width:100%;border:0;' scrolling='no' id='game_webssh'></iframe><div class='-brother undis'></div>";
|
||||
// 本地版
|
||||
var html_local ="<iframe src='http://127.0.0.1:9527?Host=106.75.96.108&Port=40054&Username=root&Password=123123&Gameid=" +data.game_id + "&rows=" + rows + "'" + " style='width:100%;border:0;' scrolling='no' id='game_webssh'></iframe><div class='-brother undis'></div>";
|
||||
$("#codetab_con_2").html(html);
|
||||
$("#codetab_con_2").html(html_local);
|
||||
$("#game_webssh").css("min-height", h);
|
||||
HoverLi_new(2);
|
||||
// console.log( $("#game_webssh").contentDocument.body.height());
|
||||
|
|
|
|||
Loading…
Reference in New Issue