fix a bunch of small css related media box issues [ci skip]

This commit is contained in:
danielgrippi 2012-02-10 14:30:21 -08:00 committed by Maxwell Salzberg
parent f01dcb1354
commit 011f70a9f4
13 changed files with 101 additions and 94 deletions

View file

@ -3,7 +3,7 @@
# the COPYRIGHT file. # the COPYRIGHT file.
class NotificationsController < ApplicationController class NotificationsController < ApplicationController
include NotificationsHelper before_filter :authenticate_user!
def update def update
note = Notification.where(:recipient_id => current_user.id, :id => params[:id]).first note = Notification.where(:recipient_id => current_user.id, :id => params[:id]).first

View file

@ -65,7 +65,7 @@ class StreamsController < ApplicationController
respond_with do |format| respond_with do |format|
format.html { render 'layouts/main_stream' } format.html { render 'layouts/main_stream' }
format.mobile { render 'layouts/main_stream' } format.mobile { render 'layouts/main_stream' }
format.json { render_for_api :backbone, :json => @stream.stream_posts, :root => :posts } format.json {render_for_api :backbone, :json => @stream.stream_posts, :root => :posts }
end end
end end

View file

@ -0,0 +1,20 @@
module ContactsHelper
def contact_aspect_dropdown(contact)
if @aspect
link_to(image_tag('/images/icons/monotone_close_exit_delete.png', :height => 20, :width => 20),
{:controller => "aspect_memberships",
:action => 'destroy',
:id => 42,
:aspect_id => @aspect.id,
:person_id => contact.person.id
},
:title => t('.remove_person_from_aspect', :person_name => contact.person.first_name, :aspect_name => @aspect.name),
:method => 'delete')
else
render :partial => 'people/relationship_action',
:locals => { :person => contact.person, :contact => contact,
:current_user => current_user }
end
end
end

View file

@ -30,26 +30,16 @@
- if @contacts.size > 0 - if @contacts.size > 0
- for contact in @contacts - for contact in @contacts
.stream_element{:id => contact.person.id} .stream_element{:id => contact.person.id}
.right
- if @aspect
= link_to(image_tag('/images/icons/monotone_close_exit_delete.png', :height => 20, :width => 20),
{:controller => "aspect_memberships",
:action => 'destroy',
:id => 42,
:aspect_id => @aspect.id,
:person_id => contact.person.id},
:title => t('.remove_person_from_aspect', :person_name => contact.person.first_name, :aspect_name => @aspect.name),
:method => 'delete')
- else .float-right
= render :partial => 'people/relationship_action', = thing(contact)
:locals => { :person => contact.person, :contact => contact,
:current_user => current_user }
.media
.img
= person_image_link(contact.person) = person_image_link(contact.person)
.content
%span.from .bd
=person_link(contact.person) = person_link(contact.person)
.info .info
= contact.person.diaspora_handle = contact.person.diaspora_handle

View file

@ -4,8 +4,11 @@
%a.conversation{:href => conversation_path(conversation)} %a.conversation{:href => conversation_path(conversation)}
.stream_element.conversation{:data=>{:guid=>conversation.id}, :class => ('unread' if unread_counts[conversation.id].to_i > 0)} .stream_element.conversation{:data=>{:guid=>conversation.id}, :class => ('unread' if unread_counts[conversation.id].to_i > 0)}
.media
.img
= person_image_tag(conversation.author) = person_image_tag(conversation.author)
.bg
.subject .subject
.message_count .message_count
= conversation.messages.size = conversation.messages.size

View file

@ -23,10 +23,11 @@
= render :partial => 'messages/message', :collection => conversation.messages = render :partial => 'messages/message', :collection => conversation.messages
.stream_element.new_message .stream_element.new_message
.media
.img
= owner_image_tag(:thumb_small) = owner_image_tag(:thumb_small)
.content .bd
= form_for [conversation, Message.new] do |message| = form_for [conversation, Message.new] do |message|
= message.text_area :text, :rows => 5, :tabindex => 1 = message.text_area :text, :rows => 5, :tabindex => 1
.left
= message.submit t('.reply').capitalize, :disable_with => t('.replying'), :class => 'button creation', :tabindex => 2 = message.submit t('.reply').capitalize, :disable_with => t('.replying'), :class => 'button creation', :tabindex => 2

View file

@ -48,9 +48,8 @@
fade-in 0.2s ease-in; fade-in 0.2s ease-in;
-moz-animation: spin 1s infinite ease-in-out, -moz-animation: spin 1s infinite ease-in-out,
fade-in 0.2s ease-in; fade-in 0.2s ease-in;
}
/ Social Media Icons are by Paul Robert Lloyd @ http://paulrobertlloyd.com/2009/06/social_media_icons }
/ bootstrap/blueprint switch / bootstrap/blueprint switch
- if @aspect == :getting_started || @page == :logged_out - if @aspect == :getting_started || @page == :logged_out

View file

