复制学期多次点击“完成”会复制多个学期

This commit is contained in:
cxt 2016-02-26 17:44:46 +08:00
parent 6d1667b4ae
commit 7d66c06a56
1 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,11 @@
<script type="text/javascript">
function submit_copy_course() {
if(regex_course_name()&&regex_course_class_period()&&regex_time_term()&&regex_course_password())
{
$("#new_course").submit();
document.getElementById("submit_copy_course").onclick = "";
}
}
$(document).ready(function(){
$("#time").change(function(){
document.getElementById("end_time").options[document.getElementById("time").selectedIndex].selected = true;
@ -147,7 +154,7 @@
<% end %>
</ul>
<div>
<a href="javascript:void(0);" class="greyBtn fr mr40 f12" onclick="submit_new_course();">完成</a>
<a href="javascript:void(0);" class="greyBtn fr mr40 f12" id="submit_copy_course" onclick="submit_copy_course();">完成</a>
<a href="javascript:void(0);" class="greyBtn fr mr10 f12" onclick="hideResource();">取消</a>
</div>
<div class="cl"></div>
<div class="cl"></div>