Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_aliyun_beta
杨树明 6 years ago
commit 1261d90b26

@ -36,6 +36,14 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选
if exercise_type == 1 || exercise_type == 4 #1为老师4为试卷截止且答案公开的情况
json.standard_answer standard_answers_array
if question.question_type == 2 #返回答案的文字
standard_text = standard_answers_array.first.to_i == 1 ? "正确" : "错误"
else
array_text_answer = []
standard_answers_array.each{|a| array_text_answer.push((a+64).chr)}
standard_text = array_text_answer.join("")
end
json.standard_answer_show standard_text
end
if exercise_type == 3 || exercise_type == 4
json.user_answer user_answer

@ -236,8 +236,7 @@ $(function(){
if(dragging) {
clickX = e.pageX || e.originalEvent.touches[0].pageX;;
if(clickX > leftOffset+0&&clickX<leftOffset+1600) {
console.log('resize')
//console.log(1);
// console.log('resize')
lab.css('left', clickX - 7 - leftOffset + 'px');
$("#game_left_contents").width( clickX-leftOffset + 'px');
nextW2 = clickX-leftOffset;
@ -314,10 +313,16 @@ $(function(){
window.top.__updateWebsshRows && window.top.__updateWebsshRows(rows)
}
window.refresh_editor_monaco = function(height) {
console.log('refresh_editor_monaco')
if (window.editor_monaco) {
height && $('#codetab_con_1').height(height)
window.editor_monaco.layout();
}
// if ($('#game_operate_action').width() < 720) {
// $('#game_operate_action .time_limit').hide()
// } else {
// $('#game_operate_action .time_limit').show()
// }
}
// end;
//解決IE瀏覽器大小改變時webssh佈局變亂。

@ -52,9 +52,16 @@ class ActionView extends Component {
componentDidMount() {
// request
window._tpiWidthResize = () => {
if (window.$('#actionView').width() < 580) {
const _w = window.$('#actionView').width();
if (_w < 446) {
window.$('#time-consuming').hide()
// window.$('#time-consuming').hide()
} else if (_w < 746) {
// 文字放出来之前是 580
window.$('#time-consuming').show()
window.$('.time_limit').hide()
} else {
window.$('#time-consuming').show()
window.$('.time_limit').show()
}
}
@ -71,16 +78,27 @@ class ActionView extends Component {
<div className="-flex -layout-h" id="game_operate_action">
<style>{`
.time_limit {
margin-right: 16px;
margin-right: 0px;
}
.spliter {
border-right: 1px solid;
padding-right: 8px;
margin-right: 8px;
height: 14px;
display: inline-block;
position: relative;
top: 3px;
}
`}</style>
<span className="mt10 -flex c_grey ml15" id="time-consuming">
{!!time_limit &&
<span className="time_limit">{`本关最大执行时间:${real_time_limit}`}</span>}
<span className="time_limit">{`本关最大执行时间:${real_time_limit}`}
<span className="spliter"></span>
</span>}
{!gameBuilding && record ?
<Tooltip title={ "本次评测耗时(编译、运行总时间)" }>
<span>{ record } </span>
</Tooltip>
// <Tooltip title={ "本次评测耗时(编译、运行总时间)" }></Tooltip>
<span>本次评测耗时(编译运行总时间){ record } </span>
: ""}
</span>

@ -14,13 +14,16 @@
min-width: 280px;
}
#time-consuming .time_limit {
display: none;
}
.actionViewfirstButton {
display: none !important;
}
}
@media (max-width: 800px) {
#time-consuming .time_limit {
display: none;
}
}
@media (max-width: 628px) {
.-header-right { display: none }
.exitBtn span { display: none }

Loading…
Cancel
Save