Benjamin Renard commited on 2014-01-06 16:10:33
Showing 2 changed files, with 8 additions and 1 deletions.
... | ... |
@@ -23,6 +23,12 @@ refresh_group_list=function() { |
23 | 23 |
/**************** |
24 | 24 |
* Add group |
25 | 25 |
****************/ |
26 |
+ |
|
27 |
+on_click_add_group_btn=function(e) { |
|
28 |
+ $('#navbar-groupe-collapse').collapse('hide'); |
|
29 |
+ $('#add_group_modal').modal('show'); |
|
30 |
+} |
|
31 |
+ |
|
26 | 32 |
on_show_add_group_modal=function(e) { |
27 | 33 |
$('#add_group_modal #add_group_name').focus(); |
28 | 34 |
} |
... | ... |
@@ -371,6 +377,7 @@ $( document ).ready( function() { |
371 | 377 |
alert('Local storage not supported !'); |
372 | 378 |
} |
373 | 379 |
|
380 |
+ $('#add_group_btn').bind('click',on_click_add_group_btn); |
|
374 | 381 |
$('#add_group_submit').bind('click',on_valid_add_group_modal); |
375 | 382 |
$("#add_group_modal").on('shown.bs.modal',on_show_add_group_modal); |
376 | 383 |
$("#add_group_modal").on('hidden.bs.modal',on_close_add_group_modal); |
... | ... |
@@ -63,7 +63,7 @@ body{ |
63 | 63 |
<li><a class='group-choice'>Quotidien</a></li> |
64 | 64 |
<li><a class='group-choice'>Noël</a></li> |
65 | 65 |
<li class="divider"></li> |
66 |
- <li><a href="#" id='add_group' data-toggle="modal" data-target="#add_group_modal">Nouveau</a></li> |
|
66 |
+ <li><a href="#" id='add_group_btn' data-toggle="modal" data-target="#add_group_modal">Nouveau</a></li> |
|
67 | 67 |
</ul> |
68 | 68 |
</li> |
69 | 69 |
<li><a id='clear_local_data'>Purger les données locales</a></li> |
70 | 70 |