From c3aaede10a916bfa433ad590430a2bddf4f23b6a Mon Sep 17 00:00:00 2001 From: Jennifer Mourek Date: Wed, 22 May 2019 15:56:01 +0200 Subject: [PATCH 1/6] Improve the look of the buttons which replace the autosubmit refs #3629 --- public/css/icinga/forms.less | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/css/icinga/forms.less b/public/css/icinga/forms.less index 4ad00d6b4..e2f346a76 100644 --- a/public/css/icinga/forms.less +++ b/public/css/icinga/forms.less @@ -286,6 +286,15 @@ form.icinga-form .form-controls { input[type="submit"].btn-cancel { .button(@body-bg-color, @gray, @black); } + + button.noscript-apply { + .rounded-corners(); + .button(@gray-lightest, @gray); + border-width: 1px; + display: inline-block; + padding: .1em .25em; + margin: 0 .5em; + } } // Toggle styles From cabfb8c7f91e89ee8e802280ab6f61f72be767de Mon Sep 17 00:00:00 2001 From: Florian Strohmaier Date: Thu, 23 May 2019 10:59:07 +0200 Subject: [PATCH 2/6] CSS: Remove unfunctional sidebar toggle in .no-js refs #3629 --- public/css/icinga/menu.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/icinga/menu.less b/public/css/icinga/menu.less index 77c2c2f2d..502b5119c 100644 --- a/public/css/icinga/menu.less +++ b/public/css/icinga/menu.less @@ -475,6 +475,10 @@ input[type=text].search-input { } } +html.no-js #toggle-sidebar { + display: none; +} + #layout.minimal-layout #toggle-sidebar { display: none; } From 5ed41868d9302cd8c7dc2458a07237a9e06758c8 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 14 Apr 2020 13:57:13 +0200 Subject: [PATCH 3/6] css: Fix no-script apply styles in non-inline forms --- .../forms/Control/LimiterControlForm.php | 2 +- library/Icinga/Web/Widget/SortBox.php | 2 +- public/css/icinga/controls.less | 6 ------ public/css/icinga/forms.less | 21 +++++++++++-------- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/application/forms/Control/LimiterControlForm.php b/application/forms/Control/LimiterControlForm.php index dee834696..88adf4be4 100644 --- a/application/forms/Control/LimiterControlForm.php +++ b/application/forms/Control/LimiterControlForm.php @@ -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 diff --git a/library/Icinga/Web/Widget/SortBox.php b/library/Icinga/Web/Widget/SortBox.php index 037e95995..399ff74b2 100644 --- a/library/Icinga/Web/Widget/SortBox.php +++ b/library/Icinga/Web/Widget/SortBox.php @@ -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', diff --git a/public/css/icinga/controls.less b/public/css/icinga/controls.less index 762c109aa..362b710fb 100644 --- a/public/css/icinga/controls.less +++ b/public/css/icinga/controls.less @@ -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; diff --git a/public/css/icinga/forms.less b/public/css/icinga/forms.less index e2f346a76..47e5c56c4 100644 --- a/public/css/icinga/forms.less +++ b/public/css/icinga/forms.less @@ -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(); @@ -288,12 +290,17 @@ form.icinga-form .form-controls { } button.noscript-apply { - .rounded-corners(); - .button(@gray-lightest, @gray); + color: @gray; + background-color: @gray-lightest; + border-color: @gray; border-width: 1px; - display: inline-block; - padding: .1em .25em; - margin: 0 .5em; + } +} + +form.inline { + button.noscript-apply { + margin-left: .5em; + padding: .1em; } } @@ -479,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"]) { From 5ace00ed0b1c239124eb5d0aa5ba6266edc76d76 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 14 Apr 2020 14:24:33 +0200 Subject: [PATCH 4/6] list/servicegrid: Make problems only work in no-js envs --- modules/monitoring/application/controllers/ListController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index ca923ba00..1e6ce6db1 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -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( From 8b8094e9ccae7bfa1e7c3d110145b1aaf7e11342 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 14 Apr 2020 15:20:10 +0200 Subject: [PATCH 5/6] dashboards: Increase size of dashlets in no-js envs --- library/Icinga/Web/Widget/Dashboard/Dashlet.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/library/Icinga/Web/Widget/Dashboard/Dashlet.php b/library/Icinga/Web/Widget/Dashboard/Dashlet.php index b9b2eb0d1..a67daff57 100644 --- a/library/Icinga/Web/Widget/Dashboard/Dashlet.php +++ b/library/Icinga/Web/Widget/Dashboard/Dashlet.php @@ -61,12 +61,13 @@ class Dashlet extends UserWidget

{TITLE}

{PROGRESS_LABEL}...

EOD; From b85c706df32e60f1f2cc3fb0f55d9c093b443aec Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 15 Apr 2020 09:36:22 +0200 Subject: [PATCH 6/6] css: Drop obsolete no-js rules --- public/css/icinga/layout.less | 8 -------- 1 file changed, 8 deletions(-) diff --git a/public/css/icinga/layout.less b/public/css/icinga/layout.less index 73b1d1f49..01479b433 100644 --- a/public/css/icinga/layout.less +++ b/public/css/icinga/layout.less @@ -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 {