From 44f272a181b2a1389bd8a4d29f303eb9b354d848 Mon Sep 17 00:00:00 2001 From: lilia Date: Sun, 27 Jul 2014 14:49:02 -1000 Subject: [PATCH] Get messages sending with new ui Also convert index.html to 4-space indentation. --- index.html | 205 ++++++++++++------------ js/views/conversation_list_item_view.js | 4 +- js/views/conversation_view.js | 4 +- 3 files changed, 108 insertions(+), 105 deletions(-) diff --git a/index.html b/index.html index 74bcd9d2b..f26f08da6 100644 --- a/index.html +++ b/index.html @@ -1,111 +1,114 @@ - - - - - - Signal for Chrome - - - - - - - -
-

Signal

-
-
-
-

- These conversations may be missing SMS messages -

- - X - -
-
- -
- - -
-
- -
-
- -
- Add Files -
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + - + + + + + + + + + + diff --git a/js/views/conversation_list_item_view.js b/js/views/conversation_list_item_view.js index 27af1fc3c..76d074e58 100644 --- a/js/views/conversation_list_item_view.js +++ b/js/views/conversation_list_item_view.js @@ -21,10 +21,10 @@ var Whisper = Whisper || {}; }, open: function(e) { - $('#main').trigger('close'); // detach any existing conversation views + $('#conversation').trigger('close'); // detach any existing conversation views if (!this.view) { this.view = new Whisper.ConversationView({ - el: $('#main'), + el: $('#conversation'), model: this.model }); } else { diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 5b87d8244..733899abb 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -10,13 +10,13 @@ var Whisper = Whisper || {}; this.view = new Whisper.MessageListView({collection: this.model.messages()}); }, events: { - 'submit #new-message': 'sendMessage', + 'submit #send': 'sendMessage', 'close': 'undelegateEvents' }, sendMessage: function(e) { e.preventDefault(); - var input = $('#new-message-text'); + var input = this.$el.find('#send input'); if (input.val().length > 0) { this.model.sendMessage(input.val()); input.val("");