summaryrefslogtreecommitdiff
path: root/demos/chat/protected/pages/Home.page
blob: b896cd28433b9a88c6929815c24514772208e838 (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
51
<!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>
		<com:TJavascriptLogger Visible="false"/>

<div id="footer">
Copyright &copy; 2007 <a href="http://www.pradosoft.com">PradoSoft</a>.
<br/><br/>
<%= Prado::poweredByPrado() %>
</div>

</body>
</html>