Commit aab6e8718a6f2eb6ea2e189377f519d24e9ae849

Authored by Daniela Feitosa
1 parent 343eabbd

Using profile_icon to include a default image when commenting

Showing 1 changed file with 9 additions and 1 deletions   Show diff stats
app/views/profile/_profile_comment_form.rhtml
... ... @@ -2,7 +2,15 @@
2 2 <div id='profile-wall-reply-form-<%= activity.id%>'>
3 3 <p class='profile-wall-reply'>
4 4 <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_comment_on_activity'}, :update => 'profile_activities', :html => { :class => 'profile-wall-reply-form' } do %>
5   - <%= 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' } %>
  5 + <%= text_area :comment, :body, {:id => "reply_content_#{activity.id}",
  6 + :cols => 50,
  7 + :rows => 1,
  8 + :class => 'submit-with-keypress',
  9 + :title => _('Leave your comment'),
  10 + :onfocus => ('if(this.value==this.title){this.value="";this.style.color="#000"};this.style.backgroundImage="url(' + profile_icon(current_person, :icon, false) + ')"' if logged_in?),
  11 + :onblur => ('if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"' if logged_in?),
  12 + :value => _('Leave your comment'),
  13 + :style => 'color: #ccc' } %>
6 14 <%= hidden_field_tag :source_id, activity.id, :id => "activity_id_#{activity.id}" %>
7 15 <% end %>
8 16 </p>
... ...