Skip to content

Commit

Permalink
Replace inline style with CSS class
Browse files Browse the repository at this point in the history
warning: for some reason replacing inline styles for checkbox/ellipsis
inside testplans/get.html doesn't work while testruns/get.html !!!
  • Loading branch information
atodorov committed Mar 27, 2024
1 parent 51ee2b0 commit 1c52595
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tcms/bugs/templates/bugs/get.html
Expand Up @@ -18,7 +18,7 @@
{% block contents %}
<div class="container-cards-pf">
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12" style="margin-top: 0">
<h1 class="col-md-12 kiwi-margin-top-0">
{% if bug.severity %}
<span
class="{{ bug.severity.icon }}"
Expand Down
8 changes: 8 additions & 0 deletions tcms/static/style/patternfly_override.css
Expand Up @@ -108,3 +108,11 @@ a.disabled {
.kiwi-float-right {
float: right;
}

.kiwi-margin-top-0 {
margin-top: 0;
}

.kiwi-margin-bottom-0 {
margin-bottom: 0;
}
2 changes: 1 addition & 1 deletion tcms/testcases/templates/testcases/get.html
Expand Up @@ -11,7 +11,7 @@
{% block contents %}
<div class="container-cards-pf">
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12" style="margin-top: 0">
<h1 class="col-md-12 kiwi-margin-top-0">
<span id="test_case_pk"
data-pk="{{ object.pk }}"
data-perm-remove-tag="{{ perms.testcases.delete_testcasetag }}"
Expand Down
3 changes: 1 addition & 2 deletions tcms/testplans/models.py
Expand Up @@ -264,8 +264,7 @@ def tree_view_html(self):

return f"""
<div id="test-plan-family-tree"
class="list-group tree-list-view-pf"
style="margin-top:0">
class="list-group tree-list-view-pf kiwi-margin-top-0">
{result}
</div>
"""
Expand Down
2 changes: 1 addition & 1 deletion tcms/testplans/templates/testplans/get.html
Expand Up @@ -11,7 +11,7 @@
{% block contents %}
<div class="container-cards-pf">
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12" style="margin-top: 0">
<h1 class="col-md-12 kiwi-margin-top-0">
{% if not object.is_active %}<s>{% endif %}
<span id="test_plan_pk"
data-testplan-pk="{{ object.pk }}"
Expand Down
2 changes: 1 addition & 1 deletion tcms/testruns/templates/testruns/environment.html
Expand Up @@ -10,7 +10,7 @@
{% block contents %}
<div class="container-cards-pf">
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12" style="margin-top: 0">
<h1 class="col-md-12 kiwi-margin-top-0">
<span id="environment_pk" data-pk="{{ object.pk }}">ENV-{{ object.pk }}:</span> {{ object.name }}
</h1>

Expand Down
6 changes: 3 additions & 3 deletions tcms/testruns/templates/testruns/get.html
Expand Up @@ -11,7 +11,7 @@
{% block contents %}
<div class="container-cards-pf">
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12" style="margin-top: 0; {% if object.stop_date %}text-decoration: line-through{% endif %}">
<h1 class="col-md-12 kiwi-margin-top-0" {% if object.stop_date %}style="text-decoration: line-through"{% endif %}>
<span id="test_run_pk"
data-pk="{{ object.pk }}"
data-plan-pk="{{ object.plan_id }}"
Expand Down Expand Up @@ -317,10 +317,10 @@ <h5><span class="test-executions-count"></span> {% trans 'records' %}</h5>
<div class="list-view-pf-left">
<span class="fa fa-angle-right"></span>
</div>
<div class="list-view-pf-checkbox hidden-print" style="margin-top: 0; margin-bottom: 0">
<div class="list-view-pf-checkbox hidden-print kiwi-margin-top-0 kiwi-margin-bottom-0">
<input type="checkbox" class="test-execution-checkbox">
</div>
<div class="list-view-pf-actions hidden-print" style="margin-top: 0; margin-bottom: 0;">
<div class="list-view-pf-actions hidden-print kiwi-margin-top-0 kiwi-margin-bottom-0">
<div class="dropdown pull-right dropdown-kebab-pf">
<button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebabRight9"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Expand Down

0 comments on commit 1c52595

Please sign in to comment.