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
a0daedff
Commit
a0daedff
authored
Apr 26, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iosで2バイト文字で検索できないバグを修正
parent
e19ac453
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
102 deletions
+151
-102
public_new/js/archive.js
+8
-2
public_new/js/chat-add-user.js
+28
-12
public_new/js/chat.js
+0
-0
public_new/js/chatMakeRoom.js
+35
-24
public_new/js/contact.js
+80
-64
No files found.
public_new/js/archive.js
View file @
a0daedff
...
...
@@ -4,8 +4,6 @@ var ARCHIVE_UI = {};
$
(
function
()
{
// アーカイブ検索
$
(
'#archive .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
var
keyword
=
$
(
'#archive .search_form input[type="search"]'
).
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
if
(
keyword
.
length
!=
0
&&
keyword
!=
''
)
{
...
...
@@ -26,6 +24,14 @@ $(function() {
}
// 検索結果を表示
});
// iOSキーボード変換検知用
$
(
'#archive .search_form input[type="search"]'
).
on
(
'compositionend'
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
var
keyword
=
$
(
'#archive .search_form input[type="search"]'
).
val
();
$
(
'.overlay_src_msg'
).
empty
();
ARCHIVE_UI
.
refreshSearchScreen
(
keyword
);
}
});
});
ARCHIVE_UI
.
refreshSearchScreen
=
function
(
keyword
)
{
...
...
public_new/js/chat-add-user.js
View file @
a0daedff
// 名前空間
var
CHAT_ADD_USER
=
{};
$
(
function
()
{
// メンバー検索
$
(
'#chat_add_user .search_form input[type="search"]'
).
click
(
function
(
e
){
...
...
@@ -7,20 +10,38 @@ $(function() {
})
$
(
'#chat_add_user .search_form input[type="search"]'
).
keyup
(
function
(
e
){
var
keyword
=
$
(
'#chat_add_user .search_form input[type="search"]'
).
val
();
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#chat_add_user .search_form input[type="search"]'
).
blur
();
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'#chat_add_user .search_form input[type="search"]'
).
blur
();
return
false
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
false
;
}
CHAT_ADD_USER
.
searchUser
(
keyword
);
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#chat_add_user .search_form input[type="search"]'
).
blur
();
return
;
}
});
// iOSキーボード変換検知用
$
(
'#chat_add_user .search_form input[type="search"]'
).
on
(
'compositionend'
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
var
keyword
=
$
(
'#chat_add_user .search_form input[type="search"]'
).
val
();
CHAT_ADD_USER
.
searchUser
(
keyword
);
}
});
});
// ユーザー検索
CHAT_ADD_USER
.
searchUser
=
function
(
keyword
)
{
var
isAllGroup
=
$
(
'#tabAllGroupOnAddUser'
).
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
;
...
...
@@ -67,10 +88,6 @@ $(function() {
}
//連絡先画面
}
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
}
...
...
@@ -97,5 +114,4 @@ $(function() {
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
}
});
});
};
public_new/js/chat.js
View file @
a0daedff
This diff is collapsed.
Click to expand it.
public_new/js/chatMakeRoom.js
View file @
a0daedff
$
(
function
()
{
// メンバー検索
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
click
(
function
(
e
)
{
let
contactListTitle
=
getLocalizedString
(
"userSearch"
);
$
(
'#makeRoomTitle'
).
text
(
contactListTitle
);
});
// 名前空間
var
CHAT_MAKE_ROOM
=
{};
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
//画面タイトル設定
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
$
(
function
()
{
// メンバー検索
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
click
(
function
(
e
)
{
let
contactListTitle
=
getLocalizedString
(
"userSearch"
);
$
(
'#makeRoomTitle'
).
text
(
contactListTitle
);
});
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
//画面タイトル設定
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
return
false
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
false
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
false
;
}
CHAT_MAKE_ROOM
.
searchUser
(
keyword
);
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
return
;
}
});
// iOSキーボード変換検知用
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
on
(
'compositionend'
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
CHAT_MAKE_ROOM
.
searchUser
(
keyword
);
}
});
});
// メンバー検索
CHAT_MAKE_ROOM
.
searchUser
=
function
(
keyword
)
{
var
isAllGroup
=
$
(
'#tabAllGroupOnMakeRoom'
).
is
(
':checked'
);
$
(
'.overlay_src_msg'
).
empty
();
...
...
@@ -95,11 +112,5 @@ $(function() {
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
}
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
return
;
}
});
});
}
public_new/js/contact.js
View file @
a0daedff
// 名前空間
var
CONTACT
=
{};
$
(
function
()
{
// メンバー検索
$
(
'#contact .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
var
groupList
;
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
...
...
@@ -12,73 +14,87 @@ $(function () {
$
(
'.overlay_src_msg'
).
empty
();
return
;
}
$
(
'.overlay_src_msg'
).
empty
();
var
isAllGroup
=
$
(
'#tabAllGroup'
).
is
(
':checked'
);
//全グループ検索画面
if
(
isAllGroup
)
{
//グループデータ検索
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
,
function
(
text
)
{
groupTemplate
=
text
;
});
CONTACT
.
searchUser
(
keyword
);
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
}
});
// iOSキーボード変換検知用
$
(
'#contact .search_form input[type="search"]'
).
on
(
'compositionend'
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
CONTACT
.
searchUser
(
keyword
);
}
});
});
groupList
.
forEach
(
function
(
group
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
group
.
groupName
,
id
:
group
.
groupId
,
isFavorite
:
group
.
isFavorite
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
})
// ユーザー検索
CONTACT
.
searchUser
=
function
(
keyword
)
{
var
groupList
;
$
(
'.overlay_src_msg'
).
empty
();
var
isAllGroup
=
$
(
'#tabAllGroup'
).
is
(
':checked'
);
//ユーザデータ検索
var
userList
=
CHAT_DB
.
getAllGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
//全グループ検索画面
if
(
isAllGroup
)
{
//グループデータ検索
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
,
function
(
text
)
{
groupTemplate
=
text
;
});
groupList
.
forEach
(
function
(
group
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
group
.
groupName
,
id
:
group
.
groupId
,
isFavorite
:
group
.
isFavorite
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
if
(
userList
.
length
==
0
&&
groupList
.
length
==
0
)
{
const
noResultMsg
=
$
(
'<div/>'
,{
width
:
'auto'
,
style
:
'text-align: center'
});
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
//連絡先画面
}
else
{
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
html
(
obj
);
if
(
userList
.
length
==
0
)
{
const
noResultMsg
=
$
(
'<div/>'
,{
width
:
'auto'
,
style
:
'text-align: center'
});
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
})
//ユーザデータ検索
var
userList
=
CHAT_DB
.
getAllGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
if
(
userList
.
length
==
0
&&
groupList
.
length
==
0
)
{
const
noResultMsg
=
$
(
'<div/>'
,{
width
:
'auto'
,
style
:
'text-align: center'
});
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
//連絡先画面
}
else
{
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
html
(
obj
);
if
(
userList
.
length
==
0
)
{
const
noResultMsg
=
$
(
'<div/>'
,{
width
:
'auto'
,
style
:
'text-align: center'
});
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
}
);
}
)
;
}
};
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