Merge branch 'master' of github.com:diaspora/diaspora

This commit is contained in:
Daniel Vincent Grippi 2010-09-13 19:54:56 -07:00
commit 0782e0b199
6 changed files with 20 additions and 18 deletions

View file

@ -31,7 +31,7 @@ class AspectsController < ApplicationController
def create def create
@aspect = current_user.aspect params[:aspect] @aspect = current_user.aspect params[:aspect]
flash[:notice] = "Click on the plus on the left side to tell Diaspora who can see your new aspect." flash[:notice] = "Click on the plus on the left side to tell Diaspora who can see your new aspect."
respond_with @aspect respond_with :location => edit_aspect_path(@aspect)
end end
def new def new

View file

@ -22,10 +22,10 @@
= javascript_include_tag 'aspect-edit.js' = javascript_include_tag 'aspect-edit.js'
- content_for :left_pane do - content_for :left_pane do
%h1 %h3
Requests Requests
%li.requests .requests
%ul %ul
- for request in @remote_requests - for request in @remote_requests
%li.requested_person{:id => request.person.id, :request_id => request.id} %li.requested_person{:id => request.person.id, :request_id => request.id}
@ -39,18 +39,16 @@
%li.remove %li.remove
%ul %ul
%h1{:id => 'aspect_title'}
Aspects
%ul#aspect_list %ul#aspect_list
.new_aspect= link_to("add a new aspect", "#add_aspect_pane", :id => "add_aspect_button", :title => "Add a new relation")
- for aspect in @aspects - for aspect in @aspects
%li.aspect %li.aspect
%h3{:contenteditable => true}= aspect.name %h1{:contenteditable => true}= aspect.name
%ul{:id => aspect.id} %ul{:id => aspect.id}
-if aspect.people.size < 1 -if aspect.people.size < 1
%li.grey Drag to add people %li.grey Drag to add people
@ -61,6 +59,11 @@
= person_image_tag(person) = person_image_tag(person)
.name .name
= person.real_name = person.real_name
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
.yo{:style => 'display:none'}
%div{:id => "add_request_pane_#{aspect.id}"}
= render "requests/new_request", :aspect => aspect
%p %p
%br %br
= link_to 'Update Aspects', '#', :class => 'button', :id => "move_friends_link" = link_to 'Update Aspects', '#', :class => 'button', :id => "move_friends_link"

View file

@ -19,7 +19,7 @@
%h1 %h1
Add a new friend to Add a new friend to
%i= @aspect.name %i= aspect.name
= form_for Request.new do |f| = form_for Request.new do |f|
= f.error_messages = f.error_messages
@ -31,6 +31,6 @@
%p %p
= f.label :destination_url, "Friend's username" = f.label :destination_url, "Friend's username"
= f.text_field :destination_url = f.text_field :destination_url
= f.hidden_field :aspect_id, :value => @aspect.id = f.hidden_field :aspect_id, :value => aspect.id
= f.submit = f.submit

View file

@ -24,6 +24,4 @@
- unless @aspect == :all - unless @aspect == :all
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button' = link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
.yo{:style => 'display:none'}
#add_request_pane
= render "requests/new_request"

View file

@ -29,11 +29,11 @@ $('#move_friends_link').live( 'click', function(){
}); });
$(function() { $(function() {
$("li .person").draggable({ $("ul .person").draggable({
revert: true revert: true
}); });
$("li .requested_person").draggable({ $("ul .requested_person").draggable({
revert: true revert: true
}); });
@ -59,8 +59,8 @@ $(function() {
$('#aspect_list').data( ui.draggable[0].id, move); $('#aspect_list').data( ui.draggable[0].id, move);
ui.draggable.css('background-color','orange'); ui.draggable.css('background-color','orange');
} }
$(this).closest("ul").append(ui.draggable);
} }
$(this).closest("ul").append(ui.draggable);
} }
}); });

View file

@ -37,6 +37,7 @@ $(document).ready(function(){
//buttons////// //buttons//////
$("#add_aspect_button").fancybox({ 'titleShow' : false }); $("#add_aspect_button").fancybox({ 'titleShow' : false });
$("#add_request_button").fancybox({ 'titleShow': false }); $("#add_request_button").fancybox({ 'titleShow': false });
$(".add_request_button").fancybox({ 'titleShow': false });
$("input[type='submit']").addClass("button"); $("input[type='submit']").addClass("button");