From 8e2633f8b3ae7a5a0760107ab3eb95d8c7ab7534 Mon Sep 17 00:00:00 2001 From: Antoine D Date: Tue, 18 Jun 2013 16:13:28 +0300 Subject: [PATCH] Improve participants link style in conversation, close #4236 Move it to the right and replace the text by an image with the nice tooltip, modify the test. --- app/assets/images/icons/users.png | Bin 0 -> 497 bytes app/assets/javascripts/inbox.js | 2 ++ app/assets/stylesheets/application.css.sass | 10 +++++++++- app/views/conversations/_conversation.haml | 2 +- features/conversations.feature | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 app/assets/images/icons/users.png diff --git a/app/assets/images/icons/users.png b/app/assets/images/icons/users.png new file mode 100644 index 0000000000000000000000000000000000000000..a6558de9792d85ab80a448c8db15df491becd06d GIT binary patch literal 497 zcmVP000mO1^@s600006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-3A*L8~~K?0`LF;0e(qD zK~y-)rIbHQ12GtfpDVQrE;_ZKb#Zf1>1O>5x)j`;#1CMkS&Ykpc;I~pSLcp8i1p84 zsSZkU)6+??4izd2txFEl^zP_kAdvjtym@}_8;HX{hU@ud;L?&;l@wQ|kd4Wo05*) zPD#-O?jz1Mbu1P#vOCxFi%N=Rpk~N5B}K{g{6)JB_P7IS0Dh6fHhsEqt{j4|98I-|mNeFA234)`_p{edj^fLw0el;(gQ@D>4i$^bhSV89(PGzod4((v;@gdC@*U174F~J}%tKI%c1KG|3U%+(A54Zzt0pr%&g`e&Z n@D5xkDS7}E{jh0fC5@v$!{csX&9wUk00000NkvXXu0mjfh&b3{ literal 0 HcmV?d00001 diff --git a/app/assets/javascripts/inbox.js b/app/assets/javascripts/inbox.js index 60fcafd91..507032aaa 100644 --- a/app/assets/javascripts/inbox.js +++ b/app/assets/javascripts/inbox.js @@ -99,6 +99,8 @@ $(document).ready(function(){ }, trigger: 'manual' }); + + $('.participants_link > span').tooltip({placement: 'bottom'}); $('.participants_link').click(function(e) { e.stopPropagation(); diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass index 262023718..c4eae479c 100644 --- a/app/assets/stylesheets/application.css.sass +++ b/app/assets/stylesheets/application.css.sass @@ -2051,7 +2051,15 @@ ul#press_logos :color $blue .participants_link - :float left + :margin-top 5px + :clear right + :float right + :color #aaa + + .icons-users + :display block + :width 25px + :height 16px .conversation_participants_popover_content :display none diff --git a/app/views/conversations/_conversation.haml b/app/views/conversations/_conversation.haml index 9a165a43e..49d17ccb3 100644 --- a/app/views/conversations/_conversation.haml +++ b/app/views/conversations/_conversation.haml @@ -20,5 +20,5 @@ - if authors[conversation.id].present? = authors[conversation.id].name - = link_to t('.participants'), '#', :class => 'participants_link', :"data-conversation-id" => conversation.id + = link_to content_tag(:span, nil, class: 'icons-users', title: t('.participants')), '#', :class => 'participants_link', "data-conversation-id" => conversation.id = render :partial => 'participants_popover', :locals => { :conversation => conversation } diff --git a/features/conversations.feature b/features/conversations.feature index bf69da0b1..6dd07ef41 100644 --- a/features/conversations.feature +++ b/features/conversations.feature @@ -14,7 +14,7 @@ Feature: private messages Given I send a message with subject "Greetings" and text "hello, alice!" to "Alice Awesome" Then I should see "Greetings" within "#conversation_inbox" And I should see "Greetings" within "#conversation_show" - And I follow "Participants" + And I click on selector "a.participants_link" Then I should see the participants popover And I should see "Alice Awesome" as part of the participants popover And I should see "Robert Grimm" as part of the participants popover