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

@ -15,13 +15,13 @@ export default Ember.Controller.extend({
field_type: "text",
position: MAX_FIELDS
});
this.get("model").pushObject(f);
this.model.pushObject(f);
},
moveUp(f) {
const idx = this.get("sortedFields").indexOf(f);
const idx = this.sortedFields.indexOf(f);
if (idx) {
const prev = this.get("sortedFields").objectAt(idx - 1);
const prev = this.sortedFields.objectAt(idx - 1);
const prevPos = prev.get("position");
prev.update({ position: f.get("position") });
@ -30,9 +30,9 @@ export default Ember.Controller.extend({
},
moveDown(f) {
const idx = this.get("sortedFields").indexOf(f);
const idx = this.sortedFields.indexOf(f);
if (idx > -1) {
const next = this.get("sortedFields").objectAt(idx + 1);
const next = this.sortedFields.objectAt(idx + 1);
const nextPos = next.get("position");
next.update({ position: f.get("position") });
@ -41,7 +41,7 @@ export default Ember.Controller.extend({
},
destroy(f) {
const model = this.get("model");
const model = this.model;
// Only confirm if we already been saved
if (f.get("id")) {