socialforge/app/views/games/show.html.erb

47 lines
1.9 KiB
Plaintext
Raw Normal View History

2017-03-24 22:26:26 +08:00
<%= javascript_include_tag 'baiduTemplate', 'jquery.datetimepicker.js' %>
<%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %>
<%= stylesheet_link_tag "/assets/codemirror/codemirror" %>
2017-03-29 15:40:54 +08:00
<div id="content_list" class="CELL _FLEX ROWS">
<%= render :partial => "game_show" %>
</div>
2017-03-30 16:35:37 +08:00
<%= render :partial => 'desc_full_show'%>
<div class="col-width content-all-fix undis" style="border: none" id="myshixun_extend_repository">
<%= render :partial => 'myshixun_extend_repository' %>
</div>
<%= render :partial => 'extend_test_output' %>
2017-03-29 15:40:54 +08:00
2017-03-21 10:28:56 +08:00
<script type="text/javascript" language="javascript">
2017-03-29 14:34:14 +08:00
// contents_h 是中间左侧内容页的高度,不同浏览器的得到高度不一致
// contents_top_h 是内容页头部的高度
// contents_tab_nav是三个tab的高度
// residue_h contents剩余展示内容的高度
// 左侧内容
var contents_h = $("#tpi_contents_info").height();
var contents_top_h = $("#contents_top").height() + 20;
var contents_tab_nav = $("#tab_nav").height();
var residue_h = contents_h - contents_top_h - contents_tab_nav-15;
2017-03-21 10:28:56 +08:00
$(document).ready(function(){
2017-03-29 14:34:14 +08:00
$(".tab-info-inner").css("height", residue_h+"px");
2017-03-21 10:28:56 +08:00
});
//课程大纲tab
function g(o){return document.getElementById(o);}
function HoverLi(n){
for(var i=1;i<=3;i++){
g('tab_nav_'+i).className='tab_nomal';
g('tab_con_'+i).className='undis';
}
g('tab_con_'+n).className='dis';
g('tab_nav_'+n).className='tab_hover';
2017-03-27 10:59:01 +08:00
if(n == 3){
2017-03-29 14:34:14 +08:00
// 点击参考答案时让codemirror展示,如果不refresh的话第一次展示会隐藏
2017-03-27 10:59:01 +08:00
myCodeMirror.refresh();
}
2017-03-21 10:28:56 +08:00
}
$("#close_myshixun_tip").click(function(){
$("#myshixun_tip").hide();
});
2017-03-30 16:35:37 +08:00
function close_big_repository(){
$("#myshixun_extend_repository").hide()
2017-03-21 10:28:56 +08:00
}
</script>