2016-06-30 13:21:47 +03:00
|
|
|
import Mixin from 'ember-metal/mixin';
|
|
|
|
import Evented from 'ember-evented';
|
2015-10-28 14:36:45 +03:00
|
|
|
|
2014-05-31 04:07:15 +04:00
|
|
|
/*
|
2014-09-28 19:39:25 +04:00
|
|
|
Dropdowns and their buttons are evented and do not propagate clicks.
|
2014-05-31 04:07:15 +04:00
|
|
|
*/
|
2015-10-28 14:36:45 +03:00
|
|
|
export default Mixin.create(Evented, {
|
2014-09-24 17:36:20 +04:00
|
|
|
classNameBindings: ['isOpen:open:closed'],
|
2014-08-06 18:32:10 +04:00
|
|
|
isOpen: false,
|
2014-10-25 01:09:50 +04:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
click(event) {
|
2014-05-31 04:07:15 +04:00
|
|
|
this._super(event);
|
2014-10-25 01:09:50 +04:00
|
|
|
|
2014-05-31 04:07:15 +04:00
|
|
|
return event.stopPropagation();
|
|
|
|
}
|
|
|
|
});
|