mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592)
This commit is contained in:
@@ -89,12 +89,12 @@ export default Ember.Controller.extend({
|
||||
|
||||
@observes("isMultiple", "isNumber", "pollOptionsCount")
|
||||
_setPollMax() {
|
||||
const isMultiple = this.get("isMultiple");
|
||||
const isNumber = this.get("isNumber");
|
||||
const isMultiple = this.isMultiple;
|
||||
const isNumber = this.isNumber;
|
||||
if (!isMultiple && !isNumber) return;
|
||||
|
||||
if (isMultiple) {
|
||||
this.set("pollMax", this.get("pollOptionsCount"));
|
||||
this.set("pollMax", this.pollOptionsCount);
|
||||
} else if (isNumber) {
|
||||
this.set("pollMax", this.siteSettings.poll_maximum_options);
|
||||
}
|
||||
@@ -177,7 +177,7 @@ export default Ember.Controller.extend({
|
||||
let pollHeader = "[poll";
|
||||
let output = "";
|
||||
|
||||
const match = this.get("toolbarEvent")
|
||||
const match = this.toolbarEvent
|
||||
.getText()
|
||||
.match(/\[poll(\s+name=[^\s\]]+)*.*\]/gim);
|
||||
|
||||
@@ -301,7 +301,7 @@ export default Ember.Controller.extend({
|
||||
|
||||
actions: {
|
||||
insertPoll() {
|
||||
this.get("toolbarEvent").addText(this.get("pollOutput"));
|
||||
this.toolbarEvent.addText(this.pollOutput);
|
||||
this.send("closeModal");
|
||||
this._setupPoll();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ function initializePollUIBuilder(api) {
|
||||
showPollBuilder() {
|
||||
showModal("poll-ui-builder").set(
|
||||
"toolbarEvent",
|
||||
this.get("toolbarEvent")
|
||||
this.toolbarEvent
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ function initializePolls(api) {
|
||||
// we need a proper ember object so it is bindable
|
||||
@observes("polls")
|
||||
pollsChanged() {
|
||||
const polls = this.get("polls");
|
||||
const polls = this.polls;
|
||||
if (polls) {
|
||||
this._polls = this._polls || {};
|
||||
polls.forEach(p => {
|
||||
|
||||
Reference in New Issue
Block a user