From 43fc2c4d636e1166bf33cc8c46b0b1b89aea5c18 Mon Sep 17 00:00:00 2001 From: zhitomirskiyi Date: Thu, 17 Mar 2011 14:31:30 -0700 Subject: [PATCH] fixed the style on the share with list element --- app/models/services/facebook.rb | 23 ++----------------- app/views/contacts/_share_with_list.html.haml | 4 ++-- app/views/contacts/_share_with_pane.html.haml | 2 +- app/views/people/_aspect_list.haml | 8 ------- app/views/services/_remote_friend.html.haml | 4 ++-- app/views/services/finder.html.haml | 2 +- public/stylesheets/sass/application.sass | 15 ++++++++---- 7 files changed, 18 insertions(+), 40 deletions(-) diff --git a/app/models/services/facebook.rb b/app/models/services/facebook.rb index f294e3b36..189b4de90 100644 --- a/app/models/services/facebook.rb +++ b/app/models/services/facebook.rb @@ -21,27 +21,8 @@ class Services::Facebook < Service def finder(opts = {}) 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 = < {:access_token => self.access_token}}) + data = JSON.parse(response.body)['data'] data_h = {} data.each do |d| diff --git a/app/views/contacts/_share_with_list.html.haml b/app/views/contacts/_share_with_list.html.haml index 92017ac2d..592d4ce19 100644 --- a/app/views/contacts/_share_with_list.html.haml +++ b/app/views/contacts/_share_with_list.html.haml @@ -14,8 +14,6 @@ :contact => contact} .add_aspect = form_for(Aspect.new, :remote => true) do |aspect| - .right - = aspect.submit t('.add_new_aspect'), :class => 'button' = aspect.error_messages = aspect.hidden_field :person_id, :value => person.id if person = aspect.hidden_field :contact_id, :value => contact.id if contact @@ -25,6 +23,8 @@ %p.checkbox_select = aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible') = 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 .done diff --git a/app/views/contacts/_share_with_pane.html.haml b/app/views/contacts/_share_with_pane.html.haml index f7ed85c9a..30b6a557e 100644 --- a/app/views/contacts/_share_with_pane.html.haml +++ b/app/views/contacts/_share_with_pane.html.haml @@ -1,7 +1,7 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -#share_with +.share_with #facebox_header = person_image_link(person, :size => :thumb_small) %h4 diff --git a/app/views/people/_aspect_list.haml b/app/views/people/_aspect_list.haml index 8c65d7361..b6297eb9e 100644 --- a/app/views/people/_aspect_list.haml +++ b/app/views/people/_aspect_list.haml @@ -6,17 +6,9 @@ =javascript_include_tag 'contact-list' .aspects - 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 %h4 = t('people.person.pending_request') - - else .badges{:class => ("hidden" if !contact.persisted?)} = aspect_badges(aspects_with_person, :link => true) diff --git a/app/views/services/_remote_friend.html.haml b/app/views/services/_remote_friend.html.haml index ff4f64fee..019c0f3d7 100644 --- a/app/views/services/_remote_friend.html.haml +++ b/app/views/services/_remote_friend.html.haml @@ -1,4 +1,4 @@ -%li{:id => "uid_" + uid, :uid => uid} +%li.remote_friend{:id => "uid_" + uid, :uid => uid} .right -if friend[:contact] && !friend[:contact].pending = t('people.person.already_connected') @@ -35,7 +35,7 @@ = friend[:name] - 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 ||= Contact.new = render :partial => 'contacts/share_with_list', diff --git a/app/views/services/finder.html.haml b/app/views/services/finder.html.haml index 8fc207ff2..c441ff273 100644 --- a/app/views/services/finder.html.haml +++ b/app/views/services/finder.html.haml @@ -7,7 +7,7 @@ = include_javascripts :finder -#aspect_edit_pane.larger +#aspect_edit_pane.larger.friend_finder #facebox_header %h4 = t('.invite_your_friends_from', :service => params[:provider].titleize) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 55d98c9e5..9af5df89d 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -2258,7 +2258,7 @@ h3,h4 .aspect_badge :top -0.2em -#share_with +.share_with :min-width 430px .avatar @@ -2526,7 +2526,7 @@ ul.show_comments textarea :width 100% -#share_with +.share_with .add_aspect :-webkit-border-radius 5px :-moz-border-radius 5px @@ -2540,7 +2540,7 @@ ul.show_comments :padding :left 1em input[type='text'] - :width 60% + :width 95% &.checkbox_select label @@ -2548,11 +2548,11 @@ ul.show_comments :left 15px :top 0 :height 2em - .right :z-index 5 - :top 5px + :top 34px :right 1em + .done :padding 1em :bottom 2em @@ -2847,3 +2847,8 @@ h1.tag .description:hover .hover_edit :display inline + +.friend_finder + .share_with + :background + :color rgb(245,245,245)