This commit is contained in:
guange 2015-08-29 18:21:01 +08:00
parent 18bfe1fc73
commit 85ee2b86cd
8 changed files with 46 additions and 43 deletions

View File

@ -1,42 +1,16 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<% content_for :header_tags do %>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<%= javascript_include_tag 'homework','baiduTemplate' %>
<% end %>
<%= error_messages_for 'homework_common' %>
<div class="project_r_h">
<h2 class="project_h2">
<%= l(:label_course_homework_new)%>
</h2>
</div>
<div class="hwork_new">
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
<%= hidden_field_tag "course",@course.id%>
<%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
<%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
<%= render :partial => 'homework_common/new_homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
<% end%>
</div><!--hwork_new end-->
<div class="hwork_new" id="hwork_new">
<%= form_for("new_homework_common",:url => next_step_homework_common_index_path) do |f|%>
<input type="hidden" name="course" value="<%= @course.id%>">
<h3 class="c_blue f16 mb10">
请选择将要发布的作业类型
</h3>
<input type="radio" class="mb10 fl" name="homework_common_type" value="1" id="homework_detail_manual_radio" checked/>
<span class="ml5 fl">
人工评分的作业(支持匿名互评、灵活设置评分比例)
</span>
<div class="cl"></div>
<input type="radio" class="mb20 fl" name="homework_common_type" value="2" id="homework_detail_programing_radio"/>
<span class="ml5 fl">
自动评测的编程作业支持C/C++程序的自动评分)
</span>
<div class="cl"></div>
<a href="javascript:void(0);" class=" orange_btn" onclick="$(this).parent().submit();">
下一步
</a>
<% end%>
</div><!--hwork_new end-->
<div class="cl"></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -99,13 +99,13 @@ function initFilters(){
$('#filters-table td.field input[type=checkbox]').each(function(){
toggleFilter($(this).val());
});
$('#filters-table td.field input[type=checkbox]').live('click',function(){
$('#filters-table td.field input[type=checkbox]').on('click',function(){
toggleFilter($(this).val());
});
$('#filters-table .toggle-multiselect').live('click',function(){
$('#filters-table .toggle-multiselect').on('click',function(){
toggleMultiSelect($(this).siblings('select'));
});
$('#filters-table input[type=text]').live('keypress', function(e){
$('#filters-table input[type=text]').on('keypress', function(e){
if (e.keyCode == 13) submit_query_form("query_form");
});
}

View File

@ -1,5 +1,6 @@
$(function(){
//提交作业
var bt=baidu.template;
bt.LEFT_DELIMITER='<!';
bt.RIGHT_DELIMITER='!>';
@ -39,8 +40,10 @@ $(function(){
if (cb) {cb(); return;}
var html=bt('t:result-list',data);
$('.ProResult').prepend(html);
if (data.status==0) {
var r=confirm("答题正确,是否立刻提交?");
if (r) {
@ -78,5 +81,31 @@ $(function(){
$('form.edit_student_work').on('keydown', '#program-src', function(){
tested = false;
});
//发布作业
var datepickerOptions={dateFormat:'yy-mm-dd',firstDay:0,showWeek:true,showOtherMonths:true,selectOtherMonths:true};
$('input.date-input').datepicker(datepickerOptions);
$('a.pic_date').on('click', function(){
$(this).parent().prev().first().focus();
})
$('a.DropBtn').on('click', function(){
$(".advanced_option").toggle('slow');
});
$(".HomeWork").on('click', 'a.icon_add', function(){
var html = bt('t:test-answer-list', null);
$(this).parent('.mt10').after(html);
});
$(".HomeWork").on('click', 'a.icon_remove', function(){
$(this).parent('.mt10').remove();
});
});

View File

@ -131,13 +131,13 @@
});
//鼠标经过列表项事件
//鼠标经过
$(".mailHover").live("mouseover", function(){
$(".mailHover").on("mouseover", function(){
index = Number($(this).attr("id").split("_")[1]);
liveValue = $("#mailList_"+index).text();
x.children("." + cf).removeClass(cf).addClass(cl);
$(this).addClass(cf).removeClass(cl);
});
$(".mailHover").live("click", function(){
$(".mailHover").on("click", function(){
$("#mail").val($(this).html());
});

File diff suppressed because one or more lines are too long

View File

@ -453,7 +453,7 @@ $(function(){
cookiesave(personalized_expand_key,JSON.stringify(personalized_map));
target.toggle(timeout);
}
$("*[nhtype='toggle4cookie']").live('click',function(){
$("*[nhtype='toggle4cookie']").on('click',function(){
personalized_click($(this),500);
});

View File

@ -70,7 +70,7 @@ $(function(){
}
KindEditor.ready(function(K){
$("a[nhname='reply_btn']").live('click',function(){
$("a[nhname='reply_btn']").on('click',function(){
var params = {};
params.kindutil = K;
params.container = $(this).parent().parent('div');
@ -104,7 +104,7 @@ $(function(){
},300);
});
$("a[nhname='sub_reply_btn']").live('click',function(){
$("a[nhname='sub_reply_btn']").on('click',function(){
var params = {};
params.kindutil = K;
params.container = $(this).parent().parent('div');