rename room by edit

This commit is contained in:
deardrops 2017-05-03 19:01:29 +08:00
parent 6d358bdb59
commit d86b58d82a
8 changed files with 24 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
Localize.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -608,7 +608,7 @@ function updateRoom (msgObj) {
audio.playSoundEffect('JoinRoom');
}
$('room-name').textContent = msgObj.roomName;
$('room-name').value = msgObj.roomName;
$('room-host-nickname').textContent = msgObj.host;
$('room-guest-nickname').textContent = msgObj.guest;
setClass($('room-guest-nickname'),'ready',msgObj.guestReady);
@ -856,6 +856,15 @@ $('link-edit-deck').onclick = function (event) {
return false;
};
$('room-name').onblur = function (event) {
var roomName = event.target.value;
if (roomName) {
socket.emit('renameRoom', {
'roomName': roomName
});
}
};
/* 直播 */
var stopFetchingLive = 0;
var watchingLive = false;

View file

@ -415,6 +415,9 @@ ol,ul,li {
color: #f2442b;
font-size: 150%;
font-weight: bold;
text-align: center;
background: transparent;
border: none;
}
#room-host-nickname {
color: #77d25b;

View file

@ -119,7 +119,9 @@
<table id="table-room">
<tbody>
<tr>
<td colspan="100"><span id="room-name"></span></td>
<td colspan="100">
<input id="room-name" type="text"></input>
</td>
</tr>
<tr>
<td><span id="room-host-nickname" class="nickname"></span></td>

File diff suppressed because one or more lines are too long