Formatting
This commit is contained in:
parent
18aa8d9791
commit
04fe8c7dfa
1 changed files with 8 additions and 4 deletions
|
|
@ -16,17 +16,19 @@
|
||||||
color: black;
|
color: black;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-style: bold;
|
font-style: bold;
|
||||||
|
background-color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<input type="hidden" id="displayname" />
|
<input type="hidden" id="displayname" />
|
||||||
<div style="float:right;">
|
<div style="float:right; background-color: grey; padding:1em; margin:1em;">
|
||||||
<h3>Salons</h3>
|
<h3>Salons</h3>
|
||||||
<ul><li id="pubChan">Public</li></ul>
|
<ul><li id="pubChan">Public</li></ul>
|
||||||
<h3>Utilisateurs</h3>
|
<h3>Utilisateurs</h3>
|
||||||
<ul id="userlist" >
|
<ul id="userlist" style="list-style-type:none;">
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<ul id="discussion">
|
<ul id="discussion">
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -75,15 +77,17 @@
|
||||||
setPublic();
|
setPublic();
|
||||||
|
|
||||||
var getUsers = function() {
|
var getUsers = function() {
|
||||||
|
console.log("Try and get user list ...");
|
||||||
$('#userlist').empty();
|
$('#userlist').empty();
|
||||||
$('#to').empty();
|
$('#to').empty();
|
||||||
$.get("/api/chat/users").done(
|
$.get("/api/chat/users").done(
|
||||||
function(users) {
|
function(users) {
|
||||||
$.each(users, function () {
|
$.each(users, function () {
|
||||||
var user = this;
|
var user = this;
|
||||||
|
console.log(user);
|
||||||
var existent = $('#userlist li').filterByData("name",user.UserName);
|
var existent = $('#userlist li').filterByData("name",user.UserName);
|
||||||
if (existent.length>0) existent.remove();
|
if (existent.length>0) existent.remove();
|
||||||
var li = $('<li class="user"><img src="/Avatars/'+user.UserName+'.xs.png">'+htmlEncode(user.UserName)+'</li>');
|
var li = $('<li class="user"><img src="/Avatars/'+user.UserName+'.xs.png"> '+htmlEncode(user.UserName)+'</li>');
|
||||||
|
|
||||||
var cxids = [];
|
var cxids = [];
|
||||||
$.each(user.Connections,function() {
|
$.each(user.Connections,function() {
|
||||||
|
|
@ -136,7 +140,7 @@
|
||||||
ids.push(cxid);
|
ids.push(cxid);
|
||||||
connected.data("cxids",ids);
|
connected.data("cxids",ids);
|
||||||
} else {
|
} else {
|
||||||
var li = $('<li class="user"><img src="/Avatars/'+username+'.xs.png">'+username+'</li>');
|
var li = $('<li class="user"><img src="/Avatars/'+username+'.xs.png"> '+username+'</li>');
|
||||||
li.data("name",username);
|
li.data("name",username);
|
||||||
li.data("cxids",[cxid]);
|
li.data("cxids",[cxid]);
|
||||||
li.appendTo('#userlist');
|
li.appendTo('#userlist');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue