From 40ecbe2135b9d7470b313667cc74ab88b20e95cc Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Wed, 9 Nov 2016 17:02:58 +0100 Subject: [PATCH] Use col-scrollable for columns that need fixed height --- src/scripts/tutti/00_utils.js | 6 ++++++ src/templates/attract/shots/for_project.jade | 7 ------- src/templates/attract/tasks/for_project.jade | 7 ------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/scripts/tutti/00_utils.js b/src/scripts/tutti/00_utils.js index 229dfab..ce09930 100644 --- a/src/scripts/tutti/00_utils.js +++ b/src/scripts/tutti/00_utils.js @@ -131,3 +131,9 @@ $('#modal').on('hidden.bs.modal', function () { $("#modal .modal-body").html(''); }); + +// Set height of shot-list and item details so we can scroll inside them +$(window).on('load resize', function(){ + var window_height = $(this).height() - 50; // header is 50px + $('.col-scrollable').css({'height': window_height}); +}); diff --git a/src/templates/attract/shots/for_project.jade b/src/templates/attract/shots/for_project.jade index 95cf6ad..776a4db 100644 --- a/src/templates/attract/shots/for_project.jade +++ b/src/templates/attract/shots/for_project.jade @@ -135,11 +135,4 @@ script. handleSelector: ".col-splitter", resizeHeight: false }); - - // Set height of shot-list and item details so we can scroll inside them - $(window).on('load resize', function(){ - var window_height = $(window).height() - 50; // header is 50px - $('#shot-list').css({'height': window_height}); - $('#item-details').css({'height': window_height}); - }); | {% endblock footer_scripts %} diff --git a/src/templates/attract/tasks/for_project.jade b/src/templates/attract/tasks/for_project.jade index 5cbf7b4..de209c3 100644 --- a/src/templates/attract/tasks/for_project.jade +++ b/src/templates/attract/tasks/for_project.jade @@ -51,11 +51,4 @@ script. handleSelector: ".col-splitter", resizeHeight: false }); - - $(window).on('load resize', function(){ - var window_height = $(window).height() - 50; - var task_list = document.getElementById('task-list'); - $('#task-list').css({'height': window_height}); - $('#item-details').css({'height': window_height}); - }); | {% endblock %}