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