diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index 1f90443d06d69e5c02a848681680dbb3744e9b08..2b8cf11e0bdbedac10b1857de175da518c7e703d 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -16,10 +16,10 @@ module AspectsHelper end def add_to_aspect_button(aspect_id, person_id) - link_to '+', {:action => 'add_to_aspect', :aspect_id => aspect_id, :person_id => person_id}, :remote => true, :class => 'add button' + link_to image_tag('icons/monotone_plus_add_round.png'), {:action => 'add_to_aspect', :aspect_id => aspect_id, :person_id => person_id}, :remote => true, :class => 'add button' end def remove_from_aspect_button(aspect_id, person_id) - link_to 'x', {:action => 'remove_from_aspect', :aspect_id => aspect_id, :person_id => person_id}, :remote => true, :class => 'remove button' + link_to image_tag('icons/monotone_check_yes.png'), {:action => 'remove_from_aspect', :aspect_id => aspect_id, :person_id => person_id}, :remote => true, :class => 'added button' end end diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 01877eb867c042eaabd8abd1a30c19c51a2a92fa..fa0c1721a37ede885c8e56a19aefa7e8f13a90ca 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -2,6 +2,20 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. +.span-24.last + %h2{:style=>"position:relative;margin-bottom:0;"} + = @aspect + + %span.aspect_contact_count{:style=>"color:#999;font-size:14px;"} + = @aspect.contacts.count + - if @aspect.contacts.count == 1 + = t('.contact') + - else + = t('.contacts') + + = link_to t('.edit_aspect'), "#", :id => "edit_aspect_trigger" + + .span-8.append-1.last = render 'shared/aspect_contacts', :contacts => @aspect_contacts, :aspect => @aspect diff --git a/app/views/shared/_aspect_contacts.haml b/app/views/shared/_aspect_contacts.haml index c01d80fab935178ce4e81bbf096a2cb24456b098..363c9f713dfc4266ce733fde0e1d1e4aafd0a169 100644 --- a/app/views/shared/_aspect_contacts.haml +++ b/app/views/shared/_aspect_contacts.haml @@ -58,18 +58,6 @@ #left_pane{:class => ("everyone" if aspect == :all)} - if aspect == :all %h2 All contacts - - else - %h2{:style=>"position:relative;margin-bottom:0;"} - = aspect - .right - = link_to t('.edit_aspect'), "#", :id => "edit_aspect_trigger", :class => "button" - - %span.aspect_contact_count{:style=>"color:#999;font-size:14px;"} - = aspect.contacts.count - - if aspect.contacts.count == 1 - = t('.contact') - - else - = t('.contacts') - unless aspect == :all #edit_aspect_pane diff --git a/app/views/shared/_contact_list.html.haml b/app/views/shared/_contact_list.html.haml index 9b998dcedb2c70694cd5aed49d77f6ebc0d87310..4dab495d98858fccce1c2801482ae706b8f4ba71 100644 --- a/app/views/shared/_contact_list.html.haml +++ b/app/views/shared/_contact_list.html.haml @@ -36,24 +36,46 @@ } }; - $('.remove').live('ajax:success', function(data, html, xhr) { + $('.added').live('ajax:loading', function(data, html, xhr) { + $(this).fadeTo(200,0.4); + }); + + $('.added').live('ajax:success', function(data, html, xhr) { var person_id = $(this).closest("li").find(".avatar").attr("data-person_id"); $(".contact_pictures").find("img[data-person_id='"+person_id+"']").parent().remove(); $(this).parent().html(html); ContactList.refreshContactCount(); + + $(this).fadeTo(200,1); }); - $('.remove').live('ajax:failure', function(data, html, xhr) { + $('.added').live('ajax:failure', function(data, html, xhr) { alert("#{t('.cannot_remove')}"); }); + + $('.add').live('ajax:loading', function(data, html, xhr) { + $(this).fadeTo(200,0.4); + }); + $('.add').live('ajax:success', function(data, html, xhr) { var person_image = $(this).closest("li").find(".avatar") person_image.parent().clone().appendTo(".contact_pictures"); $(this).parent().html(html); ContactList.refreshContactCount(); + + $(this).fadeTo(200,1); + }); + + + $('.added').live('mouseover', function(){ + $(this).addClass("remove"); + $(this).children("img").attr("src","/images/icons/monotone_close_exit_delete.png"); + }).live('mouseout', function(){ + $(this).removeClass("remove"); + $(this).children("img").attr("src","/images/icons/monotone_check_yes.png"); }); ContactList.initialize(); diff --git a/chef/cookbooks/centos/recipes/bootstrap.rb b/chef/cookbooks/centos/recipes/bootstrap.rb index 9c4914279cb77d1b0b8d2796deac6f1d939674bb..f68733bce96149cdb9084e85c2f92ace1c6420a5 100644 --- a/chef/cookbooks/centos/recipes/bootstrap.rb +++ b/chef/cookbooks/centos/recipes/bootstrap.rb @@ -13,6 +13,9 @@ end execute "htop" do command "yum install -y htop psmisc screen" end +execute "JAVA!! for Jammit" do + command "yum install -y java" +end def harden_ruby(ruby_string) Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file| diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index b623727cda35abf4fc9b8b4ab773fac60cec353d..2f1648c748b4af6ba83a2ec72c14ce53fbb752a8 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -82,11 +82,11 @@ en: done_editing: "done editing" new_requests: "%{count} new requests!" new_request: "%{count} new request!" + add_existing: "Add an existing contact" + aspect_settings: "Aspect settings" edit_aspect: "edit aspect" contact: "contact" contacts: "contacts" - add_existing: "Add an existing contact" - aspect_settings: "Aspect settings" remove_aspect: "Remove Aspect" confirm_remove_aspect: "Remove aspect?" no_contacts: "You currently have no contacts. Find your contacts here." @@ -116,6 +116,10 @@ en: search_contacts: "Search contacts" cannot_remove: "Cannot remove person from last aspect. (If you want to disconnect from this person you must remove contact.)" aspects: + show: + edit_aspect: "edit aspect" + contact: "contact" + contacts: "contacts" no_contacts_message: nobody: "We know you know people — bring them to Diaspora!" nobody_in_aspect: "Your aspect '%{aspect_name}' is empty." diff --git a/public/images/icons/monotone_check_yes.png b/public/images/icons/monotone_check_yes.png new file mode 100644 index 0000000000000000000000000000000000000000..7bc542e465b2ec22c27f4160d0ca5f5351c876c8 Binary files /dev/null and b/public/images/icons/monotone_check_yes.png differ diff --git a/public/images/icons/monotone_close_exit_delete.png b/public/images/icons/monotone_close_exit_delete.png new file mode 100644 index 0000000000000000000000000000000000000000..6de9eb18db1a4e1b465fe891561921a439909492 Binary files /dev/null and b/public/images/icons/monotone_close_exit_delete.png differ diff --git a/public/images/icons/monotone_plus_add_round.png b/public/images/icons/monotone_plus_add_round.png new file mode 100644 index 0000000000000000000000000000000000000000..21872fb9a2618feeeb07214d87c63a395550ef85 Binary files /dev/null and b/public/images/icons/monotone_plus_add_round.png differ diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 1859a8e91488acd51174e66c22e5d2b028efd5d1..69d847ef5f834e152617ff6e2ba8279a6082a215 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -1257,6 +1257,10 @@ ul#settings_nav :margin 0 :padding 0 +#edit_aspect_pane + :margin + :top 12px + #left_pane.everyone, #edit_aspect_pane @@ -1648,7 +1652,9 @@ ul#request_result .contact_list :height 300px :max-height 300px - :overflow auto + + :overflow-y auto + :overflow-x hidden :border 2px solid #eee @@ -1686,11 +1692,11 @@ ul#request_result &:hover :background - :color rgb(250,250,250) + :color rgb(245,245,245) .right - :top 8px - :right 6px + :right 8px + :top 2px .avatar :height 22px @@ -1702,12 +1708,22 @@ ul#request_result :padding :left 30px - a - &.add - :color green + a.button + :padding + :right 4px + :left 4px + &.added + :background -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(92,199,86)), color-stop(1, rgb(158,255,153))) + :background -moz-linear-gradient(top, rgb(158,255,153), rgb(92,199,86)) - &.remove - :color red + &.added.remove + :background -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(199,86,86)), color-stop(1, rgb(255,153,153))) + :background -moz-linear-gradient(top, rgb(255,153,153), rgb(199,86,86)) + + &:active + :background -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(130,55,55)), color-stop(1, rgb(199,119,119))) + :background -moz-linear-gradient(top, rgb(199,119,119), rgb(130,55,55)) + footer :margin @@ -1932,6 +1948,10 @@ h3,h4 .big_buttons input :width 100% + :padding + :top 10px + :bottom 10px + :color #666 #original_post_info p @@ -1974,3 +1994,7 @@ h3,h4 &:hover :background :color #107FC9 + +#edit_aspect_trigger + :font + :size 12px diff --git a/public/stylesheets/sass/ui.sass b/public/stylesheets/sass/ui.sass index e104eb1c4e6adb7191eb65a27cb42aaa39b60fc2..a090a32a48984d12c759839182ee18b03296365a 100644 --- a/public/stylesheets/sass/ui.sass +++ b/public/stylesheets/sass/ui.sass @@ -49,6 +49,12 @@ :top 1px solid #333 :bottom 1px solid #888 + img + :position relative + :height 20px + :width 20px + :top 6px + ul.button_set :padding