Last active
August 5, 2016 07:35
-
-
Save vinilios/4fdeb3957d7123ba13c4b9882bdaa2d3 to your computer and use it in GitHub Desktop.
test-focus-invalidation
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
init: function() { | |
this._super(); | |
console.log("lala"); | |
}, | |
tagName: 'button', | |
classNameBindings: ['focused:focus'], | |
click: function(event) { | |
this.sendAction('onClick', this); | |
}, | |
focusIn: function() { | |
this.set('focused', true); | |
}, | |
focusOut: function() { | |
this.set('focused', false); | |
} | |
}); |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
observeClicked: Ember.observer('clicked', function() { | |
this.set('buttons', [0, 0, 0]); | |
}), | |
buttons: [1,2,3,4,5], | |
clicked: false, | |
actions: { | |
onClick: function(but) { | |
this.set('clicked', true); | |
} | |
} | |
}); |
This file contains hidden or 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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
button.focus { | |
color: #f00; | |
} |
This file contains hidden or 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
{ | |
"version": "0.10.4", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.7.0", | |
"ember-data": "2.7.0", | |
"ember-template-compiler": "2.7.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment