班级作业:当已经发布了作业再去编辑作业时,现在是“发布时间”就不能再编辑了,建议代码判断只有当学生已经提交了作品或关联了项目才禁止再编辑发布时间,且要给出必要提示

This commit is contained in:
cxt 2016-09-08 10:54:41 +08:00
parent 49e8a6f1ff
commit 3efc158fb5
2 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@
$('#ajax-modal').html($("#nh_tx_dialog_html").html());
showModal('ajax-modal','460px');
$('#ajax-modal').siblings().hide();
$('#ajax-modal').parent().removeClass("alert_praise");
//$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().removeClass("alert_praise").removeClass("copyCoursePopup");
$('#ajax-modal').parent().css("top","30%").css("left","40%");
$('#ajax-modal').parent().addClass("alert_box");
$('#ajax-modal').parent().css("border", "3px solid #269ac9").css("border-radius", "0").css(" -webkit-border-radius", "0").css(" -moz-border-radius", "0");

View File

@ -177,8 +177,9 @@
<label class="fl c_grey f14" style="margin-top: 4px;">发布日期(可选)</label>
<%# end %>
<div class="calendar_div fl">
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.publish_time%>" >
<% if homework.homework_detail_manual.comment_status.to_i == 0 %>
<% allow_edit = homework.student_works.has_committed.count == 0 && homework.student_work_projects.count ==0 %>
<input title="<%=allow_edit ? '' : '已有学生提交作品或关联项目,发布日期不可再编辑' %>" type="text" name="homework_common[publish_time]" id="homework_publish_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.publish_time%>" >
<% if allow_edit %>
<%= calendar_for('homework_publish_time')%>
<% end %>
</div>