Commit 5aeec968 by Lee Munkyeong

連絡先画面デザイン適用中

parent 40227def
......@@ -28,7 +28,7 @@
</div>
<div class="col-4 p-0">
<div class="nav-item p-0">
<h1 class="nav-ttl">コンタクト</h1>
<h1 class="nav-ttl" id="title" >コンタクト</h1>
</div>
</div>
<div class="col-4 pl-0">
......@@ -48,7 +48,28 @@
<a href="#" class="cancel none">キャンセル</a>
</form>
</div>
<div class="chat_list">
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center">
<a href="#" data-toggle="modal" data-target="#myNameCard" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img id="myImg" src="img/noImage.png" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl" id="myName"></span>
</div>
</div>
</div>
</div>
</a>
</li>
</ul>
</div>
<!-- タブ -->
<div class="content tabs">
<input id="tab1" type="radio" name="tab_item" checked>
......@@ -418,13 +439,51 @@
</footer>
<!-- ローディング -->
<!--#include virtual="loading.html" -->
<div id="loadingArea"></div>
<div id="myProfileModal"></div>
<div id="userProfileModal"></div>
<script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.js"></script>
<script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.js" charset="UTF-8"></script>
<script src="./js/libs/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/contact.js"></script>
<script src="./js/common.js"></script>
<script src="./js/language.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script>
<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/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>
String.prototype.replaceAll = function(org, dest) {
return this.split(org).join(dest);
}
let CHAT_SERVER_URL = '';
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
$("#loadingArea").load("./loading.html");
android.getLoginParameter();
android.getGlobalParameter();
<script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.js"></script>
<script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/contact.js"></script>
<script src="./js/common.js"></script>
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
CHAT_UI.refreshContactScreen();
};
</script>
</body>
</html>
// 名前空間
var CHAT_DB = {};
//ロカールDBからルーム一覧情報を取得
CHAT_DB.getRoomList = function(roomType) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getRoomList(roomType));
}
};
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB.getMyInfo = function(input) {
var result = JSON.parse(android.getMyInfo());
CHAT.globalLoginParameter.shopMemberId = result.shopMemberId;
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return result;
}
};
CHAT_DB.getMessages = function(roomId) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMessageList(roomId));
}
};
CHAT_DB.getFavoriteUsers = function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteUsers());
}
};
CHAT_DB.getFavoriteGroups = function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteGroups());
}
};
CHAT_DB.getMyGroupUsers = function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupUsers());
}
};
CHAT_DB.getGroupInfo = function(groupId) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getGroupInfo(groupId));
}
};
CHAT_DB.getNameCardData = function(shopMemberId) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getNameCardData(shopMemberId));
}
};
\ No newline at end of file
jQuery('#homeButton').on('click', function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要。
} else if (CHAT_UTIL.isAndroid()) {
android.goHome();
}
});
jQuery('#reloadButton').on('click', function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要。
} else if (CHAT_UTIL.isAndroid()) {
android.reload();
}
});
\ No newline at end of file
// 名前空間
var CHAT_UTIL = {};
CHAT_UTIL.isAndroid = function() {
return PLATFORM == 'android';
};
CHAT_UTIL.isIOS = function() {
return PLATFORM == 'ios';
};
CHAT_UTIL.isMobile = function() {
return IS_MOBILE == 'true';
};
CHAT_UTIL.formatDate = function(date) {
const REFERENCE = moment();
const TODAY = REFERENCE.clone().startOf('day');
let createdAt = moment(date);
if (date.length == 14) {
createdAt = moment(date,'YYYYMMDDhhmmss');
} else {
createdAt = moment(date);
}
// #36171
const createdAtDay = createdAt.format('MMM Do');
const createdAtTime = createdAt.format('HH:mm');
if (createdAt.isSame(TODAY, 'd')) {
createdAt = createdAtTime;
} else {
createdAt = createdAtDay;
}
let rntDate = new Object();
rntDate.createdAtDay = createdAtDay;
rntDate.createdAtTime = createdAtTime;
rntDate.createdAt = createdAt;
return rntDate;
}
CHAT_UTIL.htmlDecode = function(input) {
var e = document.createElement('textarea');
e.innerHTML = input;
// handle case of empty input
return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
}
//generates a unique id, not obligator a UUID
CHAT_UTIL.generateUUID = function() {
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c=='x' ? r : (r&0x3|0x8)).toString(16);
});
return uuid;
};
......@@ -16,3 +16,17 @@ const messageType = {
SYSTEM : 3 ,
COMMUNICATION : 4
}
const userAPICmd = {
MYINFO : 9
}
const chatRoomType = {
DM : "1",
GROUP : "0"
}
const nameCardAreaId = {
MY : "myNamecard",
USER : "userNamecard"
}
\ No newline at end of file
$.lang = {};
//default set
$.lang.currentLang = "en"
function setLanguage(language) {
if(language.indexOf("ja") > -1) {
$.lang.currentLang = "ja"
} else if(language.indexOf("ko") > -1) {
$.lang.currentLang = "ko"
} else {
$.lang.currentLang = "en"
}
}
function getLocalizedString(stringKey, ...args)
{
let string = $.lang[$.lang.currentLang][stringKey];
if(args.length > 0) {
if(args.length == 1) {
string = string.replace("%@", args[0])
} else {
string = string.replace("%@", args.join($.lang[$.lang.currentLang].userListDivideString))
}
}
return string
}
$.lang.en = {
"chat_placeholder":"Type message",
"chat_search_placeholder":" Search Message",
"room_search_placeholder":" Search Room",
"participants":"Member List",
"exitRoom":"Exit ",
"roomListTitle":"Room List",
"deleteRoomTitle":"Delete Room",
"inviteUsersButton":"invite",
"inviteUsersTitle":"Invite Member",
"createRoomTitle":"Create Room",
"createRoomSubtitle":"Room Name",
"inviteUsersSubtitle":"Invite User",
"roomListEmptyString":"There is no room available.",
"invitedUser":"Invited Users",
"left":"%@ has left",
"join":"%@ has joined",
"added":"%@ has been invited",
"welcome":"Welcome to %@",
"userListDivideString":", ",
"orderByTime":"OrderByTime",
"orderByUnread":"OrderByUnread",
"roomKeywordPlaceHolder":"Search",
"okayLabel":"Okay!",
"completeLabel":"Complete.",
"thankLabel":"Thank you",
"startToWorkLabel":"Start to work",
"groupListKeyword":"Search",
"userSearch":"User Search",
"groupSearch":"Group Search",
"groupPageSubtitle":"Groups",
"noMessages":"No Messages",
"image":"Image",
"chatKeyword":"Search",
"userListKeyword":"Search",
"newRoomName":"Please input Room Name",
"everyoneIsHere":"Everyone is in the chat.",
"people":"people",
"searchResult":"Results",
"searchRoomListEmptyString":"No search results.",
"inputRoomName":"Please enter a room name.",
"exitRoomTitle":"Do you want to leave this room?",
"roomDeleteTitle":"Do you want to delete this room?",
"roomDelete":"Delete",
"cancelTitle":"No",
"yesTitle":"Yes",
"invalidCharacter":"The character ;/?:@&amp;=+$,-_.!~*\'()#\\\"` cannot be included in the roomname.",
"nameTooLong":"Please enter room name less than 20 characters.",
"errorDisconnected":"Disconnected from the server.",
"errorConnect":"There was a problem with the network.\n Please check the connection status of the network.",
"errorRoomNotFound":"This chat room has already been deleted.",
"serverErrorOccured":"App will not be able to communicate with the server. \n After a few moments, please try again.",
"memberDeleteTitle":"Do you want to remove selected members from the list?",
"photo":"Photo",
"video":"Video",
"contactListTitle":"Contact",
"contactSearch":"Contact search",
"directMessageChatRoom":"DM",
"favorite":"Favorite List",
"mygroup":"My Group",
"groupChatRoom":"Group",
"myGroup":"My Group",
"allGroup":"All Group",
"returnToRootGroup":"Return to Root Group",
"returnToParentGroup":"Return to Parent Group",
"quickBtn":"Quick Button",
"groupPath":"Group Path",
"childGroup":"Minor Group",
"groupUser":" Member List",
"chat":"Chat",
"voice":"Call",
"addFavorite":"Add Favorite"
}
$.lang.ja = {
"chat_placeholder":"メッセージを入力",
"chat_search_placeholder":" メッセージ検索",
"room_search_placeholder":" ルーム検索",
"participants":"メンバーリスト",
"exitRoom":"退出 ",
"roomListTitle":"ルーム一覧",
"deleteRoomTitle":"ルーム削除",
"inviteUsersButton":"招待",
"inviteUsersTitle":"メンバー追加",
"createRoomTitle":"ルーム開設",
"createRoomSubtitle":"ルーム名",
"inviteUsersSubtitle":"ユーザ招待",
"roomListEmptyString":"入場できるルームがありません。",
"left":"%@ 様が退場しました。",
"join":"%@ 様が入場しました。",
"added":"%@ 様を招待しました。",
"welcome":"%@ に入場しました。",
"userListDivideString":" 様, ",
"orderByTime":"新着順",
"orderByUnread":"未読優先",
"roomKeywordPlaceHolder":"検索",
"okayLabel":"了解しました。",
"completeLabel":"完了しました。",
"thankLabel":"ありがとうございます。",
"startToWorkLabel":"作業開始します。",
"userSearch":"ユーザー検索",
"groupSearch":"グループ検索",
"groupListKeyword":"検索",
"groupPageSubtitle":"グループ",
"noMessages":"メッセージがありません。",
"image":"画像",
"chatKeyword":"検索",
"userListKeyword":"検索",
"invitedUser":"参加者",
"newRoomName":"ルーム名を入力してください",
"everyoneIsHere":"招待可能なメンバーがいません。",
"people":"人",
"searchResult":"件のトーク",
"searchRoomListEmptyString":"検索結果がありません。",
"inputRoomName":"ルーム名を入力してください。",
"exitRoomTitle":"このチャットルームを出ますか?",
"roomDeleteTitle":"このチャットルームを削除しますか?",
"roomDelete":"削除",
"cancelTitle":"いいえ",
"yesTitle":"はい",
"invalidCharacter":"特殊文字 ;/?:@&amp;=+$,-_.!~*\'()#\\\"` はルーム名に含めることができません。",
"nameTooLong":"ルーム名は文字列20字以内に入力してください。",
"errorDisconnected":"接続が切れました。",
"errorConnect":"ネットワークに問題がありました。\nネットワークの接続状態を確認してください。",
"errorRoomNotFound":"既に削除されたチャットルームです。",
"serverErrorOccured":"サーバと通信できません。\nしばらく時間をおいて再度操作してください。",
"memberDeleteTitle":"選択したメンバーをリストから削除しますか?",
"photo":"写真",
"video":"動画",
"contactListTitle":"コンタクト",
"contactSearch":"コンタクト検索",
"directMessageChatRoom":"DM",
"favorite":"お気に入りリスト",
"mygroup":"マイグループ",
"groupChatRoom":"グループ",
"myGroup":"マイグループ",
"allGroup":"全グループ",
"returnToRootGroup":"トップグループに戻る",
"returnToParentGroup":"上位グループに戻る",
"quickBtn":"クイックボタン",
"groupPath":"グループパンクズ",
"childGroup":"下位グループ",
"groupUser":"所属ユーザ",
"chat":"チャット",
"voice":"通話",
"addFavorite":"お気に入り追加"
}
$.lang.ko = {
"chat_placeholder":"메시지를 입력하세요.",
"chat_search_placeholder":" 메세지검색",
"room_search_placeholder":" 채팅방 검색",
"participants":"멤버 리스트",
"exitRoom":"나가기 ",
"roomListTitle":"채팅 리스트",
"deleteRoomTitle":"채팅방 삭제",
"inviteUsersButton":"유저 초대",
"inviteUsersTitle":"대화상대 추가",
"createRoomTitle":"방 개설",
"createRoomSubtitle":"방 이름",
"inviteUsersSubtitle":"유저 초대",
"roomListEmptyString":"입장 가능한 방이 없습니다.",
"invitedUser":"참가자",
"left":"%@ 님이 방을 떠났습니다.",
"join":"%@ 님이 참가했습니다.",
"added":"%@ 님을 초대했습니다.",
"welcome":"%@ 에 입장했습니다.",
"userListDivideString":" 님, ",
"orderByTime":"최신순",
"orderByUnread":"안 읽은 순",
"roomKeywordPlaceHolder":"검색",
"okayLabel":"알겠습니다.",
"completeLabel":"작업이 끝났습니다.",
"thankLabel":"감사합니다.",
"startToWorkLabel":"작업을 시작합니다.",
"groupListKeyword":"검색",
"userSearch":"유저 검색",
"groupSearch":"그룹 검색",
"groupPageSubtitle":"그룹",
"noMessages":"메시지가 없습니다.",
"image":"이미지",
"chatKeyword":"검색",
"userListKeyword":"검색",
"newRoomName":"방 이름을 입력해주세요.",
"everyoneIsHere":"초대가능한 유저가 없습니다.",
"people":"명",
"searchResult":"건의 결과",
"searchRoomListEmptyString":"검색 결과가 없습니다.",
"inputRoomName":"방 제목을 입력해 주십시오.",
"exitRoomTitle":"이 채팅방을 나가시겠습니까?",
"roomDeleteTitle":"이 방을 삭제 하시겠습니까?",
"roomDelete":"삭제",
"cancelTitle":"아니오",
"yesTitle":"예",
"invalidCharacter":"특수문자 ;/?:@&amp;=+$,-_.!~*\'()#\\\"` 는 방 제목에 포함될 수 없습니다.",
"nameTooLong":"방 제목은 20자 이내로 입력해 주세요.",
"errorDisconnected":"서버와 접속이 끊어졌습니다.",
"errorConnect":"네트워크에 문제가 발생했습니다.\n네트워크 연결상태를 확인하여 주십시요.",
"errorRoomNotFound":"이미 삭제된 채팅룸입니다.",
"serverErrorOccured":"서버와 통신할 수 없습니다.\n잠시 후 다시 시도해보시기 바랍니다.",
"memberDeleteTitle":"목록에서 선택된 멤버를 삭제하시겠습니까?",
"photo":"사진",
"video":"동영상",
"contactListTitle":"연락처",
"contactSearch":"연락처 검색",
"directMessageChatRoom":"DM",
"favorite":"즐겨찾기리스트",
"mygroup":"마이그룹",
"groupChatRoom":"그룹",
"myGroup":"내그룹",
"allGroup":"전그룹",
"returnToRootGroup":"최상위그룹으로 돌아가기",
"returnToParentGroup":"상위그룹으로 돌아가기",
"quickBtn":"퀵버튼",
"groupPath":"그룹 경로",
"childGroup":"하위 그룹",
"groupUser":"소속 사용자",
"chat":"채팅",
"voice":"통화",
"addFavorite":"즐겨찾기추가"
}
<div class="modal fade profile_modal" id="myNameCard" tabindex="-1" role="dialog" aria-labelledby="myNameCard" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header border-0">
<div class="prifile_desc d-flex flex-row">
<img src="{{profileImage}}" alt="プロフィール画像">
<!--<div class="namedard-img-upload" >Upload</div>-->
<div class="prifile_name"><span>{{name}}</span></div>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
{{#groupPathList}}
<li><b>{{.}}</b></li>
{{/groupPathList}}
</div>
<div class="modal-footer border-0 justify-content-center">
<button type="button" class="border-0 bg_navy" style="width: 50%">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_photo.png" alt="プロフィール写真更新">
</div>
<span>プロフィール写真更新</span>
</div>
</button>
</div>
</div>
</div>
</div>
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center">
<a href="#" data-toggle="modal" data-target="#userNameCard" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="{{profileImage}}" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{name}}</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
</ul>
\ No newline at end of file
<div class="modal fade profile_modal" id="userNameCard" tabindex="-1" role="dialog" aria-labelledby="userNameCard" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header border-0">
<div class="prifile_desc d-flex flex-row">
<img src="{{profileImage}}" alt="プロフィール画像">
<div class="prifile_name"><span>{{name}}</span></div>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
{{#groupPathList}}
<li><b>{{.}}</b></li>
{{/groupPathList}}
</div>
<div class="modal-footer border-0 justify-content-center">
{{#isFavorite}}
<button type="button" class="border-0 bg_navy">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_favorite.png" alt="お気に入り">
</div>
<span>お気に入り解除</span>
</div>
</button>
{{/isFavorite}}
{{^isFavotire}}
<button type="button" class="border-0 bg_navy">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_favorite_white.png" alt="お気に入り">
</div>
<span>お気に入り登録</span>
</div>
</button>
{{/isFavorite}}
<button type="button" class="border-0 bg_green">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_phone.png" alt="通話">
</div>
<span>通話</span>
</div>
</button>
<button type="button" class="border-0 bg_blue">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_chat.png" alt="チャット">
</div>
<span>チャット</span>
</div>
</button>
</div>
</div>
</div>
</div>
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