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
4d0921ae
Commit
4d0921ae
authored
Nov 04, 2022
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
direct home screen
parent
5310be93
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
109 deletions
+61
-109
abvw/common/js/header.js
+51
-89
abvw/html/index.html
+4
-3
abvw/js/pickup/pickup.js
+3
-3
abvw/js/topPage/topPage.js
+3
-14
No files found.
abvw/common/js/
foot
er.js
→
abvw/common/js/
head
er.js
View file @
4d0921ae
/**
*
Common js for footer
.
*
header js for index
.
* ※Code is written mainly for dashboard and operationList.
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
FOOT
ER
=
{};
var
HEAD
ER
=
{};
/**
* Change specific footer bottom to active.
*
* @param {String} bottomNavId
*/
FOOTER
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
'#'
+
bottomNavId
);
if
(
typeof
elm
!==
'object'
)
{
console
.
log
(
'FOOTER.activeBottomNav:elm !== object:'
+
bottomNavId
);
return
;
}
elm
.
removeClass
(
'text-secondary'
);
elm
.
addClass
(
'text-primary'
);
let
img
=
elm
.
find
(
'img'
)[
0
];
if
(
img
&&
img
.
getAttribute
(
'data-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-src'
);
}
};
/**
* change inactive all footer bottom
*/
FOOTER
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
let
img
=
navs
[
i
].
querySelector
(
'img'
);
if
(
img
&&
img
.
getAttribute
(
'data-inactive-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-inactive-src'
);
/** Direct home page setting */
HEADER
.
goToHomePage
=
function
(
pageId
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
settings
.
dashboardHome
==
1
)
{
HEADER
.
goDashboard
();
}
else
{
HEADER
.
goOperationList
();
}
};
});
}
/**
* Go page of index.html.
* Store tab id in session for want to show display.
*
* @param {String} tabId
* Go page of operationList
*/
FOOTER
.
goIndexPage
=
function
(
tabId
)
{
sessionStorage
.
activeTab
=
tabId
;
COMMON
.
goUrlWithCurrentParams
(
DAFAULT_PAGE
);
HEADER
.
goOperationList
=
function
()
{
$
(
'#footer'
).
load
(
CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
HEADER
.
activeInitBottomNav
(
'operationListBottomNav'
);
TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
});
};
/**
*
is the url index.html?
*
Go page of dashboard
*/
FOOTER
.
isIndexPage
=
function
()
{
if
(
typeof
location
===
'object'
&&
typeof
location
.
pathname
===
'string'
)
{
if
(
location
.
pathname
.
includes
(
CONSTANT
.
PAGE_NAME
.
DEFAULT
)
==
true
)
{
return
true
;
}
}
return
false
;
HEADER
.
goDashboard
=
function
()
{
COMMON
.
avwScreenMove
(
"dashboard.html"
);
};
/**
* Initialize with any navigation
*
* @param {String} bottomNav
*/
FOOT
ER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
FOOT
ER
.
inactiveAllBottomNav
();
FOOT
ER
.
activeBottomNav
(
bottomNav
);
HEAD
ER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
HEAD
ER
.
inactiveAllBottomNav
();
HEAD
ER
.
activeBottomNav
(
bottomNav
);
};
/**
*
Go page of dashboard
*
change inactive all footer bottom
*/
FOOTER
.
goDashboard
=
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
DASHBOARD
;
FOOTER
.
activeInitBottomNav
(
'dashboardBottomNav'
);
if
(
FOOTER
.
isIndexPage
())
{
TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
return
;
HEADER
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
let
img
=
navs
[
i
].
querySelector
(
'img'
);
if
(
img
&&
img
.
getAttribute
(
'data-inactive-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-inactive-src'
);
}
FOOTER
.
goIndexPage
(
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
};
/**
* Go page of operationList
*/
FOOTER
.
goOperationList
=
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
FOOTER
.
activeInitBottomNav
(
'operationListBottomNav'
);
if
(
FOOTER
.
isIndexPage
())
{
TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
return
;
}
FOOTER
.
goIndexPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
};
/**
* Go to active tab when footer was loaded.
* If it is no active tab, go to page in settings.
* Change specific footer bottom to active.
*
* @param {String} bottomNavId
*/
FOOTER
.
initFooter
=
function
()
{
$
(
'#footer'
).
load
(
CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
if
(
typeof
sessionStorage
!=
'undefined'
&&
typeof
sessionStorage
.
activeTab
!=
'undefined'
)
{
if
(
sessionStorage
.
activeTab
==
CONSTANT
.
PAGE_TAB
.
DASHBOARD
)
{
FOOTER
.
goDashboard
();
}
else
{
FOOTER
.
goOperationList
();
}
HEADER
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
'#'
+
bottomNavId
);
if
(
typeof
elm
!==
'object'
)
{
console
.
log
(
'HEADER.activeBottomNav:elm !== object:'
+
bottomNavId
);
return
;
}
FOOTER
.
goOperationList
();
// CHK.loadDashboardSetting(function() {
// if (CHK.dashboardSetting.dashboardHome) {
// FOOTER.goDashboard();
// } else {
// FOOTER.goOperationList();
// }
// });
});
elm
.
removeClass
(
'text-secondary'
);
elm
.
addClass
(
'text-primary'
);
let
img
=
elm
.
find
(
'img'
)[
0
];
if
(
img
&&
img
.
getAttribute
(
'data-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-src'
);
}
};
\ No newline at end of file
abvw/html/index.html
View file @
4d0921ae
...
...
@@ -23,13 +23,13 @@
<script
src=
"/abvw/js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboardSetting/dashboard-setting.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboard/dashboard.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/header.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/topPage/topPage.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/footer.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/app.js?__UPDATEID__"
defer
></script>
</head>
<body
onload=
"TOP.init();"
style=
"position: relative; margin-top: 53px;"
>
<body
style=
"position: relative; margin-top: 53px;"
>
<!--作業一覧画面-->
<section
id=
"operationList"
class=
"page-content"
style=
"display: none;"
>
...
...
@@ -197,7 +197,7 @@
<!--ローディング-->
<div
id=
"check_loading"
style=
"display:none; position: relative; overflow:hidden;"
>
<p
id=
"checkLoadingMessage"
></p>
<div
id=
"checkLoadingImage"
><img
src=
'
${check}images/transferLoading.gif
'
/></div>
<div
id=
"checkLoadingImage"
><img
src=
'
/abvw/img/loading.svg
'
/></div>
</div>
</body>
</html>
\ No newline at end of file
abvw/js/pickup/pickup.js
View file @
4d0921ae
...
...
@@ -227,7 +227,7 @@ PICKUP.showCountDisplayPickupItem = function(elementId, count) {
*/
PICKUP
.
initNewReportTab
=
function
()
{
PICKUP
.
getNewreportListData
(
function
(
json
)
{
PICKUP
.
createNewReportList
(
json
.
operation
t
List
);
PICKUP
.
createNewReportList
(
json
.
operationList
);
});
}
...
...
@@ -237,7 +237,7 @@ PICKUP.initNewReportTab = function() {
*/
PICKUP
.
initContinuosWorkTab
=
function
()
{
PICKUP
.
getContinuousWorkListData
(
function
(
json
)
{
PICKUP
.
createContinousWorkList
(
json
.
operation
t
List
);
PICKUP
.
createContinousWorkList
(
json
.
operationList
);
});
}
...
...
@@ -246,7 +246,7 @@ PICKUP.initNewReportTab = function() {
*/
PICKUP
.
initReportWithWarningsTab
=
function
()
{
PICKUP
.
getReportWithWarningsListData
(
function
(
json
)
{
PICKUP
.
createReportWithWarningList
(
json
.
operation
t
List
);
PICKUP
.
createReportWithWarningList
(
json
.
operationList
);
});
}
...
...
abvw/js/topPage/topPage.js
View file @
4d0921ae
...
...
@@ -16,6 +16,8 @@ $(document).ready(function () {
//setting msg of html
COMMON
.
updateLang
();
TOP
.
init
();
});
/**
...
...
@@ -23,23 +25,10 @@ $(document).ready(function () {
*/
TOP
.
init
=
function
()
{
COMMON
.
showLoading
();
TOP
.
goToHomePage
();
HEADER
.
goToHomePage
();
COMMON
.
closeLoading
();
};
/** Direct home page setting */
TOP
.
goToHomePage
=
function
(
pageId
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
settings
.
dashboardHome
==
1
)
{
COMMON
.
avwScreenMove
(
"dashboard.html"
);
}
else
{
FOOTER
.
initFooter
();
//app should get data after initFooter
}
});
}
/**
* Show page by arbitrary id
*
...
...
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