From 8044080b25130045da8cae941e1eb4fa374dc07d Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Tue, 28 May 2013 16:11:03 -0400 Subject: [PATCH] fixed height w/ JS --- app/views/paid_time_off/index.html.erb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/views/paid_time_off/index.html.erb b/app/views/paid_time_off/index.html.erb index f1ceeca..59685d0 100644 --- a/app/views/paid_time_off/index.html.erb +++ b/app/views/paid_time_off/index.html.erb @@ -3,14 +3,14 @@
-
+
PTO Calendar
-
+
@@ -24,7 +24,7 @@
-
+
<%= form_for @schedule, :url => "#",:html => {:id => "cal_update"} do |s|%>
<%= s.label :event_name, "Event Name", {:class => "control-label"}%> @@ -116,8 +116,9 @@ $('.date_picker').daterangepicker({ }); $(document).ready(function () { - drawChart1() - drawChart2() + drawChart1(), + drawChart2(), + resizeTopWidgets() }); google.load("visualization", "1", { @@ -192,6 +193,11 @@ function drawChart2() { chart.draw(data, options); } +function resizeTopWidgets(){ + var calHeight = $("#calendarDiv").height(); + $("#scheduleDiv").css({'height':calHeight}); +}; + $("#cal_update_submit").click(function(event) { var valuesToSubmit = $("#cal_update").serialize(); event.preventDefault();