Small frontend fixes for the new group view
This commit is contained in:
parent
2bd77693e1
commit
dc41ebf701
3 changed files with 5 additions and 2 deletions
|
@ -102,6 +102,7 @@
|
||||||
<div class='message-composer'>
|
<div class='message-composer'>
|
||||||
<input class='send-message' rows='6' type='textarea'>
|
<input class='send-message' rows='6' type='textarea'>
|
||||||
<div class='attachments'> Add Files </div>
|
<div class='attachments'> Add Files </div>
|
||||||
|
<input type='submit'>
|
||||||
</div>
|
</div>
|
||||||
<div class='extension-details'>
|
<div class='extension-details'>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -66,7 +66,7 @@ var Whisper = Whisper || {};
|
||||||
},
|
},
|
||||||
|
|
||||||
createGroup: function(recipients, name) {
|
createGroup: function(recipients, name) {
|
||||||
var group = textsecure.storage.groups.createNewGroup(numbers);
|
var group = textsecure.storage.groups.createNewGroup(recipients);
|
||||||
var attributes = {};
|
var attributes = {};
|
||||||
attributes = {
|
attributes = {
|
||||||
id : group.id,
|
id : group.id,
|
||||||
|
|
|
@ -23,6 +23,7 @@ var Whisper = Whisper || {};
|
||||||
this.template = $('#new-group-form').html();
|
this.template = $('#new-group-form').html();
|
||||||
Mustache.parse(this.template);
|
Mustache.parse(this.template);
|
||||||
this.render();
|
this.render();
|
||||||
|
this.input = this.$el.find('input.number');
|
||||||
new Whisper.GroupRecipientsInputView({el: this.$el.find('input.numbers')}).$el.appendTo(this.$el);
|
new Whisper.GroupRecipientsInputView({el: this.$el.find('input.numbers')}).$el.appendTo(this.$el);
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
|
@ -30,10 +31,11 @@ var Whisper = Whisper || {};
|
||||||
},
|
},
|
||||||
|
|
||||||
send: function(e) {
|
send: function(e) {
|
||||||
|
e.preventDefault();
|
||||||
var numbers = this.$el.find('input.numbers').val().split(',');
|
var numbers = this.$el.find('input.numbers').val().split(',');
|
||||||
var name = this.$el.find('input.name').val();
|
var name = this.$el.find('input.name').val();
|
||||||
var thread = Whisper.Threads.createGroup(numbers, name);
|
var thread = Whisper.Threads.createGroup(numbers, name);
|
||||||
thread.sendMessage(input.val());
|
thread.sendMessage(this.input.val());
|
||||||
// close this, select the new thread
|
// close this, select the new thread
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue