Merge branch 'szzh' into develop
This commit is contained in:
commit
c2b09c32b2
|
@ -43,6 +43,14 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
|
||||
def index
|
||||
# 消息状态更新
|
||||
@homework.course_messages.each do |homework_message|
|
||||
if User.current.id == homework_message.user_id
|
||||
homework_message.update_attributes(:viewed => true)
|
||||
end
|
||||
end
|
||||
|
||||
# 消息end
|
||||
#设置作业对应的forge_messages表的viewed字段
|
||||
query_student_work = @homework.course_messages
|
||||
query_student_work.each do |query|
|
||||
|
@ -134,10 +142,14 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@user = User.current
|
||||
@student_work = @homework.student_works.where("user_id = ?",User.current.id).first
|
||||
if @student_work.nil?
|
||||
@student_work = StudentWork.new
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html{ render :layout => "new_base_user"}
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -178,11 +190,12 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
|
||||
def edit
|
||||
@user = User.current
|
||||
if !User.current.admin? && @homework.homework_type == 2 #编程作业不能修改作业
|
||||
render_403
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.html{ render :layout => "new_base_user"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -106,15 +106,17 @@ class UsersController < ApplicationController
|
|||
return
|
||||
end
|
||||
# 当前用户查看消息,则设置消息为已读
|
||||
course_querys = @user.course_messages
|
||||
forge_querys = @user.forge_messages
|
||||
user_querys = @user.user_feedback_messages
|
||||
forum_querys = @user.memo_messages
|
||||
if User.current.id == @user.id
|
||||
course_querys.update_all(:viewed => true)
|
||||
forge_querys.update_all(:viewed => true)
|
||||
user_querys.update_all(:viewed => true)
|
||||
forum_querys.update_all(:viewed => true)
|
||||
if params[:viewed] == "all"
|
||||
course_querys = @user.course_messages
|
||||
forge_querys = @user.forge_messages
|
||||
user_querys = @user.user_feedback_messages
|
||||
forum_querys = @user.memo_messages
|
||||
if User.current.id == @user.id
|
||||
course_querys.update_all(:viewed => true)
|
||||
forge_querys.update_all(:viewed => true)
|
||||
user_querys.update_all(:viewed => true)
|
||||
forum_querys.update_all(:viewed => true)
|
||||
end
|
||||
end
|
||||
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
|
||||
case params[:type]
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# encoding: utf-8
|
||||
include UserScoreHelper
|
||||
|
||||
module StudentWorkHelper
|
||||
def user_projects_option
|
||||
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% project = project %>
|
||||
<span class="add_attachment" style="font-weight:normal;">
|
||||
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn', :style => ie8? ? 'display:none' : '' %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<span><%= @obj_count%></span>
|
||||
<%= l(:label_homework_count)%>
|
||||
</p>
|
||||
<%= link_to( l(:label_course_homework_new), new_homework_common_path(:course => @course.id), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
|
||||
<%#= link_to( l(:label_course_homework_new), new_homework_common_path(:course => @course.id), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% @homeworks.each do |homework|%>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<% if @is_teacher%>
|
||||
<%= homework_anonymous_comment(homework)%>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
|
||||
<%= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
|
||||
<%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
|
||||
<% elsif @is_student%>
|
||||
<%= student_anonymous_comment homework %>
|
||||
<%= student_new_homework homework %>
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= javascript_include_tag 'homework','baiduTemplate' %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||
<%= 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/new_homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
|
||||
<%= 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'%>
|
||||
<% end%>
|
||||
</div><!--hwork_new end-->
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<li class="fl"><a href="<%= agreement_path %>" class="f_grey mw20" target="_blank">服务协议</a>|</li>
|
||||
<li class="fl" style="display: none"><span class="f_grey mw20" title="暂未开放"><%= l(:label_recruitment_information)%></span>|</li>
|
||||
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||
<li class="fl"><span class="f_grey mw20" title="暂未开放"><%= l(:label_forums)%></span></li>
|
||||
<li class="fl"><a href="<%= forums_path %>" class="f_grey mw20" target="_blank" ><%= l(:label_forums)%></a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
<div class="subNav">
|
||||
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f14 c_blue02"%>
|
||||
<%= link_to "(#{@course.homework_commons.count})", homework_common_index_path(:course => @course.id), :class => "subnav_num c_orange"%>
|
||||
<%= link_to( "+#{l(:label_course_homework_new)}", new_homework_common_path(:course => @course.id), :class => 'subnav_green c_white') if is_teacher %>
|
||||
<%#= link_to( "+#{l(:label_course_homework_new)}", new_homework_common_path(:course => @course.id), :class => 'subnav_green c_white') if is_teacher %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>
|
||||
|
|
|
@ -1,52 +1,54 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">编辑作品</h2>
|
||||
</div>
|
||||
<div class="Newwork">
|
||||
<div class="hwork_ctt">
|
||||
<div class="hwork_dis" id="tbc_01">
|
||||
<%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
|
||||
<div class="N_con">
|
||||
<p>
|
||||
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
||||
<input type="text" name="student_work[name]" id="student_work_name" class="bo fl" maxlength="200" onkeyup="regexStudentWorkName();" value="<%= @work.name%>">
|
||||
<a href="javascript:void(0)" class="fl ml10 mt3" onclick="show_project();" >项目信息
|
||||
<img class="ml5 " src="/images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
||||
</a>
|
||||
<div class="cl"></div>
|
||||
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<div class="HomeWork" id="RSide">
|
||||
<div class="RightBanner">
|
||||
<div class="NewsBannerName">编辑作品</div>
|
||||
</div>
|
||||
<div class="Newwork">
|
||||
<div class="hwork_ctt">
|
||||
<div class="hwork_dis" id="tbc_01">
|
||||
<%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
|
||||
<div class="N_con">
|
||||
<p>
|
||||
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
||||
<input type="text" name="student_work[name]" id="student_work_name" class="bo fl" maxlength="200" onkeyup="regexStudentWorkName();" value="<%= @work.name%>">
|
||||
<a href="javascript:void(0)" class="fl ml10 mt3" onclick="show_project();" >项目信息
|
||||
<img class="ml5 " src="/images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
||||
</a>
|
||||
<div class="cl"></div>
|
||||
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
|
||||
<p id="about_project" class="about_project" style="<%= @work.project.nil? ? '' : 'display:block;'%>">
|
||||
<label class="fl"> 关联项目 :</label>
|
||||
<%= f.select :project,options_for_select(user_projects_option,@work.project_id), {},{:class => "bo02 mb10"} %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p id="about_project" class="about_project" style="<%= @work.project.nil? ? '' : 'display:block;'%>">
|
||||
<label class="fl"> 关联项目 :</label>
|
||||
<%= f.select :project,options_for_select(user_projects_option,@work.project_id), {},{:class => "bo02 mb10"} %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
|
||||
<p>
|
||||
<label class="fl">
|
||||
<span class="c_red">*</span>
|
||||
作品描述 :
|
||||
</label>
|
||||
<textarea name="student_work[description]" placeholder="最多3000个汉字(或6000个英文字符)" id="student_work_description" class="w620 hwork_txt" maxlength="6000" onkeyup="regexStudentWorkDescription();"><%= @work.description%></textarea>
|
||||
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<label class="fl"> 添加附件 :</label>
|
||||
<%= render :partial => 'attachments/new_form',:locals => {:container => @work} %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p class="ml80 ">
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="edit_student_work(<%= @work.id%>);">提交作品</a>
|
||||
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
|
||||
<div class="cl"></div>
|
||||
</p>
|
||||
</div><!---创建作业内容结束-->
|
||||
<% end%>
|
||||
<p>
|
||||
<label class="fl">
|
||||
<span class="c_red">*</span>
|
||||
作品描述 :
|
||||
</label>
|
||||
<textarea name="student_work[description]" placeholder="最多3000个汉字(或6000个英文字符)" id="student_work_description" class="w620 hwork_txt" maxlength="6000" onkeyup="regexStudentWorkDescription();"><%= @work.description%></textarea>
|
||||
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<label class="fl"> 添加附件 :</label>
|
||||
<%= render :partial => 'attachments/new_form',:locals => {:container => @work} %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p class="ml80 ">
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white mt10" onclick="edit_student_work(<%= @work.id%>);">提交作品</a>
|
||||
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white mt10 ml10"%>
|
||||
<div class="cl"></div>
|
||||
</p>
|
||||
</div><!---创建作业内容结束-->
|
||||
<% end%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--新建作业结束-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -124,7 +124,6 @@
|
|||
</h4>
|
||||
<% if @is_teacher%>
|
||||
<%= homework_anonymous_comment(@homework)%>
|
||||
<%= link_to(l(:button_edit),edit_homework_common_path(@homework), :class => "fr mr10 work_edit") %>
|
||||
<% else%>
|
||||
<%= student_anonymous_comment @homework %>
|
||||
<%= student_new_homework @homework %>
|
||||
|
|
|
@ -17,75 +17,77 @@
|
|||
});
|
||||
<% end%>
|
||||
</script>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2">创建作品</h2>
|
||||
</div>
|
||||
<div class="Newwork">
|
||||
<div class="hwork_ctt">
|
||||
<div class="hwork_dis" id="tbc_01">
|
||||
<%= form_for(@student_work,
|
||||
:html => { :multipart => true },
|
||||
:url => {:controller => 'student_work',
|
||||
:action => 'create',
|
||||
:homework => @homework.id
|
||||
}) do |f|%>
|
||||
<div class="N_con">
|
||||
<% if @homework.homework_type == 1%>
|
||||
<div class=" c_red mb10 ml90">
|
||||
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
|
||||
</div>
|
||||
<div class="HomeWork" id="RSide">
|
||||
<div class="RightBanner">
|
||||
<div class="NewsBannerName">提交作品</div>
|
||||
</div>
|
||||
<div class="Newwork">
|
||||
<div class="hwork_ctt">
|
||||
<div class="hwork_dis" id="tbc_01">
|
||||
<%= form_for(@student_work,
|
||||
:html => { :multipart => true },
|
||||
:url => {:controller => 'student_work',
|
||||
:action => 'create',
|
||||
:homework => @homework.id
|
||||
}) do |f|%>
|
||||
<div class="N_con">
|
||||
<% if @homework.homework_type == 1%>
|
||||
<div class=" c_red mb10 ml90">
|
||||
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
|
||||
</div>
|
||||
<% end%>
|
||||
<p>
|
||||
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
||||
<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
|
||||
<% if @homework.homework_type != 2%>
|
||||
<a href="javascript:void(0)" class="fl ml10 mt3" onclick=" $('#about_project').slideToggle();" >
|
||||
项目信息
|
||||
<img class="ml5 " src="../images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
||||
</a>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p id="about_project" class="about_project" >
|
||||
<label class="fl"> 选择项目 :</label>
|
||||
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<label class="fl">
|
||||
<span class="c_red">*</span>
|
||||
<%= @homework.homework_type == 2 ? "提交代码" : "作品描述"%>
|
||||
:
|
||||
</label>
|
||||
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
|
||||
<%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%>
|
||||
<% else %>
|
||||
<%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<% if @homework.homework_type != 2%>
|
||||
<p>
|
||||
<label class="fl"> 添加附件 :</label>
|
||||
<%= render :partial => 'attachments/new_form' %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
<p class="ml80 ">
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white mt10" onclick="new_student_work();">提交作品</a>
|
||||
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white mt10 ml10"%>
|
||||
<div class="cl"></div>
|
||||
</p>
|
||||
</div><!---创建作业内容结束-->
|
||||
<% end%>
|
||||
<p>
|
||||
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
||||
<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
|
||||
<% if @homework.homework_type != 2%>
|
||||
<a href="javascript:void(0)" class="fl ml10 mt3" onclick="show_project();" >
|
||||
项目信息
|
||||
<img class="ml5 " src="../images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
||||
</a>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p id="about_project" class="about_project" >
|
||||
<label class="fl"> 选择项目 :</label>
|
||||
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<label class="fl">
|
||||
<span class="c_red">*</span>
|
||||
<%= @homework.homework_type == 2 ? "提交代码" : "作品描述"%>
|
||||
:
|
||||
</label>
|
||||
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
|
||||
<%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%>
|
||||
<% else %>
|
||||
<%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<% if @homework.homework_type != 2%>
|
||||
<p>
|
||||
<label class="fl"> 添加附件 :</label>
|
||||
<%= render :partial => 'attachments/new_form' %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
<p class="ml80 ">
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="new_student_work();">提交作品</a>
|
||||
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
|
||||
<div class="cl"></div>
|
||||
</p>
|
||||
</div><!---创建作业内容结束-->
|
||||
<% end%>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--新建作业结束-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--新建作业结束-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<% else %>
|
||||
|
||||
|
@ -125,8 +127,8 @@
|
|||
</script>
|
||||
<!-- 模板1结束 -->
|
||||
|
||||
<div class="homepageRight">
|
||||
<div class="HomeWork">
|
||||
|
||||
<div class="HomeWork" id="RSide">
|
||||
<div class="RightBanner">
|
||||
<div class="NewsBannerName">提交作品</div>
|
||||
</div>
|
||||
|
@ -201,6 +203,5 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div><!----ProResult end-->
|
||||
</div><!--homepageRight end-->
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="homepagePostSubmit">
|
||||
<%= link_to "提交("+activity.student_works.count.to_s+")", student_work_index_path(:homework => activity.id), :class=> "c_blue" %>
|
||||
</div>
|
||||
<div class="homepagePostDeadline">截止时间:<%= format_date(activity.end_time) %></div>
|
||||
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
|
||||
作业描述:<%= activity.description.html_safe %>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDate">
|
||||
发帖时间:<%= format_date(activity.created_on) %>
|
||||
发帖时间:<%= format_time(activity.created_on) %>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
|||
<%if count > 2 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
点击展开更多回复(<%= count.to_s%>)
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -100,7 +100,7 @@
|
|||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_date(reply.created_on) %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word">
|
||||
<%= reply.content.html_safe %>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
|
||||
</div>
|
||||
<div class="homepagePostDate">
|
||||
发布时间:<%= format_date(activity.created_on) %>
|
||||
发布时间:<%= format_time(activity.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">
|
||||
通知描述:
|
||||
|
@ -35,7 +35,7 @@
|
|||
<%if count>2 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
点击展开更多回复(<%= count.to_s%>)
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<% else %>
|
||||
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_date(comment.created_on) %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word"><%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDate">
|
||||
发布时间:<%= format_date(activity.published_at) %>
|
||||
发布时间:<%= format_time(activity.published_at) %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">问卷描述:<%=activity.polls_description.html_safe.to_s%></div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDeadline">
|
||||
时间:
|
||||
<%=format_date(activity.created_on) %>
|
||||
<%=format_time(activity.created_on) %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">缺陷描述:
|
||||
|
@ -72,7 +72,7 @@
|
|||
<% if count > 2 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
点击展开更多回复(<%= count.to_s %>)
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -109,7 +109,7 @@
|
|||
<% else %>
|
||||
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_date(reply.created_on) %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDate">
|
||||
时间:<%= format_date(activity.created_on) %>
|
||||
时间:<%= format_time(activity.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">帖子描述:
|
||||
<% if activity.parent_id.nil? %>
|
||||
|
@ -49,7 +49,7 @@
|
|||
)</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count>2 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
|||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_date(reply.created_on) %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
.ke-inline-block{display: none;}
|
||||
.ke-container{height: 40px !important;}
|
||||
</style>
|
||||
<% user_activities.each do |user_activity|
|
||||
if user_activities %>
|
||||
|
|
|
@ -15,9 +15,12 @@
|
|||
<div class="calendar_div fl">
|
||||
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" >
|
||||
<%= calendar_for('homework_end_time')%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p id="homework_end_time_span" class="c_red mt5"></p>
|
||||
<div class="cl"></div>
|
||||
<div id="homework_editor" style="display: none">
|
||||
<div class="mt10">
|
||||
<% if edit_mode %>
|
||||
|
@ -31,9 +34,9 @@
|
|||
|
||||
|
||||
<div class="mt10">
|
||||
<!--<input type="text" class="InputBox W700 SearchIcon" placeholder="发送到课程" />-->
|
||||
<%= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w720",:value => "请选择发布作业的课程"} %>
|
||||
</div>
|
||||
<p id="homework_course_id_span" class="c_red mt5"></p>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="homework_attachments">
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
</div>
|
||||
<div class="resources mt10" id="users_setting">
|
||||
<div>
|
||||
<% if params[:type].nil? %>
|
||||
<div class="newsReadSetting">
|
||||
有 <span class="c_red"><%= User.current.count_new_message %></span> 封未读<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @message_alls.count >0 %>
|
||||
<%# 课程消息 %>
|
||||
<% unless @message_alls.nil? %>
|
||||
|
@ -52,7 +57,11 @@
|
|||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:title => "#{ma.course_message.comments.html_safe}" %></li>
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></li>
|
||||
<div style="display: none" >
|
||||
<%= ma.course_message.comments.html_safe %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
@ -80,11 +89,21 @@
|
|||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.parent_id.nil? ? ma.course_message.subject.html_safe : ma.course_message.content.html_safe,
|
||||
course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||
:title => "#{ma.course_message.subject.html_safe}" %></a></li>
|
||||
<% if ma.course_message.parent_id.nil? %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||
:title => "#{ma.course_message.subject.html_safe}" %></a></li>
|
||||
<% else %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||
<div style="display: none" >
|
||||
<%= ma.course_message.content.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
||||
</ul>
|
||||
|
@ -150,11 +169,23 @@
|
|||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%=link_to ma.forge_message.parent_id.nil? ? ma.forge_message.subject.html_safe : ma.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
|
||||
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
||||
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
||||
:title => "#{ma.forge_message.subject.html_safe}" %></a></li>
|
||||
<% if ma.forge_message.parent_id.nil? %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%=link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
|
||||
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
||||
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
||||
:title => "#{ma.forge_message.subject.html_safe}" %></a></li>
|
||||
<% else %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%=link_to ma.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
|
||||
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
||||
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||
<div style="display: none" >
|
||||
<%= ma.forge_message.content.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
@ -180,7 +211,9 @@
|
|||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "#{ma.forge_message.comments.html_safe}",
|
||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%></li>
|
||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:title => "#{ma.forge_message.comments.html_safe}" %>
|
||||
</li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
@ -196,9 +229,21 @@
|
|||
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content}" %></a>
|
||||
</li>
|
||||
<% if ma.memo.parent_id.nil? %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:title => "#{ma.memo.subject}" %></a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||
</li>
|
||||
<div style="display: none" >
|
||||
<%= ma.memo.content.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
@ -215,8 +260,13 @@
|
|||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.journals_for_message.notes}" %></a>
|
||||
<%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||
</li>
|
||||
<div style="display: none" >
|
||||
<%= ma.journals_for_message.notes.html_safe %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
||||
|
||||
</ul>
|
||||
|
@ -236,6 +286,17 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function message_titile_show(obj,e)
|
||||
{
|
||||
obj.parent().next("div").show();
|
||||
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","fixed");
|
||||
}
|
||||
function message_titile_hide(obj)
|
||||
{
|
||||
obj.parent().next("div").hide();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ class CourseMessages < ActiveRecord::Migration
|
|||
def up
|
||||
Course.all.each do |course|
|
||||
transaction do
|
||||
put course.id
|
||||
course.course_messages << CourseMessage.new(:user_id => course.tea_id,:course_id => course.id)
|
||||
# 作业
|
||||
course.homework_commons.each do |homework_common|
|
||||
|
|
|
@ -11,6 +11,7 @@ class UpdateMessageTime < ActiveRecord::Migration
|
|||
cmessage.created_at = cmessage.course_message.created_on
|
||||
end
|
||||
cmessage.save
|
||||
puts cmessage.id
|
||||
|
||||
course_all_message = MessageAll.where("message_type = '#{cmessage.class.to_s}' and message_id = '#{cmessage.id}'").first
|
||||
course_all_message.created_at = cmessage.created_at
|
||||
|
|
|
@ -11,6 +11,7 @@ class UpdateForgeMessageTime < ActiveRecord::Migration
|
|||
fmessage.created_at = fmessage.forge_message.created_on
|
||||
end
|
||||
fmessage.save
|
||||
puts fmessage.id
|
||||
|
||||
forge_all_message = MessageAll.where("message_type = '#{fmessage.class.to_s}' and message_id = '#{fmessage.id}'").first
|
||||
forge_all_message.created_at = fmessage.created_at
|
||||
|
|
|
@ -11,6 +11,7 @@ class UpdateMemoMessageTime < ActiveRecord::Migration
|
|||
memo_message.created_at = memo_message.memo.created_on
|
||||
end
|
||||
memo_message.save
|
||||
puts memo_message.id
|
||||
|
||||
memo_messages = MessageAll.where("message_type = '#{memo_message.class.to_s}' and message_id = '#{memo_message.id}'").first
|
||||
memo_messages.created_at = memo_message.created_at
|
||||
|
|
|
@ -3536,8 +3536,8 @@ function _getInitHtml(themesPath, bodyClass, cssPath, cssData) {
|
|||
(_direction === '' ? '<html>' : '<html dir="' + _direction + '">'),
|
||||
'<head><meta charset="utf-8" /><title></title>',
|
||||
'<style>',
|
||||
'html {margin:2px;padding:2px;}',
|
||||
'body {margin:2px;padding:5px;}',
|
||||
'html {margin:3px 5px;padding:0px;}',
|
||||
'body {margin:0px;padding:0px;}',
|
||||
'body, td {font:14px/1.5 "sans serif",tahoma,verdana,helvetica;}',
|
||||
'body, p, div {word-wrap: break-word;}',
|
||||
'p {margin:0 0;}',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
function init_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||
resizeType : 0,minWidth:"1px",width:"100%",minHeight:"28px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
|
|
|
@ -62,8 +62,15 @@ function submit_homework(id)
|
|||
{
|
||||
$("#homework_name").focus();
|
||||
}
|
||||
else
|
||||
else if(!regex_homework_end_time())
|
||||
{
|
||||
$("#homework_end_time").focus();
|
||||
}
|
||||
else if(!regex_course_id())
|
||||
{
|
||||
$("#course_id").focus();
|
||||
}
|
||||
else{
|
||||
homework_description_editor.sync();
|
||||
$("#"+id).submit();
|
||||
}
|
||||
|
@ -85,6 +92,36 @@ function regex_homework_name()
|
|||
return true;
|
||||
}
|
||||
}
|
||||
//验证截止时间
|
||||
function regex_homework_end_time()
|
||||
{
|
||||
var name = $.trim($("#homework_end_time").val());
|
||||
if(name=="")
|
||||
{
|
||||
$("#homework_end_time_span").text("截止时间不能为空");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#homework_end_time_span").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//验证发送到课程
|
||||
function regex_course_id(){
|
||||
var course_id = $("#course_id").val();
|
||||
if(course_id == -1)
|
||||
{
|
||||
$("#homework_course_id_span").text("发布课程不能为空");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#homework_course_id_span").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//老师导入作业时查询作业
|
||||
function search_homework_by_name(url){
|
||||
|
@ -94,4 +131,50 @@ function search_homework_by_name(url){
|
|||
function (data) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
//提交新建作品
|
||||
function new_student_work()
|
||||
{
|
||||
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||
{$("#new_student_work").submit();}
|
||||
}
|
||||
|
||||
function edit_student_work(id)
|
||||
{
|
||||
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||
{$("#edit_student_work_" + id).submit();}
|
||||
}
|
||||
|
||||
//验证作品名称
|
||||
function regexStudentWorkName()
|
||||
{
|
||||
var name = $.trim($("#student_work_name").val());
|
||||
|
||||
if(name=="")
|
||||
{
|
||||
$("#student_work_name_span").text("作品名称不能为空");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#student_work_name_span").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function regexStudentWorkDescription()
|
||||
{
|
||||
var name = $.trim($("#student_work_description").val());
|
||||
|
||||
if(name=="")
|
||||
{
|
||||
$("#student_work_description_textarea").text("作品描述不能为空");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#student_work_description_textarea").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -139,6 +139,7 @@ a:hover.tb_all{ background:#ff5d31; color:#fff; text-decoration:none;}
|
|||
.work_tb_{ background-color: #eaeaea; height:40px; }
|
||||
a.work_edit{color: #64bdd9; display:block; padding:1px 5px; border:1px solid #64bdd9;}
|
||||
a:hover.work_edit{color: #fff; background: #64bdd9;}
|
||||
a.un_work_edit{color: white; display:block; padding:1px 5px; background-color: darkgray;border:1px solid darkgray;}
|
||||
|
||||
/* 控制显示与隐藏css类 */
|
||||
.normaltab { color:#64bdd9 ; }
|
||||
|
@ -484,10 +485,7 @@ blockquote img{max-width: 100%;}
|
|||
|
||||
blockquote {
|
||||
/* font-style: italic; */
|
||||
border-left: 1px solid #e0e0e0;
|
||||
border-right: 1px solid #e0e0e0;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
border:1px solid #d4d4d4;
|
||||
padding-left: 0.6em;
|
||||
padding-top: 0.6em;
|
||||
padding-right: 0.6em;
|
||||
|
@ -645,10 +643,10 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
|
|||
.hwork_code02{ width:60px; text-align:center; }
|
||||
.hwork_tit_e{ width:420px; float:left; }
|
||||
.hwork_tit_e a{ width:405px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.hwork_num{ width:95px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.hwork_num{ width:90px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.mr18{ margin-right:18px;}
|
||||
a.hwork_center{ display:block; width:60px; margin-right:5px;overflow: hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.hwork_name{ display:block;width:85px; overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.hwork_name{ display:block;width:80px; overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.absence_penalty{ display:block;width:45px; overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.border_ce {border: 1px solid #e4e4e4;}
|
||||
.show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; }
|
||||
|
@ -770,4 +768,4 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo
|
|||
.ProResultUl span { display:block; float:left;}
|
||||
.ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; }
|
||||
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
|
||||
.mb50{margin-bottom: 50px;}
|
||||
.mb50{margin-bottom: 50px;}
|
||||
|
|
|
@ -187,7 +187,7 @@ a:hover.grey_n_btn{ background:#717171; color:#fff;}
|
|||
.green_btn{ background:#28be6c; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;}
|
||||
a.green_btn{background:#28be6c;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;}
|
||||
a:hover.green_btn{ background:#14ad5a;}
|
||||
.blue_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;}
|
||||
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
|
||||
a.blue_btn{background:#64bdd9;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;}
|
||||
a:hover.blue_btn{ background:#329cbd;}
|
||||
a.orange_btn{ background:#ff5722;color:#fff; font-weight:normal; padding:2px 10px; text-align:center; }
|
||||
|
@ -525,7 +525,7 @@ a.replyGrey1 {color:#888888;}
|
|||
a.replyGrey1:hover {color:#4b4b4b;}
|
||||
a.newsBlue {color:#269ac9;}
|
||||
a.newsBlue:hover {color:#297fb8;}
|
||||
a.newsBlack {color:#000000; font-size:13px; font-weight:bold}
|
||||
a.newsBlack {color:#4b4b4b; font-size:13px; font-weight:bold}
|
||||
a.menuGrey {color:#808080;}
|
||||
a.menuGrey:hover {color:#fe7d68;}
|
||||
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
|
||||
|
@ -865,7 +865,7 @@ a.DropBtn{background: url(../images/homepage_icon2.png) -125px -339px no-repeat;
|
|||
a:hover.DropBtn{background: url(../images/homepage_icon2.png) -125px -370px no-repeat;}
|
||||
.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;}
|
||||
/*20150820编程作业 LB*/
|
||||
.W320{ width:320px;}
|
||||
.W320{ width:320px; max-width: 320px; min-width: 320px;}
|
||||
.icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;}
|
||||
a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
|
||||
.icon_remove{background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
|
||||
|
@ -938,10 +938,7 @@ div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
|||
|
||||
blockquote {
|
||||
/* font-style: italic; */
|
||||
border-left: 1px solid #e0e0e0;
|
||||
border-right: 1px solid #e0e0e0;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
border:1px solid #d4d4d4;
|
||||
padding-left: 0.6em;
|
||||
padding-top: 0.6em;
|
||||
padding-right: 0.6em;
|
||||
|
@ -956,3 +953,50 @@ blockquote {
|
|||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
/* 创建作品 work */
|
||||
.Newwork{ width:668px; height:418px;}
|
||||
.N_top{ float:right; margin-left:390px; }
|
||||
.N_con{ color:#484747; font-weight:bold; width:660px; margin-top:10px; }
|
||||
.N_con p{ }
|
||||
.w430{ width:470px;}
|
||||
.w557{ width:557px;}
|
||||
.w350{ width:350px;}
|
||||
.h400{height: 400px !important;}
|
||||
.w620{ width:480px; height:160px; border:1px solid #CCC;}
|
||||
.bo{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:470px; }
|
||||
.bo02{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:480px; margin-left:2px; color: #999; }
|
||||
.hwork_txt{ width:560px; padding-left:5px; background:#fff;}
|
||||
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:10px;}
|
||||
a:hover.tijiao{ background:#0f99a9;}
|
||||
.members_left{ float:left; width:410px; margin-right:20px; text-align:center;}
|
||||
.members_left{}
|
||||
.members_left ul li{ height:30px; border-bottom:1px solid #E4E4E4; width:410px; padding-top:10px; }
|
||||
.members_left ul li a{ float:left; text-align:center;}
|
||||
.members_left ul li span{ float:left; text-align:center; color:#484747;}
|
||||
.w150{ text-align:center; width:150px;min-height: 10px;}
|
||||
.f_b{ font-weight: bold;}
|
||||
.members_right label{ margin-left:15px;}
|
||||
.N_search{ height:20px; border:1px solid #999;}
|
||||
/* 创建作品 homework */
|
||||
.hwork_new{ color:#4c4c4c;}
|
||||
.c_red{ color:#F00;}
|
||||
.hwork_input{ border:1px solid #64bdd9; height:22px; width:88%; background:#fff; margin-bottom:10px; padding:5px;}
|
||||
.hwork_input02{ border:1px solid #64bdd9; height:15px; width:140px; background:#fff; margin-bottom:10px; padding:5px;}
|
||||
.hwork_text{ border:1px solid #64bdd9; height:100px;width:555px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
|
||||
.hwork_new ul li{ }
|
||||
.ml21{ margin-left:21px;}
|
||||
.ml9{ margin-left:9px;}
|
||||
.hwork_ttl{height:24px;}
|
||||
.hwork_ctt{height:auto; padding-left:10px;clear:both;}
|
||||
.hwork_tb_{ border-bottom:3px solid #e4e4e4; text-align:center;}
|
||||
.hwork_tb_ ul{height:24px;}
|
||||
.hwork_tb_ li{float:left;height: 24px;width: auto; padding:0 10px;cursor:pointer;}
|
||||
.hwork_normaltab { color:#15bccf ; border-bottom:3px solid #e4e4e4; }
|
||||
.hwork_hovertab { color:#656767; font-weight:bold; border-bottom:3px solid #15bccf; }
|
||||
|
||||
.hwork_dis{display:block; }
|
||||
.hwork_undis{display:none;}
|
||||
.project_none{ display:none;}
|
||||
.about_project{ overflow:hidden;display:none;}
|
||||
.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||
.project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||
|
|
|
@ -391,16 +391,17 @@ blockquote {
|
|||
border-right: 1px solid #e0e0e0;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
padding-left: .6em;
|
||||
padding-top: .6em;
|
||||
padding-right: .6em;
|
||||
padding-bottom: .6em;
|
||||
padding-left: 0.6em;
|
||||
padding-top: 0.6em;
|
||||
padding-right: 0.6em;
|
||||
padding-bottom: 0.6em;
|
||||
margin-left: 1.4em;
|
||||
margin-right: .4em;
|
||||
margin-right: 0.4em;
|
||||
border-radius: 4px;
|
||||
font-family: "Microsoft YaHei";
|
||||
background: url(http://test.forge.trustie.net/images/requirements/xreference.jpg.pagespeed.ic.h4inUJNyH0.jpg);
|
||||
/*background: url('../images/requirements/reference.jpg');*/
|
||||
background-size: 100% 100%;
|
||||
margin-top:5px;
|
||||
}
|
||||
/*上传项目图片*/
|
||||
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
|
||||
|
|
Loading…
Reference in New Issue