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为试卷截止且答案公开的情况 if exercise_type == 1 || exercise_type == 4 #1为老师4为试卷截止且答案公开的情况
json.standard_answer standard_answers_array 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 end
if exercise_type == 3 || exercise_type == 4 if exercise_type == 3 || exercise_type == 4
json.user_answer user_answer json.user_answer user_answer

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

@ -52,9 +52,16 @@ class ActionView extends Component {
componentDidMount() { componentDidMount() {
// request // request
window._tpiWidthResize = () => { 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() window.$('.time_limit').hide()
} else { } else {
window.$('#time-consuming').show()
window.$('.time_limit').show() window.$('.time_limit').show()
} }
} }
@ -71,16 +78,27 @@ class ActionView extends Component {
<div className="-flex -layout-h" id="game_operate_action"> <div className="-flex -layout-h" id="game_operate_action">
<style>{` <style>{`
.time_limit { .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> `}</style>
<span className="mt10 -flex c_grey ml15" id="time-consuming"> <span className="mt10 -flex c_grey ml15" id="time-consuming">
{!!time_limit && {!!time_limit &&
<span className="time_limit">{`本关最大执行时间:${real_time_limit}`}</span>} <span className="time_limit">{`本关最大执行时间:${real_time_limit}`}
<span className="spliter"></span>
</span>}
{!gameBuilding && record ? {!gameBuilding && record ?
<Tooltip title={ "本次评测耗时(编译、运行总时间)" }> // <Tooltip title={ "本次评测耗时(编译、运行总时间)" }></Tooltip>
<span>{ record } </span> <span>本次评测耗时(编译运行总时间){ record } </span>
</Tooltip>
: ""} : ""}
</span> </span>

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

Loading…
Cancel
Save