mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
collapsible.js: Rename numofrows
to visible-rows
This commit is contained in:
parent
b8bdd743a2
commit
1ae1dc387f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user