Skip to content
Snippets Groups Projects
Commit d3d7131c authored by danielvincent's avatar danielvincent
Browse files

stream using data-guid for messages. view fix in photo show

parent 675ebde5
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@
});
function processRetraction(post_id){
$('#' + post_id ).fadeOut(500).remove();
$("*[data-guid='"+post_id+"']").fadeOut(400, function(){$(this).remove()});
if($("#stream")[0].childElementCount == 0){
$("#no_posts").fadeIn(200);
}
......
......@@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%li.message{:id => post.id}
%li.message{:data=>{:guid=>post.id}}
= person_image_tag(post.person)
......@@ -20,7 +20,7 @@
- if current_user.owns?(post)
.right
= link_to t('.delete'), status_message_path(post), :confirm => t('.are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= link_to t('.delete'), photo_path(post), :confirm => t('.are_you_sure'), :method => :delete, :remote => true, :class => "delete"
=t('.posted_a_new_photo_to')
= link_to post.album.name, object_path(post.album)
......
......@@ -76,9 +76,13 @@
%div{:id => @photo.id}
#show_photo
.edit_pane
.controls{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}}
= link_to 'make profile photo', '#', :class => "make_profile_photo"
-if current_user.owns? @photo
.edit_pane
.controls{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}}
= link_to 'make profile photo', '#', :class => "make_profile_photo"
= linked_scaled_photo @photo, @album
-else
= linked_scaled_photo @photo, @album
.caption
-if current_user.owns? @photo
......
......@@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%li.message{:id => post.id, :class => ("mine" if current_user.owns?(post))}
%li.message{ :data=>{:guid=>post.id}, :class => ("mine" if current_user.owns?(post))}
= person_image_link(post.person)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment