Commit 102d0078 by Takumi Imai

Merge branch 'feature/1.0_check_web_dev' into feature/1.0_check_web_dev_imai

# Conflicts:
#	abweb/html/dashboard.html
#	abweb/html/push-message-list.html
#	abweb/js/dashboard/dashboard.js
parents f06bfb5d 462e03ac
<div id="main-ttl">
<div class="container">
<!-- breadcrumb -->
<nav id="mainTitleNavs" aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0"></ol>
</nav>
<!-- title -->
<h1 id="mainTitleHeader" class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 lang"></h1>
</div>
</div>
\ No newline at end of file
<div id="main-ttl">
<div class="container">
<!-- title -->
<div class="d-flex align-items-center">
<h1 id="mainTitleHeader" class="fs-14 font-weight-bold pt-4 pb-3 mb-0 mr-auto lang"></h1>
</div>
</div>
</div>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>ダッシュボード</title> <title class="lang" lang="dashboard"></title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<!-- favicons --> <!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon"> <link href="../common/img/favicon.ico" rel="icon">
...@@ -37,17 +37,10 @@ ...@@ -37,17 +37,10 @@
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- dashboard --> <!-- dashboard -->
<main> <main>
<div class="container"> <div class="container">
<!-- title -->
<div class="d-flex align-items-center">
<h1 class="fs-14 font-weight-bold pt-4 pb-3 mb-0 mr-auto lang" lang="dashboard"></h1>
<a href="#" data-toggle="modal" data-target="#dashboard-setting-modal" >
<img src="../common/img/icon_dashboard_setting.svg" type="image" alt="" class="p-1 w-40px lang" lang="dashboardSettings">
</a>
</div>
<!-- sub title --> <!-- sub title -->
<h2 class="fs-8 font-weight-bold lang" id="#pickupHeader" lang="pickup"></h2> <h2 class="fs-8 font-weight-bold lang" id="#pickupHeader" lang="pickup"></h2>
...@@ -73,5 +66,4 @@ ...@@ -73,5 +66,4 @@
<script type="text/javascript" src="../common/js/newdash/app.js?__UPDATEID__"></script> <script type="text/javascript" src="../common/js/newdash/app.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/newdash/common.js?__UPDATEID__"></script> <script type="text/javascript" src="../common/js/newdash/common.js?__UPDATEID__"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -38,21 +38,10 @@ ...@@ -38,21 +38,10 @@
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- message list --> <!-- message list -->
<main> <main>
<div class="container"> <div class="container">
<!-- breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0">
<li class="breadcrumb-item"><a href="dashboard.html" class="text-decoration-none text-underline lang" lang="dashboard"></a></li>
<li class="breadcrumb-item active lang" lang="messageListTitle" aria-current="page"><span></span></li>
</ol>
</nav>
<!-- title -->
<h1 class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 lang" lang="messageListTitle"></h1>
<!-- message --> <!-- message -->
<ul class="card-list message-list p-0" id="messageList"> <ul class="card-list message-list p-0" id="messageList">
<li class="card mb-2 not-found d-none"> <li class="card mb-2 not-found d-none">
...@@ -66,5 +55,4 @@ ...@@ -66,5 +55,4 @@
</main> </main>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -10,6 +10,16 @@ PushMessageList.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_account ...@@ -10,6 +10,16 @@ PushMessageList.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_account
*/ */
PushMessageList.init = function() { PushMessageList.init = function() {
TEMPLATE.loadHearder("#includedHeader"); TEMPLATE.loadHearder("#includedHeader");
const navs = [
{
titleLang: 'dashboard',
href: 'dashboard.html',
},
{
titleLang: 'messageListTitle',
},
];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "messageListTitle", navs, null);
PushMessageList.getMessageList(function(messageList) { PushMessageList.getMessageList(function(messageList) {
PushMessageList.generateMessageListHtml(messageList.pushMessageList); PushMessageList.generateMessageListHtml(messageList.pushMessageList);
}); });
......
...@@ -61,3 +61,49 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) { ...@@ -61,3 +61,49 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
I18N.initi18n(); I18N.initi18n();
}); });
} }
/**
* load main navs title html to a element by id
* @param {string} elmentId - elementId where contain main title html
* @param {string} titleLang - lang of title
* @param {Array} navs - array nav items (titleLang, href)
*/
TEMPLATE.loadMainNavsTitle = function(elmentId, titleLang, navs, completeCallback) {
var titleHtmlPath = '../common/main-title.html';
if (navs) {
titleHtmlPath = '../common/main-nav-title.html';
}
$(elmentId).load(titleHtmlPath , function(data) {
$(elmentId).replaceWith(data);
if (titleLang) {
$('#mainTitleHeader').attr("lang", titleLang);
}
if (navs) {
var olElm = $('#mainTitleNavs ol');
for (var i = 0; i < navs.length; i++) {
const nav = navs[i];
var liElm = $('<li class="breadcrumb-item" />');
if (nav.href) {
var aElm = $('<a class="text-decoration-none text-underline lang" />');
aElm.attr('href', nav.href);
if (nav.titleLang) {
aElm.attr('lang', nav.titleLang);
}
liElm.append(aElm);
} else {
liElm.addClass('lang');
liElm.attr('aria-current', 'page');
liElm.append('<span></span>');
if (nav.titleLang) {
liElm.attr('lang', nav.titleLang);
}
}
olElm.append(liElm);
}
}
I18N.initi18n();
if (completeCallback) {
completeCallback();
}
});
}
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