From bea5709efd3433b3f6ab9e3432907fc29b66864b Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 23 Jul 2014 02:45:38 +0200 Subject: [PATCH] Auto collaspse bottom nav bar --- inc/myco.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inc/myco.js b/inc/myco.js index 83a0d3f..412e373 100644 --- a/inc/myco.js +++ b/inc/myco.js @@ -68,6 +68,12 @@ navbar_collapse_hide=function() { } } +bottom_navbar_collapse_hide=function() { + if ($('#bottom-navbar-collapse-1').hasClass('in')) { + $('#bottom-navbar-collapse-1').collapse('hide'); + } +} + /**************** * Parts ****************/ @@ -198,6 +204,7 @@ on_categories_group_btn_click=function(e) { group=groups[$('#view-group').data('uuid')]; $('#view-group-categories').data('group-uuid',$('#view-group').data('uuid')); refresh_group_categories(group); + bottom_navbar_collapse_hide(); view_part('#view-group-categories'); } @@ -298,6 +305,7 @@ on_categories_group_add_btn_click=function(e) { on_trash_group_btn_click=function(e) { group=groups[$('#view-group').data('uuid')]; contributor_email=$('#view-group #contributor')[0].value; + bottom_navbar_collapse_hide(); view_group_trash(group,contributor_email); } @@ -663,6 +671,7 @@ display_balance=function(group) { on_remove_group_btn_click=function(e) { group=groups[$('#view-group').data('uuid')]; + bottom_navbar_collapse_hide(); myconfirm('Etes-vous sûre de vouloir supprimer le group '+group.name+' ?',on_confirm_remove_group,null,group); }