diff options
author | stephenbroyer <stephen.broyer@sonarsource.com> | 2013-09-04 16:14:27 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-09-11 11:00:23 +0200 |
commit | 01331def77e52d4865b8e4110ec23f27f7e115d4 (patch) | |
tree | f863f13de73314ec21e7e4e2f404b9d3c4f5998c /sonar-server | |
parent | 1a0af79428234fc3fb9e5feef5b5552537010d53 (diff) | |
download | sonarqube-01331def77e52d4865b8e4110ec23f27f7e115d4.tar.gz sonarqube-01331def77e52d4865b8e4110ec23f27f7e115d4.zip |
SONAR-4611 Remove prototypejs from Quality Profiles console
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb index 4c8c843226c..e0915e46b83 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb @@ -19,11 +19,14 @@ <a href="#" id="<%= edit_active_note_link_id -%>" class="link-action" onclick="$j('#<%= active_note_detail_div_id -%>').hide();$j('#<%= active_note_form_div_id -%>').show();$j('#<%= active_note_textarea_id -%>').focus();return false;"><%= message('edit') %></a> - <%= link_to_remote message('delete'), - :url => {:action => 'delete_active_rule_note', :active_rule_id => active_rule.id }, - :update => "active_rule_note_#{active_rule.id}", - :confirm => message('rules_configuration.confirm_delete_note'), - :html => {:class => 'link-action'} -%> + <a class="link-action" + onclick="if(confirm('<%= escape_javascript(message('rules_configuration.confirm_delete_note')) -%>')){ + $j.ajax({ + url: '<%=ApplicationController.root_context-%>/rules_configuration/delete_active_rule_note?active_rule_id=<%=active_rule.id-%>', + type: 'post', + success:function(response){$j('#active_rule_note_<%= active_rule.id -%>').html(response);} + });};" + href="#!"><%=message('delete')-%></a> <% end %> </cite> <p><%= note.html_text -%></p> @@ -36,8 +39,15 @@ <% if profiles_administrator? %> - <%= form_remote_tag :url => {:action => 'update_active_rule_note', :active_rule_id => active_rule.id}, - :update => "active_rule_note_#{active_rule.id}" -%> + <form onsubmit="$j.ajax({ + url:'<%= ApplicationController.root_context -%>/rules_configuration/update_active_rule_note?active_rule_id=<%=active_rule.id-%>', + data: $j(this).serialize(), + type:'post', + success:function(response){$j('#active_rule_note_<%= active_rule.id -%>').html(response);} + }); + return false;" + method="post" + action="<%= ApplicationController.root_context -%>/rules_configuration//update_active_rule_note?active_rule_id=<%=active_rule.id-%>"> <table id="<%= active_note_form_div_id -%>" style="display: none" class="admin table width100"> <tbody> <tr> |