decide.nolog.cz/app/views/poll.js

34 lines
888 B
JavaScript
Raw Normal View History

2014-10-24 01:24:21 +02:00
export default Ember.View.extend(Em.I18n.TranslateableProperties, {
showEvaluation: false,
actions: {
switchEvaluationVisibility: function() {
if (this.get('showEvaluation') === true) {
this.set('showEvaluation', false);
}
else {
this.set('showEvaluation', true);
}
}
},
2014-08-03 17:12:42 +02:00
didInsertElement : function(){
this._super();
Ember.run.scheduleOnce('afterRender', this, function(){
2014-08-03 17:19:11 +02:00
$('.user-selections-table').floatThead({});
2014-08-03 17:12:42 +02:00
});
},
showEvaluationLabel: function() {
if (this.get('showEvaluation')) {
2014-10-24 01:24:21 +02:00
return this.get('showEvaluationLabelHide');
}
else {
2014-10-24 01:24:21 +02:00
return this.get('showEvaluationLabelShow');
}
2014-10-24 01:24:21 +02:00
}.property('showEvaluation'),
showEvaluationLabelHideTranslation: "poll.input.showEvaluation.hide",
showEvaluationLabelShowTranslation: "poll.input.showEvaluation.show"
2014-08-03 17:12:42 +02:00
});