Skip to content

Commit 9f2a39a

Browse files
committed
Merge branch 'hotfix/ie-issues'
2 parents 5fb6c9a + 60653be commit 9f2a39a

11 files changed

Lines changed: 33 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## in develop
44

5+
## 1.2.2
6+
7+
* Fixed issues with IE select.
8+
* Moved icons to root of public folder.
9+
510
## 1.2.1
611

712
* Updated bundles.

public/styles.css

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,19 @@
2020
float: right;
2121
}
2222

23-
.custom-filters button[type=submit] {
24-
display: none;
23+
.custom-filters--submit-button,
24+
.custom-filters--submit-button:hover,
25+
.custom-filters--submit-button:focus {
26+
border-top-left-radius: 0;
27+
border-bottom-left-radius: 0;
28+
}
29+
30+
.custom-filters .form-action {
31+
display: flex;
32+
}
33+
34+
.custom-filters > div:first-child {
35+
flex-grow: 1;
2536
}
2637

2738
.custom-filters {
@@ -32,7 +43,7 @@
3243
-webkit-appearance: none;
3344
-moz-appearance: none;
3445
-webkit-border-radius: 0;
35-
background-image: url("icons/arrow-down.svg");
46+
background-image: url("arrow-down.svg");
3647
background-position: 95% 50%;
3748
background-repeat: no-repeat;
3849
background-size: 16px;
@@ -47,6 +58,10 @@
4758
color: black;
4859
}
4960

61+
.custom-filters select::-ms-expand {
62+
display: none;
63+
}
64+
5065
th.rotate {
5166
height: 200px;
5267
white-space: nowrap;

src/Controller/AdminController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,10 @@ public function createFilterForm($filters, $requestFilters, $route)
316316
'submit',
317317
SubmitType::class,
318318
[
319-
'label' => 'Apply',
319+
'label' => 'Filter',
320+
'attr' => [
321+
'class' => 'btn custom-filters--submit-button'
322+
]
320323
]
321324
);
322325

@@ -344,6 +347,7 @@ public function filterAction(Request $request)
344347
$params = $request->query->all();
345348

346349
$params['filters'] = null;
350+
$params['page'] = 1;
347351

348352
return $this->redirectToRoute(
349353
'easyadmin',

templates/easy_admin_overrides/field_smiley.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% set width = (width is defined ? width : '50') %}
33

44
{% if value != '' %}
5-
<img class="smiley-icon" src="icons/smiley/{{ value }}.png" width="{{ width }}px" {% if title is defined %}title="{{ title }}"{% endif %}>
5+
<img class="smiley-icon" src="smiley-{{ value }}.png" width="{{ width }}px" {% if title is defined %}title="{{ title }}"{% endif %}>
66
{% else %}
77
<div class="field-smiley--title-hover" {% if title is defined %}title="{{ title }}"{% endif %}>N/A</div>
88
{% endif %}

templates/easy_admin_overrides/list.html.twig

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,18 @@
4646
{# Change layout to include filters #}
4747
{% block content_header %}
4848
<div class="row">
49-
<div class="col-sm-4">
49+
<div class="col-sm-3">
5050
{% block content_title_wrapper %}
5151
<h1 class="title">
5252
{{ block('content_title') }}
5353
</h1>
5454
{% endblock %}
5555
</div>
5656

57-
<div class="col-sm-2">
57+
<div class="col-sm-3">
5858
{% block content_header_filters %}
5959
{% if filters is defined and filters is not null %}
60-
<div class="custom-filters">
61-
{{ form(filters, {'attr': {'id': 'filters', 'class': 'form-action'}}) }}
62-
</div>
60+
{{ form(filters, {'attr': {'id': 'filters', 'class': 'form-action custom-filters'}}) }}
6361
{% endif %}
6462
{% endblock %}
6563
</div>
@@ -74,20 +72,6 @@
7472
</div>
7573
{% endblock content_header %}
7674

77-
{# Add submit on click for filters #}
78-
{% block body_javascript %}
79-
{{ parent() }}
80-
81-
<script type="text/javascript">
82-
// without jQuery (doesn't work in older IEs)
83-
document.addEventListener('DOMContentLoaded', function(){
84-
document.getElementById("filter_group").addEventListener('input', function (evt) {
85-
document.getElementById("filters").submit();
86-
});
87-
}, false);
88-
</script>
89-
{% endblock %}
90-
9175
{# Do not display SEARCH form if not granted #}
9276
{% block search_action %}
9377
{% if is_easyadmin_granted(_entity_config, 'search') %}

0 commit comments

Comments
 (0)