mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 23:24:10 +08:00
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592)
This commit is contained in:
@ -10,7 +10,7 @@ export default Ember.Component.extend({
|
||||
|
||||
@observes("editorId")
|
||||
editorIdChanged() {
|
||||
if (this.get("autofocus")) {
|
||||
if (this.autofocus) {
|
||||
this.send("focus");
|
||||
}
|
||||
},
|
||||
@ -18,14 +18,14 @@ export default Ember.Component.extend({
|
||||
@observes("content")
|
||||
contentChanged() {
|
||||
if (this._editor && !this._skipContentChangeEvent) {
|
||||
this._editor.getSession().setValue(this.get("content"));
|
||||
this._editor.getSession().setValue(this.content);
|
||||
}
|
||||
},
|
||||
|
||||
@observes("mode")
|
||||
modeChanged() {
|
||||
if (this._editor && !this._skipContentChangeEvent) {
|
||||
this._editor.getSession().setMode("ace/mode/" + this.get("mode"));
|
||||
this._editor.getSession().setMode("ace/mode/" + this.mode);
|
||||
}
|
||||
},
|
||||
|
||||
@ -37,7 +37,7 @@ export default Ember.Component.extend({
|
||||
changeDisabledState() {
|
||||
const editor = this._editor;
|
||||
if (editor) {
|
||||
const disabled = this.get("disabled");
|
||||
const disabled = this.disabled;
|
||||
editor.setOptions({
|
||||
readOnly: disabled,
|
||||
highlightActiveLine: !disabled,
|
||||
@ -79,7 +79,7 @@ export default Ember.Component.extend({
|
||||
editor.setTheme("ace/theme/chrome");
|
||||
editor.setShowPrintMargin(false);
|
||||
editor.setOptions({ fontSize: "14px" });
|
||||
editor.getSession().setMode("ace/mode/" + this.get("mode"));
|
||||
editor.getSession().setMode("ace/mode/" + this.mode);
|
||||
editor.on("change", () => {
|
||||
this._skipContentChangeEvent = true;
|
||||
this.set("content", editor.getSession().getValue());
|
||||
@ -103,7 +103,7 @@ export default Ember.Component.extend({
|
||||
this.appEvents.on("ace:resize", this, "resize");
|
||||
}
|
||||
|
||||
if (this.get("autofocus")) {
|
||||
if (this.autofocus) {
|
||||
this.send("focus");
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user