From 9e40e55b8c654ba6c5bb43fa41509ec7782cf7d4 Mon Sep 17 00:00:00 2001 From: diver-sity Date: Sat, 13 Sep 2014 16:29:20 +1000 Subject: [PATCH] WEB-64 The left-side navigation bar now appear to be of the same height as the browser window's height. The bar's height also changes when the window is resized. Testing is carried out in two recent versions of Firefox and Chrome. --- src/main/webapp/css/main.css | 1 - src/main/webapp/js/application.js | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/css/main.css b/src/main/webapp/css/main.css index 69188bdf9..501d21d14 100644 --- a/src/main/webapp/css/main.css +++ b/src/main/webapp/css/main.css @@ -156,7 +156,6 @@ img { } #leftside-navigation { - height:400px; overflow-y:scroll; overflow-x:hidden; } diff --git a/src/main/webapp/js/application.js b/src/main/webapp/js/application.js index 926cc58fb..785331d95 100644 --- a/src/main/webapp/js/application.js +++ b/src/main/webapp/js/application.js @@ -8,6 +8,10 @@ var app = function() { // menu is handled by angular //menu(); togglePanel(); + sideBarLeftInit(); + window.onresize = function(){ + sideBarLeftInit(); + } closePanel(); }; @@ -203,6 +207,9 @@ var app = function() { $('.slider-span').slider() }; + var sideBarLeftInit = function(){ + $("#leftside-navigation").css("height", (window.innerHeight-80)+"px"); + }; //return functions return { @@ -211,9 +218,10 @@ var app = function() { map: map, sliders: sliders, weather: weather, - morrisPie: morrisPie - + morrisPie: morrisPie, + sideBarLeftInit:sideBarLeftInit }; + + }(); -