Fix some markup issues
* Remove spurious search div * Fix nested uls * Use class name selected, not closed (the inverse) * Restor nacl div
This commit is contained in:
parent
c2beda8e40
commit
546cdf82cb
5 changed files with 9 additions and 10 deletions
|
@ -16,6 +16,8 @@
|
||||||
<link href="/stylesheets/bootstrap-tagsinput.css" rel="stylesheet" type="text/css" />
|
<link href="/stylesheets/bootstrap-tagsinput.css" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
<body class='signal index' data-name="curve25519" data-tools="pnacl" data-configs="Debug Release" data-path="nacl/pnacl/{config}">
|
<body class='signal index' data-name="curve25519" data-tools="pnacl" data-configs="Debug Release" data-path="nacl/pnacl/{config}">
|
||||||
|
<div id="listener"></div>
|
||||||
|
<div id="log"></div>
|
||||||
<div class='title-bar' id='header'>
|
<div class='title-bar' id='header'>
|
||||||
<h1>Signal</h1>
|
<h1>Signal</h1>
|
||||||
<a href id='new-message'>New message</a>
|
<a href id='new-message'>New message</a>
|
||||||
|
@ -31,9 +33,6 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='search'>
|
|
||||||
<input name='contact_search' placeholder='Search' type='search'>
|
|
||||||
</div>
|
|
||||||
<div id='gutter' class='gutter'>
|
<div id='gutter' class='gutter'>
|
||||||
<div class='search'>
|
<div class='search'>
|
||||||
<form>
|
<form>
|
||||||
|
@ -43,7 +42,7 @@
|
||||||
<div id='contacts'></div>
|
<div id='contacts'></div>
|
||||||
</div>
|
</div>
|
||||||
<script type='text/x-tmpl-mustache' id='conversation'>
|
<script type='text/x-tmpl-mustache' id='conversation'>
|
||||||
<ul class='discussion'></ul>
|
<div class='discussion-container'></ul>
|
||||||
<div class='send-message-area'>
|
<div class='send-message-area'>
|
||||||
<div class='message-composer'>
|
<div class='message-composer'>
|
||||||
<form class='send'>
|
<form class='send'>
|
||||||
|
|
|
@ -16,8 +16,6 @@ var Whisper = Whisper || {};
|
||||||
|
|
||||||
this.listenTo(this.model, 'change', this.render); // auto update
|
this.listenTo(this.model, 'change', this.render); // auto update
|
||||||
this.listenTo(this.model, 'destroy', this.remove); // auto update
|
this.listenTo(this.model, 'destroy', this.remove); // auto update
|
||||||
|
|
||||||
this.$el.addClass('closed');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
open: function(e) {
|
open: function(e) {
|
||||||
|
|
|
@ -15,9 +15,9 @@ var Whisper = Whisper || {};
|
||||||
|
|
||||||
select: function(e) {
|
select: function(e) {
|
||||||
var target = $(e.target).closest('.conversation');
|
var target = $(e.target).closest('.conversation');
|
||||||
if (target.hasClass('closed')) {
|
if (!target.is('.selected')) {
|
||||||
target.siblings().addClass('closed');
|
target.siblings().removeClass('slected');
|
||||||
target.removeClass('closed').addClass('selected');
|
target.addClass('selected');
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,7 +12,7 @@ var Whisper = Whisper || {};
|
||||||
this.$el.html(Mustache.render(this.template));
|
this.$el.html(Mustache.render(this.template));
|
||||||
|
|
||||||
this.view = new Whisper.MessageListView({collection: this.model.messages()});
|
this.view = new Whisper.MessageListView({collection: this.model.messages()});
|
||||||
this.$el.find('.discussion').append(this.view.el);
|
this.$el.find('.discussion-container').append(this.view.el);
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
'submit .send': 'sendMessage',
|
'submit .send': 'sendMessage',
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
.number.error {
|
.number.error {
|
||||||
background-color: #ffdddd;
|
background-color: #ffdddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#listener, #log { display: none; }
|
||||||
|
|
Loading…
Reference in a new issue