2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();
}