Merge pull request #3789 from Icinga/bugfix/main-layout-is-broken-without-js-3629

Fix main layout for use without js
This commit is contained in:
Johannes Meyer 2020-04-15 10:12:14 +02:00 committed by GitHub
commit d287e3f53d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 33 additions and 26 deletions

View File

@ -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

View File

@ -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;

View File

@ -187,7 +187,7 @@ class SortBox extends AbstractWidget
$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',

View File

@ -668,6 +668,10 @@ class ListController extends Controller
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(

View File

@ -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;

View File

@ -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();
@ -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
@ -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"]) {

View File

@ -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 {

View File

@ -475,6 +475,10 @@ input[type=text].search-input {
}
}
html.no-js #toggle-sidebar {
display: none;
}
#layout.minimal-layout #toggle-sidebar {
display: none;
}