* Checks for all positions if it has visible content. * If not, if will hide the position to prevent unwanted margins. * This method should be called by the show and hide methods. * * Example: * If the top_bar only contains the update notification. And no update is available, * the update noti
()
| 428 | * update notification is not visible. |
| 429 | */ |
| 430 | function updateWrapperStates () { |
| 431 | modulePositions.forEach(function (position) { |
| 432 | const wrapper = selectWrapper(position); |
| 433 | const moduleWrappers = wrapper.getElementsByClassName("module"); |
| 434 | |
| 435 | let showWrapper = false; |
| 436 | Array.prototype.forEach.call(moduleWrappers, function (moduleWrapper) { |
| 437 | if (moduleWrapper.style.position === "" || moduleWrapper.style.position === "static") { |
| 438 | showWrapper = true; |
| 439 | } |
| 440 | }); |
| 441 | |
| 442 | // move container definitions to main CSS |
| 443 | wrapper.className = showWrapper ? "container" : "container hidden"; |
| 444 | }); |
| 445 | } |
| 446 | |
| 447 | /** |
| 448 | * Loads the core config from the server (already combined with the system defaults). |
no test coverage detected