Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
ba4468f9cc
6 changed files with 47 additions and 46 deletions
8
.pairs
Normal file
8
.pairs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
pairs:
|
||||
dg: Daniel Grippi; daniel
|
||||
rs: Raphael Sofaer; raphael
|
||||
iz: Ilya Zhitomirskiy; ilya
|
||||
ms: Maxwell Salzberg; maxwell
|
||||
email:
|
||||
prefix: pair
|
||||
domain: joindiaspora.com
|
||||
|
|
@ -14,11 +14,9 @@ class PeopleController < ApplicationController
|
|||
def show
|
||||
@person = current_user.visible_person_by_id(params[:id])
|
||||
@profile = @person.profile
|
||||
@person_groups = current_user.groups_with_person(@person)
|
||||
|
||||
|
||||
@groups_array = current_user.groups.collect{|x| [x.to_s, x.id]}
|
||||
|
||||
@groups_with_person = current_user.groups_with_person(@person)
|
||||
@all_groups = current_user.groups.collect{|x| [x.to_s, x.id]}
|
||||
|
||||
@posts = Post.where(:person_id => @person.id, :_id.in => current_user.visible_post_ids).paginate :page => params[:page], :order => 'created_at DESC'
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,6 @@ class Photo < Post
|
|||
end
|
||||
|
||||
def thumb_hash
|
||||
{:thumb_url => image.url(:thumb_medium), :id => id, :album_id => album_id}
|
||||
{:thumb_url => url(:thumb_medium), :id => id, :album_id => album_id}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,17 +13,15 @@
|
|||
-unless @posts.first.nil?
|
||||
%li
|
||||
%i= "last seen: #{how_long_ago(@posts.first)}"
|
||||
%li
|
||||
%i= "friends since: #{how_long_ago(@person)}"
|
||||
%li
|
||||
="groups: #{@person_groups}"
|
||||
= "edit"
|
||||
= @groups_array.inspect
|
||||
= form_tag move_person_path
|
||||
= select :to, :to, @groups_array
|
||||
= hidden_field_tag :from, :from, :value => @person_groups.first.id
|
||||
= hidden_field_tag :friend_id, :friend_id, :value => @person.id
|
||||
= submit_tag "save"
|
||||
- unless @person == current_user.person
|
||||
%li
|
||||
%i= "friends since: #{how_long_ago(@person)}"
|
||||
%li
|
||||
= form_tag move_person_path
|
||||
= select :to, :to, @all_groups
|
||||
= hidden_field_tag :from, :from, :value => @groups_with_person.first.id
|
||||
= hidden_field_tag :friend_id, :friend_id, :value => @person.id
|
||||
= submit_tag "save"
|
||||
%li
|
||||
url:
|
||||
= @person.url
|
||||
|
|
|
|||
|
|
@ -1,33 +1,3 @@
|
|||
:javascript
|
||||
$(function() {
|
||||
$("#photo_image").html5_upload({
|
||||
// WE INSERT ALBUM_ID PARAM HERE
|
||||
url: "/photos?album_id=#{@album.id}",
|
||||
sendBoundary: window.FormData || $.browser.mozilla,
|
||||
setName: function(text) {
|
||||
$("#progress_report_name").text(text);
|
||||
},
|
||||
onFinish: function(event, total){
|
||||
$("#add_photo_button").html( "Add Photos" );
|
||||
$("#add_photo_loader").fadeOut(400);
|
||||
|
||||
$("#photo_title_status").text("Done!");
|
||||
$("#progress_report").html("Good job me!");
|
||||
|
||||
$("#add_photo_button").addClass("uploading_complete");
|
||||
},
|
||||
onStart: function(event, total){
|
||||
$("#add_photo_button").html( "Uploading Photos" );
|
||||
$("#add_photo_loader").fadeIn(400);
|
||||
|
||||
$("form").fadeOut(0);
|
||||
$("#progress_report").fadeIn(0);
|
||||
$("#photo_title_status").text("Uploading...");
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
%h1
|
||||
%span{:id=>"photo_title_status"}
|
||||
Add photos to
|
||||
|
|
|
|||
|
|
@ -22,3 +22,30 @@ function reset_photo_fancybox(){
|
|||
$("#new_photo_pane").html(ajax.responseText)
|
||||
});
|
||||
}
|
||||
|
||||
$("#photo_image").html5_upload({
|
||||
// WE INSERT ALBUM_ID PARAM HERE
|
||||
url: "/photos?album_id="+$(".album_id")[0].id,
|
||||
sendBoundary: window.FormData || $.browser.mozilla,
|
||||
setName: function(text) {
|
||||
$("#progress_report_name").text(text);
|
||||
},
|
||||
onFinish: function(event, total){
|
||||
$("#add_photo_button").html( "Add Photos" );
|
||||
$("#add_photo_loader").fadeOut(400);
|
||||
|
||||
$("#photo_title_status").text("Done!");
|
||||
$("#progress_report").html("Good job me!");
|
||||
|
||||
$("#add_photo_button").addClass("uploading_complete");
|
||||
},
|
||||
onStart: function(event, total){
|
||||
$("#add_photo_button").html( "Uploading Photos" );
|
||||
$("#add_photo_loader").fadeIn(400);
|
||||
|
||||
$("form.new_photo").fadeOut(0);
|
||||
$("#progress_report").fadeIn(0);
|
||||
$("#photo_title_status").text("Uploading...");
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue