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
a06fafcc
Commit
a06fafcc
authored
Apr 16, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初対画面バグ修正
parent
e22d4630
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
7 deletions
+139
-7
public_new/chat_add_user.html
+4
-4
public_new/css/chat.css
+5
-0
public_new/js/chat-db.js
+9
-0
public_new/js/chat-ui.js
+118
-1
public_new/js/common.js
+3
-2
No files found.
public_new/chat_add_user.html
View file @
a06fafcc
...
...
@@ -53,10 +53,10 @@
<!-- タブ -->
<div
class=
"content tabs"
>
<input
id=
"tabMyGroupOn
MakeRoom
"
type=
"radio"
name=
"tab_item"
checked
>
<label
class=
"tab_item"
for=
"tabMyGroupOn
MakeRoom
"
>
マイグループ
</label>
<input
id=
"tabAllGroupOn
MakeRoom
"
type=
"radio"
name=
"tab_item"
>
<label
class=
"tab_item"
for=
"tabAllGroupOn
MakeRoom
"
>
全グループ
</label>
<input
id=
"tabMyGroupOn
AddUser
"
type=
"radio"
name=
"tab_item"
checked
>
<label
class=
"tab_item"
for=
"tabMyGroupOn
AddUser
"
>
マイグループ
</label>
<input
id=
"tabAllGroupOn
AddUser
"
type=
"radio"
name=
"tab_item"
>
<label
class=
"tab_item"
for=
"tabAllGroupOn
AddUser
"
>
全グループ
</label>
<div
class=
"tab_content"
id=
"tab1_content"
>
<div
class=
"chat_list"
>
<!-- お気に入りグループ -->
...
...
public_new/css/chat.css
View file @
a06fafcc
...
...
@@ -41,6 +41,11 @@ input[name="tab_item"] {
display
:
block
;
}
#tabMyGroupOnAddUser
:checked
~
#tab1_content
,
#tabAllGroupOnAddUser
:checked
~
#tab2_content
{
display
:
block
;
}
#tabMyGroup
:checked
~
#tab1_content
,
#tabAllGroup
:checked
~
#tab2_content
{
display
:
block
;
...
...
public_new/js/chat-db.js
View file @
a06fafcc
...
...
@@ -101,6 +101,15 @@ CHAT_DB.getGroupInfo = function(groupId) {
}
};
CHAT_DB
.
getGroupInfoForAddUser
=
function
(
groupId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO getGroupInfoの処理でユーザ情報にルーム参加者が入ってない処理。
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupInfoForAddUser
(
groupId
));
}
};
CHAT_DB
.
loadSelectedUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getSelectedUserList"
,
{}));
...
...
public_new/js/chat-ui.js
View file @
a06fafcc
...
...
@@ -206,7 +206,7 @@ CHAT_UI.sendMessage = function(e) {
,
0
);
}
$
(
'.message_input_
group
'
).
focus
();
$
(
'.message_input_
form
'
).
focus
();
}
//メッセージ送信
$
(
'#messageInput'
).
on
(
'keypress'
,
function
(
event
)
{
...
...
@@ -1316,6 +1316,13 @@ $('#tabAllGroupOnMakeRoom').on('click', function(e) {
CHAT_UI
.
refreshAllGroupForMakeRoom
(
'0'
);
});
$
(
'#tabMyGroupOnAddUser'
).
on
(
'click'
,
function
(
e
)
{
CHAT_UI
.
refreshMyGroupForAddUser
();
});
$
(
'#tabAllGroupOnAddUser'
).
on
(
'click'
,
function
(
e
)
{
CHAT_UI
.
refreshAllGroupForAddUser
(
'0'
);
});
$
(
'#makeRoomConfirmBtn'
).
on
(
'click'
,
function
(
e
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
saveSelectedUserList
(
CHAT
.
globalSelectedUserList
.
join
(
","
));
...
...
@@ -2202,6 +2209,116 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
})
}
CHAT_UI
.
refreshAllGroupForAddUser
=
function
(
paramGroupId
)
{
var
groupId
=
paramGroupId
;
$
(
'.cancel'
).
addClass
(
'none'
);
$
(
'.search_form input'
).
removeClass
(
'focus'
);
$
(
'.search_form input'
).
val
(
''
);
$
(
'.search_form form'
).
removeClass
();
$
(
'.content'
).
removeClass
(
'none'
);
$
(
'.overlay_src_msg'
).
empty
();
$
(
'#tabAllGroupOnAllUser'
).
prop
(
'checked'
,
true
);
//オンライン状態であればサーバから情報更新。
if
(
IS_ONLINE
==
'true'
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
updateGroupInfo
(
groupId
);
}
else
{
webkit
.
messageHandlers
.
updateGroupInfo
.
postMessage
(
groupId
);
}
}
//画面エリアを初期化。
$
(
'#parentGroupBtnForMakeRoom'
).
off
();
$
(
'#rootGroupBtnForMakeRoom'
).
off
();
$
(
'#childGroupListAreaForMakeRoom'
).
html
(
''
);
$
(
'#userInGroupListForMakeRoom'
).
html
(
''
);
$
(
'#groupPathAreaForMakeRoom'
).
html
(
''
);
//DBからグループ情報を取得。
var
result
=
CHAT_DB
.
getGroupInfoForAddUser
(
groupId
);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
'undefined'
)
{
$
(
'#parentGroupBtnForMakeRoom'
).
on
(
'click'
,
function
()
{
CHAT_UI
.
refreshAllGroupForAddUser
(
result
.
parentGroupId
);
});
}
if
(
typeof
result
.
rootGroupId
!==
'undefined'
)
{
if
(
paramGroupId
==
0
)
{
groupId
=
result
.
rootGroupId
}
$
(
'#rootGroupBtnForMakeRoom'
).
on
(
'click'
,
function
()
{
CHAT_UI
.
refreshAllGroupForAddUser
(
result
.
rootGroupId
);
});
}
if
(
groupId
==
result
.
rootGroupId
||
paramGroupId
==
'0'
)
{
$
(
'#rootGroupArea'
).
addClass
(
'none'
);
$
(
'#parentGroupArea'
).
addClass
(
'none'
);
}
else
{
$
(
'#rootGroupArea'
).
removeClass
(
'none'
);
$
(
'#parentGroupArea'
).
removeClass
(
'none'
);
}
//該当グループのパースを表示。
var
groupPathTemplate
;
$
.
get
({
url
:
"./template/template_make_room_group_path.html"
,
async
:
false
}
,
function
(
text
)
{
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
);
$
(
'#groupPathAreaForMakeRoom'
).
append
(
obj
);
}
groupPathCount
++
;
})
//該当グループの下位グループ表示。
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_make_room_group_list.html"
,
async
:
false
}
,
function
(
text
)
{
groupTemplate
=
text
;
});
result
.
childGroupList
.
forEach
(
function
(
childGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
childGroup
.
groupName
,
id
:
childGroup
.
groupId
,
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
});
$
(
'#childGroupListAreaForMakeRoom'
).
append
(
obj
);
})
//該当グループの所属ユーザを表示。
var
userTemplate
;
$
.
get
({
url
:
"./template/template_make_room_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
result
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
groupUser
.
profileUrl
)
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
shopMemberId
)
{
return
shopMemberId
==
groupUser
.
shopMemberId
;
})
if
(
findObj
)
{
groupUser
.
checked
=
'checked'
;
}
})
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
result
.
groupUserList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'#userInGroupListForMakeRoom'
).
append
(
obj
);
};
CHAT_UI
.
refreshForOnline
=
function
()
{
IS_ONLINE
=
'true'
;
$
(
'.craeteRoomButton'
).
show
();
...
...
public_new/js/common.js
View file @
a06fafcc
...
...
@@ -46,7 +46,7 @@ $(function() {
$
(
'.craeteRoomButton'
).
removeClass
(
'none'
);
});
$
(
'.message_input_form'
).
click
(
function
(
){
$
(
'.message_input_form'
).
on
(
'focus'
,
function
(
e
){
$
(
'.message_input_send'
).
removeClass
(
'none'
);
$
(
'.attach_file'
).
addClass
(
'none'
);
$
(
'.footer_content_b'
).
addClass
(
'none'
);
...
...
@@ -55,9 +55,10 @@ $(function() {
$
(
'.message_input_form'
).
on
(
'focusout'
,
function
(
e
){
if
(
$
(
e
.
relatedTarget
).
hasClass
(
'message_input_send'
)){
CHAT_UI
.
sendMessage
();
}
}
else
{
$
(
'.message_input_send'
).
addClass
(
'none'
);
$
(
'.attach_file'
).
removeClass
(
'none'
);
$
(
'.footer_content_b'
).
removeClass
(
'none'
);
}
});
});
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