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() {
};
CHAT_DB
.
getIosArchiveList
=
function
(
archiveList
)
{
iosArchiveList
=
archiveList
;
iosArchiveList
=
archiveList
;
CHAT_UI
.
refreshArchiveScreen
();
};
...
...
@@ -169,7 +169,7 @@ CHAT_DB.callGetArchiveByName = function(keyword) {
};
CHAT_DB
.
getIosSearchArchiveList
=
function
(
archiveList
)
{
iosSearchArchiveList
=
archiveList
;
iosSearchArchiveList
=
archiveList
;
ARCHIVE_UI
.
refreshSearchScreen
(
searchWord
);
};
...
...
@@ -184,7 +184,7 @@ CHAT_DB.getArchiveByName = function(archiveName) {
// アーカイブ詳細
var
iosArchiveDetail
;
CHAT_DB
.
getIosArchiveDetail
=
function
(
archiveDetail
)
{
iosArchiveDetail
=
archiveDetail
;
iosArchiveDetail
=
archiveDetail
;
CHAT_DB
.
callGetArchiveDetail
(
archiveDetail
.
archiveId
);
};
...
...
public_new/js/chat-ui.js
View file @
3149b10e
...
...
@@ -1380,77 +1380,77 @@ CHAT_UI.toggleCategory = function(category) {
// アーカイブ一覧
CHAT_UI
.
refreshArchiveScreen
=
function
()
{
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
// 初期化
$
(
'#archiveList'
).
html
(
''
);
// 初期化
$
(
'#archiveList'
).
html
(
''
);
// アーカイブの様式を読み込む
const
archiveTemplate
=
$
(
'#archive-template'
).
html
();
// アーカイブの様式を読み込む
const
archiveTemplate
=
$
(
'#archive-template'
).
html
();
// アーカイブ一覧取得
if
(
IS_ONLINE
==
'true'
)
{
CHAT_DB
.
updateArchiveList
();
}
CHAT_DB
.
updateArchiveList
();
}
// ローカルDBのデータを表示
var
archiveList
=
CHAT_DB
.
getArchiveList
();
archiveList
.
forEach
(
function
(
archive
)
{
var
typeImage
=
""
;
switch
(
archive
.
archiveType
)
{
case
0
:
// 画像
switch
(
archive
.
archiveType
)
{
case
0
:
// 画像
typeImage
=
"icon/icon_collabo_picture.png"
;
break
;
case
1
:
// 動画
break
;
case
1
:
// 動画
typeImage
=
"icon/icon_collabo_videocam.png"
;
break
;
case
2
:
// 音声
break
;
case
2
:
// 音声
typeImage
=
"icon/icon_collabo_headset.png"
;
break
;
case
3
:
// 文書
break
;
case
3
:
// 文書
typeImage
=
"icon/icon_collabo_document.png"
;
break
;
default
:
// その他
break
;
default
:
// その他
typeImage
=
""
;
}
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
}
let
html
=
Mustache
.
render
(
archiveTemplate
,
{
archiveId
:
archive
.
archiveId
,
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
typeImage
:
typeImage
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
});
$
(
'#archiveList'
).
append
(
obj
);
});
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
});
$
(
'#archiveList'
).
append
(
obj
);
});
// loadingIndicatorを非表示
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
};
// アーカイブ詳細
CHAT_UI
.
refreshArchiveDetailScreen
=
function
(
archiveId
)
{
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
// 初期化
$
(
'#archiveDetail'
).
html
(
''
);
// 初期化
$
(
'#archiveDetail'
).
html
(
''
);
// アーカイブ詳細の様式を読み込む
const
archiveDetailTemplate
=
$
(
'#archive-detail-template'
).
html
();
// アーカイブ詳細の様式を読み込む
const
archiveDetailTemplate
=
$
(
'#archive-detail-template'
).
html
();
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
roomInfo
=
CHAT_DB
.
getChatRoomInfo
(
roomId
);
// チャットルーム情報を取得
var
roomId
=
archive
.
roomId
;
var
roomInfo
=
CHAT_DB
.
getChatRoomInfo
(
roomId
);
// アーカイブ情報を表示
// let html = Mustache.render(archiveDetailTemplate, {
...
...
@@ -1462,51 +1462,51 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
// });
// アーカイブ情報を表示
var
html
=
Mustache
.
render
(
archiveDetailTemplate
,
{
fileName
:
"ファイル名"
,
insertDate
:
"2021/04/01 18:00"
,
chatRoomName
:
"チャットルーム名"
,
var
html
=
Mustache
.
render
(
archiveDetailTemplate
,
{
fileName
:
"ファイル名"
,
insertDate
:
"2021/04/01 18:00"
,
chatRoomName
:
"チャットルーム名"
,
profileImage
:
"https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg"
,
userName
:
"ユーザ名"
});
});
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
});
$
(
'#archiveDetail'
).
append
(
obj
);
// プレイヤーの切り替え
switch
(
archive
.
archiveType
)
{
case
"0"
:
// 画像
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src="https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg" />'
);
break
;
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>'
);
break
;
case
"2"
:
// 音声
$
(
'#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"
+
' />'
);
break
;
case
"3"
:
// 文書
// リリースに文書とその他は含めないため今回は非表示
break
;
default
:
// リリースに文書とその他は含めないため今回は非表示
}
// ユーザの様式を読み込む
const
archiveUserTemplate
=
$
(
'#archive-user-template'
).
html
();
switch
(
archive
.
archiveType
)
{
case
"0"
:
// 画像
$
(
'#archive_player'
).
prepend
(
'<img class="archive_player" src="https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg" />'
);
break
;
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>'
);
break
;
case
"2"
:
// 音声
$
(
'#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"
+
' />'
);
break
;
case
"3"
:
// 文書
// リリースに文書とその他は含めないため今回は非表示
break
;
default
:
// リリースに文書とその他は含めないため今回は非表示
}
// ユーザの様式を読み込む
const
archiveUserTemplate
=
$
(
'#archive-user-template'
).
html
();
// 参加ユーザ情報を表示
let
attendUserList
=
archive
.
attendUserIds
;
attendUserList
.
forEach
(
function
(
user
)
{
// TODO ユーザIDからユーザ情報を取得
var
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
profileImage
:
"https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg"
,
userName
:
"ユーザ名"
});
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
// ネームカード表示
let
attendUserList
=
archive
.
attendUserIds
;
attendUserList
.
forEach
(
function
(
user
)
{
// TODO ユーザIDからユーザ情報を取得
var
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
profileImage
:
"https://img01.suumo.com/front/gazo/chumon/220/67/main/10646700010021p01.jpg"
,
userName
:
"ユーザ名"
});
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
// ネームカード表示
const
namecardTemplate
=
$
(
'#archive-namecard-template'
).
html
();
let
namecardHtml
=
Mustache
.
render
(
namecardTemplate
,
{
...
...
@@ -1525,15 +1525,15 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
$
(
'#userProfileModal'
).
html
(
namecardObj
);
$
(
'#userNameCard'
).
modal
(
'show'
);
});
});
$
(
'#attendUser'
).
append
(
obj
);
})
$
(
'#attendUser'
).
append
(
obj
);
})
CHAT_UI
.
htmlElementTextInitialize
(
navigator
.
language
);
// チャットルームへのリンク付け
document
.
getElementById
(
'joinChatRoom'
).
onclick
=
function
()
{
document
.
getElementById
(
'joinChatRoom'
).
onclick
=
function
()
{
// socket.emit('joinRoom', roomId, roomInfo.chatRoomName, function () {
// $('#archive_detail').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