need to create the bar graph version, write up the remaining parts of the tutorial, and ensure it did not break the DOM vuln
This commit is contained in:
@@ -2,9 +2,34 @@
|
||||
<div class="main-container">
|
||||
<div class="row-fluid">
|
||||
<div class="span12"> <!--begin span12 -->
|
||||
<% if @user.paid_time_off %>
|
||||
<%= render :partial => "layouts/dashboard/dashboard_stats"%>
|
||||
<% end %>
|
||||
<div class="widget">
|
||||
<div class="widget-header">
|
||||
<div class="title">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span> Current Statistics
|
||||
</div>
|
||||
<!-- Begin Title Buttons-->
|
||||
<div class="tools pull-right">
|
||||
<div class="btn-group">
|
||||
<a id="change_to_bar_graph" class="btn btn-small">
|
||||
<span data-icon=""></span>
|
||||
</a>
|
||||
<a id="change_to_pie_charts" class="btn btn-small">
|
||||
<span data-icon=""></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Title Buttons-->
|
||||
</div>
|
||||
<div id="charts_body" class="widget-body">
|
||||
<% if @user.paid_time_off %>
|
||||
<%= render :partial => "layouts/dashboard/dashboard_stats"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end span12 -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -159,9 +184,21 @@ function pieChartHome() {
|
||||
|
||||
}
|
||||
|
||||
$("#change_to_bar_graph").click(function(event) {
|
||||
event.preventDefault();
|
||||
$("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "bar_graph").inspect %>);
|
||||
|
||||
})
|
||||
|
||||
$("#change_to_pie_charts").click(function(event) {
|
||||
event.preventDefault();
|
||||
$("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "pie_charts").inspect %>);
|
||||
})
|
||||
|
||||
$(document).ready(
|
||||
makeActive,
|
||||
pieChartHome()
|
||||
);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user