fix a bunch of small css related media box issues [ci skip]
This commit is contained in:
parent
f8ec80b62d
commit
ed3d5c429a
13 changed files with 101 additions and 94 deletions
|
|
@ -3,7 +3,7 @@
|
|||
# the COPYRIGHT file.
|
||||
|
||||
class NotificationsController < ApplicationController
|
||||
include NotificationsHelper
|
||||
before_filter :authenticate_user!
|
||||
|
||||
def update
|
||||
note = Notification.where(:recipient_id => current_user.id, :id => params[:id]).first
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class StreamsController < ApplicationController
|
|||
respond_with do |format|
|
||||
format.html { 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
|
||||
|
||||
|
|
|
|||
20
app/helpers/contacts_helper.rb
Normal file
20
app/helpers/contacts_helper.rb
Normal 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
|
||||
|
|
@ -30,28 +30,18 @@
|
|||
- if @contacts.size > 0
|
||||
- for contact in @contacts
|
||||
.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
|
||||
= render :partial => 'people/relationship_action',
|
||||
:locals => { :person => contact.person, :contact => contact,
|
||||
:current_user => current_user }
|
||||
.float-right
|
||||
= thing(contact)
|
||||
|
||||
.media
|
||||
.img
|
||||
= person_image_link(contact.person)
|
||||
|
||||
= person_image_link(contact.person)
|
||||
.content
|
||||
%span.from
|
||||
=person_link(contact.person)
|
||||
.info
|
||||
= contact.person.diaspora_handle
|
||||
.bd
|
||||
= person_link(contact.person)
|
||||
.info
|
||||
= contact.person.diaspora_handle
|
||||
|
||||
= will_paginate @contacts
|
||||
- else
|
||||
|
|
|
|||
|
|
@ -4,24 +4,27 @@
|
|||
|
||||
%a.conversation{:href => conversation_path(conversation)}
|
||||
.stream_element.conversation{:data=>{:guid=>conversation.id}, :class => ('unread' if unread_counts[conversation.id].to_i > 0)}
|
||||
= person_image_tag(conversation.author)
|
||||
.media
|
||||
.img
|
||||
= person_image_tag(conversation.author)
|
||||
|
||||
.subject
|
||||
.message_count
|
||||
= conversation.messages.size
|
||||
- if unread_counts[conversation.id].to_i > 0
|
||||
.unread_message_count
|
||||
= unread_counts[conversation.id].to_i
|
||||
.bg
|
||||
.subject
|
||||
.message_count
|
||||
= conversation.messages.size
|
||||
- if unread_counts[conversation.id].to_i > 0
|
||||
.unread_message_count
|
||||
= unread_counts[conversation.id].to_i
|
||||
|
||||
%div{ :class => direction_for(conversation.subject) }
|
||||
= conversation.subject[0..30]
|
||||
%div{ :class => direction_for(conversation.subject) }
|
||||
= conversation.subject[0..30]
|
||||
|
||||
.last_author
|
||||
.timestamp
|
||||
= t('ago', :time => time_ago_in_words(conversation.updated_at))
|
||||
- if authors[conversation.id].present?
|
||||
= authors[conversation.id].name
|
||||
.last_author
|
||||
.timestamp
|
||||
= t('ago', :time => time_ago_in_words(conversation.updated_at))
|
||||
- if authors[conversation.id].present?
|
||||
= authors[conversation.id].name
|
||||
|
||||
- if conversation.participants.size > 2
|
||||
%span.participant_count
|
||||
= "(+#{conversation.participants.size - 1})"
|
||||
- if conversation.participants.size > 2
|
||||
%span.participant_count
|
||||
= "(+#{conversation.participants.size - 1})"
|
||||
|
|
|
|||
|
|
@ -23,10 +23,11 @@
|
|||
= render :partial => 'messages/message', :collection => conversation.messages
|
||||
|
||||
.stream_element.new_message
|
||||
= owner_image_tag(:thumb_small)
|
||||
.media
|
||||
.img
|
||||
= owner_image_tag(:thumb_small)
|
||||
|
||||
.content
|
||||
= form_for [conversation, Message.new] do |message|
|
||||
= message.text_area :text, :rows => 5, :tabindex => 1
|
||||
.left
|
||||
.bd
|
||||
= form_for [conversation, Message.new] do |message|
|
||||
= message.text_area :text, :rows => 5, :tabindex => 1
|
||||
= message.submit t('.reply').capitalize, :disable_with => t('.replying'), :class => 'button creation', :tabindex => 2
|
||||
|
|
|
|||
|
|
@ -48,9 +48,8 @@
|
|||
fade-in 0.2s ease-in;
|
||||
-moz-animation: spin 1s infinite ease-in-out,
|
||||
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
|
||||
- if @aspect == :getting_started || @page == :logged_out
|
||||
|
|
|
|||
|
|
@ -3,14 +3,13 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
.stream_element{:data=>{:guid=>message.id}}
|
||||
= person_image_link(message.author, :size => :thumb_small)
|
||||
|
||||
.content
|
||||
.from
|
||||
= person_link(message.author, :class => 'author')
|
||||
.media
|
||||
.img
|
||||
= person_image_link(message.author, :size => :thumb_small)
|
||||
.bd
|
||||
= person_link(message.author, :class => 'author from')
|
||||
%time.timeago{:datetime => message.created_at}
|
||||
= how_long_ago(message)
|
||||
|
||||
%div{ :class => direction_for(message.text) }
|
||||
= markdownify(message, :oembed => true)
|
||||
|
||||
%div{ :class => direction_for(message.text) }
|
||||
= markdownify(message, :oembed => true)
|
||||
|
|
@ -19,16 +19,17 @@
|
|||
- notes.each do |note|
|
||||
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"}
|
||||
- if note.type == "Notifications::StartedSharing" && contact = current_user.contact_for(note.effective_target)
|
||||
.right
|
||||
.float-right
|
||||
= aspect_membership_dropdown(contact, note.effective_target, 'left')
|
||||
|
||||
%span.from
|
||||
= notification_message_for(note)
|
||||
%br
|
||||
%time= timeago(note.created_at)
|
||||
%a{:class => 'unread-setter'}
|
||||
mark unread
|
||||
.span-13.last
|
||||
|
||||
.media
|
||||
.bd
|
||||
= notification_message_for(note)
|
||||
%div
|
||||
%time
|
||||
= timeago(note.created_at)
|
||||
= link_to "Mark unread", "#", :class => "unread-setter"
|
||||
|
||||
= will_paginate @notifications
|
||||
|
||||
:javascript
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
.people_stream
|
||||
- for person in people
|
||||
- people.each do |person|
|
||||
.stream_element{:id => person.id}
|
||||
= person_image_link(person)
|
||||
- if current_user
|
||||
- contact = current_user.contacts.find_by_person_id(person.id)
|
||||
- contact ||= Contact.new(:person => person)
|
||||
|
||||
.content
|
||||
%span.from
|
||||
=person_link(person, :class => "hovercardable")
|
||||
.media
|
||||
.img
|
||||
= person_image_link(person)
|
||||
.bg
|
||||
%span.from
|
||||
= person_link(person, :class => "hovercardable")
|
||||
|
||||
= will_paginate people, :inner_window => 3, :params => {:controller => 'people', :action => 'tag_index'}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
.stream_element{:id => person.id}
|
||||
%div{:style => "float:right;margin-top:2px;"}
|
||||
= render :partial => 'people/relationship_action',
|
||||
:locals => { :person => person, :contact => contact,
|
||||
:current_user => current_user }
|
||||
|
||||
.media
|
||||
%div{:style => "float:right;margin-top:2px;"}
|
||||
= render :partial => 'people/relationship_action',
|
||||
:locals => { :person => person, :contact => contact,
|
||||
:current_user => current_user }
|
||||
.img
|
||||
= person_image_link(person)
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
}
|
||||
this.unreadClick = function() {
|
||||
$.ajax({
|
||||
url: "/notifications/" + $(this).parent().data("guid"),
|
||||
url: "/notifications/" + $(this).closest(".stream_element").data("guid"),
|
||||
data: { set_unread: true },
|
||||
type: "PUT",
|
||||
success: self.clickSuccess
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
.media .img img
|
||||
:display block
|
||||
|
||||
.media .imgExt
|
||||
.media .imgEt
|
||||
:float right
|
||||
:margin-left 10px
|
||||
/* ====== ----- ====== */
|
||||
|
|
@ -402,11 +402,6 @@ ul.as-selections
|
|||
:margin
|
||||
:bottom 10px
|
||||
|
||||
#conversation_inbox a
|
||||
&:hover
|
||||
:text
|
||||
:decoration none
|
||||
|
||||
.stream_element
|
||||
a.author
|
||||
:font-weight bold
|
||||
|
|
@ -607,6 +602,8 @@ form.new_comment
|
|||
:padding 8px 0
|
||||
:text-align center
|
||||
:width 100%
|
||||
img
|
||||
:border none
|
||||
|
||||
#photo_container
|
||||
:text
|
||||
|
|
@ -1626,14 +1623,8 @@ ul#press_logos
|
|||
|
||||
.notifications_for_day
|
||||
.stream_element
|
||||
:margin
|
||||
:bottom 0.3em
|
||||
:padding 0.2em 0.5em
|
||||
:width 500px
|
||||
@include border-radius(5px)
|
||||
|
||||
&:hover
|
||||
:background-color #EFEFEF
|
||||
|
||||
.day_group
|
||||
:min-height 100px
|
||||
|
|
@ -1878,8 +1869,7 @@ ul#press_logos
|
|||
:top 9px
|
||||
|
||||
.stream_element.conversation
|
||||
:padding 10px
|
||||
:min-height 0px
|
||||
:padding 8px
|
||||
|
||||
.message_count
|
||||
@include border-radius(5px)
|
||||
|
|
@ -1960,6 +1950,10 @@ ul#press_logos
|
|||
:overflow-y auto
|
||||
:overflow-x none
|
||||
|
||||
a:hover
|
||||
:text
|
||||
:decoration none
|
||||
|
||||
#left_pane
|
||||
:position fixed
|
||||
:width 337px
|
||||
|
|
@ -2321,10 +2315,7 @@ ul.left_nav
|
|||
:margin-left 8px
|
||||
|
||||
.unread-setter
|
||||
:float right
|
||||
:display none
|
||||
:cursor pointer
|
||||
:margin-top 8px
|
||||
|
||||
.stream_container
|
||||
:min-height 500px
|
||||
|
|
@ -2826,3 +2817,7 @@ a.toggle_selector
|
|||
:opacity 0.85 !important
|
||||
&:visible
|
||||
:opacity 0.5
|
||||
|
||||
.float-right
|
||||
:float right
|
||||
:margin-top 5px
|
||||
|
|
|
|||
Loading…
Reference in a new issue