Skip to content

Commit

Permalink
Merge pull request #3789 from Icinga/bugfix/main-layout-is-broken-wit…
Browse files Browse the repository at this point in the history
…hout-js-3629

Fix main layout for use without js
  • Loading branch information
nilmerg authored Apr 15, 2020
2 parents 0e080b8 + b85c706 commit d287e3f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion application/forms/Control/LimiterControlForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class LimiterControlForm extends Form
*
* @var string
*/
const CSS_CLASS_LIMITER = 'limiter-control icinga-controls';
const CSS_CLASS_LIMITER = 'limiter-control icinga-controls inline';

/**
* Default limit
Expand Down
13 changes: 7 additions & 6 deletions library/Icinga/Web/Widget/Dashboard/Dashlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ class Dashlet extends UserWidget
<h1><a href="{FULL_URL}" aria-label="{TOOLTIP}" title="{TOOLTIP}" data-base-target="col1">{TITLE}</a></h1>
<p class="progress-label">{PROGRESS_LABEL}<span>.</span><span>.</span><span>.</span></p>
<noscript>
<iframe
src="{IFRAME_URL}"
style="height:100%; width:99%"
frameborder="no"
title="{TITLE_PREFIX}{TITLE}">
</iframe>
<div class="iframe-container">
<iframe
src="{IFRAME_URL}"
frameborder="no"
title="{TITLE_PREFIX}{TITLE}">
</iframe>
</div>
</noscript>
</div>
EOD;
Expand Down
2 changes: 1 addition & 1 deletion library/Icinga/Web/Widget/SortBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function render()
$columnForm = new Form();
$columnForm->setTokenDisabled();
$columnForm->setName($this->name . '-column');
$columnForm->setAttrib('class', 'icinga-controls');
$columnForm->setAttrib('class', 'icinga-controls inline');
$columnForm->addElement(
'select',
'sort',
Expand Down
4 changes: 4 additions & 0 deletions modules/monitoring/application/controllers/ListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,10 @@ public function eventhistoryAction()

public function servicegridAction()
{
if ($this->params->has('noscript_apply')) {
$this->redirectNow($this->getRequest()->getUrl()->without('noscript_apply'));
}

$this->addTitleTab('servicegrid', $this->translate('Service Grid'), $this->translate('Show the Service Grid'));
$this->setAutorefreshInterval(15);
$query = $this->backend->select()->from('servicestatus', array(
Expand Down
6 changes: 0 additions & 6 deletions public/css/icinga/controls.less
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,6 @@ input.search {
}
}

html.no-js .sort-control form {
display: table;
margin-left: auto;
margin-top: 0.25em;
}

.controls {
.control-label-group {
margin-top: 0;
Expand Down
20 changes: 16 additions & 4 deletions public/css/icinga/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ form.icinga-form .form-controls {
// Button styles

.icinga-controls {
button:not([type]),
button[type="submit"],
input[type="submit"],
input[type="submit"].btn-confirm {
.button();
Expand All @@ -286,6 +288,20 @@ form.icinga-form .form-controls {
input[type="submit"].btn-cancel {
.button(@body-bg-color, @gray, @black);
}

button.noscript-apply {
color: @gray;
background-color: @gray-lightest;
border-color: @gray;
border-width: 1px;
}
}

form.inline {
button.noscript-apply {
margin-left: .5em;
padding: .1em;
}
}

// Toggle styles
Expand Down Expand Up @@ -470,10 +486,6 @@ form.icinga-form .form-info {
display: inline-block;
}

.sort-control > * {
display: inline-block;
}

/* Flyover form styles */

.flyover-content form:not(.inline):not([role="search"]) {
Expand Down
8 changes: 0 additions & 8 deletions public/css/icinga/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,6 @@
}
}

// Display tabs if JS is disabled
html.no-js .controls > .tabs {
background-color: @icinga-blue;
margin-left: -1 * @gutter;
margin-right: -1 * @gutter;
margin-top: -1 * @gutter;
}

// Dashboard grid

.dashboard {
Expand Down
4 changes: 4 additions & 0 deletions public/css/icinga/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ input[type=text].search-input {
}
}

html.no-js #toggle-sidebar {
display: none;
}

#layout.minimal-layout #toggle-sidebar {
display: none;
}
Expand Down

0 comments on commit d287e3f

Please sign in to comment.