mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
983110d931
no issue - add eslint-plugin-ember, configure no-old-shims rule - run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports - further cleanup of Ember globals usage - remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
31 lines
533 B
JavaScript
31 lines
533 B
JavaScript
/*
|
|
|
|
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:
|
|
```
|
|
{{gh-content-cover}}
|
|
```
|
|
**/
|
|
|
|
import Component from '@ember/component';
|
|
import {inject as injectService} from '@ember/service';
|
|
|
|
export default Component.extend({
|
|
ui: injectService(),
|
|
|
|
classNames: ['content-cover'],
|
|
|
|
onMouseEnter: null,
|
|
|
|
click() {
|
|
this.get('ui').closeMenus();
|
|
},
|
|
|
|
mouseEnter() {
|
|
this.get('ui').closeAutoNav();
|
|
}
|
|
});
|