<%
- treemap_id = 1
- if defined? widget
- treemap_id = widget.id
+ treemap_id = 1
+ if defined? widget
+ treemap_id = widget.id
%>
- <span class="note"><%= message('size') -%>: <b><%= filter.display.size_metric.short_name -%></b></span>
- <% if filter.display.color_metric %>
-
- <span class="note"><%= message('color') -%>: <b><%= filter.display.color_metric.short_name -%></b> <%= render :partial => 'treemap/gradient', :locals => {:metric => filter.display.color_metric} %></span>
- <% end %>
+ <table class="spaced">
+ <tr>
+ <% if filter.display.size_metric %>
+ <td class="thin nowrap"><span class="note"><%= message('size') -%>: <b><%= filter.display.size_metric.short_name -%></b></span></td>
+ <% end %>
+ <% if filter.display.color_metric %>
+ <td class="thin nowrap">
+ <span class="note"><%= message('color') -%>
+ : <b><%= filter.display.color_metric.short_name -%></b> <%= render :partial => 'treemap/gradient', :locals => {:metric => filter.display.color_metric} %></span>
+ </td>
+ <% end %>
+ <td>
+ <%= image_tag 'loading-small.gif', :id => "tm-loading-#{treemap_id}", :style => 'display:none' -%>
+ </td>
+ </tr>
+ </table>
<% else %>
<table class="spaced width100">
<tr>
<td valign="top" class="thin nowrap">
- <span class="comments"><%= message('size') -%></span>
- <br/>
- <%= metric_select_tag 'tmSize', Metric.all.select { |m| m.treemap_size? },
- :html_id => 'select-tm-size',
- :selected_key => filter.display.size_metric.key -%>
+ <span class="comments"><%= message('size') -%></span>
+ <br/>
+ <%= metric_select_tag 'tmSize', Metric.all.select { |m| m.treemap_size? },
+ :html_id => 'select-tm-size',
+ :selected_key => filter.display.size_metric.key -%>
</td>
<td valign="top" class="thin nowrap">
<span class="comments"><%= message('color') -%></span>