chat.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5. <title>Chat Demo Starter</title>
  6. <script type="text/javascript" src="../../dojo/dojo.js"
  7. djConfig="isDebug: false, defaultTestTheme: 'soria'"></script>
  8. <script type="text/javascript" src="../tests/_testCommon.js"></script>
  9. <style type="text/css">
  10. @import "../../dijit/tests/css/dijitTests.css";
  11. @import "../themes/soria/soria.css";
  12. @import "chat/chat.css";
  13. .body { width:720px; margin:0 auto; }
  14. .picker {
  15. margin:0 auto;
  16. height:100px;
  17. }
  18. .box a { color:#000; text-decoration:none; }
  19. .box { border:1px solid #666;
  20. background:#b7cdee url('../themes/soria/images/gradientTopBg.png') repeat-x top left;
  21. background-position:0px -1px;
  22. padding:35px;
  23. padding-top:15px;
  24. padding-bottom:15px;
  25. margin:5px;
  26. font-weight:bold;
  27. -moz-border-radius:7pt;
  28. cursor:pointer;
  29. }
  30. .box:hover {
  31. color:#fff;
  32. background-color:#54f767;
  33. }
  34. </style>
  35. <script type="text/javascript">
  36. var _pass = function(/* Event */e){
  37. var href = e.target.getAttribute("href")||null;
  38. if(href){ window.location.href = href; }
  39. }
  40. dojo.addOnLoad(function(){
  41. var links = dojo.query(".box");
  42. dojo.forEach(links,function(node){
  43. dojo.connect(node,"onclick","_pass");
  44. });
  45. });
  46. </script>
  47. </head>
  48. <body class="soria">
  49. <div class="body">
  50. <h1 class="testTitle">Dojo chat demo preabmle ...</h1>
  51. <p>
  52. There are two examples of chat, using <a
  53. href="http://cometd.org">cometd</a> as a backend and Dojo's
  54. dojox.cometd client as a transport.
  55. </p>
  56. <p>
  57. The first, a simple public chat room, that any live participants
  58. that happen to be online will be able to communicate.
  59. </p>
  60. <div class="dijitInline box" href="chat/community.html">Join Group Chat</div>
  61. <p>The other: the example from the Dojo Book - an example of a
  62. client / operator relationship, where the client chats from an
  63. 'existing' page, and the operator has a TabContainer view of
  64. open client chats, and can communicate privately and directly
  65. to the client. The client page demonstrates how this can be used in existing
  66. pages for real-time support. You will need two people for this, or you
  67. are welcome to talk to yourself ...
  68. </p>
  69. <div class="dijitInline">
  70. <div class="dijitInline box" href="chat/client.html">Client Page</div>
  71. <div class="dijitInline box" href="chat/operator.html">Operator Page</div>
  72. </div>
  73. <p>the Chatroom widget source can be found <a href="chat/room.js">here</a>.</p>
  74. </div>
  75. </body>
  76. </html>