技能标签失去焦点保存
This commit is contained in:
parent
18b4055ef7
commit
e1f3ad3489
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
</li>
|
||||
<p class="color-red ml95" style="height: 25px;"><span id="stage_name_notice" style="display: none;"><i class="fa fa-exclamation-circle color-red mr5"></i>技能标签不能为空</span></p>
|
||||
<div class="prop-notice-info mb10 ml95">
|
||||
<div class="prop-notice-info mb10 ml40">
|
||||
<ol>
|
||||
<% if @st == 0 %>
|
||||
<li>学员未参考答案通过了本阶段的评测时将获得技能,否则不能获得技能</li>
|
||||
|
|
@ -41,6 +41,7 @@
|
|||
function add_tag(){
|
||||
var num = $(".task-bd-grey").children('div').length;
|
||||
var val = $(".task-tag-input").val().trim();
|
||||
var nSkill = $(".knowledge_frame");
|
||||
if (val != ""){
|
||||
testLength = $(".task-tag-input").val().trim().length;
|
||||
$("#add_shixun_skill").before("<div class='task-tag tag-grey mt5 mr10 fl' id='knowledge_" + num + "'>" +
|
||||
|
|
@ -51,6 +52,11 @@
|
|||
}
|
||||
$("#shixun_skill_input").val("");
|
||||
$("#add_shixun_skill").hide();
|
||||
if (nSkill.length > 0){
|
||||
$("#challenge_skill_update").submit(); //当增加或者保存技能标签以后执行保存操作
|
||||
}else{
|
||||
$("#stage_name_notice").show();
|
||||
}
|
||||
}
|
||||
|
||||
function close_tag(thisObj){
|
||||
|
|
@ -58,7 +64,7 @@
|
|||
var obj = $(thisObj).parent();
|
||||
$(obj).remove();
|
||||
}
|
||||
$(document).click(function(e){
|
||||
/* $(document).click(function(e){
|
||||
if(e.target.id==$("#edit_skill").attr("id")||e.target.id==$("#add_knowledge").attr("id")||e.target.className==$(".knowledge_frame").attr("class")||e.target.className==$(".close").attr("class")||e.target.id==$("#shixun_skill_input").attr("id")){
|
||||
return;
|
||||
}else{
|
||||
|
|
@ -68,12 +74,11 @@
|
|||
if(nSkill.length!==SnSkill) {
|
||||
$("#challenge_skill_update").submit(); //当增加或者保存技能标签以后执行保存操作
|
||||
}
|
||||
|
||||
}else{
|
||||
$("#stage_name_notice").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});*/
|
||||
// function challenge_skill_update(){
|
||||
// var nSkill = $(".knowledge_frame");
|
||||
// add_tag();
|
||||
|
|
|
|||
Loading…
Reference in New Issue