Render conversation titles
This commit is contained in:
parent
bc4d31cf72
commit
7bf1d41184
8 changed files with 21 additions and 10 deletions
|
@ -32,6 +32,7 @@
|
||||||
<li><a class='destroy'>Delete messages</a></li>
|
<li><a class='destroy'>Delete messages</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<span class='conversation-title'>{{ title }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='discussion-container'></div>
|
<div class='discussion-container'></div>
|
||||||
|
|
|
@ -24,7 +24,10 @@
|
||||||
},
|
},
|
||||||
template: $('#conversation').html(),
|
template: $('#conversation').html(),
|
||||||
render_attributes: function() {
|
render_attributes: function() {
|
||||||
return { group: this.model.get('type') === 'group' };
|
return {
|
||||||
|
group: this.model.get('type') === 'group',
|
||||||
|
title: this.model.getTitle()
|
||||||
|
};
|
||||||
},
|
},
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
this.listenTo(this.model, 'destroy', this.stopListening);
|
this.listenTo(this.model, 'destroy', this.stopListening);
|
||||||
|
@ -34,7 +37,7 @@
|
||||||
this.appWindow = options.appWindow;
|
this.appWindow = options.appWindow;
|
||||||
new Whisper.WindowControlsView({
|
new Whisper.WindowControlsView({
|
||||||
appWindow: this.appWindow
|
appWindow: this.appWindow
|
||||||
}).$el.appendTo(this.$('#header'));
|
}).$el.insertAfter(this.$('.menu'));
|
||||||
|
|
||||||
this.fileInput = new Whisper.FileInputView({
|
this.fileInput = new Whisper.FileInputView({
|
||||||
el: this.$('.attachments'),
|
el: this.$('.attachments'),
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
window.Whisper = window.Whisper || {};
|
window.Whisper = window.Whisper || {};
|
||||||
|
|
||||||
Whisper.WindowControlsView = Whisper.View.extend({
|
Whisper.WindowControlsView = Whisper.View.extend({
|
||||||
|
tagName: 'span',
|
||||||
className: 'window-controls',
|
className: 'window-controls',
|
||||||
template: $('#window-controls').html(),
|
template: $('#window-controls').html(),
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
.file-input .close {
|
.file-input .close {
|
||||||
top: -10px;
|
top: -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.conversation-title {
|
||||||
|
line-height: $header-height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.conversation + .new-group-update-form,
|
.conversation + .new-group-update-form,
|
||||||
|
|
|
@ -52,6 +52,10 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.window-controls {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
.window-controls {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gutter {
|
.gutter {
|
||||||
padding: $header-height 0 0;
|
padding: $header-height 0 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,9 @@ body {
|
||||||
#header button:hover {
|
#header button:hover {
|
||||||
background-color: rgba(19, 117, 196, 0.8); }
|
background-color: rgba(19, 117, 196, 0.8); }
|
||||||
|
|
||||||
|
.window-controls {
|
||||||
|
float: right; }
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -260,9 +263,6 @@ img.emoji {
|
||||||
.attachment-preview img {
|
.attachment-preview img {
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
|
||||||
.window-controls {
|
|
||||||
text-align: right; }
|
|
||||||
|
|
||||||
.gutter {
|
.gutter {
|
||||||
padding: 36px 0 0; }
|
padding: 36px 0 0; }
|
||||||
|
|
||||||
|
@ -367,6 +367,8 @@ input.search {
|
||||||
padding: 36px 0; }
|
padding: 36px 0; }
|
||||||
.conversation .file-input .close {
|
.conversation .file-input .close {
|
||||||
top: -10px; }
|
top: -10px; }
|
||||||
|
.conversation .conversation-title {
|
||||||
|
line-height: 36px; }
|
||||||
|
|
||||||
.conversation + .new-group-update-form,
|
.conversation + .new-group-update-form,
|
||||||
.conversation, .discussion-container, .message-list, .message-detail, .key-verification {
|
.conversation, .discussion-container, .message-list, .message-detail, .key-verification {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue