discourse/app/assets/javascripts/discourse/initializers/banner.js.es6
2015-08-13 15:14:08 -04:00

19 lines
451 B
JavaScript

export default {
name: "banner",
after: "message-bus",
initialize(container) {
const banner = Em.Object.create(PreloadStore.get("banner")),
site = container.lookup('site:main');
site.set("banner", banner);
const messageBus = container.lookup('message-bus:main');
if (!messageBus) { return; }
messageBus.subscribe("/site/banner", function (ban) {
site.set("banner", Em.Object.create(ban));
});
}
};