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
002226bf
Commit
002226bf
authored
Mar 16, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
お気に入り修正。
parent
ba766869
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
2 deletions
+103
-2
public/js/chat-ui.js
+103
-2
No files found.
public/js/chat-ui.js
View file @
002226bf
...
...
@@ -1354,4 +1354,105 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
$
(
'#userNamecard'
).
html
(
namecardObj
);
CHAT_UI
.
showNamecard
(
'userNamecard'
);
};
\ No newline at end of file
};
CHAT_UI
.
makeNameCardInChatRoom
=
function
(
chatRoomId
)
{
console
.
log
(
'makeNameCard Click'
);
var
nameCardInfo
=
CHAT_DB
.
getNameCardData
(
chatRoomId
);
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'
);
};
CHAT_UI
.
refesshAllGroupSearchFaborite
=
function
(
groupId
)
{
const
userNamecardTemplate
=
$
(
'#namecard-template'
).
html
();
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateGroupInfo
(
groupId
);
}
$
(
'#rootGroupBtn'
).
off
();
$
(
'#parentGroupBtn'
).
off
();
var
result
=
CHAT_DB
.
getGroupInfo
(
groupId
);
$
(
'#childGroupList'
).
html
(
''
);
$
(
'#userInGroupList'
).
html
(
''
);
$
(
'#groupPathArea'
).
html
(
''
);
if
(
typeof
result
.
parentGroupId
!==
'undefined'
)
{
console
.
log
(
result
.
parentGroupId
);
$
(
'#parentGroupBtn'
).
on
(
'click'
,
function
()
{
CHAT_UI
.
refesshAllGroupSearch
(
result
.
parentGroupId
);
});
}
if
(
typeof
result
.
rootGroupId
!==
'undefined'
)
{
console
.
log
(
result
.
rootGroupId
);
$
(
'#rootGroupBtn'
).
on
(
'click'
,
function
()
{
CHAT_UI
.
refesshAllGroupSearch
(
result
.
rootGroupId
);
});
}
const
groupNaviTemplate
=
$
(
'#group-navigater-template'
).
html
();
var
groupCount
=
0
;
result
.
groupPathList
.
forEach
(
function
(
groupPath
)
{
if
(
groupCount
!=
0
)
{
$
(
'#groupPathArea'
).
append
(
"<label class='group-navigater'> > </label>"
);
}
let
html
=
Mustache
.
render
(
groupNaviTemplate
,
{
name
:
groupPath
.
groupName
,
id
:
groupPath
.
groupId
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
CHAT_UI
.
refesshAllGroupSearch
(
groupPath
.
groupId
);
});
groupCount
++
;
$
(
'#groupPathArea'
).
append
(
obj
);
})
const
groupTemplate
=
$
(
'#group-template'
).
html
();
result
.
childGroupList
.
forEach
(
function
(
childGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
childGroup
.
groupName
,
id
:
childGroup
.
groupId
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
CHAT_UI
.
refesshAllGroupSearch
(
childGroup
.
groupId
);
});
$
(
'#childGroupList'
).
append
(
obj
);
})
const
userTemplate
=
$
(
'#user-template'
).
html
();
result
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
groupUser
.
profileUrl
)
let
html
=
Mustache
.
render
(
userTemplate
,
{
id
:
groupUser
.
shopMemberId
,
profileImage
:
groupUser
.
profileImagePath
,
name
:
groupUser
.
shopMemberName
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
CHAT_UI
.
makeNameCard
(
groupUser
.
shopMemberId
);
});
$
(
'#userInGroupList'
).
append
(
obj
);
})
$
(
'#myGroupArea'
).
hide
();
$
(
'#allGroupArea'
).
show
();
}
\ 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