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

Conflicts:
	app/views/friends/show.html.haml
This commit is contained in:
danielvincent 2010-06-29 20:56:44 -07:00
commit e159b8f7f4
6 changed files with 31 additions and 5 deletions

View file

@ -20,10 +20,15 @@ class FriendsController < ApplicationController
def new
@friend = Friend.new
@profile = Profile.new
end
def create
puts params.inspect
@friend = Friend.new(params[:friend])
if @friend.save
flash[:notice] = "Successfully created friend."
redirect_to @friend

View file

@ -26,7 +26,7 @@ class Person
before_validation :clean_url
def real_name
self.profile.first_name + " " + self.profile.last_name
profile.first_name + " " + profile.last_name
end

View file

@ -10,7 +10,17 @@
= f.label :url
%br
= f.text_field :url
%p
=f.fields_for :profile do |p|
%p
= p.label :first_name
%br
= p.text_field :first_name
%p
= p.label :last_name
%br
= p.text_field :last_name
= f.submit

View file

@ -9,6 +9,10 @@
%b Last Name
%p
= @friend_profile.last_name
%p
%b url
%p
= @friend.url
.span-18
- if @friend.posts

View file

@ -42,7 +42,12 @@
var obj = jQuery.parseJSON(evt.data);
debug("got a " + obj['class']);
if((location.href.indexOf(obj['class']) != -1 ) || (location.pathname == '/')) {
$("#stream").prepend($(obj['html']).fadeIn("fast"));
$("#stream").prepend(
$(obj['html']).fadeIn("fast", function(){
$("#stream label:first").inFieldLabels();
}
)
);
};
};
ws.onclose = function() { debug("socket closed"); };
@ -59,7 +64,6 @@
});
// in field label plugin
$("label").inFieldLabels();
$(".show_post_comments").click( function() {
if( $(this).hasClass( "visible" )) {

View file

@ -46,8 +46,11 @@ $(document).ready(function(){
});
});
$("label").inFieldLabels();
$('#flash_notice, #flash_error, #flash_alert').delay(1500).slideUp(130);
$('#flash_notice, #flash_error, #flash_alert').delay(1500).slideUp(130);
});//end document ready