DEV: Fix the Function.prototype.on deprecation (#8205)

https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on
This commit is contained in:
Jarek Radosz
2019-10-18 01:49:41 +02:00
committed by GitHub
parent f6ea986aec
commit 7de3e7b322
10 changed files with 30 additions and 30 deletions

View File

@ -89,18 +89,18 @@ export default Ember.Mixin.create({
return settingDefault !== bufferedValue;
},
_watchEnterKey: function() {
_watchEnterKey: Ember.on("didInsertElement", function() {
$(this.element).on("keydown.setting-enter", ".input-setting-string", e => {
if (e.keyCode === 13) {
// enter key
this.send("save");
}
});
}.on("didInsertElement"),
}),
_removeBindings: function() {
_removeBindings: Ember.on("willDestroyElement", function() {
$(this.element).off("keydown.setting-enter");
}.on("willDestroyElement"),
}),
_save() {
Ember.warn("You should define a `_save` method", {