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
b977262b
Commit
b977262b
authored
Apr 02, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add-user
parent
7194ca24
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
22 deletions
+123
-22
public_new/chat.html
+1
-1
public_new/chat_add_user.html
+1
-1
public_new/chat_room.html
+1
-0
public_new/js/chat-add-user.js
+83
-0
public_new/js/chat-db.js
+18
-0
public_new/js/chat-ui.js
+9
-10
public_new/js/chat.js
+10
-10
No files found.
public_new/chat.html
View file @
b977262b
...
...
@@ -121,7 +121,6 @@
String
.
prototype
.
replaceAll
=
function
(
org
,
dest
)
{
return
this
.
split
(
org
).
join
(
dest
);
}
let
CHAT_SERVER_URL
=
''
;
let
CMS_SERVER_URL
=
''
;
let
ASSET_PATH
=
'./'
;
...
...
@@ -140,6 +139,7 @@
IS_ONLINE
=
isOnline
;
console
.
log
(
"onChat"
);
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
GROUP
);
CHAT_UI
.
dismissLoadingIndicator
();
};
</script>
</body>
...
...
public_new/chat_add_user.html
View file @
b977262b
...
...
@@ -137,11 +137,11 @@
<script
src=
"./js/language_ja.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/constant.js"
></script>
<script
src=
"./js/chatMakeRoom.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-add-user.js"
></script>
<script>
String
.
prototype
.
replaceAll
=
function
(
org
,
dest
)
{
return
this
.
split
(
org
).
join
(
dest
);
...
...
public_new/chat_room.html
View file @
b977262b
...
...
@@ -182,6 +182,7 @@
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
CHAT_UI
.
loadMessages
(
CHAT
.
globalLoginParameter
.
roomId
,
CHAT
.
globalLoginParameter
.
roomName
);
};
</script>
...
...
public_new/js/chat-add-user.js
0 → 100644
View file @
b977262b
$
(
function
()
{
// メンバー検索
$
(
'#chat_add_user .search_form input[type="search"]'
).
keyup
(
function
(){
var
isAllGroup
=
$
(
'#tabAllGroupOnMakeRoom'
).
is
(
':checked'
);
$
(
'.overlay_src_msg'
).
empty
();
//全グループ検索画面
if
(
isAllGroup
)
{
var
keyword
=
$
(
'#chat_add_user .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
return
;
}
//グループデータ検索
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_make_room_group_list.html"
,
async
:
false
}
,
function
(
text
)
{
groupTemplate
=
text
;
});
groupList
.
forEach
(
function
(
group
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
group
.
groupName
,
id
:
group
.
groupId
,
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
})
//ユーザデータ検索
var
userList
=
CHAT_DB
.
getAllGroupShopMemberNotInRoomByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_make_room_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
shopMemberId
)
{
return
shopMemberId
==
user
.
shopMemberId
;
})
if
(
findObj
)
{
user
.
checked
=
'checked'
;
}
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
//連絡先画面
}
else
{
var
keyword
=
$
(
'#chat_add_user .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
return
;
}
var
userList
=
CHAT_DB
.
getMyGroupShopMemberNotInRoomByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_make_room_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
shopMemberId
)
{
return
shopMemberId
==
user
.
shopMemberId
;
})
if
(
findObj
)
{
user
.
checked
=
'checked'
;
}
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
html
(
obj
);
}
});
});
public_new/js/chat-db.js
View file @
b977262b
...
...
@@ -118,6 +118,15 @@ CHAT_DB.getMyGroupShopMemberByName = function(shopMemberName) {
}
};
CHAT_DB
.
getMyGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupShopMemberNotInRoomByName
(
shopMemberName
));
}
};
CHAT_DB
.
getAllGroupShopMemberByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
...
...
@@ -127,6 +136,15 @@ CHAT_DB.getAllGroupShopMemberByName = function(shopMemberName) {
}
};
CHAT_DB
.
getAllGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getAllGroupShopMemberNotInRoomByName
(
shopMemberName
));
}
};
CHAT_DB
.
getGroupByName
=
function
(
groupName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
...
...
public_new/js/chat-ui.js
View file @
b977262b
...
...
@@ -565,12 +565,14 @@ CHAT_UI.scrollToLastMarkedUnseen = function(value) {
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
=
function
()
{
$
(
'.loading-indicator'
).
css
(
'display'
,
'block'
);
var
h
=
$
(
window
).
height
();
$
(
'#loader-bg ,#loader'
).
height
(
h
).
css
(
'display'
,
'block'
);
}
//loadingIndicatorを表示しない
CHAT_UI
.
dismissLoadingIndicator
=
function
()
{
$
(
'.loading-indicator'
).
css
(
'display'
,
'none'
);
var
h
=
$
(
window
).
height
();
$
(
'#loader-bg ,#loader'
).
height
(
h
).
css
(
'display'
,
'none'
);
}
//画面の方向をcheck
...
...
@@ -892,9 +894,7 @@ $('#chatButton').on('click', function(event) {
CHAT_UI
.
refreshContactScreen
=
function
()
{
CHAT_UI
.
showLoadingIndicator
();
$
(
".modal-backdrop"
).
remove
();
$
(
'#myProfileModal'
).
html
(
''
);
$
(
'#userProfileModal'
).
html
(
''
);
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#favoriteList'
).
html
(
''
);
$
(
'#myGroupList'
).
html
(
''
);
//画面タイトル設定
...
...
@@ -997,6 +997,8 @@ CHAT_UI.refreshContactScreen = function() {
}
CHAT_UI
.
refreshRoomList
=
function
(
roomType
)
{
CHAT_UI
.
showLoadingIndicator
();
console
.
log
(
'START'
);
if
(
roomType
==
chatRoomType
.
DM
)
{
$
(
'#tabDM'
).
prop
(
'checked'
,
true
);
}
else
{
...
...
@@ -1085,7 +1087,8 @@ CHAT_UI.refreshRoomList = function(roomType) {
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".chat_list"
).
removeClass
(
"col-12"
).
addClass
(
"col-6"
);
}
console
.
log
(
'DONE'
);
CHAT_UI
.
dismissLoadingIndicator
();
};
CHAT_UI
.
joinRoom
=
function
(
roomId
,
roomName
)
{
...
...
@@ -1360,17 +1363,13 @@ CHAT_UI.refreshAllGroupSearch = function(groupId) {
groupPathTemplate
=
text
;
});
var
groupPathCount
=
0
;
result
.
groupPathList
.
forEach
(
function
(
groupPath
)
{
if
(
!
(
groupPathCount
<
(
result
.
groupPathList
.
length
-
3
)))
{
let
html
=
Mustache
.
render
(
groupPathTemplate
,
{
name
:
groupPath
.
groupName
,
id
:
groupPath
.
groupId
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'#groupPathArea'
).
append
(
obj
);
}
groupPathCount
++
;
})
//該当グループの下位グループ表示。
...
...
public_new/js/chat.js
View file @
b977262b
...
...
@@ -336,6 +336,16 @@ $(function() {
});
});
$
(
'#chat_add_user .search_form .cancel'
).
click
(
function
(){
CHAT
.
globalSelectedUserList
.
forEach
(
function
(
userId
)
{
if
(
$
(
'.checkbox'
+
userId
).
prop
(
'checked'
))
{
$
(
'.checkbox'
+
checkMemberId
).
attr
(
'checked'
,
true
);
}
else
{
$
(
'.checkbox'
+
checkMemberId
).
removeAttr
(
'checked'
);
}
});
});
// チャットメンバー検索
$
(
'#chat .search_form input[type="search"]'
).
keyup
(
function
(){
$
(
'.overlay_src_msg'
).
empty
();
...
...
@@ -399,16 +409,6 @@ $(function() {
$
(
'.overlay_src_msg'
).
html
(
data
);
})
});
// ユーザー招待メンバー検索
$
(
'#chat_add_user .search_form input[type="search"]'
).
keyup
(
function
(){
$
.
ajax
({
url
:
'search_message_user_list.html'
,
type
:
'POST'
,
datatype
:
'html'
}).
done
(
function
(
data
)
{
$
(
'.overlay_src_msg'
).
html
(
data
);
})
});
// チャットルーム
// メッセージ検索イベント
...
...
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