PageSourceSearch

https://www.sportcourchevel.com/wp-content/themes/Avada-child/assets/js/admin_saisons.js?ver=6.1.14

js sportcourchevel.com collected 2026-10-02 12:45:12 UTC 9,826 bytes, 374 lines download raw bytes

1var modal = document.getElementById("Modal_discipline");
2
3$(document).ready(function () {
4	
5	
6	
7    var miniDate = "today";
8    
9	var Last_saison = $("#Last_saison").val();
10    
11	if (Last_saison != '' && Last_saison != null && Last_saison != "undefined") {
12        miniDate = $("#Last_saison").val();
13        var last = miniDate.split('/')[0];
14        var afterLast = parseInt(miniDate.split('/')[0]) + 1;
15        var afterLast = afterLast.toString();
16        miniDate = miniDate.replace(last, afterLast);
17    }
18
19    window.onclick = function (event) {
20
21        if (event.target == modal) {
22
23            modal.style.display = "none";
24
25        }
26
27    }
28
29
30
31    jQuery("#page_annee_soclaire #date_debut").datepicker({
32
33        dateFormat: 'dd/mm/yy',
34
35        minDate: miniDate,
36
37        changeMonth: true,
38
39        changeYear: true,
40
41        monthNamesShort: months_array,
42
43        onSelect: function () {
44            var date = jQuery(this).datepicker('getDate');
45            jQuery("#page_annee_soclaire #date_fin").datepicker('option', 'minDate', date);
46        }
47    });
48	
49	
50	
51
52    jQuery("#page_annee_soclaire #date_fin").datepicker({
53
54        dateFormat: 'dd/mm/yy',
55
56        changeMonth: true,
57
58        changeYear: true,
59
60        monthNamesShort: months_array,
61
62        onSelect: function () {
63
64            var date = jQuery(this).datepicker('getDate');
65            jQuery("#page_annee_soclaire #date_debut").datepicker('option', 'maxDate', date);
66
67        }
68
69    });
70
71
72
73
74    var Saison_Table = $('#Saisons_Table').DataTable({
75        "columnDefs": [
76			{ "data": "title","targets": 0 }, 
77			{ "data": "date_debut","targets": 1 }, 
78			{ "data": "action","targets": 2 },
79        ],
80        "processing": true,
81        "serverSide": true,
82        "ajax": {
83            "type": 'POST',
84            "url": ajaxurl,
85            "data": {
86                action: 'retournerlistsaisons',
87            }
88        },
89        "paging": true,
90        "pageLength": 10,
91        "lengthChange": false,
92        "lengthMenu": [[20, 50, 100, -1], [20, 50, 100, "All"]],
93        "ordering": true,
94        "searching": false,
95        "info": false,
96        "aoColumns": [
97            null,
98            null, {
99                "bSortable": false
100            }
101        ],
102        "language": {
103            "url": urlJsonDataTable + 'datatable_fr_fr.json'
104        },
105    });
106
107
108
109
110    var Incripstion_Table = $('#Scolaire_inscription_Table').DataTable({
111        "columnDefs": [
112			{ "data": "enfant","targets": 0 }, 
113			{ "data": "etat","targets": 1 }, 
114			{ "data": "displine","targets": 2 }, 
115			{ "data": "etat_inscription","targets": 3 }, 
116			{ "data": "action", "targets": 4 },
117        ],
118        "processing": true,
119        "serverSide": true,
120        "ajax": {
121            "type": 'POST',
122            "url": ajaxurl,
123            "data": {
124                "action": 'retournerlistinscription',
125                "id_saison": $('#id_Saison').val(),
126            }
127        },
128        "paging": true,
129        "pageLength": 10,
130        "lengthChange": false,
131        "lengthMenu": [[20, 50, 100, -1], [20, 50, 100, "All"]],
132        "ordering": true,
133        "order": [[0, "desc"]],
134        "searching": true,
135        "info": false,
136        "aoColumns": [
137            null,
138            null,
139            null,
140            null, {
141                "bSortable": false
142            }
143        ],
144        "language": {
145            "url": urlJsonDataTable + 'datatable_fr_fr.json'
146        },
147    });
148
149
150
151
152    if (jQuery("#jstree_disciplines").length) {
153        jQuery(function () {
154            var tree = jQuery("#jstree_disciplines").jstree({
155                "core": {
156
157                    "themes": {
158
159                        "icons": false
160
161                    }
162
163                },
164                "checkbox": {
165
166                    "real_checkboxes": true,
167                    "real_checkboxes_names": true,
168
169                },
170                "plugins": ["types", "checkbox"],
171                "checkbox": {
172
173                    "three_state": false,
174                    "real_checkboxes": false
175                }
176
177            });
178				
179			if (typeof(tree) != "undefined")	tree.jstree(true).open_all();
180
181
182			jQuery('#jstree_disciplines li[data-checkstate="checked"]').each(function () {
183				tree.jstree('check_node', jQuery(this));
184			});
185
186
187			jQuery('#jstree_disciplines li[data-parint="parint"]').each(function () {
188				jQuery(this).find("a").first().before("<span class='mod modifier_item'><i class='fas fa-edit'></i></span>");
189			});
190
191
192            jQuery(document).on("click", "#Modal_discipline .removeCategorie", function () {
193
194                var id = jQuery(this).data("id");
195
196                jQuery('#Modal_discipline tr#Categorie' + id).remove();
197
198                jQuery('#Modal_discipline #categorie option#categorie_option_' + id).removeAttr("disabled");
199
200                var html = '<input type="hidden" name="remove_categorie[]" id="remove_categorie_' + id + '" value="' + id + '">';
201
202                jQuery('#Modal_discipline #remove_categorie_discipline').append(html);
203
204            });
205
206
207
208
209            jQuery("#Modal_discipline #add_categorie").click(function () {
210
211                var id = "new" + window.categorie;
212
213                window.categorie++;
214
215                var html = '<tr id="Categorie' + id + '"><td><input type="text" name="new_categorie[]" value="" class="add_new_category"></td>';
216
217                html += '<td><div class="removeCategorie" data-id="' + id + '">-</div></td></tr>';
218
219                jQuery('#Modal_discipline .list_categories').append(html);
220
221                jQuery('#Modal_discipline #categorie option#categorie_option_' + id).attr("disabled", "disabled");
222
223                jQuery('#Modal_discipline #categorie').val("");
224
225                jQuery('#Modal_discipline #remove_categorie_' + id).remove();
226
227            });
228
229        });
230    }
231	
232	
233	
234
235    jQuery("#myModal .btnClose,#Modal_discipline .btnClose").click(function () {
236
237        jQuery("#myModal").hide();
238
239        jQuery("#Modal_discipline").hide();
240
241    });
242
243
244
245
246
247    jQuery(document).on("change", ".doc_pdf_file .new_file", function () {
248
249        var file = document.getElementById(jQuery(this).attr("id")).files[0];
250
251        if (file) {
252
253            jQuery(this).parent().parent().find("p span").html("-" + file.name);
254
255            jQuery(this).parent().find("label").html('<i class="fa fa-file-pdf-o"></i>');
256
257            jQuery(this).parent().find
258
259            jQuery(this).parent().prepend('<div class="doc_pdf_file_dell">x</div>');
260            jQuery(this).parent().parent().find('.date_doc').show();
261            jQuery(this).parent().parent().find('.date_document.date_doc').prop('required', true);
262        }
263
264    });
265
266
267
268
269
270    jQuery(document).on("click", ".doc_pdf_file .doc_pdf_file_dell", function () {
271
272        jQuery(this).parent().parent().find('.date_doc').hide();
273        jQuery(this).parent().parent().find('.date_document.date_doc').prop('required', false);
274        jQuery(this).hide();
275
276        var id = jQuery(this).parent().find("a").attr('id');
277        var type = jQuery(this).parent().find("a").attr('data-type');
278        var fil = jQuery(this).parent().find("a").attr('data-file');
279
280        if (id) {
281
282            jQuery('<label for=' + id + '">+</label>').insertAfter("#" + id);
283
284            jQuery(this).parent().find("a").remove();
285
286            jQuery(this).parent().append('<input type="file" accept="image/*,.docx,.pdf" class="new_file" id="' + id + '"  name="new_file[]" value="">');
287            jQuery(this).parent().append('<input type="hidden" name="new_title[]" id="new_title' + fil + '" value="' + type + '">');
288            jQuery(this).parent().parent().find("p span").html('');
289
290            var to = jQuery(this).data("to");
291
292            var html = '<input type="hidden" name="remove_facture[]" id="remove_' + id + '" value="' + to + '">';
293
294            jQuery('#remove_facture_discipline').append(html);
295
296        } else {
297
298            jQuery(this).parent().find("label").html('+');
299
300            jQuery(this).parent().find("input").val(null);
301
302            jQuery(this).parent().parent().find("p span").html('');
303
304        }
305    });
306
307
308
309
310    jQuery(document).on("change", "#page_inscrit #etat", function () {
311        if ($("#etat").val() != 'valide')
312            $('.new_file').removeAttr('disabled');
313        else
314            $('.new_file').attr('disabled', 'disabled');
315    });
316	
317	
318	
319	
320	jQuery(document).on("click", ".mod.modifier_item", function () {
321
322                var id = jQuery(this).parent().attr('id');
323
324                var text = jQuery('#jstree_disciplines li#' + id).find("a").first().text();
325
326                var action = jQuery("#Modal_discipline form").data("action");
327
328                var page = jQuery("#Modal_discipline form").data("soclaire");
329
330                action += "?id=" + id + "&page=" + page;
331
332                jQuery("#Modal_discipline .list_categories tbody").html("");
333
334                jQuery("#Modal_discipline #remove_categorie_discipline").html("");
335
336                jQuery.ajax({
337
338                    type: 'POST',
339
340                    url: ajaxurl,
341
342                    data: {
343
344                        action: 'getCategorie',
345
346                        discipline: id
347
348                    },
349
350                    success: function (data) {
351
352                        jQuery("#Modal_discipline .list_categories tbody").html(data.data);
353
354                    },
355
356                    error: function (data) {
357
358                        console.log('Erreur!');
359
360                    }
361
362                });
363
364                jQuery("#Modal_discipline #discipline_id").val(id);
365
366                jQuery("#Modal_discipline #title").val(text);
367
368                jQuery("#Modal_discipline form").attr("action", action);
369
370                jQuery("#Modal_discipline").show();
371
372            });
373
374});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.