From: Simon Brandhof Date: Wed, 23 May 2012 16:14:27 +0000 (+0200) Subject: Filter widget : add the icon "loading" when clicking in pagination footer X-Git-Tag: 3.1~95 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4bdaf787d7f6641eb0a3678756686461381fe49e;p=sonarqube.git Filter widget : add the icon "loading" when clicking in pagination footer --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb index de2ccd271da..b608b9fae2b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb @@ -20,7 +20,11 @@ module FiltersHelper def goto_page(msg, filter, update_id, override={}) - link_to_remote msg, {:update => "filter-#{update_id}", :url => params.merge({:controller => :filters, :action => :list, :id => filter.id, :edit_mode => @edit_mode, :update_id => update_id}.merge(override))} + link_to_remote msg, { + :update => "filter-#{update_id}", + :url => params.merge({:controller => :filters, :action => :list, :id => filter.id, :edit_mode => @edit_mode, :update_id => update_id}.merge(override)), + :after => "$('filter-pages-#{update_id}').hide();$('filter-loading-#{update_id}').show();" + } end def column_title(column, filter, update_id) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb index 4eb53431780..27592eb2456 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb @@ -35,6 +35,7 @@ +
<%= pluralize(@filter_context.size, message('result').downcase) %> <% @@ -68,10 +69,10 @@ <% end %> <% for index in start_page..end_page %> - <% unless index==current_page %> - <%= goto_page index.to_s, filter, update_id, :page_id => index %> - <% else %> + <% if index==current_page %> <%= index.to_s -%> + <% else %> + <%= goto_page index.to_s, filter, update_id, :page_id => index %> <% end %> <% end %> @@ -90,6 +91,9 @@    <%= image_tag 'rss-12x12.png' %> <%= message('alerts_feed') -%> <% end %> +
+ +