mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Upgrade Ember to 2.13
This commit is contained in:
@@ -6,8 +6,7 @@ function initializePollUIBuilder(api) {
|
||||
|
||||
if (!siteSettings.poll_enabled && (api.getCurrentUser() && !api.getCurrentUser().staff)) return;
|
||||
|
||||
const ComposerController = api.container.lookupFactory("controller:composer");
|
||||
ComposerController.reopen({
|
||||
api.modifyClass('controller:composer', {
|
||||
actions: {
|
||||
showPollBuilder() {
|
||||
showModal("poll-ui-builder").set("toolbarEvent", this.get("toolbarEvent"));
|
||||
@@ -28,6 +27,6 @@ export default {
|
||||
name: "add-poll-ui-builder",
|
||||
|
||||
initialize() {
|
||||
withPluginApi('0.5', initializePollUIBuilder);
|
||||
withPluginApi('0.8.7', initializePollUIBuilder);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,8 +6,7 @@ import WidgetGlue from 'discourse/widgets/glue';
|
||||
function initializePolls(api) {
|
||||
const register = getRegister(api);
|
||||
|
||||
const TopicController = api.container.lookupFactory('controller:topic');
|
||||
TopicController.reopen({
|
||||
api.modifyClass('controller:topic', {
|
||||
subscribe(){
|
||||
this._super();
|
||||
this.messageBus.subscribe("/polls/" + this.get("model.id"), msg => {
|
||||
@@ -23,8 +22,7 @@ function initializePolls(api) {
|
||||
}
|
||||
});
|
||||
|
||||
const Post = api.container.lookupFactory('model:post');
|
||||
Post.reopen({
|
||||
api.modifyClass('model:post', {
|
||||
_polls: null,
|
||||
pollsObject: null,
|
||||
|
||||
@@ -95,6 +93,6 @@ export default {
|
||||
name: "extend-for-poll",
|
||||
|
||||
initialize() {
|
||||
withPluginApi('0.1', initializePolls);
|
||||
withPluginApi('0.8.7', initializePolls);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user