Add export group contributions feature

This commit is contained in:
Benjamin Renard 2014-10-13 00:24:44 +02:00
parent 2272ff551b
commit e4d2a711a0
2 changed files with 12 additions and 0 deletions

View file

@ -299,6 +299,16 @@ on_categories_group_add_btn_click=function(e) {
}
}
on_export_group_btn_click=function(e) {
if (user) {
group=$('#view-group').data('uuid');
document.location=user.server+'/export2csv?email='+user.email+'&password='+user.password+'&group='+group;
}
else {
alert('Vous devez être connecté à un serveur pour cela !');
}
}
on_nav_search_form_submit=function(e) {
e.preventDefault();
}
@ -967,6 +977,7 @@ $( document ).ready( function() {
$("#view-group-trash-contributors #go-back-group").bind('click',on_go_back_group_trash_contributors_btn_click);
$('#categories_group_btn').bind('click',on_categories_group_btn_click);
$('#export_group_btn').bind('click',on_export_group_btn_click);
$('#trash_group_btn').bind('click',on_trash_group_btn_click);
$('#remove_group_btn').bind('click',on_remove_group_btn_click);
$('#nav-search-form').bind('submit',on_nav_search_form_submit);

View file

@ -284,6 +284,7 @@ span.cat-color {
</form>
<ul class="nav navbar-nav navbar-right">
<li><a id='categories_group_btn'><span class='glyphicon glyphicon-th-list'></span> Catégories</span></a></li>
<li><a id='export_group_btn'><span class='glyphicon glyphicon-download'></span> Export CSV</span></a></li>
<li><a id='trash_group_btn'><span class='glyphicon glyphicon-trash'></span> Corbeille</span></a></li>
<li><a id='remove_group_btn'><span class='glyphicon glyphicon-floppy-remove'></span> Supprimer le groupe</span></a></li>
</ul>