mirror of
https://github.com/discourse/discourse.git
synced 2024-12-17 18:33:53 +08:00
a737090442
- add User.staff scope - inject MessageBus into Ember views (so it can be used by the poll plugin) - REFACTOR: use more accurate is_first_post? method instead of post_number == 1 - FEATURE: add support for JSON-typed custom fields - FEATURE: allow plugins to add validation - FEATURE: add post_custom_fields to PostSerializer - FEATURE: allow plugins to whitelist post_custom_fields - FIX: don't bump when post did not save successfully - FEATURE: polls are supported in any post - FEATURE: allow for multiple polls in the same post - FEATURE: multiple choice polls - FEATURE: rating polls - FEATURE: new dialect allowing users to preview polls in the composer
17 lines
542 B
JavaScript
17 lines
542 B
JavaScript
export default Em.View.extend({
|
|
templateName: "poll",
|
|
classNames: ["poll"],
|
|
attributeBindings: ["data-poll-type", "data-poll-name", "data-poll-status"],
|
|
|
|
poll: Em.computed.alias("controller.poll"),
|
|
|
|
"data-poll-type": Em.computed.alias("poll.type"),
|
|
"data-poll-name": Em.computed.alias("poll.name"),
|
|
"data-poll-status": Em.computed.alias("poll.status"),
|
|
|
|
_fixPollContainerHeight: function() {
|
|
const pollContainer = this.$(".poll-container");
|
|
pollContainer.height(pollContainer.height());
|
|
}.on("didInsertElement")
|
|
});
|