Source

gevent_cometd / gevent_cometd / templates / demo.mak

Full commit
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Chat demo</title>
<script type="text/javascript">
var dojoConfig = {
baseUrl: "/static/",
packages: [
    { name: "dojo", location: "//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/" },
    { name: "dijit", location: "//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dijit/" },
    { name: "dojox", location: "//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojox/" },
    { name: "demo", location: "./"}
]
};
</script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/dojo.js" data-dojo-config="async: true"></script>
</head>
<style type="text/css">
body{
    font-size: 10px;
    font-family: sans;
}
</style>
<body>
	<ul class="messages"></ul>
	
<form action="/message" id="msg_form" method="post">
<p>
Public channel<input type="radio" name="channel" value="pub_chan" checked="checked">
Alt. Public channel<input type="radio" name="channel" value="pub_chan2">
</p>
<p>
user <input type="text" name="user" value="User">
</p>
<p>
<textarea name="message" style="width:300px"></textarea>
</p>
<p>
<input type="submit" value="send message">
</p>
</form>

<script type="text/javascript">
require(["demo"],function(Demo){
    Demo.start('${config['webapp_url']}',
    '${config['cometd.server']['server']}',
    {'user' : Math.random(),
        'channels' : [ 'pub_chan', 'pub_chan2' ]
    });
});
</script>

</body>
</html>