Merge remote-tracking branch 'origin/szzh' into szzh

This commit is contained in:
lizanle 2015-09-02 18:01:59 +08:00
commit f05270a519
42 changed files with 478 additions and 459 deletions

View File

@ -68,7 +68,7 @@ class BoardsController < ApplicationController
end
def show
#更新对应的forge_messages表的viewed字段
# 讨论区消息状态更新(已读和未读)
if @project
query_forge_messages = @board.messages
query_forge_messages.each do |query_forge_message|

View File

@ -34,20 +34,20 @@ class CommentsController < ApplicationController
ids = params[:asset_id].split(',')
update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT
end
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
if( @comment.id && @news.course )
if(@news.author_id != User.current.id)
notify = ActivityNotify.new()
notify.activity_container_id = @news.course.id
notify.activity_container_type = 'Course'
notify.activity_id = @comment.id
notify.activity_type = 'Comment'
notify.notify_to = @news.author_id
notify.is_read = 0
notify.save()
end
end
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
# # <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
# if( @comment.id && @news.course )
# if(@news.author_id != User.current.id)
# notify = ActivityNotify.new()
# notify.activity_container_id = @news.course.id
# notify.activity_container_type = 'Course'
# notify.activity_id = @comment.id
# notify.activity_type = 'Comment'
# notify.notify_to = @news.author_id
# notify.is_read = 0
# notify.save()
# end
# end
# # <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
flash[:notice] = l(:label_comment_added)
end

View File

@ -119,12 +119,14 @@ class IssuesController < ApplicationController
end
# 缺陷状态更新
query_journals = @issue.journals
if User.current.id == @issue.author_id
query_journals.each do |query_journal|
query_journal.forge_messages.update_all(:viewed => true)
query_journal.forge_messages.each do |f|
if User.current.id == f.user_id
f.update_attributes(:viewed => true)
end
end
end
end
#
# end
@journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id ASC").all
@journals.each_with_index {|j,i| j.indice = i+1}
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)

View File

@ -115,10 +115,24 @@ class MemosController < ApplicationController
REPLIES_PER_PAGE = 20 unless const_defined?(:REPLIES_PER_PAGE)
def show
#更新贴吧帖子留言对应的memo_messages的viewed字段
# 更新贴吧帖子留言对应的memo_messages的viewed字段
unless @memo.children.blank?
@memo.children.each do |child|
child.memo_messages.each do |memo_message|
if User.current.id == memo_message.user_id
memo_message.update_attributes(:viewed => true)
end
end
end
end
query_memo_messages = @memo.memo_messages
pre_count = REPLIES_PER_PAGE
query_memo_messages.each do |query_memo_message|
if User.current.id == query_memo_message.user_id
query_memo_message.update_attributes(:viewed => true)
end
end
pre_count = REPLIES_PER_PAGE
@memo = @memo.root # 取出楼主防止输入帖子id让回复作为主贴显示
@memo.update_column(:viewed_count, (@memo.viewed_count.to_i + 1))

View File

@ -99,30 +99,32 @@ class NewsController < ApplicationController
end
def show
#更新news对应的forge_messages的viewed字段
query_forge_news = @news.forge_messages
query_forge_news.each do |query|
if User.current.id == query.user_id
query.update_attributes(:viewed => true)
end
# 更新news对应的forge_messages的消息viewed字段
if @project
query_message_news = @news.forge_messages
else
query_message_news = @news.course_messages
end
#更新news对应的course_messages的viewed字段
query_course_news = @news.course_messages
query_course_news.each do |query|
if User.current.id == query.user_id
query.update_attributes(:viewed => true)
end
query_message_news.each do |query|
if User.current.id == query.user_id
query.update_attributes(:viewed => true)
end
end
#更新项目新闻的评阅的viewed字段
current_forge_comments = @news.comments
current_forge_comments.each do |current_forge_comment|
query_forge_comment = current_forge_comment.forge_messages
query_forge_comment.each do |query|
# 更新项目新闻的评阅的消息viewed字段
current_message_comments = @news.comments
current_message_comments.each do |current_message_comment|
if @project
query_message_comment = current_message_comment.forge_messages
else
query_message_comment = current_message_comment.course_messages
end
query_message_comment.each do |query|
if User.current.id == query.user_id
query.update_attributes(:viewed => true)
end
end
end
# end
cs = CoursesService.new
result = cs.show_course_news params,User.current

View File

@ -28,6 +28,7 @@ class PollController < ApplicationController
render_403
return
end
# 问卷消息状态更新
query_course_poll = @poll.course_messages
query_course_poll.each do |query|
if User.current.id == query.user_id

View File

@ -126,46 +126,41 @@ class UsersController < ApplicationController
end
when 'homework'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'course_message'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'forge_message'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
@message_alls_count = @message_alls.count
# when 'forge_message'
# @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
when 'course_news'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc")
@message_alls_count = @message_alls.count
# 课程通知包含发布的通知和回复的通知
@message_alls = CourseMessage.where("course_message_type =? or course_message_type =?", "News", "Comment").where("user_id =?", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'forge_news'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'course_news_reply'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
when 'forge_news_reply'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'poll'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'works_reviewers'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'works_reply'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc")
@message_alls_count = @message_alls.count
# when 'forge_news'
# @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
# when 'course_news_reply'
# @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
# when 'forge_news_reply'
# @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
# when 'poll'
# @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
# when 'works_reviewers'
# @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
# when 'works_reply'
# @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
when 'issue'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'issue_update' # 缺陷状态更新、留言
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc")
@message_alls_count = @message_alls.count
@message_alls = ForgeMessage.where("forge_message_type =? or forge_message_type =?" , "Issue", "Journal").where("user_id=?", @user).order("created_at desc")
# when 'issue_update' # 缺陷状态更新、留言
# @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
when 'forum'
@message_alls = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc")
@message_alls_count = @message_alls.count
when 'user_feedback'
@message_alls = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc")
@message_alls_count = @message_alls.count
else
render_404
return
@ -542,6 +537,15 @@ class UsersController < ApplicationController
# modified by fq
def user_newfeedback
# 更新用户留言消息状态
@user.journals_for_messages.each do |jour_message|
jour_message.user_feedback_messages.each do |userfeedback_message|
if User.current.id == userfeedback_message.user_id
userfeedback_message.update_attributes(:viewed => true)
end
end
end
# end
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
if User.current == @user
jours.update_all(:is_readed => true, :status => false)

View File

@ -760,7 +760,8 @@ module ApplicationHelper
options = args.extract_options!
text = distance_of_time_in_words(Time.now, time)
if @project
link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time)))
content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
# link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time)))
else
content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
end

View File

@ -544,6 +544,10 @@ module UsersHelper
#获取指定用户作为老师的课程
def get_as_teacher_courses user
type = []
option = []
option << "请选择发布作业的课程"
option << -1
type << option
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
option = []
option << course.name+""+course.time.to_s+course.term+""

View File

@ -73,7 +73,7 @@ class Attachment < ActiveRecord::Base
cattr_accessor :thumbnails_storage_path
@@thumbnails_storage_path = File.join(Rails.root, "tmp", "thumbnails")
before_save :files_to_final_location,:act_as_course_activity
before_save :files_to_final_location,:act_as_course_activity,:act_as_forge_activity
after_create :office_conver, :be_user_score,:act_as_forge_activity
after_update :office_conver, :be_user_score
after_destroy :delete_from_disk,:down_user_score

View File

@ -202,24 +202,24 @@ class JournalsForMessage < ActiveRecord::Base
# 用户留言消息通知
def act_as_user_feedback_message
# 主留言
receivers = []
if self.reply_id == 0
if self.user_id != self.jour_id # 过滤自己给自己的留言消息
receivers << self.jour
end
else # 留言回复
reply_to = User.find(self.reply_id)
if self.user_id != self.reply_id # 添加我回复的那个人
receivers << reply_to
end
if self.user_id != self.parent.jour_id && self.reply_id != self.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
receivers << self.parent.jour
end
end
if self.jour_type == 'Principal'
receivers.each do |r|
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => self.id, :journals_for_message_type => "Principal", :viewed => false)
receivers = []
if self.reply_id == 0
if self.user_id != self.jour_id # 过滤自己给自己的留言消息
receivers << self.jour
end
else # 留言回复
reply_to = User.find(self.reply_id)
if self.user_id != self.reply_id # 添加我回复的那个人
receivers << reply_to
end
if self.user_id != self.parent.jour_id && self.reply_id != self.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
receivers << self.parent.jour
end
end
receivers.each do |r|
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => self.id, :journals_for_message_type => "Principal", :viewed => false)
end
end
end

View File

@ -8,7 +8,7 @@ class UserFeedbackMessage < ActiveRecord::Base
validates :user_id,presence: true
validates :journals_for_message_id,presence: true
validates :journals_for_message_type, presence: true
after_create :add_user_message
after_save :add_user_message
def add_user_message
self.message_alls << MessageAll.new(:user_id => self.user_id)

View File

