swapped out delete text for 'x' on stream_elements. controls fade in on hover

This commit is contained in:
danielvincent 2011-01-08 15:06:25 -08:00
parent 9cf1f5a023
commit 55fa1646c7
4 changed files with 25 additions and 5 deletions

View file

@ -8,7 +8,7 @@
- reshare_aspects = aspects_without_post(all_aspects, post) - reshare_aspects = aspects_without_post(all_aspects, post)
- unless reshare_aspects.empty? - unless reshare_aspects.empty?
= render 'shared/reshare', :aspects => reshare_aspects, :post => post = 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) = person_image_link(person, :size => :thumb_small)

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

View file

@ -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 // reshare button action
$stream.delegate(".reshare_button", "click", function(evt) { $stream.delegate(".reshare_button", "click", function(evt) {
evt.preventDefault(); evt.preventDefault();

View file

@ -260,8 +260,6 @@ header
.from .from
:text :text
:shadow 0 1px #fff :shadow 0 1px #fff
h4
:display inline
a a
:font :font
:weight bold :weight bold
@ -367,8 +365,15 @@ header
:margin :margin
:right 5px :right 5px
.delete
:opacity 0.6
:padding 5px
&:hover
:opacity 1
&:hover &:hover
div.info, .time, .from h4 div.info, .time, .from h5
a a
:color #107FC9 :color #107FC9
&:hover &:hover
@ -384,7 +389,7 @@ header
:cursor default :cursor default
.right .reshare_pane .reshare_button .right .reshare_pane .reshare_button
:padding 5px :padding 2px
&.active &.active
:background :background
:color #333 :color #333
@ -2038,6 +2043,8 @@ h3,h4
&:hover &:hover
:background :background
:color #bbb :color #bbb
&:active
:top 0px
.stream .stream
.avatar .avatar