mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Closes #2418, #2714 Ref #2446, #2565 - Added and injected `popover` service to globally control popovers - Added `gh-popover-button` component - Added `popover-mixin` for popover and popover-buttons to mixin - Added body-event-listener mixin for popover service to watch for body clicks with - Post settings and post save button both now use `gh-popover` - Added hacks to `ember-hacks.css` to make popovers work until ghost-ui consolidates functionality
14 lines
No EOL
442 B
JavaScript
14 lines
No EOL
442 B
JavaScript
import PopoverMixin from 'ghost/mixins/popover-mixin';
|
|
|
|
var PopoverButton = Ember.Component.extend(PopoverMixin, {
|
|
tagName: "button",
|
|
/*matches with the popover this button toggles*/
|
|
popoverName: null,
|
|
/*Notify popover service this popover should be toggled*/
|
|
click: function (event) {
|
|
this._super(event);
|
|
this.get('popover').togglePopover(this.get('popoverName'));
|
|
}
|
|
});
|
|
|
|
export default PopoverButton; |