Revision a87d6ad7
Added by Jérôme Schneider over 12 years ago
calebasse/agenda/templates/agenda/index.html | ||
---|---|---|
46 | 46 |
$('#'+anchor.substr(1)).each(function (i, worker_selector) { toggle_worker(worker_selector); }); |
47 | 47 |
}); |
48 | 48 |
|
49 |
$('.textedit').on('keydown', function() { |
|
50 |
$('button', this).removeAttr("disabled"); |
|
51 |
}); |
|
52 |
$('.textedit button').on('click', function() { |
|
53 |
var textarea = $(this).prev(); |
|
54 |
$.ajax({ |
|
55 |
url: '/api/event/' + $(this).data("event-id") + '/?format=json', |
|
56 |
type: 'PATCH', |
|
57 |
contentType: 'application/json', |
|
58 |
data: '{"description": "' + textarea.val() + '"}' |
|
59 |
}); |
|
60 |
}); |
|
61 |
|
|
62 |
|
|
49 | 63 |
/* Gestion du filtre sur les utilisateurs */ |
50 | 64 |
$('#filtre input').keyup(function() { |
51 | 65 |
var filtre = $(this).val(); |
... | ... | |
219 | 233 |
{% if appointment.type == 'free' %}<button class='booking' data-hour="{{ appointment.begin_hour }}">Prendre un rendez-vous</button> {% endif %} |
220 | 234 |
{% if appointment.description %} |
221 | 235 |
<div class="tabs-worker-{{ worker_agenda.worker.id }} textedit"> |
222 |
<textarea>{{ appointment.description }}</textarea> |
|
223 |
<button disabled="disabled">✔</button>
|
|
236 |
<textarea>{{ appointment.description }}</textarea>
|
|
237 |
<button disabled="disabled" data-event-id="{{ appointment.event_id }}">✔</button>
|
|
224 | 238 |
</div> |
225 | 239 |
{% endif %} |
226 | 240 |
{% if appointment.patient_record_id %} |
... | ... | |
243 | 257 |
</table> |
244 | 258 |
</div> |
245 | 259 |
|
260 |
|
|
246 | 261 |
{% endblock %} |
247 | 262 |
|
248 | 263 |
{% block dialogs %} |
Also available in: Unified diff
agenda: description is now editable