diff --git a/' b/' deleted file mode 100644 index eec79138d..000000000 --- a/' +++ /dev/null @@ -1,54 +0,0 @@ --# Copyright (c) 2010, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -!!! -%html{:lang => I18n.locale.to_s} - %head - %title - = "#{current_user.real_name} | diaspora" if current_user - - /%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ - - = stylesheet_link_tag 'mobile' - = stylesheet_link_tag 'http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css' - - - if current_user - %link{:rel => "alternate", :href => "#{current_user.public_url}", :type => "application/atom+xml", :title => "Public Diaspora Feed for #{current_user.real_name}"} - - /= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" - = javascript_include_tag 'vendor/jquery-1.4.2.min', 'rails', 'vendor/jquery_mobile_a1' - - = csrf_meta_tag - = yield(:head) - - %body - #news{ :data => {:role => "page"}} - %div{:data => {:role => 'header', :nobackbtn => 'true'}} - foo - %header - .container - #notification - - flash.each do |name, msg| - = content_tag :div, msg, :id => "flash_#{name}" - #diaspora_text{:data => {:role => 'header', :nobackbtn => 'true'}} - %h1= link_to "DIASPORA", (current_user ? root_path : new_user_session_path) - - %ul#user_menu - .avatar - = owner_image_tag - = link_to current_user.real_name, '#' - %li= link_to t('.view_profile'), current_user.person - %li= link_to t('.edit_profile'), edit_person_path(current_user.person) - %li= link_to t('.account_settings'), edit_user_path(current_user) - %li= link_to t('.logout.'), destroy_user_session_path - - = render "shared/aspect_nav" - - .container - .span-24.last - = yield - - .span-24.last - = render "posts/debug" - diff --git a/.gitmodules b/.gitmodules index 54e5afd6e..014a860cf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "pkg"] path = pkg - url = git://github.com/diaspora/diaspora-packages.git + url = http://github.com/diaspora/diaspora-packages.git diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 9f2942f6c..b2c3cddcb 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -102,6 +102,10 @@ class AspectsController < ApplicationController else flash[:error] = I18n.t 'aspects.remove_from_aspect.failure' end - redirect_to aspects_manage_path + if params[:manage] + redirect_to aspects_manage_path + else + redirect_to aspect_path(params[:aspect_id]) + end end end diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index b1f5e0a80..762ef84c0 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -41,7 +41,7 @@ %span.tip click to edit %ul.tools - %li= link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button' + %li= link_to t('.add_a_new_friend'), "#manage_aspect_contacts_pane_#{aspect.id}", :class => 'manage_aspect_contacts_button' %li!= remove_link(aspect) %ul.dropzone{:data=>{:aspect_id=>aspect.id}} @@ -59,7 +59,7 @@ .fancybox_content - %div{:id => "add_request_pane_#{aspect.id}"} - = render "requests/new_request", :aspect => aspect, :manage => true + %div{:id => "manage_aspect_contacts_pane_#{aspect.id}"} + = render "requests/manage_aspect_contacts", :aspect => aspect, :manage => true diff --git a/app/views/requests/_new_request.haml b/app/views/requests/_manage_aspect_contacts.haml similarity index 84% rename from app/views/requests/_new_request.haml rename to app/views/requests/_manage_aspect_contacts.haml index b1ab0f4da..633247775 100644 --- a/app/views/requests/_new_request.haml +++ b/app/views/requests/_manage_aspect_contacts.haml @@ -5,12 +5,12 @@ .span-15.last .modal_title_bar %h4 - =t('.add_a_new_friend_to') + Manage contacts within %i= aspect.name .span-6.append-1.last %h3 Existing contacts - = render 'shared/add_friend_dropdown', :aspect => aspect, :friends => current_user.friends_not_in_aspect(aspect), :manage => defined?(manage) + = render 'shared/contact_list', :aspect => aspect, :contacts => current_user.friends, :manage => defined?(manage) .span-7.last %h3 Add a new contact diff --git a/app/views/requests/_new_request_to_person.haml b/app/views/requests/_new_request_to_person.haml index 9a7d1a9cc..cc4e8d698 100644 --- a/app/views/requests/_new_request_to_person.haml +++ b/app/views/requests/_new_request_to_person.haml @@ -3,8 +3,6 @@ -# the COPYRIGHT file. = form_tag(requests_path) do - - pp person - - pp aspects = select_tag(:aspect_id, options_from_collection_for_select(aspects, "id", "name")) - = hidden_field_tag :destination_handle, :value => person.diaspora_handle + = hidden_field_tag :destination_handle, person.diaspora_handle = submit_tag t('people.person.add_friend') diff --git a/app/views/shared/_add_friend_dropdown.html.haml b/app/views/shared/_add_friend_dropdown.html.haml deleted file mode 100644 index 46cdd8873..000000000 --- a/app/views/shared/_add_friend_dropdown.html.haml +++ /dev/null @@ -1,35 +0,0 @@ - -:javascript - $(".contact_list_search").keyup(function(e){ - var search = $(this); - var list = $(this).siblings("ul").first(); - var query = new RegExp(search.val(),'i'); - - $("li", list).each( function() { - var element = $(this); - if( !element.text().match(query) ){ - if( !element.hasClass('invis') ){ - element.addClass('invis').fadeOut(10); - } - } else { - element.removeClass('invis').fadeIn(10); - } - }); - }); - - -.contact_list - = search_field_tag :hello, "", :class => 'contact_list_search', :results => 5 - %ul - - for person in friends - %li - = form_tag '/aspects/add_to_aspect' do - = person.real_name - - .right - = hidden_field_tag :aspect_id, aspect.id - = hidden_field_tag :friend_id, person.id - - if defined?(manage) && manage - = hidden_field_tag :manage, true - = submit_tag '+' - diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index 802cd1001..4fbb289e0 100644 --- a/app/views/shared/_aspect_friends.haml +++ b/app/views/shared/_aspect_friends.haml @@ -13,11 +13,11 @@ = person_image_link(friend) -unless (aspect == :all) - = link_to (image_tag('add_friend_button.png', :title => "#{t('.add_to', :aspect => @aspect)}")), "#add_request_pane", :class => 'add_request_button' + = link_to (image_tag('add_friend_button.png', :title => "manage #{@aspect}")), "#manage_aspect_contacts_pane", :class => 'manage_aspect_contacts_button' .fancybox_content - #add_request_pane - = render "requests/new_request", :aspect => @aspect + #manage_aspect_contacts_pane + = render "requests/manage_aspect_contacts", :aspect => @aspect -else .clear %br diff --git a/app/views/shared/_contact_list.html.haml b/app/views/shared/_contact_list.html.haml new file mode 100644 index 000000000..8e26cb6b9 --- /dev/null +++ b/app/views/shared/_contact_list.html.haml @@ -0,0 +1,55 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + + +:javascript + $(".contact_list_search").keyup(function(e){ + var search = $(this); + var list = $(this).siblings("ul").first(); + var query = new RegExp(search.val(),'i'); + + $("li", list).each( function() { + var element = $(this); + if( !element.text().match(query) ){ + if( !element.hasClass('invis') ){ + element.addClass('invis').fadeOut(10); + } + } else { + element.removeClass('invis').fadeIn(10); + } + }); + }); + + +.contact_list + = search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => "Search contacts" + + %ul + - for contact in contacts + %li + + - unless contact.aspect_ids.include?(aspect.id) + = form_tag '/aspects/add_to_aspect' do + = person_image_tag contact.person + %span.name + = contact.person.real_name + .right + = hidden_field_tag :aspect_id, aspect.id + = hidden_field_tag :friend_id, contact.person.id + - if defined?(manage) && manage + = hidden_field_tag :manage, true + = submit_tag '+', :class => 'add', :title => "Add #{contact.person.real_name} to #{aspect}" + + - else + = form_tag '/aspects/remove_from_aspect' do + = person_image_tag contact.person + %span.name + = contact.person.real_name + .right + = hidden_field_tag :aspect_id, aspect.id + = hidden_field_tag :friend_id, contact.person.id + - if defined?(manage) && manage + = hidden_field_tag :manage, true + = submit_tag 'x', :class => 'remove', :title => "Remove #{contact.person.real_name} from #{aspect}" + diff --git a/app/views/users/getting_started/_step_2.html.haml b/app/views/users/getting_started/_step_2.html.haml index a364af71b..1498a626b 100644 --- a/app/views/users/getting_started/_step_2.html.haml +++ b/app/views/users/getting_started/_step_2.html.haml @@ -22,11 +22,11 @@ - for friend in aspect.person_objects = person_image_link(friend) - = link_to (image_tag('add_friend_button.png', :title => "add to #{aspect}")), "#add_request_pane", :class => 'add_request_button' + = link_to (image_tag('add_friend_button.png', :title => "add to #{aspect}")), '#manage_aspect_contacts_pane', :class => 'manage_aspect_contacts_button' .fancybox_content - #add_request_pane - = render "requests/new_request", :aspect => aspect, :getting_started => 2 + #manage_aspect_contacts_pane + = render "requests/manage_aspect_contacts", :aspect => aspect, :getting_started => 2 = link_to "x", aspect_path(aspect), :method => :delete, :remote => true, :class => "delete right" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index b4198db86..5a53dc135 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -298,7 +298,7 @@ en: last_seen: "last seen: %{how_long_ago}" friends_since: "friends since: %{how_long_ago}" requests: - new_request: + manage_aspect_contacts: add_a_new_friend_to: "Add a new friend to" enter_a_diaspora_username: "Enter a Diaspora username:" your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" diff --git a/log/.gitkeep b/log/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg b/pkg index d243ba8dd..9d3991fb6 160000 --- a/pkg +++ b/pkg @@ -1 +1 @@ -Subproject commit d243ba8dd60e6ada95907d90aff441c140380415 +Subproject commit 9d3991fb6ce61f60fe5df9556426adc371fe7b21 diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 03a13f95a..ce93e500f 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -19,7 +19,7 @@ $(document).ready(function(){ //buttons////// $(".add_aspect_button," + - ".add_request_button," + + ".manage_aspect_contacts_button," + ".invite_user_button," + ".add_photo_button," + ".remove_person_button," + diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 35ba9d02a..65f9ba1c7 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -1553,12 +1553,18 @@ h3 span.current_gs_step :max-height 300px :overflow auto - :border 2px solid #ccc + :border 2px solid #eee + + :border-radius 5px + :margin :bottom 1.5em input.contact_list_search :width 100% + :margin + :top 0 + ul :width 100% :margin 0 @@ -1578,8 +1584,24 @@ h3 span.current_gs_step &:hover :background - :color #eee + :color rgb(250,250,250) .right :top -6px + .avatar + :height 22px + :width 22px + :position absolute + :top -2px + + span.name + :padding + :left 30px + + input + &.add + :color green + + &.remove + :color red diff --git a/public/stylesheets/vendor/blank.gif b/public/stylesheets/vendor/blank.gif new file mode 100644 index 000000000..35d42e808 Binary files /dev/null and b/public/stylesheets/vendor/blank.gif differ diff --git a/public/stylesheets/vendor/fancy_close.png b/public/stylesheets/vendor/fancy_close.png new file mode 100644 index 000000000..07035307a Binary files /dev/null and b/public/stylesheets/vendor/fancy_close.png differ diff --git a/public/stylesheets/vendor/fancy_loading.png b/public/stylesheets/vendor/fancy_loading.png new file mode 100644 index 000000000..250301796 Binary files /dev/null and b/public/stylesheets/vendor/fancy_loading.png differ diff --git a/public/stylesheets/vendor/fancy_nav_left.png b/public/stylesheets/vendor/fancy_nav_left.png new file mode 100644 index 000000000..ebaa6a4fd Binary files /dev/null and b/public/stylesheets/vendor/fancy_nav_left.png differ diff --git a/public/stylesheets/vendor/fancy_nav_right.png b/public/stylesheets/vendor/fancy_nav_right.png new file mode 100644 index 000000000..873294e96 Binary files /dev/null and b/public/stylesheets/vendor/fancy_nav_right.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_e.png b/public/stylesheets/vendor/fancy_shadow_e.png new file mode 100644 index 000000000..2eda08936 Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_e.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_n.png b/public/stylesheets/vendor/fancy_shadow_n.png new file mode 100644 index 000000000..69aa10e23 Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_n.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_ne.png b/public/stylesheets/vendor/fancy_shadow_ne.png new file mode 100644 index 000000000..79f6980a3 Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_ne.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_nw.png b/public/stylesheets/vendor/fancy_shadow_nw.png new file mode 100644 index 000000000..7182cd938 Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_nw.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_s.png b/public/stylesheets/vendor/fancy_shadow_s.png new file mode 100644 index 000000000..d8858bfb7 Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_s.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_se.png b/public/stylesheets/vendor/fancy_shadow_se.png new file mode 100644 index 000000000..541e3ffd3 Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_se.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_sw.png b/public/stylesheets/vendor/fancy_shadow_sw.png new file mode 100644 index 000000000..b451689fa Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_sw.png differ diff --git a/public/stylesheets/vendor/fancy_shadow_w.png b/public/stylesheets/vendor/fancy_shadow_w.png new file mode 100644 index 000000000..8a4e4a887 Binary files /dev/null and b/public/stylesheets/vendor/fancy_shadow_w.png differ diff --git a/public/stylesheets/vendor/fancy_title_left.png b/public/stylesheets/vendor/fancy_title_left.png new file mode 100644 index 000000000..6049223d1 Binary files /dev/null and b/public/stylesheets/vendor/fancy_title_left.png differ diff --git a/public/stylesheets/vendor/fancy_title_main.png b/public/stylesheets/vendor/fancy_title_main.png new file mode 100644 index 000000000..8044271f2 Binary files /dev/null and b/public/stylesheets/vendor/fancy_title_main.png differ diff --git a/public/stylesheets/vendor/fancy_title_over.png b/public/stylesheets/vendor/fancy_title_over.png new file mode 100644 index 000000000..d9f458f4b Binary files /dev/null and b/public/stylesheets/vendor/fancy_title_over.png differ diff --git a/public/stylesheets/vendor/fancy_title_right.png b/public/stylesheets/vendor/fancy_title_right.png new file mode 100644 index 000000000..e36d9db2a Binary files /dev/null and b/public/stylesheets/vendor/fancy_title_right.png differ diff --git a/public/stylesheets/vendor/fancybox-x.png b/public/stylesheets/vendor/fancybox-x.png new file mode 100644 index 000000000..c2130f869 Binary files /dev/null and b/public/stylesheets/vendor/fancybox-x.png differ diff --git a/public/stylesheets/vendor/fancybox-y.png b/public/stylesheets/vendor/fancybox-y.png new file mode 100644 index 000000000..7ef399b99 Binary files /dev/null and b/public/stylesheets/vendor/fancybox-y.png differ diff --git a/public/stylesheets/vendor/fancybox.png b/public/stylesheets/vendor/fancybox.png new file mode 100644 index 000000000..65e14f68f Binary files /dev/null and b/public/stylesheets/vendor/fancybox.png differ