Commit 37133fc900834128659cdc1dd678bd2d105744b7

Authored by Larissa Reis
1 parent 7bf7fff2

Fixes the mouseover appearence of remove button in comments

  I chose to use CSS hover instead of javascript to fix this, mainly
  because it's an style thing too simple to use javascript in my opinion.

  I also removed an javascript used to hide/show the remove/comment
  button in activity items. That script wasn't working, I fixed it but
  it felt like too much stuff showing up in the user's face when
  hovering the mouse, so I removed it altogether.

(ActionItem2463)
app/views/content_viewer/view_page.rhtml
... ... @@ -87,12 +87,6 @@
87 87  
88 88 <% if @page.accept_comments? %>
89 89 <div id="page-comment-form"><%= render :partial => 'comment_form' %></div>
90   - <script type="text/javascript">
91   - jQuery( function() {
92   - jQuery('.article-comment').live('mouseover', function() { jQuery(this).find('.icon-delete:first').show(); });
93   - jQuery('.article-comment').live('mouseout', function() { jQuery(this).find('.icon-delete').hide(); });
94   - });
95   - </script>
96 90 <% end %>
97 91 </div><!-- end class="comments" -->
98 92  
... ...
app/views/profile/_common.rhtml
1   -
2   -<script type="text/javascript">
3   - jQuery( function() {
4   - var parent_selector = '.profile-wall-description, .profile-activity-description, .profile-network-description';
5   - var child_selector = '.icon-delete, .icon-reply';
6   - jQuery(parent_selector).live('mouseover', function () { jQuery(this).find(child_selector).css('visibility', 'visible'); });
7   - jQuery(parent_selector).live('mouseout', function () { jQuery(this).find(child_selector).css('visibility', 'hidden'); });
8   - });
9   -</script>
10   -
11 1 <% unless @action %>
12 2 <% cache_timeout(profile.cache_key + '-profile-general-info', 4.hours) do %>
13 3 <tr>
... ...
public/stylesheets/application.css
... ... @@ -1067,6 +1067,9 @@ a.comment-picture {
1067 1067 #content .comments .comment-balloon a.button.icon-delete {
1068 1068 display: none;
1069 1069 }
  1070 +#content .comments .comment-balloon:hover a.button.icon-delete {
  1071 + display: inline;
  1072 +}
1070 1073 .msie7 .article-comments-list .comment-balloon {
1071 1074 margin-top: -15px;
1072 1075 }
... ... @@ -5179,8 +5182,8 @@ li.profile-activity-item.upload_image .activity-gallery-images-count-1 img {
5179 5182 display: none;
5180 5183 }
5181 5184  
5182   -#profile-wall .profile-wall-activities-comments .article-comment:hover .button-bar,
5183   -#profile-network .profile-wall-activities-comments .article-comment:hover .button-bar {
  5185 +#profile-wall .profile-wall-activities-comments .comment-content:hover .button-bar,
  5186 +#profile-network .profile-wall-activities-comments .comment-content:hover .button-bar {
5184 5187 display: block;
5185 5188 }
5186 5189  
... ...