From 1360e1e4a066669cf57258380df001e1fc9a56e3 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 7 Aug 2023 16:35:49 +0200 Subject: [PATCH] Avoid inline css --- application/controllers/ProcessController.php | 3 +-- application/forms/AddNodeForm.php | 5 ----- application/forms/EditNodeForm.php | 1 - .../Renderer/TileRenderer/NodeTile.php | 9 +++------ public/css/module.less | 14 +++++++++++--- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/application/controllers/ProcessController.php b/application/controllers/ProcessController.php index 75a1b86..aedbd6d 100644 --- a/application/controllers/ProcessController.php +++ b/application/controllers/ProcessController.php @@ -182,8 +182,7 @@ class ProcessController extends Controller 'a', [ 'href' => $this->url()->without('showFullscreen')->without('view'), - 'title' => $this->translate('Leave full screen and switch back to normal mode'), - 'style' => 'float: right' + 'title' => $this->translate('Leave full screen and switch back to normal mode') ], Html::tag('i', ['class' => 'icon icon-resize-small']) )); diff --git a/application/forms/AddNodeForm.php b/application/forms/AddNodeForm.php index 76880b6..4759d99 100644 --- a/application/forms/AddNodeForm.php +++ b/application/forms/AddNodeForm.php @@ -177,7 +177,6 @@ class AddNodeForm extends BpConfigBaseForm 'label' => $this->translate('Hosts'), 'required' => true, 'size' => 8, - 'style' => 'width: 25em', 'multiOptions' => $this->enumHostList(), 'description' => $this->translate( 'Hosts that should be part of this business process node' @@ -223,7 +222,6 @@ class AddNodeForm extends BpConfigBaseForm 'label' => $this->translate('Services'), 'required' => true, 'size' => 8, - 'style' => 'width: 25em', 'multiOptions' => $this->enumServiceList($host), 'description' => $this->translate( 'Services that should be part of this business process node' @@ -242,7 +240,6 @@ class AddNodeForm extends BpConfigBaseForm 'label' => $this->translate('Hosts'), 'required' => true, 'size' => 8, - 'style' => 'width: 25em', 'multiOptions' => $this->enumHostListByFilter($filter), 'description' => $this->translate( 'Hosts that should be part of this business process node' @@ -261,7 +258,6 @@ class AddNodeForm extends BpConfigBaseForm 'label' => $this->translate('Services'), 'required' => true, 'size' => 8, - 'style' => 'width: 25em', 'multiOptions' => $this->enumServiceListByFilter($filter), 'description' => $this->translate( 'Services that should be part of this business process node' @@ -363,7 +359,6 @@ class AddNodeForm extends BpConfigBaseForm 'label' => $this->translate('Process nodes'), 'required' => true, 'size' => 8, - 'style' => 'width: 25em', 'multiOptions' => $this->enumProcesses($file), 'description' => $this->translate( 'Other processes that should be part of this business process node' diff --git a/application/forms/EditNodeForm.php b/application/forms/EditNodeForm.php index 448f24f..a4cd919 100644 --- a/application/forms/EditNodeForm.php +++ b/application/forms/EditNodeForm.php @@ -263,7 +263,6 @@ class EditNodeForm extends BpConfigBaseForm 'label' => $this->translate('Process nodes'), 'required' => true, 'size' => 8, - 'style' => 'width: 25em', 'multiOptions' => $this->enumProcesses(), 'description' => $this->translate( 'Other processes that should be part of this business process node' diff --git a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php index eb85c4e..ec934c0 100644 --- a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php +++ b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php @@ -105,12 +105,9 @@ class NodeTile extends BaseHtmlElement $this->add($link); } else { $this->add(Html::tag( - 'a', - Html::tag( - 'span', - ['style' => 'font-size: 75%'], - sprintf('Trying to access a missing business process node "%s"', $node->getNodeName()) - ) + 'span', + ['class' => 'missing-node-msg'], + sprintf('Trying to access a missing business process node "%s"', $node->getNodeName()) )); } diff --git a/public/css/module.less b/public/css/module.less index a05299a..3129db9 100644 --- a/public/css/module.less +++ b/public/css/module.less @@ -77,8 +77,11 @@ a:focus { } } -.controls .sort-control { - float: right; +.controls { + &.sort-control, + &.want-fullscreen > a { + float: right; + } } form a { @@ -471,7 +474,8 @@ td > a > .state-badges { border: 1px solid @body-bg-color; } - > a { + > a, + .missing-node-msg { display: block; text-decoration: none; font-size: 0.7em; @@ -481,6 +485,10 @@ td > a > .state-badges { word-wrap: break-word; } + .missing-node-msg { + font-size: 0.5em; + } + &:hover { box-shadow: 0 0 .2em @gray; }