2024-03-24 20:53:43 +00:00
|
|
|
const BODY_NOTIFICATIONS_REVEAL_CLASS = 'navigation-enabled secondary-navigation-enabled';
|
2017-07-12 15:12:40 +00:00
|
|
|
|
2019-10-04 15:05:37 +00:00
|
|
|
/**
|
|
|
|
* Wire up the main menu
|
2024-07-27 05:52:33 +00:00
|
|
|
*
|
2024-06-26 13:23:40 +00:00
|
|
|
* @ignore
|
2019-10-04 15:05:37 +00:00
|
|
|
*/
|
|
|
|
function init() {
|
2019-10-01 21:40:49 +00:00
|
|
|
|
|
|
|
// See I09c27a084100b223662f84de6cbe01bebe1fe774
|
|
|
|
// will trigger every time the Echo notification is opened or closed.
|
|
|
|
// This controls the drawer like behaviour of notifications
|
|
|
|
// on tablet in mobile mode.
|
2024-06-03 12:06:43 +00:00
|
|
|
mw.hook( 'echo.mobile' ).add( ( isOpen ) => {
|
2024-03-29 09:27:19 +00:00
|
|
|
$( document.body ).toggleClass( BODY_NOTIFICATIONS_REVEAL_CLASS, isOpen );
|
2019-10-01 21:40:49 +00:00
|
|
|
} );
|
2019-10-04 15:05:37 +00:00
|
|
|
}
|
2017-07-12 15:12:40 +00:00
|
|
|
|
2019-10-04 15:05:37 +00:00
|
|
|
module.exports = {
|
2024-06-26 13:23:40 +00:00
|
|
|
init
|
2019-10-04 15:05:37 +00:00
|
|
|
};
|