@ -3,14 +3,13 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
.stream_element{:data=>{:guid=>message.id}} .stream_element{:data=>{:guid=>message.id}}
.media
.img
= person_image_link(message.author, :size => :thumb_small) = person_image_link(message.author, :size => :thumb_small)
.bd
.content = person_link(message.author, :class => 'author from')
.from
= person_link(message.author, :class => 'author')
%time.timeago{:datetime => message.created_at} %time.timeago{:datetime => message.created_at}
= how_long_ago(message) = how_long_ago(message)
%div{ :class => direction_for(message.text) } %div{ :class => direction_for(message.text) }
= markdownify(message, :oembed => true) = markdownify(message, :oembed => true)

View file

@ -19,16 +19,17 @@
- notes.each do |note| - notes.each do |note|
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"} .stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"}
- if note.type == "Notifications::StartedSharing" && contact = current_user.contact_for(note.effective_target) - if note.type == "Notifications::StartedSharing" && contact = current_user.contact_for(note.effective_target)
.right .float-right
= aspect_membership_dropdown(contact, note.effective_target, 'left') = aspect_membership_dropdown(contact, note.effective_target, 'left')
%span.from .media
.bd
= notification_message_for(note) = notification_message_for(note)
%br %div
%time= timeago(note.created_at) %time
%a{:class => 'unread-setter'} = timeago(note.created_at)
mark unread = link_to "Mark unread", "#", :class => "unread-setter"
.span-13.last
= will_paginate @notifications = will_paginate @notifications
:javascript :javascript

View file

@ -1,13 +1,11 @@
.people_stream .people_stream
- for person in people - people.each do |person|
.stream_element{:id => person.id} .stream_element{:id => person.id}
.media
.img
= person_image_link(person) = person_image_link(person)
- if current_user .bg
- contact = current_user.contacts.find_by_person_id(person.id)
- contact ||= Contact.new(:person => person)
.content
%span.from %span.from
=person_link(person, :class => "hovercardable") = person_link(person, :class => "hovercardable")
= will_paginate people, :inner_window => 3, :params => {:controller => 'people', :action => 'tag_index'} = will_paginate people, :inner_window => 3, :params => {:controller => 'people', :action => 'tag_index'}

View file

@ -3,11 +3,12 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
.stream_element{:id => person.id} .stream_element{:id => person.id}
.media
%div{:style => "float:right;margin-top:2px;"} %div{:style => "float:right;margin-top:2px;"}
= render :partial => 'people/relationship_action', = render :partial => 'people/relationship_action',
:locals => { :person => person, :contact => contact, :locals => { :person => person, :contact => contact,
:current_user => current_user } :current_user => current_user }
.media
.img .img
= person_image_link(person) = person_image_link(person)

View file

@ -54,7 +54,7 @@
} }
this.unreadClick = function() { this.unreadClick = function() {
$.ajax({ $.ajax({
url: "/notifications/" + $(this).parent().data("guid"), url: "/notifications/" + $(this).closest(".stream_element").data("guid"),
data: { set_unread: true }, data: { set_unread: true },
type: "PUT", type: "PUT",
success: self.clickSuccess success: self.clickSuccess

View file

@ -19,7 +19,7 @@
.media .img img .media .img img
:display block :display block
.media .imgExt .media .imgEt
:float right :float right
:margin-left 10px :margin-left 10px
/* ====== ----- ====== */ /* ====== ----- ====== */
@ -402,11 +402,6 @@ ul.as-selections
:margin :margin
:bottom 10px :bottom 10px
#conversation_inbox a
&:hover
:text
:decoration none
.stream_element .stream_element
a.author a.author
:font-weight bold :font-weight bold
@ -607,6 +602,8 @@ form.new_comment
:padding 8px 0 :padding 8px 0
:text-align center :text-align center
:width 100% :width 100%
img
:border none
#photo_container #photo_container
:text :text
@ -1626,14 +1623,8 @@ ul#press_logos
.notifications_for_day .notifications_for_day
.stream_element .stream_element
:margin
:bottom 0.3em
:padding 0.2em 0.5em :padding 0.2em 0.5em
:width 500px :width 500px
@include border-radius(5px)
&:hover
:background-color #EFEFEF
.day_group .day_group
:min-height 100px :min-height 100px
@ -1878,8 +1869,7 @@ ul#press_logos
:top 9px :top 9px
.stream_element.conversation .stream_element.conversation
:padding 10px :padding 8px
:min-height 0px
.message_count .message_count
@include border-radius(5px) @include border-radius(5px)
@ -1960,6 +1950,10 @@ ul#press_logos
:overflow-y auto :overflow-y auto
:overflow-x none :overflow-x none
a:hover
:text
:decoration none
#left_pane #left_pane
:position fixed :position fixed
:width 337px :width 337px
@ -2321,10 +2315,7 @@ ul.left_nav
:margin-left 8px :margin-left 8px
.unread-setter .unread-setter
:float right
:display none :display none
:cursor pointer
:margin-top 8px
.stream_container .stream_container
:min-height 500px :min-height 500px
@ -2826,3 +2817,7 @@ a.toggle_selector
:opacity 0.85 !important :opacity 0.85 !important
&:visible &:visible
:opacity 0.5 :opacity 0.5
.float-right
:float right
:margin-top 5px