Commit 3a23c07d2b333e522ba8a9899709a79c765fe767
1 parent
6884541c
[Orga] Ajout d'évènements pour chaque bouton
Showing
1 changed file
with
32 additions
and
4 deletions
Show diff stats
orga.php
... | ... | @@ -84,11 +84,11 @@ class Evenement |
84 | 84 | |
85 | 85 | # Dates |
86 | 86 | if (!$this->valide && !$this->annule) { |
87 | - $html .= '<div class="ev_datespos panel panel-default">'; | |
87 | + $html .= '<div class="ev_pos panel panel-default">'; | |
88 | 88 | $html .= '<div class="panel-heading">'; |
89 | 89 | $html .= '<h5 class="panel-title">Dates possibles'; |
90 | 90 | if ($this->p_proposer()) { |
91 | - $html .= ' <button type="button" class="btn btn-default"><span class="ev_datespos_proposer glyphicon glyphicon-plus"></span> Proposer une date</button>'; | |
91 | + $html .= ' <button type="button" class="ev_pos_proposer btn btn-default"><span class="glyphicon glyphicon-plus"></span> Proposer une date</button>'; | |
92 | 92 | } |
93 | 93 | $html .= '</h5>'; |
94 | 94 | $html .= '</div>'; |
... | ... | @@ -103,11 +103,11 @@ class Evenement |
103 | 103 | if ($date < $time) { |
104 | 104 | $html .= ' disabled'; |
105 | 105 | } |
106 | - $html .= '">Le <span class="ev_datepos_date">'.date('j/m/o', $date).' à '.date('H:i', $date).'</span> (<span class="ev_datepos_nb">'.$this->datesVotes[$dateIndex].'</span> <span class="glyphicon glyphicon-user"></span>)</a>'; | |
106 | + $html .= '">Le <span class="ev_pos_date">'.date('j/m/o', $date).' à '.date('H:i', $date).'</span> (<span class="ev_pos_nb">'.$this->datesVotes[$dateIndex].'</span> <span class="glyphicon glyphicon-user"></span>)</a>'; | |
107 | 107 | } |
108 | 108 | $html .= '</div>'; |
109 | 109 | if ($this->p_valider()) { |
110 | - $html .= '<p><button type="button" class="ev_datepos_valider btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Valider la date</button></p>'; | |
110 | + $html .= '<p><button type="button" class="ev_pos_valider btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Valider la date</button></p>'; | |
111 | 111 | } |
112 | 112 | $html .= '</div>'; |
113 | 113 | $html .= '</div>'; |
... | ... | @@ -272,6 +272,34 @@ foreach ($evenementsPasses as $evenement) { |
272 | 272 | ?> |
273 | 273 | </ul> |
274 | 274 | |
275 | +<script type="text/javascript"> | |
276 | + $(".ev_li").each(function (index) { | |
277 | + var id = this.id.replace('ev_li_', '') | |
278 | + // console.debug(id) | |
279 | + $('.ev_modifier', this).click(function(e) { | |
280 | + console.debug(id, 'modifier', e) | |
281 | + }) | |
282 | + $('.ev_annuler', this).click(function(e) { | |
283 | + console.debug(id, 'annuler', e) | |
284 | + }) | |
285 | + $('.ev_supprimer', this).click(function(e) { | |
286 | + console.debug(id, 'supprimer', e) | |
287 | + }) | |
288 | + $('.ev_pos_proposer', this).click(function(e) { | |
289 | + console.debug(id, 'pos_proposer', e) | |
290 | + }) | |
291 | + $('.ev_pos_valider', this).click(function(e) { | |
292 | + console.debug(id, 'pos_valider', e) | |
293 | + }) | |
294 | + }) | |
295 | + $("#ev_ajouter_fixe").click(function(e) { | |
296 | + console.debug('ajouter_fixe', e) | |
297 | + }) | |
298 | + $("#ev_ajouter_choix").click(function(e) { | |
299 | + console.debug('ajouter_choix', e) | |
300 | + }) | |
301 | +</script> | |
302 | + | |
275 | 303 | <?php |
276 | 304 | } else { |
277 | 305 | ?> | ... | ... |