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
17b5062e
Commit
17b5062e
authored
Mar 23, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コードレビュー対応(tab統一)
parent
23102b19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
50 deletions
+50
-50
public/js/chat-ui.js
+50
-50
No files found.
public/js/chat-ui.js
View file @
17b5062e
...
...
@@ -1267,48 +1267,48 @@ CHAT_UI.refreshArchiveScreen = function() {
// アーカイブ一覧取得&表示
var
archiveList
=
CHAT_DB
.
getArchiveList
();
archiveList
.
forEach
(
function
(
archive
)
{
var
typeImage
=
""
;
var
typeImage
=
""
;
switch
(
archive
.
archiveType
)
{
case
0
:
// 画像
typeImage
=
"./icon/icon_collabo_picture.png"
;
break
;
case
1
:
// 動画
typeImage
=
"./icon/icon_collabo_videocam.png"
;
break
;
case
2
:
// 音声
typeImage
=
"./icon/icon_collabo_headset.png"
;
break
;
case
3
:
// 文書
typeImage
=
"./icon/icon_collabo_document.png"
;
break
;
default
:
// その他
typeImage
=
""
;
typeImage
=
"./icon/icon_collabo_picture.png"
;
break
;
case
1
:
// 動画
typeImage
=
"./icon/icon_collabo_videocam.png"
;
break
;
case
2
:
// 音声
typeImage
=
"./icon/icon_collabo_headset.png"
;
break
;
case
3
:
// 文書
typeImage
=
"./icon/icon_collabo_document.png"
;
break
;
default
:
// その他
typeImage
=
""
;
}
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
typeImage
:
typeImage
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
typeImage
:
typeImage
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
// アーカイブ詳細画面へ遷移
$
(
'#homeButton'
).
hide
();
$
(
'.titleRoomName'
).
show
();
$
(
'#pills-archive'
).
hide
();
$
(
'#archive_detail'
).
show
();
$
(
'#bottomNav'
).
hide
();
$
(
"#backButton"
).
show
();
$
(
'#backButton'
).
off
().
on
(
'click'
,
function
()
{
// アーカイブ一覧に戻る
$
(
'#homeButton'
).
show
();
$
(
"#backButton"
).
hide
();
$
(
'.titleRoomName'
).
show
();
$
(
'#archive_detail'
).
hide
();
$
(
'#pills-archive'
).
show
();
$
(
'#bottomNav'
).
show
();
});
$
(
'#homeButton'
).
hide
();
$
(
'.titleRoomName'
).
show
();
$
(
'#pills-archive'
).
hide
();
$
(
'#archive_detail'
).
show
();
$
(
'#bottomNav'
).
hide
();
$
(
"#backButton"
).
show
();
$
(
'#backButton'
).
off
().
on
(
'click'
,
function
()
{
// アーカイブ一覧に戻る
$
(
'#homeButton'
).
show
();
$
(
"#backButton"
).
hide
();
$
(
'.titleRoomName'
).
show
();
$
(
'#archive_detail'
).
hide
();
$
(
'#pills-archive'
).
show
();
$
(
'#bottomNav'
).
show
();
});
// データの受け渡し
CHAT_UI
.
refreshArchiveDetailScreen
(
archive
.
archiveId
);
});
...
...
@@ -1345,14 +1345,14 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
var
roomId
=
archive
.
roomId
;
var
roomInfo
=
CHAT_DB
.
getChatRoomInfo
(
roomId
);
// アーカイブ情報を表示
let
html
=
Mustache
.
render
(
archiveDetailTemplate
,
{
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
chatRoomName
:
roomInfo
.
chatRoomName
,
profileImage
:
""
,
userName
:
archive
.
userName
});
// アーカイブ情報を表示
let
html
=
Mustache
.
render
(
archiveDetailTemplate
,
{
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
chatRoomName
:
roomInfo
.
chatRoomName
,
profileImage
:
""
,
userName
:
archive
.
userName
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
));
$
(
'#archive_detail'
).
append
(
obj
);
...
...
@@ -1366,7 +1366,7 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
break
;
case
2
:
// 音声
$
(
'#archive_player'
).
prepend
(
'<audio class="archive_audio_player" src='
+
archive
.
archiveUrl
+
' controls></audio>'
);
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src='
+
"./images/capture.png"
+
'
</img
>'
);
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src='
+
"./images/capture.png"
+
'>'
);
break
;
case
3
:
// 文書
// リリースに文書とその他は含めないため今回は非表示
...
...
@@ -1396,14 +1396,14 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
CHAT_UI
.
htmlElementTextInitialize
(
navigator
.
language
);
// チャットルームへのリンク付け
document
.
getElementById
(
'joinChatRoom'
).
onclick
=
function
()
{
socket
.
emit
(
'joinRoom'
,
roomId
,
roomInfo
.
chatRoomName
,
function
()
{
$
(
'#archive_detail'
).
html
(
''
);
$
(
'#messages'
).
html
(
''
);
$
(
'.titleRoomName'
).
text
(
roomInfo
.
chatRoomName
).
data
(
'roomName'
,
roomInfo
.
chatRoomName
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
});
}
document
.
getElementById
(
'joinChatRoom'
).
onclick
=
function
()
{
socket
.
emit
(
'joinRoom'
,
roomId
,
roomInfo
.
chatRoomName
,
function
()
{
$
(
'#archive_detail'
).
html
(
''
);
$
(
'#messages'
).
html
(
''
);
$
(
'.titleRoomName'
).
text
(
roomInfo
.
chatRoomName
).
data
(
'roomName'
,
roomInfo
.
chatRoomName
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
});
}
// loadingIndicatorを非表示
CHAT_UI
.
dismissLoadingIndicator
();
...
...
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