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.
* ※Code is written mainly for dashboard and operationList.
*
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
*/
var
FOOT
ER
=
{};
var
HEAD
ER
=
{};
/**
/** Direct home page setting */
* Change specific footer bottom to active.
HEADER
.
goToHomePage
=
function
(
pageId
)
{
*
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
* @param {String} bottomNavId
if
(
settings
.
dashboardHome
==
1
)
*/
{
FOOTER
.
activeBottomNav
=
function
(
bottomNavId
)
{
HEADER
.
goDashboard
();
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'
);
}
}
else
{
HEADER
.
goOperationList
();
}
}
};
});
}
/**
/**
* Go page of index.html.
* Go page of operationList
* Store tab id in session for want to show display.
*
* @param {String} tabId
*/
*/
FOOTER
.
goIndexPage
=
function
(
tabId
)
{
HEADER
.
goOperationList
=
function
()
{
sessionStorage
.
activeTab
=
tabId
;
$
(
'#footer'
).
load
(
CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
COMMON
.
goUrlWithCurrentParams
(
DAFAULT_PAGE
);
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
()
{
HEADER
.
goDashboard
=
function
()
{
if
(
typeof
location
===
'object'
&&
typeof
location
.
pathname
===
'string'
)
{
COMMON
.
avwScreenMove
(
"dashboard.html"
);
if
(
location
.
pathname
.
includes
(
CONSTANT
.
PAGE_NAME
.
DEFAULT
)
==
true
)
{
return
true
;
}
}
return
false
;
};
};
/**
/**
* Initialize with any navigation
* Initialize with any navigation
*
*
* @param {String} bottomNav
* @param {String} bottomNav
*/
*/
FOOT
ER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
HEAD
ER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
FOOT
ER
.
inactiveAllBottomNav
();
HEAD
ER
.
inactiveAllBottomNav
();
FOOT
ER
.
activeBottomNav
(
bottomNav
);
HEAD
ER
.
activeBottomNav
(
bottomNav
);
};
};
/**
/**
*
Go page of dashboard
*
change inactive all footer bottom
*/
*/
FOOTER
.
goDashboard
=
function
()
{
HEADER
.
inactiveAllBottomNav
=
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
DASHBOARD
;
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
FOOTER
.
activeInitBottomNav
(
'dashboardBottomNav'
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
if
(
FOOTER
.
isIndexPage
())
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
let
img
=
navs
[
i
].
querySelector
(
'img'
);
return
;
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.
* Change specific footer bottom to active.
* If it is no active tab, go to page in settings.
*
* @param {String} bottomNavId
*/
*/
FOOTER
.
initFooter
=
function
()
{
HEADER
.
activeBottomNav
=
function
(
bottomNavId
)
{
$
(
'#footer'
).
load
(
CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
let
elm
=
$
(
'#'
+
bottomNavId
);
if
(
typeof
sessionStorage
!=
'undefined'
&&
typeof
sessionStorage
.
activeTab
!=
'undefined'
)
{
if
(
typeof
elm
!==
'object'
)
{
if
(
sessionStorage
.
activeTab
==
CONSTANT
.
PAGE_TAB
.
DASHBOARD
)
{
console
.
log
(
'HEADER.activeBottomNav:elm !== object:'
+
bottomNavId
);
FOOTER
.
goDashboard
();
}
else
{
FOOTER
.
goOperationList
();
}
return
;
return
;
}
}
elm
.
removeClass
(
'text-secondary'
);
FOOTER
.
goOperationList
();
elm
.
addClass
(
'text-primary'
);
// CHK.loadDashboardSetting(function() {
let
img
=
elm
.
find
(
'img'
)[
0
];
// if (CHK.dashboardSetting.dashboardHome) {
if
(
img
&&
img
.
getAttribute
(
'data-src'
))
{
// FOOTER.goDashboard();
img
.
src
=
img
.
getAttribute
(
'data-src'
);
// } else {
}
// FOOTER.goOperationList();
// }
// });
});
};
};
\ No newline at end of file
abvw/html/index.html
View file @
4d0921ae
...
@@ -23,13 +23,13 @@
...
@@ -23,13 +23,13 @@
<script
src=
"/abvw/js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboardSetting/dashboard-setting.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/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/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>
<script
src=
"/abvw/common/js/app.js?__UPDATEID__"
defer
></script>
</head>
</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;"
>
<section
id=
"operationList"
class=
"page-content"
style=
"display: none;"
>
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
<!--ローディング-->
<!--ローディング-->
<div
id=
"check_loading"
style=
"display:none; position: relative; overflow:hidden;"
>
<div
id=
"check_loading"
style=
"display:none; position: relative; overflow:hidden;"
>
<p
id=
"checkLoadingMessage"
></p>
<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>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
abvw/js/pickup/pickup.js
View file @
4d0921ae
...
@@ -227,7 +227,7 @@ PICKUP.showCountDisplayPickupItem = function(elementId, count) {
...
@@ -227,7 +227,7 @@ PICKUP.showCountDisplayPickupItem = function(elementId, count) {
*/
*/
PICKUP
.
initNewReportTab
=
function
()
{
PICKUP
.
initNewReportTab
=
function
()
{
PICKUP
.
getNewreportListData
(
function
(
json
)
{
PICKUP
.
getNewreportListData
(
function
(
json
)
{
PICKUP
.
createNewReportList
(
json
.
operation
t
List
);
PICKUP
.
createNewReportList
(
json
.
operationList
);
});
});
}
}
...
@@ -237,7 +237,7 @@ PICKUP.initNewReportTab = function() {
...
@@ -237,7 +237,7 @@ PICKUP.initNewReportTab = function() {
*/
*/
PICKUP
.
initContinuosWorkTab
=
function
()
{
PICKUP
.
initContinuosWorkTab
=
function
()
{
PICKUP
.
getContinuousWorkListData
(
function
(
json
)
{
PICKUP
.
getContinuousWorkListData
(
function
(
json
)
{
PICKUP
.
createContinousWorkList
(
json
.
operation
t
List
);
PICKUP
.
createContinousWorkList
(
json
.
operationList
);
});
});
}
}
...
@@ -246,7 +246,7 @@ PICKUP.initNewReportTab = function() {
...
@@ -246,7 +246,7 @@ PICKUP.initNewReportTab = function() {
*/
*/
PICKUP
.
initReportWithWarningsTab
=
function
()
{
PICKUP
.
initReportWithWarningsTab
=
function
()
{
PICKUP
.
getReportWithWarningsListData
(
function
(
json
)
{
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 () {
...
@@ -16,6 +16,8 @@ $(document).ready(function () {
//setting msg of html
//setting msg of html
COMMON
.
updateLang
();
COMMON
.
updateLang
();
TOP
.
init
();
});
});
/**
/**
...
@@ -23,23 +25,10 @@ $(document).ready(function () {
...
@@ -23,23 +25,10 @@ $(document).ready(function () {
*/
*/
TOP
.
init
=
function
()
{
TOP
.
init
=
function
()
{
COMMON
.
showLoading
();
COMMON
.
showLoading
();
TOP
.
goToHomePage
();
HEADER
.
goToHomePage
();
COMMON
.
closeLoading
();
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
* 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