diff options
author | stephenbroyer <stephen.broyer@sonarsource.com> | 2013-08-08 17:50:13 +0200 |
---|---|---|
committer | stephenbroyer <stephen.broyer@sonarsource.com> | 2013-08-09 16:20:29 +0200 |
commit | 3101eb72ccb3ec055a653844852bcac161f3cafd (patch) | |
tree | 647a84a6652c0f36680c1957840d5a5f95aac30e /sonar-server | |
parent | 7b1835e8cbecd91f56af45f20da9409d0ba3b9ef (diff) | |
download | sonarqube-3101eb72ccb3ec055a653844852bcac161f3cafd.tar.gz sonarqube-3101eb72ccb3ec055a653844852bcac161f3cafd.zip |
SONAR-4517 move Quality Profiles pages to Jquery
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb index e62a6493690..34afac5ad91 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb @@ -8,12 +8,15 @@ <td class="form-key-cell"><%= parameter.name -%></td> <td class="form-val-cell"> - <%= form_remote_tag :url => {:action => :update_param, :id => active_param_id, :profile_id => profile.id, :param_id => parameter.id, :active_rule_id => active_rule_id}, - :update => {:success => "rule_#{rule.id}", :failure => "error_#{parameter.id}"}, - :loading => "$('param_loading_#{parameter.id}').show();", - :complete => "$('desc_#{rule.id}').show();", - :failure => "$('error_#{parameter.id}').show();$('param_loading_#{parameter.id}').hide();", - :html => {:name => "form-#{u parameter.name}"} %> + <form onsubmit="$j.ajax({ url: '<%= ApplicationController.root_context -%>/rules_configuration/update_param/<%=active_param_id-%>?active_rule_id=<%=active_rule_id-%>¶m_id=<%=parameter.id-%>&profile_id=<%=profile.id-%>', + type:'post',beforeSend: function(request){$j('#param_loading_<%=parameter.id-%>').show();$j('#error_<%=parameter.id-%>').hide();}, + data: $j(this).serialize(), + success: function(htmlSuccess){$j('#rule_<%=rule.id-%>').replaceWith(htmlSuccess);}, + complete: function(request){$j('#desc_<%=rule.id-%>').show();$j('#param_loading_<%=parameter.id-%>').hide();}, + error: function(request){$j('#error_<%=parameter.id-%>').text(request.responseText);$j('#error_<%=parameter.id-%>').show();} + }); return false;" + name="form-<%=u parameter.name-%>" method="post" + action="<%= ApplicationController.root_context -%>/rules_configuration/update_param/<%=active_param_id-%>?active_rule_id=<%=active_rule_id-%>¶m_id=<%=parameter.id-%>&profile_id=<%=profile.id-%>"> <div id="error_<%= parameter.id -%>" class="error" style="display: none"></div> |