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
37bc4f94
Commit
37bc4f94
authored
Jul 16, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed var to const and let
parent
ab1b8a92
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
156 additions
and
185 deletions
+156
-185
public_new/archive_detail.html
+3
-3
public_new/js/common/constant.js
+7
-0
public_new/js/common/native-bridge-datasource.js
+8
-12
public_new/js/common/native-bridge-delegate.js
+3
-3
public_new/js/sockets/chat-websocket-message.js
+1
-1
public_new/js/sockets/chat-websocket.js
+1
-1
public_new/js/utils/chat-media-handler.js
+8
-10
public_new/js/views/archive/archive.js
+31
-39
public_new/js/views/chats/chat-room-message.js
+3
-3
public_new/js/views/chats/chat-room.js
+3
-3
public_new/js/views/chats/management/chat-add-user.js
+29
-29
public_new/js/views/chats/management/chat-make-room.js
+0
-0
public_new/js/views/chats/management/chat-management-common.js
+25
-24
public_new/js/views/collaboration/share-bind-button-action.js
+2
-5
public_new/js/views/collaboration/share-event-listener.js
+2
-4
public_new/js/views/contact/contact.js
+27
-35
public_new/js/views/contact/namecard.js
+3
-13
No files found.
public_new/archive_detail.html
View file @
37bc4f94
...
...
@@ -81,9 +81,9 @@
var
archiveId
;
window
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
var
urlPrm
=
new
Object
;
var
urlSearch
=
location
.
search
.
substring
(
1
).
split
(
'&'
);
var
kv
=
urlSearch
[
0
].
split
(
'='
);
let
urlPrm
=
new
Object
;
const
urlSearch
=
location
.
search
.
substring
(
1
).
split
(
'&'
);
const
kv
=
urlSearch
[
0
].
split
(
'='
);
urlPrm
[
kv
[
0
]]
=
kv
[
1
];
archiveId
=
urlPrm
.
archiveId
ArchiveUI
.
refreshArchiveDetailScreen
(
urlPrm
.
archiveId
);
...
...
public_new/js/common/constant.js
View file @
37bc4f94
...
...
@@ -69,6 +69,13 @@ const COLLABORATION_JOIN_TYPE = {
INVITED
:
"2"
,
};
const
ARCHIVE_TYPE
=
{
PICTURE
:
0
,
VIDEO
:
1
,
VOICE
:
2
,
DOCUMENT
:
3
,
};
const
messageSeperator
=
"<::split>"
;
const
DATA_MESSAGE_SCHEME
=
"::NOT_MESSAGE"
;
const
FINISH_ALL_COLLABORATION_SIGNAL
=
"::ALL_COLLABORATION_END"
;
...
...
public_new/js/common/native-bridge-datasource.js
View file @
37bc4f94
// ios用
function
callNativeApp
(
iosKey
,
jsonData
)
{
console
.
lo
g
(
"callNativeApp called: "
+
iosKey
);
console
.
debu
g
(
"callNativeApp called: "
+
iosKey
);
var
result
;
try
{
var
key
=
iosKey
;
...
...
@@ -10,7 +10,7 @@ function callNativeApp(iosKey, jsonData) {
// resにObjective-cからのレスポンスが返る
result
=
prompt
(
JSON
.
stringify
(
payload
));
}
catch
(
err
)
{
console
.
lo
g
(
"The native context does not exist yet"
);
console
.
debu
g
(
"The native context does not exist yet"
);
}
return
result
;
}
...
...
@@ -75,26 +75,26 @@ NativeBridgeDataSource.getMyInfo = function () {
}
};
NativeBridgeDataSource
.
getMessages
=
function
(
roomId
)
{
NativeBridgeDataSource
.
getMessages
ByRoomID
=
function
(
roomID
)
{
if
(
deviceInfo
.
isiOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessages
,
{
roomId
:
roomI
d
})
callNativeApp
(
NATIVE_KEY_IOS
.
getMessages
,
{
roomId
:
roomI
D
})
);
}
else
if
(
deviceInfo
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMessageList
(
roomI
d
));
return
JSON
.
parse
(
android
.
getMessageList
(
roomI
D
));
}
};
NativeBridgeDataSource
.
getMessages
WithMessageId
=
function
(
messageId
)
{
NativeBridgeDataSource
.
getMessages
ByMessageID
=
function
(
messageID
)
{
if
(
deviceInfo
.
isiOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessageListFromMessageId
,
{
messageId
:
messageI
d
,
messageId
:
messageI
D
,
})
);
}
else
if
(
deviceInfo
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getMessageListFromMessageId
(
messageI
d
));
return
JSON
.
parse
(
android
.
getMessageListFromMessageId
(
messageI
D
));
}
};
...
...
@@ -153,7 +153,6 @@ NativeBridgeDataSource.getGroupInfoForAddUser = function (groupId) {
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupInfoForAddUser
,
{
groupId
:
groupId
})
);
}
else
if
(
deviceInfo
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupInfoForAddUser
(
groupId
));
}
};
...
...
@@ -162,8 +161,6 @@ NativeBridgeDataSource.loadSelectedUsers = function () {
if
(
deviceInfo
.
isiOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getSelectedUserList
,
{}));
}
else
if
(
deviceInfo
.
isAndroid
())
{
//String形式をJsonに変更してReturn
console
.
log
(
JSON
.
parse
(
android
.
getSelectedUserList
()));
return
JSON
.
parse
(
android
.
getSelectedUserList
());
}
};
...
...
@@ -334,7 +331,6 @@ NativeBridgeDataSource.getUserInfo = function (shopMemberId) {
};
NativeBridgeDataSource
.
getUserListByLoginId
=
function
(
loginIdList
)
{
console
.
log
(
loginIdList
);
if
(
deviceInfo
.
isiOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUserListByLoginId
,
{
...
...
public_new/js/common/native-bridge-delegate.js
View file @
37bc4f94
...
...
@@ -190,15 +190,15 @@ NativeBridgeDelegate.goHome = function () {
}
};
NativeBridgeDelegate
.
updatePreMessage
=
function
(
messageI
d
)
{
NativeBridgeDelegate
.
updatePreMessage
=
function
(
messageI
D
)
{
if
(
typeof
android
!=
"undefined"
)
{
if
(
serverInfo
.
isOnline
==
"true"
)
{
android
.
updatePreMessage
(
messageI
d
);
android
.
updatePreMessage
(
messageI
D
);
}
}
else
{
// 追加メッセージUpdate、get
webkit
.
messageHandlers
.
updatePreMessage
.
postMessage
({
messageId
:
messageI
d
,
messageId
:
messageI
D
,
});
}
};
...
...
public_new/js/sockets/chat-websocket-message.js
View file @
37bc4f94
var
bindOnNewMessage
=
function
()
{
// New Message
// #36170
socket
.
on
(
SOCKET_KEY
.
NEW_MESSAGE
,
function
(
message
,
roomI
d
,
roomName
)
{
socket
.
on
(
SOCKET_KEY
.
NEW_MESSAGE
,
function
(
message
,
roomI
D
,
roomName
)
{
const
systemMessageTemplate
=
getTemplate
(
TemplateURL
.
SYSTEM_MESSAGE
);
const
unwrappedMessageInfo
=
decodeMessage
(
message
.
text
);
...
...
public_new/js/sockets/chat-websocket.js
View file @
37bc4f94
...
...
@@ -181,7 +181,7 @@ var bindOnRefreshUserListInGroup = function () {
socket
.
on
(
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
,
function
(
users
,
groupId
,
isInvite
)
{
console
.
lo
g
(
console
.
debu
g
(
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
+
"message received but it does nothing."
);
...
...
public_new/js/utils/chat-media-handler.js
View file @
37bc4f94
...
...
@@ -22,8 +22,7 @@ $("#image-form").on("submit", function (e) {
$
(
".overlay"
).
addClass
(
"active undismissable"
);
$
(
".loader"
).
addClass
(
"active"
);
Common
.
showLoadingIndicator
();
var
fd
=
new
FormData
(
$
(
this
)[
0
]);
console
.
log
(
$
(
this
)[
0
]);
let
fd
=
new
FormData
(
$
(
this
)[
0
]);
//画像の大きさが500pixelより大きかったら、thumbnailを生成
ChatMediaHandler
.
createThumbnailAndUpload
(
file
,
...
...
@@ -180,9 +179,11 @@ ChatMediaHandler.videoEncodeEnd = function (encodedUri) {
xhr
.
send
();
};
// Video のサムネイルファイル生成する
ChatMediaHandler
.
createVideoThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
ChatMediaHandler
.
createVideoThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
var
fileReader
=
new
FileReader
();
fileReader
.
onload
=
function
()
{
...
...
@@ -223,7 +224,7 @@ ChatMediaHandler.createVideoThumbnailAndUpload = function (sourceImage, callback
.
catch
((
error
)
=>
{
// fetch Error catch Block
if
(
error
)
{
console
.
log
(
error
);
console
.
error
(
error
);
}
});
return
true
;
...
...
@@ -239,7 +240,6 @@ ChatMediaHandler.createVideoThumbnailAndUpload = function (sourceImage, callback
fileReader
.
readAsArrayBuffer
(
sourceImage
);
};
// Ajaxでイメージをアップロードする
ChatMediaHandler
.
uploadImage
=
function
(
formData
)
{
formData
.
append
(
"roomId"
,
roomInfo
.
roomID
);
...
...
@@ -379,7 +379,6 @@ ChatMediaHandler.uploadImage = function (formData) {
});
};
// Thumbnailのファイルを生成する。
ChatMediaHandler
.
createThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
const
fileReader
=
new
FileReader
();
...
...
@@ -435,10 +434,10 @@ ChatMediaHandler.createThumbnailAndUpload = function (sourceImage, callback) {
.
catch
((
error
)
=>
{
// fetch Error catch Block
if
(
error
)
{
console
.
log
(
error
);
console
.
error
(
error
);
}
});
};
fileReader
.
readAsDataURL
(
sourceImage
);
};
\ No newline at end of file
};
public_new/js/views/archive/archive.js
View file @
37bc4f94
...
...
@@ -3,18 +3,18 @@ var ArchiveUI = {};
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
// アーカイブ検索
bindArchiveSearch
();
ArchiveUI
.
bindArchiveSearch
();
// iOSキーボード変換検知用
bindiOSKeyBoardEvent
();
ArchiveUI
.
bindiOSKeyBoardEvent
();
});
ArchiveUI
.
refreshSearchScreen
=
function
(
keyword
)
{
const
archiveList
=
NativeBridgeDataSource
.
getArchiveByName
(
keyword
);
const
typeImage
=
getArchiveTypeIconURL
(
archive
.
archiveType
);
const
typeImage
=
ArchiveUI
.
getArchiveTypeIconURL
(
archive
.
archiveType
);
getArchiveTemplate
().
then
(
function
(
archiveTemplate
)
{
ArchiveUI
.
getArchiveTemplate
().
then
(
function
(
archiveTemplate
)
{
archiveList
.
forEach
(
function
(
archive
)
{
let
html
=
renderArchiveTemplate
(
let
html
=
ArchiveUI
.
renderArchiveTemplate
(
archiveTemplate
,
archive
.
archiveId
,
archive
.
archiveName
,
...
...
@@ -28,15 +28,7 @@ ArchiveUI.refreshSearchScreen = function (keyword) {
});
};
//* UTILS *//
const
ARCHIVE_TYPE
=
{
PICTURE
:
0
,
VIDEO
:
1
,
VOICE
:
2
,
DOCUMENT
:
3
,
};
var
getArchiveTypeIconURL
=
function
(
type
)
{
ArchiveUI
.
getArchiveTypeIconURL
=
function
(
type
)
{
switch
(
type
)
{
case
ARCHIVE_TYPE
.
PICTURE
:
return
"icon/icon_collabo_picture.png"
;
...
...
@@ -51,7 +43,7 @@ var getArchiveTypeIconURL = function (type) {
}
};
var
getArchiveTemplate
=
function
()
{
ArchiveUI
.
getArchiveTemplate
=
function
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
$
.
get
({
url
:
TemplateURL
.
ARCHIVE_LIST
,
async
:
false
},
function
(
text
)
{
resolve
(
text
);
...
...
@@ -59,10 +51,10 @@ var getArchiveTemplate = function () {
});
};
var
bindArchiveSearch
=
function
()
{
ArchiveUI
.
bindArchiveSearch
=
function
()
{
const
searchInput
=
$
(
'#archive .search_form input[type="search"]'
);
searchInput
.
keyup
(
function
(
e
)
{
var
keyword
=
searchInput
.
val
();
const
keyword
=
searchInput
.
val
();
const
enterKeyPressed
=
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
;
const
keywordEmpty
=
keyword
==
""
||
keyword
.
length
<
2
;
const
keywordNotEmpty
=
keyword
.
length
!=
0
&&
keyword
!=
""
;
...
...
@@ -87,18 +79,18 @@ var bindArchiveSearch = function () {
});
};
var
bindiOSKeyBoardEvent
=
function
()
{
ArchiveUI
.
bindiOSKeyBoardEvent
=
function
()
{
const
searchInput
=
$
(
'#archive .search_form input[type="search"]'
);
searchInput
.
on
(
"compositionend"
,
function
()
{
if
(
deviceInfo
.
isiOS
())
{
var
keyword
=
searchInput
.
val
();
const
keyword
=
searchInput
.
val
();
$
(
".overlay_src_msg"
).
empty
();
ArchiveUI
.
refreshSearchScreen
(
keyword
);
}
});
};
var
renderArchiveTemplate
=
function
(
ArchiveUI
.
renderArchiveTemplate
=
function
(
html
,
archiveId
,
archiveName
,
...
...
@@ -131,13 +123,13 @@ ArchiveUI.refreshArchiveDetailScreen = function (archiveId) {
const
archive
=
NativeBridgeDataSource
.
getArchiveDetail
(
archiveId
);
// template archive detail
appendArchiveDetailScreen
(
archive
);
ArchiveUI
.
appendArchiveDetailScreen
(
archive
);
// setup player
appendPlayer
(
archive
);
ArchiveUI
.
appendPlayer
(
archive
);
// append attended users
appendAttendUsers
(
archive
.
attendUserIds
);
ArchiveUI
.
appendAttendUsers
(
archive
.
attendUserIds
);
// set languages
currentUserInfo
.
configureLanguage
();
...
...
@@ -159,7 +151,7 @@ ArchiveUI.refreshArchiveDetailScreen = function (archiveId) {
Common
.
dismissLoadingIndicator
();
};
var
appendArchiveDetailScreen
=
function
(
archive
)
{
ArchiveUI
.
appendArchiveDetailScreen
=
function
(
archive
)
{
// 保存ユーザ情報を取得
const
userInfo
=
NativeBridgeDataSource
.
getUserInfo
(
archive
.
saveUserId
);
userInfo
.
profileUrl
=
Common
.
getProfileImgUrl
(
userInfo
.
profileUrl
);
...
...
@@ -182,7 +174,7 @@ var appendArchiveDetailScreen = function (archive) {
$
(
"#archiveDetail"
).
append
(
obj
);
};
var
appendPlayer
=
function
(
archive
)
{
ArchiveUI
.
appendPlayer
=
function
(
archive
)
{
// プレイヤーの切り替え
const
archiveFilePath
=
ArchiveUI
.
createGetDataUrl
(
archive
.
filePath
,
...
...
@@ -192,15 +184,15 @@ var appendPlayer = function (archive) {
switch
(
archive
.
archiveType
)
{
case
"0"
:
// 画像
case
0
:
appendImageTypePlayer
(
archiveFilePath
);
ArchiveUI
.
appendImageTypePlayer
(
archiveFilePath
);
break
;
case
"1"
:
// 動画
case
1
:
appendVideoTypePlayer
(
archiveFilePath
);
ArchiveUI
.
appendVideoTypePlayer
(
archiveFilePath
);
break
;
case
"2"
:
// 音声
case
2
:
appendVoiceTypePlayer
(
archiveFilePath
);
ArchiveUI
.
appendVoiceTypePlayer
(
archiveFilePath
);
break
;
case
"3"
:
// 文書
case
3
:
...
...
@@ -211,13 +203,13 @@ var appendPlayer = function (archive) {
}
};
var
appendImageTypePlayer
=
function
(
filePath
)
{
ArchiveUI
.
appendImageTypePlayer
=
function
(
filePath
)
{
$
(
"#archive_player"
).
prepend
(
'<img class="archive_player" src="'
+
filePath
+
'" />'
);
};
var
appendVideoTypePlayer
=
function
(
filePath
)
{
ArchiveUI
.
appendVideoTypePlayer
=
function
(
filePath
)
{
if
(
deviceInfo
.
isiOS
())
{
$
(
"#archive_player"
).
prepend
(
'<video class="archive_player" controls autoplay muted playsinline controlsList="nodownload"><source src="'
+
...
...
@@ -237,7 +229,7 @@ var appendVideoTypePlayer = function (filePath) {
}
};
var
appendVoiceTypePlayer
=
function
(
filePath
)
{
ArchiveUI
.
appendVoiceTypePlayer
=
function
(
filePath
)
{
if
(
deviceInfo
.
isiOS
())
{
$
(
"#archive_player"
).
prepend
(
'<audio class="archive_audio_player" controls controlsList="nodownload"><source src="'
+
...
...
@@ -258,7 +250,7 @@ var appendVoiceTypePlayer = function (filePath) {
);
};
var
appendAttendUsers
=
function
(
attendedUserList
)
{
ArchiveUI
.
appendAttendUsers
=
function
(
attendedUserList
)
{
// ユーザの様式を読み込む
const
archiveUserTemplate
=
getTemplate
(
TemplateURL
.
ARCHIVE_USER
);
...
...
@@ -271,7 +263,7 @@ var appendAttendUsers = function (attendedUserList) {
if
(
user
==
""
)
{
return
;
}
var
userInfo
=
NativeBridgeDataSource
.
getUserInfo
(
user
);
const
userInfo
=
NativeBridgeDataSource
.
getUserInfo
(
user
);
userInfo
.
profileUrl
=
Common
.
getProfileImgUrl
(
userInfo
.
profileUrl
);
const
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
profileImage
:
userInfo
.
profileUrl
,
...
...
@@ -288,15 +280,15 @@ var appendAttendUsers = function (attendedUserList) {
};
ArchiveUI
.
createGetDataUrl
=
function
(
fileName
,
roomId
)
{
var
filePath
=
return
(
serverInfo
.
cmsURL
+
"/chatapi/file/getImage?sid="
+
currentUserInfo
.
sid
+
"&fileName="
+
fileName
+
"&roomId="
+
roomId
;
return
filePath
;
roomId
)
;
};
// アーカイブ一覧
...
...
@@ -316,7 +308,7 @@ ArchiveUI.refreshArchiveScreen = function () {
}
// ローカルDBのデータを表示
var
archiveList
=
NativeBridgeDataSource
.
getArchiveList
();
const
archiveList
=
NativeBridgeDataSource
.
getArchiveList
();
if
(
typeof
archiveList
==
"undefined"
)
{
Common
.
dismissLoadingIndicator
();
return
;
...
...
@@ -340,13 +332,13 @@ ArchiveUI.refreshArchiveScreen = function () {
// その他
typeImage
=
""
;
}
le
t
html
=
Mustache
.
render
(
archiveTemplate
,
{
cons
t
html
=
Mustache
.
render
(
archiveTemplate
,
{
archiveId
:
archive
.
archiveId
,
fileName
:
archive
.
archiveName
,
insertDate
:
archive
.
archiveDate
,
typeImage
:
typeImage
,
});
le
t
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
cons
t
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#archiveList"
).
append
(
obj
);
});
...
...
public_new/js/views/chats/chat-room-message.js
View file @
37bc4f94
...
...
@@ -95,7 +95,8 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
ChatRoom
.
appendAttendedUsers
(
roomID
);
// メッセージ表示
ChatRoom
.
prependMessage
(
roomID
);
let
messages
=
NativeBridgeDataSource
.
getMessagesByRoomID
(
roomID
);
ChatRoom
.
prependMessage
(
messages
);
// スクロール調整
let
jQueryMessages
=
$
(
"#messages"
);
...
...
@@ -144,8 +145,7 @@ ChatRoom.appendAttendedUsers = function (roomID) {
$
(
"#filter"
).
append
(
filterObj
);
};
ChatRoom
.
prependMessage
=
function
(
roomID
)
{
const
messages
=
NativeBridgeDataSource
.
getMessages
(
roomID
);
ChatRoom
.
prependMessage
=
function
(
messages
)
{
const
now
=
new
Date
();
// メッセージ文字列の生成
let
workVal
=
""
;
...
...
public_new/js/views/chats/chat-room.js
View file @
37bc4f94
...
...
@@ -17,9 +17,9 @@ window.onscroll = function () {
'<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>'
);
$
(
"#messages"
).
prepend
(
loader
);
const
messageI
d
=
$
(
$
(
".chat_message"
).
get
(
0
)).
data
(
"messageid"
);
NativeBridgeDelegate
.
updatePreMessage
(
messageI
d
);
let
messages
=
NativeBridgeDataSource
.
getMessages
WithMessageId
(
messageId
);
const
messageI
D
=
$
(
$
(
".chat_message"
).
get
(
0
)).
data
(
"messageid"
);
NativeBridgeDelegate
.
updatePreMessage
(
messageI
D
);
let
messages
=
NativeBridgeDataSource
.
getMessages
ByMessageID
(
messageID
);
ChatRoom
.
prependMessage
(
messages
);
loader
.
remove
();
var
afterHeight
=
$
(
".room_container"
).
height
();
...
...
public_new/js/views/chats/management/chat-add-user.js
View file @
37bc4f94
...
...
@@ -3,9 +3,9 @@ var ChatAddUser = {};
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
// メンバー検索
bindMemberSearch
();
ChatAddUser
.
bindMemberSearch
();
// iOSキーボード変換検知用
bindiOSKeyBoardEvent
();
ChatAddUser
.
bindiOSKeyBoardEvent
();
$
(
"#chat_add_user .search_form .cancel"
).
click
(
function
()
{
let
roomListTitle
=
getLocalizedString
(
"inviteUsersSubtitle"
);
...
...
@@ -24,17 +24,17 @@ ChatAddUser.searchUser = function (keyword) {
if
(
isAllGroup
)
{
//グループデータ検索
const
groupList
=
NativeBridgeDataSource
.
getGroupByName
(
keyword
);
searchGroupData
(
groupList
,
overlayMessage
);
ChatAddUser
.
searchGroupData
(
groupList
,
overlayMessage
);
//ユーザデータ検索
var
userList
=
const
userList
=
NativeBridgeDataSource
.
getAllGroupShopMemberNotInRoomByName
(
keyword
);
searchUserData
(
userList
,
overlayMessage
);
ChatAddUser
.
searchUserData
(
userList
,
overlayMessage
);
hasNoData
=
userList
.
length
==
0
&&
groupList
.
length
==
0
;
//連絡先画面
}
else
{
var
userList
=
const
userList
=
NativeBridgeDataSource
.
getMyGroupShopMemberNotInRoomByName
(
keyword
);
searchUserData
(
userList
,
overlayMessage
);
hasNoData
=
userList
.
length
==
0
;
...
...
@@ -48,7 +48,7 @@ ChatAddUser.searchUser = function (keyword) {
/** UTILS */
var
bindMemberSearch
=
function
()
{
ChatAddUser
.
bindMemberSearch
=
function
()
{
const
searchInput
=
$
(
'#chat_add_user .search_form input[type="search"]'
);
searchInput
.
click
(
function
(
e
)
{
//画面タイトル設定
...
...
@@ -81,7 +81,7 @@ var bindMemberSearch = function () {
});
};
var
bindiOSKeyBoardEvent
=
function
()
{
ChatAddUser
.
bindiOSKeyBoardEvent
=
function
()
{
const
searchInput
=
$
(
'#chat_add_user .search_form input[type="search"]'
);
searchInput
.
on
(
"compositionend"
,
function
()
{
if
(
deviceInfo
.
isiOS
())
{
...
...
@@ -91,7 +91,7 @@ var bindiOSKeyBoardEvent = function () {
});
};
var
searchGroupData
=
function
(
groupList
,
overlayMessage
)
{
ChatAddUser
.
searchGroupData
=
function
(
groupList
,
overlayMessage
)
{
const
groupTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_GROUP_LIST
);
groupList
.
forEach
(
function
(
group
)
{
...
...
@@ -106,40 +106,40 @@ var searchGroupData = function (groupList, overlayMessage) {
});
};
var
renderGroupTemplate
=
function
(
groupTemplate
,
groupName
,
groupID
)
{
ChatAddUser
.
renderGroupTemplate
=
function
(
groupTemplate
,
groupName
,
groupID
)
{
return
Mustache
.
render
(
groupTemplate
,
{
name
:
groupName
,
id
:
groupID
,
});
};
var
searchUserData
=
function
(
userList
,
overlayMessage
)
{
ChatAddUser
.
searchUserData
=
function
(
userList
,
overlayMessage
)
{
const
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
userList
.
forEach
(
function
(
user
)
{
setUserProfile
(
user
);
checkUser
(
user
);
ChatAddUser
.
setUserProfile
(
user
);
ChatAddUser
.
checkUser
(
user
);
});
let
html
=
renderUserTemplate
(
userTemplate
,
userList
);
let
html
=
ChatAddUser
.
renderUserTemplate
(
userTemplate
,
userList
);
let
obj
=
jQuery
.
parseHTML
(
html
);
overlayMessage
.
append
(
obj
);
};
var
setUserProfile
=
function
(
user
)
{
ChatAddUser
.
setUserProfile
=
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
};
var
checkUser
=
function
(
user
)
{
ChatAddUser
.
checkUser
=
function
(
user
)
{
let
findObj
=
ChatManagementCommon
.
selectedUserList
.
find
(
function
(
shopMemberI
d
shopMemberI
D
)
{
return
shopMemberI
d
==
user
.
shopMemberId
;
return
shopMemberI
D
==
user
.
shopMemberId
;
});
if
(
findObj
)
{
user
.
checked
=
"checked"
;
}
};
var
renderUserTemplate
=
function
(
userTemplate
,
userList
)
{
ChatAddUser
.
renderUserTemplate
=
function
(
userTemplate
,
userList
)
{
return
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
,
});
...
...
@@ -254,7 +254,7 @@ ChatAddUser.refreshAllGroupForAddUser = function (paramGroupId) {
NativeBridgeDelegate
.
updateGroupInfo
(
groupId
);
//画面エリアを初期化。
initialzScreen
();
ChatAddUser
.
initialzScreen
();
//DBからグループ情報を取得。
const
result
=
NativeBridgeDataSource
.
getGroupInfoForAddUser
(
groupId
);
...
...
@@ -284,16 +284,16 @@ ChatAddUser.refreshAllGroupForAddUser = function (paramGroupId) {
}
//該当グループのパースを表示。
appendGroupPath
(
result
.
groupPathList
);
ChatAddUser
.
appendGroupPath
(
result
.
groupPathList
);
//該当グループの下位グループ表示。
appendGroupInGroup
(
result
.
childGroupList
);
ChatAddUser
.
appendGroupInGroup
(
result
.
childGroupList
);
//該当グループの所属ユーザを表示。
appendUserInGroup
(
result
.
groupUserList
);
ChatAddUser
.
appendUserInGroup
(
result
.
groupUserList
);
};
var
initialzScreen
=
function
()
{
ChatAddUser
.
initialzScreen
=
function
()
{
$
(
"#parentGroupBtnForAddUser"
).
off
();
$
(
"#rootGroupBtnForAddUser"
).
off
();
$
(
"#childGroupListAreaForAddUser"
).
html
(
""
);
...
...
@@ -301,7 +301,7 @@ var initialzScreen = function () {
$
(
"#groupPathAreaForAddUser"
).
html
(
""
);
};
var
appendGroupPath
=
function
(
groupPathList
)
{
ChatAddUser
.
appendGroupPath
=
function
(
groupPathList
)
{
const
groupPathTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_PATH
);
let
groupPathCount
=
0
;
groupPathList
.
forEach
(
function
(
groupPath
)
{
...
...
@@ -317,7 +317,7 @@ var appendGroupPath = function (groupPathList) {
});
};
var
appendGroupInGroup
=
function
(
childGroupList
)
{
ChatAddUser
.
appendGroupInGroup
=
function
(
childGroupList
)
{
const
groupTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_LIST
);
childGroupList
.
forEach
(
function
(
childGroup
)
{
...
...
@@ -331,14 +331,14 @@ var appendGroupInGroup = function (childGroupList) {
});
};
var
appendUserInGroup
=
function
(
groupUserList
)
{
ChatAddUser
.
appendUserInGroup
=
function
(
groupUserList
)
{
const
userTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_USER_LIST
);
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
Common
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
let
findObj
=
ChatManagementCommon
.
selectedUserList
.
find
(
function
(
shopMemberI
d
shopMemberI
D
)
{
return
shopMemberI
d
==
groupUser
.
shopMemberId
;
return
shopMemberI
D
==
groupUser
.
shopMemberId
;
});
if
(
findObj
)
{
groupUser
.
checked
=
"checked"
;
...
...
public_new/js/views/chats/management/chat-make-room.js
View file @
37bc4f94
This diff is collapsed.
Click to expand it.
public_new/js/views/chats/management/chat-management-common.js
View file @
37bc4f94
...
...
@@ -6,17 +6,17 @@ ChatManagementCommon.selectedUserList = new Array();
ChatManagementCommon
.
showMakeRoomConfirmView
=
function
()
{
$
(
"#selectedUserList"
).
html
(
""
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_CONFIRM_USER_LIST
);
const
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_CONFIRM_USER_LIST
);
var
selectedUserList
=
NativeBridgeDataSource
.
loadSelectedUsers
();
const
selectedUserList
=
NativeBridgeDataSource
.
loadSelectedUsers
();
selectedUserList
.
forEach
(
function
(
user
)
{
le
t
html
=
Mustache
.
render
(
userTemplate
,
{
cons
t
html
=
Mustache
.
render
(
userTemplate
,
{
id
:
user
.
shopMemberId
,
profileImage
:
Common
.
getProfileImgUrl
(
user
.
profileUrl
),
name
:
user
.
shopMemberName
,
});
le
t
obj
=
jQuery
.
parseHTML
(
html
);
cons
t
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#selectedUserList"
).
append
(
obj
);
});
...
...
@@ -28,11 +28,11 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
if
(
trimmedRoomName
.
length
==
0
)
{
// loadingIndicatorを表示
Common
.
showLoadingIndicator
();
let
userI
d
List
=
new
Array
();
let
userI
D
List
=
new
Array
();
let
userNameList
=
new
Array
();
selectedUserList
.
forEach
(
function
(
user
)
{
userI
d
List
.
push
(
user
.
shopMemberId
);
userI
D
List
.
push
(
user
.
shopMemberId
);
userNameList
.
push
(
user
.
shopMemberName
);
});
...
...
@@ -41,7 +41,7 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
currentUserInfo
.
loginID
+
","
+
userNameList
.
join
(
","
);
NativeBridgeDelegate
.
createChatRoom
(
ChatRoomType
.
DM
,
userI
d
List
.
join
(
","
),
userI
D
List
.
join
(
","
),
newRoomName
,
MakeRoomFlag
.
MAKE_ROOM
,
false
...
...
@@ -130,8 +130,8 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
ChatManagementCommon.showAddUserConfirmView = function () {
$("#selectedUserList").html("");
var
userTemplate = getTemplate(TemplateURL.ADD_USER_CONFIRM_USER_LIST);
var
selectedUserList = NativeBridgeDataSource.loadSelectedUsers();
const
userTemplate = getTemplate(TemplateURL.ADD_USER_CONFIRM_USER_LIST);
const
selectedUserList = NativeBridgeDataSource.loadSelectedUsers();
selectedUserList.forEach(function (user) {
let html = Mustache.render(userTemplate, {
...
...
@@ -155,35 +155,36 @@ ChatManagementCommon.showAddUserConfirmView = function () {
});
};
ChatManagementCommon.checkForMakeChat = function (checkMemberI
d
) {
ChatManagementCommon.checkForMakeChat = function (checkMemberI
D
) {
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberI
d
shopMemberI
D
) {
return shopMemberI
d == checkMemberId
;
return shopMemberI
D == checkMemberID
;
});
if (findObj) {
// remove
ChatManagementCommon.selectedUserList =
ChatManagementCommon.selectedUserList.filter(function (
shopMemberId
) {
return checkMemberId != shopMemberId;
ChatManagementCommon.selectedUserList.filter(function (shopMemberID) {
return checkMemberID != shopMemberID;
});
$(".checkbox" + checkMemberId)
.prop("checked", false)
.trigger("change");
ChatManagementCommon.updateCheckBox(checkMemberID, false);
} else {
// add
ChatManagementCommon.selectedUserList.push(checkMemberId);
$(".checkbox" + checkMemberId)
.prop("checked", true)
.trigger("change");
ChatManagementCommon.selectedUserList.push(checkMemberID);
ChatManagementCommon.updateCheckBox(checkMemberID, true);
}
le
t cnt = ChatManagementCommon.selectedUserList.length;
cons
t cnt = ChatManagementCommon.selectedUserList.length;
if (ChatManagementCommon.selectedUserList.length > 0) {
$(".select_member_num").text(cnt);
} else {
$(".select_member_num").text("0");
}
};
ChatManagementCommon.updateCheckBox = function (checkMemberID, checked) {
$(".checkbox" + checkMemberID)
.prop("checked", checked)
.trigger("change");
};
public_new/js/views/collaboration/share-bind-button-action.js
View file @
37bc4f94
...
...
@@ -63,7 +63,6 @@ function toggleMic() {
* レコード関連
*************/
function
recordStart
()
{
console
.
log
(
"peacekim:: レコードを開始しました"
);
MainManRecord
(
"on"
);
$
(
"#recordBtn .record"
).
addClass
(
"disable"
);
$
(
".flash-txt"
).
addClass
(
"on"
);
...
...
@@ -81,7 +80,7 @@ function toggleRecord() {
recordStart
();
}
else
{
recordStop
(
function
()
{
console
.
log
(
"peacekim:: レコードを終了しました
"
);
console
.
info
(
"Did record stop
"
);
});
}
}
...
...
@@ -107,13 +106,11 @@ function mainManRecordWithCollaboration(action, url, callback) {
try
{
mediaRecorder
.
stop
();
}
catch
(
exeption
)
{
console
.
log
(
"peacekim:: Record fail
"
);
console
.
error
(
"Record failed
"
);
callback
();
}
console
.
log
(
"peacekim:: Recorded Blobs: "
,
recordedBlobs
);
setTimeout
(
function
()
{
console
.
log
(
"peacekim:: Recoding File upload.."
);
const
blob
=
new
Blob
(
recordedBlobs
,
{
type
:
"video/webm"
});
const
uploadFileName
=
"record_"
+
g_webroom
+
"_"
+
g_shareCount
+
".webm"
;
g_shareCount
++
;
...
...
public_new/js/views/collaboration/share-event-listener.js
View file @
37bc4f94
...
...
@@ -209,7 +209,6 @@ CoviewBridge.bindMessageEvent = function () {
case
"HostRequest"
:
// to be called by
// wc_api.dispatchEvent (new Event ("message"), {"HostRequest":"userID"});
console
.
log
(
"peacekim:: t2 consoleLog"
,
json
);
break
;
case
"fileChange"
:
if
(
globalUserInfo
.
collaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
...
...
@@ -227,7 +226,7 @@ CoviewBridge.bindMessageEvent = function () {
}
break
;
default
:
console
.
log
(
"peacekim::
Unrecognized api"
,
json
);
console
.
debug
(
"
Unrecognized api"
,
json
);
break
;
}
});
...
...
@@ -348,7 +347,6 @@ function captureAndShareImage(urls, changeHostName) {
$
(
snapshots
[
cpatureViewIndex
]).
attr
(
"height"
)
);
$
(
canvasRemote
).
attr
(
"width"
,
$
(
snapshots
[
cpatureViewIndex
]).
attr
(
"width"
));
console
.
log
(
"peacekim:: t5 url"
,
URL
.
createObjectURL
(
blob
));
if
(
$
(
".canvas_wrap"
).
css
(
"width"
).
replace
(
"px"
,
""
)
/
$
(
".canvas_wrap"
).
css
(
"height"
).
replace
(
"px"
,
""
)
<
...
...
@@ -412,7 +410,7 @@ function captureAndShareImage(urls, changeHostName) {
},
1500
);
},
error
:
function
(
err
)
{
console
.
log
(
err
);
console
.
error
(
err
);
},
});
});
...
...
public_new/js/views/contact/contact.js
View file @
37bc4f94
...
...
@@ -45,13 +45,13 @@ Contact.searchUser = function (keyword) {
/** UTILS */
Contact
.
bindiOSKeyBoardEvent
=
function
()
{
const
searchInput
=
$
(
'#contact .search_form input[type="search"]'
);
searchInput
.
on
(
"compositionend"
,
function
()
{
if
(
deviceInfo
.
isiOS
()
)
{
var
keyword
=
searchInput
.
val
();
if
(
deviceInfo
.
isiOS
())
{
const
searchInput
=
$
(
'#contact .search_form input[type="search"]'
);
searchInput
.
on
(
"compositionend"
,
function
(
)
{
const
keyword
=
searchInput
.
val
();
Contact
.
searchUser
(
keyword
);
}
}
);
}
);
}
};
Contact
.
bindMemeberSearch
=
function
()
{
...
...
@@ -83,14 +83,14 @@ Contact.appendGroupList = function (groupList) {
const
groupTemplate
=
getTemplate
(
TemplateURL
.
GROUP_LIST
);
groupList
.
forEach
(
function
(
group
)
{
le
t
html
=
renderGroupList
(
cons
t
html
=
renderGroupList
(
groupTemplate
,
group
.
groupName
,
group
.
groupId
,
group
.
isFavorite
);
le
t
obj
=
jQuery
.
parseHTML
(
html
);
cons
t
obj
=
jQuery
.
parseHTML
(
html
);
$
(
".overlay_src_msg"
).
append
(
obj
);
});
};
...
...
@@ -107,9 +107,9 @@ Contact.appendUserList = function (userList) {
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
});
var
userTemplate
=
getTemplate
(
TemplateURL
.
USER_LIST
);
le
t
html
=
Contact
.
renderUserList
(
userTemplate
,
userList
);
le
t
obj
=
jQuery
.
parseHTML
(
html
);
const
userTemplate
=
getTemplate
(
TemplateURL
.
USER_LIST
);
cons
t
html
=
Contact
.
renderUserList
(
userTemplate
,
userList
);
cons
t
obj
=
jQuery
.
parseHTML
(
html
);
$
(
".overlay_src_msg"
).
append
(
obj
);
};
...
...
@@ -179,13 +179,13 @@ Contact.appendFavoritGroupList = function () {
//お気に入りグループ取得。
const
favoriteGroupList
=
NativeBridgeDataSource
.
getFavoriteGroups
();
favoriteGroupList
.
forEach
(
function
(
favoriteGroup
)
{
le
t
html
=
Mustache
.
render
(
groupTemplate
,
{
cons
t
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
favoriteGroup
.
groupName
,
id
:
favoriteGroup
.
groupId
,
isFavorite
:
true
,
});
le
t
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
cons
t
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#favoriteList"
).
append
(
obj
);
});
};
...
...
@@ -197,10 +197,10 @@ Contact.appendFavoritUsers = function () {
favoriteUser
.
profileUrl
=
Common
.
getProfileImgUrl
(
favoriteUser
.
profileUrl
);
favoriteUser
.
isFavorite
=
true
;
});
le
t
html
=
Mustache
.
render
(
userTemplate
,
{
cons
t
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
favoriteUserList
,
});
le
t
obj
=
jQuery
.
parseHTML
(
html
);
cons
t
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#favoriteList"
).
append
(
obj
);
};
...
...
@@ -254,20 +254,12 @@ Contact.insertFavoriteGroup = function (groupID) {
Common
.
dismissLoadingIndicator
();
};
// contact.html
// contact.js
// template_group_list.html (GROUP_LIST)
// >> contact.js
// template_group_path.html (GROUP_PATH)
// >> self
// template_user_name_card.html(USER_NAME_CARD)
// >> Namecard.makeNameCard
//全グループ検索画面表示。
Contact
.
refreshAllGroupSearch
=
function
(
paramGroupI
d
)
{
var
groupId
=
paramGroupId
;
Contact
.
refreshAllGroupSearch
=
function
(
paramGroupI
D
)
{
const
groupID
=
paramGroupID
;
if
(
window
.
location
.
pathname
.
includes
(
"chat_room"
))
{
if
(
groupI
d
==
""
)
return
;
NativeBridgeDelegate
.
setToMoveGroupId
(
groupI
d
);
if
(
groupI
D
==
""
)
return
;
NativeBridgeDelegate
.
setToMoveGroupId
(
groupI
D
);
window
.
location
.
href
=
"contact.html"
;
}
...
...
@@ -276,16 +268,16 @@ Contact.refreshAllGroupSearch = function (paramGroupId) {
Contact
.
initialzeForAllGroupSearch
();
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate
.
updateGroupInfo
(
groupI
d
);
NativeBridgeDelegate
.
updateGroupInfo
(
groupI
D
);
//DBからグループ情報を取得。
const
result
=
NativeBridgeDataSource
.
getGroupInfo
(
groupI
d
);
const
result
=
NativeBridgeDataSource
.
getGroupInfo
(
groupI
D
);
Contact
.
bindGroupCellClick
(
result
.
parentGroupId
,
result
.
rootGroupId
,
paramGroupI
d
,
groupI
d
paramGroupI
D
,
groupI
D
);
Contact
.
appendGroupPathList
(
result
.
groupPathList
);
...
...
@@ -367,13 +359,13 @@ Contact.appendSubGroupsInGroup = function (groupList) {
//該当グループの下位グループ表示。
const
groupTemplate
=
getTemplate
(
TemplateURL
.
GROUP_LIST
);
groupList
.
forEach
(
function
(
childGroup
)
{
le
t
html
=
Mustache
.
render
(
groupTemplate
,
{
cons
t
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
childGroup
.
groupName
,
id
:
childGroup
.
groupId
,
isFavorite
:
childGroup
.
isFavorite
,
});
le
t
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
cons
t
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#childGroupListArea"
).
append
(
obj
);
});
};
...
...
@@ -385,9 +377,9 @@ Contact.appendUsersInGroup = function (userList) {
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
});
le
t
html
=
Mustache
.
render
(
userTemplate
,
{
cons
t
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
,
});
le
t
obj
=
jQuery
.
parseHTML
(
html
);
cons
t
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#userInGroupList"
).
append
(
obj
);
};
public_new/js/views/contact/namecard.js
View file @
37bc4f94
...
...
@@ -31,11 +31,11 @@ Namecard.makeNameCard = function (shopMemberID) {
// template_user_name_card.html
Namecard
.
startChat
=
function
(
userShopMemberID
,
userName
)
{
Common
.
showLoadingIndicator
();
var
userIDList
=
[];
let
userIDList
=
[];
userIDList
.
push
(
userShopMemberID
);
// 参加ユーザ名でルーム名を生成
le
t
newRoomName
=
currentUserInfo
.
loginID
+
","
+
userName
;
cons
t
newRoomName
=
currentUserInfo
.
loginID
+
","
+
userName
;
NativeBridgeDelegate
.
createChatRoom
(
ChatRoomType
.
DM
,
userIDList
.
join
(
","
),
...
...
@@ -52,7 +52,7 @@ Namecard.startVoice = function (userShopMemberID, userName) {
userIDList
.
push
(
userShopMemberID
);
// 参加ユーザ名でルーム名を生成
le
t
newRoomName
=
currentUserInfo
.
loginID
+
","
+
userName
;
cons
t
newRoomName
=
currentUserInfo
.
loginID
+
","
+
userName
;
NativeBridgeDelegate
.
createChatRoom
(
ChatRoomType
.
DM
,
userIDList
.
join
(
","
),
...
...
@@ -62,10 +62,6 @@ Namecard.startVoice = function (userShopMemberID, userName) {
);
};
// template_group_user_list.html (GROUP_USER_LIST)
// >> chat-room.js
// >> contact.js
// template_user_list.html
Namecard
.
favoriteUserChange
=
function
(
shopMemberID
,
star
)
{
if
(
$
(
star
).
hasClass
(
"active"
))
{
Namecard
.
removeFavoriteUser
(
shopMemberID
);
...
...
@@ -74,9 +70,6 @@ Namecard.favoriteUserChange = function (shopMemberID, star) {
}
};
// modal_collabo_profile.html
// collaboration.js
// template_user_name_card.html
Namecard
.
removeFavoriteUser
=
function
(
shopMemberID
)
{
Common
.
showLoadingIndicator
();
$
(
"#userNameCard"
).
modal
(
"hide"
);
...
...
@@ -92,8 +85,6 @@ Namecard.removeFavoriteUser = function (shopMemberID) {
Common
.
dismissLoadingIndicator
();
};
// template_user_name_card.html (USER_NAME_CARD)
// >> Namecard.makeNameCard()
Namecard
.
insertFavoriteUser
=
function
(
shopMemberID
)
{
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
"#myNameCard"
).
modal
(
"hide"
);
...
...
@@ -115,4 +106,3 @@ Namecard.refreshForOnline = function () {
Namecard
.
refreshForOffline
=
function
()
{
$
(
"#favoriteButton"
).
prop
(
"disabled"
,
true
);
};
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