2015-05-27 17:39:56 +03:00
|
|
|
/*
|
|
|
|
|
|
|
|
Implements a div for covering the page content
|
|
|
|
when in a menu context that, for example,
|
|
|
|
should be closed when the user clicks elsewhere.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
```
|
2017-08-14 15:30:00 +03:00
|
|
|
{{gh-content-cover}}
|
2015-05-27 17:39:56 +03:00
|
|
|
```
|
|
|
|
**/
|
|
|
|
|
2017-08-22 10:53:26 +03:00
|
|
|
import Component from '@ember/component';
|
2017-08-14 15:30:00 +03:00
|
|
|
import {inject as injectService} from '@ember/service';
|
2015-10-28 14:36:45 +03:00
|
|
|
|
|
|
|
export default Component.extend({
|
2017-08-14 15:30:00 +03:00
|
|
|
ui: injectService(),
|
|
|
|
|
2015-05-24 08:47:23 +03:00
|
|
|
classNames: ['content-cover'],
|
|
|
|
|
|
|
|
onMouseEnter: null,
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
click() {
|
2017-08-14 15:30:00 +03:00
|
|
|
this.get('ui').closeMenus();
|
2015-05-24 08:47:23 +03:00
|
|
|
},
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
mouseEnter() {
|
2017-08-14 15:30:00 +03:00
|
|
|
this.get('ui').closeAutoNav();
|
2015-05-24 08:47:23 +03:00
|
|
|
}
|
|
|
|
});
|