9e7323539f923b5387b9ec9239b5aeb, reversing
changes made to da9c374ed9.

Conflicts:
	app/views/users/_user_homework_form.html.erb
This commit is contained in:
sw 2015-09-01 17:24:17 +08:00
commit dd3fe5915e
16 changed files with 939 additions and 934 deletions

View File

@ -546,7 +546,7 @@ module UsersHelper
type = [] type = []
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course| user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
option = [] option = []
option << course.name option << course.name+""+course.time.to_s+course.term+""
option << course.id option << course.id
type << option type << option
end end

View File

@ -101,9 +101,9 @@
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a> <a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
<% if is_current_user%> <% if is_current_user%>
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%> <% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
<%=link_to "", new_course_path, :class => "homepageMenuSetting fr"%> <%=link_to "", new_course_path, :class => "homepageMenuSetting fr", :title => "新建课程"%>
<% else%> <% else%>
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:remote => true%> <%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:remote => true, :title => "加入课程"%>
<% end%> <% end%>
<% end%> <% end%>
</div> </div>
@ -117,7 +117,7 @@
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuForge').slideToggle();">项目</a> <a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuForge').slideToggle();">项目</a>
<% if is_current_user%> <% if is_current_user%>
<%=link_to "", new_project_path, :class => "homepageMenuSetting fr"%> <%=link_to "", new_project_path, :class => "homepageMenuSetting fr", :title => "新建项目"%>
<% end%> <% end%>
</div> </div>
<div class="homepageLeftMenuCourses" id="homepageLeftMenuForge"> <div class="homepageLeftMenuCourses" id="homepageLeftMenuForge">

View File

@ -34,7 +34,7 @@
<li class="fl"> <li class="fl">
<input name="projects_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/> <input name="projects_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li> </li>
<li class="sendCourseName fl"><%= truncate( project.name,:length=>18)%></li> <li class="sendCourseName fl"><%= project.name%></li>
</ul> </ul>
<% end %> <% end %>
</div> </div>

View File

@ -34,7 +34,7 @@
<li class="fl"> <li class="fl">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/> <input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li> </li>
<li class="sendCourseName fl"><%= truncate(course.name,:length=>18)%></li> <li class="sendCourseName fl"><%= course.name%></li>
</ul> </ul>
<% end %> <% end %>
</div> </div>

View File

@ -74,7 +74,11 @@
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<script type="text/javascript">
$(function (){
$("#course_id").append("<option value='-1' id='option_select' hidden selected>请选择发布作业的课程</option>");
});
</script>
<script id="t:test-answer-list" type="text/html"> <script id="t:test-answer-list" type="text/html">
<div class="mt10"> <div class="mt10">

View File

@ -1,10 +1,11 @@
<script type="text/javascript"> <script type="text/javascript">
function reset_homework(){ function reset_homework(){
$("#homework_name").val(""); $("#homework_name").val("");
$("#homework_end_time").val("<%= (Time.now + 3600 * 24).strftime('%Y-%m-%d')%>"); $("#homework_end_time").val("");
$("#course_id").val(""); $("#course_id").val($("#option_select").val());
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new })%>"); $("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new })%>");
homework_description_editor.html(""); homework_description_editor.html("");
$("#homework_editor").toggle();
} }
function checkAllBox(doc){ function checkAllBox(doc){

View File

@ -675,7 +675,7 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
/*底部*/ /*底部*/
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
.footerAbout{ width:455px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px; } .footerAbout{ width:365px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px; }
.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} .languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}
.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;} .departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;}
.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} .copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;}