Ghost/ghost/admin/app/components/gh-popover-button.js
Jason Williams 71c358b638 Use Ember.inject instead of needs and initializers
No Issue
- Switches to the newer style of dependency injection.
- Instead of injection Controllers via "needs," use
  Ember.inject.controller().
- Get rid of initializers that were only injecting objects
  into various factories. Converts these objects into Ember.Service
  objects and declaratively inject them where needed via
  Ember.inject.service().  The added benefit to this is that it's no
  longer a mystery where these properties/methods come from and it's
  straightforward to inject them where needed.
2015-05-27 07:41:42 -05:00

19 lines
489 B
JavaScript

import Ember from 'ember';
import DropdownButton from 'ghost/components/gh-dropdown-button';
export default DropdownButton.extend({
dropdown: Ember.inject.service(),
click: Ember.K,
mouseEnter: function (event) {
this._super(event);
this.get('dropdown').toggleDropdown(this.get('popoverName'), this);
},
mouseLeave: function (event) {
this._super(event);
this.get('dropdown').toggleDropdown(this.get('popoverName'), this);
}
});