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
ba766869
Commit
ba766869
authored
Mar 15, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ネームカード修正
parent
d6e63539
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
27 deletions
+59
-27
public/index.html
+7
-2
public/js/chat-db.js
+10
-0
public/js/chat-ui.js
+42
-25
No files found.
public/index.html
View file @
ba766869
...
@@ -434,13 +434,18 @@
...
@@ -434,13 +434,18 @@
<
div
class
=
"text-center"
>
<
div
class
=
"text-center"
>
<
button
type
=
"button"
class
=
"btn btn-primary"
id
=
"nameCardChatBtn"
onclick
=
"CHAT_UI.startChat('{{loginId}}','{{name}}');"
>
{{
chat
}}
<
/button
>
<
button
type
=
"button"
class
=
"btn btn-primary"
id
=
"nameCardChatBtn"
onclick
=
"CHAT_UI.startChat('{{loginId}}','{{name}}');"
>
{{
chat
}}
<
/button
>
<
button
type
=
"button"
class
=
"btn btn-primary"
id
=
"nameCardVoiceBtn"
onclick
=
"CHAT_UI.startVoice();"
>
{{
voice
}}
<
/button
>
<
button
type
=
"button"
class
=
"btn btn-primary"
id
=
"nameCardVoiceBtn"
onclick
=
"CHAT_UI.startVoice();"
>
{{
voice
}}
<
/button
>
<
button
type
=
"button"
class
=
"btn btn-primary"
id
=
"nameCardFavoriteBtn"
onclick
=
"CHAT_UI.changeFavorite();"
>
{{
favorite
}}
<
/button
>
{{
#
isFavorite
}}
<
button
type
=
"button"
class
=
"btn btn-primary"
onclick
=
"CHAT_UI.changeFavorite();"
>
{{
favorite
}}
<
/button
>
{{
/
isFavorite
}}
{{
^
isFavotire
}}
<
button
type
=
"button"
class
=
"btn btn-primary"
onclick
=
"CHAT_UI.changeFavorite();"
>
{{
favorite
}}
<
/button
>
{{
/
isFavorite
}}
<
/div
>
<
/div
>
</script>
</script>
<script
id=
"message-template"
type=
"text/template"
>
<script
id=
"message-template"
type=
"text/template"
>
<
div
class
=
"incoming_msg"
>
<
div
class
=
"incoming_msg"
>
<
div
class
=
"incoming_msg_img"
>
<
div
class
=
"incoming_msg_img"
>
<
img
src
=
{{{
profileImage
}}}
alt
=
""
>
<
img
src
=
{{{
profileImage
}}}
alt
=
""
onclick
=
"CHAT_UI.makeNameCard({{shopMemberId}});"
>
<
/div
>
<
/div
>
<
div
class
=
"received_msg"
>
<
div
class
=
"received_msg"
>
<
div
class
=
"received_withd_msg"
>
<
div
class
=
"received_withd_msg"
>
...
...
public/js/chat-db.js
View file @
ba766869
...
@@ -69,3 +69,12 @@ CHAT_DB.getGroupInfo = function(groupId) {
...
@@ -69,3 +69,12 @@ CHAT_DB.getGroupInfo = function(groupId) {
return
JSON
.
parse
(
android
.
getGroupInfo
(
groupId
));
return
JSON
.
parse
(
android
.
getGroupInfo
(
groupId
));
}
}
};
};
CHAT_DB
.
getNameCardData
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getNameCardData
(
shopMemberId
));
}
};
\ No newline at end of file
public/js/chat-ui.js
View file @
ba766869
...
@@ -975,25 +975,7 @@ CHAT_UI.refreshContactScreen = function() {
...
@@ -975,25 +975,7 @@ CHAT_UI.refreshContactScreen = function() {
});
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
// if (IS_ONLINE == 'true') {
CHAT_UI
.
makeNameCard
(
groupUser
.
shopMemberId
);
// android.updateUserInfo(groupUser.shopMemberId);
// }
console
.
log
(
'click'
);
let
namecardHtml
=
Mustache
.
render
(
userNamecardTemplate
,
{
loginId
:
groupUser
.
shopMemberId
,
profileImage
:
groupUser
.
profileImagePath
,
name
:
groupUser
.
shopMemberName
,
groupPathList
:
groupUser
.
groupPathList
,
chat
:
getLocalizedString
(
"chat"
),
voice
:
getLocalizedString
(
"voice"
),
favorite
:
getLocalizedString
(
"addFavorite"
)
});
console
.
log
(
namecardHtml
);
let
namecardObj
=
$
(
jQuery
.
parseHTML
(
namecardHtml
)).
on
(
'click'
,
function
(){
});
$
(
'#userNamecard'
).
html
(
namecardObj
);
CHAT_UI
.
showNamecard
(
'userNamecard'
);
});
});
$
(
'#my_group_list'
).
append
(
obj
);
$
(
'#my_group_list'
).
append
(
obj
);
...
@@ -1165,6 +1147,7 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) {
...
@@ -1165,6 +1147,7 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) {
let
html
=
Mustache
.
render
(
template
,
{
let
html
=
Mustache
.
render
(
template
,
{
text
:
message
.
message
,
text
:
message
.
message
,
from
:
message
.
loginId
,
from
:
message
.
loginId
,
shopMemberId
:
message
.
shopMemberId
,
profileImage
:
message
.
profileImagePath
,
profileImage
:
message
.
profileImagePath
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
createdAtTime
:
messageTime
.
createdAtTime
...
@@ -1237,7 +1220,7 @@ $('#allGroupBtn').on('click', function (e){
...
@@ -1237,7 +1220,7 @@ $('#allGroupBtn').on('click', function (e){
});
});
CHAT_UI
.
refesshAllGroupSearch
=
function
(
groupId
)
{
CHAT_UI
.
refesshAllGroupSearch
=
function
(
groupId
)
{
const
userNamecardTemplate
=
$
(
'#namecard-template'
).
html
();
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateGroupInfo
(
groupId
);
android
.
updateGroupInfo
(
groupId
);
}
}
...
@@ -1304,11 +1287,7 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
...
@@ -1304,11 +1287,7 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
});
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
//TODO need onClick Action
CHAT_UI
.
makeNameCard
(
groupUser
.
shopMemberId
);
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateUserInfo
(
groupUser
.
shopMemberId
);
}
});
});
$
(
'#userInGroupList'
).
append
(
obj
);
$
(
'#userInGroupList'
).
append
(
obj
);
...
@@ -1339,3 +1318,40 @@ CHAT_UI.changeFavorite = function () {
...
@@ -1339,3 +1318,40 @@ CHAT_UI.changeFavorite = function () {
console
.
log
(
"FavoriteClick"
);
console
.
log
(
"FavoriteClick"
);
};
};
CHAT_UI
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
//add Android Chat click
console
.
log
(
"removeFU"
);
};
CHAT_UI
.
insertFavoriteUser
=
function
(
shopMemberId
)
{
//add Android Chat click
console
.
log
(
"insertFU"
);
};
CHAT_UI
.
changeFavorite
=
function
()
{
//add Android Chat click
console
.
log
(
"FavoriteClick"
);
};
CHAT_UI
.
makeNameCard
=
function
(
shopMemberId
)
{
console
.
log
(
'makeNameCard Click'
);
var
nameCardInfo
=
CHAT_DB
.
getNameCardData
(
shopMemberId
);
console
.
log
(
nameCardInfo
);
const
userNamecardTemplate
=
$
(
'#namecard-template'
).
html
();
let
namecardHtml
=
Mustache
.
render
(
userNamecardTemplate
,
{
loginId
:
nameCardInfo
.
shopMemberId
,
profileImage
:
nameCardInfo
.
profileImagePath
,
name
:
nameCardInfo
.
shopMemberName
,
groupPathList
:
nameCardInfo
.
groupPathList
,
chat
:
getLocalizedString
(
"chat"
),
voice
:
getLocalizedString
(
"voice"
),
favorite
:
getLocalizedString
(
"addFavorite"
)
});
let
namecardObj
=
$
(
jQuery
.
parseHTML
(
namecardHtml
)).
on
(
'click'
,
function
(){
});
$
(
'#userNamecard'
).
html
(
namecardObj
);
CHAT_UI
.
showNamecard
(
'userNamecard'
);
};
\ No newline at end of file
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