mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
1f608cf5ab
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; |