Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSP: Avoid inline css #390

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions application/controllers/ProcessController.php
Expand Up @@ -182,8 +182,7 @@ protected function prepareControls($bp, $renderer)
'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'])
));
Expand Down
5 changes: 0 additions & 5 deletions application/forms/AddNodeForm.php
Expand Up @@ -176,7 +176,6 @@ protected function selectHost()
'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'
Expand Down Expand Up @@ -222,7 +221,6 @@ protected function addServicesElement($host)
'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'
Expand All @@ -241,7 +239,6 @@ protected function addFilteredHostsElement($filter)
'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'
Expand All @@ -260,7 +257,6 @@ protected function addFilteredServicesElement($filter)
'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'
Expand Down Expand Up @@ -362,7 +358,6 @@ protected function selectProcess()
'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'
Expand Down
1 change: 0 additions & 1 deletion application/forms/EditNodeForm.php
Expand Up @@ -262,7 +262,6 @@ protected function selectProcess()
'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'
Expand Down
9 changes: 3 additions & 6 deletions library/Businessprocess/Renderer/TileRenderer/NodeTile.php
Expand Up @@ -105,12 +105,9 @@ public function render()
$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())
));
}

Expand Down
14 changes: 11 additions & 3 deletions public/css/module.less
Expand Up @@ -77,8 +77,11 @@ a:focus {
}
}

.controls .sort-control {
float: right;
.controls {
&.sort-control,
&.want-fullscreen > a {
float: right;
}
}

form a {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down