实训新建阶段时,点击保存报错的话,应该快速定位显示第一个报错的输入框
This commit is contained in:
parent
0823166434
commit
9211a7fa45
|
|
@ -372,10 +372,13 @@
|
|||
function challenge_create(){
|
||||
test_set_whether_lock();
|
||||
if($('#challenge_subject').val().trim() == ""){
|
||||
$("#challenge_subject").focus();
|
||||
$("#new_shixun_name").show();
|
||||
}else if($("#challenge_task_pass textarea").val().trim() == ""){
|
||||
$("#challenge_task_pass textarea").focus();
|
||||
$("#new_shixun_pass").show();
|
||||
}else if($("#challenge_score").val().trim()==""){
|
||||
$("#challenge_score").focus();
|
||||
$("#new_shixun_score").show();
|
||||
}else{
|
||||
$('#challenge_shixun_create').submit();
|
||||
|
|
@ -385,10 +388,13 @@
|
|||
function challenge_update(){
|
||||
test_set_whether_lock();
|
||||
if($('#challenge_subject').val().trim() == ""){
|
||||
$("#challenge_subject").focus();
|
||||
$("#new_shixun_name").show();
|
||||
}else if($("#challenge_task_pass textarea").val().trim() == ""){
|
||||
$("#challenge_task_pass textarea").focus();
|
||||
$("#new_shixun_pass").show();
|
||||
}else if($("#challenge_score").val().trim()==""){
|
||||
$("#challenge_score").focus();
|
||||
$("#new_shixun_score").show();
|
||||
}else{
|
||||
$('#edit_challenge_<%= @challenge.id %>').submit();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
clearInterval(cm);
|
||||
clearInterval(cm); // tpi关闭耗时
|
||||
$("#game_show_content").html('<%= escape_javascript(render :partial => 'games/game_show') %>');
|
||||
$("#myshixun_top").html('<%= escape_javascript(render :partial => 'myshixuns/myshixun_top') %>');
|
||||
$("#current_task_tab").attr('href','<%= myshixun_game_path(@myshixun.current_task, :myshixun_id => @myshixun) %>');
|
||||
|
|
|
|||
Loading…
Reference in New Issue