From 14353bceb681baf20c00e0ed9d1ad99b25987133 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Tue, 29 Oct 2019 19:01:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=81=E4=BF=A1=E7=9A=84=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../private_messages_controller.rb | 73 +++++++--- app/controllers/users_controller.rb | 1 + app/models/user.rb | 7 +- app/views/layouts/base_user_message.html.erb | 24 ++++ .../private_messages/_new_message.html.erb | 18 +-- .../private_messages/_private_box.html.erb | 128 +++++++++--------- .../_right_message_users.html.erb | 37 +++++ .../_user_contact_content.html.erb | 4 +- .../_user_new_feedbacks.html.erb | 8 +- app/views/private_messages/create.js.erb | 6 +- app/views/private_messages/destroy.js.erb | 1 + .../get_recent_users.html.erb | 14 ++ .../get_recent_users.json.jbuilder | 6 - app/views/private_messages/index.html.erb | 11 -- .../message_search_users.html.erb | 19 +++ app/views/private_messages/new.js.erb | 54 ++++++++ .../private_messages_detail.html.erb | 2 - .../private_messages_detail.js.erb | 6 + app/views/users/_user_message_left.html.erb | 3 + config/routes.rb | 2 + public/stylesheets/css/structure.css | 57 +++++++- 21 files changed, 353 insertions(+), 128 deletions(-) create mode 100644 app/views/private_messages/_right_message_users.html.erb create mode 100644 app/views/private_messages/destroy.js.erb create mode 100644 app/views/private_messages/get_recent_users.html.erb delete mode 100644 app/views/private_messages/get_recent_users.json.jbuilder create mode 100644 app/views/private_messages/message_search_users.html.erb diff --git a/app/controllers/private_messages_controller.rb b/app/controllers/private_messages_controller.rb index 6a8ac1e3a..97f5db79f 100644 --- a/app/controllers/private_messages_controller.rb +++ b/app/controllers/private_messages_controller.rb @@ -6,14 +6,25 @@ class PrivateMessagesController < ApplicationController def index #用户更新私信为全部已读 + if User.current == @user || User.current.admin? + @onclick_time = User.current.onclick_time.onclick_time + User.current.onclick_time.update_attribute(:onclick_time, Time.now) + jours = PrivateMessage.find_by_sql("SELECT ui.* FROM (SELECT * FROM private_messages WHERE STATUS != 2 AND user_id = #{@user.id} ORDER BY id DESC) ui GROUP BY ui.target_id ORDER BY ui.send_time DESC") + + @unred_all_messages = 0 + @unred_private_messages = @user.unread_private_messages + # jours = PrivateMessage.without_deleted.where("user_id = ?", @user.id).order("created_at desc") + @limit = 20 + @jours_count = jours.count + @jours_all_pages = Paginator.new @jours_count, @limit, params['page'] || 1 + @offset ||= @jours_all_pages.offset + @jours_alls = paginateHelper jours, @limit + render :layout=>'base_user_message' + else + render_403 + end + - jours = PrivateMessage.without_deleted.where("user_id = ?", @user.id).order("created_at desc") - @limit = 20 - @jours_count = jours.count - @jours_all_pages = Paginator.new @jours_count, @limit, params['page'] || 1 - @offset ||= @jours_all_pages.offset - @jours_alls = paginateHelper jours, @limit - render :layout=>'base_user_message' end def new @@ -53,7 +64,7 @@ class PrivateMessagesController < ApplicationController respond_to do |format| format.js format.html{ - redirect_to user_private_message_path(current_user,@sender_message.id) + redirect_to private_messages_detail_user_private_messages_path(@user, target_ids: user_id) } end else @@ -66,29 +77,47 @@ class PrivateMessagesController < ApplicationController end end - def show - @jour_messages = @user.journals_for_messages.where(m_parent_id: @jour.id) - - render :layout=>'base_user_message' - end - def private_messages_detail - @user_message_details = @user.private_messages.where(target_id: params[:target_ids]) - @contact_user = User.find_by_id(params[:target_ids]) - render :layout=>'base_user_message' + if User.current == @user || User.current.admin? + @unred_private_messages = 0 + @unred_all_messages = 0 + @target_user = User.where(:id => params[:target_ids]).includes(:user_extensions).first + if @target_user.present? + target_user_messages = @user.private_messages.where(:target_id => params[:target_ids], :status => [0, 1]) + @message_list = target_user_messages.order("send_time asc") + target_user_messages.where(status: 0).update_all(status: 1) + @onclick_time = User.current.onclick_time.onclick_time + User.current.onclick_time.update_attribute(:onclick_time, Time.now) + @all_users = params[:all_user] || "0" + user_message_details = PrivateMessage.find_by_sql("SELECT ui.* FROM (SELECT * FROM private_messages WHERE STATUS != 2 AND user_id = #{@user.id} ORDER BY id DESC) ui GROUP BY ui.target_id ORDER BY ui.send_time DESC") + user_message_details_count = user_message_details.size + if user_message_details_count > 10 && @all_users == "0" + user_message_details = user_message_details.first(10) + end + @user_message_details = user_message_details + render :layout=>'base_user_message' + else + render_404 + end + else + render_403 + end end def destroy - + @message.update_attribute(:status, 2) end def get_recent_users - @recent_users = @user.recent_contacts.without_deleted.distinct.order("created_at desc").limit(10).includes(:user_extension) + @recent_users = User.where(:id => @user.private_messages.without_deleted.order("created_at desc").map(&:target_id)).includes(:user_extensions).limit(10) + render "get_recent_users", layout: false end - def search_users - all_search_users = User.where("LOWER(concat(lastname, ifnull(firstname, ''), login)) LIKE ?", "#{params[:user_name].strip.to_s.downcase}") + def message_search_users + @search_users = User.where("id != #{@user.id} and LOWER(concat(lastname, firstname)) LIKE '%#{params[:receiver_name].strip.to_s.downcase}%'").includes(:user_extensions) + # @search_users = User.where("LOWER(concat(lastname, ifnull(firstname, ''), login)) LIKE ?", "#{params[:receiver_name].strip.to_s.downcase}") + render "message_search_users", layout: false end @@ -99,7 +128,7 @@ class PrivateMessagesController < ApplicationController end def set_message - @jour = JournalsForMessage.find_by_id(params[:id]) + @message = PrivateMessage.find_by_id(params[:id]) end def set_type_and_count diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 49d47b441..1237be7bc 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -517,6 +517,7 @@ class UsersController < ApplicationController @message_alls = user_all_messages.where(message_type: %w(SystemMessage ContestMessage OrgMessage)) end @unred_all_messages = @user.count_new_message(@msg_type) + @unred_private_messages = 0 @message_alls = @message_alls.order("created_at desc") #点击进入tab后,全部更新为已读,全部页面除外 diff --git a/app/models/user.rb b/app/models/user.rb index 53208c515..9cc47f3f1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -354,7 +354,7 @@ class User < Principal end def get_user_contact_messages(user_id) - private_messages.where(user_id: user_id).size + private_messages.where(target_id: user_id).size end #判断是否可以点击项目或issue @@ -512,6 +512,11 @@ class User < Principal messages_count = course_count + contest_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count + applied_count + blog_message_count end + #未读私信数量 + def unread_private_messages + private_messages.where(status: 0).size + end + # 查询指派给我的缺陷记录 def issue_status_update self.status_updates diff --git a/app/views/layouts/base_user_message.html.erb b/app/views/layouts/base_user_message.html.erb index 1cfc28803..76edbe39d 100644 --- a/app/views/layouts/base_user_message.html.erb +++ b/app/views/layouts/base_user_message.html.erb @@ -5,6 +5,16 @@ <%= h html_title %> + <%#= csrf_meta_tag %> + <%#= favicon %> + <%#= javascript_heads %> + <%#= heads_for_theme %> + <%#= call_hook :view_layouts_base_html_head %> + <%#= stylesheet_link_tag 'css/common','css/structure', 'css/public', 'css/courses','prettify', 'css/org', 'css/syllabus'%> + <%#= javascript_include_tag "course","header",'prettify','contest' %> + + <%#= yield :header_tags -%> + <%= csrf_meta_tag %> <%= favicon %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','css/syllabus','css/moduel', 'css/user', 'css/font-awesome.css','css/iconfont/iconfont', :media => 'all' %> @@ -13,6 +23,10 @@ <%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%> <%= heads_for_theme %> <%= call_hook :view_layouts_base_html_head %> + + <%= content_for(:header_tags) do %> + <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> + <% end %> <%= yield :header_tags -%> @@ -26,6 +40,7 @@
+ <%= render_flash_messages %>
@@ -41,5 +56,14 @@
+ \ No newline at end of file diff --git a/app/views/private_messages/_new_message.html.erb b/app/views/private_messages/_new_message.html.erb index b0a92eedc..34be1bc04 100644 --- a/app/views/private_messages/_new_message.html.erb +++ b/app/views/private_messages/_new_message.html.erb @@ -12,24 +12,14 @@
- <%= m.text_field :receiver_id, class: "ant-input",placeholder: "发送给" %> - + + <%= m.hidden_field :receiver_id %> +
-
diff --git a/app/views/private_messages/_private_box.html.erb b/app/views/private_messages/_private_box.html.erb index 672d3e93a..6e0d19d28 100644 --- a/app/views/private_messages/_private_box.html.erb +++ b/app/views/private_messages/_private_box.html.erb @@ -1,80 +1,80 @@ -
-
+<%= content_for(:header_tags) do %> + <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> +<% end %> +
+

