实训新建任务添加标签
This commit is contained in:
parent
d7fb60c801
commit
152da0ea37
|
@ -67,14 +67,10 @@
|
|||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"> 知识/技能点:</label>
|
||||
<div class="fl task-bd-grey">
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button">×</button>
|
||||
使用交互模式的 Python3 解释器
|
||||
</div>
|
||||
<button class="close fl mt3 mr10" type="button" onclick="$('#add_shixun_skill').slideToggle();">+</button>
|
||||
<button class="close fl mt3 mr10" type="button" onclick="$('#add_shixun_skill').slideToggle();" id="add_knowledge">+</button>
|
||||
<div class="task-tag tag-grey mb10 mr10 fl undis" id="add_shixun_skill">
|
||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button" onclick="$('#add_shixun_skill').slideToggle();">×</button>
|
||||
<input type="text" class="task-tag-input" placeholder="请输入知识/技能点" />
|
||||
<input type="text" class="task-tag-input" onblur="add_tag();" placeholder="请输入知识/技能点" />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -96,6 +92,25 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function add_tag(){
|
||||
var num = $(".task-bd-grey").children('div').length;
|
||||
var val = $(".task-tag-input").val().trim();
|
||||
if (val != ""){
|
||||
testLength = $(".task-tag-input").val().trim().length;
|
||||
$("#add_knowledge").before("<div class='task-tag tag-grey mb10 mr10 fl' id='knowledge_" + num + "'>" +
|
||||
"<button data-dismiss='alert' class='close fr mt3 ml5' type='button' onclick='close_tag(this)'>×</button>" +
|
||||
"<input style='width:"+ testLength*12 +"px' class='knowledge_frame' name='knowledge[input]' value='" + val +"'>" +
|
||||
" </div>");
|
||||
$(".task-tag-input").attr("value","");
|
||||
}
|
||||
}
|
||||
|
||||
function close_tag(thisObj){
|
||||
// 获取父节点的id
|
||||
var obj = thisObj.parentNode.id;
|
||||
$("#"+obj).remove();
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var bt = baidu.template;
|
||||
bt.LEFT_DELIMITER = '<!';
|
||||
|
|
|
@ -18,10 +18,12 @@
|
|||
<a href="<%= @zip_path %>" class="btn_zipdown fl ml10" onclick="">ZIP下载</a>
|
||||
<% end %>
|
||||
|
||||
<div class="fr ">
|
||||
<div class="fr">
|
||||
<label class="pro-fenzhi-label fl">克隆网址</label>
|
||||
<input type="text" id="copy_rep_content" class="pro-fenzhi-input fl" value="<%= @repos_url.to_s.lstrip %>"/>
|
||||
<a href="javascript:void(0);" alt="点击复制版本库地址" onclick="jsCopy()" title="点击复制版本库地址" class="fl pro-fenzhi-a"><i class="icon-copy"></i></a>
|
||||
<a href="javascript:void(0);" alt="点击复制版本库地址" onclick="jsCopy()" title="点击复制版本库地址" class="fl pro-fenzhi-a">
|
||||
<i class="icon-copy"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -156,4 +156,5 @@ input.task-tag-input{ border:none; background: none; height:30px; padding:0 5px;
|
|||
textarea.task-textarea-pd{ padding-bottom: 0px; padding-top:0px;}
|
||||
.task-setting-tab{ height:600px;}
|
||||
.task-pd15-box{ padding:15px;}
|
||||
.mb20{margin-bottom: 20px;}
|
||||
.mb20{margin-bottom: 20px;}
|
||||
input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f7;}
|
Loading…
Reference in New Issue