0001-add-styles-for-weekdays-buttons-group.patch
chrono/manager/static/css/style.scss | ||
---|---|---|
415 | 415 |
form div.widget[id^=id_recurrence] { |
416 | 416 |
padding-left: 1em; |
417 | 417 |
} |
418 | ||
419 |
// weekdays buttons group |
|
420 |
// display weeks checkboxs to buttons group |
|
421 |
.weekdays-buttons-group { |
|
422 |
display: table; |
|
423 |
border-collapse: collapse; |
|
424 |
font-size: 1.2em; |
|
425 |
margin: 0.2em 0px; |
|
426 |
overflow: hidden; |
|
427 |
input { |
|
428 |
display: none; |
|
429 |
} |
|
430 |
label { |
|
431 |
display: table-cell; |
|
432 |
border: 1px solid #386ede; |
|
433 |
padding: 0.33em 0.66em; |
|
434 |
color: #386ede; |
|
435 |
cursor: pointer; |
|
436 |
font-weight: 500; |
|
437 |
line-height: 1; |
|
438 | ||
439 |
&:hover { |
|
440 |
background-color: #eee; |
|
441 |
} |
|
442 |
} |
|
443 |
input:checked + label { |
|
444 |
background-color: #386ede; |
|
445 |
color: white; |
|
446 |
border-color: #386ede white; |
|
447 |
} |
|
448 |
} |
|
449 |
chrono/manager/templates/chrono/manager_event_form.html | ||
---|---|---|
37 | 37 | |
38 | 38 |
<script> |
39 | 39 |
$(function () { |
40 |
recurrence_fields = $('[id^=id_recurrence]'); |
|
40 |
recurrence_fields = $('.widget[id^=id_recurrence]');
|
|
41 | 41 |
$('input[type=radio][name=frequency]').change(function() { |
42 | 42 |
if(!this.checked) |
43 | 43 |
return; |
chrono/manager/templates/chrono/widgets/weekdays.html | ||
---|---|---|
1 | 1 |
{% spaceless %} |
2 |
<span id="{{ widget.attrs.id }}" class="inputs-buttons-group{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}">
|
|
2 |
<span id="{{ widget.attrs.id }}" class="weekdays-buttons-group{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}" role="group">
|
|
3 | 3 |
{% for group, options, index in widget.optgroups %} |
4 | 4 |
{% for option in options %} |
5 |
<label{% if option.attrs.id %} for="{{ option.attrs.id }}"{% endif %}>{{ option.label }}</label> |
|
6 | 5 |
{% include "django/forms/widgets/input.html" with widget=option %} |
6 |
<label{% if option.attrs.id %} for="{{ option.attrs.id }}"{% endif %}>{{ option.label }}</label> |
|
7 | 7 |
{% endfor %} |
8 | 8 |
{% endfor %} |
9 | 9 |
</span> |
10 |
- |