<%= link_to "".html_safe,user_private_messages_path(@user),remote: true %> - <%= @contact_user.try(:show_name) %>与你的私信 + <%= @target_user.try(:show_name) %>与你的私信

- <% if @user_message_details.size > 0 %> - <% @user_message_details.chunk { |c| format_date(c.created_at).to_date }.each do |day, jour| %> +
+ <% if @message_list.size > 0 %>
-

<%= day %>

- <% jour.each do |j| %> - <% if j.sender_id == current_user.id %> -
- <%= link_to image_tag(url_to_avatar(j.sender), class: "r_list_img"), user_path(j.sender), :alt => "用户头像", class: "mr10 radius fl", target: "_blank" %> -
- -
- <%= j.content %> -
-
- <%= link_to "删除", user_private_message_path(j.sender, j.id), remote: true, data: {confirm: "确认删除吗?"} %> + <% @message_list.chunk { |c| format_date(c.created_at).to_date }.each do |day, jour| %> + +

<%= day %>

+ <% jour.each do |j| %> + <% if j.sender_id == @user.id %> +
+ <%= link_to image_tag(url_to_avatar(@user), class: "img-50 mr10"), user_path(@user), :alt => "用户头像", class: "fl", target: "_blank" %> +
+ +
+ <%= j.content.html_safe %> +
+
+ <%= link_to "删除", user_private_message_path(@user, j.id),method: :delete, remote: true, data: {confirm: "确认删除吗?"} %> +
+ <%= j.created_at.strftime("%H:%M") %>
- <%= j.created_at.strftime("%H:%M") %> -
- <% else %> -
- <%= link_to image_tag(url_to_avatar(j.receiver), class: "r_list_img"), user_path(j.receiver), :alt => "用户头像", class: "mr10 radius fl", target: "_blank" %> -
- -
- <%= j.content %> -
-
- <%= link_to "删除", user_private_message_path(j.receiver, j.id), remote: true, data: {confirm: "确认删除吗?"} %> + <% else %> +
+ <%= link_to image_tag(url_to_avatar(j.sender), class: "img-50 ml10"), user_path(j.sender), :alt => "用户头像", class: "fr", target: "_blank" %> +
+ +
+ <%= j.content.html_safe %> +
+
+ <%= link_to "删除", user_private_message_path(j.sender, j.id),method: :delete, remote: true, data: {confirm: "确认删除吗?"} %> +
+ <%= j.created_at.strftime("%H:%M") %>
- <%= j.created_at.strftime("%H:%M") %> -
+ <% end %> <% end %> <% end %>
- <% end %> - <% else %> - <%= render partial: "projects/no_data" %> - <% end %> - <%= form_for [current_user, PrivateMessage.new], remote: true do |f| %> - <%= f.hidden_field :receiver_id,value: @contact_user.id, class: "ant-input",placeholder: "发送给" %> -
-
- <%= f.text_area :content, class: "writeLetter_text greyInput" %> -
-

- 在问题反馈时,请同时发送问题发生页的网址链接,以便我们高效的为您服务 - <%= f.submit "回复", class: "fr task-btn task-btn-orange", data: {"disabled-with": "回复中..."} %> -

-
- <% end %> + <% else %> + <%= render partial: "projects/no_data" %> -
-
-

私信列表

-
-
- -
-

- - 陈晓婷 - - 2小时前 -

-

- jhgjkhjkh + <% end %> + <%= form_for [@user, PrivateMessage.new], remote: true do |f| %> + <%= f.hidden_field :receiver_id,value: @target_user.id, class: "ant-input",placeholder: "发送给" %> +

+
+ <%= f.kindeditor :content,:width=>'100%', :editor_id => "new_private_message",:resizeType => 0,:height => 200 %> +
+

+ 在问题反馈时,请同时发送问题发生页的网址链接,以便我们高效的为您服务 + <%= f.submit "回复", class: "fr task-btn task-btn-orange", data: {'disabled-with': "回复中..."} %>

-
+ <% end %>
-
\ No newline at end of file +
+ <%= render partial: "private_messages/right_message_users" %> +
+
+ + + \ No newline at end of file diff --git a/app/views/private_messages/_right_message_users.html.erb b/app/views/private_messages/_right_message_users.html.erb new file mode 100644 index 000000000..7fe4f3bba --- /dev/null +++ b/app/views/private_messages/_right_message_users.html.erb @@ -0,0 +1,37 @@ +
+

