Ghost/ghost/admin/initializers/dropdown.js

23 lines
1.0 KiB
JavaScript
Raw Normal View History

2014-09-29 15:17:27 +04:00
import DropdownService from 'ghost/utils/dropdown-service';
2014-09-28 19:39:25 +04:00
var dropdownInitializer = {
name: 'dropdown',
initialize: function (container, application) {
application.register('dropdown:service', DropdownService);
2014-09-29 15:17:27 +04:00
// Inject dropdowns
2014-09-28 19:39:25 +04:00
application.inject('component:gh-dropdown', 'dropdown', 'dropdown:service');
application.inject('component:gh-dropdown-button', 'dropdown', 'dropdown:service');
application.inject('controller:modals.delete-post', 'dropdown', 'dropdown:service');
application.inject('controller:modals.transfer-owner', 'dropdown', 'dropdown:service');
application.inject('route:application', 'dropdown', 'dropdown:service');
2014-09-29 15:17:27 +04:00
// Inject popovers
application.inject('component:gh-popover', 'dropdown', 'dropdown:service');
application.inject('component:gh-popover-button', 'dropdown', 'dropdown:service');
application.inject('route:application', 'dropdown', 'dropdown:service');
2014-09-28 19:39:25 +04:00
}
};
2014-09-29 15:17:27 +04:00
export default dropdownInitializer;