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
3149b10e
Commit
3149b10e
authored
Mar 31, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
インデント修正
parent
1984f4df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
82 deletions
+82
-82
public_new/js/chat-db.js
+3
-3
public_new/js/chat-ui.js
+79
-79
No files found.
public_new/js/chat-db.js
View file @
3149b10e
...
@@ -134,7 +134,7 @@ CHAT_DB.callGetArchiveList = function() {
...
@@ -134,7 +134,7 @@ CHAT_DB.callGetArchiveList = function() {
};
};
CHAT_DB
.
getIosArchiveList
=
function
(
archiveList
)
{
CHAT_DB
.
getIosArchiveList
=
function
(
archiveList
)
{
iosArchiveList
=
archiveList
;
iosArchiveList
=
archiveList
;
CHAT_UI
.
refreshArchiveScreen
();
CHAT_UI
.
refreshArchiveScreen
();
};
};
...
@@ -169,7 +169,7 @@ CHAT_DB.callGetArchiveByName = function(keyword) {
...
@@ -169,7 +169,7 @@ CHAT_DB.callGetArchiveByName = function(keyword) {
};
};
CHAT_DB
.
getIosSearchArchiveList
=
function
(
archiveList
)
{
CHAT_DB
.
getIosSearchArchiveList
=
function
(
archiveList
)
{
iosSearchArchiveList
=
archiveList
;
iosSearchArchiveList
=
archiveList
;
ARCHIVE_UI
.
refreshSearchScreen
(
searchWord
);
ARCHIVE_UI
.
refreshSearchScreen
(
searchWord
);
};
};
...
@@ -184,7 +184,7 @@ CHAT_DB.getArchiveByName = function(archiveName) {
...
@@ -184,7 +184,7 @@ CHAT_DB.getArchiveByName = function(archiveName) {
// アーカイブ詳細
// アーカイブ詳細
var
iosArchiveDetail
;
var
iosArchiveDetail
;
CHAT_DB
.
getIosArchiveDetail
=
function
(
archiveDetail
)
{
CHAT_DB
.
getIosArchiveDetail
=
function
(
archiveDetail
)
{
iosArchiveDetail
=
archiveDetail
;
iosArchiveDetail
=
archiveDetail
;
CHAT_DB
.
callGetArchiveDetail
(
archiveDetail
.
archiveId
);
CHAT_DB
.
callGetArchiveDetail
(
archiveDetail
.
archiveId
);
};
};
...
...
public_new/js/chat-ui.js
View file @
3149b10e
...
@@ -1380,77 +1380,77 @@ CHAT_UI.toggleCategory = function(category) {
...
@@ -1380,77 +1380,77 @@ CHAT_UI.toggleCategory = function(category) {
// アーカイブ一覧
// アーカイブ一覧
CHAT_UI
.
refreshArchiveScreen
=
function
()
{
CHAT_UI
.
refreshArchiveScreen
=
function
()
{
// loadingIndicatorを表示
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
// 初期化
// 初期化
$
(
'#archiveList'
).
html
(
''
);
$
(
'#archiveList'
).
html
(
''
);
// アーカイブの様式を読み込む
// アーカイブの様式を読み込む
const
archiveTemplate
=
$
(
'#archive-template'
).
html
();
const
archiveTemplate
=
$
(
'#archive-template'
).
html
();
// アーカイブ一覧取得
// アーカイブ一覧取得
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
CHAT_DB
.
updateArchiveList
();
CHAT_DB
.
updateArchiveList
();
}
}
// ローカルDBのデータを表示
// ローカルDBのデータを表示
var
archiveList
=
CHAT_DB
.
getArchiveList
();
var
archiveList
=
CHAT_DB
.
getArchiveList
();
archiveList
.
forEach
(
function
(
archive
)
{
archiveList
.
forEach
(
function
(
archive
)
{
var
typeImage
=
""
;
var
typeImage
=
""
;
switch
(
archive
.
archiveType
)
{
switch
(
archive
.
archiveType
)
{
case
0
:
// 画像
case
0
:
// 画像
typeImage
=
"icon/icon_collabo_picture.png"
;
typeImage
=
"icon/icon_collabo_picture.png"
;
break
;
break
;
case
1
:
// 動画
case
1
:
// 動画
typeImage
=
"icon/icon_collabo_videocam.png"
;
typeImage
=
"icon/icon_collabo_videocam.png"
;
break
;
break
;
case
2
:
// 音声
case
2
:
// 音声
typeImage
=
"icon/icon_collabo_headset.png"
;
typeImage
=
"icon/icon_collabo_headset.png"
;
break
;
break
;
case
3
:
// 文書
case
3
:
// 文書
typeImage
=
"icon/icon_collabo_document.png"
;
typeImage
=
"icon/icon_collabo_document.png"
;
break
;
break
;
default
:
// その他
default
:
// その他
typeImage
=
""
;
typeImage
=
""
;
}
}
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
archiveId
:
archive
.
archiveId
,
archiveId
:
archive
.
archiveId
,
fileName
:
archive
.
archiveName
,
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
insertDate
:
archive
.
archiveDate
,
typeImage
:
typeImage
typeImage
:
typeImage
});
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
});
});
$
(
'#archiveList'
).
append
(
obj
);
$
(
'#archiveList'
).
append
(
obj
);
});
});
// loadingIndicatorを非表示
// loadingIndicatorを非表示
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
};
};
// アーカイブ詳細
// アーカイブ詳細
CHAT_UI
.
refreshArchiveDetailScreen
=
function
(
archiveId
)
{
CHAT_UI
.
refreshArchiveDetailScreen
=
function
(
archiveId
)
{
// loadingIndicatorを表示
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
// 初期化
// 初期化
$
(
'#archiveDetail'
).
html
(
''
);
$
(
'#archiveDetail'
).
html
(
''
);
// アーカイブ詳細の様式を読み込む
// アーカイブ詳細の様式を読み込む
const
archiveDetailTemplate
=
$
(
'#archive-detail-template'
).
html
();
const
archiveDetailTemplate
=
$
(
'#archive-detail-template'
).
html
();
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
CHAT_DB
.
updateArchiveDetail
(
archiveId
);
CHAT_DB
.
updateArchiveDetail
(
archiveId
);
}
}
// アーカイブ詳細取得
// アーカイブ詳細取得
var
archive
=
CHAT_DB
.
getArchiveDetail
(
archiveId
);
var
archive
=
CHAT_DB
.
getArchiveDetail
(
archiveId
);
//
// チャットルーム情報を取得
// チャットルーム情報を取得
var
roomId
=
archive
.
roomId
;
var
roomId
=
archive
.
roomId
;
var
roomInfo
=
CHAT_DB
.
getChatRoomInfo
(
roomId
);
var
roomInfo
=
CHAT_DB
.
getChatRoomInfo
(
roomId
);
// アーカイブ情報を表示
// アーカイブ情報を表示
// let html = Mustache.render(archiveDetailTemplate, {
// let html = Mustache.render(archiveDetailTemplate, {
...
@@ -1462,51 +1462,51 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
...
@@ -1462,51 +1462,51 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
// });
// });
// アーカイブ情報を表示
// アーカイブ情報を表示
var
html
=
Mustache
.
render
(
archiveDetailTemplate
,
{
var
html
=
Mustache
.
render
(
archiveDetailTemplate
,
{
fileName
:
"ファイル名"
,
fileName
:
"ファイル名"
,
insertDate
:
"2021/04/01 18:00"
,
insertDate
:
"2021/04/01 18:00"
,
chatRoomName
:
"チャットルーム名"
,
chatRoomName
:
"チャットルーム名"
,
profileImage
:
"https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg"
,
profileImage
:
"https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg"
,
userName
:
"ユーザ名"
userName
:
"ユーザ名"
});
});
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
});
});
$
(
'#archiveDetail'
).
append
(
obj
);
$
(
'#archiveDetail'
).
append
(
obj
);
// プレイヤーの切り替え
// プレイヤーの切り替え
switch
(
archive
.
archiveType
)
{
switch
(
archive
.
archiveType
)
{
case
"0"
:
// 画像
case
"0"
:
// 画像
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src="https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg" />'
);
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src="https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg" />'
);
break
;
break
;
case
"1"
:
// 動画
case
"1"
:
// 動画
$
(
'#archive_player'
).
prepend
(
'<video class="archive_player" src='
+
"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
+
' controls autoplay muted playsinline></video>'
);
$
(
'#archive_player'
).
prepend
(
'<video class="archive_player" src='
+
"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
+
' controls autoplay muted playsinline></video>'
);
break
;
break
;
case
"2"
:
// 音声
case
"2"
:
// 音声
$
(
'#archive_player'
).
prepend
(
'<audio class="archive_audio_player" src='
+
archive
.
archiveUrl
+
' controls></audio>'
);
$
(
'#archive_player'
).
prepend
(
'<audio class="archive_audio_player" src='
+
archive
.
archiveUrl
+
' controls></audio>'
);
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src='
+
"https://via.placeholder.com/1280x720"
+
' />'
);
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src='
+
"https://via.placeholder.com/1280x720"
+
' />'
);
break
;
break
;
case
"3"
:
// 文書
case
"3"
:
// 文書
// リリースに文書とその他は含めないため今回は非表示
// リリースに文書とその他は含めないため今回は非表示
break
;
break
;
default
:
default
:
// リリースに文書とその他は含めないため今回は非表示
// リリースに文書とその他は含めないため今回は非表示
}
}
// ユーザの様式を読み込む
// ユーザの様式を読み込む
const
archiveUserTemplate
=
$
(
'#archive-user-template'
).
html
();
const
archiveUserTemplate
=
$
(
'#archive-user-template'
).
html
();
// 参加ユーザ情報を表示
// 参加ユーザ情報を表示
let
attendUserList
=
archive
.
attendUserIds
;
let
attendUserList
=
archive
.
attendUserIds
;
attendUserList
.
forEach
(
function
(
user
)
{
attendUserList
.
forEach
(
function
(
user
)
{
// TODO ユーザIDからユーザ情報を取得
// TODO ユーザIDからユーザ情報を取得
var
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
var
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
profileImage
:
"https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg"
,
profileImage
:
"https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg"
,
userName
:
"ユーザ名"
userName
:
"ユーザ名"
});
});
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
// ネームカード表示
// ネームカード表示
const
namecardTemplate
=
$
(
'#archive-namecard-template'
).
html
();
const
namecardTemplate
=
$
(
'#archive-namecard-template'
).
html
();
let
namecardHtml
=
Mustache
.
render
(
namecardTemplate
,
{
let
namecardHtml
=
Mustache
.
render
(
namecardTemplate
,
{
...
@@ -1525,15 +1525,15 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
...
@@ -1525,15 +1525,15 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
$
(
'#userProfileModal'
).
html
(
namecardObj
);
$
(
'#userProfileModal'
).
html
(
namecardObj
);
$
(
'#userNameCard'
).
modal
(
'show'
);
$
(
'#userNameCard'
).
modal
(
'show'
);
});
});
$
(
'#attendUser'
).
append
(
obj
);
$
(
'#attendUser'
).
append
(
obj
);
})
})
CHAT_UI
.
htmlElementTextInitialize
(
navigator
.
language
);
CHAT_UI
.
htmlElementTextInitialize
(
navigator
.
language
);
// チャットルームへのリンク付け
// チャットルームへのリンク付け
document
.
getElementById
(
'joinChatRoom'
).
onclick
=
function
()
{
document
.
getElementById
(
'joinChatRoom'
).
onclick
=
function
()
{
// socket.emit('joinRoom', roomId, roomInfo.chatRoomName, function () {
// socket.emit('joinRoom', roomId, roomInfo.chatRoomName, function () {
// $('#archive_detail').html('');
// $('#archive_detail').html('');
// $('#messages').html('');
// $('#messages').html('');
...
...
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