From 90e537e1fa0d57d90d080d9e6d9d1f0d1f939402 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 3 Mar 2017 09:07:16 -0700 Subject: [PATCH] Calendar - Planner view: Fix time grid lines did not reach all the way to the end --- calendar/js/et2_widget_planner.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/calendar/js/et2_widget_planner.js b/calendar/js/et2_widget_planner.js index 60135f0de0..bc0930c91c 100644 --- a/calendar/js/et2_widget_planner.js +++ b/calendar/js/et2_widget_planner.js @@ -1889,6 +1889,8 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e _deferred_row_update: function(id) { // Something's in progress, skip if(!this.doInvalidate) return; + + this.grid.height(0); var id_list = typeof id === 'undefined' ? Object.keys(this.cache) : [id]; for(var i = 0; i < id_list.length; i++) @@ -1908,6 +1910,11 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e break; } } + + // Updating the row may push things longer, update length + // Add 1 to keep the scrollbar, otherwise we need to recalculate the + // header widths too. + this.grid.height(this.rows[0].scrollHeight+1); }, /** @@ -2365,6 +2372,8 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e this.div.css('height', this.options.height); // Set height for rows this.rows.height(this.div.height() - this.headers.outerHeight()); + + this.grid.height(this.rows[0].scrollHeight); } });}).call(this); et2_register_widget(et2_calendar_planner, ["calendar-planner"]); \ No newline at end of file