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
8c6704ae
Commit
8c6704ae
authored
Nov 07, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement main title html,js
parent
6e56bb54
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
9 deletions
+38
-9
abvw/common/main-title.html
+9
-0
abvw/html/dashboard.html
+2
-9
abvw/js/dashboard/dashboard.js
+10
-0
abvw/js/template/template.js
+17
-0
No files found.
abvw/common/main-title.html
0 → 100644
View file @
8c6704ae
<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
abvw/html/dashboard.html
View file @
8c6704ae
...
@@ -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>
...
...
abvw/js/dashboard/dashboard.js
View file @
8c6704ae
...
@@ -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
.
loadMainTitle
(
"#includedMainTitle"
,
"dashboard"
,
DASHBOARD
.
loadMainTitleCallback
);
}
}
/** Update pickup config from setting dashboard data */
/** Update pickup config from setting dashboard data */
...
@@ -168,3 +169,12 @@ DASHBOARD.goSendMessage = function() {
...
@@ -168,3 +169,12 @@ DASHBOARD.goSendMessage = function() {
DASHBOARD
.
changeSettingCallback
=
function
()
{
DASHBOARD
.
changeSettingCallback
=
function
()
{
location
.
reload
();
location
.
reload
();
}
}
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
);
}
abvw/js/template/template.js
View file @
8c6704ae
...
@@ -55,3 +55,20 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
...
@@ -55,3 +55,20 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
I18N
.
initi18n
();
I18N
.
initi18n
();
});
});
}
}
/**
* load main title html to a element by id
* @param {string} elmentId - elementId where contain main title html
* @param {string} langTitle - title lang message
*/
TEMPLATE
.
loadMainTitle
=
function
(
elmentId
,
langTitle
,
completeCallback
)
{
$
(
elmentId
).
load
(
"../common/main-title.html"
,
function
()
{
if
(
langTitle
)
{
$
(
'#mainTitleHeader'
).
attr
(
"lang"
,
langTitle
);
}
I18N
.
initi18n
();
if
(
completeCallback
)
{
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