diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-05-23 18:14:27 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-05-23 18:16:10 +0200 |
commit | 4bdaf787d7f6641eb0a3678756686461381fe49e (patch) | |
tree | 3b743ecc126ae721b6d287436d836296436043d5 /sonar-server | |
parent | 53d780a40c7d80ede0e993fa7675d2b356f1b917 (diff) | |
download | sonarqube-4bdaf787d7f6641eb0a3678756686461381fe49e.tar.gz sonarqube-4bdaf787d7f6641eb0a3678756686461381fe49e.zip |
Filter widget : add the icon "loading" when clicking in pagination footer
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb | 6 | ||||
-rw-r--r-- | sonar-server/src/main/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 @@ <tfoot> <tr> <td colspan="<%= filter.columns.size + 1 -%>"> + <div id="filter-pages-<%= update_id -%>"> <span id="results_count"><%= pluralize(@filter_context.size, message('result').downcase) %></span> <% @@ -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 @@ <a href="<%= url_for :controller => :feeds, :action => 'projects', :id => EventCategory::KEY_ALERT -%>" class="nolink"><%= image_tag 'rss-12x12.png' %></a> <a href="<%= url_for :controller => :feeds, :action => 'projects', :id => EventCategory::KEY_ALERT -%>" class="action"><%= message('alerts_feed') -%></a> <% end %> + </div> + <div id="filter-loading-<%= update_id -%>" style="display: none"><%= image_tag 'loading.gif' %></div> + </td> </tr> </tfoot> |