Skip to content

Commit

Permalink
correctly guess graph index
Browse files Browse the repository at this point in the history
  • Loading branch information
pyr committed Feb 9, 2012
1 parent 440cefe commit f854181
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions views/dashboard.erb
Expand Up @@ -3,9 +3,11 @@
<div class="row">
<table>
<% row = 1 %>
<% @dashboard.graphs.in_groups_of(@graph_columns) do |graphs| %>
<% grouped_graphs = @dashboard.graphs.in_groups_of(@graph_columns) %>
<% grouped_graphs.each do |graphs| %>
<tr>
<% graphs.each_with_index do |graph,i| %>
<% graphs.each do |graph| %>
<% i = grouped_graphs.rindex(graphs) * @graph_columns + graphs.rindex(graph) %>
<td>
<% if graph %>
<% if graph[:graphite][:description] %>
Expand All @@ -29,19 +31,13 @@
.popover({
placement: "above", delayIn: 1000
})
.click(function(e) {
e.preventDefault()
})
})

$(function () {
$("img[rel=popover-below]")
.popover({
placement: "below", delayIn: 1000
})
.click(function(e) {
e.preventDefault()
})
})
</script>
<% end %>

0 comments on commit f854181

Please sign in to comment.