-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
150 lines (132 loc) · 5.35 KB
/
index.html
File metadata and controls
150 lines (132 loc) · 5.35 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html lang="en">
<head>
<title>Secure Chat</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="style.css">
<script src="sjcl.js"></script>
<script src="script.js"></script>
<script>
window.userName = "";
</script>
</head>
<body>
<div class="container-fluid" id="main-container">
<!-- AddChat Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Add a Chat</h4>
</div>
<div class="modal-body">
<p>Add a new chat here:</p>
<form id="addForm">
<table id="addFormTable">
<tr>
<td><p>Your nickname: </p></td><td class="leftPad"><input type="text" id="nickNameInput"></td></td>
</tr>
<tr>
<td><p>Chat name: </p></td><td class="leftPad"><input type="text" id="nameInput"></td>
</tr>
<tr>
<td><p>Password: </p></td><td class="leftPad"><input type="password" id="pwordInput"></td>
</tr>
<!--
<tr>
<td><p>Server IP: </p></td><td class="leftPad"><input type="text" id="ipInput"></td>
</tr>
<tr>
<td><p>Port: </p></td><td class="leftPad"><input type="text" id="portInput"></td>
</tr>-->
</table>
<button id="addChatBtn" type="button" class="btn btn-primary" onclick="addAChat()">Add</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- RemoveChat Modal-->
<div id="removeChatModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Clear chats</h4>
</div>
<div class="modal-body">
<p>Are you sure you want to remove chats?</p>
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="clearCookies()">Yes</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<!--Main page-->
<div class="row content">
<div id="sidebar" class="col-sm-3 sidenav">
<h4 class="mainTitle"><b>ChitChat</b></h4>
<ul class="nav nav-pills nav-stacked" id="chatsUL">
</ul>
<div class="btn-group">
<button id="addChatBtn" class="btn btn-primary" data-toggle="modal" data-target="#myModal"><span class="glyphicon glyphicon-plus"></span> Add Chat</button>
<span data-toggle="tooltip" data-placement="right" title="Clear">
<button id="editChatsBtn" class="btn btn-primary" onclick="clearCookies()"><span class="glyphicon glyphicon-trash"></span></button>
</span>
</div>
<br>
<!--
<div class="input-group">
<input type="text" class="form-control" placeholder="Search chats...">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>-->
</div>
<div id="main-content" class="col-sm-9">
<p id="statusP"><b>Status: </b><span id="status"></span></p>
<div id="chatbox">
<div id="messages">
</div>
<div id="sendbox">
<form id="message-form" action="#" method="post">
<div class="row sendboxrow">
<div class="col-sm-10" id="msgcol">
<input type="text" id="msgbox" name="message">
</div>
<div class="col-sm-2" id="btncol">
<input id="sendbtn" class="btn btn-primary"type="submit" value="Send">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!--Future site footer
<footer class="container-fluid">
<p>Footer Text</p>
</footer>-->
</body>
</html>
<!--
To do:
- Add edit chats functionality (that edits cookies too)
- Add search chats functionality
- Fix scrolling problem
-->