fix a bunch of small css related media box issues [ci skip]
This commit is contained in:
parent
f01dcb1354
commit
011f70a9f4
13 changed files with 101 additions and 94 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
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
|
- 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)
|
.bd
|
||||||
.content
|
= person_link(contact.person)
|
||||||
%span.from
|
.info
|
||||||
=person_link(contact.person)
|
= contact.person.diaspora_handle
|
||||||
.info
|
|
||||||
= contact.person.diaspora_handle
|
|
||||||
|
|
||||||
= will_paginate @contacts
|
= will_paginate @contacts
|
||||||
- else
|
- else
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,27 @@
|
||||||
|
|
||||||
%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)}
|
||||||
= person_image_tag(conversation.author)
|
.media
|
||||||
|
.img
|
||||||
|
= person_image_tag(conversation.author)
|
||||||
|
|
||||||
.subject
|
.bg
|
||||||
.message_count
|
.subject
|
||||||
= conversation.messages.size
|
.message_count
|
||||||
- if unread_counts[conversation.id].to_i > 0
|
= conversation.messages.size
|
||||||
.unread_message_count
|
- if unread_counts[conversation.id].to_i > 0
|
||||||
= unread_counts[conversation.id].to_i
|
.unread_message_count
|
||||||
|
= unread_counts[conversation.id].to_i
|
||||||
|
|
||||||
%div{ :class => direction_for(conversation.subject) }
|
%div{ :class => direction_for(conversation.subject) }
|
||||||
= conversation.subject[0..30]
|
= conversation.subject[0..30]
|
||||||
|
|
||||||
.last_author
|
.last_author
|
||||||
.timestamp
|
.timestamp
|
||||||
= t('ago', :time => time_ago_in_words(conversation.updated_at))
|
= t('ago', :time => time_ago_in_words(conversation.updated_at))
|
||||||
- if authors[conversation.id].present?
|
- if authors[conversation.id].present?
|
||||||
= authors[conversation.id].name
|
= authors[conversation.id].name
|
||||||
|
|
||||||
- if conversation.participants.size > 2
|
- if conversation.participants.size > 2
|
||||||
%span.participant_count
|
%span.participant_count
|
||||||
= "(+#{conversation.participants.size - 1})"
|
= "(+#{conversation.participants.size - 1})"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
= owner_image_tag(:thumb_small)
|
.media
|
||||||
|
.img
|
||||||
|
= 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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,13 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
.stream_element{:data=>{:guid=>message.id}}
|
.stream_element{:data=>{:guid=>message.id}}
|
||||||
= person_image_link(message.author, :size => :thumb_small)
|
.media
|
||||||
|
.img
|
||||||
.content
|
= person_image_link(message.author, :size => :thumb_small)
|
||||||
.from
|
.bd
|
||||||
= person_link(message.author, :class => 'author')
|
= person_link(message.author, :class => 'author from')
|
||||||
%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)
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
= notification_message_for(note)
|
.bd
|
||||||
%br
|
= notification_message_for(note)
|
||||||
%time= timeago(note.created_at)
|
%div
|
||||||
%a{:class => 'unread-setter'}
|
%time
|
||||||
mark unread
|
= timeago(note.created_at)
|
||||||
.span-13.last
|
= link_to "Mark unread", "#", :class => "unread-setter"
|
||||||
|
|
||||||
= will_paginate @notifications
|
= will_paginate @notifications
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
= person_image_link(person)
|
.media
|
||||||
- if current_user
|
.img
|
||||||
- contact = current_user.contacts.find_by_person_id(person.id)
|
= person_image_link(person)
|
||||||
- contact ||= Contact.new(:person => person)
|
.bg
|
||||||
|
%span.from
|
||||||
.content
|
= person_link(person, :class => "hovercardable")
|
||||||
%span.from
|
|
||||||
=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'}
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,12 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
.stream_element{:id => person.id}
|
.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
|
.media
|
||||||
%div{:style => "float:right;margin-top:2px;"}
|
|
||||||
= render :partial => 'people/relationship_action',
|
|
||||||
:locals => { :person => person, :contact => contact,
|
|
||||||
:current_user => current_user }
|
|
||||||
.img
|
.img
|
||||||
= person_image_link(person)
|
= person_image_link(person)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue