Files
meanTorrent/modules/chat/client/views/chat.client.view.html
mleanos 8128570279 [fix] Empty Chat Messages
Disables the submit button on the Chat form, when no message is present.
Also, removed the `data-` prefix from the various Chat view elements.
2015-08-24 23:23:55 -07:00

30 lines
1.2 KiB
HTML

<!-- The chat view -->
<section class="container" ng-controller="ChatController">
<div class="page-header">
<h1>Chat Example</h1>
</div>
<!-- The message form -->
<form class="col-xs-12 col-md-offset-4 col-md-4" ng-submit="sendMessage();">
<fieldset class="row">
<div class="input-group">
<input type="text" id="messageText" name="messageText" class="form-control" ng-model="messageText" placeholder="Enter new message">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary" ng-disabled="!messageText.length">Submit</button>
</span>
</div>
</fieldset>
</form>
<ul class="list-unstyled">
<!-- List all messages -->
<li class="col-xs-12 col-md-offset-4 col-md-4 chat-message" ng-repeat="message in messages">
<small class="pull-right text-muted" ng-bind="message.created | date:'mediumTime'"></small>
<img ng-src="{{message.profileImageURL}}" alt="{{message.username}}" class="pull-left chat-profile-image" />
<div class="pull-left chat-message-details">
<strong ng-bind="message.username"></strong>
<br>
<span ng-bind="message.text"></span>
</div>
</li>
</ul>
</section>