diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index 3c88de453861ce419a12cf91a487f354d5846879..78312f5feedbdddf95c05d0a1c4e74b3b923c8ca 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -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); } diff --git a/app/views/photos/_photo.haml b/app/views/photos/_photo.haml index 5b7d8462e0aa586bad84959fcac22b544ff0f7f8..e3f1a5573fa5d04e2b061a436c5c0baa958db2de 100644 --- a/app/views/photos/_photo.haml +++ b/app/views/photos/_photo.haml @@ -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) diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index 58f6a97bd69ea8d275af70b40738a4495e276806..f714d9783fc9f7425877fc4d07283745d9e714d6 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -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 diff --git a/app/views/status_messages/_status_message.html.haml b/app/views/status_messages/_status_message.html.haml index 47485d6856a8d65bdf1890d81c24c6dae733ac86..7e065b475f5384c23b10dfde92b322e8616be187 100644 --- a/app/views/status_messages/_status_message.html.haml +++ b/app/views/status_messages/_status_message.html.haml @@ -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)