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-10-30 12:38:01 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2015-10-28 14:36:45 +03:00
|
|
|
|
|
|
|
export default Component.extend({
|
2017-10-30 12:38:01 +03:00
|
|
|
ui: service(),
|
2017-08-14 15:30:00 +03:00
|
|
|
|
2015-05-24 08:47:23 +03:00
|
|
|
classNames: ['content-cover'],
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
click() {
|
2019-03-06 16:53:54 +03:00
|
|
|
this.ui.closeMenus();
|
2015-05-24 08:47:23 +03:00
|
|
|
}
|
|
|
|
});
|