File tree 2 files changed +27
-0
lines changed
src/linagora.esn.contact/app
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 4
4
@import ' ./addressbook/addressbook' ;
5
5
@import ' ./search/search' ;
6
6
7
+ .hidden {
8
+ display : none ;
9
+ }
7
10
@media (min-width : @screen-md-min ) {
8
11
.contact-aside {
9
12
position : fixed ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ function ContactListController(
14
14
$log ,
15
15
$scope ,
16
16
$state ,
17
+ $rootScope ,
17
18
$stateParams ,
18
19
$window ,
19
20
session ,
@@ -65,6 +66,7 @@ function ContactListController(
65
66
} else {
66
67
listAddressbooks = contactAddressbookService . listAggregatedAddressbooks ( ) ;
67
68
}
69
+ toggleSideMenuEvent ( ) ;
68
70
69
71
self . status = LOADING_STATUS . loading ;
70
72
listAddressbooks
@@ -89,6 +91,28 @@ function ContactListController(
89
91
} ) ;
90
92
}
91
93
94
+ function toggleMenu ( ) {
95
+ const contactAsidClass = angular . element ( document . querySelector ( '.contact-aside' ) ) ;
96
+ const contactMainContentElem = angular . element ( document . querySelector ( '.contact-main-content' ) ) ;
97
+
98
+ if ( document . querySelector ( '.contact-aside' ) . style . display === 'block' || ! ( document . querySelector ( '.contact-aside' ) . style . display ) ) {
99
+ contactMainContentElem . removeClass ( 'col-xl-10 col-md-9' ) ;
100
+ contactMainContentElem . addClass ( 'col-xl-12 col-md-12' ) ;
101
+ } else {
102
+ contactMainContentElem . removeClass ( 'col-xl-12 col-md-12' ) ;
103
+ contactMainContentElem . addClass ( 'col-xl-10 col-md-9' ) ;
104
+ }
105
+ contactAsidClass . toggle ( 'hidden' ) ;
106
+
107
+ }
108
+
109
+ function toggleSideMenuEvent ( ) {
110
+ $rootScope . $on ( 'toggleSideMenu' , function ( ) {
111
+
112
+ toggleMenu ( ) ;
113
+ } ) ;
114
+ }
115
+
92
116
$scope . $on ( CONTACT_ADDRESSBOOK_EVENTS . DELETED , _onAddressbookDeleted ) ;
93
117
$scope . $on ( CONTACT_ADDRESSBOOK_EVENTS . SUBSCRIPTION_DELETED , _onAddressbookDeleted ) ;
94
118
You can’t perform that action at this time.
0 commit comments