From 03ef06e4baf2895debe7e561b00d4dae8e1e0d95 Mon Sep 17 00:00:00 2001 From: Caio SBA Date: Thu, 23 Feb 2012 23:47:38 -0200 Subject: [PATCH] Wall fixes after review --- app/views/profile/_comment.rhtml | 2 +- app/views/profile/_create_article.rhtml | 2 +- app/views/profile/_default_activity.rhtml | 2 +- app/views/profile/_profile_comment_form.rhtml | 7 +------ app/views/profile/_profile_scrap.rhtml | 2 +- config/initializers/action_tracker.rb | 2 +- public/images/gallery-image-activity-border.png | Bin 665 -> 0 bytes public/stylesheets/application.css | 34 ++++++++++++++++++++++++++-------- 8 files changed, 32 insertions(+), 19 deletions(-) diff --git a/app/views/profile/_comment.rhtml b/app/views/profile/_comment.rhtml index 2a6dcf5..a4de820 100644 --- a/app/views/profile/_comment.rhtml +++ b/app/views/profile/_comment.rhtml @@ -13,7 +13,7 @@
- <%= link_to(Person.find(comment.author_id).name, Person.find(comment.author_id).url) %>
<%= txt2html comment.body %> + <%= link_to(Person.find(comment.author_id).name, Person.find(comment.author_id).url) %> <%= txt2html comment.body %>
<%= time_ago_as_sentence(comment.created_at) %> diff --git a/app/views/profile/_create_article.rhtml b/app/views/profile/_create_article.rhtml index 584ebd1..6254a55 100644 --- a/app/views/profile/_create_article.rhtml +++ b/app/views/profile/_create_article.rhtml @@ -11,6 +11,6 @@

<%= time_ago_as_sentence(activity.created_at) + ' ' + _('ago') %>

<%= link_to _('Comment'), "#reply_content_#{activity.id}" %> - <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %> + <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :confirm => _('Are you sure?'), :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %>
diff --git a/app/views/profile/_default_activity.rhtml b/app/views/profile/_default_activity.rhtml index c4d0905..000264d 100644 --- a/app/views/profile/_default_activity.rhtml +++ b/app/views/profile/_default_activity.rhtml @@ -6,6 +6,6 @@

<%= time_ago_as_sentence(activity.created_at) + ' ' + _('ago') %>

<%= link_to _('Comment'), "#reply_content_#{activity.id}" %> - <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %> + <%= link_to_remote(content_tag(:span, _('Remove')), :confirm => _('Are you sure?'), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %>
diff --git a/app/views/profile/_profile_comment_form.rhtml b/app/views/profile/_profile_comment_form.rhtml index a446b90..eb02453 100644 --- a/app/views/profile/_profile_comment_form.rhtml +++ b/app/views/profile/_profile_comment_form.rhtml @@ -2,12 +2,7 @@

<% form_remote_tag :url => {:controller => 'profile', :action => 'leave_comment_on_activity'}, :update => 'profile_activities', :html => { :class => 'profile-wall-reply-form' } do %> - <%= text_area :comment, :body, {:id => "reply_content_#{activity.id}", :cols => 50, :rows => 1, :class => 'submit-with-keypress', :title => _('Leave your comment'), - :onfocus => 'if(this.value==this.title){this.value="";this.style.color="#000"}', - :onblur => 'if(this.value==""){this.value=this.title;this.style.color="#ccc"}', :value => _('Leave your comment'), :style => 'color: #ccc' } %> - <%#= text_area :comment, :body, {:id => "reply_content_#{activity.id}", :cols => 50, :rows => 1, :class => 'submit-with-keypress', :title => _('Leave your comment'), - :onfocus => 'if(this.value==this.title){this.value="";this.style.color="#000"};this.style.backgroundImage="url(' + current_person.profile_custom_icon + ')"', - :onblur => 'if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"', :value => _('Leave your comment'), :style => 'color: #ccc' } %> + <%= text_area :comment, :body, {:id => "reply_content_#{activity.id}", :cols => 50, :rows => 1, :class => 'submit-with-keypress', :title => _('Leave your comment'), :onfocus => ('if(this.value==this.title){this.value="";this.style.color="#000"};this.style.backgroundImage="url(' + current_person.profile_custom_icon + ')"' if logged_in?), :onblur => ('if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"' if logged_in?), :value => _('Leave your comment'), :style => 'color: #ccc' } %> <%= hidden_field_tag :source_id, activity.id, :id => "activity_id_#{activity.id}" %> <% end %>

diff --git a/app/views/profile/_profile_scrap.rhtml b/app/views/profile/_profile_scrap.rhtml index 29fb1e9..8090f98 100644 --- a/app/views/profile/_profile_scrap.rhtml +++ b/app/views/profile/_profile_scrap.rhtml @@ -10,7 +10,7 @@ <% if logged_in? && current_person.follows?(scrap.sender) %> <%= link_to_function _('Comment'), "hide_and_show(['#profile-activity-reply-response-#{scrap.id}'],['#profile-activity-reply-#{scrap.id}', '#profile-activity-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();$('scrap_id_#{scrap.id}').value='#{scrap.id}';return false", :class => "profile-send-reply" %> <% end %> - <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_scrap', :scrap_id => scrap.id}, :update => "profile-activity-item-#{scrap.id}") if logged_in? && user.can_control_scrap?(scrap) %> + <%= link_to_remote(content_tag(:span, _('Remove')), :confirm => _('Are you sure?'), :url =>{:action => 'remove_scrap', :scrap_id => scrap.id}, :update => "profile-activity-item-#{scrap.id}") if logged_in? && user.can_control_scrap?(scrap) %> <% end %>