Revision 8734280c
Added by Jérôme Schneider over 13 years ago
| calebasse/agenda/templates/agenda/index.html | ||
|---|---|---|
|
});
|
||
|
$('.textedit button').on('click', function() {
|
||
|
var textarea = $(this).prev();
|
||
|
var span = textarea.prev()
|
||
|
$.ajax({
|
||
|
url: '/api/event/' + $(this).data("event-id") + '/?format=json',
|
||
|
type: 'PATCH',
|
||
|
contentType: 'application/json',
|
||
|
data: '{"description": "' + textarea.val() + '"}'
|
||
|
data: '{"description": "' + textarea.val() + '"}',
|
||
|
success: function(data) {
|
||
|
span.html('Commentaire modifiée avec succès');
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
| ... | ... | |
|
|
||
|
<div>
|
||
|
{% if appointment.type == 'free' %}<button class='booking' data-hour="{{ appointment.begin_hour }}">Prendre un rendez-vous</button> {% endif %}
|
||
|
{% if appointment.description %}
|
||
|
{% if appointment.event_id %}
|
||
|
<div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
|
||
|
<span></span>
|
||
|
<textarea>{{ appointment.description }}</textarea>
|
||
|
<button disabled="disabled" data-event-id="{{ appointment.event_id }}">✔</button>
|
||
|
</div>
|
||
| calebasse/ressources/admin.py | ||
|---|---|---|
|
|
||
|
from models import (ActType, CFTMEACode, FamilySituationType, HealthFund,
|
||
|
InscriptionMotive, Job, Nationality, Office, ParentalAuthorityType,
|
||
|
ParentalCustodyType, Room, SalleManager, School, SchoolTeacherRole,
|
||
|
ParentalCustodyType, Room, School, SchoolTeacherRole,
|
||
|
Service, SessionType, TransportCompany, TransportType,
|
||
|
UninvoicableCode, WorkerType)
|
||
|
|
||
| ... | ... | |
|
admin.site.register(ParentalAuthorityType)
|
||
|
admin.site.register(ParentalCustodyType)
|
||
|
admin.site.register(Room)
|
||
|
admin.site.register(SalleManager)
|
||
|
admin.site.register(School)
|
||
|
admin.site.register(SchoolTeacherRole)
|
||
|
admin.site.register(Service)
|
||
Also available in: Unified diff
agenda: add a notification when a description is modify
description is modify