Commit f779067b by Kim Peace

Merge branch 'refactoring/javascript_arrangement' into 'develop'

Refactoring/javascript arrangement

See merge request !192
parents d10b9423 2e76ee6a
...@@ -15,12 +15,6 @@ ...@@ -15,12 +15,6 @@
<link rel="stylesheet" href="./css/footer.css"> <link rel="stylesheet" href="./css/footer.css">
<link rel="stylesheet" href="./css/loading.css"> <link rel="stylesheet" href="./css/loading.css">
<link rel="stylesheet" href="./css/font-awesome.css"> <link rel="stylesheet" href="./css/font-awesome.css">
<script>
window.addEventListener('DOMContentLoaded', function() {
CHAT_UI.refreshArchiveScreen();
});
</script>
</head> </head>
<body> <body>
...@@ -91,76 +85,41 @@ ...@@ -91,76 +85,41 @@
</div> </div>
</footer> </footer>
<div id="loadingArea"></div> <div id="loadingArea"></div>
<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/libs/mustache.min.js"></script>
<script src="./js/archive.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 src="./js/chat-db-foriOS.js"></script>
<script id="archive-template" type="text/template"> <!-- Library -->
<li class="d-flex align-items-center"> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<a href="archive_detail.html?archiveId={{archiveId}}" class="w-100"> <script src="./js/libs/moment.js"></script>
<div class="archive_item d-flex flex-row align-items-center w-100"> <script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
<div class="arhive_img"> <script src="./js/libs/locale/ja.js" charset="UTF-8"></script>
<div class="img_wrap bg_blue"> <script src="./js/libs/mustache.min.js"></script>
<img src="{{typeImage}}" alt="動画" /> <script src="./js/libs/bootstrap.min.js"></script>
</div> <script src="./js/libs/jquery.mark.min.js"></script>
</div> <!-- Language -->
<div class="archive_desc"> <script src="./js/languages/language.js"></script>
<div class="archive_name"> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<span>{{fileName}}</span> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
</div> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<div class="archive_date"> <!-- Common -->
<span>{{insertDate}}</span> <script src="./js/common/constant.js"></script>
</div> <script src="./js/common/native-bridge-delegate.js"></script>
</div> <script src="./js/common/native-bridge-datasource.js"></script>
</div> <script src="./js/common/common.js"></script>
</a> <script src="./js/utils/chat-util.js"></script>
</li> <!-- Models -->
</script> <script src="./js/Models/deviceinfo.js"></script>
<script> <script src="./js/Models/serverinfo.js"></script>
String.prototype.replaceAll = function(org, dest) { <script src="./js/Models/userinfo.js"></script>
return this.split(org).join(dest); <!-- view -->
} <script src="./js/views/archive/archive.js"></script>
let CHAT_SERVER_URL = ''; <script>
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
$("#chatMenuModal").load("./modal_chat_menu.html");
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { window.addEventListener('DOMContentLoaded', function () {
CHAT_SERVER_URL = chatServerUrl; ArchiveUI.refreshArchiveScreen();
CMS_SERVER_URL = cmsServerUrl; });
PLATFORM = platform; </script>
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
CHAT_UI.refreshArchiveScreen();
};
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -17,21 +17,6 @@ ...@@ -17,21 +17,6 @@
<link rel="stylesheet" href="./css/font-awesome.css"> <link rel="stylesheet" href="./css/font-awesome.css">
</head> </head>
<script>
var archiveId;
window.addEventListener('DOMContentLoaded', function () {
var urlPrm = new Object;
var urlSearch = location.search.substring(1).split('&');
var kv = urlSearch[0].split('=');
urlPrm[kv[0]] = kv[1];
archiveId = urlPrm.archiveId
if (typeof (android) != "undefined") {
} else {
CHAT_UI.refreshArchiveDetailScreen(urlPrm.archiveId);
}
});
</script>
<body> <body>
<!-- ナビメニュー --> <!-- ナビメニュー -->
...@@ -65,6 +50,7 @@ ...@@ -65,6 +50,7 @@
<!-- ローディング --> <!-- ローディング -->
<div id="userProfileModal"></div> <div id="userProfileModal"></div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
...@@ -72,146 +58,36 @@ ...@@ -72,146 +58,36 @@
<script src="./js/libs/mustache.min.js"></script> <script src="./js/libs/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/archive.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/language.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <!-- Common -->
<script src="./js/constant.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chat.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/chat-util.js"></script> <script src="./js/common/common.js"></script>
<script src="./js/chat-db.js"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-db-foriOS.js"></script> <!-- Models -->
<script src="./js/Models/deviceinfo.js"></script>
<script src="./js/Models/serverinfo.js"></script>
<script src="./js/Models/userinfo.js"></script>
<!-- view -->
<script src="./js/views/contact/namecard.js"></script>
<script src="./js/views/archive/archive.js"></script>
<script id="archive-detail-template" type="text/template">
<div id="archive_player" class="player">
</div>
<div class="archive_detail_desc">
<div class="archive_detail_fl_nm item">
<h2 class="ttl" id="archiveFileName">FileName</h2>
<span>{{fileName}}</span>
</div>
<div class="archive_detail_sv_date item">
<h2 class="ttl" id="archiveInsertDate">InsertDate</h2>
<span>{{insertDate}}</span>
</div>
<div class="archive_detail_room_nm item">
<h2 class="ttl" id="archiveRoomName">ChatRoomName</h2>
<span class="archive_chat_room">{{chatRoomName}}</span>
<button id="joinChatRoom">
<img src="icon/icon_join_room.png" alt="">
</button>
</div>
<div class="archive_detail_sv_user item">
<h2 class="ttl" id="archiveSaveUser">SaveUser</h2>
<div class="d-flex flex-row">
<div class="d-flex flex-column">
<img src="{{profileImage}}" alt="プロフィール画像" onclick="CHAT_UI.makeNameCard({{userId}})" >
<p>{{userName}}</p>
</div>
</div>
</div>
<div class="archive_detail_user_list item">
<h2 class="ttl" id="archiveAttendUser">AttendUser</h2>
<ul class="d-flex flex-row" id="attendUser">
</ul>
</div>
</div>
</script>
<script id="archive-user-template" type="text/template">
<li class="archive_user">
<img src="{{profileImage}}" alt="">
<p>{{userName}}</p>
</li>
</script>
<script id="archive-namecard-template" type="text/template">
<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="profile_desc d-flex flex-row">
<img src="{{profileImage}}" onError="this.src='./img/noImage.png'"/>
<div class="profile_name d-flex justify-content-center align-items-center"><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 style="display: block;">{{.}}</li>
{{/groupPathList}}
</div>
<div class="modal-footer border-0 justify-content-center">
{{#isFavorite}}
<button type="button" class="border-0 bg_navy" onclick="CHAT_UI.removeFavoriteUser({{shopMemberId}})">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_favorite.png" alt="お気に入り">
</div>
<span>お気に入り解除</span>
</div>
</button>
{{/isFavorite}}
{{^isFavorite}}
<button type="button" class="border-0 bg_navy" onclick="CHAT_UI.insertFavoriteUser({{shopMemberId}})">
<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>
</script>
<script> <script>
let CHAT_SERVER_URL = ''; var archiveId;
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
if (typeof (android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { window.addEventListener('DOMContentLoaded', function () {
CHAT_SERVER_URL = chatServerUrl; let urlPrm = new Object;
CMS_SERVER_URL = cmsServerUrl; const urlSearch = location.search.substring(1).split('&');
PLATFORM = platform; const kv = urlSearch[0].split('=');
IS_MOBILE = isMobile; urlPrm[kv[0]] = kv[1];
IS_ONLINE = isOnline; archiveId = urlPrm.archiveId
CHAT_UI.refreshArchiveDetailScreen(archiveId); ArchiveUI.refreshArchiveDetailScreen(urlPrm.archiveId);
}; });
</script> </script>
</body> </body>
......
...@@ -97,61 +97,48 @@ ...@@ -97,61 +97,48 @@
</div> </div>
</div> </div>
</footer> </footer>
<div id="loadingArea"></div> <div id="loadingArea"></div>
<script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.js"></script> <!-- Library -->
<script src="./js/libs/locale/ko.js" charset="UTF-8"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/locale/ja.js" charset="UTF-8"></script> <script src="./js/libs/moment.js"></script>
<script src="./js/libs/mustache.min.js"></script> <script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/locale/ja.js" charset="UTF-8"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/mustache.min.js"></script>
<script src="./js/common.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/language.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <!-- Language -->
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/languages/language.js"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/constant.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <!-- Common -->
<script src="./js/chat-util.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chat-db.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script> <script src="./js/common/common.js"></script>
String.prototype.replaceAll = function(org, dest) { <script src="./js/utils/chat-util.js"></script>
return this.split(org).join(dest); <!-- Models -->
} <script src="./js/Models/deviceinfo.js"></script>
let CHAT_SERVER_URL = ''; <script src="./js/Models/serverinfo.js"></script>
let CMS_SERVER_URL = ''; <script src="./js/Models/userinfo.js"></script>
let ASSET_PATH = './'; <!-- View -->
let PLATFORM = ''; <script src="./js/views/chats/chat-list.js"></script>
let IS_MOBILE = true;
let IS_ONLINE = false; <script>
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
if (typeof(android) != "undefined") {
android.getLoginParameter(); if (deviceInfo.isAndroid()) {
android.getGlobalParameter(); const needHostAlert = android.getExitHostAlert();
android.saveSelectedUserList("");
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
webkit.messageHandlers.saveSelectedUserList.postMessage("");
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isAndroid()) {
var needHostAlert = android.getExitHostAlert();
if (needHostAlert) { if (needHostAlert) {
alert(getLocalizedString("inform_exit_host_collaboration")); alert(getLocalizedString("inform_exit_host_collaboration"));
} }
} }
CHAT_UI.refreshRoomList(ChatRoomType.GROUP); ChatList.refreshRoomList(ChatRoomType.GROUP);
CHAT_UI.dismissLoadingIndicator(); NativeBridgeDelegate.saveSelectedUserList("");
};
</script> Common.dismissLoadingIndicator();
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
</head> </head>
<body> <body>
<!-- ナビメニュー --> <!-- ナビメニュー -->
<nav> <nav>
<div class="row h-100 align-items-center"> <div class="row h-100 align-items-center">
<div class="col-4 pr-0"> <div class="col-4 pr-0">
<div class="nav-item"> <div class="nav-item">
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
</div><!-- .col --> </div><!-- .col -->
</div><!-- .row --> </div><!-- .row -->
</nav><!-- nav --> </nav><!-- nav -->
<!-- コンテンツ --> <!-- コンテンツ -->
<main id="chat_add_user"> <main id="chat_add_user">
<form id="addUserForm" action="chat_add_user_confirm.html" method="post"> <form id="addUserForm" action="chat_add_user_confirm.html" method="post">
<!-- ユーザー検索 --> <!-- ユーザー検索 -->
<div class="search_form my-2"> <div class="search_form my-2">
...@@ -60,7 +60,9 @@ ...@@ -60,7 +60,9 @@
<div class="tab_content" id="tab1_content"> <div class="tab_content" id="tab1_content">
<div class="chat_list"> <div class="chat_list">
<!-- お気に入りグループ --> <!-- お気に入りグループ -->
<div class="category"><div class="category_name"><span>お気に入り</span></div></div> <div class="category">
<div class="category_name"><span>お気に入り</span></div>
</div>
<div id="favoriteListForMakeRoom"></div> <div id="favoriteListForMakeRoom"></div>
<div id="myGroupListForMakeRoom"></div> <div id="myGroupListForMakeRoom"></div>
</div> </div>
...@@ -123,67 +125,51 @@ ...@@ -123,67 +125,51 @@
<span class="select_member_num"></span><span class="select_member">名 選択中</span></button> <span class="select_member_num"></span><span class="select_member">名 選択中</span></button>
</div> </div>
</form> </form>
</main> </main>
<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/common.js"></script>
<script src="./js/loading.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 src="./js/chat-db-foriOS.js"></script>
<script src="./js/chat-add-user.js"></script>
<script>
String.prototype.replaceAll = function(org, dest) {
return this.split(org).join(dest);
}
let CHAT_SERVER_URL = ''; <!-- Library -->
let CMS_SERVER_URL = ''; <script src="./js/libs/jquery-3.3.1.min.js"></script>
let ASSET_PATH = './'; <script src="./js/libs/moment.js"></script>
let PLATFORM = ''; <script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
let IS_MOBILE = true; <script src="./js/libs/locale/ja.js" charset="UTF-8"></script>
let IS_ONLINE = false; <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>
<!-- Language -->
<script src="./js/languages/language.js"></script>
<script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/languages/language_en.js" charset="UTF-8"></script>
<!-- Common -->
<script src="./js/common/constant.js"></script>
<script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/common/common.js"></script>
<script src="./js/utils/chat-util.js"></script>
<!-- Models -->
<script src="./js/Models/deviceinfo.js"></script>
<script src="./js/Models/serverinfo.js"></script>
<script src="./js/Models/userinfo.js"></script>
<!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/chats/management/chat-add-user.js"></script>
<script src="./js/common/loading.js"></script>
if (typeof(android) != "undefined") { <script>
android.getLoginParameter(); const selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
android.getGlobalParameter(); if (selectedUsers != "") {
} else { selectedUsers.forEach(function (user) {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({}); ChatManagementCommon.selectedUserList.push(user.shopMemberId);
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_DB.loadSelectedUsers() != "") {
let selectedUsers = CHAT_DB.loadSelectedUsers();
selectedUsers.forEach(function(user) {
CHAT.globalSelectedUserList.push(user.shopMemberId);
}) })
}; };
if (CHAT.globalSelectedUserList.length > 0) { if (ChatManagementCommon.selectedUserList.length > 0) {
$('.select_member_num').text(CHAT.globalSelectedUserList.length); $('.select_member_num').text(ChatManagementCommon.selectedUserList.length);
} else { } else {
$('.select_member_num').text('0'); $('.select_member_num').text('0');
} }
CHAT_UI.refreshMyGroupForAddUser(); ChatAddUser.refreshMyGroupForAddUser();
};
</script> </script>
</body> </body>
......
...@@ -57,52 +57,35 @@ ...@@ -57,52 +57,35 @@
</form> </form>
</main> </main>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.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/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/common.js"></script> <!-- Language -->
<script src="./js/loading.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/constant.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-util.js"></script> <!-- Common -->
<script src="./js/chat-db.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script> <script src="./js/common/native-bridge-datasource.js"></script>
String.prototype.replaceAll = function(org, dest) { <script src="./js/common/common.js"></script>
return this.split(org).join(dest); <script src="./js/utils/chat-util.js"></script>
} <!-- Models -->
let CHAT_SERVER_URL = ''; <script src="./js/Models/deviceinfo.js"></script>
let CMS_SERVER_URL = ''; <script src="./js/Models/serverinfo.js"></script>
let ASSET_PATH = './'; <script src="./js/Models/userinfo.js"></script>
let PLATFORM = ''; <!-- View -->
let IS_MOBILE = true; <script src="./js/views/chats/management/chat-management-common.js"></script>
let IS_ONLINE = false; <script src="./js/common/loading.js"></script>
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { <script>
CHAT_SERVER_URL = chatServerUrl; ChatManagementCommon.showAddUserConfirmView();
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
//CHAT_UI.showMakeRoomConfirmView();
CHAT_UI.showAddUserConfirmView();
};
</script> </script>
</body> </body>
......
...@@ -56,56 +56,37 @@ ...@@ -56,56 +56,37 @@
</div> </div>
</main> </main>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/common.js"></script> <!-- Language -->
<script src="./js/language.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/constant.js"></script> <!-- Common -->
<script src="./js/chat.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/chat-util.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/chat-db.js"></script> <script src="./js/common/common.js"></script>
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-websocket.js"></script> <!-- Models -->
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/chat-room.js"></script> <!-- View -->
<script src="./js/views/chats/chat-room.js"></script>
<script src="./js/views/chats/chat-room-search.js"></script>
<script src="./js/views/chats/chat-room-message.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 CHAT_SERVER_URL = '';
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let roomId = 0; let roomId = 0;
if (typeof (android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
};
</script> </script>
</body> </body>
......
...@@ -60,7 +60,9 @@ ...@@ -60,7 +60,9 @@
<div class="tab_content" id="tab1_content"> <div class="tab_content" id="tab1_content">
<div class="chat_list"> <div class="chat_list">
<!-- お気に入りグループ --> <!-- お気に入りグループ -->
<div class="category"><div class="category_name"><span>お気に入り</span></div></div> <div class="category">
<div class="category_name"><span>お気に入り</span></div>
</div>
<div id="favoriteListForMakeRoom"></div> <div id="favoriteListForMakeRoom"></div>
<div id="myGroupListForMakeRoom"></div> <div id="myGroupListForMakeRoom"></div>
</div> </div>
...@@ -125,6 +127,8 @@ ...@@ -125,6 +127,8 @@
</div> </div>
</form> </form>
</main> </main>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
...@@ -132,58 +136,40 @@ ...@@ -132,58 +136,40 @@
<script src="./js/libs/mustache.min.js"></script> <script src="./js/libs/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/common.js"></script> <!-- Language -->
<script src="./js/loading.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/language.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <!-- Common -->
<script src="./js/constant.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chatMakeRoom.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/chat.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/common/common.js"></script>
<script src="./js/chat-util.js"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-db.js"></script> <!-- Models -->
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script> <script src="./js/Models/serverinfo.js"></script>
String.prototype.replaceAll = function(org, dest) { <script src="./js/Models/userinfo.js"></script>
return this.split(org).join(dest); <!-- View -->
} <script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/chats/management/chat-make-room.js"></script>
<script src="./js/common/loading.js"></script>
let CHAT_SERVER_URL = ''; <script>
let CMS_SERVER_URL = ''; if (NativeBridgeDataSource.loadSelectedUsers() != "") {
let ASSET_PATH = './'; let selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
let PLATFORM = ''; selectedUsers.forEach(function (user) {
let IS_MOBILE = true; ChatManagementCommon.selectedUserList.push(user.shopMemberId);
let IS_ONLINE = false;
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_DB.loadSelectedUsers() != "") {
let selectedUsers = CHAT_DB.loadSelectedUsers();
selectedUsers.forEach(function(user) {
CHAT.globalSelectedUserList.push(user.shopMemberId);
}) })
}; };
if (CHAT.globalSelectedUserList.length > 0) { if (ChatManagementCommon.selectedUserList.length > 0) {
$('.select_member_num').text(CHAT.globalSelectedUserList.length); $('.select_member_num').text(ChatManagementCommon.selectedUserList.length);
} else { } else {
$('.select_member_num').text('0'); $('.select_member_num').text('0');
} }
CHAT_UI.refreshMyGroupForMakeRoom(); ChatMakeRoom.refreshMyGroupForMakeRoom();
};
</script> </script>
</body> </body>
......
...@@ -43,8 +43,11 @@ ...@@ -43,8 +43,11 @@
<main id="chat_make_room_confirm"> <main id="chat_make_room_confirm">
<!-- ルーム名入力 --> <!-- ルーム名入力 -->
<div class="room_name"> <div class="room_name">
<label><h2>ルーム名</h2></label> <label>
<input type="text" class="input_name_room" name="room_name" id="newRoomName" placeholder="ルーム名を入力してください" maxlength="20"> <h2>ルーム名</h2>
</label>
<input type="text" class="input_name_room" name="room_name" id="newRoomName" placeholder="ルーム名を入力してください"
maxlength="20">
</div> </div>
<!-- 参加者一覧 --> <!-- 参加者一覧 -->
...@@ -61,7 +64,7 @@ ...@@ -61,7 +64,7 @@
</div> </div>
</main> </main>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
...@@ -69,46 +72,29 @@ ...@@ -69,46 +72,29 @@
<script src="./js/libs/mustache.min.js"></script> <script src="./js/libs/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/common.js"></script> <!-- Language -->
<script src="./js/loading.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/language.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <!-- Common -->
<script src="./js/constant.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chat.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/chat-util.js"></script> <script src="./js/common/common.js"></script>
<script src="./js/chat-db.js"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-db-foriOS.js"></script> <!-- Models -->
<script> <script src="./js/Models/deviceinfo.js"></script>
String.prototype.replaceAll = function(org, dest) { <script src="./js/Models/serverinfo.js"></script>
return this.split(org).join(dest); <script src="./js/Models/userinfo.js"></script>
} <!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/common/loading.js"></script>
let CHAT_SERVER_URL = ''; <script>
let CMS_SERVER_URL = ''; ChatManagementCommon.showMakeRoomConfirmView();
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { $("#newRoomName").attr("placeholder", getLocalizedString("newRoomName"));
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
CHAT_UI.showMakeRoomConfirmView();
};
</script> </script>
</body> </body>
......
...@@ -53,18 +53,13 @@ ...@@ -53,18 +53,13 @@
<!-- コンテンツ --> <!-- コンテンツ -->
<main id="chat_room"> <main id="chat_room">
<div id="user_list" class="user_list d-flex flex-row"> <div id="user_list" class="user_list d-flex flex-row"> </div>
</div>
<!-- フィルター --> <!-- フィルター -->
<div id="filter" class="user_list filter d-flex flex-row none"></div> <div id="filter" class="user_list filter d-flex flex-row none"></div>
<div class="chat_list none" id="searchList"> <div class="chat_list none" id="searchList">
<ul class="overlay_src_msg"> <ul class="overlay_src_msg">
</ul> </ul>
</div> </div>
<!-- チャット内容 --> <!-- チャット内容 -->
<div class="room_container"> <div class="room_container">
<div class="room_contents scroll"> <div class="room_contents scroll">
...@@ -72,7 +67,6 @@ ...@@ -72,7 +67,6 @@
</div> </div>
</div> </div>
</main> </main>
<!-- フッター --> <!-- フッター -->
<footer class="chat_room_footer"> <footer class="chat_room_footer">
<!-- フッター上 --> <!-- フッター上 -->
...@@ -98,39 +92,39 @@ ...@@ -98,39 +92,39 @@
<input type="text" name="message" class="message_input_form" id="messageInput" placeholder="メッセージを入力してください" <input type="text" name="message" class="message_input_form" id="messageInput" placeholder="メッセージを入力してください"
maxlength="600"> maxlength="600">
<button type="button" name="button" class="message_input_send none" id="messageSend" <button type="button" name="button" class="message_input_send none" id="messageSend"
onclick="CHAT_UI.sendMessage(this);">送信</button> onclick="ChatRoom.sendMessage(this);">送信</button>
</div> </div>
</div> </div>
<!-- フッター下 --> <!-- フッター下 -->
<div class="footer_content_b"> <div class="footer_content_b">
<div class="d-flex flex-row justify-content-around h-100"> <div class="d-flex flex-row justify-content-around h-100">
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.AUDIO);"> <a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.AUDIO);">
<img src="icon/icon_phone.png" alt="通話アイコン"> <img src="icon/icon_phone.png" alt="通話アイコン">
<p>通話</p> <p>通話</p>
</a> </a>
</div> </div>
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.DOCUMENT);"> <a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.DOCUMENT);">
<img src="icon/icon_paste.png" alt="文書アイコン"> <img src="icon/icon_paste.png" alt="文書アイコン">
<p>文書</p> <p>文書</p>
</a> </a>
</div> </div>
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.CAMERA);"> <a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.CAMERA);">
<img src="icon/icon_photo.png" alt="画像アイコン"> <img src="icon/icon_photo.png" alt="画像アイコン">
<p>画像</p> <p>画像</p>
</a> </a>
</div> </div>
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.VIDEO);"> <a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.VIDEO);">
<img src="icon/icon_movie.png" alt="動画アイコン"> <img src="icon/icon_movie.png" alt="動画アイコン">
<p>動画</p> <p>動画</p>
</a> </a>
</div> </div>
<!--リリース後開発予定--> <!--リリース後開発予定-->
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.BOARD);"> <a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.BOARD);">
<img src="icon/icon_whiteboard_gray.png" alt="ホワイトボードアイコン"> <img src="icon/icon_whiteboard_gray.png" alt="ホワイトボードアイコン">
<p>ボード</p> <p>ボード</p>
</a> </a>
...@@ -144,78 +138,63 @@ ...@@ -144,78 +138,63 @@
<div id="chatMenuModal"></div> <div id="chatMenuModal"></div>
<div id="pictureModal"></div> <div id="pictureModal"></div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/common.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/language.js"></script> <!-- Language -->
<script src="./js/loading.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/constant.js"></script> <!-- Common -->
<script src="./js/chat.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/chat-util.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/chat-db.js"></script> <script src="./js/common/common.js"></script>
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-websocket.js"></script> <!-- Models -->
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/chat-room.js"></script> <script src="./js/Models/roominfo.js"></script>
<script src="./js/Models/socket-joininfo.js"></script>
<!-- Socket -->
<script src="./js/sockets/chat-websocket.js"></script>
<script src="./js/sockets/chat-websocket-message.js"></script>
<!-- View -->
<script src="./js/utils/chat-media-handler.js"></script>
<script src="./js/views/chats/chat-room.js"></script>
<script src="./js/views/chats/chat-room-search.js"></script>
<script src="./js/views/chats/chat-room-message.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script src="./js/common/loading.js"></script>
<script> <script>
function imageModal(image) { function imageModal(image) {
$('#modal_image').attr('src', image.src); $('#modal_image').attr('src', image.src);
$('#pictureModalCenter').modal('show'); $('#pictureModalCenter').modal('show');
} }
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;
let androidVersion = 0;
let roomName;
$("#pictureModal").load("./modal_chat_picture.html"); $("#pictureModal").load("./modal_chat_picture.html");
$("#chatMenuModal").load("./modal_chat_menu.html"); $("#chatMenuModal").load("./modal_chat_menu.html");
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
if (typeof (android) != "undefined") { if (deviceInfo.isAndroid()) {
android.getLoginParameter(); const needHostAlert = android.getExitHostAlert();
android.getGlobalParameter();
android.saveSelectedUserList("");
androidVersion = android.getAndroidVersion();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
webkit.messageHandlers.saveSelectedUserList.postMessage("");
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isAndroid()) {
var needHostAlert = android.getExitHostAlert();
if (needHostAlert) { if (needHostAlert) {
alert(getLocalizedString("inform_exit_host_collaboration")); alert(getLocalizedString("inform_exit_host_collaboration"));
} }
} }
CHAT_UI.loadMessages(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.roomName); ChatRoom.loadMessages(roomInfo.roomID, roomInfo.roomName);
};
NativeBridgeDelegate.saveSelectedUserList("");
</script> </script>
</body> </body>
......
...@@ -38,15 +38,14 @@ ...@@ -38,15 +38,14 @@
</div> </div>
<div class="collabo_nav_r"> <div class="collabo_nav_r">
<div class="text-right d-flex align-items-center"> <div class="text-right d-flex align-items-center">
<button type="button" name="button" <button type="button" name="button" class="btn user_btn"></button>
class="btn user_btn"></button>
<button type="button" name="button" class="btn add_user_btn none"></button> <button type="button" name="button" class="btn add_user_btn none"></button>
<div class="menu-icon menu_btn host_contents" onclick="this.classList.toggle('hover');"> <div class="menu-icon menu_btn host_contents" onclick="this.classList.toggle('hover');">
<div class="menu-bar menu-bar1"></div> <div class="menu-bar menu-bar1"></div>
<div class="menu-bar menu-bar2"></div> <div class="menu-bar menu-bar2"></div>
<div class="menu-bar menu-bar3"></div> <div class="menu-bar menu-bar3"></div>
</div> </div>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> --> <!-- <button type="button" name="button" class="btn exit_btn" onclick="CoviewBridge.exitCollaboration();"></button> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -58,7 +57,8 @@ ...@@ -58,7 +57,8 @@
<main id="collabo_main" class="none"> <main id="collabo_main" class="none">
<div class="document_wrap"> <div class="document_wrap">
<!-- 音声共有 --> <!-- 音声共有 -->
<div class="talking_area icon_talking_wrap d-flex flex-column justify-content-center align-items-center h-100 collaboration_contents voice_contents none"> <div
class="talking_area icon_talking_wrap d-flex flex-column justify-content-center align-items-center h-100 collaboration_contents voice_contents none">
<div class="talking_img_wrap"> <div class="talking_img_wrap">
<img src="icon/icon_talking_white.png" alt="通話中"> <img src="icon/icon_talking_white.png" alt="通話中">
</div> </div>
...@@ -66,9 +66,10 @@ ...@@ -66,9 +66,10 @@
</div> </div>
<!-- 文書共有 --> <!-- 文書共有 -->
<div class="start_pip_area d-flex flex-column justify-content-center align-items-center h-100 collaboration_contents document_contents none"> <div
class="start_pip_area d-flex flex-column justify-content-center align-items-center h-100 collaboration_contents document_contents none">
<div class="start_pip_img_wrap"> <div class="start_pip_img_wrap">
<a href="javascript:startPipMode();"> <a href="javascript:NativeBridgeDelegate.startPIPMode();">
<img src="icon/icon_start_pip.png" alt="文書共有"> <img src="icon/icon_start_pip.png" alt="文書共有">
</a> </a>
</div> </div>
...@@ -80,14 +81,6 @@ ...@@ -80,14 +81,6 @@
</div> </div>
</main> </main>
<div class="coview_share_photo_select_bubble none">
<button id="coviewSharePhotoCamera" class="coview_share_photo_select_bubble_in_button cam">
</button>
<BR>
<button id="coviewSharePhotoGallery" class="coview_share_photo_select_bubble_in_button gal">
</button>
</div>
<!-- ユーザー追加オーバーレイ --> <!-- ユーザー追加オーバーレイ -->
<div id="add_user_list"></div> <div id="add_user_list"></div>
<div id="modal_add_user_confirm"></div> <div id="modal_add_user_confirm"></div>
...@@ -112,7 +105,7 @@ ...@@ -112,7 +105,7 @@
<!-- フッター --> <!-- フッター -->
<div id="footer_collabo"></div> <div id="footer_collabo"></div>
<div id="loadingArea"></div> <div id="loadingArea"></div>
<div class="pip_indicator none" onclick="finishPipMode();"> <div class="pip_indicator none" onclick="NativeBridgeDelegate.finishPIPMode();">
<div style="vertical-align: middle;display: table-cell;"> <div style="vertical-align: middle;display: table-cell;">
<img src="icon/icon_end_pip.png" alt="文書共有" style="width: 30px;height: 30px;"> <img src="icon/icon_end_pip.png" alt="文書共有" style="width: 30px;height: 30px;">
<span style="font-size: 20px;vertical-align: middle;">戻る</span> <span style="font-size: 20px;vertical-align: middle;">戻る</span>
...@@ -123,32 +116,49 @@ ...@@ -123,32 +116,49 @@
<div class="sp sp-circle"></div> <div class="sp sp-circle"></div>
</div> </div>
</div> </div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/constant.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/collaboration.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat-util.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-db.js"></script> <!-- Common -->
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/language.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/common/common.js"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-websocket.js"></script> <!-- Models -->
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/Models/roominfo.js"></script>
<script src="./js/Models/socket-joininfo.js"></script>
<script src="./js/Models/coview-userinfo.js"></script>
<!-- Socket -->
<script src="./js/sockets/chat-websocket.js"></script>
<script src="./js/sockets/chat-websocket-message.js"></script>
<!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/collaboration/collaboration.js"></script>
<script src="./js/views/collaboration/collaboration-add-user.js"></script>
<script src="https://biztaskyell.abookcloud.com/coview_api.js"></script> <script src="https://biztaskyell.abookcloud.com/coview_api.js"></script>
<script src="./js/share.js"></script> <script src="./js/views/collaboration/share.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-message-handler.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-bridge.js"></script>
<script src="./js/views/collaboration/share-bind-button-action.js"></script>
<script src="./js/views/collaboration/share-event-listener.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script> <script>
$("#footer_collabo").load("./footer_collabo.html"); $("#footer_collabo").load("./footer_collabo.html");
$("#modal_collabo_host_request").load("./modal_collabo_host_request.html"); $("#modal_collabo_host_request").load("./modal_collabo_host_request.html");
...@@ -159,78 +169,22 @@ ...@@ -159,78 +169,22 @@
$("#add_user_list").load("./modal_add_user_list.html"); $("#add_user_list").load("./modal_add_user_list.html");
$("#zoom").load("./zoom.html"); $("#zoom").load("./zoom.html");
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
let CHAT_SERVER_URL = '';
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let collaborationJoinFlg = 0;
let isInvited = 0;
let roomType;
let joinCollaborationType = 0;
let joinMeetingId = 0;
let androidVersion = 0;
if (typeof (android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
roomType = android.getRoomType();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
roomType = CHAT_DB.getRoomType();
}
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
function startPipMode() { if (deviceInfo.isAndroid()) {
if (typeof (android) != "undefined") { if (
android.startPipMode(); globalUserInfo.collaborationType.type == COLLABORATION_TYPE.DOCUMENT
} else { && deviceInfo.androidVersion < ANDROID_SDK_VERSION.O
webkit.messageHandlers.startPipMode.postMessage({}); ) {
}
}
function finishPipMode() {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.finishPipMode.postMessage({});
}
}
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) {
joinCollaborationType = CHAT_DB.getJoinCollaborationType();
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) {
joinCollaborationType = android.getJoinCollaborationType();
collaborationJoinFlg = android.getCollaborationJoinFlg();
androidVersion = android.getAndroidVersion();
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version')); alert(getLocalizedString('not_support_version'));
android.openCommunicationHome(); if (typeof android != "undefined") {
NativeBridgeDelegate.openCommunicationHome();
}
} }
} }
initCollaborationUI(joinCollaborationType); if (globalUserInfo.joinType != COLLABORATION_JOIN_TYPE.INVITED) {
globalUserInfo.coWorkType = CHAT_UTIL.getCoviewTypeFromCollaborationType(joinCollaborationType); CHAT_SOCKET.initialJoin();
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function () {
});
} }
};
</script> </script>
</body> </body>
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
<div class="text-right d-flex align-items-center"> <div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn add_user_btn"></button> <button type="button" name="button" class="btn add_user_btn"></button>
<button type="button" name="button" class="btn menu_btn"></button> <button type="button" name="button" class="btn menu_btn"></button>
<button type="button" name="button" class="btn start_pip_btn" onclick="startPipMode();"></button> <button type="button" name="button" class="btn start_pip_btn"
onclick="NativeBridgeDelegate.startPIPMode();"></button>
</div> </div>
</div> </div>
</div> </div>
...@@ -64,37 +65,45 @@ ...@@ -64,37 +65,45 @@
<!-- フッター --> <!-- フッター -->
<div id="footer_collabo"></div> <div id="footer_collabo"></div>
<div id="loadingArea"></div> <div id="loadingArea"></div>
<div class="pip_indicator none" onclick="finishPipMode();"> <div class="pip_indicator none" onclick="NativeBridgeDelegate.finishPIPMode();">
<div style="vertical-align: middle;display: table-cell;">協業中 <div style="vertical-align: middle;display: table-cell;">協業中</div>
</div>
</div> </div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/constant.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/collaboration.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/loading.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-util.js"></script> <!-- Common -->
<script src="./js/chat-db.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/language.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/common/common.js"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <!-- Models -->
<script src="./js/chat-websocket.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/socket-joininfo.js"></script>
<script src="https://biztaskyell.abookcloud.com/coview_api.js"></script> <!-- Socket -->
<script src="./js/share.js"></script> <script src="./js/sockets/chat-websocket.js"></script>
<script src="./js/sockets/chat-websocket-message.js"></script>
<!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/collaboration/collaboration.js"></script>
<script src="./js/views/collaboration/collaboration-add-user.js"></script>
<script src="./js/common/loading.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script> <script>
$("#footer_collabo").load("./footer_collabo.html"); $("#footer_collabo").load("./footer_collabo.html");
$("#modal_collabo_host_request").load("./modal_collabo_host_request.html"); $("#modal_collabo_host_request").load("./modal_collabo_host_request.html");
...@@ -105,55 +114,14 @@ ...@@ -105,55 +114,14 @@
$("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html"); $("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html");
$("#add_user_list").load("./modal_add_user_list.html"); $("#add_user_list").load("./modal_add_user_list.html");
let CHAT_SERVER_URL = ''; globalUserInfo.collaborationType = COLLABORATION_TYPE.DOCUMENT;
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let collaborationJoinFlg = 0;
if (typeof (android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function startPipMode() {
if (typeof (android) != "undefined") {
android.startPipMode();
} else if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.startPipMode.postMessage({});
}
}
CHAT_SOCKET.initialJoin();
function finishPipMode() { function finishPipMode() {
if (CHAT_UTIL.isIOS()) { NativeBridgeDelegate.finishPIPMode();
webkit.messageHandlers.finishPipMode.postMessage({});
}
} }
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg();
}
globalUserInfo.coWorkType = CollaborationTypeKey.DOCUMENT;
CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function () {
});
};
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<div class="user_list d-flex flex-wrap"> <div class="user_list d-flex flex-wrap">
{{#joinedUserList}} {{#joinedUserList}}
<div class="user_item " id="collaboration_user_{{loginId}}"> <div class="user_item " id="collaboration_user_{{loginId}}">
<a href="#" data-toggle="modal" data-target="#profileModal1" onclick="CHAT_UI.makeNameCardInCollaboration({{shopMemberId}})"> <a href="#" data-toggle="modal" data-target="#profileModal1"
onclick="CollaborationUI.makeNameCard({{shopMemberId}})">
<div class="img_wrap"><img src="{{profileUrl}}" alt="this.src='./img/noImage.png'" /></div> <div class="img_wrap"><img src="{{profileUrl}}" alt="this.src='./img/noImage.png'" /></div>
<span class="name">{{shopMemberName}}</span> <span class="name">{{shopMemberName}}</span>
</a> </a>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<button type="button" name="button" class="btn user_btn"></button> <button type="button" name="button" class="btn user_btn"></button>
<button type="button" name="button" class="btn menu_btn"></button> <button type="button" name="button" class="btn menu_btn"></button>
<button type="button" name="button" class="btn add_user_btn none"></button> <button type="button" name="button" class="btn add_user_btn none"></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> --> <!-- <button type="button" name="button" class="btn exit_btn" onclick="CoviewBridge.exitCollaboration();"></button> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -45,14 +45,6 @@ ...@@ -45,14 +45,6 @@
</div> </div>
</main> </main>
<div class="coview_share_photo_select_bubble none">
<button id="coviewSharePhotoCamera" class="coview_share_photo_select_bubble_in_button cam">
</button>
<BR>
<button id="coviewSharePhotoGallery" class="coview_share_photo_select_bubble_in_button gal">
</button>
</div>
<!-- ユーザー追加オーバーレイ --> <!-- ユーザー追加オーバーレイ -->
<div id="add_user_list"></div> <div id="add_user_list"></div>
<div id="modal_add_user_confirm"></div> <div id="modal_add_user_confirm"></div>
...@@ -129,32 +121,47 @@ ...@@ -129,32 +121,47 @@
<!-- フッター --> <!-- フッター -->
<div id="footer_collabo"></div> <div id="footer_collabo"></div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/constant.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/collaboration.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat-util.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-db.js"></script> <!-- Common -->
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/language.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/common/common.js"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-websocket.js"></script> <!-- Models -->
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/Models/roominfo.js"></script>
<script src="./js/Models/socket-joininfo.js"></script>
<!-- Socket -->
<script src="./js/sockets/chat-websocket.js"></script>
<script src="./js/sockets/chat-websocket-message.js"></script>
<!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/collaboration/collaboration.js"></script>
<script src="./js/views/collaboration/collaboration-add-user.js"></script>
<script src="https://biztaskyell.abookcloud.com/coview_api.js"></script> <script src="https://biztaskyell.abookcloud.com/coview_api.js"></script>
<script src="./js/share.js"></script> <script src="./js/views/collaboration/share.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-message-handler.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-bridge.js"></script>
<script src="./js/views/collaboration/share-bind-button-action.js"></script>
<script src="./js/views/collaboration/share-event-listener.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script> <script>
$("#footer_collabo").load("./footer_collabo.html"); $("#footer_collabo").load("./footer_collabo.html");
$("#modal_collabo_host_request").load("./modal_collabo_host_request.html"); $("#modal_collabo_host_request").load("./modal_collabo_host_request.html");
...@@ -165,48 +172,10 @@ ...@@ -165,48 +172,10 @@
$("#add_user_list").load("./modal_add_user_list.html"); $("#add_user_list").load("./modal_add_user_list.html");
$("#zoom").load("./zoom.html"); $("#zoom").load("./zoom.html");
let CHAT_SERVER_URL = ''; globalUserInfo.collaborationType = COLLABORATION_TYPE.CAMERA;
let CMS_SERVER_URL = ''; if (globalUserInfo.joinType != COLLABORATION_JOIN_TYPE.INVITED) {
let ASSET_PATH = './'; CHAT_SOCKET.initialJoin();
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let collaborationJoinFlg = 0;
let roomType;
if (typeof (android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
roomType = android.getRoomType();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
roomType = CHAT_DB.getRoomType();
}
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg);
}
globalUserInfo.coWorkType = CollaborationTypeKey.CAMERA;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function () {
});
} }
};
</script> </script>
</body> </body>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="menu-bar menu-bar2"></div> <div class="menu-bar menu-bar2"></div>
<div class="menu-bar menu-bar3"></div> <div class="menu-bar menu-bar3"></div>
</div> </div>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> --> <!-- <button type="button" name="button" class="btn exit_btn" onclick="CoviewBridge.exitCollaboration();"></button> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -48,14 +48,6 @@ ...@@ -48,14 +48,6 @@
</div> </div>
</main> </main>
<div class="coview_share_photo_select_bubble none">
<button id="coviewSharePhotoCamera" class="coview_share_photo_select_bubble_in_button cam">
</button>
<BR>
<button id="coviewSharePhotoGallery" class="coview_share_photo_select_bubble_in_button gal">
</button>
</div>
<!-- ユーザー追加オーバーレイ --> <!-- ユーザー追加オーバーレイ -->
<div id="add_user_list"></div> <div id="add_user_list"></div>
<div id="modal_add_user_confirm"></div> <div id="modal_add_user_confirm"></div>
...@@ -119,32 +111,47 @@ ...@@ -119,32 +111,47 @@
<!-- フッター --> <!-- フッター -->
<div id="footer_collabo"></div> <div id="footer_collabo"></div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/constant.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/collaboration.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat-util.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-db.js"></script> <!-- Common -->
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/language.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/common/common.js"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-websocket.js"></script> <!-- Models -->
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/Models/roominfo.js"></script>
<script src="./js/Models/socket-joininfo.js"></script>
<!-- Socket -->
<script src="./js/sockets/chat-websocket.js"></script>
<script src="./js/sockets/chat-websocket-message.js"></script>
<!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/collaboration/collaboration.js"></script>
<script src="./js/views/collaboration/collaboration-add-user.js"></script>
<script src="https://biztaskyell.abookcloud.com/coview_api.js"></script> <script src="https://biztaskyell.abookcloud.com/coview_api.js"></script>
<script src="./js/share.js"></script> <script src="./js/views/collaboration/share.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-message-handler.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-bridge.js"></script>
<script src="./js/views/collaboration/share-bind-button-action.js"></script>
<script src="./js/views/collaboration/share-event-listener.js"></script>
<script src="./js/views/contact/namecard.js"></script>
</body> </body>
<script> <script>
$("#footer_collabo").load("./footer_collabo.html"); $("#footer_collabo").load("./footer_collabo.html");
...@@ -156,48 +163,12 @@ ...@@ -156,48 +163,12 @@
$("#add_user_list").load("./modal_add_user_list.html"); $("#add_user_list").load("./modal_add_user_list.html");
$("#zoom").load("./zoom.html"); $("#zoom").load("./zoom.html");
let CHAT_SERVER_URL = '';
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let collaborationJoinFlg = 0;
let roomType;
if (typeof (android) != "undefined") { globalUserInfo.collaborationType = COLLABORATION_TYPE.VIDEO;
android.getLoginParameter(); if (globalUserInfo.joinType != COLLABORATION_JOIN_TYPE.INVITED) {
android.getGlobalParameter(); CHAT_SOCKET.initialJoin();
roomType = android.getRoomType();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
roomType = CHAT_DB.getRoomType();
} }
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg);
}
globalUserInfo.coWorkType = CollaborationTypeKey.VIDEO;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function () {
});
}
};
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -63,32 +63,48 @@ ...@@ -63,32 +63,48 @@
<!-- フッター --> <!-- フッター -->
<div id="footer_collabo"></div> <div id="footer_collabo"></div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/constant.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/collaboration.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat-util.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-db.js"></script> <!-- Common -->
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/language.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/common/common.js"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-websocket.js"></script> <!-- Models -->
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/Models/roominfo.js"></script>
<script src="./js/Models/socket-joininfo.js"></script>
<!-- Socket -->
<script src="./js/sockets/chat-websocket.js"></script>
<script src="./js/sockets/chat-websocket-message.js"></script>
<!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/collaboration/collaboration.js"></script>
<script src="./js/views/collaboration/collaboration-add-user.js"></script>
<script src="https://biztaskyell.abookcloud.com/coview_api.js"></script> <script src="https://biztaskyell.abookcloud.com/coview_api.js"></script>
<script src="./js/share.js"></script> <script src="./js/views/collaboration/share.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-message-handler.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-bridge.js"></script>
<script src="./js/views/collaboration/share-bind-button-action.js"></script>
<script src="./js/views/collaboration/share-event-listener.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script> <script>
$("#footer_collabo").load("./footer_collabo.html"); $("#footer_collabo").load("./footer_collabo.html");
$("#modal_collabo_host_request").load("./modal_collabo_host_request.html"); $("#modal_collabo_host_request").load("./modal_collabo_host_request.html");
...@@ -98,48 +114,10 @@ ...@@ -98,48 +114,10 @@
$("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html"); $("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html");
$("#add_user_list").load("./modal_add_user_list.html"); $("#add_user_list").load("./modal_add_user_list.html");
let CHAT_SERVER_URL = ''; globalUserInfo.collaborationType = COLLABORATION_TYPE.AUDIO;
let CMS_SERVER_URL = ''; if (globalUserInfo.joinType != COLLABORATION_JOIN_TYPE.INVITED) {
let ASSET_PATH = './'; CHAT_SOCKET.initialJoin();
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let collaborationJoinFlg = 0;
let roomType;
if (typeof (android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
roomType = android.getRoomType();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
roomType = CHAT_DB.getRoomType();
}
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg);
}
globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function () {
});
} }
};
</script> </script>
</body> </body>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<button type="button" name="button" class="btn user_btn"></button> <button type="button" name="button" class="btn user_btn"></button>
<button type="button" name="button" class="btn add_user_btn none"></button> <button type="button" name="button" class="btn add_user_btn none"></button>
<button type="button" name="button" class="btn menu_btn"></button> <button type="button" name="button" class="btn menu_btn"></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> --> <!-- <button type="button" name="button" class="btn exit_btn" onclick="CoviewBridge.exitCollaboration();"></button> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -44,14 +44,6 @@ ...@@ -44,14 +44,6 @@
</div> </div>
</main> </main>
<div class="coview_share_photo_select_bubble none">
<button id="coviewSharePhotoCamera" class="coview_share_photo_select_bubble_in_button cam">
</button>
<BR>
<button id="coviewSharePhotoGallery" class="coview_share_photo_select_bubble_in_button gal">
</button>
</div>
<!-- ユーザー追加オーバーレイ --> <!-- ユーザー追加オーバーレイ -->
<div id="add_user_list"></div> <div id="add_user_list"></div>
<div id="modal_add_user_confirm"></div> <div id="modal_add_user_confirm"></div>
...@@ -121,32 +113,47 @@ ...@@ -121,32 +113,47 @@
<!-- フッター --> <!-- フッター -->
<div id="footer_collabo"></div> <div id="footer_collabo"></div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
<script src="./js/libs/locale/ja.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/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/constant.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/collaboration.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/chat.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/chat-util.js"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/chat-db.js"></script> <!-- Common -->
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/common/constant.js"></script>
<script src="./js/language.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <script src="./js/common/common.js"></script>
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-websocket.js"></script> <!-- Models -->
<script src="./js/chat-websocket-message.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script src="./js/chat-websocket-refresh-group-list.js"></script> <script src="./js/Models/serverinfo.js"></script>
<script src="./js/chat-websocket-refresh-user-list-in-group.js"></script> <script src="./js/Models/userinfo.js"></script>
<script src="./js/Models/roominfo.js"></script>
<script src="./js/Models/socket-joininfo.js"></script>
<!-- Socket -->
<script src="./js/sockets/chat-websocket.js"></script>
<script src="./js/sockets/chat-websocket-message.js"></script>
<!-- View -->
<script src="./js/views/chats/management/chat-management-common.js"></script>
<script src="./js/views/collaboration/collaboration.js"></script>
<script src="./js/views/collaboration/collaboration-add-user.js"></script>
<script src="https://biztaskyell.abookcloud.com/coview_api.js"></script> <script src="https://biztaskyell.abookcloud.com/coview_api.js"></script>
<script src="./js/share.js"></script> <script src="./js/views/collaboration/share.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-message-handler.js"></script>
<script src="./js/views/collaboration/fermi-web-socket-bridge.js"></script>
<script src="./js/views/collaboration/share-bind-button-action.js"></script>
<script src="./js/views/collaboration/share-event-listener.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script> <script>
$("#footer_collabo").load("./footer_collabo.html"); $("#footer_collabo").load("./footer_collabo.html");
$("#modal_collabo_host_request").load("./modal_collabo_host_request.html"); $("#modal_collabo_host_request").load("./modal_collabo_host_request.html");
...@@ -157,47 +164,10 @@ ...@@ -157,47 +164,10 @@
$("#add_user_list").load("./modal_add_user_list.html"); $("#add_user_list").load("./modal_add_user_list.html");
$("#zoom").load("./zoom.html"); $("#zoom").load("./zoom.html");
let CHAT_SERVER_URL = ''; globalUserInfo.collaborationType = COLLABORATION_TYPE.BOARD;
let CMS_SERVER_URL = ''; if (globalUserInfo.joinType != COLLABORATION_JOIN_TYPE.INVITED) {
let ASSET_PATH = './'; CHAT_SOCKET.initialJoin();
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
let collaborationJoinFlg = 0;
let roomType;
if (typeof (android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
roomType = android.getRoomType();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
roomType = CHAT_DB.getRoomType();
}
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg();
}
globalUserInfo.coWorkType = CollaborationTypeKey.BOARD;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function () {
});
} }
};
</script> </script>
</body> </body>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
<div class="col-4 p-0"> <div class="col-4 p-0">
<div class="nav-item p-0"> <div class="nav-item p-0">
<h1 class="nav-ttl" id="title" >コンタクト</h1> <h1 class="nav-ttl" id="title">コンタクト</h1>
</div> </div>
</div> </div>
<div class="col-4 pl-0"> <div class="col-4 pl-0">
...@@ -65,7 +65,8 @@ ...@@ -65,7 +65,8 @@
<div class="chat_item d-flex flex-row align-items-center" style="background: none !important;"> <div class="chat_item d-flex flex-row align-items-center" style="background: none !important;">
<div class="chat_item_l"> <div class="chat_item_l">
<div class="thumbnail"> <div class="thumbnail">
<div class="img_wrap"><img id="myImg" src="img/noImage.png" onError="this.src='./img/noImage.png'" /></div> <div class="img_wrap"><img id="myImg" src="img/noImage.png"
onError="this.src='./img/noImage.png'" /></div>
</div> </div>
</div> </div>
<div class="chat_item_m px-0"> <div class="chat_item_m px-0">
...@@ -82,7 +83,9 @@ ...@@ -82,7 +83,9 @@
</div> </div>
<div class="chat_list" id="myContactList"> <div class="chat_list" id="myContactList">
<!-- お気に入りグループ --> <!-- お気に入りグループ -->
<div class="category"><div class="category_name"><span>お気に入り</span></div></div> <div class="category">
<div class="category_name"><span>お気に入り</span></div>
</div>
<div id="favoriteList"></div> <div id="favoriteList"></div>
<div id="myGroupList"></div> <div id="myGroupList"></div>
...@@ -172,6 +175,8 @@ ...@@ -172,6 +175,8 @@
<div id="loadingArea"></div> <div id="loadingArea"></div>
<div id="myProfileModal"></div> <div id="myProfileModal"></div>
<div id="userProfileModal"></div> <div id="userProfileModal"></div>
<!-- Library -->
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.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/ko.js" charset="UTF-8"></script>
...@@ -179,63 +184,38 @@ ...@@ -179,63 +184,38 @@
<script src="./js/libs/mustache.min.js"></script> <script src="./js/libs/mustache.min.js"></script>
<script src="./js/libs/bootstrap.min.js"></script> <script src="./js/libs/bootstrap.min.js"></script>
<script src="./js/libs/jquery.mark.min.js"></script> <script src="./js/libs/jquery.mark.min.js"></script>
<script src="./js/contact.js"></script> <!-- Language -->
<script src="./js/common.js"></script> <script src="./js/languages/language.js"></script>
<script src="./js/loading.js"></script> <script src="./js/languages/language_ko.js" charset="UTF-8"></script>
<script src="./js/language.js"></script> <script src="./js/languages/language_ja.js" charset="UTF-8"></script>
<script src="./js/language_ko.js" charset="UTF-8"></script> <script src="./js/languages/language_en.js" charset="UTF-8"></script>
<script src="./js/language_ja.js" charset="UTF-8"></script> <!-- Common -->
<script src="./js/language_en.js" charset="UTF-8"></script> <script src="./js/common/constant.js"></script>
<script src="./js/constant.js"></script> <script src="./js/common/native-bridge-delegate.js"></script>
<script src="./js/chat.js"></script> <script src="./js/common/native-bridge-datasource.js"></script>
<script src="./js/chat-ui.js"></script> <script src="./js/common/common.js"></script>
<script src="./js/chat-util.js"></script> <script src="./js/utils/chat-util.js"></script>
<script src="./js/chat-db.js"></script> <!-- Models -->
<script src="./js/chat-db-foriOS.js"></script> <script src="./js/Models/deviceinfo.js"></script>
<script> <script src="./js/Models/serverinfo.js"></script>
String.prototype.replaceAll = function(org, dest) { <script src="./js/Models/userinfo.js"></script>
return this.split(org).join(dest); <!-- View -->
} <script src="./js/views/contact/contact.js"></script>
<script src="./js/views/contact/namecard.js"></script>
<script src="./js/common/loading.js"></script>
let CHAT_SERVER_URL = ''; <script>
let CMS_SERVER_URL = '';
let ASSET_PATH = './';
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
if (typeof(android) != "undefined") { const groupID = NativeBridgeDataSource.getToMoveGroupId();
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
let groupId; if (groupID != "" && groupID != undefined) {
if (typeof(android) != "undefined") { Contact.refreshAllGroupSearch(groupID);
groupId = android.getToMoveGroupId(); NativeBridgeDelegate.setToMoveGroupId("");
} else {
groupId = CHAT_DB.getToMoveGroupId();
}
if (groupId != "" && groupId != undefined) {
CHAT_UI.refreshAllGroupSearch(groupId);
if (typeof(android) != "undefined") {
android.setToMoveGroupId("");
} else { } else {
webkit.messageHandlers.setToMoveGroupId.postMessage(""); Contact.refreshContactScreen();
} }
} else {
CHAT_UI.refreshContactScreen();
}
};
</script> </script>
</body> </body>
......
#coviewShareMainBtn{
padding-top: 9px;
}
.white_board #canvasRemote { .white_board #canvasRemote {
background-color: white !important; background-color: white !important;
...@@ -32,34 +30,6 @@ ...@@ -32,34 +30,6 @@
display: none !important; display: none !important;
} }
.coview_share_dropdown_bar{
display: none;
list-style: none;
padding: unset;
margin: unset;
/* padding-top: 58px; */
background: #000;
position: absolute;
width: 100%;
top: 57px;
left: 0px;
padding-top: 10px;
}
.coview_share_dropdown_bar ul{
list-style: none;
padding: unset;
margin: unset;
}
.coview_share_dropdown_bar li{
display: inline-block;
width: 24%;
height: 75px;
line-height: 52px;
margin: unset;
padding: unset;
background: #000;
text-align: center;
}
.coview_share_dropdown_btn{ .coview_share_dropdown_btn{
background: transparent; background: transparent;
border: none; border: none;
...@@ -92,51 +62,7 @@ ...@@ -92,51 +62,7 @@
margin-top: 4px; margin-top: 4px;
color: #fff; color: #fff;
} }
.coview_share_title_name{
display: inline-block;
height: 58px;
line-height: 58px;
padding: 0;
margin: 0;
color: #fff;
}
.coview_share_photo_select_bubble{
display: none;
position: absolute;
padding: 2px;
background: #3e3e3e;
border-radius: 5px;
margin-top: 156px;
margin-left: 117px;
font-size: 12px;
}
.coview_share_photo_select_bubble:after{
border-top: 0 solid transparent;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 10px solid #3e3e3e;
content: "";
position: absolute;
top: -10px;
left: 22px;
}
.coview_share_photo_select_bubble_in_button{
width: 106px;
height: 39px;
border: none;
text-align: left;
}
.coview_share_photo_select_bubble_in_button.cam{
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.coview_share_photo_select_bubble_in_button.gal{
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-top: solid 0.7px #000;
}
.coview_share_photo_select_bubble_in_button_img{ .coview_share_photo_select_bubble_in_button_img{
width: 27%; width: 27%;
} }
...@@ -144,15 +70,6 @@ ...@@ -144,15 +70,6 @@
margin-left: 5px; margin-left: 5px;
} }
.coview_share_request{
width: 100%;
height: 4em;
background-image: linear-gradient(to top, #82b127, #30c8d2);
color: #fff;
border: none;
border-radius: 5px;
}
.coview_on_screen_btn_area { .coview_on_screen_btn_area {
display: none !important; display: none !important;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="footer-wrap"> <div class="footer-wrap">
<div class="d-flex justify-content-around h-100"> <div class="d-flex justify-content-around h-100">
<div class="footer_item mx-md-3 photo_select_button collaboration_contents picture_contents"> <div class="footer_item mx-md-3 photo_select_button collaboration_contents picture_contents">
<a href="javascript:photo_open_place_holderToggle();"> <a href="javascript:togglePhotoOpenPlaceHolder();">
<div class="d-flex flex-column justify-content-center" id="photo_open_place_holder"> <div class="d-flex flex-column justify-content-center" id="photo_open_place_holder">
<div class="t-icon picture my-0"></div> <div class="t-icon picture my-0"></div>
<span class="text-white txt">ピクチャ</span> <span class="text-white txt">ピクチャ</span>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</a> </a>
</div> </div>
<div class="footer_item mx-md-3 collaboration_contents picture_contents video_contents document_contents board_contents"> <div class="footer_item mx-md-3 collaboration_contents picture_contents video_contents document_contents board_contents">
<a href="javascript:penToggle();"> <a href="javascript:togglePen();">
<div class="d-flex flex-column justify-content-center" id="penBtn"> <div class="d-flex flex-column justify-content-center" id="penBtn">
<div class="t-icon pen disable my-0"></div> <div class="t-icon pen disable my-0"></div>
<span class="text-white txt">ペン</span> <span class="text-white txt">ペン</span>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</a> </a>
</div> </div>
<div class="footer_item mx-md-3 collaboration_contents picture_contents video_contents document_contents board_contents"> <div class="footer_item mx-md-3 collaboration_contents picture_contents video_contents document_contents board_contents">
<a href="javascript:eraserToggle();"> <a href="javascript:toggleEraser();">
<div class="d-flex flex-column justify-content-center" id="eraserBtn"> <div class="d-flex flex-column justify-content-center" id="eraserBtn">
<div class="t-icon delete my-0"></div> <div class="t-icon delete my-0"></div>
<span class="text-white txt">削除</span> <span class="text-white txt">削除</span>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</a> </a>
</div> </div>
<div class="footer_item mx-md-3 collaboration_contents video_contents_host"> <div class="footer_item mx-md-3 collaboration_contents video_contents_host">
<a href="javascript:captureToggle();"> <a href="javascript:toggleCapture();">
<div class="d-flex flex-column justify-content-center" id="captureBtn"> <div class="d-flex flex-column justify-content-center" id="captureBtn">
<div class="t-icon capture my-0"></div> <div class="t-icon capture my-0"></div>
<span class="text-white txt">キャプチャ</span> <span class="text-white txt">キャプチャ</span>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</a> </a>
</div> </div>
<div class="footer_item mx-md-3 collaboration_contents video_contents_user"> <div class="footer_item mx-md-3 collaboration_contents video_contents_user">
<a href="javascript:captureRequestToggle();"> <a href="javascript:toggleCaptureRequest();">
<div class="d-flex flex-column justify-content-center" id="captureRequestBtn"> <div class="d-flex flex-column justify-content-center" id="captureRequestBtn">
<div class="t-icon capture my-0"></div> <div class="t-icon capture my-0"></div>
<span class="text-white txt">キャプチャリクエスト</span> <span class="text-white txt">キャプチャリクエスト</span>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</a> </a>
</div> </div>
<div class="footer_item mx-md-3"> <div class="footer_item mx-md-3">
<a href="javascript:micTogle();"> <a href="javascript:toggleMic();">
<div class="d-flex flex-column justify-content-center" id="micBtn"> <div class="d-flex flex-column justify-content-center" id="micBtn">
<div class="t-icon voice my-0"></div> <div class="t-icon voice my-0"></div>
<span class="text-white txt">マイク</span> <span class="text-white txt">マイク</span>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</a> </a>
</div> </div>
<div class="footer_item mx-md-3 none host_contents"> <div class="footer_item mx-md-3 none host_contents">
<a href="javascript:recordTogle();"> <a href="javascript:toggleRecord();">
<div class="d-flex flex-column justify-content-center" id="recordBtn"> <div class="d-flex flex-column justify-content-center" id="recordBtn">
<div class="t-icon record my-0"></div> <div class="t-icon record my-0"></div>
<span class="text-white txt">録音</span> <span class="text-white txt">録音</span>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</a> </a>
</div> </div>
<div class="footer_item mx-md-3"> <div class="footer_item mx-md-3">
<a href="javascript:Coview_exitCollaboration(isDocument);"> <a href="javascript:CoviewBridge.exitCollaboration();">
<div class="img_wrap bg_red mx-1"> <div class="img_wrap bg_red mx-1">
<img src="icon/icon_close_white.png" alt="閉じる"> <img src="icon/icon_close_white.png" alt="閉じる">
</div> </div>
......
NativeBridgeDataSource.getCollaborationJoinFlg = function () {
if (typeof android != "undefined") {
return android.getCollaborationJoinFlg();
} else {
return callNativeApp(NATIVE_KEY_IOS.getCollaborationJoinFlg, {});
}
};
var CoviewUserInfo = class {
sid;
loginId;
roomId;
shopName;
collaborationType;
joinType;
isLeaved;
meetingID;
constructor(sid, loginId, roomId, shopName) {
this.sid = sid;
this.loginId = loginId;
this.roomId = roomId;
this.shopName = shopName;
const unwrappedType = NativeBridgeDataSource.getJoinCollaborationType();
this.collaborationType = this.parseNumberToCoworkType(unwrappedType);
this.joinType = NativeBridgeDataSource.getCollaborationJoinFlg();
this.isLeaved = false;
this.meetingID = 0;
}
get coWorkType() {
switch (this.collaborationType) {
case COLLABORATION_TYPE.AUDIO:
return COLLABORATION_TYPE.AUDIO;
case COLLABORATION_TYPE.CAMERA:
return COLLABORATION_TYPE.CAMERA;
case COLLABORATION_TYPE.VIDEO:
return COLLABORATION_TYPE.VIDEO;
case COLLABORATION_TYPE.DOCUMENT:
return COLLABORATION_TYPE.AUDIO;
case COLLABORATION_TYPE.BOARD:
return COLLABORATION_TYPE.AUDIO;
}
}
isInvited() {
this.joinType == COLLABORATION_JOIN_TYPE.INVITED;
}
parseNumberToCoworkType(type) {
switch (type) {
case COLLABORATION_TYPE_NUMBER.AUDIO:
return COLLABORATION_TYPE.AUDIO;
case COLLABORATION_TYPE_NUMBER.CAMERA:
return COLLABORATION_TYPE.CAMERA;
case COLLABORATION_TYPE_NUMBER.VIDEO:
return COLLABORATION_TYPE.VIDEO;
case COLLABORATION_TYPE_NUMBER.DOCUMENT:
return COLLABORATION_TYPE.DOCUMENT;
case COLLABORATION_TYPE_NUMBER.BOARD:
return COLLABORATION_TYPE.BOARD;
default:
return 0;
}
}
getCollaborarionTypeAsNumber() {
return this.parseCoworkTypeToNumber(this.collaborationType);
}
parseCoworkTypeToNumber(type) {
switch (type) {
case COLLABORATION_TYPE.AUDIO:
return COLLABORATION_TYPE_NUMBER.AUDIO;
case COLLABORATION_TYPE.CAMERA:
return COLLABORATION_TYPE_NUMBER.CAMERA;
case COLLABORATION_TYPE.VIDEO:
return COLLABORATION_TYPE_NUMBER.VIDEO;
case COLLABORATION_TYPE.DOCUMENT:
return COLLABORATION_TYPE_NUMBER.DOCUMENT;
case COLLABORATION_TYPE.BOARD:
return COLLABORATION_TYPE_NUMBER.BOARD;
default:
return 0;
}
}
};
// variable name for legacy connection to agent_app.js in coview library
var globalUserInfo = new CoviewUserInfo(
currentUserInfo.sid,
currentUserInfo.loginID,
roomInfo.roomID,
currentUserInfo.shopName
);
NativeBridgeDataSource.getDeviceInfo = function () {
if (typeof android != "undefined") {
return JSON.parse(android.getDeviceInfo());
} else {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getDeviceInfo, {}));
}
};
var DeviceInfo = class {
isMoble; // iphone or iPad
platform; // ios or android
androidVersion;
constructor(deviceInfo) {
this.isMoble = deviceInfo.isMoble;
this.platform = deviceInfo.platform;
if (typeof android != "undefined") {
this.androidVersion = android.getAndroidVersion();
}
}
isiOS() {
return this.platform == "ios";
}
isAndroid() {
return this.platform == "android";
}
isMobile() {
return this.isMoble == "true";
}
};
var deviceInfo = new DeviceInfo(NativeBridgeDataSource.getDeviceInfo());
// WARN:: this variable is only for use in coview. and should request not to use this.
var isIos = deviceInfo.isiOS();
NativeBridgeDataSource.getRoomInfo = function () {
if (typeof android != "undefined") {
return JSON.parse(android.getRoomInfo());
} else {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getRoomInfo, {}));
}
};
var RoomInfo = class {
roomID;
roomName;
roomType;
constructor(roomInfo) {
this.roomID = roomInfo.roomID;
this.roomName = roomInfo.roomName;
this.roomType = roomInfo.roomType;
}
};
var roomInfo = new RoomInfo(NativeBridgeDataSource.getRoomInfo());
NativeBridgeDataSource.getServerInfo = function () {
if (typeof android != "undefined") {
return JSON.parse(android.getServerInfo());
} else {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getServerInfo, {}));
}
};
var ServerInfo = class {
chatURL;
cmsURL;
isOnline;
constructor(serverInfo) {
this.chatURL = serverInfo.chatURL;
this.cmsURL = serverInfo.cmsURL;
this.isOnline = serverInfo.isOnline;
}
};
var serverInfo = new ServerInfo(NativeBridgeDataSource.getServerInfo());
var JoinInfo = class {
sid;
loginId;
shopName;
roomId;
roomName;
shopMemberId;
constructor(sid, loginId, shopName, roomId, roomName, shopMemberId) {
this.sid = sid;
this.loginId = loginId;
this.shopName = shopName;
this.roomId = roomId;
this.roomName = roomName;
this.shopMemberId = shopMemberId;
}
};
NativeBridgeDataSource.getMyUserInfo = function () {
if (typeof android != "undefined") {
return JSON.parse(android.removeFavoriteGroup(groupID));
} else {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.currentUserInfo, {}));
}
};
var CurrentUserInfo = class {
sid;
loginID;
shopName;
shopMemberID;
languageCode;
constructor(userInfo) {
this.sid = userInfo.sid;
this.loginID = userInfo.loginId;
this.shopName = userInfo.shopName;
this.shopMemberID = userInfo.shopMemberId;
if (userInfo.languageCode == undefined) {
userInfo.languageCode = "jp";
}
this.languageCode = userInfo.languageCode;
}
configureLanguage(languageCode = undefined) {
if (languageCode == undefined) {
languageCode = this.languageCode;
}
moment.locale(languageCode);
setLanguage(languageCode);
}
};
var currentUserInfo = new CurrentUserInfo(
NativeBridgeDataSource.getMyUserInfo()
);
currentUserInfo.configureLanguage();
// 名前空間
var ARCHIVE_UI = {};
document.addEventListener("DOMContentLoaded", function () {
// アーカイブ検索
bindArchiveSearch();
// iOSキーボード変換検知用
bindiOSKeyBoardEvent();
});
ARCHIVE_UI.refreshSearchScreen = function (keyword) {
const archiveList = CHAT_DB.getArchiveByName(keyword);
const typeImage = getArchiveTypeIconURL(archive.archiveType);
getArchiveTemplate().then(function (archiveTemplate) {
archiveList.forEach(function (archive) {
let html = renderArchiveTemplate(
archiveTemplate,
archive.archiveId,
archive.archiveName,
archive.archiveDate,
typeImage
);
let obj = jQuery.parseHTML(html);
$(".overlay_src_msg").append(obj);
});
});
};
//* UTILS *//
const ARCHIVE_TYPE = {
PICTURE: 0,
VIDEO: 1,
VOICE: 2,
DOCUMENT: 3,
};
var getArchiveTypeIconURL = function (type) {
switch (type) {
case ARCHIVE_TYPE.PICTURE:
return "icon/icon_collabo_picture.png";
case ARCHIVE_TYPE.VIDEO:
return "icon/icon_collabo_videocam.png";
case ARCHIVE_TYPE.VOICE:
return "icon/icon_collabo_headset.png";
case ARCHIVE_TYPE.DOCUMENT:
return "icon/icon_collabo_document.png";
default:
return "";
}
};
var getArchiveTemplate = function () {
return new Promise(function (resolve, reject) {
$.get({ url: TemplateURL.ARCHIVE_LIST, async: false }, function (text) {
resolve(text);
});
});
};
var bindArchiveSearch = function () {
const searchInput = $('#archive .search_form input[type="search"]');
searchInput.keyup(function (e) {
var keyword = searchInput.val();
const enterKeyPressed = e.KeyCode == 13 || e.key == "Enter";
const keywordEmpty = keyword == "" || keyword.length < 2;
const keywordNotEmpty = keyword.length != 0 && keyword != "";
if (enterKeyPressed) {
if (keywordNotEmpty) {
searchInput.blur();
return;
}
} else if (keywordEmpty) {
$(".overlay_src_msg").empty();
return;
}
$(".overlay_src_msg").empty();
ARCHIVE_UI.refreshSearchScreen(keyword);
if (enterKeyPressed) {
searchInput.blur();
return;
}
// 検索結果を表示
});
};
var bindiOSKeyBoardEvent = function () {
const searchInput = $('#archive .search_form input[type="search"]');
searchInput.on("compositionend", function () {
if (CHAT_UTIL.isIOS()) {
var keyword = searchInput.val();
$(".overlay_src_msg").empty();
ARCHIVE_UI.refreshSearchScreen(keyword);
}
});
};
var renderArchiveTemplate = function (
html,
archiveId,
archiveName,
archiveDate,
typeImageURL
) {
return Mustache.render(html, {
archiveId: archiveId,
fileName: archiveName,
insertDate: archiveDate,
typeImage: typeImageURL,
});
};
// 名前空間
var CHAT_ADD_USER = {};
document.addEventListener("DOMContentLoaded", function () {
// メンバー検索
bindMemberSearch();
// iOSキーボード変換検知用
bindiOSKeyBoardEvent();
});
// ユーザー検索
CHAT_ADD_USER.searchUser = function (keyword) {
const isAllGroup = $("#tabAllGroupOnAddUser").is(":checked");
const overlayMessage = $(".overlay_src_msg");
let hasNoData = false;
overlayMessage.empty();
//全グループ検索画面
if (isAllGroup) {
//グループデータ検索
const groupList = CHAT_DB.getGroupByName(keyword);
searchGroupData(groupList, overlayMessage);
//ユーザデータ検索
var userList = CHAT_DB.getAllGroupShopMemberNotInRoomByName(keyword);
searchUserData(userList, overlayMessage);
hasNoData = userList.length == 0 && groupList.length == 0;
//連絡先画面
} else {
var userList = CHAT_DB.getMyGroupShopMemberNotInRoomByName(keyword);
searchUserData(userList, overlayMessage);
hasNoData = userList.length == 0;
}
// Set NoResult
if (hasNoData) {
const noResultMessage = getNoResultMessage();
overlayMessage.append(noResultMessage);
}
};
/** UTILS */
var bindMemberSearch = function () {
const searchInput = $('#chat_add_user .search_form input[type="search"]');
searchInput.click(function (e) {
//画面タイトル設定
let contactListTitle = getLocalizedString("userSearch");
$("#addUserTitle").text(contactListTitle);
});
searchInput.keyup(function (e) {
const keyword = searchInput.val();
const enterKeyPressed = e.key == "Enter" || e.KeyCode == 13;
const keywordNotEmpty = keyword != "" && keyword.length != 0;
const keywordEmpty = keyword == "" || keyword.length < 2;
if (enterKeyPressed) {
if (keywordNotEmpty) {
searchInput.blur();
return false;
}
} else if (keywordEmpty) {
$(".overlay_src_msg").empty();
return false;
}
CHAT_ADD_USER.searchUser(keyword);
if (enterKeyPressed) {
searchInput.blur();
return;
}
});
};
var bindiOSKeyBoardEvent = function () {
const searchInput = $('#chat_add_user .search_form input[type="search"]');
searchInput.on("compositionend", function () {
if (CHAT_UTIL.isIOS()) {
var keyword = searchInput.val();
CHAT_ADD_USER.searchUser(keyword);
}
});
};
var searchGroupData = function (groupList, overlayMessage) {
const groupTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
groupList.forEach(function (group) {
let html = renderGroupTemplate(
groupTemplate,
group.groupName,
group.groupId
);
let obj = jQuery.parseHTML(html);
overlayMessage.append(obj);
});
};
var renderGroupTemplate = function (groupTemplate, groupName, groupID) {
return Mustache.render(groupTemplate, {
name: groupName,
id: groupID,
});
};
var searchUserData = function (userList, overlayMessage) {
const userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
userList.forEach(function (user) {
setUserProfile(user);
checkUser(user);
});
let html = renderUserTemplate(userTemplate, userList);
let obj = jQuery.parseHTML(html);
overlayMessage.append(obj);
};
var setUserProfile = function (user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
};
var checkUser = function (user) {
let findObj = CHAT.globalSelectedUserList.find(function (shopMemberId) {
return shopMemberId == user.shopMemberId;
});
if (findObj) {
user.checked = "checked";
}
};
var renderUserTemplate = function (userTemplate, userList) {
return Mustache.render(userTemplate, {
userList: userList,
});
};
// ios用
function callNativeApp(iosKey, jsonData) {
console.log("callNativeApp called");
var result;
try {
var key = iosKey;
var data = jsonData;
var payload = { key: key, data: data };
// payloadの形 {"type":"SJbridge","data":{"name":"abc","role":"dev"}}
// resにObjective-cからのレスポンスが返る
result = prompt(JSON.stringify(payload));
console.log(result);
} catch (err) {
console.log("The native context does not exist yet");
}
return result;
}
CHAT_DB.getBeforeRoomType = function () {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp(NATIVE_KEY_IOS.getBeforeRoomType, {});
}
};
CHAT_DB.getRoomType = function () {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return parseInt(callNativeApp(NATIVE_KEY_IOS.getRoomType, {}), 10);
}
};
CHAT_DB.removeFavoriteUser = function (shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp(NATIVE_KEY_IOS.removeFavoriteUser, {
shopMemberId: shopMemberId,
});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.addFavoriteUser = function (shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp(NATIVE_KEY_IOS.addFavoriteUser, {
shopMemberId: shopMemberId,
});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.removeFavoriteGroup = function (groupId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp(NATIVE_KEY_IOS.removeFavoriteGroup, {
groupId: groupId,
});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.addFavoriteGroup = function (groupId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp(NATIVE_KEY_IOS.addFavoriteGroup, {
groupId: groupId,
});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.getCollaborationJoinFlg = function () {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp(NATIVE_KEY_IOS.getCollaborationJoinFlg, {});
}
};
CHAT_DB.getUserInfoList = function (shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp(NATIVE_KEY_IOS.getUserInfoList, {
shopMemberId: shopMemberId,
});
}
};
CHAT_DB.createContentView = function () {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return parseInt(callNativeApp(NATIVE_KEY_IOS.createContentView, {}));
}
};
CHAT_DB.getToMoveGroupId = function () {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp(NATIVE_KEY_IOS.getToMoveGroupId, {});
}
};
CHAT_DB.getJoinCollaborationType = function () {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return parseInt(
callNativeApp(NATIVE_KEY_IOS.getJoinCollaborationType, {}),
10
);
}
};
CHAT_DB.getHostRequestFlg = function () {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return parseInt(callNativeApp(NATIVE_KEY_IOS.getHostRequestFlg, {}), 10);
}
};
// 名前空間
var CHAT_DB = {};
includeJs("./js/chat-db-foriOS.js");
//ロカールDBからルーム一覧情報を取得
CHAT_DB.getRoomList = function (roomType, keyWord) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getRoomList, {
roomType: roomType,
keyWord: keyWord,
})
);
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getRoomList(roomType, keyWord));
}
};
CHAT_DB.callGetRoomList = function (roomType) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getRoomList, { roomType: roomType })
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getRoomList(roomType));
}
};
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB.getMyInfo = function () {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getMyInfo, {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyInfo());
}
};
CHAT_DB.getMessages = function (roomId) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getMessages, { roomId: roomId })
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMessageList(roomId));
}
};
CHAT_DB.getMessagesWithMessageId = function (messageId) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getMessageListFromMessageId, {
messageId: messageId
})
);
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getMessageListFromMessageId(messageId));
}
};
CHAT_DB.getFavoriteUsersNotInRoom = function () {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getFavoriteUsersNotInRoom, {})
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteUsersNotInRoom());
}
};
CHAT_DB.getFavoriteUsers = function () {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getFavoriteUsers, {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteUsers());
}
};
CHAT_DB.getFavoriteGroups = function () {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getFavoriteGroups, {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteGroups());
}
};
CHAT_DB.getMyGroupUsers = function () {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getMyGroupUsers, {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupUsers());
}
};
CHAT_DB.getGroupInfo = function (groupId) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getGroupInfo, { groupId: groupId })
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getGroupInfo(groupId));
}
};
CHAT_DB.getGroupInfoForAddUser = function (groupId) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getGroupInfoForAddUser, { groupId: groupId })
);
} 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(NATIVE_KEY_IOS.getSelectedUserList, {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
console.log(JSON.parse(android.getSelectedUserList()));
return JSON.parse(android.getSelectedUserList());
}
};
CHAT_DB.getNameCardData = function (shopMemberId) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getNameCardData, {
shopMemberId: shopMemberId,
})
);
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getNameCardData(shopMemberId));
}
};
CHAT_DB.getMyGroupShopMemberByName = function (shopMemberName) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getMyGroupShopMemberByName, {
shopMemberName: shopMemberName,
})
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupShopMemberByName(shopMemberName));
}
};
CHAT_DB.getMyGroupShopMemberNotInRoomByName = function (shopMemberName) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getMyGroupShopMemberNotInRoomByName, {
shopMemberName: shopMemberName,
})
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(
android.getMyGroupShopMemberNotInRoomByName(shopMemberName)
);
}
};
CHAT_DB.getAllGroupShopMemberByName = function (shopMemberName) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getAllGroupShopMemberByName, {
shopMemberName: shopMemberName,
})
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getAllGroupShopMemberByName(shopMemberName));
}
};
CHAT_DB.getAllGroupShopMemberNotInRoomByName = function (shopMemberName) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getAllGroupShopMemberNotInRoomByName, {
shopMemberName: shopMemberName,
})
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(
android.getAllGroupShopMemberNotInRoomByName(shopMemberName)
);
}
};
CHAT_DB.getGroupByName = function (groupName) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getGroupByName, { groupName: groupName })
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getGroupByName(groupName));
}
};
CHAT_DB.getUsersInRoom = function (roomId) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getUsersInRoom, { roomId: roomId })
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getUsersInRoom(roomId));
}
};
// アーカイブ一覧
CHAT_DB.getArchiveList = function () {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getArchiveList, {}));
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getArchiveList());
}
};
CHAT_DB.updateArchiveList = function () {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateArchiveList.postMessage({});
} else if (CHAT_UTIL.isAndroid()) {
android.updateArchiveList();
}
};
// アーカイブ一覧検索
CHAT_DB.getArchiveByName = function (archiveName) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getArchiveByName, {
archiveName: archiveName,
})
);
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getArchiveListByName(archiveName));
}
};
// アーカイブ詳細
CHAT_DB.getArchiveDetail = function (archiveId) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getArchiveDetail, { archiveId: archiveId })
);
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getArchiveDetail(archiveId));
}
};
CHAT_DB.updateArchiveDetail = function (archiveId) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateArchiveDetail.postMessage(archiveId);
} else if (CHAT_UTIL.isAndroid()) {
android.updateArchiveDetail(archiveId);
}
};
CHAT_DB.searchMessages = function (keyword, userList) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.searchMessages, {
keyWord: keyword,
userList: userList,
})
);
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.searchMessages(keyword, userList));
}
};
CHAT_DB.getMyGroupUsersNotInRoom = function () {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getMyGroupUsersNotInRoom, {})
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupUsersNotInRoom());
}
};
CHAT_DB.getUserInfo = function (shopMemberId) {
if (shopMemberId == "") {
return;
}
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getUserInfo, { shopMemberId: shopMemberId })
);
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getUserInfo(shopMemberId));
}
};
CHAT_DB.getUserListByLoginId = function (loginIdList) {
console.log(loginIdList);
if (CHAT_UTIL.isIOS()) {
return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getUserListByLoginId, {
loginIdList: loginIdList.join(","),
})
);
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getUserListByLoginId(loginIdList.join(",")));
}
};
jQuery("#homeButton").on("click", function () {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.goHome.postMessage({});
} 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();
}
});
var lastscrollvalue;
window.onscroll = function () {
if (beforeScroll == window.scrollY) {
return;
}
beforeScroll = window.scrollY;
const beforeHeight = $(".room_container").height();
messageCount = $(".chat_message").length;
if ($(this).scrollTop() === 0 && messageCount >= PagingSize.MESSAGE) {
if (!$("#chatLoader").is(":visible")) {
let loader = $(
'<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>'
);
$("#messages").prepend(loader);
const messageId = $($(".chat_message").get(0)).data("messageid");
let messages;
if (typeof android != "undefined") {
if (IS_ONLINE == "true") {
android.updatePreMessage(messageId);
}
} else {
// 追加メッセージUpdate、get
webkit.messageHandlers.updatePreMessage.postMessage({ messageId: messageId });
}
messages = CHAT_DB.getMessagesWithMessageId(messageId);
CHAT_UI.prependMessage(messages);
loader.remove();
var afterHeight = $(".room_container").height();
window.scroll(0, afterHeight - beforeHeight);
}
}
};
$("#roomNameChangeBtn").click(function () {
var changeRoomName = $("#roomNameInput").val();
var trimmedRoomName = $("#roomNameInput").val().trim();
if (trimmedRoomName.length == 0) {
alert(getLocalizedString("error_empty_room_name"));
return;
}
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.changeRoomName.postMessage(changeRoomName);
} else if (CHAT_UTIL.isAndroid()) {
android.changeRoomName(changeRoomName);
}
});
/*
$('#messages').scroll(function() {
console.log('messagescroll');
if ($(this).scrollTop() === 0) {
if (!$('#chatLoader').is(':visible')) {
// 現在、メッセージの個数以前をメッセージを読み込む
// ローディングアイコンを追加する
let loader = $('<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>')
$('#messages').prepend(loader)
loader.remove();
// socket.emit('getMessages', $(this).children().length, function() {
// // ローディングアイコンを削除する
// loader.remove();
// });
}
}
});*/
var bindOnRefreshGroupList = function () {
// Update Group List(Invite)
socket.on(SOCKET_KEY.REFRESH_GROUPLIST, function (groups, isInvite) {
const groupListElement = $("#group_list");
groupListElement.html("");
const template = $("#group-template").html();
if (groups.length === 0) {
groupListElement.append(
'<center class="text-secondary">' +
getLocalizedString(everyoneIsHere) +
"</center>"
);
}
addGroupNameAndNumberOfUsers(groups);
// Rotate
handleRotate();
updateTopBar();
// Set Title
updateTopBar(isInvite);
updateUserSelectionLength();
setupBackButton();
});
};
var addGroupNameAndNumberOfUsers = function (groups) {
// グループ名と人数を表記する。
groups.forEach(function (group) {
let html = Mustache.render(template, {
name: group.groupName,
info: group.memberCnt + getLocalizedString("people"),
});
// グループをクリックすると、該当グループのユーザーリストを読み込むようにイベントを与える
let obj = $(jQuery.parseHTML(html)).on("click", function () {
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
socket.emit("getUserListInGroup", group.groupId, isInvite);
$("#groupName").text(group.groupName);
});
groupListElement.append(obj);
});
};
var handleRotate = function () {
if (CHAT_UI.isLandscapeMode()) {
$(".group_list").addClass("col-6").removeClass("col-12");
}
};
var setupBackButton = function () {
const backButton = $("#backButton");
backButton.show();
backButton.off().on("click", function () {
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
if (isInvite) {
$("#pills-chat-tab").tab("show");
} else {
if (IS_ONLINE == "true") {
android.updateRoomList();
CHAT_UI.refreshRoomList(ChatRoomType.DM);
CHAT_UI.dismissLoadingIndicator();
}
}
});
};
var updateUserSelectionLength = function () {
const userSelectionLength = $("#userSelectionLength");
if (CHAT.globalSelectedUserList.length > 0) {
userSelectionLength.text(CHAT.globalSelectedUserList.length);
} else {
userSelectionLength.text("");
}
};
var updateTopBar = function (isInvite) {
// Set Title
let memberSelectTitle = getLocalizedString("groupSearch");
$("#pills-group-tab").tab("show");
const titleRoomName = $(".titleRoomName");
const userSelectionConfirmButton = $("#userSelectionConfirmBtn");
titleRoomName.text(memberSelectTitle);
if (isInvite) {
$("#newRoomName, .roomListIcon, .chatRoomIcon").hide();
} else {
$(".roomListIcon, .chatRoomIcon, #newRoomName").hide();
}
userSelectionConfirmButton.show();
userSelectionConfirmButton.off().on("click", function () {
CHAT_UI.setConfirmButtonEvent(isInvite);
});
};
var bindOnRefreshUserListInGroup = function () {
// Update User List(Invite)
// #36170
socket.on(
SOCKET_KEY.REFRESH_USERLIST_INGROUP,
function (users, groupId, isInvite) {
$("#user_list").html("");
// Set Title
updateTitle();
addUserList(users);
// Rotate
handleRotateOnUserListInGroup();
setupBackButtonOnUserListInGroup(isInvite);
setupUserSelectionConfirmButton(isInvite);
updateUIOnUserListInGroup();
}
);
};
var updateTitle = function () {
let memberSelectTitle = getLocalizedString("userSearch");
$(".titleRoomName").text(memberSelectTitle);
};
var addUserList = function (users) {
users.forEach(function (user) {
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
user.profileImagePath = CHAT.getProfileImgUrl(user.profileImagePath);
// クリックするとactive クラスを与え、チェック表示を出させる。
let obj = activateCheckUser(
user.loginId,
user.shopMemberId,
user.profileImagePath
);
let findObj = CHAT.globalSelectedUserList.find(function (selectedUser) {
return selectedUser.loginId == user.loginId;
});
if (findObj) {
$(obj).find(".userCheckBox").toggleClass("active");
}
$("#user_list").append(obj);
});
};
var renderUser = function (template, userID, profileImagePath, userName) {
return Mustache.render(template, {
id: userID,
profileImage: profileImagePath,
name: userName,
});
};
var activateCheckUser = function (loginID, shopMemberID, profileImagePath) {
const template = $("#user-template").html();
let html = renderUser(template, shopMemberID, profileImagePath, loginID);
return $(jQuery.parseHTML(html)).on("click", function () {
if ($(this).find(".userCheckBox.active").length > 0) {
// remove
CHAT.globalSelectedUserList = filterRemovedUser(loginID);
} else {
// add
addSelectedUser(loginID, shopMemberID, profileImagePath);
}
$(this).find(".userCheckBox").toggleClass("active");
updateUserSelectionLength();
});
};
var filterRemovedUser = function (userID) {
return CHAT.globalSelectedUserList.filter(function (element) {
return userID != element.loginId;
});
};
var addSelectedUser = function (loginID, shopMemberID, profileImagePath) {
CHAT.globalSelectedUserList.push({
loginId: loginID,
shopMemberId: shopMemberID,
profileImagePath: profileImagePath,
});
};
var handleRotateOnUserListInGroup = function () {
if (CHAT_UI.isLandscapeMode()) {
$(".user_list").addClass("col-6").removeClass("col-12");
$(".squareBoxContent span").addClass("landscape_span");
}
};
var setupBackButtonOnUserListInGroup = function (isInvite) {
const backButton = $("#backButton");
backButton.off().on("click", function () {
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
socket.emit("getGroupList", isInvite);
});
backButton.show();
};
var setupUserSelectionConfirmButton = function (isInvite) {
const userSelectionConfirmButton = $("#userSelectionConfirmBtn");
userSelectionConfirmButton.off().on("click", function () {
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
CHAT_UI.setConfirmButtonEvent(isInvite);
});
userSelectionConfirmButton.show();
};
var updateUIOnUserListInGroup = function () {
$(".roomListIcon, .chatRoomIcon").hide();
$(".userCheckBox").show();
$("#pills-user-tab").tab("show");
};
// 名前空間
var CHAT_MAKE_ROOM = {};
document.addEventListener("DOMContentLoaded", function () {
// メンバー検索
searchMember();
// iOSキーボード変換検知用
bindiOSKeyBoardEvent();
});
// メンバー検索
CHAT_MAKE_ROOM.searchUser = function (keyword) {
const overlayMessage = $(".overlay_src_msg");
const isAllGroup = $("#tabAllGroupOnMakeRoom").is(":checked");
let hasNoData = false;
overlayMessage.empty();
//全グループ検索画面
if (isAllGroup) {
//グループデータ検索
var groupList = CHAT_DB.getGroupByName(keyword);
var groupTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
groupList.forEach(function (group) {
let html = renderRoomList(groupTemplate, group.groupName, group.groupId);
let obj = jQuery.parseHTML(html);
overlayMessage.append(obj);
});
//ユーザデータ検索
var userList = CHAT_DB.getAllGroupShopMemberByName(keyword);
searchUserData(userList);
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
let html = renderUser(userTemplate, userList);
let obj = jQuery.parseHTML(html);
overlayMessage.append(obj);
hasNoData = groupList.length == 0 && userList.length == 0;
//連絡先画面
} else {
const userList = CHAT_DB.getMyGroupShopMemberByName(keyword);
searchUserData(userList);
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
let html = renderUser(userTemplate, userList);
let obj = jQuery.parseHTML(html);
$(".overlay_src_msg").html(obj);
hasNoData = userList.length == 0;
}
if (hasNoData) {
const noResultMsg = getNoResultMessage();
overlayMessage.append(noResultMsg);
}
};
/** UTIL */
var searchMember = function () {
const searchInput = $('#chatMakeRoom .search_form input[type="search"]');
searchInput.click(function (e) {
let contactListTitle = getLocalizedString("userSearch");
$("#makeRoomTitle").text(contactListTitle);
});
searchInput.keyup(function (e) {
var keyword = searchInput.val();
const enterKeyPressed = e.KeyCode == 13 || e.key == "Enter";
const keywordEmpty = keyword == "" || keyword.length < 2;
const keywordNotEmpty = keyword != "" && keyword.length != 0;
//画面タイトル設定
if (enterKeyPressed) {
if (keywordNotEmpty) {
searchInput.blur();
return false;
}
} else if (keywordEmpty) {
$(".overlay_src_msg").empty();
return false;
}
CHAT_MAKE_ROOM.searchUser(keyword);
if (enterKeyPressed) {
searchInput.blur();
return;
}
});
};
var bindiOSKeyBoardEvent = function () {
const searchInput = $('#chatMakeRoom .search_form input[type="search"]');
searchInput.on("compositionend", function () {
if (CHAT_UTIL.isIOS()) {
var keyword = searchInput.val();
CHAT_MAKE_ROOM.searchUser(keyword);
}
});
};
var renderRoomList = function (url, groupName, groupID) {
return Mustache.render(url, {
name: groupName,
id: groupID,
});
};
var searchUserData = function (userList) {
userList.forEach(function (user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
let findObj = CHAT.globalSelectedUserList.find(function (shopMemberId) {
return shopMemberId == user.shopMemberId;
});
if (findObj) {
user.checked = "checked";
}
});
};
var renderUser = function (url, userList) {
return Mustache.render(url, {
userList: userList,
});
};
document.addEventListener("DOMContentLoaded", function () {
no_scroll();
// メニューオーバーレイ表示
$(".menu_btn").click(function () {
var w = $(this).width();
$(this).toggleClass("hide");
$('#overlay_menu .item').toggleClass('hide');
});
// ユーザーリストオーバーレイ表示
$(".user_btn").click(function () {
var w = $(this).width();
$(this).toggleClass("hide");
$("#overlay_user_list.overlay")
.toggleClass("slidein")
.css({ transform: "translateX(" & -w & ")" });
if($(this).hasClass('hide')){
return_scroll();
}else{
scrollTo(0, 0);
no_scroll();
}
});
// モーダルonモーダル(前のモーダルを非表示に)
// ホスト変更ボタン押下イベント
$(".ch_host_btn").click(function () {
var target = $(this).val();
changeModal(target, "changeHostModal");
});
/* モーダルの切り替え */
function changeModal(beforeModal, afterModal) {
$(beforeModal).modal("hide");
$(afterModal).modal("show");
}
// 閉じるイベント
$(".close_btn").click(function () {
$("#overlay_add_user_list").addClass("none");
no_scroll();
});
// ユーザー追加イベント
$(".inv_btn").click(function () {
$("#overlay_add_user_list").addClass("none");
});
// ユーザー招待メンバー検索
$(".add_user_btn").click(function () {
return_scroll();
CHAT_UI.showLoadingIndicator();
CHAT.globalSelectedUserList = [];
CHAT_UI.refreshMyGroupForAddUserInCollaboration();
$("#addUserConfirmBtnInCollaboration")
.off()
.on("click", function () {
$("#addUserInCollaboration").modal("hide");
if (typeof android != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
webkit.messageHandlers.saveSelectedUserList.postMessage(
CHAT.globalSelectedUserList.join(",")
);
}
CHAT_UI.confirmInviteUserListInCollaboration();
});
});
});
function penOff() {
if (!$("#penBtn .pen").hasClass("disable")) {
$("#coviewPenCtrBtn").click();
$("#penBtn .pen").addClass("disable");
}
}
function no_scroll() {
document.addEventListener("mousewheel", scroll_control, { passive: false });
document.addEventListener("touchmove", scroll_control, { passive: false });
}
// スクロール禁止解除
function return_scroll() {
document.removeEventListener("mousewheel", scroll_control, { passive: false });
document.removeEventListener('touchmove', scroll_control, { passive: false });
}
function scroll_control(event) {
if(event.cancelable){
event.preventDefault();
}
}
\ No newline at end of file
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");
...@@ -31,11 +35,7 @@ $(".category").on("click", function () { ...@@ -31,11 +35,7 @@ $(".category").on("click", function () {
}); });
$(".home_btn").on("click", function () { $(".home_btn").on("click", function () {
if (CHAT_UTIL.isAndroid()) { NativeBridgeDelegate.goHome();
android.goHome();
} else if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.goHome.postMessage({});
}
}); });
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
...@@ -72,24 +72,71 @@ document.addEventListener("DOMContentLoaded", function () { ...@@ -72,24 +72,71 @@ document.addEventListener("DOMContentLoaded", function () {
$(".overlay_src_msg").empty(); $(".overlay_src_msg").empty();
$(".craeteRoomButton").removeClass("none"); $(".craeteRoomButton").removeClass("none");
}); });
});
$(".message_input_form").on("focus", function (e) { var Common = {};
setTimeout(function () {
$(".message_input_send").removeClass("none");
$(".attach_file").addClass("none");
$(".footer_content_b").addClass("none");
}, 10);
});
$(".message_input_form").on("focusout", function (e) { //loadingIndicatorを表示
setTimeout(function () { Common.showLoadingIndicator = function () {
if ($(e.relatedTarget).hasClass("message_input_send")) { const h = $(window).height();
CHAT_UI.sendMessage(); $("#loader-bg ,#loader").height(h).css("display", "block");
};
//loadingIndicatorを表示しない
Common.dismissLoadingIndicator = function () {
const h = $(window).height();
$("#loader-bg ,#loader").height(h).css("display", "none");
};
Common.refreshForOnline = function () {
serverInfo.isOnline = "true";
$(".footer_item a").removeClass("ui-state-disabled");
if (typeof ChatList != "undefined") {
ChatList.refreshForOnline();
}
if (typeof ChatRoom != "undefined") {
ChatRoom.refreshForOnline();
}
if (typeof Namecard != "undefined") {
Namecard.refreshForOnline();
}
};
Common.refreshForOffline = function () {
serverInfo.isOnline = "false";
$(".footer_item a").addClass("ui-state-disabled");
if (typeof ChatList != "undefined") {
ChatList.refreshForOffline();
}
if (typeof ChatRoom != "undefined") {
ChatRoom.refreshForOffline();
}
if (typeof CollaborationUI != "undefined") {
CollaborationUI.refreshForOffline();
}
if (typeof Namecard != "undefined") {
Namecard.refreshForOffline();
}
};
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
// 存在する場合はプロフィール画像取得用APIのURLを生成して返す
Common.getProfileImgUrl = function (path) {
if (path == undefined || path == "") {
return "./img/noImage.png";
} else if (path.includes("/mnt")) {
const userInfo = path.split("/").reverse();
return (
serverInfo.cmsURL +
"/chatapi/user?profileFileName=" +
userInfo[0] +
"&profileGetLoginId=" +
userInfo[1] +
"&sid=" +
currentUserInfo.sid +
"&cmd=12"
);
} else { } else {
$(".message_input_send").addClass("none"); return path;
$(".attach_file").removeClass("none");
$(".footer_content_b").removeClass("none");
} }
}, 10); };
});
});
...@@ -24,7 +24,7 @@ const ChatRoomType = { ...@@ -24,7 +24,7 @@ const ChatRoomType = {
ALL: "2", ALL: "2",
}; };
const CollaborationTypeKey = { const COLLABORATION_TYPE = {
AUDIO: "audio", AUDIO: "audio",
CAMERA: "camera", CAMERA: "camera",
VIDEO: "video", VIDEO: "video",
...@@ -32,7 +32,7 @@ const CollaborationTypeKey = { ...@@ -32,7 +32,7 @@ const CollaborationTypeKey = {
BOARD: "board", BOARD: "board",
}; };
const COLLABORATION_TYPE = { const COLLABORATION_TYPE_NUMBER = {
AUDIO: 0, AUDIO: 0,
CAMERA: 2, CAMERA: 2,
VIDEO: 3, VIDEO: 3,
...@@ -55,7 +55,7 @@ const HostRequestFlag = { ...@@ -55,7 +55,7 @@ const HostRequestFlag = {
}; };
const PagingSize = { const PagingSize = {
MESSAGE: 100 MESSAGE: 100,
}; };
const InvitedFlag = { const InvitedFlag = {
...@@ -63,6 +63,19 @@ const InvitedFlag = { ...@@ -63,6 +63,19 @@ const InvitedFlag = {
INVITED: 1, INVITED: 1,
}; };
const COLLABORATION_JOIN_TYPE = {
HOST: "0",
ATTENDEE: "1",
INVITED: "2",
};
const ARCHIVE_TYPE = {
PICTURE: 0,
VIDEO: 1,
VOICE: 2,
DOCUMENT: 3,
};
const messageSeperator = "<::split>"; const messageSeperator = "<::split>";
const DATA_MESSAGE_SCHEME = "::NOT_MESSAGE"; const DATA_MESSAGE_SCHEME = "::NOT_MESSAGE";
const FINISH_ALL_COLLABORATION_SIGNAL = "::ALL_COLLABORATION_END"; const FINISH_ALL_COLLABORATION_SIGNAL = "::ALL_COLLABORATION_END";
...@@ -78,6 +91,9 @@ const TemplateURL = { ...@@ -78,6 +91,9 @@ const TemplateURL = {
USER_LIST: "./template/template_user_list.html", USER_LIST: "./template/template_user_list.html",
USER_NAME_CARD: "./template/template_user_name_card.html", USER_NAME_CARD: "./template/template_user_name_card.html",
USER_MESSAGE: "./template/template_user_message.html", USER_MESSAGE: "./template/template_user_message.html",
ARCHIVE: "./template/template_archive.html",
ARCHIVE_DETAIL: "./template/template_archive_detail.html",
ARCHIVE_USER: "./template/template_archive_user.html",
MY_NAME_CARD: "./template/template_my_name_card.html", MY_NAME_CARD: "./template/template_my_name_card.html",
MY_MESSAGE: "./template/template_my_message.html", MY_MESSAGE: "./template/template_my_message.html",
OPEN_COLLABORATION_MESSAGE: OPEN_COLLABORATION_MESSAGE:
...@@ -105,6 +121,9 @@ const TemplateURL = { ...@@ -105,6 +121,9 @@ const TemplateURL = {
"./template/template_add_user_group_user_list_in_collaboration.html", "./template/template_add_user_group_user_list_in_collaboration.html",
ADD_USER_GROUP_PATH_IN_COLLABORATION: ADD_USER_GROUP_PATH_IN_COLLABORATION:
"./template/template_add_user_group_path_in_collaboration.html", "./template/template_add_user_group_path_in_collaboration.html",
COLLABORATION_PROFILE: "./modal_collabo_profile.html",
COLLABORATION_OVERLAY_USER_LIST: "collaboration_overlay_user_list.html",
MODAL_ADD_USER_CONFIRM: "./modal_add_user_confirm.html",
}; };
const SOCKET_KEY = { const SOCKET_KEY = {
...@@ -118,9 +137,16 @@ const SOCKET_KEY = { ...@@ -118,9 +137,16 @@ const SOCKET_KEY = {
SHOW_SERVER_ERROR: "showServerError", SHOW_SERVER_ERROR: "showServerError",
RETRY_JOIN_PROCESS: "retryJoinProcess", RETRY_JOIN_PROCESS: "retryJoinProcess",
JOIN: "join", JOIN: "join",
CREATE_MESSAGE: "createMessage",
GET_GROUP_LIST: "getGroupList",
LEAVE_ROOM: "leaveRoom",
}; };
const NATIVE_KEY_IOS = { const NATIVE_KEY_IOS = {
currentUserInfo: "currentUserInfo",
getDeviceInfo: "getDeviceInfo",
getServerInfo: "getServerInfo",
getRoomInfo: "getRoomInfo",
getBeforeRoomType: "getBeforeRoomType", getBeforeRoomType: "getBeforeRoomType",
getRoomType: "getRoomType", getRoomType: "getRoomType",
removeFavoriteUser: "removeFavoriteUser", removeFavoriteUser: "removeFavoriteUser",
...@@ -160,3 +186,5 @@ const NATIVE_KEY_IOS = { ...@@ -160,3 +186,5 @@ const NATIVE_KEY_IOS = {
getMessageListFromMessageId: "getMessageListFromMessageId", getMessageListFromMessageId: "getMessageListFromMessageId",
updatePreMessage: "updatePreMessage", updatePreMessage: "updatePreMessage",
}; };
const BIZ_TASK_YELL_URL = "https://biztaskyell.abookcloud.com";
\ No newline at end of file
// 名前空間
var CONTACT = {};
document.addEventListener("DOMContentLoaded", function () {
// メンバー検索
bindMemeberSearch();
// iOSキーボード変換検知用
bindiOSKeyBoardEvent();
});
// ユーザー検索
CONTACT.searchUser = function (keyword) {
const overlayMessage = $(".overlay_src_msg");
const isAllGroup = $("#tabAllGroup").is(":checked");
let hasNoData = false;
overlayMessage.empty();
//全グループ検索画面
if (isAllGroup) {
//グループデータ検索
const groupList = CHAT_DB.getGroupByName(keyword);
groupDataSearch(groupList);
//ユーザデータ検索
const userList = CHAT_DB.getAllGroupShopMemberByName(keyword);
userDataSearch(userList);
hasNoData = userList.length == 0 && groupList.length == 0;
//連絡先画面
} else {
const userList = CHAT_DB.getMyGroupShopMemberByName(keyword);
userDataSearch(userList);
hasNoData = userList.length == 0;
}
if (hasNoData) {
const noResultMsg = getNoResultMessage();
overlayMessage.append(noResultMsg);
}
};
/** UTILS */
var bindiOSKeyBoardEvent = function () {
const searchInput = $('#contact .search_form input[type="search"]');
searchInput.on("compositionend", function () {
if (CHAT_UTIL.isIOS()) {
var keyword = searchInput.val();
CONTACT.searchUser(keyword);
}
});
};
var bindMemeberSearch = function () {
const searchInput = $('#contact .search_form input[type="search"]');
searchInput.keyup(function (e) {
const keyword = searchInput.val();
const enterKeyPressed = e.key == "Enter" || e.KeyCode == 13;
const keywordEmpty = keyword == "" || keyword.length < 2;
const keywordNotEmpty = keyword != "" && keyword.length != 0;
if (enterKeyPressed) {
if (keywordNotEmpty) {
searchInput.blur();
return;
}
} else if (keywordEmpty) {
$(".overlay_src_msg").empty();
return;
}
CONTACT.searchUser(keyword);
if (enterKeyPressed) {
searchInput.blur();
return;
}
});
};
var groupDataSearch = function (groupList) {
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
groupList.forEach(function (group) {
let html = renderGroupList(
groupTemplate,
group.groupName,
group.groupId,
group.isFavorite
);
let obj = jQuery.parseHTML(html);
$(".overlay_src_msg").append(obj);
});
};
var renderGroupList = function (url, groupName, groupID, isFavorite) {
return Mustache.render(url, {
name: groupName,
id: groupID,
isFavorite: isFavorite,
});
};
var userDataSearch = function (userList) {
userList.forEach(function (user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
});
var userTemplate = getTemplate(TemplateURL.USER_LIST);
let html = renderUserList(userTemplate, userList);
let obj = jQuery.parseHTML(html);
$(".overlay_src_msg").append(obj);
};
var renderUserList = function (url, userList) {
return Mustache.render(url, {
userList: userList,
});
};
\ No newline at end of file
...@@ -2,8 +2,6 @@ $.lang.en = { ...@@ -2,8 +2,6 @@ $.lang.en = {
"chat_placeholder":"Type message", "chat_placeholder":"Type message",
"chat_search_placeholder":" Search Message", "chat_search_placeholder":" Search Message",
"room_search_placeholder":" Search Room", "room_search_placeholder":" Search Room",
"participants":"Member List",
"exitRoom":"Exit ",
"roomListTitle":"Room List", "roomListTitle":"Room List",
"deleteRoomTitle":"Delete Room", "deleteRoomTitle":"Delete Room",
"inviteUsersButton":"invite", "inviteUsersButton":"invite",
...@@ -21,18 +19,12 @@ $.lang.en = { ...@@ -21,18 +19,12 @@ $.lang.en = {
"orderByTime":"OrderByTime", "orderByTime":"OrderByTime",
"orderByUnread":"OrderByUnread", "orderByUnread":"OrderByUnread",
"roomKeywordPlaceHolder":"Search", "roomKeywordPlaceHolder":"Search",
"okayLabel":"Okay!",
"completeLabel":"Complete.",
"thankLabel":"Thank you",
"startToWorkLabel":"Start to work",
"groupListKeyword":"Search",
"userSearch":"User Search", "userSearch":"User Search",
"groupSearch":"Group Search", "groupSearch":"Group Search",
"groupPageSubtitle":"Groups", "groupPageSubtitle":"Groups",
"noMessages":"No Messages", "noMessages":"No Messages",
"image":"Image", "image":"Image",
"chatKeyword":"Search", "chatKeyword":"Search",
"userListKeyword":"Search",
"newRoomName":"Please input Room Name", "newRoomName":"Please input Room Name",
"everyoneIsHere":"Everyone is in the chat.", "everyoneIsHere":"Everyone is in the chat.",
"people":"people", "people":"people",
......
...@@ -2,8 +2,6 @@ $.lang.ja = { ...@@ -2,8 +2,6 @@ $.lang.ja = {
"chat_placeholder":"メッセージを入力", "chat_placeholder":"メッセージを入力",
"chat_search_placeholder":" メッセージ検索", "chat_search_placeholder":" メッセージ検索",
"room_search_placeholder":" ルーム検索", "room_search_placeholder":" ルーム検索",
"participants":"メンバーリスト",
"exitRoom":"退出 ",
"roomListTitle":"チャット", "roomListTitle":"チャット",
"deleteRoomTitle":"ルーム削除", "deleteRoomTitle":"ルーム削除",
"inviteUsersButton":"招待", "inviteUsersButton":"招待",
...@@ -20,18 +18,12 @@ $.lang.ja = { ...@@ -20,18 +18,12 @@ $.lang.ja = {
"orderByTime":"新着順", "orderByTime":"新着順",
"orderByUnread":"未読優先", "orderByUnread":"未読優先",
"roomKeywordPlaceHolder":"検索", "roomKeywordPlaceHolder":"検索",
"okayLabel":"了解しました。",
"completeLabel":"完了しました。",
"thankLabel":"ありがとうございます。",
"startToWorkLabel":"作業開始します。",
"userSearch":"ユーザー検索", "userSearch":"ユーザー検索",
"groupSearch":"グループ検索", "groupSearch":"グループ検索",
"groupListKeyword":"検索",
"groupPageSubtitle":"グループ", "groupPageSubtitle":"グループ",
"noMessages":"メッセージがありません。", "noMessages":"メッセージがありません。",
"image":"画像", "image":"画像",
"chatKeyword":"検索", "chatKeyword":"検索",
"userListKeyword":"検索",
"invitedUser":"参加者", "invitedUser":"参加者",
"newRoomName":"ルーム名を入力してください", "newRoomName":"ルーム名を入力してください",
"everyoneIsHere":"招待可能なメンバーがいません。", "everyoneIsHere":"招待可能なメンバーがいません。",
......
...@@ -2,8 +2,6 @@ $.lang.ko = { ...@@ -2,8 +2,6 @@ $.lang.ko = {
"chat_placeholder":"메시지를 입력하세요.", "chat_placeholder":"메시지를 입력하세요.",
"chat_search_placeholder":" 메세지검색", "chat_search_placeholder":" 메세지검색",
"room_search_placeholder":" 채팅방 검색", "room_search_placeholder":" 채팅방 검색",
"participants":"멤버 리스트",
"exitRoom":"나가기 ",
"roomListTitle":"채팅 리스트", "roomListTitle":"채팅 리스트",
"deleteRoomTitle":"채팅방 삭제", "deleteRoomTitle":"채팅방 삭제",
"inviteUsersButton":"유저 초대", "inviteUsersButton":"유저 초대",
...@@ -21,18 +19,12 @@ $.lang.ko = { ...@@ -21,18 +19,12 @@ $.lang.ko = {
"orderByTime":"최신순", "orderByTime":"최신순",
"orderByUnread":"안 읽은 순", "orderByUnread":"안 읽은 순",
"roomKeywordPlaceHolder":"검색", "roomKeywordPlaceHolder":"검색",
"okayLabel":"알겠습니다.",
"completeLabel":"작업이 끝났습니다.",
"thankLabel":"감사합니다.",
"startToWorkLabel":"작업을 시작합니다.",
"groupListKeyword":"검색",
"userSearch":"유저 검색", "userSearch":"유저 검색",
"groupSearch":"그룹 검색", "groupSearch":"그룹 검색",
"groupPageSubtitle":"그룹", "groupPageSubtitle":"그룹",
"noMessages":"메시지가 없습니다.", "noMessages":"메시지가 없습니다.",
"image":"이미지", "image":"이미지",
"chatKeyword":"검색", "chatKeyword":"검색",
"userListKeyword":"검색",
"newRoomName":"방 이름을 입력해주세요.", "newRoomName":"방 이름을 입력해주세요.",
"everyoneIsHere":"초대가능한 유저가 없습니다.", "everyoneIsHere":"초대가능한 유저가 없습니다.",
"people":"명", "people":"명",
......
var bindOnNewMessage = function () { var bindOnNewMessage = function () {
// New Message // New Message
// #36170 // #36170
socket.on(SOCKET_KEY.NEW_MESSAGE, function (message, roomId, roomName) { socket.on(SOCKET_KEY.NEW_MESSAGE, function (message, roomID, roomName) {
console.log(message);
const systemMessageTemplate = getTemplate(TemplateURL.SYSTEM_MESSAGE); const systemMessageTemplate = getTemplate(TemplateURL.SYSTEM_MESSAGE);
const unwrappedMessageInfo = decodeMessage(message.text); const unwrappedMessageInfo = decodeMessage(message.text);
...@@ -35,10 +34,12 @@ var bindOnNewMessage = function () { ...@@ -35,10 +34,12 @@ var bindOnNewMessage = function () {
} }
} }
if (typeof ChatRoom !== "undefined") {
// 画像、動画の描画を待ってからスクロール // 画像、動画の描画を待ってからスクロール
setTimeout(function () { setTimeout(function () {
CHAT_UI.scrollToBottom(); ChatRoom.scrollToBottom();
}, 300); }, 300);
}
}); });
}; };
...@@ -57,12 +58,14 @@ var addCollaborationMessage = function ( ...@@ -57,12 +58,14 @@ var addCollaborationMessage = function (
insertDate, insertDate,
createdAt createdAt
) { ) {
const collaborationType = messageInfo[2]; const collaborationType = CHAT_UTIL.getCollaborationType(messageInfo[2]);
const meetingID = getMeetingID(collaborationType, messageInfo); const meetingID = getMeetingID(collaborationType, messageInfo);
const userInCollaboration = getUserInfoList(userID); const userInCollaboration = JSON.parse(
NativeBridgeDataSource.getUserInfoList(userID)
);
userInCollaboration.forEach(function (user) { userInCollaboration.forEach(function (user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); user.profileUrl = Common.getProfileImgUrl(user.profileUrl);
}); });
const openCollaborationMessageTemplate = getTemplate( const openCollaborationMessageTemplate = getTemplate(
...@@ -83,10 +86,7 @@ var addCollaborationMessage = function ( ...@@ -83,10 +86,7 @@ var addCollaborationMessage = function (
}; };
var getMeetingID = function (collaborationType, messageInfo) { var getMeetingID = function (collaborationType, messageInfo) {
if ( if (collaborationType == COLLABORATION_TYPE.DOCUMENT) {
collaborationType ==
CHAT_UTIL.getCollaborationType(CollaborationTypeKey.DOCUMENT)
) {
return messageInfo[3]; return messageInfo[3];
} else { } else {
return 0; return 0;
...@@ -120,10 +120,12 @@ var renderCollaborationMessage = function ( ...@@ -120,10 +120,12 @@ var renderCollaborationMessage = function (
var addTextMessage = function (messageText, message, socketID) { var addTextMessage = function (messageText, message, socketID) {
const messageTextWithSID = insertSID(messageText); const messageTextWithSID = insertSID(messageText);
const messageSender = getUserInfoList(message.userId); const messageSender = JSON.parse(
NativeBridgeDataSource.getUserInfoList(message.userId)
);
const shopMemberName = messageSender[0].shopMemberName; const shopMemberName = messageSender[0].shopMemberName;
const textMessageTemplate = getTextMessageTemplate(message.id === socketID); const textMessageTemplate = getTextMessageTemplate(message.id === socketID);
const profileImagePath = CHAT.getProfileImgUrl(message.profileImagePath); const profileImagePath = Common.getProfileImgUrl(message.profileImagePath);
const html = renderTextMessage( const html = renderTextMessage(
textMessageTemplate, textMessageTemplate,
messageTextWithSID, messageTextWithSID,
...@@ -164,11 +166,7 @@ var renderTextMessage = function ( ...@@ -164,11 +166,7 @@ var renderTextMessage = function (
}; };
var getUserInfoList = function (userID) { var getUserInfoList = function (userID) {
if (CHAT_UTIL.isIOS()) { return JSON.parse(NativeBridgeDataSource.getUserInfoList(userID));
return JSON.parse(CHAT_DB.getUserInfoList(userID));
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getUserInfoList(userID));
}
}; };
var cleanUpCollaborationMessage = function () { var cleanUpCollaborationMessage = function () {
...@@ -189,7 +187,7 @@ var insertSID = function (text) { ...@@ -189,7 +187,7 @@ var insertSID = function (text) {
let replacePath = text; let replacePath = text;
replacePath = replacePath.replaceAll( replacePath = replacePath.replaceAll(
"?fileName=", "?fileName=",
"?sid=" + CHAT.globalLoginParameter.sid + "&fileName=" "?sid=" + currentUserInfo.sid + "&fileName="
); );
return replacePath; return replacePath;
}; };
......
...@@ -3,10 +3,6 @@ var socket; ...@@ -3,10 +3,6 @@ var socket;
// 名前空間 // 名前空間
var CHAT_SOCKET = {}; var CHAT_SOCKET = {};
includeJs("./js/chat-websocket-message.js");
includeJs("./js/chat-websocket-refresh-group-list.js");
includeJs("./js/chat-websocket-refresh-user-list-in-group.js");
CHAT_SOCKET.socketCheck = function () { CHAT_SOCKET.socketCheck = function () {
if (socket == null || socket.disconnected) { if (socket == null || socket.disconnected) {
window.location.reload(); window.location.reload();
...@@ -14,14 +10,14 @@ CHAT_SOCKET.socketCheck = function () { ...@@ -14,14 +10,14 @@ CHAT_SOCKET.socketCheck = function () {
}; };
CHAT_SOCKET.connectSocket = function () { CHAT_SOCKET.connectSocket = function () {
if (IS_ONLINE == "true") { if (serverInfo.isOnline == "true") {
socket = io(CHAT_SERVER_URL); socket = io(serverInfo.chatURL);
setSocketAction(); setSocketAction();
} else { } else {
//オフラインの場合、DBからルーム一覧を表示。 //オフラインの場合、DBからルーム一覧を表示。
if (CHAT_UTIL.isIOS()) { if (deviceInfo.isiOS()) {
//TODO IOSの場合 //TODO IOSの場合
} else if (CHAT_UTIL.isAndroid()) { } else if (deviceInfo.isAndroid()) {
} }
} }
}; };
...@@ -53,33 +49,20 @@ var bindOnConnect = function () { ...@@ -53,33 +49,20 @@ var bindOnConnect = function () {
socket.on(SOCKET_KEY.CONNECT, function () { socket.on(SOCKET_KEY.CONNECT, function () {
// socketが接続されたらチャット画面で画面を更新する // socketが接続されたらチャット画面で画面を更新する
$(".overlay").removeClass("active undismissable"); $(".overlay").removeClass("active undismissable");
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
requestLoginInfo();
CHAT_UI.dismissLoadingIndicator();
}); });
}; };
var requestLoginInfo = function () {
// チャットルームに入場する際、sid, loginId, shopName, roomId, roomNameの情報を取得しNodeJsに渡す
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
} else if (CHAT_UTIL.isAndroid()) {
android.getLoginParameter();
}
};
var bindOnDisconnect = function () { var bindOnDisconnect = function () {
socket.on(SOCKET_KEY.DISCONNECT, function () { socket.on(SOCKET_KEY.DISCONNECT, function () {
//socketが切断されたら黒画面で画面を更新する //socketが切断されたら黒画面で画面を更新する
$(".overlay").addClass("active undismissable"); $(".overlay").addClass("active undismissable");
CHAT_UI.dismissLoadingIndicator(); Common.dismissLoadingIndicator();
}); });
}; };
var bindOnConnectError = function () { var bindOnConnectError = function () {
socket.on(SOCKET_KEY.CONNECT_ERROR, function () { socket.on(SOCKET_KEY.CONNECT_ERROR, function () {
CHAT_UI.dismissLoadingIndicator(); Common.dismissLoadingIndicator();
}); });
}; };
...@@ -97,6 +80,24 @@ var bindOnNewNotification = function () { ...@@ -97,6 +80,24 @@ var bindOnNewNotification = function () {
}); });
}; };
var bindOnRefreshGroupList = function () {
// Update Group List(Invite)
socket.on(SOCKET_KEY.REFRESH_GROUPLIST, function (groups, isInvite) {
const groupListElement = $("#group_list");
groupListElement.html("");
if (groups.length === 0) {
groupListElement.append(
'<center class="text-secondary">' +
getLocalizedString(everyoneIsHere) +
"</center>"
);
}
$("#newRoomName").hide();
});
};
var bindOnShowServerError = function () { var bindOnShowServerError = function () {
socket.on(SOCKET_KEY.SHOW_SERVER_ERROR, function (message) { socket.on(SOCKET_KEY.SHOW_SERVER_ERROR, function (message) {
// #36215 // #36215
...@@ -120,41 +121,42 @@ var bindOnShowServerError = function () { ...@@ -120,41 +121,42 @@ var bindOnShowServerError = function () {
keyboard: false, keyboard: false,
}) })
.on("click", "#customAlertOk", function (e) {}); .on("click", "#customAlertOk", function (e) {});
CHAT_UI.dismissLoadingIndicator(); Common.dismissLoadingIndicator();
if (message == "Room not found") { if (message == "Room not found") {
CHAT.saveRoomInfo(); CHAT_SOCKET.saveRoomInfo();
} }
}); });
}; };
var bindOnRetryJoinProcess = function () { var bindOnRetryJoinProcess = function () {
socket.on(SOCKET_KEY.RETRY_JOIN_PROCESS, function () { socket.on(SOCKET_KEY.RETRY_JOIN_PROCESS, function () {
var ua = window.navigator.userAgent.toLowerCase(); currentUserInfo.configureLanguage();
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
} else if (CHAT_UTIL.isAndroid()) {
android.getLoginParameter();
} else {
CHAT_UI.htmlElementTextInitialize("ko");
// webでのsocket connect // webでのsocket connect
emitJoin(); CHAT_SOCKET.emitJoin(params, true, true);
}
}); });
}; };
var emitJoin = function () { CHAT_SOCKET.emitJoin = function (
socket.emit(SOCKET_KEY.JOIN, params, function (err) { joinInfo,
needsDismissLoadingIndicator,
needsHandlingError
) {
socket.emit(SOCKET_KEY.JOIN, joinInfo, function (err) {
if (err) { if (err) {
if (needsHandlingError) {
errorHandlingForEmitJoin(); errorHandlingForEmitJoin();
CHAT_UI.dismissLoadingIndicator(); }
if (needsDismissLoadingIndicator) {
Common.dismissLoadingIndicator();
}
return; return;
} }
updateRoomName(params.roomName); if (needsDismissLoadingIndicator) {
// loadingIndicatorを表示しない // loadingIndicatorを表示しない
CHAT_UI.dismissLoadingIndicator(); Common.dismissLoadingIndicator();
}
}); });
}; };
...@@ -173,12 +175,54 @@ var errorHandlingForEmitJoin = function () { ...@@ -173,12 +175,54 @@ var errorHandlingForEmitJoin = function () {
.on("click", "#customAlertOk", function (e) {}); .on("click", "#customAlertOk", function (e) {});
}; };
var updateRoomName = function (roomName) { var bindOnRefreshUserListInGroup = function () {
const titleRoomName = $(".titleRoomName"); // Update User List(Invite)
if (roomName != undefined) { // #36170
titleRoomName.text(roomName).data("roomName", roomName); socket.on(
} else { SOCKET_KEY.REFRESH_USERLIST_INGROUP,
let roomListTitle = getLocalizedString("roomListTitle"); function (users, groupId, isInvite) {
titleRoomName.text(roomListTitle); console.debug(
SOCKET_KEY.REFRESH_USERLIST_INGROUP +
"message received but it does nothing."
);
} }
);
};
CHAT_SOCKET.emitCreateMessage = function (sendData, offset) {
socket.emit(SOCKET_KEY.CREATE_MESSAGE, { text: sendData }, offset);
};
CHAT_SOCKET.emitCollaborationFinishMessage = function () {
if (socket != null && socket.connected) {
const sendData = DATA_MESSAGE_SCHEME + FINISH_ALL_COLLABORATION_SIGNAL;
CHAT_SOCKET.emitCreateMessage(sendData, 0);
}
}
CHAT_SOCKET.emitGetGroupList = function (isInvite) {
socket.emit(SOCKET_KEY.GET_GROUP_LIST, isInvite);
};
CHAT_SOCKET.emitLeaveRoom = function () {
socket.emit(SOCKET_KEY.LEAVE_ROOM, function () {});
};
CHAT_SOCKET.saveRoomInfo = function (roomID, roomName) {
roomInfo.roomID = roomID;
roomInfo.roomName = roomName;
NativeBridgeDelegate.saveVisitRoomInfo(roomID, roomName);
};
CHAT_SOCKET.initialJoin = function () {
CHAT_SOCKET.connectSocket();
const joinInfo = new JoinInfo(
currentUserInfo.sid,
currentUserInfo.loginID,
currentUserInfo.shopName,
roomInfo.roomID,
roomInfo.roomName,
currentUserInfo.shopMemberID
);
CHAT_SOCKET.emitJoin(joinInfo, false, false);
}; };
// 名前空間 // 名前空間
var CHAT_UTIL = {}; 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) { CHAT_UTIL.formatDate = function (date) {
const REFERENCE = moment(); const REFERENCE = moment();
const TODAY = REFERENCE.clone().startOf("day"); const TODAY = REFERENCE.clone().startOf("day");
...@@ -120,37 +108,40 @@ function updateDuration() { ...@@ -120,37 +108,40 @@ function updateDuration() {
}); });
} }
CHAT_UTIL.getCollaborationType = function (key) { CHAT_UTIL.getCollaborationType = function (collaborationNumber) {
switch (key) { switch (collaborationNumber) {
case CollaborationTypeKey.AUDIO: case COLLABORATION_TYPE_NUMBER.AUDIO: // fall through
case COLLABORATION_TYPE_NUMBER.AUDIO.toString():
return COLLABORATION_TYPE.AUDIO; return COLLABORATION_TYPE.AUDIO;
case CollaborationTypeKey.CAMERA: case COLLABORATION_TYPE_NUMBER.CAMERA:
case COLLABORATION_TYPE_NUMBER.CAMERA.toString(): // fall through
return COLLABORATION_TYPE.CAMERA; return COLLABORATION_TYPE.CAMERA;
case CollaborationTypeKey.VIDEO: case COLLABORATION_TYPE_NUMBER.VIDEO:
case COLLABORATION_TYPE_NUMBER.VIDEO.toString(): // fall through
return COLLABORATION_TYPE.VIDEO; return COLLABORATION_TYPE.VIDEO;
case CollaborationTypeKey.DOCUMENT: case COLLABORATION_TYPE_NUMBER.DOCUMENT:
case COLLABORATION_TYPE_NUMBER.DOCUMENT.toString(): // fall through
return COLLABORATION_TYPE.DOCUMENT; return COLLABORATION_TYPE.DOCUMENT;
case COLLABORATION_TYPE_NUMBER.BOARD:
case COLLABORATION_TYPE_NUMBER.BOARD.toString(): // fall through
return COLLABORATION_TYPE.BOARD;
default: default:
return 0; return 0;
} }
}; };
CHAT_UTIL.getCoviewTypeFromCollaborationType = function ( CHAT_UTIL.getCollaborationTypeNumber = function (collaborationType) {
joinCollaborationType switch (collaborationType) {
) {
switch (joinCollaborationType) {
case COLLABORATION_TYPE.AUDIO: case COLLABORATION_TYPE.AUDIO:
console.log(CollaborationTypeKey.AUDIO); return COLLABORATION_TYPE_NUMBER.AUDIO;
return CollaborationTypeKey.AUDIO;
case COLLABORATION_TYPE.CAMERA: case COLLABORATION_TYPE.CAMERA:
console.log(CollaborationTypeKey.CAMERA); return COLLABORATION_TYPE_NUMBER.CAMERA;
return CollaborationTypeKey.CAMERA;
case COLLABORATION_TYPE.VIDEO: case COLLABORATION_TYPE.VIDEO:
return CollaborationTypeKey.VIDEO; return COLLABORATION_TYPE_NUMBER.VIDEO;
case COLLABORATION_TYPE.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
return CollaborationTypeKey.DOCUMENT; return COLLABORATION_TYPE_NUMBER.DOCUMENT;
case COLLABORATION_TYPE.BOARD: case COLLABORATION_TYPE.BOARD:
return CollaborationTypeKey.BOARD; return COLLABORATION_TYPE_NUMBER.BOARD;
default: default:
return 0; return 0;
} }
......
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