Auto collaspse bottom nav bar
Benjamin Renard

Benjamin Renard commited on 2014-07-23 00:45:38
Showing 1 changed files, with 9 additions and 0 deletions.

... ...
@@ -68,6 +68,12 @@ navbar_collapse_hide=function() {
68 68
   }
69 69
 }
70 70
 
71
+bottom_navbar_collapse_hide=function() {
72
+  if ($('#bottom-navbar-collapse-1').hasClass('in')) {
73
+    $('#bottom-navbar-collapse-1').collapse('hide');
74
+  }
75
+}
76
+
71 77
 /****************
72 78
  * Parts
73 79
  ****************/
... ...
@@ -198,6 +204,7 @@ on_categories_group_btn_click=function(e) {
198 204
   group=groups[$('#view-group').data('uuid')];
199 205
   $('#view-group-categories').data('group-uuid',$('#view-group').data('uuid'));
200 206
   refresh_group_categories(group);
207
+  bottom_navbar_collapse_hide();
201 208
   view_part('#view-group-categories');
202 209
 }
203 210
 
... ...
@@ -298,6 +305,7 @@ on_categories_group_add_btn_click=function(e) {
298 305
 on_trash_group_btn_click=function(e) {
299 306
   group=groups[$('#view-group').data('uuid')];
300 307
   contributor_email=$('#view-group #contributor')[0].value;
308
+  bottom_navbar_collapse_hide();
301 309
   view_group_trash(group,contributor_email);
302 310
 }
303 311
 
... ...
@@ -663,6 +671,7 @@ display_balance=function(group) {
663 671
 
664 672
 on_remove_group_btn_click=function(e) {
665 673
   group=groups[$('#view-group').data('uuid')];
674
+  bottom_navbar_collapse_hide();
666 675
   myconfirm('Etes-vous sûre de vouloir supprimer le group '+group.name+' ?',on_confirm_remove_group,null,group);
667 676
 }
668 677
 
669 678