From 4bdaf787d7f6641eb0a3678756686461381fe49e Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 23 May 2012 18:14:27 +0200 Subject: [PATCH] Filter widget : add the icon "loading" when clicking in pagination footer --- .../main/webapp/WEB-INF/app/helpers/filters_helper.rb | 6 +++++- .../webapp/WEB-INF/app/views/filters/_list.html.erb | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) 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 %> +
+ + -- 2.39.5