Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##core
- SC.Binding.firstObject = function() {
- return this.transform(function(value, isForward) {
- if (value && value.isEnumerable) {
- value = value.firstObject();
- }
- return value;
- });
- } ;
- SC.Binding.property = function(key) {
- return this.transform(function(value, isForward) {
- if (value && value.get(key)) {
- value = value.get(key);
- }
- return value;
- });
- };
- ## controllers/projects
- contentBinding: 'Ras.clientsController.selection',
- contentBindingDefault: SC.Binding.firstObject().property('projects'),
- contentHasChanged: function() {
- this.selectObject(this.get('firstObject'));
- }.observes('content')
Add Comment
Please, Sign In to add comment