私信列表

+ +
+ <% @user_message_details.each_with_index do |message, index| %> +
+ <%= link_to image_tag(url_to_avatar(message.target), class: "r_list_img"), user_path(message.target), :alt => "用户头像", target: "_blank" %> +
+

+ + <%= message.target.try(:show_name) %> + + <%= time_from_now(message.send_time) %> +

+

+ <%= message_content(message.content.html_safe) %> +

+
+
+ <% if index == 9 && @all_users == "0" %> +
+ <%= link_to "加载全部",private_messages_detail_user_private_messages_path(@user, target_ids: message.target_id, all_user: "1"), remote: true %> +
+ <% end %> + <% end %> + + + +
+
+ + \ No newline at end of file diff --git a/app/views/private_messages/_user_contact_content.html.erb b/app/views/private_messages/_user_contact_content.html.erb index 80c268a55..33c39a4a6 100644 --- a/app/views/private_messages/_user_contact_content.html.erb +++ b/app/views/private_messages/_user_contact_content.html.erb @@ -4,10 +4,10 @@
- <%= j.content %> + <%= j.content.html_safe %>
- <%= link_to "删除", user_private_message_path(j.target, j.id), remote: true, data: {confirm: "确认删除吗?"} %> + <%= link_to "删除", user_private_message_path(j.target, j.id),method: :delete, remote: true, data: {confirm: "确认删除吗?"} %>
<%= j.created_at.strftime("%H:%M") %> diff --git a/app/views/private_messages/_user_new_feedbacks.html.erb b/app/views/private_messages/_user_new_feedbacks.html.erb index 6f0bbf308..13e6ff365 100644 --- a/app/views/private_messages/_user_new_feedbacks.html.erb +++ b/app/views/private_messages/_user_new_feedbacks.html.erb @@ -1,21 +1,21 @@

全部私信 - <%= link_to "写私信", new_user_private_message_path(current_user), remote: true, class: "c-blue fr" %> + <%= link_to "写私信", new_user_private_message_path(@user), remote: true, class: "c-blue fr" %>

<% if @jours_count > 0 %> <% @jours_alls.each do |jour| %> -
+
<%= link_to image_tag(url_to_avatar(jour.target), class: "r_list_img"), user_path(jour.target), :alt => "用户头像", class: "fl mr10 private_message_a", target: "_blank" %>

<%= link_to jour.target.try(:show_name), user_path(jour.target) %> 与你的私信 - [<%= (jour.target.get_user_contact_messages(jour.user_id) + 1) %>条] + [<%= (@user.get_user_contact_messages(jour.target_id) + 1) %>条] <%= time_from_now(jour.updated_at) %>

- <%= jour.content.html_safe %> + <%= message_content(jour.content.html_safe) %>
diff --git a/app/views/private_messages/create.js.erb b/app/views/private_messages/create.js.erb index ef2f7ab5e..495a1b31a 100644 --- a/app/views/private_messages/create.js.erb +++ b/app/views/private_messages/create.js.erb @@ -1 +1,5 @@ -$("#contact-messages-<%= current_user.try(:login) %>").append("<%= j render partial: "private_messages/user_contact_content", locals: {j: @sender_message} %>") \ No newline at end of file +$("#contact-messages-<%= current_user.try(:login) %>").append("<%= j render partial: "private_messages/user_contact_content", locals: {j: @sender_message} %>") +$('#contact-messages-<%= @user.try(:login) %>').animate({ + scrollTop: $('#contact-messages-<%= @user.try(:login) %>')[0].scrollHeight + }, + 260); diff --git a/app/views/private_messages/destroy.js.erb b/app/views/private_messages/destroy.js.erb new file mode 100644 index 000000000..673d6157f --- /dev/null +++ b/app/views/private_messages/destroy.js.erb @@ -0,0 +1 @@ +$("#message_content_<%= @message.id %>").remove() \ No newline at end of file diff --git a/app/views/private_messages/get_recent_users.html.erb b/app/views/private_messages/get_recent_users.html.erb new file mode 100644 index 000000000..2dd64cb12 --- /dev/null +++ b/app/views/private_messages/get_recent_users.html.erb @@ -0,0 +1,14 @@ +<% if @recent_users.present? %> +
+
+

最近联系人

+ <% @recent_users.each do |user| %> +

+ <%= image_tag(url_to_avatar(user), class: "radius fl mr10 myimgw48 myimgh48") %> + <%= user.try(:show_name) %> +

+ <% end %> +
+
+<% end %> + diff --git a/app/views/private_messages/get_recent_users.json.jbuilder b/app/views/private_messages/get_recent_users.json.jbuilder deleted file mode 100644 index 34e845e10..000000000 --- a/app/views/private_messages/get_recent_users.json.jbuilder +++ /dev/null @@ -1,6 +0,0 @@ -json.array @recent_users.each.to_a do |a| - json.user_id a.id - json.user_login a.login - json.user_name a.try(:show_name) - json.image_url url_to_avatar(a) -end \ No newline at end of file diff --git a/app/views/private_messages/index.html.erb b/app/views/private_messages/index.html.erb index a81da5b0f..8d6984dc4 100644 --- a/app/views/private_messages/index.html.erb +++ b/app/views/private_messages/index.html.erb @@ -1,14 +1,3 @@
<%= render partial: "private_messages/user_new_feedbacks" %>
- - \ No newline at end of file diff --git a/app/views/private_messages/message_search_users.html.erb b/app/views/private_messages/message_search_users.html.erb new file mode 100644 index 000000000..09f78bc69 --- /dev/null +++ b/app/views/private_messages/message_search_users.html.erb @@ -0,0 +1,19 @@ +<% if @search_users.present? %> +
+
+

最近联系人

+ <% @search_users.each do |user| %> +

+ <%= image_tag(url_to_avatar(user), class: "radius fl mr10 myimgw48 myimgh48") %> + <%= user.try(:show_name) %> +

+ <% end %> +
+
+ <% else %> +
+
+

用户不存在

+
+
+<% end %> \ No newline at end of file diff --git a/app/views/private_messages/new.js.erb b/app/views/private_messages/new.js.erb index f69e0ffae..afb738078 100644 --- a/app/views/private_messages/new.js.erb +++ b/app/views/private_messages/new.js.erb @@ -1,2 +1,56 @@ var htmlvalue = "<%= escape_javascript(render :partial => 'private_messages/new_message') %>"; pop_box_new(htmlvalue,460,316); + +var recent_users = $("#recent-contact-users-<%= @user.try(:login) %>") +var search_name = $("input[name='receiver_name']") +$("#private_message_receiver_name").on("focus",function () { + $.ajax({ + type: "get", + url: '<%= get_recent_users_user_private_messages_path(@user) %>', + success: function (data) { + if(data.length > 0){ + recent_users.show().html(data) + } + } + }) +}) + +recent_users.on("click", ".recently_item",function () { + var reciver_id = $(this).attr("data-id"); + var reviver_name = $(this).find(".recently_name").text() + $("input[name='private_message[receiver_id]']").val(reciver_id) + search_name.val(reviver_name) + recent_users.html("") +}) + +$("#search-recent-user-<%= @user.try(:login) %>").on("click",function () { + var search_name_val = search_name.val(); + search_users(search_name_val) +}) + + + + +search_name.on("keydown",function (e) { + if(e.keyCode == 13){ + search_users($(this).val()) + e.preventDefault(); + } +}) + +function search_users(search_name_val){ + $.ajax({ + type: "get", + url: '<%= message_search_users_user_private_messages_path(@user) %>', + data: {receiver_name: search_name_val}, + success: function (data) { + if(data.length > 0){ + recent_users.show().html(data) + } + } + }) +} + + + + diff --git a/app/views/private_messages/private_messages_detail.html.erb b/app/views/private_messages/private_messages_detail.html.erb index f3157f13c..cf0d1ed65 100644 --- a/app/views/private_messages/private_messages_detail.html.erb +++ b/app/views/private_messages/private_messages_detail.html.erb @@ -1,5 +1,3 @@ - -
<%= render partial: "private_messages/private_box" %>
\ No newline at end of file diff --git a/app/views/private_messages/private_messages_detail.js.erb b/app/views/private_messages/private_messages_detail.js.erb index b489ee63b..e05ee4770 100644 --- a/app/views/private_messages/private_messages_detail.js.erb +++ b/app/views/private_messages/private_messages_detail.js.erb @@ -1 +1,7 @@ + +<% if params[:all_user] == "1" %> +$("#right-user-messages-<%= @user.try(:login) %>").html("<%= j render partial: "private_messages/right_message_users" %>") +<% else %> $("#user-messages-<%= current_user.try(:login) %>").html("<%= j render partial: "private_messages/private_box" %>") + +<% end %> diff --git a/app/views/users/_user_message_left.html.erb b/app/views/users/_user_message_left.html.erb index 806140d7e..a6af672da 100644 --- a/app/views/users/_user_message_left.html.erb +++ b/app/views/users/_user_message_left.html.erb @@ -23,6 +23,9 @@
  • "> <%= link_to "私信", user_private_messages_path(current_user), class: "ml30 width100" %> + <% if @unred_private_messages > 0 %> + <%= @unred_private_messages %> + <% end %>
  • diff --git a/config/routes.rb b/config/routes.rb index 2565c3595..2f8cd9319 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -710,6 +710,8 @@ RedmineApp::Application.routes.draw do resources :private_messages do collection do get "private_messages_detail" + get "get_recent_users" + get "message_search_users" end end collection do diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index d99794eb9..3e00b1674 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -615,9 +615,13 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex border-radius: 6px; text-align: justify; } +.just_center{justify-content: center;} .OtherSide, .ThisSide { margin-top: 30px; } +.sms img{ + max-width: 100%; +} .task-btn-orange { background: #4CACFF!important; color: #fff!important; @@ -650,6 +654,10 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex font-size: 14px; } .part-line:hover { + cursor: pointer; + background-color: #F5F5F5; +} +.part-line.active{ background-color: #F5F5F5; } .private-part:last-child .part-line { @@ -987,6 +995,11 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex border-radius: 50%; margin-right:18px; } +.img-50{ + width: 50px; + height: 50px; + border-radius: 50%; +} .pagePanel_right li:last-child{ border:none; } @@ -1279,6 +1292,7 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex padding-right: 30px; } .ant-input-suffix{ + cursor: pointer; position: absolute; top: 50%; z-index: 2; @@ -1291,7 +1305,8 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%); - right: 12px; + right: 0; + padding: 8px 10px; background: transparent!important; } .writeLetter_Info { @@ -1318,4 +1333,44 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex bottom: 1px; color: #999999; right: 10px; +} +.recently_person{ + position: absolute; + width: 100%; + top: 35px; + max-height: 300px; + overflow-y: auto; + border-radius: 4px; + box-shadow: 0px 1px 6px rgba(76,76,76,0.2); + left: 0px; + z-index: 1; + background-color: #fff; + cursor: pointer; +} +.ant-spin-nested-loading{ + position: relative; +} +.ant-spin-container{ + position: relative; + -webkit-transition: opacity .3s; + -o-transition: opacity .3s; + transition: opacity .3s; +} +.padding10-20{ + padding: 10px 20px; + box-sizing: border-box; +} +.cdefault { + cursor: default; +} +.recently_item { + padding: 10px 20px; +} +.recently_name { + float: left; + line-height: 48px; + display: block; +} +.color-grey-9 { + color: #999999!important; } \ No newline at end of file