From 63d232dedbbfb9fba2de64005b1b45d9bf6cadb1 Mon Sep 17 00:00:00 2001 From: lilia Date: Sat, 7 Feb 2015 18:51:52 -1000 Subject: [PATCH] Draw attention to invalid numbers --- js/views/new_conversation_view.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/views/new_conversation_view.js b/js/views/new_conversation_view.js index 392b760e1..1773a0db7 100644 --- a/js/views/new_conversation_view.js +++ b/js/views/new_conversation_view.js @@ -102,7 +102,7 @@ var Whisper = Whisper || {}; comparator: false }); // View to display the selected recipients - new Whisper.RecipientListView({ + this.recipients_view = new Whisper.RecipientListView({ collection: this.recipients, el: this.$el.find('.recipients') }); @@ -158,6 +158,15 @@ var Whisper = Whisper || {}; }, 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) { this.createGroup(); } else {