作品打分连续点击不会多次提交
This commit is contained in:
parent
9bc8ccbb9e
commit
fdefbf3795
|
@ -25,6 +25,7 @@
|
|||
</li>
|
||||
<% end%>
|
||||
<script type="text/javascript">
|
||||
var first_click_score = true;
|
||||
function score_submit(id){
|
||||
<% if !@is_teacher %>
|
||||
if ($.trim($('#score_comment_'+id).val()) == "") {
|
||||
|
@ -36,7 +37,8 @@
|
|||
$('#score_notice_span_'+id).show();
|
||||
$("#score_"+id).focus();
|
||||
}
|
||||
else {
|
||||
else if(first_click_score) {
|
||||
first_click_score = false;
|
||||
$("#work_submit_"+id).parent().parent().submit();
|
||||
$('#about_hwork_'+id).html('');
|
||||
}
|
||||
|
@ -52,13 +54,17 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
else if(first_click_score) {
|
||||
first_click_score = false;
|
||||
$("#work_submit_" + id).parent().parent().submit();
|
||||
}
|
||||
<% end %>
|
||||
}
|
||||
function submit_teacher_score(id){
|
||||
$("#work_submit_"+id).parent().parent().submit();
|
||||
hideModal();
|
||||
if (first_click_score) {
|
||||
first_click_score = false;
|
||||
$("#work_submit_"+id).parent().parent().submit();
|
||||
hideModal();
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue