diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 87c7d8f54..29e6a4980 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -135,7 +135,7 @@ class UsersController < ApplicationController unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1) @message_alls << mess end - break if @message_alls.length == 5 + break if @message_alls.length == 10 end end end diff --git a/app/models/user.rb b/app/models/user.rb index 258fe2ea5..2db66dc31 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -248,7 +248,7 @@ class User < Principal before_save :update_hashed_password before_destroy :remove_references_before_destroy,:delete_user_ealasticsearch_index # added by fq - after_create :act_as_activity, :add_onclick_time, :act_as_principal_activity,:create_user_ealasticsearch_index + after_create :act_as_activity, :add_onclick_time, :act_as_principal_activity,:create_user_ealasticsearch_index,:add_new_jour # end # 更新邮箱用户或用户名的同事,同步更新邀请信息 after_update :update_invite_list,:update_user_ealasticsearch_index @@ -1145,6 +1145,22 @@ class User < Principal end end + #为新注册用户发送留言 + def add_new_jour + # if Message.where("id=19278").any? and Message.where("id=19291").any? and Message.where("id=19292").any? + # lead_message1 = Message.find(19278) + # notes1 = lead_message1.content + # lead_message2 = Message.find(19292) + # notes2 = lead_message2.content + # lead_message3 = Message.find(19291) + # notes3 = lead_message3.content + # # user_id 默认为课程使者创建 + # self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes1, :reply_id => 0, :status => true, :is_readed => false, :private => 0) + # self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes2, :reply_id => 0, :status => true, :is_readed => false, :private => 0) + # self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes3, :reply_id => 0, :status => true, :is_readed => false, :private => 0) + # end + end + # 更新邮箱的同事,更新invite_lists表中的邮箱信息 def update_invite_list invite_lists = InviteList.where("user_id =?",self.id).all diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 7ba0a23be..d8adece15 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -91,6 +91,8 @@ \ No newline at end of file diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 0354ed467..c78fd430e 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -300,8 +300,8 @@ K.options = { '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.background', '.border','.border-color', '.text-overflow','.overflow','.white-space' ], - a : ['id', 'class', 'href', 'target', 'name'], - embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], + a : ['id', 'class', 'href', 'target', 'name','data-method','data-remote','rel'], + embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], img : ['id', 'class', 'src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'], 'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [ 'id', 'class', 'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background', diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index dcd275d92..6812faf34 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1620,8 +1620,9 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} /*消息弹框*/ .shadowbox_news{ width:305px; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position: absolute; left: -131px; top: 45px; z-index: 9999;} .shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;} +.shadowbox_news_p{ height:40px; line-height:40px; font-size:12px; color:#333;} .shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } -.shadowbox_news_list{ max-height:200px; overflow:hidden;} +.shadowbox_news_list{ max-height:400px; overflow:hidden;} .shadowbox_news_list a{ color:#999;} .shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} .shadowbox_news_list li:hover{ background-color:#eee;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index ff71bf5c4..6c7bde896 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -533,7 +533,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no- .homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;} .newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;} .navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;} -.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:50px; position:relative; display:inline-block;} +.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;} .homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;} .navHomepageProfile ul li ul {display:none;} .navHomepageProfile ul li:hover ul {display:block;} @@ -1155,8 +1155,9 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(.. /*消息弹框*/ .shadowbox_news{ width:305px; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position: absolute; left: -131px; top: 45px; z-index: 9999;} .shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;} -.shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } -.shadowbox_news_list{ max-height:200px; overflow:hidden;} +.shadowbox_news_p{ height:40px; line-height:40px; font-size:12px; color:#333;} +.shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } +.shadowbox_news_list{ max-height:400px; overflow:hidden;} .shadowbox_news_list a{ color:#999;} .shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} .shadowbox_news_list li:hover{ background-color:#eee;}