实训新建页面
This commit is contained in:
parent
d0a7befebf
commit
ce2482a38e
|
@ -85,12 +85,13 @@
|
|||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>分值设定:</label>
|
||||
<%= f.text_field :score, :class => "panel-form-height-30 fl", :no_label => true, :style => "padding:5px;" %>
|
||||
<!--<input type="text" class=" panel-form-height-30 fl " placeholder="25" style="padding:5px;" />-->
|
||||
<span class="fl ml5">分</span>
|
||||
<div class="clear"></div>
|
||||
<span style="display: none" class="c_red ml90" id="new_shixun_score">分值设定不能为空</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a class=" task-btn task-btn-green fr mr10" onclick="challenge_create()">保存</a>
|
||||
<a href="#" class=" task-btn fr mr10">取消</a>
|
||||
<a href="javascript:void(0)" class="task-btn task-btn-green fr mr10" onclick="challenge_create()">保存</a>
|
||||
<a href="javascript:void(0)" class=" task-btn fr mr10">取消</a>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
|
@ -158,7 +159,12 @@
|
|||
var text4 = document.getElementById("textarea_output_test");
|
||||
autoTextarea2(text3, text4, 0, 140);
|
||||
autoTextarea2(text4, text3, 0, 140);
|
||||
|
||||
$("#challenge_score").keyup(function(){
|
||||
(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)
|
||||
});
|
||||
$("#challenge_score").keyup(function(){
|
||||
this.v();
|
||||
});
|
||||
$("#challenge_subject").keydown(function(){
|
||||
$("#new_shixun_name").hide();
|
||||
});
|
||||
|
@ -170,6 +176,8 @@
|
|||
$("#new_shixun_name").show();
|
||||
}else if($("#challenge_task_pass").val().trim() == ""){
|
||||
$("#new_shixun_pass").show();
|
||||
}else if($("#challenge_score").val().trim()==""){
|
||||
$("#new_shixun_score").show();
|
||||
}else{
|
||||
$('#new_challenge').submit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue