diff --git a/contact_list.js b/contact_list.js index 3ad8d79af..fe69e10d0 100644 --- a/contact_list.js +++ b/contact_list.js @@ -38,6 +38,18 @@ var ContactList = (function (my) { var newContact = document.createElement('li'); newContact.id = resourceJid; + newContact.className = "clickable"; + newContact.onclick = function(event) { + if(event.currentTarget.className === "clickable") { + var jid = event.currentTarget.id; + var videoContainer = $("#participant_" + jid); + if (videoContainer.length > 0) { + videoContainer.click(); + } else if (jid == Strophe.getResourceFromJid(connection.emuc.myroomjid)) { + $("#localVideoContainer").click(); + } + } + }; newContact.appendChild(createAvatar()); newContact.appendChild(createDisplayNameParagraph("Participant")); @@ -194,5 +206,14 @@ var ContactList = (function (my) { contactName.html(displayName); }); + my.setClickable = function(resourceJid, isClickable) { + var contact = $('#contactlist>ul>li[id="' + resourceJid + '"]'); + if(isClickable) { + contact.addClass('clickable'); + } else { + contact.removeClass('clickable'); + } + }; + return my; }(ContactList || {})); diff --git a/css/contact_list.css b/css/contact_list.css index 289d266a6..335f26e8a 100644 --- a/css/contact_list.css +++ b/css/contact_list.css @@ -1,5 +1,6 @@ #contactlist { background-color: black; + cursor: default; } #contactlist>ul { @@ -12,7 +13,8 @@ text-align: left; color: #FFF; font-size: 10pt; - padding: 8px 10px; + padding: 7px 10px; + margin: 2px; } #contactlist>ul>li>p { @@ -32,4 +34,8 @@ margin-right: 10px; vertical-align: middle; font-size: 22pt; +} + +#contactlist .clickable { + cursor: pointer; } \ No newline at end of file diff --git a/css/main.css b/css/main.css index c7995eac9..425c0e436 100644 --- a/css/main.css +++ b/css/main.css @@ -1,3 +1,8 @@ +* { + -webkit-user-select: none; + user-select: none; +} + html, body{ margin:0px; height:100%; @@ -30,6 +35,10 @@ html, body{ border-left:1px solid #424242; } +#chatspace * { + -webkit-user-select: text; + user-select: text; +} #chatconversation { visibility: hidden; position: relative; diff --git a/index.html b/index.html index 621548b28..326a3b92f 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -60,13 +60,13 @@ - + - +