FIX: Couldn't collapse validation messages

This commit is contained in:
Robin Ward 2015-11-06 16:03:34 -05:00
parent 0f9a009982
commit 355215ca91

View file

@ -10,7 +10,8 @@ export default Ember.Component.extend(StringBuffer, {
rerenderTriggers: ['validation.reason'],
click() {
this.set('shownAt', false);
this.set('shownAt', null);
this.set('validation.lastShownAt', null);
},
bad: Ember.computed.alias("validation.failed"),
@ -40,8 +41,7 @@ export default Ember.Component.extend(StringBuffer, {
const reason = this.get('validation.reason');
if (!reason) { return; }
buffer.push("<span class='close'>" + iconHTML('times-circle') + "</span>");
buffer.push(reason);
buffer.push(`<span class='close'>${iconHTML('times-circle')}</span>${reason}`);
},
bounceLeft($elem) {