Commit 94af1176 by Kim Peace

Fixed contact screen

parent ffa0c90b
...@@ -143,14 +143,9 @@ ...@@ -143,14 +143,9 @@
</script> </script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
ArchiveUI.refreshArchiveScreen(); ArchiveUI.refreshArchiveScreen();
</script> </script>
</body> </body>
......
...@@ -126,10 +126,6 @@ ...@@ -126,10 +126,6 @@
<script src="./js/views/chats/chat-list.js"></script> <script src="./js/views/chats/chat-list.js"></script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
if (deviceInfo.isAndroid()) { if (deviceInfo.isAndroid()) {
......
...@@ -156,10 +156,6 @@ ...@@ -156,10 +156,6 @@
<script src="./js/common/loading.js"></script> <script src="./js/common/loading.js"></script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
const selectedUsers = NativeBridgeDataSource.loadSelectedUsers(); const selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
if (selectedUsers != "") { if (selectedUsers != "") {
selectedUsers.forEach(function (user) { selectedUsers.forEach(function (user) {
......
...@@ -85,12 +85,7 @@ ...@@ -85,12 +85,7 @@
<script src="./js/common/loading.js"></script> <script src="./js/common/loading.js"></script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
ChatManagementCommon.showAddUserConfirmView(); ChatManagementCommon.showAddUserConfirmView();
</script> </script>
</body> </body>
......
...@@ -84,11 +84,7 @@ ...@@ -84,11 +84,7 @@
<script src="./js/views/chats/management/chat-room-change.js"></script> <script src="./js/views/chats/management/chat-room-change.js"></script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
let roomId = 0; let roomId = 0;
</script> </script>
</body> </body>
......
...@@ -157,10 +157,6 @@ ...@@ -157,10 +157,6 @@
<script src="./js/common/loading.js"></script> <script src="./js/common/loading.js"></script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
if (NativeBridgeDataSource.loadSelectedUsers() != "") { if (NativeBridgeDataSource.loadSelectedUsers() != "") {
let selectedUsers = NativeBridgeDataSource.loadSelectedUsers(); let selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
selectedUsers.forEach(function (user) { selectedUsers.forEach(function (user) {
......
...@@ -92,10 +92,6 @@ ...@@ -92,10 +92,6 @@
<script src="./js/common/loading.js"></script> <script src="./js/common/loading.js"></script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
ChatManagementCommon.showMakeRoomConfirmView(); ChatManagementCommon.showMakeRoomConfirmView();
$("#newRoomName").attr("placeholder", getLocalizedString("newRoomName")); $("#newRoomName").attr("placeholder", getLocalizedString("newRoomName"));
......
...@@ -178,10 +178,6 @@ ...@@ -178,10 +178,6 @@
$('#pictureModalCenter').modal('show'); $('#pictureModalCenter').modal('show');
} }
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
let androidVersion = 0; let androidVersion = 0;
$("#pictureModal").load("./modal_chat_picture.html"); $("#pictureModal").load("./modal_chat_picture.html");
$("#chatMenuModal").load("./modal_chat_menu.html"); $("#chatMenuModal").load("./modal_chat_menu.html");
......
...@@ -208,10 +208,6 @@ ...@@ -208,10 +208,6 @@
function startPipMode() { function startPipMode() {
NativeBridgeDelegate.startPIPMode(); NativeBridgeDelegate.startPIPMode();
} }
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
</script> </script>
</body> </body>
......
...@@ -201,13 +201,10 @@ ...@@ -201,13 +201,10 @@
<script src="./js/Models/userinfo.js"></script> <script src="./js/Models/userinfo.js"></script>
<!-- View --> <!-- View -->
<script src="./js/views/contact/contact.js"></script> <script src="./js/views/contact/contact.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script src="./js/common/loading.js"></script> <script src="./js/common/loading.js"></script>
<script> <script>
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
const groupID = NativeBridgeDataSource.getToMoveGroupId(); const groupID = NativeBridgeDataSource.getToMoveGroupId();
......
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
function includeJs(jsFilePath) { function includeJs(jsFilePath) {
var js = document.createElement("script"); var js = document.createElement("script");
......
...@@ -33,7 +33,7 @@ NativeBridgeDataSource.addFavoriteGroup = function (groupID) { ...@@ -33,7 +33,7 @@ NativeBridgeDataSource.addFavoriteGroup = function (groupID) {
return android.addFavoriteGroup(groupID); return android.addFavoriteGroup(groupID);
} else { } else {
const result = callNativeApp(NATIVE_KEY_IOS.addFavoriteGroup, { const result = callNativeApp(NATIVE_KEY_IOS.addFavoriteGroup, {
groupId: groupId, groupId: groupID,
}); });
if (result == "true") { if (result == "true") {
return true; return true;
......
...@@ -3,10 +3,10 @@ var Contact = {}; ...@@ -3,10 +3,10 @@ var Contact = {};
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
// メンバー検索 // メンバー検索
bindMemeberSearch(); Contact.bindMemeberSearch();
// iOSキーボード変換検知用 // iOSキーボード変換検知用
bindiOSKeyBoardEvent(); Contact.bindiOSKeyBoardEvent();
}); });
// ユーザー検索 // ユーザー検索
...@@ -20,18 +20,18 @@ Contact.searchUser = function (keyword) { ...@@ -20,18 +20,18 @@ Contact.searchUser = function (keyword) {
if (isAllGroup) { if (isAllGroup) {
//グループデータ検索 //グループデータ検索
const groupList = NativeBridgeDataSource.getGroupByName(keyword); const groupList = NativeBridgeDataSource.getGroupByName(keyword);
appendGroupList(groupList); Contact.appendGroupList(groupList);
//ユーザデータ検索 //ユーザデータ検索
const userList = const userList =
NativeBridgeDataSource.getAllGroupShopMemberByName(keyword); NativeBridgeDataSource.getAllGroupShopMemberByName(keyword);
appendUserList(userList); Contact.appendUserList(userList);
hasNoData = userList.length == 0 && groupList.length == 0; hasNoData = userList.length == 0 && groupList.length == 0;
//連絡先画面 //連絡先画面
} else { } else {
const userList = NativeBridgeDataSource.getMyGroupShopMemberByName(keyword); const userList = NativeBridgeDataSource.getMyGroupShopMemberByName(keyword);
appendUserList(userList); Contact.appendUserList(userList);
hasNoData = userList.length == 0; hasNoData = userList.length == 0;
} }
...@@ -44,7 +44,7 @@ Contact.searchUser = function (keyword) { ...@@ -44,7 +44,7 @@ Contact.searchUser = function (keyword) {
/** UTILS */ /** UTILS */
var bindiOSKeyBoardEvent = function () { Contact.bindiOSKeyBoardEvent = function () {
const searchInput = $('#contact .search_form input[type="search"]'); const searchInput = $('#contact .search_form input[type="search"]');
searchInput.on("compositionend", function () { searchInput.on("compositionend", function () {
if (deviceInfo.isiOS()) { if (deviceInfo.isiOS()) {
...@@ -54,7 +54,7 @@ var bindiOSKeyBoardEvent = function () { ...@@ -54,7 +54,7 @@ var bindiOSKeyBoardEvent = function () {
}); });
}; };
var bindMemeberSearch = function () { Contact.bindMemeberSearch = function () {
const searchInput = $('#contact .search_form input[type="search"]'); const searchInput = $('#contact .search_form input[type="search"]');
searchInput.keyup(function (e) { searchInput.keyup(function (e) {
const keyword = searchInput.val(); const keyword = searchInput.val();
...@@ -79,7 +79,7 @@ var bindMemeberSearch = function () { ...@@ -79,7 +79,7 @@ var bindMemeberSearch = function () {
}); });
}; };
var appendGroupList = function (groupList) { Contact.appendGroupList = function (groupList) {
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST); const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
groupList.forEach(function (group) { groupList.forEach(function (group) {
...@@ -95,7 +95,7 @@ var appendGroupList = function (groupList) { ...@@ -95,7 +95,7 @@ var appendGroupList = function (groupList) {
}); });
}; };
var renderGroupList = function (url, groupName, groupID, isFavorite) { Contact.renderGroupList = function (url, groupName, groupID, isFavorite) {
return Mustache.render(url, { return Mustache.render(url, {
name: groupName, name: groupName,
id: groupID, id: groupID,
...@@ -103,17 +103,17 @@ var renderGroupList = function (url, groupName, groupID, isFavorite) { ...@@ -103,17 +103,17 @@ var renderGroupList = function (url, groupName, groupID, isFavorite) {
}); });
}; };
var appendUserList = function (userList) { Contact.ppendUserList = 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); var userTemplate = getTemplate(TemplateURL.USER_LIST);
let html = renderUserList(userTemplate, userList); let html = Contact.renderUserList(userTemplate, userList);
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$(".overlay_src_msg").append(obj); $(".overlay_src_msg").append(obj);
}; };
var renderUserList = function (url, userList) { Contact.renderUserList = function (url, userList) {
return Mustache.render(url, { return Mustache.render(url, {
userList: userList, userList: userList,
}); });
...@@ -177,7 +177,7 @@ Contact.appendFavoritGroupList = function () { ...@@ -177,7 +177,7 @@ Contact.appendFavoritGroupList = function () {
// グループの様式を読み込む // グループの様式を読み込む
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST); const groupTemplate = getTemplate(TemplateURL.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,
...@@ -282,7 +282,7 @@ Contact.refreshAllGroupSearch = function (paramGroupId) { ...@@ -282,7 +282,7 @@ Contact.refreshAllGroupSearch = function (paramGroupId) {
const result = NativeBridgeDataSource.getGroupInfo(groupId); const result = NativeBridgeDataSource.getGroupInfo(groupId);
Contact.bindGroupCellClick( Contact.bindGroupCellClick(
result.paramGroupId, result.parentGroupId,
result.rootGroupId, result.rootGroupId,
paramGroupId, paramGroupId,
groupId groupId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment