Draw attention to invalid numbers

This commit is contained in:
lilia 2015-02-07 18:51:52 -10:00
parent 746e6530b9
commit 63d232dedb

View file

@ -102,7 +102,7 @@ var Whisper = Whisper || {};
comparator: false comparator: false
}); });
// View to display the selected recipients // View to display the selected recipients
new Whisper.RecipientListView({ this.recipients_view = new Whisper.RecipientListView({
collection: this.recipients, collection: this.recipients,
el: this.$el.find('.recipients') el: this.$el.find('.recipients')
}); });
@ -158,6 +158,15 @@ var Whisper = Whisper || {};
}, },
create: function() { create: function() {
var errors = this.recipients_view.$el.find('.error');
if (errors.length) {
// TODO: css animation or error notification
errors.removeClass('error');
setTimeout(function(){ errors.addClass('error'); }, 300);
return;
}
if (this.recipients.length > 1) { if (this.recipients.length > 1) {
this.createGroup(); this.createGroup();
} else { } else {