From 0574f44bd959f413a34fac361d038a5fd419cd03 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 6 Jun 2019 14:40:48 +0200 Subject: [PATCH] colllapsibleContainer.js: Rename to collapsible.js --- library/Icinga/Web/JavaScript.php | 2 +- .../{collapsibleContainer.js => collapsible.js} | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) rename public/js/icinga/behavior/{collapsibleContainer.js => collapsible.js} (88%) diff --git a/library/Icinga/Web/JavaScript.php b/library/Icinga/Web/JavaScript.php index cb80ff647..f906dbb05 100644 --- a/library/Icinga/Web/JavaScript.php +++ b/library/Icinga/Web/JavaScript.php @@ -24,7 +24,7 @@ class JavaScript 'js/icinga/timezone.js', 'js/icinga/behavior/application-state.js', 'js/icinga/behavior/autofocus.js', - 'js/icinga/behavior/collapsibleContainer.js', + 'js/icinga/behavior/collapsible.js', 'js/icinga/behavior/detach.js', 'js/icinga/behavior/tooltip.js', 'js/icinga/behavior/sparkline.js', diff --git a/public/js/icinga/behavior/collapsibleContainer.js b/public/js/icinga/behavior/collapsible.js similarity index 88% rename from public/js/icinga/behavior/collapsibleContainer.js rename to public/js/icinga/behavior/collapsible.js index f76a55c49..243b3684b 100644 --- a/public/js/icinga/behavior/collapsibleContainer.js +++ b/public/js/icinga/behavior/collapsible.js @@ -11,7 +11,7 @@ * * @param icinga Icinga The current Icinga Object */ - var CollapsibleContainer = function (icinga) { + var Collapsible = function (icinga) { Icinga.EventListener.call(this, icinga); this.on('rendered', '#col2', this.onRendered, this); @@ -22,14 +22,14 @@ this.defaultNumOfRows = 2; this.defaultHeight = 36; }; - CollapsibleContainer.prototype = new Icinga.EventListener(); + Collapsible.prototype = new Icinga.EventListener(); /** * Initializes all collapsibles. Triggered on rendering of a container. * * @param event Event The `onRender` event triggered by the rendered container */ - CollapsibleContainer.prototype.onRendered = function(event) { + Collapsible.prototype.onRendered = function(event) { var _this = event.data.self; $('.collapsible', event.currentTarget).each(function() { @@ -48,7 +48,7 @@ * * @param event Event The `onClick` event triggered by the clicked collapsible-control element */ - CollapsibleContainer.prototype.onControlClicked = function(event) { + Collapsible.prototype.onControlClicked = function(event) { var _this = event.data.self; var $target = $(event.currentTarget); var $collapsible = $target.prev('.collapsible'); @@ -66,7 +66,7 @@ * * @param $collapsible jQuery The given collapsible container element */ - CollapsibleContainer.prototype.updateCollapsedState = function($collapsible) { + Collapsible.prototype.updateCollapsedState = function($collapsible) { var collapsiblePath = this.icinga.utils.getCSSPath($collapsible); if (typeof this.expandedContainers[collapsiblePath] === 'undefined') { this.expandedContainers[collapsiblePath] = $collapsible.is('.collapsed'); @@ -103,7 +103,7 @@ * * @returns {string} */ - CollapsibleContainer.prototype.getRowSelector = function ($collapsible) { + Collapsible.prototype.getRowSelector = function ($collapsible) { if ($collapsible.is('table')) { return '> tbody > th, > tbody > tr'; } else if ($collapsible.is('ul, ol')) { @@ -120,7 +120,7 @@ * * @returns {boolean} */ - CollapsibleContainer.prototype.canCollapse = function ($collapsible) { + Collapsible.prototype.canCollapse = function ($collapsible) { var rowSelector = this.getRowSelector($collapsible); if (!! rowSelector) { return $(rowSelector, $collapsible).length > ($collapsible.data('numofrows') || this.defaultNumOfRows); @@ -129,6 +129,6 @@ } }; - Icinga.Behaviors.collapsibleContainer = CollapsibleContainer; + Icinga.Behaviors.Collapsible = Collapsible; })(Icinga, jQuery);