]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4517 move settings pages to Jquery
authorstephenbroyer <stephen.broyer@sonarsource.com>
Mon, 2 Sep 2013 13:44:36 +0000 (15:44 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 11 Sep 2013 08:59:58 +0000 (10:59 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb

index e4efd116a7555fdd7fc3ad66c5d2903df77bf054..87aaaf1ddf746e9019f2019e9f2b6d5b9756b170 100644 (file)
@@ -1,11 +1,15 @@
 <% if @category.isSpecial -%>
   <%= render 'special', :url => url_for(:controller => "#{@category.key}_configuration") -%>
 <% else -%>
-  <% form_remote_tag :url => {:controller => 'settings', :action => 'update', :category => @category.key, :subcategory => @subcategory.key, :resource_id => (@resource && @resource.id)},
-                     :method => :post,
-                     :before => "$('submit_settings').hide();$('loading_settings').show();",
-                     :update => 'properties',
-                     :script => false do -%>
+  <form        onsubmit="$j('#submit_settings').hide();$j('#loading_settings').show();
+                  $j.ajax({ url:'<%= ApplicationController.root_context-%>/settings/update?category=<%= @category.key -%>&subcategory=<%= @subcategory.key -%>&resource_id=<%= @resource && @resource.id -%>',
+                            type:'post',
+                            success:function(responseHTML){$j('#properties').text(responseHTML.responseText);$j('#loading_settings').hide();$j('#submit_settings').show()},
+                            data:$j(this).serialize()});
+                  return false;"
+         method='post'
+         action=''
+  >
     <% subcategories = @subcategories_per_categories[@category] || [] -%>
     <ul class="tabs2">
       <% subcategories.each do |subcategory| -%>
       </div>
       <% end %>
     <% end %>
+  </form>
   <% end -%>
-<% end -%>
+
+
 
 <script>
   $j(document)