This repository was archived by the owner on Mar 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
fiche_famille/templates/fiche_famille Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 75
75
< div class ="direct-chat-msg ">
76
76
< div class ="direct-chat-infos clearfix ">
77
77
< span class ="direct-chat-name float-left "> {{ message.famille }}</ span >
78
- < span class ="direct-chat-timestamp float-right "> {{ message.date_creation|date:"l j F Y H:i" }}</ span >
78
+ < span class ="direct-chat-timestamp float-right "> {{ message.date_creation|date:"l j F Y H:i" }}
79
+ < span class ="custom-switch custom-switch-off-danger custom-switch-on-success " title ="Marquer comme lu ">
80
+ < input type ="checkbox " class ="custom-control-input case_switch " id ="switch_{{ message.pk }} " data-idmessage ="{{ message.pk }} " checked >
81
+ < label class ="custom-control-label " for ="switch_{{ message.pk }} "> </ label >
82
+ </ span >
83
+ </ span >
79
84
{% if not message.date_lecture %}< span class ="badge bg-danger ml-md-2 "> Nouveau</ span > {% endif %}
80
85
</ div >
81
86
< img class ="direct-chat-img " src ="{% static "images /user.png" %}">
99
104
< script >
100
105
{ # Scroll jusqu 'en bas de la liste des messages #}
101
106
$ ( "#div_messages" ) . scrollTop ( $ ( "#div_messages" ) . get ( 0 ) . scrollHeight ) ;
107
+
108
+ $ ( document ) . ready ( function ( ) {
109
+ $ ( ".case_switch" ) . on ( "change" , function ( e ) {
110
+ $ . ajax ( {
111
+ type : "POST" ,
112
+ url : "{% url 'ajax_message_marquer_lu' %}" ,
113
+ data : {
114
+ idmessage : $ ( this ) . data ( "idmessage" ) ,
115
+ etat : this . checked ,
116
+ csrfmiddlewaretoken : "{{ csrf_token }}" ,
117
+ } ,
118
+ datatype : "json" ,
119
+ success : function ( data ) {
120
+ toastr . success ( "Modification du message effectuée" ) ;
121
+ } ,
122
+ error : function ( data ) {
123
+ toastr . error ( data . responseJSON . erreur ) ;
124
+ }
125
+ } )
126
+ } )
127
+ } )
102
128
</ script >
103
129
104
130
{% endif %}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ <h3 class="dropdown-item-title">
50
50
{% embed 'core/box.html' with box_titre=True box_conclusion=True %}
51
51
{% block box_theme %}card-outline card-lightblue direct-chat direct-chat-primary{% endblock %}
52
52
{% block box_titre %}
53
- Discussion avec la famille {{ famille.nom }} pour la structure {{ structure.nom }}
53
+ Discussion avec la famille < a href =" {% url 'famille_resume' idfamille=famille.pk %} " title =" Ouvrir la fiche famille (Conserver CTRL enfoncé pour ouvrir dans un nouvel onglet) " > {{ famille.nom }}</ a > pour la structure {{ structure.nom }}
54
54
{% endblock %}
55
55
{% block box_contenu %}
56
56
You can’t perform that action at this time.
0 commit comments