summaryrefslogtreecommitdiff
path: root/web/views
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-05-16 10:00:45 +0200
committerJochen Topf <jochen@topf.org>2014-05-16 10:00:45 +0200
commitefc46707ec3fc8e680081afe4a4b21d2af6ca634 (patch)
tree217f1ab9089cb5d8c4069c5a9ffa37359f298357 /web/views
parent8addee3d7b3e1f745a75f3dbdcf278277801835a (diff)
downloadtaginfo-efc46707ec3fc8e680081afe4a4b21d2af6ca634.tar
taginfo-efc46707ec3fc8e680081afe4a4b21d2af6ca634.tar.gz
Better display of prevalent values on key comparison page.
Diffstat (limited to 'web/views')
-rw-r--r--web/views/key_comparison.erb7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/views/key_comparison.erb b/web/views/key_comparison.erb
index 2e89c2e..649e4a0 100644
--- a/web/views/key_comparison.erb
+++ b/web/views/key_comparison.erb
@@ -46,7 +46,7 @@
<% @keys.each_with_index do |key, num| %>
<td class="data key<%= num %>">
<p><b><%= h(t.misc.prevalent_values) %>:</b></p>
- <%= @prevalent_values[num].map{ |pv| "#{ pv['value'] } (#{ pv['count'].to_s_with_ts })" }.join(' &bull; ') %>
+ <div class="prevalent_values"></div>
</td>
<% end %>
</tr>
@@ -77,10 +77,13 @@
<% javascript do
JS.raw(<<"JAVASCRIPT")
function page_init2() {
- var keys = #{ @keys.to_json };
+ var keys = #{ @keys.to_json },
+ prevalent_values = #{ @prevalent_values.to_json };
jQuery.each(keys, function(index, key) {
jQuery('.key' + index + ' h2').html(link_to_key(key));
+ jQuery('.key' + index + ' div.prevalent_values').html(fmt_prevalent_value_list(key, prevalent_values[index]));
});
+ jQuery('div.prevalent_values a').tipsy({ opacity: 1, delayIn: 500, gravity: 'e' });
}
JAVASCRIPT
end