@ -37,7 +37,7 @@
<% @topics.each do |topic| %>
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;" id="topic<%= topic.id %>" nhname="container_board" mhname="container_board_reply">
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
<div class="talkmain_txt fl mt5 f14">
<div class="talkmain_txt fl mt5 f12">
<% author = topic.author.to_s %>
<div style="max-width:120px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">
<%= link_to User.current.member_of_course?(@board.course) ? "#{topic.author.show_name}(#{topic.author.login})" : "#{topic.author}" , user_path(topic.author),
@ -48,7 +48,7 @@
<p class="talkmain_tit fl fb break_word f14" title="<%= h(topic.subject) %>" style="width:auto;float:left;max-width:360px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">&nbsp;&nbsp;<%= h(topic.subject) %></p>
<% if topic.course_editable_by?(User.current) %>
<a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;
<a href="javascript:void(0)" nhname="showbtn" class="linkBlue" style="float: right;
margin-right: 10px;"><%= l(:button_edit) %></a>
<% end %>
@ -120,7 +120,7 @@
<%= l(:label_activity_time)%>&nbsp;&nbsp;<%= format_time topic.created_on %>
</div>
<a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr f14" style="margin-right:10px;"><%= l(:button_reply) %></a>
<a href="javascript:void(0)" nhname="showbtn_reply" class="linkBlue fr f12" style="margin-right:10px;"><%= l(:button_reply) %></a>
<div class="cl"></div>
@ -171,7 +171,7 @@
</div>
<input nhname="nh_content_val" value="<%= message.content %>" type="hidden"/>
<br/><div class="cl"></div>
<span class=" c_grey fl f14"><%= format_time(message.created_on) %></span>
<span class=" c_grey fl f12"><%= format_time(message.created_on) %></span>
<%= link_to(
l(:button_delete),
@ -179,13 +179,13 @@
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => ' c_dblue fr f14'
:class => ' linkBlue fr f12'
) if message.course_destroyable_by?(User.current) %>
<%= link_to(
l(:button_reply),
'javascript:;',
:nhname =>'showbtn_child_reply',
:class => ' c_dblue fr f14',
:class => ' linkBlue fr f12',
:style => 'margin-right: 10px;',
'data-topic-id' =>message.id,
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>

View File

@ -11,9 +11,11 @@
div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
</style>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<div class="msg_box fl" id='leave-message' nhname="new_message">
<%# reply_allow = JournalsForMessage.create_by_user? User.current %>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
<script >
init_KindEditor_data('');
</script>
<div class="msg_box fl mb10" id='leave-message'>
<h4><%= l(:label_leave_message) %></h4>
<% if !User.current.logged?%>
@ -23,21 +25,15 @@
<hr/>
</div>
<% else %>
<%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%#= f.kindeditor 'course_message',:height => '140px;',:editor_id => 'leave_message_editor',:input_html=>{:id => "leave_meassge",:style => "resize: none;",
:placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250}%>
<textarea cols="40" nhname="new_message_textarea" maxlength="250" name="new_form[course_message]" placeholder="请在此留下你的意见和建议!" rows="20" style="display: none;"></textarea>
<p nhname="contentmsg"></p>
<% end %>
<div class="cl"></div>
<div>
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<a href="javascript:void(0)" class="grey_btn fr ml10 mt10" nhname="cancel_btn">取&nbsp;&nbsp;消</a>
<a href="javascript:void(0)" onclick='$("#leave_message_form").submit();' class="blue_btn fr mt10">
<%= l(:button_leave_meassge)%>
</a>
<div nhname='new_message_' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_course_message'},:method => "post") do |f|%>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_' name="new_form[course_message]"></textarea>
<p nhname='contentmsg_'></p>
<div nhname='toolbar_container_' style="float:left;padding-top:3px;margin-bottom: 15px;"></div>
<a id="new_message_cancel_btn_" href="javascript:void(0)" class="grey_btn fr mt10">取消</a>
<a id="new_message_submit_btn_" href="javascript:void(0)" class="blue_btn fr ml10 mt10">留言</a>
<% end%>
</div>
<% end %>
</div>
@ -54,106 +50,6 @@
<script type="text/javascript">
$(function(){
function init_editor(params){
params.textarea.removeAttr('placeholder');
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
},
afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
// var flag = false;
// if(params.form.attr('data-remote') != undefined ){
// flag = true
// }
// params.form[0].onsubmit = function(){
// if(flag){
// $(this).removeAttr('data-remote');//不这么搞return false没用 花擦花擦
// }
// var is_checked = nh_check_field({
// issubmit:true,
// content:params.editor,
// contentmsg:params.contentmsg,
// textarea:params.textarea
// });
// if(is_checked){
// if(flag){
// alert('add')
// $(this).attr('data-remote','true');
// }
// alert('ok')
// return true;
// }
// return false;
// }
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
// return true; //这个涛哥的firefox不能提交
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
KindEditor.ready(function(K){
$("a[nhname='reply_btn']").live('click',function(){
var params = {};
@ -179,33 +75,10 @@
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
// $("#nhjump").attr('href','#'+params.div_form.attr('id'));
// $("#nhjump")[0].click();
}
},300);
params.textarea.data('init',1);
});
$("div[nhname='new_message']").each(function(){
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form",params.div_form);
if(params.form==undefined || params.form.length==0){
return;
}
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
$("a[nhname='cancel_btn']",params.div_form).click(function(){
nh_reset_form(params);
});
params.textarea.data('init',1);
}
});
});
});
</script>

View File

@ -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>

View File

@ -50,19 +50,18 @@
<div class="homepagePostReplyBanner">
<% count=0 %>
<div class="homepagePostReplyBannerCount">回复(
<% if activity.parent_id.nil? %>
<% count=activity.replies_count%>
<%=count %>
<% else %>
<% count=activity.parent.replies_count%>
<%=count %>
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% count=activity.children.count%>
<% end %>
<%= count %>
)</div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
<%if count>2 %>
<%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 %>
@ -83,9 +82,9 @@
<div class="cl"></div>
</div>
<% activity= activity.parent_id.nil? ? activity:activity.parent%>
<% activity= activity.parent ? activity.parent : activity%>
<% replies_all_i = 0 %>
<% unless activity.children.empty? %>
<% if count > 0 %>
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
<ul>
<% activity.children.reorder("created_on desc").each do |reply|%>
@ -102,17 +101,10 @@
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_date(reply.created_on) %>
<%#= link_to(
l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => 'replyGrey fr ml10'
) if reply.course_destroyable_by?(User.current) %>
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
</div>
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
<div class="homepagePostReplyContent break_word">
<%= reply.content.html_safe %>
</div>
</div>
<div class="cl"></div>
</li>

View File

@ -18,29 +18,26 @@
<div class="homepagePostDate">
发布时间:<%= format_date(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">通知描述:<%= activity.description.html_safe %></div>
<div class="homepagePostSetting none" id="act-<%= user_activity_id %>">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">
通知描述:
<%= activity.description.html_safe %>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count=activity.comments_count %>
<div class="homepagePostReplyBannerCount">回复(<%= count %></div>
<% count=activity.comments.count %>
<div class="homepagePostReplyBannerCount">
回复(<%= count %>
</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>
@ -59,12 +56,12 @@
</div>
<% replies_all_i = 0 %>
<% unless activity.comments.empty? %>
<% if count > 0 %>
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
<ul>
<% activity.comments.reorder("created_on desc").each do |comment| %>
<% replies_all_i=replies_all_i+1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>2 ? 'none' : '' %>">
<% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 2 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %>
</div>

View File

@ -14,7 +14,9 @@
</div>
<div class="homepagePostTitle break_word">
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %>
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'><%= get_issue_priority(activity.priority_id)[1] %></span>
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'>
<%= get_issue_priority(activity.priority_id)[1] %>
</span>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo">指派给&nbsp;&nbsp;
@ -26,7 +28,10 @@
<% end %>
<% end %>
</div>
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
<div class="homepagePostDeadline">
时间:
<%=format_date(activity.created_on) %>
</div>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">缺陷描述:
<% if activity.description? %>
@ -55,30 +60,21 @@
<% end %>
<% end %>
</div>
<div class="homepagePostSetting" id="act-<%=user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count=activity.journals.count %>
<% count = activity.journals.count %>
<div class="homepagePostReplyBannerCount">回复(<%= count %></div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
<% if count>2 %>
<% 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>
<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>
@ -97,11 +93,11 @@
</div>
<% replies_all_i = 0 %>
<% unless activity.journals.empty? %>
<% if count > 0 %>
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
<ul>
<% activity.journals.reorder("created_on desc").each do |reply| %>
<% replies_all_i=replies_all_i+1 %>
<% replies_all_i=replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>2 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
@ -114,15 +110,17 @@
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_date(reply.created_on) %>
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
</div>
<% if reply.details.any? %>
<% details_to_strings(reply.details).each do |string| %>
<div class="homepagePostReplyContent break_word"><%= string %></div>
<div class="homepagePostReplyContent break_word">
<%= string %>
</div>
<% end %>
<% else %>
<div class="homepagePostReplyContent break_word"><%= reply.notes.html_safe %></div>
<div class="homepagePostReplyContent break_word">
<%= reply.notes.html_safe %>
</div>
<% end %>
</div>
<div class="cl"></div>

View File

@ -33,34 +33,23 @@
<%= activity.parent.content.to_s.html_safe%>
<% end %>
</div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner"><% count=0 %>
<div class="homepagePostReplyBanner">
<% count = 0 %>
<div class="homepagePostReplyBannerCount">回复(
<% if activity.parent_id.nil? %>
<% count=activity.replies_count%>
<%=count %>
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% count=activity.parent.replies_count%>
<%=count %>
<% count=activity.children.count%>
<% end %>
<%=count %>
)</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>
@ -81,7 +70,7 @@
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
<% replies_all_i = 0 %>
<% unless activity.children.empty? %>
<% if count > 0 %>
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
<ul>
<% activity.children.reorder("created_on desc").each do |reply| %>
@ -98,15 +87,6 @@
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_date(reply.created_on) %>
<%#= link_to(
l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => 'replyGrey fr ml10'
) if reply.course_destroyable_by?(User.current) %>
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
</div>
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
</div>

View File

@ -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 %>
@ -60,5 +61,7 @@
<% end %>
<% end %>
<% end %>
<input type="hidden" value="<%= page%>"/>
<%= link_to "点击展开更多",user_activities_path(@user.id),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% if user_activities.count == 10%>
<%= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>

View File

@ -1,6 +1,6 @@
<% content_for :header_tags do %>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<%= javascript_include_tag 'homework','baiduTemplate' %>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<%= javascript_include_tag 'homework','baiduTemplate' %>
<% end %>
<div class="HomeWorkCon">
@ -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 %>
@ -29,63 +32,59 @@
</div>
<div class="cl"></div>
<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">
<%= render :partial => 'users/user_homework_attachment', :locals => {:container => homework} %>
</div>
<div class="mt5">
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick=" submit_comm_homework('new_homework_common');">发送</a>
<span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" class=" fr mr10 mt3" onclick="reset_homework();">取消</a>
<div class="cl"></div>
</div>
<div class="mt5">
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick=" submit_comm_homework('new_homework_common');">发送</a>
<span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" class=" fr mr10 mt3" onclick="reset_homework();">取消</a>
<div class="cl"></div>
</div>
<div class="mt10">
<a href="javascript:void(0);" class=" fl DropBtn">编程选项</a>
<div class="mt10">
<a href="javascript:void(0);" class=" fl DropBtn">编程选项</a>
<div class="DropLine"></div>
<div class="cl"></div>
</div>
</div>
<div class="advanced_option" style="display:none;">
<div class="advanced_option" style="display:none;">
<div class="mt10">
<select class="InputBox W120" required="true" name="program[language]">
<option value="1" selected>C语言</option>
<option value="2">C++</option>
</select>
<select class="InputBox W120" name="program[language]">
<option value="1" selected>C语言</option>
<option value="2">C++</option>
</select>
</div>
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required name="program[output][]"></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<div class="cl"></div>
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" name="program[output][]"></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<div class="cl"></div>
</div>
</div>
<input type="hidden" name="homework_type" value="1">
</div>
<input type="hidden" name="homework_type" value="1">
</div>
</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">
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required name="program[output][]"></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
<div class="cl"></div>
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required name="program[output][]"></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
<div class="cl"></div>
</div>
</script>

View File

@ -52,6 +52,6 @@
</div>
</div><!----HomeWork end-->
<% end%>
<input type="hidden" value="<%= page%>" />
<%= link_to "加载更多",user_homeworks_user_path(User.current.id),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
<% if homework_commons.count == 10%>
<%= link_to "加载更多",user_homeworks_user_path(User.current.id,:page => page),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
<% end%>

View File

@ -1,5 +1,4 @@
<input type="hidden" value="<%= @type%>" name="type" id="user_activities_type">
<div class="resources">
<div class="homepageRightBanner">
<div class="NewsBannerName">最新动态</div>
<ul class="resourcesSelect">
@ -37,6 +36,5 @@
</li>
</ul>
</div>
</div>
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0} %>
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type} %>

View File

@ -1,4 +1,2 @@
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page} )%>");
<% if @user_activities.count < 10%>
$("#show_more_activities").hide();
<% end%>
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page,:type => @type} )%>");

View File

@ -12,16 +12,13 @@
}
</script>
<div class="homepageRightBanner mb10">
<div class="NewsBannerName">作业</div>
</div>
<div class="cl"></div>
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
<!-- 老师身份才可以发布作业 -->
<div class="resources mb10">
<div class="homepageRightBanner">
<div class="NewsBannerName">发布作业</div>
</div>
</div>
<div class="cl"></div>
<div class="HomeWork mb10">
<% homework = HomeworkCommon.new %>
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
@ -30,14 +27,6 @@
</div>
<% end%>
</div><!----HomeWork end-->
<%else%>
<div class="resources mb10">
<div class="homepageRightBanner">
<div class="NewsBannerName">作业</div>
</div>
</div>
<div class="cl"></div>
<% end%>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>

View File

@ -1,4 +1,2 @@
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page} )%>");
<% if @homework_commons.count < 10%>
$(window).off("scroll", scrollHandler);
<% end%>

View File

@ -1,5 +1,4 @@
<div class="resources">
<div class="homepageRightBanner">
<div class="homepageRightBanner">
<div class="NewsBannerName">消息</div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
@ -20,15 +19,14 @@
<!--<li><%#= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>-->
<!--<li><%#= link_to "新闻回复", user_message_path(User.current, :type => 'forge_news_reply'), :class => "resourcesGrey" %></li>-->
<%# 项目相关消息 %>
<!--<li><%#= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>-->
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
<%# 系统贴吧 %>
<!--<li><%#= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>-->
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="resources mt10" id="users_setting">
<div>
<% if @message_alls.count >0 %>
@ -63,7 +61,7 @@
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了作业:</span></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),:class => "newsGrey", :title => "#{ma.course_message.name}" %></a></li>
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.course_message.name}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -83,8 +81,9 @@
<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.subject.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"}",
<%= 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>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
@ -96,7 +95,7 @@
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %></span></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<% unless ma.content.nil? %>
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.content.html_safe}" %></a></li>
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.content.html_safe}" %></a></li>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
@ -106,7 +105,7 @@
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了作品评论:</span></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.course_message.notes}" %></a></li>
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.course_message.notes}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -152,7 +151,7 @@
<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.subject.html_safe, project_boards_path(ma.forge_message.project,
<%=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>
@ -169,7 +168,7 @@
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class => "newsGrey", :title => "#{ma.forge_message.title.html_safe}" %></a>
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.title.html_safe}" %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
@ -198,7 +197,7 @@
<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.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id),:class => "newsGrey" , :title => "#{ma.memo.content.html_safe}" %></a>
<%= 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>
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
</ul>
@ -216,9 +215,10 @@
<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 => "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"}", :title => "#{ma.journals_for_message.notes}" %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %>
@ -246,4 +246,3 @@

View File

@ -10,11 +10,10 @@
div.ke-toolbar .ke-outline{border:none;}
</style>
<div >
<div class="resources mb10">
<div class="homepageRightBanner">
<div class="homepageRightBanner mb10">
<div class="NewsBannerName">留言</div>
</div>
</div>
<div class="cl"></div>
<div class="message_box mb10" id="users_setting">

View File

@ -42,8 +42,7 @@
$("#upload_form").submit();
}
</script>
<div class="resources" >
<div class="homepageRightBanner">
<div class="homepageRightBanner">
<div class="NewsBannerName">资源库</div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
@ -67,7 +66,7 @@
</li>
</ul>
</div>
</div>
<div class="resources mt10" id="users_setting">
<div class="resourcesSearchBanner mt10">
<div class="resourcesUploadBox">

View File

@ -5,3 +5,4 @@ $("#homework_end_time").val("<%= @homework.end_time%>");
$("#course_id").val("<%= @homework.course_id%>");
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework })%>");
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
$("#homework_editor").show();

View File

@ -0,0 +1,36 @@
class AboutMemoMessage < ActiveRecord::Migration
def up
Memo.all.each do |memo|
transaction do
# 贴吧帖子
receivers = []
u = User.find(6)
receivers << u
# 主贴
if memo.parent_id.nil?
if memo.author_id != memo.forum.creator_id # 发帖人不是吧主
receivers << memo.forum.creator
end
else # 回帖
# 添加吧主
if memo.author_id != memo.forum.creator_id
receivers << memo.forum.creator
end
# 添加发帖人
unless memo.parent.nil?
if memo.author_id != memo.parent.author_id
receivers << memo.parent.author
puts memo.id
end
end
end
receivers.each do |r|
memo.memo_messages << MemoMessage.new(:user_id => r.id, :forum_id => memo.forum_id, :memo_id => memo.id, :memo_type => "Memo", :viewed => true)
end
end
end
end
def down
end
end

View File

@ -0,0 +1,36 @@
class AboutUserFeedbackMessage < ActiveRecord::Migration
def up
JournalsForMessage.all.each do |jour_for_message|
transaction do
# 主留言
if jour_for_message.jour_type == 'Principal'
receivers = []
if jour_for_message.reply_id == 0
if jour_for_message.user_id != jour_for_message.jour_id # 过滤自己给自己的留言消息
receivers << jour_for_message.jour
end
else # 留言回复
reply_to = User.find(jour_for_message.reply_id)
if jour_for_message.user_id != jour_for_message.reply_id # 添加我回复的那个人
receivers << reply_to
end
unless jour_for_message.parent.nil?
if jour_for_message.user_id != jour_for_message.parent.jour_id && jour_for_message.reply_id != jour_for_message.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
receivers << jour_for_message.parent.jour
end
end
end
unless receivers.blank?
receivers.each do |r|
puts jour_for_message.id
jour_for_message.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => jour_for_message.id, :journals_for_message_type => "Principal", :viewed => true)
end
end
end
end
end
end
def down
end
end

View File

@ -0,0 +1,26 @@
class UpdateMemoMessageTime < ActiveRecord::Migration
def up
memo_count = Memo.all.count / 30 + 1
transaction do
for i in 1 ... memo_count do i
MemoMessage.page(i).per(30).each do |memo_message|
if memo_message.memo
if memo_message.memo.respond_to?("created_at")
memo_message.created_at = memo_message.memo.created_at
elsif memo_message.memo.respond_to?("created_on")
memo_message.created_at = memo_message.memo.created_on
end
memo_message.save
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
memo_messages.save
end
end
end
end
end
def down
end
end

View File

@ -0,0 +1,27 @@
class UpdateUserfeebackMessageTime < ActiveRecord::Migration
def up
user_feedback_count = UserFeedbackMessage.all.count / 30 + 1
transaction do
for i in 1 ... user_feedback_count do i
UserFeedbackMessage.page(i).per(30).each do |ufm|
if ufm.journals_for_message
if ufm.journals_for_message.respond_to?("created_at")
ufm.created_at = ufm.journals_for_message.created_at
elsif ufm.journals_for_message.respond_to?("created_on")
ufm.created_at = ufm.journals_for_message.created_on
end
puts ufm.id
ufm.save
user_feedback_messages = MessageAll.where("message_type = '#{ufm.class.to_s}' and message_id = '#{ufm.id}'").first
user_feedback_messages.created_at = ufm.created_at
user_feedback_messages.save
end
end
end
end
end
def down
end
end

View File

@ -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;}',

File diff suppressed because one or more lines are too long

View File

@ -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){

View File

@ -248,6 +248,13 @@ function regexDescription() {
$("#description_notice_span").focus();
return false;
}
else if (name.length > 10000)
{
$("#description_notice_span").text("描述超过10000个字符");
$("#description_notice_span").css('color', '#ff0000');
$("#description_notice_span").focus();
return false;
}
else {
$("#description_notice_span").text("填写正确");
$("#description_notice_span").css('color', '#008000');

View File

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

View File

@ -1,3 +1,5 @@
a.linkBlue {color:#269ac9;}
a.linkBlue:hover {color:#297fb8;}
/*右侧内容--动态*/
.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
@ -78,8 +80,8 @@ a:hover.talk_btn{ background:#2a9dc1;}
/****讨论区内页***/
.mt0{ margin-top:0px;}
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
a.talk_edit{ color:#426e9a; margin-right:5px;}
a:hover.talk_edit{ color:#ff5722;}
a.talk_edit{ color:#269ac9; margin-right:5px;}
a:hover.talk_edit{ color:#297fb8;}
.talk_reply { background:#eeeeee; padding:10px; margin-bottom:10px;}
.talkpage_text{ border:1px solid #64bdd9; width:600px; color:#7d7d7d; padding:5px; margin:10px 0 10px 50px; background:#fff;}
/****新建讨论***/
@ -355,7 +357,7 @@ a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-lef
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
.r_txt_tit{width:510px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;word-break: break-all;word-wrap: break-word;}
blockquote {background: #e8e8e8;padding: 10px;margin-bottom: 5px;word-break: break-all;word-wrap: break-word;}
.respond-form{display: none;margin: auto;clear: both;}
.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;}
@ -482,10 +484,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;
@ -494,12 +493,13 @@ blockquote {
margin-right: 0.4em;
border-radius: 4px;
font-family: "Microsoft YaHei";
background: url('../images/requirements/reference.jpg');
/*background: url('../images/requirements/reference.jpg');*/
background-size: 100% 100%;
margin-top:5px;
}
a.member_search_edit {width: 43px;background: #15bccf;color: #fff;text-align: center;text-decoration: none;padding: 2px;}
.min_search_edit {width: 150px;height: 20px;border: 1px solid #d0d0d0 !important;color: #666;}
.r_txt_tit{max-width:510px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
.r_txt_tit{max-width:450px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
/*日历选择图*/
img.ui-datepicker-trigger {
@ -576,7 +576,7 @@ a:hover.icon_add{background:url(../stylesheets/images/icons.png) -20px -310px no
.talkmain_pic{}
a.talkmain_pic{ display:block; width:42px; height:42px; padding:2px; border:1px solid #e3e3e3;}
a:hover.talkmain_pic{border:1px solid #64bdd9;}
.talkmain_txt{ width:610px; margin-left:10px; color:#333;}
.talkmain_txt{ width:610px; margin-left:10px; color:#888;}
a.talkmain_name{ color:#ff5722;}
a:hover.talkmain_name{ color:#d33503;}
.talkmain_tit{ color:#0781b4; width:450px; display:block; }
@ -642,10 +642,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; }
@ -766,4 +766,5 @@ a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.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;}
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
.mb50{margin-bottom: 50px;}

View File

@ -286,7 +286,7 @@ a:hover.search_btn{ background: #0fa9bb;}
/*.resources {width:730px; background-color:#ffffff; padding:10px;float: right}*/
.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;}
.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;}
.resourcesSelect {width:30px; height:34px; float:right; position:relative; margin-top:-6px;}
.resourcesSelect {width:30px; height:24px; float:right; position:relative; margin-top:-6px;}
.resourcesSelected {width:25px; height:20px; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat;}
.resourcesSelected:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;}
.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;}
@ -499,12 +499,12 @@ a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#269ac9;}
.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;}
.homepageMenuSetting {display:inline-block; margin-left:155px;background:url(../images/homepage_icon.png) -190px -365px no-repeat; width:15px; height:15px; margin-top: 16px; margin-right: 15px;}
.homepageMenuSetting {display:inline-block; background:url(../images/homepage_icon.png) -190px -365px no-repeat; width:15px; height:15px; margin-top: 16px; margin-right: 15px;}
.homepageMenuSetting:hover {background:url(../images/homepage_icon.png) -190px -407px no-repeat;}
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
.homepageRightBanner {width:720px; margin:0px auto;}
.homepageRightBanner {width:718px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px; border:1px solid #dddddd;}
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left;}
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;}
@ -525,6 +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.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;}
@ -560,7 +561,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
.homepagePostReplyInputContainer {width:670px; margin: 10px auto 0 auto;}
.homepagePostReplyInputContainer {width:680px; margin: 10px auto 0 auto;}
.homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;}
.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:50px; height:24px; float:left; padding-left:30px;}
.homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#269ac9;}
@ -572,7 +573,7 @@ a.postReplyCancel {color:#888888; display:block;}
a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyInputContainer2 {width:595px; margin:0px auto;}
.homepagePostReplyInput2 {width:588px; height:45px; max-width:588px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:0px auto 10px auto;}
.homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:680px; margin:0px auto; margin-top:15px; min-height:65px;}
.homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:680px; margin:0px auto; margin-top:15px; min-height:60px;}
.homepagePostSetting {position:absolute; width:20px; height:20px; right:0px; top:0px;}
.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;}
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
@ -580,8 +581,8 @@ a.postReplyCancel:hover {color:#ffffff;}
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyPortrait {float:left; width:45px;}
.homepagePostReplyDes {float:left; width:595px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:5px;}
.homepagePostReplyDes {float:left; width:620px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -843,7 +844,7 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
.uppic_btn:hover {background-color: #329cbd;}
/*20150820课程作业 LB*/
.HomeWork {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;}
.HomeWork {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd; float:right;}
.RightBanner {width:708px; height:34px; border-bottom:1px solid #e9e9e9;}
select.InputBox,input.InputBox,textarea.InputBox{ border:1px solid #d9d9d9; color:#888888; height:28px; line-height:28px; padding-left:5px; font-size:14px;}
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
@ -864,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;}
@ -905,7 +906,7 @@ img.ui-datepicker-trigger {
margin: 7px;
}
/*消息*/
.homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;}
.homepageNewsTypeNotRead {width:100px; padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;}
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
.calendar_div{border: 1px solid #d9d9d9;}
/*缺陷更新动态在消息中显示样式*/
@ -937,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;
@ -949,7 +947,9 @@ blockquote {
margin-right: 0.4em;
border-radius: 4px;
font-family: "Microsoft YaHei";
background: url('../images/requirements/reference.jpg');
/*background: url('../images/requirements/reference.jpg');*/
background-size: 100% 100%;
margin-bottom:5px;
background-color: #e8e8e8;
}

View File

@ -507,7 +507,7 @@ img.ui-datepicker-trigger {
.wiki_new_ul input{ height:26px; margin-bottom:10px;}
.wiki_con_tit{ font-size:14px; color:#09658c; font-weight:bold;width:630px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; margin-bottom:10px;}
.wiki_con_box{ line-height:1.9; color:#2d2d2d;}
.wiki_page_con{ border-bottom:1px dashed #CCC; margin-bottom:10px; padding-bottom:10px;}
.wiki_page_con{ border-bottom:1px dashed #CCC; margin-bottom:10px; padding-bottom:10px; word-wrap:break-word; word-break:break-all}
.wiki_page p{word-break: break-all;word-wrap: break-word;}
#wiki_new_box{ display:none;}
/*wiki显示附加*/