fixed the style on the share with list element

This commit is contained in:
zhitomirskiyi 2011-03-17 14:31:30 -07:00
parent 6cc085d64e
commit 43fc2c4d63
7 changed files with 18 additions and 40 deletions

View file

@ -21,27 +21,8 @@ class Services::Facebook < Service
def finder(opts = {}) def finder(opts = {})
Rails.logger.debug("event=friend_finder type=facebook sender_id=#{self.user_id}") Rails.logger.debug("event=friend_finder type=facebook sender_id=#{self.user_id}")
#RestClient.get("https://graph.facebook.com/me/friends", {:params => {:access_token => self.access_token}}) response = RestClient.get("https://graph.facebook.com/me/friends", {:params => {:access_token => self.access_token}})
response = <<JSON data = JSON.parse(response.body)['data']
{
"data": [
{
"name": "Snow Crash",
"id": "12321"
},
{
"name": "Person to Invite",
"id": "e3"
},
{
"name": "Creative Commons",
"id": "b2"
}
]
}
JSON
#data = JSON.parse(response.body)['data']
data = JSON.parse(response)['data']
data_h = {} data_h = {}
data.each do |d| data.each do |d|

View file

@ -14,8 +14,6 @@
:contact => contact} :contact => contact}
.add_aspect .add_aspect
= form_for(Aspect.new, :remote => true) do |aspect| = form_for(Aspect.new, :remote => true) do |aspect|
.right
= aspect.submit t('.add_new_aspect'), :class => 'button'
= aspect.error_messages = aspect.error_messages
= aspect.hidden_field :person_id, :value => person.id if person = aspect.hidden_field :person_id, :value => person.id if person
= aspect.hidden_field :contact_id, :value => contact.id if contact = aspect.hidden_field :contact_id, :value => contact.id if contact
@ -25,6 +23,8 @@
%p.checkbox_select %p.checkbox_select
= aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible') = aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible')
= aspect.check_box :contacts_visible, :checked => true, :default => true = aspect.check_box :contacts_visible, :checked => true, :default => true
.right
= aspect.submit t('contacts.share_with_pane.add_new_aspect'), :class => 'button'
-unless friend_finder ||= false -unless friend_finder ||= false
.done .done

View file

@ -1,7 +1,7 @@
-# Copyright (c) 2010, Diaspora Inc. This file is -# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
#share_with .share_with
#facebox_header #facebox_header
= person_image_link(person, :size => :thumb_small) = person_image_link(person, :size => :thumb_small)
%h4 %h4

View file

@ -6,17 +6,9 @@
=javascript_include_tag 'contact-list' =javascript_include_tag 'contact-list'
.aspects .aspects
- if !contact || !contact.persisted? - if !contact || !contact.persisted?
%h4
= link_to t('people.show.not_connected'),
{:controller => "contacts",
:action => "new",
:person_id => person.id},
:class => 'share_with button',
:rel => 'facebox'
- elsif contact.pending - elsif contact.pending
%h4 %h4
= t('people.person.pending_request') = t('people.person.pending_request')
- else - else
.badges{:class => ("hidden" if !contact.persisted?)} .badges{:class => ("hidden" if !contact.persisted?)}
= aspect_badges(aspects_with_person, :link => true) = aspect_badges(aspects_with_person, :link => true)

View file

@ -1,4 +1,4 @@
%li{:id => "uid_" + uid, :uid => uid} %li.remote_friend{:id => "uid_" + uid, :uid => uid}
.right .right
-if friend[:contact] && !friend[:contact].pending -if friend[:contact] && !friend[:contact].pending
= t('people.person.already_connected') = t('people.person.already_connected')
@ -35,7 +35,7 @@
= friend[:name] = friend[:name]
- unless friend[:person].nil? || (friend[:contact] && friend[:contact].pending) || (friend[:request] && friend[:request].sender_id != friend[:person].id) - unless friend[:person].nil? || (friend[:contact] && friend[:contact].pending) || (friend[:request] && friend[:request].sender_id != friend[:person].id)
%li{:id => "options_" + uid, :class => "hidden", :style => "height:auto"} %li{:id => "options_" + uid, :class => "share_with hidden", :style => "height:auto"}
- contact = friend[:contact] - contact = friend[:contact]
- contact ||= Contact.new - contact ||= Contact.new
= render :partial => 'contacts/share_with_list', = render :partial => 'contacts/share_with_list',

View file

@ -7,7 +7,7 @@
= include_javascripts :finder = include_javascripts :finder
#aspect_edit_pane.larger #aspect_edit_pane.larger.friend_finder
#facebox_header #facebox_header
%h4 %h4
= t('.invite_your_friends_from', :service => params[:provider].titleize) = t('.invite_your_friends_from', :service => params[:provider].titleize)

View file

@ -2258,7 +2258,7 @@ h3,h4
.aspect_badge .aspect_badge
:top -0.2em :top -0.2em
#share_with .share_with
:min-width 430px :min-width 430px
.avatar .avatar
@ -2526,7 +2526,7 @@ ul.show_comments
textarea textarea
:width 100% :width 100%
#share_with .share_with
.add_aspect .add_aspect
:-webkit-border-radius 5px :-webkit-border-radius 5px
:-moz-border-radius 5px :-moz-border-radius 5px
@ -2540,7 +2540,7 @@ ul.show_comments
:padding :padding
:left 1em :left 1em
input[type='text'] input[type='text']
:width 60% :width 95%
&.checkbox_select &.checkbox_select
label label
@ -2548,11 +2548,11 @@ ul.show_comments
:left 15px :left 15px
:top 0 :top 0
:height 2em :height 2em
.right .right
:z-index 5 :z-index 5
:top 5px :top 34px
:right 1em :right 1em
.done .done
:padding 1em :padding 1em
:bottom 2em :bottom 2em
@ -2847,3 +2847,8 @@ h1.tag
.description:hover .description:hover
.hover_edit .hover_edit
:display inline :display inline
.friend_finder
.share_with
:background
:color rgb(245,245,245)