Commit 2d020ab73cf653c1a053a4d14d082e1615f4213f
1 parent
9e0361b9
Exists in
master
and in
29 other branches
Fix javascript behavior on comments
-The text "Leave your comment" did not disappear when clicking on it.
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
app/views/profile/_profile_comment_form.html.erb
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | :rows => 1, |
11 | 11 | :class => 'submit-with-keypress', |
12 | 12 | :title => _('Leave your comment'), |
13 | - :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?), | |
14 | - :onblur => ('if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"' if logged_in?), | |
13 | + :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?), | |
14 | + :onblur => ("if(this.value==''){this.value=this.title;this.style.color='#ccc'};this.style.backgroundImage='none'" if logged_in?), | |
15 | 15 | :value => _('Leave your comment'), |
16 | 16 | :style => 'color: #ccc' %> |
17 | 17 | <%= hidden_field_tag :source_id, activity.id, :id => "activity_id_#{activity.id}" %> | ... | ... |
app/views/profile/_profile_scrap_reply_form.html.erb
... | ... | @@ -9,9 +9,9 @@ |
9 | 9 | :rows => 1, |
10 | 10 | :class => 'submit-with-keypress', |
11 | 11 | :title => _('Leave your comment'), |
12 | - :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?), | |
13 | - :onblur => ('if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"' if logged_in?), | |
14 | - :value => _('Leave your comment') %> | |
12 | + :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?), | |
13 | + :onblur => ("if(this.value==''){this.value=this.title;this.style.color='#ccc'};this.style.backgroundImage='none'" if logged_in?), | |
14 | + :value => _('Leave your comment'), %> | |
15 | 15 | <%= hidden_field_tag 'scrap[scrap_id]', scrap.id %> |
16 | 16 | <%= hidden_field_tag 'receiver_id', scrap.sender.id %> |
17 | 17 | <% end %> | ... | ... |