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:
parent
170c66c190
commit
bfea922167
389 changed files with 2448 additions and 2460 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue