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
4c63bc20
Commit
4c63bc20
authored
Mar 31, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コード整理及びメッセージロード修正。
parent
cdf37962
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
17 deletions
+29
-17
public_new/js/chat-room.js
+27
-13
public_new/js/chat-ui.js
+1
-1
public_new/js/chat-websocket.js
+0
-2
public_new/js/chat.js
+1
-1
No files found.
public_new/js/chat-room.js
View file @
4c63bc20
var
lastscrollvalue
;
window
.
onscroll
=
function
()
{
var
a
=
$
(
'#messages'
);
if
(
lastscrollvalue
==
undefined
)
{
lastscrollvalue
=
a
.
scrollTop
;
// sets lastscrollvalue
}
else
if
(
a
.
scrollTop
>
lastscrollvalue
)
{
// downscroll rules will be here
lastscrollvalue
=
a
.
scrollTop
;
var
scrollPosition
=
window
.
scrollY
||
document
.
documentElement
.
scrollTop
;
if
(
scrollPosition
==
0
)
{
console
.
log
(
'Scroll on TOP!!'
);
//TODO add getMessages(newLine);
if
(
CHAT_UTIL
.
isIOS
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//android.getMessages()
}
}
}
}
else
if
(
a
.
scrollTop
<
lastscrollvalue
)
{
// upscroll rules will be here
lastscrollvalue
=
a
.
scrollTop
;
}
}
\ No newline at end of file
/*
$('#messages').scroll(function() {
console.log('messagescroll');
if ($(this).scrollTop() === 0) {
if (!$('#chatLoader').is(':visible')) {
// 現在、メッセージの個数以前をメッセージを読み込む
// ローディングアイコンを追加する
let loader = $('<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>')
$('#messages').prepend(loader)
loader.remove();
// socket.emit('getMessages', $(this).children().length, function() {
// // ローディングアイコンを削除する
// loader.remove();
// });
}
}
});*/
public_new/js/chat-ui.js
View file @
4c63bc20
...
...
@@ -1193,7 +1193,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
$
(
'#messages'
).
scroll
();
}
}
CHAT_UI
.
waitForLoadingImage
(
jQueryMessages
,
CHAT_UI
.
scrollToBottom
);
// ユーザ削除ボタン表示しない
$
(
"#userSelectionDeleteBtn"
).
hide
();
CHAT_UI
.
scrollToBottom
();
...
...
public_new/js/chat-websocket.js
View file @
4c63bc20
...
...
@@ -163,8 +163,6 @@ function setSocketAction () {
// New Message
// #36170
socket
.
on
(
'newMessage'
,
function
(
message
,
roomId
,
roomName
)
{
console
.
log
(
'newMessage'
);
let
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
createdAt
);
var
userMessageTemplate
;
$
.
get
({
url
:
"./template/template_user_message.html"
,
async
:
false
}
...
...
public_new/js/chat.js
View file @
4c63bc20
...
...
@@ -335,7 +335,7 @@ $(function() {
$
(
this
).
toggleClass
(
"filter"
);
});
$
(
'#chat .search_form input[type="search"]'
).
keyup
(
function
(){
$
(
'#chat .search_form input[type="search"]'
).
click
(
function
(){
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
});
...
...
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