From 1ae1dc387f1b1d3c7b6aad7281398c0dda84732c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 7 Jun 2019 08:11:19 +0200 Subject: [PATCH] collapsible.js: Rename `numofrows` to `visible-rows` --- public/js/icinga/behavior/collapsible.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/icinga/behavior/collapsible.js b/public/js/icinga/behavior/collapsible.js index e415b9baf..210b0b37b 100644 --- a/public/js/icinga/behavior/collapsible.js +++ b/public/js/icinga/behavior/collapsible.js @@ -18,7 +18,7 @@ this.on('click', '.collapsible + .collapsible-control', this.onControlClicked, this); this.icinga = icinga; - this.defaultNumOfRows = 2; + this.defaultVisibleRows = 2; this.defaultHeight = 36; this.collapsibleStates = this.getStateFromStorage(); @@ -106,7 +106,7 @@ Collapsible.prototype.canCollapse = function ($collapsible) { var rowSelector = this.getRowSelector($collapsible); if (!! rowSelector) { - return $(rowSelector, $collapsible).length > ($collapsible.data('numofrows') || this.defaultNumOfRows); + return $(rowSelector, $collapsible).length > ($collapsible.data('visibleRows') || this.defaultVisibleRows); } else { return $collapsible.innerHeight() > ($collapsible.data('height') || this.defaultHeight); } @@ -122,7 +122,7 @@ var rowSelector = this.getRowSelector($collapsible); if (!! rowSelector) { - var $rows = $(rowSelector, $collapsible).slice(0, $collapsible.data('numofrows') || this.defaultNumOfRows); + var $rows = $(rowSelector, $collapsible).slice(0, $collapsible.data('visibleRows') || this.defaultVisibleRows); var totalHeight = $rows.offset().top - $collapsible.offset().top; $rows.outerHeight(function (_, height) {