Fix CSS button #36

This commit is contained in:
Dmitriy Sokolov 2019-10-14 19:18:09 +03:00
parent 72336cb571
commit f637b8800d
No known key found for this signature in database
GPG Key ID: 03FE88EBBCB36640
4 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,5 @@
## [Unreleased]
- Fix CSS overrides base admin button CSS (#36)
## [0.5.0] - 2019-07-04
### Added

View File

@ -2,8 +2,8 @@
<h3>{% blocktrans with filter_title=title %}By {{ filter_title }}{% endblocktrans %}</h3>
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/widgets.css' %}">
<style>
.button, input[type=submit], input[type=button], .submit-row input, a.button,
.button, input[type=reset] {
.admindatefilter .button, input[type=submit], input[type=button], .submit-row input, a.button,
.admindatefilter .button, input[type=reset] {
background: #79aec8;
padding: 4px 5px;
border: none;
@ -130,8 +130,8 @@ https://github.com/django/django/blob/stable/1.10.x/django/contrib/admin/templat
<input type="hidden" id="{{ choice.system_name }}-query-string" value="{{ choice.query_string }}">
{% endfor %}
<div class="controls">
<input type="submit" value="{% trans "Search" %}" onclick="datefilter_apply(event, '{{ choices.0.system_name }}-query-string', '{{ choices.0.system_name }}-form')">
<input type="reset" class="button" value="{% trans "Reset" %}" onclick="datefilter_reset('{{ choices.0.system_name }}-query-string')">
<input type="submit" class="admindatefilter" value="{% trans "Search" %}" onclick="datefilter_apply(event, '{{ choices.0.system_name }}-query-string', '{{ choices.0.system_name }}-form')">
<input type="reset" class="admindatefilter button" value="{% trans "Reset" %}" onclick="datefilter_reset('{{ choices.0.system_name }}-query-string')">
</div>
</form>
</div>

View File

@ -2,7 +2,7 @@
<h3>{% blocktrans with filter_title=title %}By {{ filter_title }}{% endblocktrans %}</h3>
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/widgets.css' %}">
<style>
.button, input[type=reset] {
.admindatefilter .button, input[type=reset] {
padding: 3px 5px;
color: black;
border: 1px solid #bbb;
@ -86,8 +86,8 @@ https://github.com/django/django/blob/stable/1.8.x/django/contrib/admin/template
<input type="hidden" id="{{ choice.system_name }}-query-string" value="{{ choice.query_string }}">
{% endfor %}
<div class="controls">
<input type="submit" value="{% trans "Search" %}" onclick="datefilter_apply(event, '{{ choices.0.system_name }}-query-string', '{{ choices.0.system_name }}-form')">
<input type="reset" class="button" value="{% trans "Reset" %}" onclick="datefilter_reset('{{ choices.0.system_name }}-query-string')">
<input type="submit" class="admindatefilter" value="{% trans "Search" %}" onclick="datefilter_apply(event, '{{ choices.0.system_name }}-query-string', '{{ choices.0.system_name }}-form')">
<input type="reset" class="admindatefilter button" value="{% trans "Reset" %}" onclick="datefilter_reset('{{ choices.0.system_name }}-query-string')">
</div>
</form>
</div>

View File

@ -2,8 +2,8 @@
<h3>{% blocktrans with filter_title=title %}By {{ filter_title }}{% endblocktrans %}</h3>
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/widgets.css' %}">
<style nonce="{{ spec.request.csp_nonce }}">
.button, input[type=submit], input[type=button], .submit-row input, a.button,
.button, input[type=reset] {
.admindatefilter .button, input[type=submit], input[type=button], .submit-row input, a.button,
.admindatefilter .button, input[type=reset] {
background: #79aec8;
padding: 4px 5px;
border: none;
@ -132,8 +132,8 @@ django.jQuery('document').ready(function () {
<input type="hidden" id="{{ choice.system_name }}-query-string" value="{{ choice.query_string }}">
{% endfor %}
<div class="controls">
<input type="submit" class="button" value="{% trans "Search" %}">
<input type="reset" class="button" value="{% trans "Reset" %}">
<input type="submit" class="admindatefilter" class="button" value="{% trans "Search" %}">
<input type="reset" class="admindatefilter button" value="{% trans "Reset" %}">
</div>
</form>
</div>