去掉老式的编程作业提交
This commit is contained in:
parent
6f64152ec7
commit
52c2719a46
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="mt5">
|
<div class="mt5">
|
||||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick=" submit_comm_homework('new_homework_common');">发送</a>
|
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submit_homework('new_homework_common');">发送</a>
|
||||||
<span class="fr mr10 mt3">或</span>
|
<span class="fr mr10 mt3">或</span>
|
||||||
<a href="javascript:void(0);" class=" fr mr10 mt3" onclick="reset_homework();">取消</a>
|
<a href="javascript:void(0);" class=" fr mr10 mt3" onclick="reset_homework();">取消</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -99,29 +99,6 @@ $(function(){
|
||||||
$('#program-src').focus(function(){
|
$('#program-src').focus(function(){
|
||||||
$(this).css('height', '100px');
|
$(this).css('height', '100px');
|
||||||
});
|
});
|
||||||
var isProgramHomework = function(){
|
|
||||||
return !$(".advanced_option").is(":hidden");
|
|
||||||
}
|
|
||||||
|
|
||||||
var submit_comm_homework = function(id){
|
|
||||||
var valid = true;
|
|
||||||
if (isProgramHomework()) {
|
|
||||||
$.each($('.advanced_option textarea.InputBox'), function(i, val){
|
|
||||||
if ($(val).val().length<=0) {
|
|
||||||
$(val).focus();
|
|
||||||
valid = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (valid) {
|
|
||||||
$('input[name=homework_type]').val(2);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (valid) {
|
|
||||||
submit_homework(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
window.submit_comm_homework = submit_comm_homework;
|
|
||||||
|
|
||||||
var datepickerOptions={dateFormat:'yy-mm-dd',firstDay:0,showWeek:true,showOtherMonths:true,selectOtherMonths:true};
|
var datepickerOptions={dateFormat:'yy-mm-dd',firstDay:0,showWeek:true,showOtherMonths:true,selectOtherMonths:true};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue