Commit 94af1176 by Kim Peace

Fixed contact screen

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