mirror of
https://github.com/webxoss/webxoss-client.git
synced 2024-11-20 05:49:55 +01:00
limit rename room when use same name
This commit is contained in:
parent
36727dd62e
commit
05f50588fe
2 changed files with 13 additions and 17 deletions
|
@ -859,27 +859,23 @@ $('link-edit-deck').onclick = function (event) {
|
|||
return false;
|
||||
};
|
||||
|
||||
$('room-name').onblur = function () {
|
||||
var roomName = $('room-name').value;
|
||||
if (roomName) {
|
||||
/* 重命名房间名 */
|
||||
var oldRoomName = '';
|
||||
function handleRenameRoom (event) {
|
||||
var name = $('room-name').value;
|
||||
if (name && name !== oldRoomName ) {
|
||||
socket.emit('renameRoom', {
|
||||
'roomName': roomName
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$('room-name-form').onsubmit = function (event) {
|
||||
var roomName = $('room-name').value;
|
||||
if (roomName) {
|
||||
socket.emit('renameRoom', {
|
||||
'roomName': roomName
|
||||
'roomName': name
|
||||
});
|
||||
oldRoomName = name;
|
||||
}
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
$('room-name').onblur = handleRenameRoom
|
||||
$('room-name-form').onsubmit = handleRenameRoom
|
||||
|
||||
/* 直播 */
|
||||
var stopFetchingLive = 0;
|
||||
var watchingLive = false;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue