Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
37408070
Commit
37408070
authored
Nov 07, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement main navs title html,js
parent
8c6704ae
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
19 deletions
+58
-19
abvw/common/main-nav-title.html
+11
-0
abvw/html/push-message-list.html
+1
-12
abvw/js/dashboard/dashboard.js
+1
-1
abvw/js/pushMessageList/push-message-list.js
+10
-0
abvw/js/template/template.js
+35
-6
No files found.
abvw/common/main-nav-title.html
0 → 100644
View file @
37408070
<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
abvw/html/push-message-list.html
View file @
37408070
...
@@ -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"
>
...
...
abvw/js/dashboard/dashboard.js
View file @
37408070
...
@@ -117,7 +117,7 @@ DASHBOARD.loadCommon = function() {
...
@@ -117,7 +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
.
loadMain
Title
(
"#includedMainTitle"
,
"dashboard"
,
DASHBOARD
.
loadMainTitleCallback
);
TEMPLATE
.
loadMain
NavsTitle
(
"#includedMainTitle"
,
"dashboard"
,
null
,
DASHBOARD
.
loadMainTitleCallback
);
}
}
/** Update pickup config from setting dashboard data */
/** Update pickup config from setting dashboard data */
...
...
abvw/js/pushMessageList/push-message-list.js
View file @
37408070
...
@@ -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
);
});
});
...
...
abvw/js/template/template.js
View file @
37408070
...
@@ -57,14 +57,43 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
...
@@ -57,14 +57,43 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
}
}
/**
/**
* load main title html to a element by id
* load main
navs
title html to a element by id
* @param {string} elmentId - elementId where contain main title html
* @param {string} elmentId - elementId where contain main title html
* @param {string} langTitle - title lang message
* @param {string} titleLang - lang of title
* @param {Array} navs - array nav items (titleLang, href)
*/
*/
TEMPLATE
.
loadMainTitle
=
function
(
elmentId
,
langTitle
,
completeCallback
)
{
TEMPLATE
.
loadMainNavsTitle
=
function
(
elmentId
,
titleLang
,
navs
,
completeCallback
)
{
$
(
elmentId
).
load
(
"../common/main-title.html"
,
function
()
{
var
titleHtmlPath
=
'../common/main-title.html'
;
if
(
langTitle
)
{
if
(
navs
)
{
$
(
'#mainTitleHeader'
).
attr
(
"lang"
,
langTitle
);
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
();
I18N
.
initi18n
();
if
(
completeCallback
)
{
if
(
completeCallback
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment