blob: b42186ced984dc335ebc61030e99d5d1d4498e32 (
plain)
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
|
<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Prado Chat Demo</title>
<link rel="stylesheet" type="text/css" href="<%~ style.css %>" />
</head>
<body>
<com:TForm>
<h1>Prado Chat Demo</h1>
<noscript>Javascript is required for the chat demo to function.</noscript>
<div id="messages" class="messages">
<com:TPlaceHolder ID="messageList" />
</div>
<div id="users" class="user-list">
<com:TPlaceHolder ID="userList" />
</div>
<div class="message-input">
<com:TActiveTextBox ID="userinput"
Columns="40" Rows="2" TextMode="MultiLine" />
<com:TActiveImageButton ID="sendButton" CssClass="send-button"
ImageUrl=<%~ send.gif %> OnClick="processMessage"/>
</div>
<com:TTimeTriggeredCallback OnCallback="refresh"
Interval="2" StartTimerOnLoad="true" />
<com:TClientScript>
Event.observe($("<%= $this->userinput->ClientID %>"), "keypress", function(ev)
{
if(Event.keyCode(ev) == Event.KEY_RETURN)
{
if(Event.element(ev).value.length > 0)
new Prado.Callback("<%= $this->sendButton->UniqueID %>");
Event.stop(ev);
}
});
</com:TClientScript>
</com:TForm>
<div id="footer">
Copyright © 2007-2015 <a href="https://github.com/pradosoft">The PRADO Group</a>
<br/><br/>
<%= Prado::poweredByPrado() %>
</div>
</body>
</html>
|