aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dijit/demos/chat/community.html
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dijit/demos/chat/community.html
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dijit/demos/chat/community.html')
-rw-r--r--includes/js/dijit/demos/chat/community.html114
1 files changed, 0 insertions, 114 deletions
diff --git a/includes/js/dijit/demos/chat/community.html b/includes/js/dijit/demos/chat/community.html
deleted file mode 100644
index 4c208a0..0000000
--- a/includes/js/dijit/demos/chat/community.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<html>
-<head>
- <title>Cometd chat / Operator Page</title>
-
- <style type="text/css">
- @import "chat.css";
- @import "../../tests/css/dijitTests.css";
- @import "../../themes/tundra/tundra.css";
- @import "../../../dojox/widget/SortList/SortList.css";
-
- html, body { margin:0; padding:0; height:100%; width:100%; overflow:hidden; }
-
- #status { position:absolute; top:5px; right:25px; }
- #mainPane { background:#fff; }
- </style>
-
- <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:true, parseOnLoad:false"></script>
- <script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
- <script type="text/javascript" src="room.js"></script>
- <script type="text/javascript">
- dojo.require("dijit.Dialog");
- dojo.require("dijit.layout.SplitContainer");
- dojo.require("dijit.layout.LayoutContainer");
- dojo.require("dijit.layout.TabContainer");
- dojo.require("dijit.layout.ContentPane");
- dojo.require("dijit.form.Button");
-
- // custom widget created for this demo:
- dojo.require("dojox.widget.SortList");
-
- dojo.require("dojo.parser");
-
- // not for production use?
- //dojox.cometd.init("http://comet.sitepen.com:9000/cometd");
-
- var control = {
- _chats: [],
- _getAlert: function(e){
- console.log(e);
- if (!this._chats[(e.data.user)] && (operator != e.data.user)){
- dojox.cometd.subscribe("/chat/demo/"+e.data.joined,this,"_privateChat");
-
- var tabNode = document.createElement('div');
- tabNode.id = "chatWith" + e.data.user;
- var chatNode = document.createElement('div');
- chatNode.id = e.data.user + "Widget";
- tabNode.appendChild(chatNode);
- var newTab = new dijit.layout.ContentPane({
- title: e.data.user,
- closable: true
- },tabNode);
- dijit.byId('tabView').addChild(newTab);
- var chat = new dijit.demos.chat.Room({
- roomId: e.data.joined,
- registeredAs: operator
- },chatNode);
- chat.startup();
- this._chats[(e.data.user)]=true;
- }
- },
-
- _privateChat: function(e){
- var thisChat = dijit.byId(e.data.user+"Widget") || false;
- if (thisChat) { thisChat._chat(e); }
- }
- };
-
- function registerOperator(){
- dijit.byId('loginDialog').hide();
-
- }
-
- dojo.addOnLoad(function(){
- dojo.parser.parse(dojo.body());
- // dojox.cometd.subscribe("/chat/demo/poundDojo",control,"_getAlert");
- var widget = dijit.byId('userList');
- for (var i = 0; i<50; i++){
- var node = document.createElement('li');
- node.innerHTML = i+": list item sample";
- widget.containerNode.appendChild(node);
- }
- widget.onSort();
- });
- </script>
-</head>
-<body>
-<div dojoType="dijit.layout.LayoutContainer" style="width:100%; height:100%;">
- <div dojoType="dijit.layout.SplitContainer" orientation="vertical" style="height:100%" layoutAlign="client" sizerWidth="7">
- <div dojoType="dijit.layout.SplitContainer" orientation="horizontal" sizerWidth="7" activeSizing="true" layoutAlign="top" sizeShare="80">
- <div id="mainPane" dojoType="dijit.layout.ContentPane" title="Home" style="padding:8px;" sizeShare="80" layoutAlign="left" style="background:#fff;">
- <h3>Dojo community chat demo</h3>
- <h2>NON-WORKING PROTOTYPE</h2>
-
- <button dojoType="dijit.form.Button">Login
- <script type="dojo/method" event="onClick">
- console.log('foo?');
- dijit.byId('loginDialog').show();
- </script>
- </button>
-
- </div>
- <div title="Users in #dojo" id="userList" dojoType="dojox.widget.SortList" sizeShare="20" sizeMin="15" layoutAlign="right"></div>
- </div>
- <div dojoType="dijit.layout.ContentPane" sizeShare="20" layoutAlign="bottom">
- bottom. (input area)
- </div>
- </div>
-</div>
-<div dojoType="dijit.Dialog" id="loginDialog" title="Select Username:">
- Name: <input type="text" name="username" id="opName" value="" />
- <input type="submit" value="login" onclick="registerOperator()"/>
-</div>
-</body>
-</html>