Merge branch 'dev_huang' of https://bdgit.trustie.net/hushasha/bigdata into dev_huang
This commit is contained in:
commit
59a6ee56d3
|
|
@ -12,64 +12,102 @@
|
|||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div id="game_test_set_results"></div>
|
||||
<script id="t:exec_results" type="text/html">
|
||||
</script>
|
||||
|
||||
|
||||
<div class="-flex -relative blacktab-inner">
|
||||
<div id="blacktab_con_1" class="" >
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16">
|
||||
<%= render :partial => 'game_result_order' %>
|
||||
<% @test_sets.each_with_index do |test_set, index| %>
|
||||
<div class="-task-ces-box mb10 clearfix">
|
||||
<div class="-task-ces-top" onclick="toggle_test_case('<%= test_set.is_public? %>', '<%= index %>')" style="cursor:pointer">
|
||||
<i class="fa fa-caret-down" ></i>
|
||||
<span>测试集 <%= index + 1 %></span>
|
||||
<% unless test_set.result? %>
|
||||
<i class="fa fa-exclamation-circle color-orange fr mt8 ml5" ></i>
|
||||
<% end %>
|
||||
<% unless test_set.is_public? %>
|
||||
<i class="fa fa-lock fr mt8" ></i>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if test_set.is_public? %>
|
||||
<div class="-task-ces-info" id="test_case_<%= index %>">
|
||||
<ul>
|
||||
<li><span class="-task-ces-info-left color-blue">输入:</span><span><%= test_set.input %></span></li>
|
||||
<li><span class="-task-ces-info-left color-blue">实际输出:</span><span><%= test_set.actual_output %></span></li>
|
||||
<li><span class="-task-ces-info-left color-blue">期望输出:</span><span><%= test_set.output %></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="game_test_set_results" class="-flex -relative blacktab-inner"></div>
|
||||
<script id="t:exec_results_1" type="text/html">
|
||||
<div id="blacktab_con_1" class="" >
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16">
|
||||
<%#= render :partial => 'game_result_order' %>
|
||||
<%# @test_sets.each_with_index do |test_set, index| %>
|
||||
<! for(var i = 0; i < test_sets.length; i++ ) { !>
|
||||
<div class="-task-ces-box mb10 clearfix">
|
||||
<div class="-task-ces-top" onclick="toggle_test_case('<!= test_sets[i].is_public !>', '<!= i !>')" style="cursor:pointer">
|
||||
<i class="fa fa-caret-down" ></i>
|
||||
<span>测试集 <!= i + 1 !></span>
|
||||
<%# unless test_set.result? %>
|
||||
<! if( test_sets[i].result == 0 ) { !>
|
||||
<i class="fa fa-exclamation-circle color-orange fr mt8 ml5" ></i>
|
||||
<! } !>
|
||||
<%# end %>
|
||||
<%# unless test_set.is_public? %>
|
||||
<! if(test_sets[i].is_public == 0) { !>
|
||||
<i class="fa fa-lock fr mt8" ></i>
|
||||
<! } !>
|
||||
<%# end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%# if test_set.is_public? %>
|
||||
<! if(test_sets[i].is_public == 1) { !>
|
||||
<div class="-task-ces-info" id="test_case_<!= i !>">
|
||||
<ul>
|
||||
<li><span class="-task-ces-info-left color-blue">输入:</span><span><!= test_sets[i].input !></span></li>
|
||||
<li><span class="-task-ces-info-left color-blue">实际输出:</span><span><!= test_sets[i].actual_output !></span></li>
|
||||
<li><span class="-task-ces-info-left color-blue">期望输出:</span><span><!= test_sets[i].output !></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<! } !>
|
||||
<%# end %>
|
||||
</div>
|
||||
<! } !>
|
||||
<%# end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="blacktab_con_2" class="undis " >
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16 ">
|
||||
<p class="color-light-green mb10"><i class="fa fa-check-circle font-16 " ></i><span class="ml5 mr5">11/11</span> 全部通过</p>
|
||||
<div class="-task-ces-box mb10 clearfix">
|
||||
<div class="-task-ces-info">
|
||||
<ul>
|
||||
<li><span class="-task-ces-info-left ">样例测试:</span><span class="color-light-green">9/9</span></li>
|
||||
<li><span class="-task-ces-info-left">隐藏测试:</span><span class="color-light-green">9/9</span></li>
|
||||
<li><span class="-task-ces-info-left">经验值:</span><span class="color-light-green">+ 300</span></li>
|
||||
</ul>
|
||||
<div id="blacktab_con_2" class="undis " >
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16 ">
|
||||
<p class="color-light-green mb10"><i class="fa fa-check-circle font-16 " ></i><span class="ml5 mr5">11/11</span> 全部通过</p>
|
||||
<div class="-task-ces-box mb10 clearfix">
|
||||
<div class="-task-ces-info">
|
||||
<ul>
|
||||
<li><span class="-task-ces-info-left ">样例测试:</span><span class="color-light-green">9/9</span></li>
|
||||
<li><span class="-task-ces-info-left">隐藏测试:</span><span class="color-light-green">9/9</span></li>
|
||||
<li><span class="-task-ces-info-left">经验值:</span><span class="color-light-green">+ 300</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var bt = baidu.template;
|
||||
bt.LEFT_DELIMITER = '<!';
|
||||
bt.RIGHT_DELIMITER = '!>';
|
||||
$(function(){
|
||||
var html = bt('t:exec_results_1',
|
||||
{
|
||||
test_sets: [
|
||||
{
|
||||
is_public: 0,
|
||||
result: 0,
|
||||
input: "input1",
|
||||
actual_output: "actual_output1",
|
||||
output: "output1"
|
||||
},
|
||||
{
|
||||
is_public: 1,
|
||||
result: 1,
|
||||
input: "input2",
|
||||
actual_output: "actual_output2",
|
||||
output: "output2"
|
||||
},
|
||||
{
|
||||
is_public: 0,
|
||||
result: 0,
|
||||
input: "input3",
|
||||
actual_output: "actual_output3",
|
||||
output: "output3"
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
$("#game_test_set_results").html(html);
|
||||
});
|
||||
// 公开的测试集允许展开与隐藏
|
||||
function toggle_test_case(t_case, id){
|
||||
if(t_case){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="page--over">
|
||||
<div class="col-width-3 -scroll" style="height:100%;">
|
||||
<div class="col-width-3 -scroll" style="height:100%;" id="all_task_index">
|
||||
<div class="-task-list-header clearfix">
|
||||
<h3 class="fl">全部任务</h3>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,15 @@
|
|||
$("#all_task_show").html('<%= escape_javascript(render :partial => 'games/games_list') %>');
|
||||
$("#all_task_show").toggle();
|
||||
|
||||
if(fadein == 0){
|
||||
$("#all_task_show").css("background", "rgba(0,0,0,0.3)");
|
||||
$("#all_task_index").css("left","-420px").stop().animate({
|
||||
left: 0
|
||||
}, 400);
|
||||
fadein = 1;
|
||||
}else{
|
||||
$("#all_task_show").css("background","rgba(0,0,0,0)");
|
||||
$("#all_task_index").css("left", 0).stop().animate({
|
||||
left: "-505px"
|
||||
}, 400);
|
||||
fadein = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@
|
|||
<%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js',
|
||||
'/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%>
|
||||
<div class="page--body -margin-t-64 -flex">
|
||||
<div class="page--over undis" id="all_task_show">
|
||||
<div class="page--over" id="all_task_show">
|
||||
</div>
|
||||
<div class="-layout -stretch -fit" id="game_show_content">
|
||||
<%= render :partial => 'games/game_show' %>
|
||||
</div>
|
||||
<div class="-layout -stretch -fit" id="game_show_content">
|
||||
<%= render :partial => 'games/game_show' %>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var fadein = 0; //控制检入检出效果
|
||||
// 版本库扩大与缩小
|
||||
var control = 0; // 版本库控制 0表示点击放大 1表示点击缩小
|
||||
var control_1 = 0; // 测评控制 0表示点击放大 1表示点击缩小
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
$("#all_task_show").hide();
|
||||
$("#game_show_content").html('<%= escape_javascript(render :partial => 'games/game_show') %>');
|
||||
$("#current_task_tab").attr('href','<%= myshixun_game_path(@myshixun.current_task, :myshixun_id => @myshixun) %>')
|
||||
$("#current_task_tab").attr('href','<%= myshixun_game_path(@myshixun.current_task, :myshixun_id => @myshixun) %>');
|
||||
fadein = 0; // 使左侧导航栏恢复原始状态
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<i class="fa fa-gamepad font-20"></i><br/><span class="font-12">当前任务</span>
|
||||
</a></li>
|
||||
<li class="leftnav-box">
|
||||
<a href="<%= myshixun_games_path(@myshixun) %>" class="leftnav-box-inner" id="all_task_tab" data-remote="true">
|
||||
<a href="<%= myshixun_games_path(@myshixun, :fadein => true) %>" class="leftnav-box-inner" id="all_task_tab" data-remote="true">
|
||||
<i class="fa fa-qrcode font-20"></i><br/><span class="font-12">全部任务</span><br/><span class="btn-cir ml5"><%= @myshixun.games.count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -79,11 +79,9 @@
|
|||
$("#all_task_tab").click(function(){
|
||||
if( c == 0){
|
||||
$("#all_task_tab").addClass('leftnav-active');
|
||||
$("#current_task_tab").removeClass('leftnav-active');
|
||||
c = 1;
|
||||
}else if(c == 1){
|
||||
$("#all_task_tab").removeClass('leftnav-active');
|
||||
$("#current_task_tab").addClass('leftnav-active');
|
||||
c = 0;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ a:hover.link-color-grey02{ color:red;}
|
|||
.col-width-6{ max-width: 60%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-5{ max-width: 50%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-4{ max-width: 40%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-3{ max-width: 30%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-3{ width: 500px; background: #fff; border:1px solid #e8e8e8;
|
||||
position:absolute;left:-420px;top:0;}
|
||||
.col-width-2{ max-width: 20%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-1{ max-width: 10%; background: #fff; border:1px solid #e8e8e8;}
|
||||
/*按钮*/
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
|
|||
/* 左右版TPI 20170410byLB */
|
||||
.-fit { position: absolute; top: 0; right: 0; bottom: 0; left: 0;}
|
||||
.-layout-v { display: flex; flex-direction: column;}
|
||||
.page--header { position: fixed;top: 0; left:80px; right: 0; z-index: 9000;background:#33485F; height:44px; padding:10px 0; color:#fff;}
|
||||
.page--header { position: fixed;top: 0; left:80px; right: 0; z-index: 7000;background:#33485F; height:44px; padding:10px 0; color:#fff;}
|
||||
.page--leftnav{position: fixed;top:0; left:0; right: 0; z-index: 9001;width:80px; height:100%;background:#282c37;}
|
||||
.page--body { position: relative;}
|
||||
.-margin-t-64 { margin-top: 64px;}
|
||||
|
|
@ -177,7 +177,7 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
|
|||
.-position-a-r15{ position: absolute; top:5px; right:15px;}
|
||||
.btn-cir-big{ background: #999;color: #fff;display: inline-block; padding:2px 10px; border-radius:25px; border-radius:15px; line-height:20px; height: 20px; font-size:12px;}
|
||||
.-task-ml80{ margin-left: 80px;}
|
||||
.page--over { position: fixed;top: 0; left:80px; right: 0; z-index:10000;background:rgba(0,0,0,0.3); height:100%; color:#fff;}
|
||||
.page--over { position: fixed;top: 0; left:80px; right: 0; z-index:8000; height:100%; color:#fff;}
|
||||
.-task-list-header{ border-bottom:1px solid #eee; padding:5px 15px; color:#898989; font-size: 14px; font-weight: normal;}
|
||||
.-task-list-header h3{ font-weight: normal; font-size:16px; color:#333;}
|
||||
.-task-list-inner{ background:#EFF2F7; margin:10px; padding:5px;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue