From 98cfc1b701374fe69c1d84e9560e85c185efddbf Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 22 Jul 2014 22:11:13 -1000 Subject: [PATCH] Remove old convo compose view --- js/popup.js | 1 - js/views/conversations/new.js | 45 ----------------------------------- popup.html | 1 - 3 files changed, 47 deletions(-) delete mode 100644 js/views/conversations/new.js diff --git a/js/popup.js b/js/popup.js index 24f328ba2f..f19d10a86f 100644 --- a/js/popup.js +++ b/js/popup.js @@ -17,7 +17,6 @@ new Whisper.ConversationListView({el: $('#contacts')}); -new Whisper.ConversationComposeView({el: $('body')}); Whisper.Threads.fetch({reset: true}); textsecure.registerOnLoadFunction(function() { diff --git a/js/views/conversations/new.js b/js/views/conversations/new.js deleted file mode 100644 index 5f36138b8d..0000000000 --- a/js/views/conversations/new.js +++ /dev/null @@ -1,45 +0,0 @@ -(function () { - 'use strict'; - - Whisper.ConversationComposeView = Backbone.View.extend({ - events : { - 'click #send_link' : 'show_send', - 'click #send' : 'focus_send', - 'click #compose-cancel' : 'hide_send', - 'submit #send' : 'submit_send' - }, - show_send: function(e) { - $('#send').fadeIn().find('input[type=text]').focus(); - }, - focus_send: function(e) { - $('#send input[type=text]').focus(); - }, - hide_send: function(e) { - $('#send').hide(); - e.preventDefault(); - }, - submit_send: function(e) { - e.preventDefault(); - var numbers = []; - var splitString = $("#send_numbers").val().split(","); - for (var i = 0; i < splitString.length; i++) { - try { - numbers.push(textsecure.utils.verifyNumber(splitString[i], textsecure.storage.getUnencrypted("regionCode"))); - } catch (numberError) { - if (!numberError.countryCodeValid) { - Whisper.notify('Invalid country code'); - } - if (!numberError.numberValid) { - Whisper.notify('Invalid number'); - } - $('#send input[type=text]').focus(); - return; - } - } - $("#send_numbers").val(''); - $('#send').hide(); - Whisper.Threads.findOrCreateForRecipient(numbers).trigger('select'); - } - }); -})(); - diff --git a/popup.html b/popup.html index 18c954f680..944f7630a0 100644 --- a/popup.html +++ b/popup.html @@ -100,7 +100,6 @@ -