Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
enh(upgrade): display release notes per section
Browse files Browse the repository at this point in the history
  • Loading branch information
adr-mo committed Oct 25, 2019
1 parent 6aa6e7e commit 06f714d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
28 changes: 28 additions & 0 deletions www/Themes/Centreon-2/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2790,3 +2790,31 @@ ul.module_list {
white-space: nowrap;
margin-right: 10px;
}

#installationContent .accordion {
background-color: #d6d5d5;
color: #444;
cursor: pointer;
padding: 5px;
text-align: left;
border: none;
outline: none;
transition: 0.4s;
}

#contentwrapper div.section {
padding: 0 10px;
}

#contentwrapper > div:not(:nth-child(2)) div.section {
display: none;
padding: 0 10px;
background-color: #d6d5d5;
overflow: hidden;
}

.accordion h1:hover {
background-color: #c3c3c3;
cursor: pointer;
}

27 changes: 26 additions & 1 deletion www/install/step_upgrade/step3.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,32 @@
var step3_t;

jQuery(function () {
jQuery('#releasenotes').load('RELEASENOTES.html');
jQuery('#releasenotes').load('RELEASENOTES.html', function() {
/* add accordion class to all div matching centreon-web-* id */
jQuery('div[id^="centreon-web-"]').addClass('accordion');

var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function() {
/* Toggle between adding and removing the "active" class,
to highlight the button that controls the panel */
this.classList.toggle("active");

/* Toggle between hiding and showing the active panel */
var panels = this.getElementsByClassName("section");
var j;
for (j = 0; j < panels.length; j++) {
if (panels[j].style.display === "block") {
panels[j].style.display = "none";
} else {
panels[j].style.display = "block";
}
}
});
}
});
jQuery('#next').attr('disabled', 'disabled');
timeout_button();
});
Expand Down

0 comments on commit 06f714d

Please sign in to comment.