-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathindex.scala.html
More file actions
44 lines (35 loc) · 1.7 KB
/
index.scala.html
File metadata and controls
44 lines (35 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@(title: String)
<!DOCTYPE html>
<html>
<head>
<title>@title</title>
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
<link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
</head>
<body ng-app="sseChat">
<div ng-controller="ChatCtrl">
<div id="header">
Your Name: <input type="text" name="user" id="userField" value="John Doe" ng-model="user" />
<select ng-model="currentRoom" ng-change="setCurrentRoom(currentRoom)" ng-options="r.name for r in rooms"></select>
</div>
<div id="chat">
<div class="{{msg.who}} msg" ng-repeat="msg in msgs | limitTo:-10"
ng-class="msg.user !== user ? 'others' : ''"
data-ng-show="hidden == false" data-ng-hide="hidden == true"
data-ng-animate="'fadeIn'">{{msg.time}}<br/>
<strong>{{msg.user}} says: </strong>{{msg.text}}<br/>
</div>
</div>
<div id="footer">
<form ng-submit="submitMsg()">
Say something: <input type="text" name="chat" id="textField" ng-model="inputText" />
<input type="button" id="saySomething" value="Submit" ng-click="submitMsg()" />
</form>
</div>
</div>
<script src="@routes.Assets.at("javascripts/vendor/angular-1.1.5.min.js")"></script>
<script src="/assets/javascripts/app.js"></script>
<script src="/assets/javascripts/services.js"></script>
<script src="/assets/javascripts/controllers.js"></script>
</body>
</html>