2016-12-24 16:29:10 +08:00
|
|
|
<div class="sy_class_r fr mb10 ml10">
|
2016-12-22 15:17:02 +08:00
|
|
|
<h3 class="game-setting-h3 "><span class="ml15"></span>竞赛配置</h3>
|
|
|
|
<div class="game-setting-tab">
|
|
|
|
<ul id="game-setting-tab-nav">
|
|
|
|
<li id="game-setting-tab-nav-1" class="game-setting-nav-hover" onclick="HoverLi(1);">
|
2017-01-04 14:01:46 +08:00
|
|
|
<a href="javascript:void(0);">基本信息</a>
|
2016-12-22 15:17:02 +08:00
|
|
|
</li>
|
|
|
|
<li id="game-setting-tab-nav-2" onclick="HoverLi(2);">
|
2017-01-04 14:01:46 +08:00
|
|
|
<a href="javascript:void(0);">成员</a>
|
2016-12-22 15:17:02 +08:00
|
|
|
</li>
|
2017-01-04 14:01:46 +08:00
|
|
|
<li id="game-setting-tab-nav-3" onclick="HoverLi(3);">
|
|
|
|
<a href="javascript:void(0);">讨论区设置</a>
|
2016-12-22 15:17:02 +08:00
|
|
|
</li>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</ul>
|
|
|
|
<div id="game-setting-content-1">
|
2016-12-22 16:03:58 +08:00
|
|
|
<%= render :partial => "contests/edit" %>
|
2016-12-22 15:17:02 +08:00
|
|
|
</div><!--issues_list_content_1 end-->
|
|
|
|
|
|
|
|
<div id="game-setting-content-2" class="undis">
|
2016-12-22 16:03:58 +08:00
|
|
|
<%= render :partial => "contests/members" %>
|
2016-12-22 15:17:02 +08:00
|
|
|
</div><!--issues_list_content_2 end-->
|
|
|
|
<div id="game-setting-content-3" class="undis">
|
2016-12-22 16:03:58 +08:00
|
|
|
<%= render :partial => "contests/boards" %>
|
2016-12-22 15:17:02 +08:00
|
|
|
</div><!--issues_list_content_3 end-->
|
|
|
|
</div><!--issues_con_list end-->
|
|
|
|
|
|
|
|
|
|
|
|
</div><!--sy_class_r end-->
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2017-01-03 17:05:27 +08:00
|
|
|
$(function(){
|
|
|
|
<% if @select_tab == 'member'%>
|
|
|
|
$("#game-setting-tab-nav-2").click();
|
2017-01-04 14:01:46 +08:00
|
|
|
<% elsif @select_tab == 'boards'%>
|
|
|
|
$("#game-setting-tab-nav-3").click();
|
2017-01-03 17:05:27 +08:00
|
|
|
<% end %>
|
|
|
|
});
|
2016-12-22 15:17:02 +08:00
|
|
|
function g(o){
|
|
|
|
return document.getElementById(o);
|
|
|
|
}
|
|
|
|
function HoverLi(n){
|
|
|
|
//如果有N个标签,就将i<=N;
|
|
|
|
for(var i=1;i<=3;i++){
|
|
|
|
g('game-setting-tab-nav-'+i).className='game-setting-nav-nomall';
|
|
|
|
g('game-setting-content-'+i).className='undis';
|
|
|
|
}
|
2017-01-04 14:01:46 +08:00
|
|
|
g('game-setting-content-'+n).className='game-dis';
|
2016-12-22 15:17:02 +08:00
|
|
|
g('game-setting-tab-nav-'+n).className='game-setting-nav-hover';
|
|
|
|
}
|
|
|
|
|
2016-12-23 14:41:21 +08:00
|
|
|
// $(document).ready(function() {
|
|
|
|
// // Store variables
|
|
|
|
// var accordion_head = $('.accordion > li > a'),
|
|
|
|
// accordion_body = $('.accordion li > .sub-menu');
|
|
|
|
//
|
|
|
|
// // Click function
|
|
|
|
// accordion_head.on('click', function(event) {
|
|
|
|
// // Disable header links
|
|
|
|
// event.preventDefault();
|
|
|
|
// // Show and hide the tabs on click
|
|
|
|
// if ($(this).attr('class') != 'active'){
|
|
|
|
// accordion_body.slideUp('normal');
|
|
|
|
// $(this).next().stop(true,true).slideToggle('normal');
|
|
|
|
// accordion_head.removeClass('active');
|
|
|
|
// $(this).addClass('active');
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// });
|
2016-12-22 15:17:02 +08:00
|
|
|
</script>
|