codeMirror高度,更新实训json字段

This commit is contained in:
daiao 2017-04-27 16:24:29 +08:00
parent b039bbeb52
commit 61b46f4aad
6 changed files with 10 additions and 8 deletions

View File

@ -116,7 +116,7 @@ class ChallengesController < ApplicationController
end
# 向jenkins端发送请求构建pipeline片段实时返回结果
jenkins_shixuns = Redmine::Configuration['jenkins_shixuns']
params = {:challengeStage => "#{@challenge.position}", :challengeType => "#{@challenge.evaluation_way.to_i}", :challengeProgramName => "#{@challenge.path}", :trainingID => "#{@shixun.id}"}
params = {:challengeStage => "#{@challenge.position}", :challengeType => "#{@challenge.evaluation_way.to_i}", :challengeProgramName => "#{@challenge.exec_path}", :trainingID => "#{@shixun.id}"}
uri = URI("#{jenkins_shixuns}/jenkins-exec/game/generatePipelineScriptForChallenge")
res = uri_exec uri, {challengeInfo: params.to_json}
if res['code'] == 0

View File

@ -65,7 +65,7 @@
editor_CodeMirror.setSize("auto","auto");
editor_CodeMirror.refresh();
var h = $("#games_repository_contents").height() - $("#top_repository").height() - 10;
$(".CodeMirror-scroll").css("min-height", h);
$(".CodeMirror-scroll").css("max-height", h);
$("#file_entry_content").find(".CodeMirror-scroll").css("min-height", h);
$("#file_entry_content").find(".CodeMirror-scroll").css("max-height", h);
});
</script>

View File

@ -46,7 +46,7 @@
<div id="tab_con_3" class="undis tab-info" >
<div class="fit -scroll">
<div class="-layout-v -fit">
<div class="-flex -scroll task-padding16" id="game_answer_show"></div>
<div class="-flex -scroll task-padding-new" id="game_answer_show"></div>
<div class="undis" id="hidden_game_answer"><%= @game_challenge.answer %></div>
</div>
</div>
@ -113,7 +113,8 @@
flowChart : true, // 默认不解析
sequenceDiagram : true // 默认不解析
});
myCodeMirror.setSize('auto','auto');//设置版本库codemirror的高度
myCodeMirror.setSize("auto", "auto");//设置版本库codemirror的高度
$("#game_answer_show").find(".CodeMirror-scroll").css("margin-bottom", 0);
$("#game_answer_show" ).children(".CodeMirror").css("line-height", 1.2);
$("#game_answer_show").children().css("border", 0);
// 设置图片最大宽度不能超出边框

View File

@ -37,8 +37,8 @@
control = 0;
}
var h = $("#games_repository_contents").height() - $("#top_repository").height() - 10;
$(".CodeMirror-scroll").css("min-height", h);
$(".CodeMirror-scroll").css("max-height", h);
$("#file_entry_content").find(".CodeMirror-scroll").css("min-height", h);
$("#file_entry_content").find(".CodeMirror-scroll").css("max-height", h);
}
// 测评的扩大与缩小
function valuation_extend_and_zoom(){

View File

@ -4,7 +4,7 @@
<a href="javascript:void(0);" onclick="hideModal()"><i class="fa fa-times-circle font-18 link-color-grey fr"></i></a>
<div class="cl"></div>
</div>
<div class="sy_popup_con" style="width:380px;">
<div class="sy_popup_con" style="width:360px;">
<ul class="sy_popup_add" >
<li class="center mb30" style="line-height:20px">
<% if result %>

View File

@ -185,6 +185,7 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
.greytab-inner{ background:#fff; }
.blacktab-inner{ background:#333;}
.task-padding16{ padding:16px;}
.task-padding-new{ padding-top: 16px}
/* TPM统计 20170321byLB */
.panel-warp-3{ width: 30%; background:#23b181; color:#fff; margin:2.5%; margin-right:0; position: relative; }
.panel-warp-3-over{ background:#fff;opacity:0.8; color:#29bd8b; width: 100%; height:135px; position: absolute; top:0; left:0; text-align: center; padding-top:130px;}