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
d214c054
Commit
d214c054
authored
Feb 24, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Favorite
parent
50c56bc6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
5 deletions
+57
-5
public/js/chat-db.js
+10
-0
public/js/chat-ui.js
+47
-5
No files found.
public/js/chat-db.js
View file @
d214c054
...
...
@@ -48,3 +48,12 @@ CHAT_DB.getFavoriteGroups = function() {
return
JSON
.
parse
(
android
.
getFavoriteGroups
());
}
};
CHAT_DB
.
getMyGroupUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupUsers
());
}
};
\ No newline at end of file
public/js/chat-ui.js
View file @
d214c054
...
...
@@ -875,13 +875,11 @@ CHAT_UI.refreshContactScreen = function() {
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateGroupInfo
();
android
.
updateMyInfo
();
android
.
updateGroupUser
();
}
var
myInfo
=
CHAT_DB
.
getMyInfo
();
console
.
log
(
myInfo
);
myInfo
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
myInfo
.
profileUrl
)
let
html
=
Mustache
.
render
(
userTemplate
,
{
...
...
@@ -897,8 +895,52 @@ CHAT_UI.refreshContactScreen = function() {
$
(
'#my_info'
).
append
(
obj
);
//TODO get favorite list
//TODO get my group user list
var
groupUserList
=
CHAT_DB
.
getMyGroupUsers
();
groupUserList
.
forEach
(
function
(
groupUser
)
{
let
html
=
Mustache
.
render
(
userTemplate
,
{
id
:
groupUser
.
shopMemberId
,
profileImage
:
groupUser
.
profileImagePath
,
name
:
groupUser
.
shopMemberName
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
//TODO need onClick Action
console
.
log
(
'groupUserClick'
);
});
$
(
'#my_group_list'
).
append
(
obj
);
}
var
favoriteGroupList
=
CHAT_DB
.
getFavoriteGroups
();
favoriteGroupList
.
forEach
(
function
(
favoriteGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
favoriteGroup
.
groupName
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
//TODO need onClick Action
console
.
log
(
'groupClick'
);
});
$
(
'#favorite_list'
).
append
(
obj
);
}
var
favoriteUserList
=
CHAT_DB
.
getFavoriteUsers
();
favoriteUserList
.
forEach
(
function
(
favoriteUser
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
id
:
favoriteUser
.
shopMemberId
,
profileImage
:
favoriteUser
.
profileImagePath
,
name
:
favoriteUser
.
shopMemberName
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
//TODO need onClick Action
console
.
log
(
'userClick'
);
});
$
(
'#favorite_list'
).
append
(
obj
);
}
console
.
log
(
'LOAD DONE CONTACT SCREEN'
);
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