Skip to content

Commit a2f75d4

Browse files
authored
Merge pull request #5248 from DefectDojo/release/2.3.1
Release: Merge release into master from: release/2.3.1
2 parents 86bcf49 + d31160f commit a2f75d4

File tree

7 files changed

+38
-21
lines changed

7 files changed

+38
-21
lines changed

components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "DefectDojo",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"dependencies": {
55
"JUMFlot": "jumjum123/JUMFlot#*",
66
"bootstrap": "^3.4.0",

dojo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
default_app_config = 'dojo.apps.DojoAppConfig'
88

9-
__version__ = '2.3.0'
9+
__version__ = '2.3.1'
1010
__url__ = 'https://github.com/DefectDojo/django-DefectDojo'
1111
__docs__ = 'https://defectdojo.github.io/django-DefectDojo'

dojo/templates/base.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,9 @@ <h3 class="no-margin-top" style="padding-bottom: 5px;">
795795

796796
$('select').not('#notification-scope').addClass('selectpicker');
797797
$('.selectpicker').attr('data-live-search', 'true');
798+
$('.selectpicker').attr('data-container', 'body');
798799
$('.selectpicker').css('width', '70%');
799-
$('.selectpicker').selectpicker();
800+
$('.selectpicker').selectpicker('render');
800801

801802
});
802803
</script>

dojo/templates/dojo/findings_list_snippet.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h3 class="has-filters">
7171
</button>
7272
{% endif %}
7373
</div>
74-
<ul class="dropdown-menu" style="overflow: hidden;" aria-labelledby="dropdownMenu1" id="bulk_edit">
74+
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1" id="bulk_edit">
7575
<li class="dropdown-header">Choose wisely...</li>
7676
<li style="padding-left: 8px;">
7777
{% if product_tab %}
@@ -82,7 +82,7 @@ <h3 class="has-filters">
8282
{% csrf_token %}
8383
<input type="hidden" name="return_url" value="{{ request.get_full_path }}" />
8484
<label style="display: block" for="severity">Severity</label>
85-
<select name="severity" data-container="body" id="severity" style="font-size: 80%">
85+
<select name="severity" id="severity" style="font-size: 80%">
8686
<option value="">Choose...</option>
8787
<option value="Info">Info</option>
8888
<option value="Low">Low</option>
Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
11
{% load static %}
22
<script type="application/javascript">
3-
$('.dropdown-menu').on('click', function(event) {
4-
event.stopPropagation();
5-
});
6-
7-
83
$('.selectpicker').selectpicker({
94
container: 'body'
105
});
6+
7+
$('.dropdown-menu').on('click', function(event) {
8+
var target = $(event.target);
9+
var bs_select_parent = target.parents('.bootstrap-select')
10+
if (bs_select_parent.length) {
11+
var hasClass = bs_select_parent.hasClass('open');
12+
if (hasClass) {
13+
bs_select_parent.removeClass('open');
14+
} else {
15+
bs_select_parent.addClass('open');
16+
}
17+
}
18+
event.stopPropagation()
19+
});
1120

1221
$('body').on('click', function(event) {
1322
var target = $(event.target);
14-
if (target.parents('.bootstrap-select').length) {
15-
event.stopPropagation();
16-
$('.bootstrap-select.open').removeClass('open');
17-
}
18-
var hasClass = $('.bs-container').hasClass('open');
19-
if (hasClass) {
20-
$('.bs-container').removeClass('open');
23+
var selected = target[0].id.indexOf('bs-select')
24+
var bs_select_parent = target.parents('.bootstrap-select')
25+
if (selected == -1 && bs_select_parent.length) {
26+
27+
var hasClass = bs_select_parent.hasClass('open');
28+
if (hasClass) {
29+
bs_select_parent.removeClass('open');
30+
} else {
31+
bs_select_parent.addClass('open');
32+
}
33+
}
34+
var hasClass = bs_select_parent.hasClass('open');
35+
if (selected == -1 && hasClass) {
36+
bs_select_parent.removeClass('open');
2137
}
22-
});
38+
});
2339
</script>

dojo/templates/dojo/view_test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,14 @@ <h4 class="has-filters"> Findings ({{findings.total_count}}) <small>{{ test.id|g
547547
</button>
548548
{% endif %}
549549
</div>
550-
<ul class="dropdown-menu" style="overflow: hidden;" aria-labelledby="dropdownMenu1" id="bulk_edit">
550+
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1" id="bulk_edit">
551551
<li class="dropdown-header">Choose wisely...</li>
552552
<li style="padding-left: 8px;padding-right: 8px;">
553553
<form action="{% url 'finding_bulk_update_all_product' product_tab.product.id %}" method="post" id="bulk_change_form">
554554
{% csrf_token %}
555555
<input type="hidden" name="return_url" value="{{ request.get_full_path }}" />
556556
<label style="display: block" for="severity">Severity</label>
557-
<select name="severity" data-container="body" id="severity" style="font-size: 80%">
557+
<select name="severity" id="severity" style="font-size: 80%">
558558
<option value="">Choose...</option>
559559
<option value="Info">Info</option>
560560
<option value="Low">Low</option>

helm/defectdojo/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
2-
appVersion: "2.3.0"
2+
appVersion: "2.3.1"
33
description: A Helm chart for Kubernetes to install DefectDojo
44
name: defectdojo
55
version: 1.6.15

0 commit comments

Comments
 (0)