Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
62c2f5a6
Commit
62c2f5a6
authored
Mar 31, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ルーム名更新
parent
ba10fd30
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
11 deletions
+61
-11
public_new/chat_change_room_name.html
+46
-9
public_new/js/chat-room.js
+10
-0
public_new/js/chat-ui.js
+2
-0
public_new/js/chat-websocket.js
+1
-0
public_new/template/template_room_list.html
+1
-1
public_new/template/template_user_message.html
+1
-1
No files found.
public_new/chat_change_room_name.html
View file @
62c2f5a6
...
...
@@ -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>
public_new/js/chat-room.js
View file @
62c2f5a6
...
...
@@ -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');
...
...
public_new/js/chat-ui.js
View file @
62c2f5a6
...
...
@@ -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
}
...
...
public_new/js/chat-websocket.js
View file @
62c2f5a6
...
...
@@ -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
}
...
...
public_new/template/template_room_list.html
View file @
62c2f5a6
...
...
@@ -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>
...
...
public_new/template/template_user_message.html
View file @
62c2f5a6
<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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment