Commit 62c2f5a6 by Lee Munkyeong

ルーム名更新

parent ba10fd30
......@@ -38,25 +38,62 @@
<!-- コンテンツ -->
<main id="chat_change_room_name">
<form action="chat_room.html" method="post">
<!-- ルーム名入力 -->
<div class="room_name">
<label for="room_name"><h2>ルーム名</h2></label>
<input type="text" class="input_name_room" name="room_name" placeholder="ルーム名を入力してください">
<input type="text" class="input_name_room" name="room_name" placeholder="ルーム名を入力してください" id="roomNameInput" maxlength="20">
</div>
<!-- ルーム名変更ボタン -->
<div class="change_room_name_btn">
<button type="button" name="button">保存</button>
<button type="button" name="button" id="roomNameChangeBtn">保存</button>
</div>
</form>
</main>
<div id="loadingArea"></div>
<script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.js"></script>
<script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.js" charset="UTF-8"></script>
<script src="./js/libs/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/common.js"></script>
<script src="./js/language.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script>
<script src="./js/language_en.js" charset="UTF-8"></script>
<script src="./js/constant.js"></script>
<script src="./js/chat.js"></script>
<script src="./js/chat-ui.js"></script>
<script src="./js/chat-util.js"></script>
<script src="./js/chat-db.js"></script>
<script src="./js/chat-websocket.js"></script>
<script src="./js/chat-room.js"></script>
<script>
String.prototype.replaceAll = function(org, dest) {
return this.split(org).join(dest);
}
<script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.js"></script>
<script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/chat.js"></script>
let CHAT_SERVER_URL = '';
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let roomId = 0;
$("#loadingArea").load("./loading.html");
android.getLoginParameter();
android.getGlobalParameter();
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
};
</script>
</body>
</html>
......@@ -11,6 +11,16 @@ window.onscroll = function() {
}
}
$('#roomNameChangeBtn').click(function() {
//TODO validation
var changeRoomName = $('#roomNameInput').val();
if (CHAT_UTIL.isIOS()) {
//TODO
} else if (CHAT_UTIL.isAndroid()) {
android.changeRoomName(changeRoomName);
}
})
/*
$('#messages').scroll(function() {
console.log('messagescroll');
......
......@@ -197,6 +197,8 @@ CHAT_UI.sendMessage = function(e) {
messageTextBox.val('');
if (message.length > 0) {
console.log('createMessage');
console.log(socket);
socket.emit(
//'createMessage', { text: '['+encodedText+'<&split>'+messageType.TEXT+']'; }
'createMessage', { text: message }
......
......@@ -163,6 +163,7 @@ function setSocketAction () {
// New Message
// #36170
socket.on('newMessage', function(message, roomId, roomName) {
console.log(message);
let messageTime = CHAT_UTIL.formatDate(message.createdAt);
var userMessageTemplate;
$.get({ url: "./template/template_user_message.html", async: false }
......
......@@ -28,7 +28,7 @@
<div class="d-flex flex-column">
<span class="chat_item_time">{{time}}</span>
{{#unreadMsgCnt}}
<span class="chat_item_unread">{{unreadMsgCnt}}</span>
<span class="chat_item_unread room-{{roomId}}-unread">{{unreadMsgCnt}}</span>
{{/unreadMsgCnt}}
</div>
</div>
......
<div class="room_left">
<figure>
<a href="#" data-toggle="modal" data-target="#profileModal1"><img src="{{profileImage}}" onError="this.src='./img/noImage.png'"></a>
<a href="#" data-toggle="modal" data-target="#profileModal1"><img src="{{profileImage}}" onError="this.src='./img/noImage.png'" ></a>
</figure>
<div class="room_left-text">
<div class="name">{{from}}</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment