Commit 462e03ac by Takumi Imai

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

Feature/1.0 check web dev 50265

See merge request !23
parents 719e204f 2b7ba435
<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>
......
...@@ -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">
......
...@@ -117,6 +117,7 @@ DASHBOARD.loadCommon = function() { ...@@ -117,6 +117,7 @@ DASHBOARD.loadCommon = function() {
TEMPLATE.loadHearder("#includedHeader"); TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadDashboardSetting("#includedDashboardSetting", DASHBOARD.changeSettingCallback); TEMPLATE.loadDashboardSetting("#includedDashboardSetting", DASHBOARD.changeSettingCallback);
TEMPLATE.loadConfirmModal("#includedConfirmModal"); TEMPLATE.loadConfirmModal("#includedConfirmModal");
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "dashboard", null, DASHBOARD.loadMainTitleCallback);
} }
/** Update pickup config from setting dashboard data */ /** Update pickup config from setting dashboard data */
...@@ -138,7 +139,7 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) { ...@@ -138,7 +139,7 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
DASHBOARD.communicationItems.forEach(function(item) { DASHBOARD.communicationItems.forEach(function(item) {
if (item.id == 'messageList') { if (item.id == 'messageList') {
item.count = 0; item.count = 0;
if (dataDashboard['pushMesage']) { if (dataDashboard.dashboard['pushMesage']) {
item.count = dataDashboard.dashboard['pushMesage']; item.count = dataDashboard.dashboard['pushMesage'];
} }
} }
...@@ -168,3 +169,15 @@ DASHBOARD.goSendMessage = function() { ...@@ -168,3 +169,15 @@ DASHBOARD.goSendMessage = function() {
DASHBOARD.changeSettingCallback = function() { DASHBOARD.changeSettingCallback = function() {
location.reload(); location.reload();
} }
/**
* callback when complete load main title html
*/
DASHBOARD.loadMainTitleCallback = function() {
//add dashboard setting item
var elmA = $('<a href="#" data-toggle="modal" data-target="#dashboard-setting-modal">');
let elmImg = $('<img src="../common/img/icon_dashboard_setting.svg" alt="" class="p-1 w-40px lang" lang="dashboardSettings" data-toggle="tooltip" data-placement="bottom" title="">');
elmImg.attr('title', I18N.i18nText('dashboardSettings'));
elmA.append(elmImg);
$('#mainTitleHeader').after(elmA);
}
...@@ -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);
}); });
......
...@@ -55,3 +55,49 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) { ...@@ -55,3 +55,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