diff --git a/app/views/shared/_stream_element.haml b/app/views/shared/_stream_element.haml index b288b378c..2a8f059f5 100644 --- a/app/views/shared/_stream_element.haml +++ b/app/views/shared/_stream_element.haml @@ -8,7 +8,7 @@ - reshare_aspects = aspects_without_post(all_aspects, post) - unless reshare_aspects.empty? = render 'shared/reshare', :aspects => reshare_aspects, :post => post - = link_to t('delete'), status_message_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete" + = link_to image_tag('deletelabel.png'), status_message_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete", :title => t('delete') = person_image_link(person, :size => :thumb_small) diff --git a/public/images/deletelabel.png b/public/images/deletelabel.png new file mode 100644 index 000000000..768ed6608 Binary files /dev/null and b/public/images/deletelabel.png differ diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index fd945b564..47e9e171c 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -49,6 +49,19 @@ var Stream = { } }); + // fade in controls + $stream.delegate(".stream_element", "mouseenter", function(evt) { + var element = $(this), + controls = element.find('.controls'); + controls.fadeIn(100); + }); + $stream.delegate(".stream_element", "mouseleave", function(evt) { + var element = $(this), + controls = element.find('.controls'); + controls.show() + .fadeOut(100); + }); + // reshare button action $stream.delegate(".reshare_button", "click", function(evt) { evt.preventDefault(); diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 158d46650..290386158 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -260,8 +260,6 @@ header .from :text :shadow 0 1px #fff - h4 - :display inline a :font :weight bold @@ -367,8 +365,15 @@ header :margin :right 5px + .delete + :opacity 0.6 + :padding 5px + + &:hover + :opacity 1 + &:hover - div.info, .time, .from h4 + div.info, .time, .from h5 a :color #107FC9 &:hover @@ -384,7 +389,7 @@ header :cursor default .right .reshare_pane .reshare_button - :padding 5px + :padding 2px &.active :background :color #333 @@ -2038,6 +2043,8 @@ h3,h4 &:hover :background :color #bbb + &:active + :top 0px .stream .avatar