-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Ember/EmberData 2.7 and fix deprecations
- Loading branch information
1 parent
b338a6b
commit 70b1426
Showing
5 changed files
with
35 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
import { | ||
get, | ||
Binding, | ||
defineProperty, | ||
computed, | ||
observer, | ||
Component | ||
} from "Ember"; | ||
import layout from "templates/components/LangFilterComponent.hbs"; | ||
|
||
|
||
const { alias } = computed; | ||
|
||
|
||
export default Component.extend({ | ||
layout, | ||
|
||
tagName: "li", | ||
|
||
init() { | ||
this._super.apply( this, arguments ); | ||
_checkedObserver: observer( "prop", function() { | ||
let prop = get( this, "prop" ); | ||
let path = `obj.${prop}`; | ||
|
||
var prop = get( this, "prop" ); | ||
var binding = Binding | ||
.from( `obj.${prop}` ) | ||
.to( "checked" ); | ||
binding.connect( this ); | ||
} | ||
defineProperty( this, "checked", alias( path ) ); | ||
}).on( "init" ) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import { BooleanTransform } from "EmberData"; | ||
|
||
|
||
const defaultOptions = { allowNull: true }; | ||
|
||
|
||
export default BooleanTransform.reopen({ | ||
deserialize( serialized ) { | ||
return serialized === null | ||
? null | ||
: this._super( serialized ); | ||
return this._super( serialized, defaultOptions ); | ||
}, | ||
|
||
serialize( deserialized ) { | ||
return deserialized === null | ||
? null | ||
: this._super( deserialized ); | ||
return this._super( deserialized, defaultOptions ); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters