mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
fa27b2a651
Ref#3603 - Popover Buttons now have an `open` class applied to them when their popover is open - The open class is removed from the popover button at the start of the popover's fadeout - Consolidated common code into popover-mixin
13 lines
327 B
JavaScript
13 lines
327 B
JavaScript
/*
|
|
Popovers and their buttons are evented and do not propagate clicks.
|
|
*/
|
|
var PopoverMixin = Ember.Mixin.create(Ember.Evented, {
|
|
classNameBindings: ['isOpen:open'],
|
|
isOpen: false,
|
|
click: function (event) {
|
|
this._super(event);
|
|
return event.stopPropagation();
|
|
}
|
|
});
|
|
|
|
export default PopoverMixin; |