This commit is contained in:
daiao 2017-03-14 17:25:06 +08:00
parent f46178b37a
commit 8886949dc9
6 changed files with 152 additions and 59 deletions

View File

@ -1,3 +1,17 @@
<div class="task-setting-tab">
<div class="panel-form ">
<ul>
<li class="clearfix">
<label class="panel-form-label fl">测试脚本:</label>
<textarea class="panel-form-width-690 panel-form-height-150 fl"></textarea>
</li>
<li class="clearfix">
<a href="#" class="task-btn task-btn-green fr mr10">保存</a>
</li>
</ul>
</div>
</div>
<% if false%>
<div id="training_project_exec_tip">
<%= render :partial => "shixuns/settings_challenges_result_tip" %>
</div>
@ -16,7 +30,7 @@
<% end %>
</div>
</div>
<% end %>
<script>
function regex_pr_comment()
{

View File

@ -0,0 +1,26 @@
<div class="panel-form task-setting-tab">
<ul>
<li class="clearfix">
<label class="panel-form-label fl"><span class="c_red mr5">*</span>名称:</label>
<input type="text" class="panel-form-width-690 panel-form-height-30 fl" placeholder="HelloworldJava入门实训项目" value="<%= @shixun.name %>"/>
</li>
<li class="clearfix">
<label class="panel-form-label fl">预备知识:</label>
<textarea class="panel-form-width-690 panel-form-height-150 fl"><%= @shixun.description %></textarea>
</li>
<li class="clearfix">
<label class="panel-form-label fl">默认分支:</label>
<select class="panel-form-height-30 fl mt5">
<option>master</option>
</select>
</li>
<li class="clearfix">
<label class="panel-form-label fl">公开:</label>
<input type="checkbox" class="fl mt15 mr10" />
<span class="fl">(选中为公开项目,不选中为私有项目;私有项目仅自己可见。)</span>
</li>
<li class="clearfix">
<a href="#" class="task-btn task-btn-green fr mr10">保存</a>
</li>
</ul>
</div>

View File

@ -1,3 +1,43 @@
<div class="task-pd15-box task-setting-tab">
<div class="alert alert-blue mb15" id="warning_frame">
<button data-dismiss="alert" class="task-close fr" type="button" onclick="close_waring_frame();">×</button>
温馨提示:每个项目只能创建一个版本库。
</div>
<div class=" sy_new_tchbox clear" style="margin-left:0; margin-right:0;" >
<ul class="pro_newsetting_con mb15" >
<li class="mb10 clear">
<label class=" fl" style="line-height:40px;"><span class="c_red f12">*</span>&nbsp;版本库名称&nbsp;&nbsp;:&nbsp;</label>
<input type="text" class="panel-form-width-690 panel-form-height-30 fl" style="width:830px;">
</li>
<li class="clear">
<label class=" fl" style="width:100px;">&nbsp;&nbsp;</label>
<p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/>
2.仅限使用小写字母a-z、数字、破折号-和下划线_<br>
3.一旦保存,标识无法修改</p>
</li>
</ul>
<a href="#" class=" task-btn task-btn-green fr">保存</a>
<a href="#" class=" task-btn fr mr10">取消</a>
</div>
<table class="sy_new_table" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>版本库名</th>
<th>管理系统</th>
<th>库路径</th>
</tr>
</thead>
<tbody>
<tr>
<th>sasa Test</th>
<th>Gitlab</th>
<th>https://git.trustie.net/hushasha/sasatest.git</th>
</tr>
</tbody>
</table>
</div>
<% if false %>
<div class="pro_new_prompt ml15 mr15 mb10"><p>温馨提示:每个项目只能创建一个版本库</p></div>
<%= error_messages_for 'project' %>
<% if @repository.nil? %>
@ -44,7 +84,7 @@
</table>
</div>
<% end %>
<% end %>
<script>
function pro_st_show_ku()
{

View File

@ -2,12 +2,15 @@
<div class="task-header">
<div class="task-header-info">
<h2>
<h2 class="fl">
<a href="<%= user_path(@shixun.owner) %>"><%= @shixun.owner.try(:show_name) %>导师</a>
<span class="ml5 mr5">/ </span><a href="<%= shixun_path(@shixun.parent) %>"><%= @shixun.name %></a>
</h2>
<a href="javascript:void(0);" class="fr task-btn task-btn-orange">开始挑战</a>
<div class="cl"></div>
</div>
</div>
<div class="task-header-nav">
<ul class="task-header-navs clearfix">
<li><a href="<%= shixun_challenges_url(@shixun) %>" class="active">实训</a></li>

View File

@ -1,62 +1,68 @@
<div class="pro_new_setting clear mb10">
<div class="pro_new_setting_leftnav fl">
<ul>
<% show_memu = show_project_memu User.current %>
<div class="task-pm-content mb20">
<div class="task-pm-box mt20">
<div class="tab_content clearfix" >
<ul id="tab_nav">
<li id="tab_nav_1" class="tab_hover" onclick="HoverLi(1);">
<a href="javascript:void(0);" class="tab_type">实训</a>
</li>
<li id="tab_nav_2" onclick="HoverLi(2);">
<a href="javascript:void(0);" class="tab_type" >版本库</a>
</li>
<li id="tab_nav_3" onclick="HoverLi(3);">
<a href="javascript:void(0);" class="tab_type" >测试脚本</a>
</li>
</ul>
<div class="cl"></div>
<div id="tab_con_1" class="" >
<%= render :partial=>"shixuns/settings_edit" %>
</div>
<div id="tab_con_2" class="undis" >
<%= render :partial=>"shixuns/settings_repository" %>
</div>
<div id="tab_con_3" class="undis" >
<%= render :partial=>"shixuns/settings_challenges" %>
</div>
</div>
</div>
</div>
<% if false %>
<div class="pro_new_setting clear mb10">
<div class="pro_new_setting_leftnav fl">
<ul>
<% show_memu = show_project_memu User.current %>
<li><a href="javascript:void(0)" id="pro_st_tb_1" class="<%= show_memu == 'edit_project' ? 'active' : ''%>" onclick="project_setting(1);">信息</a></li>
<!--<li id="pro_st_tb_5" class="pro_st_normaltab" onclick="project_setting(5);">问题类别</li>-->
<!--<li id="pro_st_tb_5" class="pro_st_normaltab" onclick="project_setting(5);">问题类别</li>-->
<li><a href="javascript:void(0)" id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</a></li>
<li><a href="javascript:void(0)" id="pro_st_tb_7" class="<%= show_memu == 'trainig_task' ? 'active' : ''%>" onclick="project_setting(7);">实训任务</a></li>
</ul>
</div>
<div class="pro_new_setting_conbox fl ml10">
<div class="<%= show_memu == 'edit_project' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_01">
<%= render :partial=>"shixuns/settings_edit" %>
</div><!--tbc_01 end-->
<div class="<%= show_memu == 'manage_repository' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_06">
<%= render :partial=>"shixuns/settings_repository" %>
</div><!--tbc_06 end-->
<div class="<%= show_memu == 'training_task' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_07">
<%= render :partial=>"shixuns/settings_challenges" %>
</div><!--tbc_06 end-->
</div>
</div>
</ul>
</div>
<div class="pro_new_setting_conbox fl ml10">
<div class="<%= show_memu == 'edit_project' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_01">
<%= render :partial=>"shixuns/settings_edit" %>
</div><!--tbc_01 end-->
<div class="<%= show_memu == 'manage_repository' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_06">
<%= render :partial=>"shixuns/settings_repository" %>
</div><!--tbc_06 end-->
<div class="<%= show_memu == 'training_task' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_07">
<%= render :partial=>"shixuns/settings_challenges" %>
</div><!--tbc_06 end-->
</div>
</div>
<% end %>
<script type="text/javascript">
$(function(){
<%if @select_tab %>
<% if @select_tab == "modules" %>
project_setting(2);
<% elsif @select_tab == "members" %>
project_setting(3);
<% elsif @select_tab == "versions" %>
project_setting(4);
$("#pro_st_edit_ban").toggle();
<% elsif @select_tab == "repositories" %>
project_setting(6);
$("#pro_st_edit_ku").toggle();
<% else %>
project_setting(5);
<% end%>
<% end%>
$("div[nhname='pro_setting']").show();
// $(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
});
var windowH = $(window).height();
var contentH = $(".pro_new_setting_conbox").height();
if(windowH > contentH + 329) {
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 -contentH + "px");
}else{
$(".pro_new_setting_conbox").css("margin-bottom",0);
}
$(".pro_new_setting_leftnav ul li").live("click",function(){
var newContentH = $(".pro_new_setting_conbox").height();
if(windowH > newContentH + 329) {
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 - newContentH + "px");
}else{
$(".pro_new_setting_conbox").css("margin-bottom",0);
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';
}
function close_waring_frame(){
$("#warning_frame").hide();
}
</script>

View File

@ -49,17 +49,21 @@ a.link-color-green{color:#29bd8b;}
.col-width-2{ max-width: 20%; background: #fff; border:1px solid #e8e8e8;}
.col-width-1{ max-width: 10%; background: #fff; border:1px solid #e8e8e8;}
/*按钮*/
a.task-btn{display: inline-block;border:none; padding:0 35px;color: #666;background: #e1e1e1; text-align:center;font-size: 12px; height: 35px;line-height: 35px; border-radius:3px;}
a.task-btn{display: inline-block;border:none; padding:0 35px;color: #666;background: #e1e1e1; text-align:center;font-size: 14px; height: 35px;line-height: 35px; border-radius:3px;}
a:hover.task-btn {background: #c3c3c3; }
a.task-btn-green{background: #29bd8b; color: #fff;}
a:hover.task-btn-green{background: #19b17e;}
a.task-btn-orange{ background:#fc8675; color:#fff;}
a:hover.task-btn-orange{ background:#e27869;}
a.task-btn-blue{ background:#6a8abe; color:#fff;}
a:hover.task-btn-blue{ background:#5f7cab;}
/*提示条*/
.alert{ padding:10px;border: 1px solid transparent; text-align: center;}
.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;}
.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;}
.alert-green{ background-color: #dff0d8;border-color: #d6e9c6; color:#3c763d;}
.close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;}
.close:hover{opacity: 0.5;}
.task-close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;}
.task-close:hover{opacity: 0.5;}
/*tag*/
.task-tag{ padding:0 10px; text-align: center; display:inline-block; height:30px; line-height: 30px;}
.tag-blue{ background-color: #d9edf7; color: #3a87ad;}