Révision 7b8d8bd5
Ajouté par Serghei Mihai (congés, retour 15/05) il y a presque 10 ans
calebasse/agenda/templates/agenda/ajax-worker-tab.html | ||
---|---|---|
3 | 3 |
<p><a href="{% url 'periodic-events-for-worker' service=service date=date worker_id=worker_agenda.worker.id %}">Rendez-vous périodiques</a></p> |
4 | 4 |
<div {% if appointment.event_id %}data-event-id="{{ appointment.event_id }}"{% endif %}> |
5 | 5 |
{% for appointment in worker_agenda.appointments %} |
6 |
<h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment" |
|
6 |
<h3 id="{{ appointment.event_id }}" class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
|
|
7 | 7 |
{% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}> |
8 | 8 |
<span class="hour">{{ appointment.begin_hour }}</span> |
9 | 9 |
<span class="length">{% if appointment.length %}{% if appointment.length|str_length_lt:3 %} {% endif %}{{ appointment.length }} mn{% endif %}</span> |
... | ... | |
33 | 33 |
{% for service_name in appointment.other_services_names %} |
34 | 34 |
<span class="box {{ service_name }}" title="{{ service_name }}"></span> |
35 | 35 |
{% endfor %} |
36 |
{% if appointment.description %} |
|
37 |
<span title="Un commentaire existe" class="icon-comment"></span> |
|
38 |
{% endif %} |
|
36 |
<span title="Un commentaire existe" class="icon-comment" {% if appointment.description %}style='display: inline'{% endif %}></span> |
|
39 | 37 |
{% if appointment.event_id %} |
40 | 38 |
{% if appointment.is_recurrent %} R {% endif %} |
41 | 39 |
{% if appointment.patient.confidential %} |
calebasse/static/css/agenda.css | ||
---|---|---|
223 | 223 |
button.screen-only { |
224 | 224 |
margin: 1em 0; |
225 | 225 |
float: right; |
226 |
} |
|
227 |
|
|
228 |
h3 .icon-comment { |
|
229 |
display: none; |
|
226 | 230 |
} |
calebasse/static/js/calebasse.agenda.js | ||
---|---|---|
80 | 80 |
} |
81 | 81 |
else |
82 | 82 |
{ |
83 |
var data = {description: textarea.val() };
|
|
84 |
var data = JSON.stringify(data);
|
|
83 |
var comment = {description: textarea.val()};
|
|
84 |
var data = JSON.stringify(comment);
|
|
85 | 85 |
$.ajax({ |
86 | 86 |
url: '/api/v1/event/' + $(this).data("event-id") + '/?format=json&date=' + $(this).data('date'), |
87 | 87 |
type: 'PATCH', |
88 | 88 |
contentType: 'application/json', |
89 | 89 |
data: data, |
90 |
success: function(data) {
|
|
90 |
success: function(response) {
|
|
91 | 91 |
btn.attr('disabled', 'disabled'); |
92 |
if (comment['description']) |
|
93 |
$('h3#' + btn.data("event-id") + ' span.icon-comment').fadeIn(); |
|
94 |
else |
|
95 |
$('h3#' + btn.data("event-id") + ' span.icon-comment').fadeOut(); |
|
92 | 96 |
span.html('Commentaire modifié avec succès'); |
93 | 97 |
} |
94 | 98 |
}); |
Formats disponibles : Unified diff
agenda: icon displayed or hidden on comment update
Closes #2509