From ea02c906e1b2d6fe2daba8f9910ffb6abcac030a Mon Sep 17 00:00:00 2001 From: cigamit Date: Sun, 20 Jan 2019 12:57:33 -0600 Subject: [PATCH] -issue: Resizing table throws a JavaScript error --- CHANGELOG | 3 +++ include/layout.js | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 715146113..1e661d5ca 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -26,6 +26,9 @@ Cacti CHANGELOG -issue: Plugin dependency handling inconsistant -issue: Editing a report shows incorrect graphs from dropdown +develop +-issue: Resizing table throws a JavaScript error + 1.2.0 -feature: Add a Timeout setting for Remote Agent calls -feature: Add Graphs and Data Sources hyperlinks on Device page diff --git a/include/layout.js b/include/layout.js index 161891d09..a46c75599 100644 --- a/include/layout.js +++ b/include/layout.js @@ -2260,12 +2260,15 @@ function saveTableWidths(initial) { * the jQueryUI function resizable. It also calls the saveTableWidths function * to store the widths in localStorage every time a column is resized. */ function applyTableSizing() { + var originalSize = 0; + var colWidth = 0; + $('.tableHeader').not('.tableFixed').find('th').resizable({ handles: 'e', start: function(event, ui) { - var colWidth = $(this).width(); - var originalSize = ui.size.width; + colWidth = $(this).width(); + originalSize = ui.size.width; if (originalSize == 0) { originalSize = $(this).width();