Add export group contributions feature
Benjamin Renard

Benjamin Renard commited on 2014-10-12 22:24:44
Showing 2 changed files, with 12 additions and 0 deletions.

... ...
@@ -299,6 +299,16 @@ on_categories_group_add_btn_click=function(e) {
299 299
   }
300 300
 }
301 301
 
302
+on_export_group_btn_click=function(e) {
303
+  if (user) {
304
+    group=$('#view-group').data('uuid');
305
+    document.location=user.server+'/export2csv?email='+user.email+'&password='+user.password+'&group='+group;
306
+  }
307
+  else {
308
+    alert('Vous devez être connecté à un serveur pour cela !');
309
+  }
310
+}
311
+
302 312
 on_nav_search_form_submit=function(e) {
303 313
   e.preventDefault();
304 314
 }
... ...
@@ -967,6 +977,7 @@ $( document ).ready( function() {
967 977
   $("#view-group-trash-contributors #go-back-group").bind('click',on_go_back_group_trash_contributors_btn_click);
968 978
 
969 979
   $('#categories_group_btn').bind('click',on_categories_group_btn_click);
980
+  $('#export_group_btn').bind('click',on_export_group_btn_click);
970 981
   $('#trash_group_btn').bind('click',on_trash_group_btn_click);
971 982
   $('#remove_group_btn').bind('click',on_remove_group_btn_click);
972 983
   $('#nav-search-form').bind('submit',on_nav_search_form_submit);
... ...
@@ -284,6 +284,7 @@ span.cat-color {
284 284
         </form>
285 285
         <ul class="nav navbar-nav navbar-right">
286 286
           <li><a id='categories_group_btn'><span class='glyphicon glyphicon-th-list'></span> Catégories</span></a></li>
287
+          <li><a id='export_group_btn'><span class='glyphicon glyphicon-download'></span> Export CSV</span></a></li>
287 288
           <li><a id='trash_group_btn'><span class='glyphicon glyphicon-trash'></span> Corbeille</span></a></li>
288 289
           <li><a id='remove_group_btn'><span class='glyphicon glyphicon-floppy-remove'></span> Supprimer le groupe</span></a></li>
289 290
         </ul>
290 291