发布作业时作业类型的切换
This commit is contained in:
parent
8358140c87
commit
265359cd74
|
@ -0,0 +1,13 @@
|
||||||
|
<a href="javascript:void(0);" class="CloseBtn" title="关闭弹框"></a>
|
||||||
|
<div class="ni_con">
|
||||||
|
<p id="switch_homework_type_notice" class="fontGrey">
|
||||||
|
</p>
|
||||||
|
<div class="ni_btn">
|
||||||
|
<a href="javascript:" class="tijiao" id="switch_type" style="margin-bottom: 20px;" >
|
||||||
|
继 续
|
||||||
|
</a>
|
||||||
|
<a href="javascript:" class="tijiao" id="cancel_switch" style="margin-bottom: 20px;">
|
||||||
|
取 消
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -16,7 +16,7 @@
|
||||||
<p class="c_red">提醒:勾选后各小组必须在Trustie平台创建项目,教师可随时观察平台对各小组最新进展的实时统计。</p>
|
<p class="c_red">提醒:勾选后各小组必须在Trustie平台创建项目,教师可随时观察平台对各小组最新进展的实时统计。</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="courseSendSubmit">
|
<div class="courseSendSubmit">
|
||||||
<a href="javascript:void(0);" class="group_btn sendSourceText">确定</a>
|
<a href="javascript:void(0);" class="group_save_btn sendSourceText">确定</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="courseSendCancel">
|
<div class="courseSendCancel">
|
||||||
<a href="javascript:void(0);" class="sendSourceText linkGrey6" id="cancel_group">取消</a>
|
<a href="javascript:void(0);" class="sendSourceText linkGrey6" id="cancel_group">取消</a>
|
||||||
|
|
|
@ -72,11 +72,15 @@
|
||||||
<a href="javascript:void(0);" class="AnnexBtn fl mt3 mr15" onclick="$('#_file').click();" title="请选择文件上传">上传附件</a>
|
<a href="javascript:void(0);" class="AnnexBtn fl mt3 mr15" onclick="$('#_file').click();" title="请选择文件上传">上传附件</a>
|
||||||
<%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3 mr15",:title=>"请从资源库中选择文件作为作品的附件",:remote => true%>
|
<%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3 mr15",:title=>"请从资源库中选择文件作为作品的附件",:remote => true%>
|
||||||
<% if defined?(has_program) && has_program %>
|
<% if defined?(has_program) && has_program %>
|
||||||
<a href="javascript:void(0);" class="ProBtn fl mt3" title="请设置编程语言和输入测试集">编程</a>
|
<div id="program_setting" class="fl">
|
||||||
|
<a href="javascript:void(0);" class="ProBtn fl mt3"title="请设置编程语言和输入测试集">编程</a>
|
||||||
<span class="fl C_lgrey mt3 program_detail_info mr15"></span>
|
<span class="fl C_lgrey mt3 program_detail_info mr15"></span>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if defined?(has_group) && has_group %>
|
<% if defined?(has_group) && has_group %>
|
||||||
|
<div id="group_setting" class="fl">
|
||||||
<a href="javascript:void(0);" class="groupBtn fl mt3" title="请设置分组作业的相关参数">分组</a>
|
<a href="javascript:void(0);" class="groupBtn fl mt3" title="请设置分组作业的相关参数">分组</a>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,11 @@
|
||||||
} else {
|
} else {
|
||||||
$("#anonymous_comment").attr('checked',false);
|
$("#anonymous_comment").attr('checked',false);
|
||||||
}
|
}
|
||||||
|
<% if edit_mode && homework.is_program_homework? %>
|
||||||
$("#BluePopupBox a.BlueCirBtn").click();
|
$("#BluePopupBox a.BlueCirBtn").click();
|
||||||
|
<% end %>
|
||||||
<% if edit_mode && homework.is_group_homework? %>
|
<% if edit_mode && homework.is_group_homework? %>
|
||||||
$("#GroupPopupBox a.group_btn").click();
|
$("#GroupPopupBox a.group_save_btn").click();
|
||||||
<% end %>
|
<% end %>
|
||||||
});
|
});
|
||||||
function checked_val() {
|
function checked_val() {
|
||||||
|
@ -142,3 +144,9 @@
|
||||||
<div class="BluePopupBox" style="display:none;" id="GroupPopupBox">
|
<div class="BluePopupBox" style="display:none;" id="GroupPopupBox">
|
||||||
<%= render :partial => 'users/user_group_attr', :locals => {:edit_mode => edit_mode, :homework=>homework}%>
|
<%= render :partial => 'users/user_group_attr', :locals => {:edit_mode => edit_mode, :homework=>homework}%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% unless edit_mode %>
|
||||||
|
<div class="BluePopupBox" style="display:none;" id="NoticePopupBox">
|
||||||
|
<%= render :partial => 'users/homework_type_notice', :locals => {:edit_mode => edit_mode, :homework=>homework}%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -42,7 +42,7 @@
|
||||||
<% if activity.user == User.current || User.current.admin?%>
|
<% if activity.user == User.current || User.current.admin?%>
|
||||||
<div class="homepagePostSetting">
|
<div class="homepagePostSetting">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="<%= activity.private == 1 ? 'whiteSettingIcon' : 'homepagePostSettingIcon' %>">
|
||||||
<ul class="homepagePostSettiongText">
|
<ul class="homepagePostSettiongText">
|
||||||
<li>
|
<li>
|
||||||
<%= link_to(l(:label_bid_respond_delete),
|
<%= link_to(l(:label_bid_respond_delete),
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
@ -107,6 +107,45 @@ $(function(){
|
||||||
$(this).parent().prev().first().focus();
|
$(this).parent().prev().first().focus();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$("#NoticePopupBox").dialog({
|
||||||
|
modal: true,
|
||||||
|
autoOpen: false,
|
||||||
|
dialogClass: 'BluePopupBox',
|
||||||
|
minWidth: 500
|
||||||
|
});
|
||||||
|
$('#NoticePopupBox').parent().resizable("disable");
|
||||||
|
$('#NoticePopupBox').parent().removeClass("ui-state-disabled");
|
||||||
|
$('#NoticePopupBox').parent().css("border","3px solid #269ac9").css("padding","10px");
|
||||||
|
$('a#switch_type').live('click', function(){
|
||||||
|
if($("input[name=homework_type]").val() == "3"){
|
||||||
|
$("#NoticePopupBox" ).dialog("close");
|
||||||
|
$("input[name=homework_type]").val(1);
|
||||||
|
$('span.group_detail_info').text('');
|
||||||
|
$("#group_setting a").removeClass("fontBlue2");
|
||||||
|
$("#BluePopupBox").dialog("open");
|
||||||
|
$(".ui-dialog-titlebar").hide();
|
||||||
|
$("a.CloseBtn").on('click', function(){
|
||||||
|
$("#BluePopupBox" ).dialog("close");
|
||||||
|
});
|
||||||
|
$('#textarea_input_test').focus();
|
||||||
|
} else if($("input[name=homework_type]").val() == "2") {
|
||||||
|
$("#NoticePopupBox" ).dialog("close");
|
||||||
|
$("input[name=homework_type]").val(1);
|
||||||
|
$('span.program_detail_info').text("");
|
||||||
|
$("span.program_detail_info").removeClass("fontBlue2");
|
||||||
|
$("#program_setting a").removeClass("fontBlue2");
|
||||||
|
$("#GroupPopupBox").dialog("open");
|
||||||
|
$(".ui-dialog-titlebar").hide();
|
||||||
|
$("a.popClose").on('click', function(){
|
||||||
|
$("#GroupPopupBox" ).dialog("close");
|
||||||
|
});
|
||||||
|
$("#cancel_group").on('click', function(){
|
||||||
|
$("#GroupPopupBox" ).dialog("close");
|
||||||
|
});
|
||||||
|
$('#min_num').focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$("#BluePopupBox").dialog({
|
$("#BluePopupBox").dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
|
@ -120,12 +159,25 @@ $(function(){
|
||||||
$('#BluePopupBox').parent().css("position","fixed");
|
$('#BluePopupBox').parent().css("position","fixed");
|
||||||
|
|
||||||
$('a.ProBtn').live('click', function(){
|
$('a.ProBtn').live('click', function(){
|
||||||
|
if($("input[name=homework_type]").val() == "3"){
|
||||||
|
$("#NoticePopupBox").dialog("open");
|
||||||
|
$(".ui-dialog-titlebar").hide();
|
||||||
|
$("a.CloseBtn").on('click', function(){
|
||||||
|
$("#NoticePopupBox" ).dialog("close");
|
||||||
|
});
|
||||||
|
$("#cancel_switch").on('click', function(){
|
||||||
|
$("#NoticePopupBox" ).dialog("close");
|
||||||
|
});
|
||||||
|
$("#switch_homework_type_notice").text("您的作业类型将改为“分组作业”,并且您的编程设置将被清除。请问是否继续?");
|
||||||
|
}
|
||||||
|
else {
|
||||||
$("#BluePopupBox").dialog("open");
|
$("#BluePopupBox").dialog("open");
|
||||||
$(".ui-dialog-titlebar").hide();
|
$(".ui-dialog-titlebar").hide();
|
||||||
$("a.CloseBtn").on('click', function(){
|
$("a.CloseBtn").on('click', function(){
|
||||||
$("#BluePopupBox" ).dialog("close");
|
$("#BluePopupBox" ).dialog("close");
|
||||||
});
|
});
|
||||||
$('#textarea_input_test').focus();
|
$('#textarea_input_test').focus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var saveProgramAnswers = function() {
|
var saveProgramAnswers = function() {
|
||||||
|
@ -162,7 +214,9 @@ $(function(){
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
$("input[name=homework_type]").val(2);
|
$("input[name=homework_type]").val(2);
|
||||||
$('span.program_detail_info').text('('+language+','+test_numbers/2+'组测试)');
|
$('span.program_detail_info').text('('+language+'语言,'+test_numbers/2+'组测试)');
|
||||||
|
$("span.program_detail_info").addClass("fontBlue2");
|
||||||
|
$("#program_setting a").addClass("fontBlue2");
|
||||||
//保存js值
|
//保存js值
|
||||||
var data = {
|
var data = {
|
||||||
language_type: $('select.language_type').val(),
|
language_type: $('select.language_type').val(),
|
||||||
|
@ -213,15 +267,28 @@ $(function(){
|
||||||
$('#GroupPopupBox').parent().css("border","3px solid #269ac9").css("padding","10px");
|
$('#GroupPopupBox').parent().css("border","3px solid #269ac9").css("padding","10px");
|
||||||
|
|
||||||
$('a.groupBtn').live('click', function(){
|
$('a.groupBtn').live('click', function(){
|
||||||
|
if($("input[name=homework_type]").val() == "2"){
|
||||||
|
$("#NoticePopupBox").dialog("open");
|
||||||
|
$(".ui-dialog-titlebar").hide();
|
||||||
|
$("a.CloseBtn").on('click', function(){
|
||||||
|
$("#NoticePopupBox" ).dialog("close");
|
||||||
|
});
|
||||||
|
$("#cancel_switch").on('click', function(){
|
||||||
|
$("#NoticePopupBox" ).dialog("close");
|
||||||
|
});
|
||||||
|
$("#switch_homework_type_notice").text("您的作业类型将改为“编程作业”,并且您的分组设置将被清除。请问是否继续?");
|
||||||
|
}
|
||||||
|
else {
|
||||||
$("#GroupPopupBox").dialog("open");
|
$("#GroupPopupBox").dialog("open");
|
||||||
$(".ui-dialog-titlebar").hide();
|
$(".ui-dialog-titlebar").hide();
|
||||||
$("a.popClose").on('click', function(){
|
$("a.popClose").on('click', function () {
|
||||||
$("#GroupPopupBox" ).dialog("close");
|
$("#GroupPopupBox").dialog("close");
|
||||||
});
|
});
|
||||||
$("#cancel_group").on('click', function(){
|
$("#cancel_group").on('click', function () {
|
||||||
$("#GroupPopupBox" ).dialog("close");
|
$("#GroupPopupBox").dialog("close");
|
||||||
});
|
});
|
||||||
$('#min_num').focus();
|
$('#min_num').focus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var saveGroupAttr = function() {
|
var saveGroupAttr = function() {
|
||||||
|
@ -245,6 +312,7 @@ $(function(){
|
||||||
if (valid) {
|
if (valid) {
|
||||||
$("input[name=homework_type]").val(3);
|
$("input[name=homework_type]").val(3);
|
||||||
$('span.group_detail_info').text('分组人数:'+min+'-'+max+' 人');
|
$('span.group_detail_info').text('分组人数:'+min+'-'+max+' 人');
|
||||||
|
$("#group_setting a").addClass("fontBlue2");
|
||||||
//保存js值
|
//保存js值
|
||||||
var data = {
|
var data = {
|
||||||
base_on_project: base_on_project,
|
base_on_project: base_on_project,
|
||||||
|
@ -259,7 +327,7 @@ $(function(){
|
||||||
return valid;
|
return valid;
|
||||||
};
|
};
|
||||||
|
|
||||||
$("#GroupPopupBox a.group_btn").live('click', function(){
|
$("#GroupPopupBox a.group_save_btn").live('click', function(){
|
||||||
if(saveGroupAttr()){
|
if(saveGroupAttr()){
|
||||||
if($( "#GroupPopupBox" ).dialog( "isOpen" )){
|
if($( "#GroupPopupBox" ).dialog( "isOpen" )){
|
||||||
$("#GroupPopupBox").dialog( "close" );
|
$("#GroupPopupBox").dialog( "close" );
|
||||||
|
|
|
@ -195,6 +195,7 @@ a.c_green{ color:#28be6c;}
|
||||||
.fontBlue {color:#3498db;}
|
.fontBlue {color:#3498db;}
|
||||||
a.underline {text-decoration:underline;}
|
a.underline {text-decoration:underline;}
|
||||||
a.fontBlue {color:#297fb8;}
|
a.fontBlue {color:#297fb8;}
|
||||||
|
.fontBlue2 {color:#269ac9 !important;}
|
||||||
a.fontGrey {color:#cecece;}
|
a.fontGrey {color:#cecece;}
|
||||||
a.fontGrey2 {color:#888888;}
|
a.fontGrey2 {color:#888888;}
|
||||||
a.linkOrange {color:#ff7143;}
|
a.linkOrange {color:#ff7143;}
|
||||||
|
@ -1456,3 +1457,6 @@ a.chooseActive {background-color:#269ac9; color:#ffffff;}
|
||||||
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
|
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
|
||||||
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
||||||
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
||||||
|
|
||||||
|
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
||||||
|
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||||
|
|
|
@ -225,6 +225,7 @@ a.c_green{ color:#28be6c;}
|
||||||
.fontGrey3 {color:#484848;}
|
.fontGrey3 {color:#484848;}
|
||||||
.fontGrey4{color:#999999;}
|
.fontGrey4{color:#999999;}
|
||||||
.fontBlue {color:#3498db;}
|
.fontBlue {color:#3498db;}
|
||||||
|
.fontBlue2 {color:#269ac9 !important;}
|
||||||
a.underline {text-decoration:underline;}
|
a.underline {text-decoration:underline;}
|
||||||
a.fontBlue {color:#297fb8;}
|
a.fontBlue {color:#297fb8;}
|
||||||
a.fontGrey {color:#cecece;}
|
a.fontGrey {color:#cecece;}
|
||||||
|
@ -1040,3 +1041,6 @@ a.chooseActive {background-color:#269ac9; color:#ffffff;}
|
||||||
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
|
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
|
||||||
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
||||||
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
||||||
|
|
||||||
|
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
||||||
|
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||||
|
|
Loading…
Reference in New Issue