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