DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592)

This commit is contained in:
Joffrey JAFFEUX
2019-05-27 10:15:39 +02:00
committed by GitHub
parent 170c66c190
commit bfea922167
389 changed files with 2448 additions and 2460 deletions

View File

@@ -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();
}

View File

@@ -23,7 +23,7 @@ function initializePollUIBuilder(api) {
showPollBuilder() {
showModal("poll-ui-builder").set(
"toolbarEvent",
this.get("toolbarEvent")
this.toolbarEvent
);
}
}

View File

@@ -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 => {