导入作业
This commit is contained in:
parent
43ac6b7e1f
commit
0a0d67642a
|
@ -16,6 +16,7 @@
|
||||||
$("#GroupPopupBox a.group_save_btn").click();
|
$("#GroupPopupBox a.group_save_btn").click();
|
||||||
<% end %>
|
<% end %>
|
||||||
});
|
});
|
||||||
|
var homework_description_editor;
|
||||||
function checked_val() {
|
function checked_val() {
|
||||||
if ($("#anonymous_comment").is(":checked")) {
|
if ($("#anonymous_comment").is(":checked")) {
|
||||||
$("#anonymous_comment").val(1);
|
$("#anonymous_comment").val(1);
|
||||||
|
@ -124,6 +125,7 @@
|
||||||
params.submit_btn = $("#new_message_submit_btn");
|
params.submit_btn = $("#new_message_submit_btn");
|
||||||
if(params.textarea.data('init') == undefined) {
|
if(params.textarea.data('init') == undefined) {
|
||||||
params.editor = init_homework_editor(params);
|
params.editor = init_homework_editor(params);
|
||||||
|
homework_description_editor = params.editor;
|
||||||
init_homework_form(params);
|
init_homework_form(params);
|
||||||
params.submit_btn.click(function () {
|
params.submit_btn.click(function () {
|
||||||
params.form.submit();
|
params.form.submit();
|
||||||
|
|
|
@ -8,11 +8,13 @@ $("#homework_end_time").val("<%= @homework.end_time%>");
|
||||||
$("#ref_homework_id").val("<%= @ref_homework.id%>");
|
$("#ref_homework_id").val("<%= @ref_homework.id%>");
|
||||||
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework,:has_program => true,:has_group => true,:show_member=>true})%>");
|
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework,:has_program => true,:has_group => true,:show_member=>true})%>");
|
||||||
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
|
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
|
||||||
<% if @homework_detail_group %>
|
|
||||||
$('span.group_detail_info').text('分组人数:<%=@homework_detail_group.min_num %>-<%=@homework_detail_group.max_num %> 人');
|
|
||||||
<% end %>
|
|
||||||
$("#BluePopupBox").html("<%=escape_javascript( render :partial => 'users/user_programing_attr', :locals => {:edit_mode => true, :homework => @homework})%>");
|
|
||||||
$("#GroupPopupBox").html("<%=escape_javascript( render :partial => 'users/user_group_attr', :locals => {:edit_mode => true, :homework => @homework})%>");
|
|
||||||
//$("input[name='homework_type']").val("<%#= @homework.homework_type%>");
|
//$("input[name='homework_type']").val("<%#= @homework.homework_type%>");
|
||||||
|
<% if @homework_detail_programing %>
|
||||||
|
$("#BluePopupBox").html("<%=escape_javascript( render :partial => 'users/user_programing_attr', :locals => {:edit_mode => true, :homework => @homework})%>");
|
||||||
|
$("#BluePopupBox a.BlueCirBtn").click();
|
||||||
|
<% elsif @homework_detail_group %>
|
||||||
|
$('span.group_detail_info').text('分组人数:<%=@homework_detail_group.min_num %>-<%=@homework_detail_group.max_num %> 人');
|
||||||
|
$("#GroupPopupBox").html("<%=escape_javascript( render :partial => 'users/user_group_attr', :locals => {:edit_mode => true, :homework => @homework})%>");
|
||||||
|
$("#GroupPopupBox a.group_save_btn").click();
|
||||||
|
<% end %>
|
||||||
$("#homework_editor").show();
|
$("#homework_editor").show();
|
||||||
$("#BluePopupBox a.BlueCirBtn").click();
|
|
||||||
|
|
Loading…
Reference in New Issue