Toggle metadata visibility by clicking name

This commit is contained in:
2017-02-19 11:13:14 +08:00
parent 0a2f44cec8
commit 01c1a9c804
2 changed files with 17 additions and 3 deletions
+15 -1
View File
@@ -3,6 +3,20 @@ import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'table',
classNames: 'contributor-list'
classNames: 'contributor-list',
selectedContributor: null,
actions: {
toggleContributorInfo(contributor) {
if (contributor.get('showMetadata')) {
contributor.set('showMetadata', false);
} else {
this.get('contributors').setEach('showMetadata', false);
contributor.set('showMetadata', true);
}
}
}
});