1.修改新建、修改作业提交、取消按钮样式

2.修改作业时关联项目会自动清空
This commit is contained in:
sw 2014-11-25 16:51:22 +08:00
parent eb3ac06b40
commit 1fee210924
4 changed files with 6 additions and 15 deletions

View File

@ -331,18 +331,9 @@ class HomeworkAttachController < ApplicationController
if User.current.admin? || User.current.member_of_course?(course)
name = params[:homework_name]
description = params[:homework_description]
if params[:homework_attach]
if params[:homework_attach][:project_id]
project_id = params[:homework_attach][:project_id]
else
project_id = 0
end
else
project_id = 0
end
@homework.name = name
@homework.description = description
@homework.project_id = project_id
@homework.project_id = params[:project_id] || 0
if params[:attachments]
@homework.save_attachments(params[:attachments])
end

View File

@ -41,13 +41,13 @@
<div class="Newwork">
<div id="tb_" class="tb_">
<ul>
<li id="tb_1" class="hovertab" onclick="switchTab(1);this.blur();return false;" style="width: auto; padding:5px 10px 0;">
<li id="tb_1" class="hovertab" onclick="switchTab(1);this.blur();return false;" style="width: auto; padding:10px 10px 0;">
修改作业
</li>
<li id="tb_2" class="normaltab" onclick="switchTab(2);this.blur();return false;">
成员
</li>
<li class="N_top" style="width: 747px;">
<li class="N_top" style="width: 747px;line-height: 1.9;">
<%= link_to(l(:label_project_new), {:controller => 'projects',
:action => 'new',
:course => 0,

View File

@ -41,10 +41,10 @@
<div class="Newwork">
<div id="tb_" class="tb_">
<ul>
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);" style="width: auto; padding:5px 10px 0;">
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);" style="width: auto; padding:10px 10px 0;">
创建作品
</li>
<li class="N_top" style="width: 835px;">
<li class="N_top" style="width: 835px;line-height: 1.9;">
<%= link_to(l(:label_project_new), {:controller => 'projects',
:action => 'new',
:course => 0,

View File

@ -130,7 +130,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.w350{ width:350px;}
.w620{ width:580px; height:160px; border:1px solid #CCC !important; padding-left: 3px !important;}
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;}
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;line-height: 1.9;}
a:hover.tijiao{ background:#0f99a9 !important;}
.members_left{ float:left; width:570px; margin-right:20px;}
.members_left{}